[
  {
    "path": ".gitignore",
    "content": "*.idea\n*.iml\n*.DS_Store\nnode_modules\nnpm-debug.log\n\n# Generated data for API\n/core/api/data\n/log\n\n# Generated JSdoc\n/jsdoc\n\n# Build folder for assets\n/build\n\n# Web server root, and your specs home\n# You can store other repository in this path\n/user"
  },
  {
    "path": ".jshintrc",
    "content": "{\n\t\"eqeqeq\": true,\n\t\"expr\": true,\n\t\"forin\": true,\n\t\"immed\": true,\n\t\"latedef\": true,\n\t\"smarttabs\": true,\n\t\"strict\": true,\n\t\"sub\": true,\n\t\"newcap\": true,\n\t\"noarg\": true,\n\t\"nonew\": false,\n\t\"trailing\": true,\n\t\"undef\": true,\n\t\"unused\": \"vars\",\n\t\"devel\": true,\n\t\"laxbreak\": true,\n\t\"node\": true,\n\t\"browser\": true,\n\t\"scripturl\": true,\n\t\"jquery\": true,\n\t\"predef\": [ \"define\", \"Prism\", \"SourceGetSections\"]\n}\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nnode_js:\n  - \"0.10\"\n  - \"0.11\"\n  - \"0.12\"\nsudo: false\nnotifications:\n  email:\n    on_success: never\n    on_failure: always\nbefore_script: \"git clone https://github.com/sourcejs/init.git user\"\nscript: npm run ci-test"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# How to become a contributor and submit your own code\n\n## Contributing A Patch\n\n1. Submit an issue describing your proposed change to the repo in question.\n1. The repo owner will respond to your issue promptly.\n1. Fork the desired repo, develop and test your code changes.\n1. Submit a pull request to next dev branch (for example 0.5.1-dev).\n\n## Protocols for Collaborative Development\n\nPlease read [this doc](MAINTAINING.md) for information on how we're running development for the project.\n\n# Additional Resources\n\n* [@SourceJS](https://twitter.com/SourceJS)\n* [Web site](http://sourcejs.com)\n* [General documentation](http://sourcejs.com/docs/)\n* [Quick Start guide](http://sourcejs.com/docs/base/)\n* [More information on contributing](MAINTAINING.md)\n\n## Team members\n\nAll inquiries should be forwarded to [Robert Haritonov](mailto:r@rhr.me).\n\nCore contributors and maintainers:\n* [Robert Haritonov](https://github.com/operatino)\n* [Ilya Mikhailov](https://github.com/cheshirsky)\n"
  },
  {
    "path": "Gruntfile.js",
    "content": "'use strict';\nvar path = require('path');\nvar fs = require('fs');\n\nvar pathToApp = path.resolve('./');\nglobal.pathToApp = pathToApp;\n\nvar loadOptions = require('./core/loadOptions');\n\n// NPM 3 compatibility fix\nvar getLoaderPackageName = function() {\n    var packageName;\n    var parentFolderName = path.basename(path.resolve('..'));\n    var isSubPackage = parentFolderName === 'node_modules';\n    var isLocalDepsAvailable = fs.existsSync('node_modules/grunt-autoprefixer') && fs.existsSync('node_modules/grunt-contrib-cssmin');\n\n    if (isSubPackage && !isLocalDepsAvailable) {\n        packageName = 'load-grunt-parent-tasks';\n    } else {\n        packageName = 'load-grunt-tasks';\n    }\n\n    return packageName;\n};\n\nmodule.exports = function(grunt) {\n    var appPort = grunt.option('app-port') || 8080;\n\n    // load all grunt tasks matching the `grunt-*` pattern\n    require(getLoaderPackageName())(grunt);\n\n    // measuring processing time\n    require('time-grunt')(grunt);\n\n    grunt.initConfig({\n        options: loadOptions(pathToApp),\n\n        pathToUser: '<%= options.core.common.pathToUser %>',\n\n        banner:'/*!\\n' +\n                '* SourceJS - Living Style Guides Engine and Integrated Maintenance Environment for Front-end Components.\\n' +\n                '* @copyright 2013-2015 Sourcejs.com\\n' +\n                '* @license MIT license: http://github.com/sourcejs/source/wiki/MIT-License\\n' +\n                '* */\\n',\n\n        // clean files after build\n        clean: {\n            build: [\n                'build'\n            ]\n        },\n\n        jshint: {\n            options: {\n                jshintrc: \".jshintrc\"\n            },\n            gruntfile: [\"Gruntfile.js\"],\n            modules: [\"assets/js/modules/**/*.js\"],\n            core: [\n                \"app.js\",\n                \"core/**/*.js\"\n            ]\n        },\n\n        copy: {\n            js: {\n                expand: true,\n                dest: 'build',\n                src: [\n                    'assets/js/**/*.js',\n                    '<%= pathToUser %>/assets/js/**/*.js',\n                    '!assets/js/**/_*.js',\n                    '!<%= pathToUser %>/assets/js/**/_*.js'\n                ]\n            }\n        },\n\n        uglify: {\n            main: {\n                options: {\n                    preserveComments: 'some'\n                },\n                expand: true,\n                dest: './',\n                src: [\n                    'build/**/*.js'\n                ]\n            }\n        },\n\n        cssmin: {\n            user: {\n                options: {\n                    noAdvanced: true\n                },\n                expand: true,\n                dest: 'build',\n                src: [\n                    '<%= pathToUser %>/assets/**/*.css'\n                ]\n            },\n\n            // For processing files after preprocessors\n            build: {\n                options: {\n                    noAdvanced: true\n                },\n                expand: true,\n                dest: 'build',\n                cwd: 'build',\n                src: ['**/*.css']\n            }\n        },\n\n        htmlmin: {\n            main: {\n                options: {\n                    removeComments: true,\n                    collapseWhitespace: true\n                },\n                expand: true,\n                dest: 'build',\n                src: [\n                    'assets/templates/**/*.html',\n                    '<%= pathToUser %>/assets/templates/**/*.html'\n                ]\n            }\n        },\n\n        less: {\n            main: {\n                files: {\n                    \"build/assets/css/defaults.css\": \"assets/css/defaults.less\"\n                }\n            },\n            bundles: {\n                expand: true,\n                dest: 'build/assets/css',\n                cwd: 'assets/css',\n                src: ['**/*.bundle.less'],\n                ext: '.bundle.css'\n            }\n        },\n\n        jsdoc: {\n            core: {\n                src: ['core/**/*.js'],\n                options: {\n                    destination: 'jsdoc/core'\n                }\n            },\n            assets: {\n                src: [\n                    'assets/js/**/*.js',\n                    '!assets/js/lib/**/*.js'\n                ],\n                options: {\n                    destination: 'jsdoc/assets'\n                }\n            }\n        },\n\n        watch: {\n            css: {\n                files: [\n                    'assets/css/**/*.less'\n                ],\n                tasks: ['less', 'autoprefixer'],\n                options: {\n                    nospawn: true\n                }\n            },\n            js: {\n                files: [\n                    'assets/js/**/*.js'\n                ],\n                tasks: ['jshint:modules', 'resolve-js-bundles'],\n                options: {\n                    nospawn: true\n                }\n            }\n        },\n\n        autoprefixer: {\n            options: {\n                cascade: false,\n                browsers: ['last 2 version']\n            },\n            main: {\n                expand: true,\n                dest: 'build',\n                cwd: 'build',\n                src: ['**/*.css']\n            }\n        },\n\n        mochaTest: {\n            test: {\n                src: ['test/unit/**/*.js']\n            },\n            noApp: {\n                src: ['test/unit/lib/**/*.js']\n            }\n        },\n\n        casperjs: {\n            options: {\n                casperjsOptions: ['--app-port='+appPort]\n            },\n            files: ['test/functional/**/*.js']\n        }\n    });\n\n    /*\n    *\n    * Custom tasks\n    *\n    * */\n\n    grunt.registerTask('clean-build', 'Cleaning build dir if running new type of task', function(){\n        if (\n            grunt.file.exists('build/last-run') &&\n            (grunt.task.current.args[0] === 'prod' && grunt.file.read('build/last-run') === 'dev' || grunt.task.current.args[0] === 'dev' && grunt.file.read('build/last-run') === 'prod')\n            ) {\n\n            grunt.task.run('clean:build');\n        } else {\n            console.log('Skipping clean build dir');\n        }\n    });\n\n    grunt.registerTask('resolve-js-bundles', 'Resolving JS imports in _**.bundle.js', function(){\n        var gruntOpts = grunt.config.get('options');\n\n        // Setting custom delimiters for grunt.template\n        grunt.template.addDelimiters('customBundleDelimiter', '\"{%', '%}\"');\n\n        var files = grunt.file.expand([\n            'assets/js/**/_*.bundle.js',\n            '<%= pathToUser %>/assets/js/**/_*.bundle.js'\n        ]);\n\n        files.map(function(pathToFile){\n            // **/_*.bundle.js -> build/**/*bundle.js\n            var outputName = path.basename(pathToFile).replace(/^\\_/, \"\");\n\n            var outputDir = path.dirname(pathToFile);\n            var outputFullPath = path.join('build', outputDir, outputName);\n\n            grunt.file.write(\n                outputFullPath,\n                grunt.template.process(grunt.file.read(pathToFile), {\n                    delimiters: 'customBundleDelimiter',\n                    data: {\n                        // npmPluginsEnabled object is filled from loadOptions.js\n                        npmPluginsEnabled: JSON.stringify(gruntOpts.assets.npmPluginsEnabled, null, 4)\n                    }\n                })\n            );\n            grunt.log.ok('Writing to '+outputFullPath);\n        });\n    });\n\n    grunt.registerTask('last-prod', 'Tag build: prod', function(){\n        grunt.file.write('build/last-run', 'prod');\n    });\n\n    grunt.registerTask('last-dev', 'Tag build: dev', function(){\n        grunt.file.write('build/last-run', 'dev');\n    });\n\n\n    /*\n    *\n    * Build tasks\n    *\n    * */\n\n    // Regular development update task\n    grunt.registerTask('update', [\n        'clean-build:dev',\n        'resolve-js-bundles',\n        'less',\n        'autoprefixer',\n        'last-dev'\n    ]);\n    grunt.registerTask('default', ['jshint', 'update']);\n\n    // Prod build, path to minified resources is routed by nodejs server\n    grunt.registerTask('build', [\n        'clean-build:prod',\n\n        'less',\n        'autoprefixer',\n        'newer:cssmin:build',\n        'newer:cssmin:user',\n        'resolve-js-bundles',\n        'newer:copy:js',\n        'newer:uglify:main',\n\n        'newer:htmlmin:main',\n        'last-prod'\n    ]);\n\n    grunt.registerTask('watch-css', ['update','watch:css']);\n    grunt.registerTask('watch-all', ['update','watch']);\n\n    grunt.registerTask('ci-pre-run', [\n        'jshint',\n        'build',\n        'update'\n    ]);\n\n    grunt.registerTask('ci-post-run', [\n        'test',\n        'test-func'\n    ]);\n\n    grunt.registerTask('ci-post-run-win', [\n        'test'\n    ]);\n\n    /*\n    *\n    * Utils\n    *\n    * */\n\n    // Test task. Execute with running app\n    grunt.registerTask('test', 'Run ALL tests or specified by second param', function () {\n        // if custom mask set - `grunt test --spec=test/unit/middleware/**/*.js`\n        var spec = grunt.option('spec');\n        if (spec) {\n            grunt.config.set('mochaTest.test.src', [spec]);\n            grunt.task.run('mochaTest:test');\n        } else {\n            grunt.task.run('mochaTest');\n        }\n    });\n\n    // Test task. Execute with running app\n    grunt.registerTask('test-func', 'Run ALL functional tests or specified by second param', function () {\n        // if custom mask set - `grunt test --spec=test/unit/middleware/**/*.js`\n        var spec = grunt.option('spec');\n        if (spec) {\n            grunt.config.set('casperjs.files', [spec]);\n        }\n\n        grunt.task.run('casperjs');\n    });\n};\n"
  },
  {
    "path": "License.md",
    "content": "# The MIT License\n\nCopyright © 2013-2016 Sourcejs.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "MAINTAINING.md",
    "content": "# On Collaborative Development.\n\nThis document represents SourceJS team development agreements.\n\n## Patches welcome\n\nFirst of all: as a potential contributor, your changes and ideas are welcome. Please do not ever hesitate to ask a question or send a PR.\n\n## Code reviews\n\nAll changes must be code reviewed. For non-maintainers this is obvious, since you can't commit anyway. But even for maintainers, we want all changes to get at least one review, preferably from someone who knows the areas the change touches. For non-trivial changes we may want two or even more reviewers. Most PRs will find reviewers organically. Except for rare cases, such as trivial changes (e.g. typos, comments) or emergencies (e.g. broken builds), maintainers should not merge their own changes.\nAny maintainer or core contributor who wants to review a PR but does not have time immediately may put a kind of hold on a PR simply by saying so on the PR discussion and offering an ETA.\n\n## Branches and versions\n\nStable project version is on master branch. Upcoming version is on release candidate (RC) branch, which is forked from master and is used to be a base for development. Each release bumps version according to [Semantic Versions specification](http://semver.org/).\n\n## Single feature (issue, etc.) contribution guide for maintainers.\n\n* Create new branch which is forked from current Release Candidate branch.\n* Name it according to the next template:\n`[developer second name | nickname]/[issue number | task | feature | changeslist name]`. E.g. `smith/search-redesign`.\n* Develop and test your code changes. Atomic commits and informative commit messages are required.\nE.g. If you decide to implement code linting task, the list of commit messages can looks like that:\n - Code linting task configuration is added. Nested node modules are added (see package.json).\n - Some fixes are implemented due to code linting result.\n - A couple of additional options are added into linting config.\n - * merge branch master into smith/code-linting.\n - Missing parameter is added, some trivial fixes are implemented due to CR feedback.\n* Merge RC branch into yours, if your changes are implemented.\n* Create Pull Request from your branch into Release Candidate branch. Please don't forget that PR description should be useful and informative. It is very important for release notes.\n* Approved PR should be merged into current RC branch. Squashed commits are possible but they aren't preferable.\n* Merged feature branch should be removed from remote repo.\n\n## Basic agreement points.\n* Branch naming template: `[developers second name | nickname]/[issue number | task | feature | changes list name]`.\n* Atomic commits and informative commit messages.\n* Version bumps according to [specification](http://semver.org/).\n* Using Pull Requests to apply changes.\n* PR description should be useful and informative. It is very important for release notes.\n* Release candidate branches usage for changes and tests.\n* Github releases and tags usage for each changes list (for RC branches).\n\n### Example:\n* Current version is `0.4.0` (branch: `master`)\n* Upcoming version is `0.4.1` (branch: `rc0.4.1`, initially forked from master).\n* Several developers create their own feature-branches (`rc0.4.1` forks) to implement some features (resolve a couple of issues, etc.).E.g. `smith/code-linting`, `somePerson/middleware-polishing`.\n* Then changes are implemented they create PR from `nickname/feature` branch to `rc0.4.1`. Last commit in each of brunches is the merge of the RC branch into current one.\n* Accepted PRs are merged into rc0.4.1. After that merged features are removed from remote repo.\n* Then the RC branch is ready it becomes a kind of beta, which can be tested or used to create some demos, etc. Some fixes are possible if needed.\n* New release should be marked by tag with release notes. Release notes text can be formed from PR descriptions.\n\n\nIf you have any related questions, contact Robert Haritonov [@operatino](https://github.com/operatino) please.\n"
  },
  {
    "path": "README.md",
    "content": "# [ON HOLD] SourceJS - Living Style Guide Platform\n\n[![npm version](https://badge.fury.io/js/sourcejs.svg)](https://www.npmjs.com/package/sourcejs)\n[![Build Status](https://travis-ci.org/sourcejs/Source.svg?branch=master)](https://travis-ci.org/sourcejs/Source)\n[![Windows Build status](https://ci.appveyor.com/api/projects/status/ctvr9lsiaxpbhecm/branch/master?svg=true)](https://ci.appveyor.com/project/operatino/source/branch/master)\n\n**The project been stale for a while and currently is in the [ON HOLD] state until we find new maintainer or original author get's back to the design systems field. SourceJS been brought to the public ahead of it's time, and turned out to be too ambitious to handle by a small team of people.**\n\n**Today, the ideas SourceJS surfaced are evolving in other open source projects, like [styleguidist](https://react-styleguidist.js.org) and [storybook](https://storybook.js.org).**\n\n---\n\nThe most advanced tool for documenting, testing and managing Front-end Components achieving productive team work.\n\n🚀 [**Quick Start**](http://sourcejs.com/docs/base)\n\nSourceJS powered workflow allows developers to **code new components directly in the documentation.** Combining web components development with documentation and team communication processes, makes SourceJS a powerful tool for Front-end developers and designers.\n\n🎥 Check out short video overview:\n\n[![image](http://d.pr/i/7Ax4+)](http://youtu.be/y4KHmX8vCc0)\n\nOur main goal is to provide flexible, modular environment for managing reusable Front-end components library. We don't focus on specific technologies, allowing to seamlessly integrate SourceJS workflow with your existing codebase.\n\n___\n\n\n[**Source engine project page**](http://sourcejs.com) &nbsp;&nbsp;&nbsp; [**Documentation**](http://sourcejs.com/docs) &nbsp;&nbsp;&nbsp; [**Examples**](http://sourcejs.com/docs/base/#examples) &nbsp;&nbsp;&nbsp;[**How-to's**](https://github.com/sourcejs/blog-howto)\n\n___\n\nSourceJS component management engine was originally developed in [OK.ru](https://corp.mail.ru/en/company/social) front-end development team and is recommended for big and middle sized projects. Especially for fast growing web portals, outsource teams with similar project and companies with multiple services.\n\nHave questions? Just reach our community through Gitter Chat:\n\n[![Gitter chat](https://img.shields.io/badge/gitter-join%20chat-1dce73.svg)](https://gitter.im/sourcejs/Source)\n\n## SourceJS is NOT\n\nTo clear some confusion around Living Style Guide Platforms comparison, let us define few main differences.\n\n### Static site builder\n\n**SourceJS is a dynamic Node.js application**, and does not build static website as Pattern Lab, KSS, StyleDocco are doing. Dynamic environment allows to connect unlimited number of plugins and middlewares for compiling docs, styles, text right on the flight.\n\n### CSS Documentation parser\n\nEngine is based on gathering special documentation templates (`index.src.html`, `readme.md` and others), where you leave your HTML examples, template includes and description. All Specs are located in `sourcejs/user/specs` folder, and could contain any catalogue structure, with focus on component folders.\n\n**But you can use official SourceJS plugin based on DSS, CSS Documentation parser - [github.com/sourcejs/sourcejs-contrib-dss](https://github.com/sourcejs/sourcejs-contrib-dss).**\n\n## Join the community\n\nMany teams are already using SourceJS for building and managing Front-end components libraries for themselves and their clients. To join the community, you just need to follow few simple rules - check our docs about [Maintaining](MAINTAINING.md) and [Contribution](CONTRIBUTING.md).\n\nIf you notice some bugs, or need to help finding a better solution in your process, feel free to create an issue, and we will solve your problem together.\n\n[Materials for presentations](https://github.com/sourcejs/pres).\n\n## Updates\n* 20.09.15 [0.5.6](https://github.com/sourcejs/Source/releases/tag/0.5.6) and  [0.5.6-no-jsdom](https://github.com/sourcejs/Source/releases/tag/0.5.6-no-jsdom) with EJS helpers, NPM 3 support and navigation improvements\n* 16.08.15 [0.5.5](https://github.com/sourcejs/Source/releases/tag/0.5.5) and  [0.5.5-no-jsdom](https://github.com/sourcejs/Source/releases/tag/0.5.5-no-jsdom) patch release with `<markdown>` tag fix and set of functional tests\n* 15.08.15 [0.5.4](https://github.com/sourcejs/Source/releases/tag/0.5.4) and  [0.5.4-no-jsdom](https://github.com/sourcejs/Source/releases/tag/0.5.4-no-jsdom) with middleware loader, relative paths in navigation support and other improvements\n* 28.05.15 [0.5.3](https://github.com/sourcejs/Source/releases/tag/0.5.3) context options support, source-as-npm package, CI integration, watcher stability improvements and other great features\n* 28.05.15 [0.5.3-no-jsdom](https://github.com/sourcejs/Source/releases/tag/0.5.3-no-jsdom) special release without JSDom for Windows users\n* 15.04.15 [0.5.2](https://github.com/sourcejs/Source/releases/tag/0.5.2) patch release with improved markdown support and `index.src.html`\n* 28.03.15 [0.5.1](https://github.com/sourcejs/Source/releases/tag/0.5.1) patch release with EJS pre-rendering and various bugfixes\n* 28.03.15. SourceJS [Bootstrap example bundle](https://github.com/sourcejs/example-bootstrap-bundle) and [How-to articles blog](https://github.com/sourcejs/blog-howto)\n* 15.03.15. New example [Specs showcase](http://sourcejs.com/specs/) ([source code](https://github.com/sourcejs/example-specs-showcase))\n* 15.03.15. CSS Documentation support with [SourceJS DSS plugin](https://github.com/sourcejs/sourcejs-contrib-dss)\n* 12.03.15. **[0.5.0](https://github.com/sourcejs/Source/releases/tag/0.5.0) release** with full Markdown support, GitHub auth, `info.json` watchers and other improvements\n* 24.02.15. [0.4.1](https://github.com/sourcejs/Source/releases/tag/0.4.1) patch release\n* 05.02.15. Mentioned at in-depth [Style Guides Tools overview talk](http://youtu.be/Fr23VpM6wl4ds)\n* 18.01.15. Published an [intro video about SourceJS](http://youtu.be/y4KHmX8vCc0)\n* 07.01.15. **[0.4.0](https://github.com/sourcejs/Source/releases/tag/0.4.0) stable release.** From now, we move to fast, semantic release cycle. No globally breaking changes till 1.0.0\n* 08.10.14. 0.4.0-rc release, migration [instructions](https://github.com/sourcejs/Source/tree/master/docs/migration)\n* 01.08.14. [Video review](http://youtu.be/ukFeZnJjrLs?list=PL20zJcC2wnX7RY1CDrKLhSvYxEe6jtMbB) of SourceJS engine and workflow example (RU with EN subtitles)\n* 31.07.14. 0.4.0-beta release\n* 01.05.14. Engine presentation from [Front-end Ops Conf](http://www.feopsconf.com/), San Francisco - [Taking Development Tools To The Next Level](http://rhr.me/pres/ime/) with [video](https://www.youtube.com/watch?v=cMIad0zl00I)\n* 31.01.14. [Preview](http://youtu.be/cefy_U5NU4o) of Source companion tool for prototyping interfaces using existing components\n* 31.12.13. **0.3.2 release**\n* 09.10.13. Engine [presentation](http://rhr.me/pres/source-min/) on [Fronteers Jam](http://fronteers.nl/congres/2013/jam-session) ([video](https://vimeo.com/77989211))\n* 23.09.13. Published [video recording](http://www.youtube.com/watch?v=3HNW5Bru0Ws) of Source engine presentation from [RIT++](http://ritconf.ru/) 2013 (RU)\n\n## Upcoming updates\n\nRespecting open source community, we track all our tasks publicly on GitHub. Follow our [milestones](https://github.com/sourcejs/example-bootstrap-bundle) and twitter announcements [@SourceJS](http://sourcejs.com) to keep in sync with latest plans.\n\nList of few global upcoming features\n\n* Remove JSDom dependency, for making engine faster and easier to install\n* SourceJS as npm module official support\n* Refactored code snippets API and tab view\n* Integrations with JSDoc and drop-in replacement setup for other Style Guide tools like KSS/Pattern Lab\n* More screencasts and engine usage demos\n\nSourceJS follows semantic versioning and we do our best to keep as less breaking changes as possible.\n\nPreparing to 1.0 release, we plan to keep migration path very smooth and painless. So if you will keep in sync with minor releases and API deprecation announcements, you won't face any problems setting up major release updates.\n\n## Useful information\n\n### Browser support\n\nSourceJS client-side part is supported in all latest major browsers and IE8+ in [Clarify](http://sourcejs.com/docs/clarify) for testing components.\n\n___\n\nCopyright © 2013-2016 [SourceJS](http://sourcejs.com)\n\nLicensed under [MIT License](http://en.wikipedia.org/wiki/MIT_License), read more at [license page](http://github.com/sourcejs/source/wiki/MIT-License).\n"
  },
  {
    "path": "app.js",
    "content": "/*!\n* SourceJS - Living Style Guides Engine and Integrated Maintenance Environment for Front-end Components\n* @copyright 2013-2015 Sourcejs.com\n* @license MIT license: http://github.com/sourcejs/source/wiki/MIT-License\n* */\n\n'use strict';\n\nvar express = require('express');\nvar colors = require('colors'); // jshint ignore:line\nvar fs = require('fs-extra');\nvar path = require('path');\nvar commander = require('commander');\nvar bodyParser = require('body-parser');\nvar favicon = require('serve-favicon');\n\n/* Globals */\n// Define absolute path to app, normalizing windows disk name\nglobal.pathToApp = __dirname.replace(/^\\w:\\\\/, function (match) {\n    return match.toLowerCase();\n});\n\nvar app = global.app = express();\n\nvar loadOptions = require('./core/loadOptions');\nglobal.opts = loadOptions();\n\n// Arguments parse */\ncommander\n    .option('-l, --log [string]', 'Log level (default: ' + global.opts.core.common.defaultLogLevel + ').',  global.opts.core.common.defaultLogLevel)\n    .option('-p, --port [number]', 'Server port (default: ' + global.opts.core.server.port + ').')\n    .option('--hostname [string]', 'Server hostname  (default: ' + global.opts.core.server.hostname + ').')\n    .option('--html', 'Turn on HTML parser on app start (requires installed and enabled parser).')\n    .option('--test', 'Run app with tests.')\n    .option('--no-watch', 'Run with disabled watcher.')\n    .option('--post-grunt [string]', 'Define Grunt command to run after app start', 'ci-post-run')\n    .parse(process.argv);\n\nglobal.commander = commander;\n\nvar trackStats = require(path.join(global.pathToApp, 'core/trackStats'));\n\napp.set('views', path.join(__dirname, 'core/views'));\napp.set('user', path.join(__dirname, global.opts.core.common.pathToUser));\n\n// We support `development` (default), `production` and `presentation` (for demos)\nvar MODE = global.MODE = process.env.NODE_ENV || 'development';\n\nglobal.engineVersion = fs.readJsonSync(path.join(global.pathToApp, '/package.json'), {throws: false}).version;\n\n// Default logger\nvar logger = require('./core/logger');\nvar log = logger.log;\nglobal.log = log;\n\nif (commander.html) {\n    trackStats.event({\n        group: 'features',\n        event: 'enabled html parser'\n    });\n\n    global.opts.plugins.htmlParser.enabled = true;\n    global.opts.plugins.htmlParser.onStart = true;\n}\nif (commander.port) global.opts.core.server.port = parseInt(commander.port);\nif (commander.hostname) global.opts.core.server.hostname = commander.hostname;\nif (!commander.watch) {\n    trackStats.event({\n        group: 'features',\n        event: 'disabled watch'\n    });\n    global.opts.core.watch.enabled = false;\n}\n/* /Globals */\n\n\n/* App config */\n\n// Version\napp.use(function (req, res, next) {\n    res.header('X-powered-by', 'SourceJS ' + global.engineVersion);\n    next();\n});\n\n// Optimization\napp.use(require('compression')());\n\n// Cookies\napp.use(require('cookie-parser')());\napp.use(require('express-session')({\n    secret: (function() {\n        var d = new Date().getTime();\n        return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n            var r = (d + Math.random() * 16) % 16 | 0;\n            d = Math.floor(d / 16);\n            return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);\n        });\n    })(),\n  resave: false,\n  saveUninitialized: true\n}));\n\napp.use(function (req, res, next) {\n    if (req.cookies) { req.cookies['source-mode'] = global.MODE; }\n    res.cookie('source-mode', global.MODE, { maxAge: 3600000, httpOnly: false });\n\n    next();\n});\n\nvar shortid = require('shortid');\napp.use(function (req, res, next) {\n    if (req.cookies && !req.cookies['source-track']) {\n        var id = shortid.generate();\n\n        req.cookies['source-track'] = id;\n        res.cookie('source-track', id, { maxAge: 3600000, httpOnly: true });\n    }\n\n    next();\n});\n\n// Favicon\nvar faviconPath = path.join(app.get('user'), 'favicon.ico');\nif (fs.existsSync(faviconPath)){\n    app.use(favicon(faviconPath));\n}\n\napp.use(bodyParser.json());\n/* /App config */\n\n\n\n/* Includes */\n\n// Middlewares\nrequire('./core/middlewares/loader').process(app, global.opts);\n\n// Auth initializing\nvar auth = require('./core/auth')(app);\napp.use(auth.everyauth.middleware());\n\n\n// File tree module\nvar fileTree = require('./core/file-tree');\n\n// Run file tree scan on start\nfileTree.scan();\n\n// Run file tree scan on main page visit\nif (global.opts.core.fileTree.mainPageTrigger && global.MODE !== 'presentation') {\n    app.use(function(req, res, next){\n\n        // Updating navigation on each main page visit\n        if (req.url === '/') fileTree.scan();\n\n        next();\n    });\n}\n\n// Update file tree via api\napp.use('/api/updateFileTree', function(req, res){\n    fileTree.scan();\n\n    res.jsonp({\n        message: 'Navigation succesfully updated.'\n    });\n});\n\n\n// Routes\nrequire('./core/routes');\n\n// API\nrequire('./core/api');\nrequire('./core/api/optionsApi');\n\n// User extenstions\nrequire(\"./core/loadPlugins.js\");\n\ntry {\n    // User additional functionality\n    require(app.get('user') + \"/core/app.js\");\n} catch(e){}\n\n\n// Watchers\nif (global.opts.core.watch.enabled && global.MODE === 'development') {\n\n    if (global.opts.core.watch.foreverWatchEnabled) {\n        require('./core/watch');\n    } else {\n        require('./core/watch/childWatch');\n    }\n}\n\n/* /Includes */\n\n\n\n/* Serving content */\nvar headerFooter = require('./core/headerFooter');\n\n// Static content\napp.use(express.static(app.get('user')));\n\n// Page 404\napp.use(function(req, res){\n\tif (req.accepts('html')) {\n        if (req.url === '/') {\n            res.redirect('/docs');\n            return;\n        }\n\n        var headerFooterHTML = headerFooter.getHeaderAndFooter();\n\t\tres.status(404).render(path.join(__dirname, '/core/views/404.ejs'), {\n            header: headerFooterHTML.header,\n            footer: headerFooterHTML.footer\n\t\t});\n\t}\n});\n/* /Serving content */\n\n\n\n/* Error handling */\nvar logErrors = function(err, req, res, next) {\n    if (err) {\n        var url = req.url || '';\n\n        log.debug(req.method, req.headers);\n        log.error(('Requested url: ' + url).red, ('Error: ' + err.stack).red);\n\n        if (req.xhr) {\n            res.status(500).json({msg: 'Server error'});\n        } else {\n            res.status(500).send('Server error');\n        }\n    } else {\n        next();\n    }\n};\n\napp.use(logErrors);\n/* /Error handling */\n\n\n\n/* Server start */\nif (!module.parent) {\n    var serverOpts = global.opts.core.server;\n    var port = serverOpts.port;\n\n    app.listen(port, serverOpts.hostname, serverOpts.backlog, serverOpts.callback);\n    log.info('[SOURCEJS] launched on http://127.0.0.1:'.blue + (port.toString()).red + ' in '.blue + MODE.blue + ' mode...'.blue);\n\n    if (commander.test) {\n        var spawn = require('cross-spawn');\n\n        spawn('./node_modules/grunt-cli/bin/grunt', [commander.postGrunt, '--port='+port], {stdio: 'inherit'})\n            .on('close', function (code) {\n                if (code === 0) {\n                    log.info('Test successful');\n                    process.exit(0);\n                } else {\n                    log.error('Test failed');\n                    process.exit(1);\n                }\n            });\n    } else {\n        if (global.opts.core.tracking.enabled) {\n            trackStats.event({\n                group: 'start',\n                event: 'default'\n            });\n        } else {\n            trackStats.event({\n                group: 'start',\n                event: 'disabled tracking'\n            }, true);\n        }\n    }\n}\n/* Server start */\n"
  },
  {
    "path": "appveyor.yml",
    "content": "# AppVeyor file\n# http://www.appveyor.com/docs/appveyor-yml\n\nenvironment:\n  matrix:\n    - nodejs_version: 0.10\n    - nodejs_version: 0.12\n\ninstall:\n  - ps: Install-Product node $env:nodejs_version\n  - npm install\n\nbuild: off\n\nbefore_test: \"git clone https://github.com/sourcejs/init.git user\"\n\ntest_script:\n  - node --version && npm --version\n  - ps: \"npm run ci-test-win # PowerShell\" # Pass comment to PS for easier debugging\n  - cmd: \"npm run ci-test-win\" # Run without watch because of CI bug\n\nmatrix:\n  fast_finish: true\n\ncache:\n  - C:\\Users\\appveyor\\AppData\\Roaming\\npm\\node_modules -> package.json  # global npm modules\n  - C:\\Users\\appveyor\\AppData\\Roaming\\npm-cache -> package.json         # npm cache\n  - node_modules -> package.json                                        # local npm modules"
  },
  {
    "path": "assets/css/base/buttons.less",
    "content": "/* Buttons\n---------------------------------------------------------------------------------- */\n\n/* TODO: cosmetic changes needed */\n.source_btn {\n\tposition:relative;\n\n\tdisplay: inline-block;\n\tpadding: 4px 17px;\n\n\tbackground-color:#65A7D6;\n\tborder: #5B9ECB solid 1px;\n\tborder-radius:3px;\n\n\tcolor:#fff;\n\tfont-weight:normal;\n\ttext-decoration:none;\n\tfont-size: 12px;\n\n    &:hover {\n        background-color: #5B9ECB;\n        }\n    &:active {\n        top:1px;\n        }\n\t}\n\n/* /Buttons\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/base/grids.less",
    "content": "/* Grids\n---------------------------------------------------------------------------------- */\n\n.source_col-main {\n\tmargin: 0 auto;\n\tpadding: 0 @layout_col-main--padding;\n\tmax-width: @layout_col-main--max-width;\n\tbox-sizing: content-box;\n\t}\n\n.source_col {\n\tdisplay: inline-block;\n\n\tvertical-align: top;\n\twidth: 33%;\n\tpadding-right: 25px;\n\n\tbox-sizing: border-box;\n\n    &.__15 {\n\t\twidth: 20%;\n\t\t}\n\n    &.__14 {\n\t\twidth: 24.5%;\n\t\t}\n\n    &__23 {\n\t\twidth: 66.2%;\n\t\t}\n\n    &.__right {\n\t\tfloat: right;\n\t\tpadding-right: 0;\n\t\t}\n\n\t}\n\n/* Justified layout\n-------------------------------------------------- */\n\n/* justified inline data  */\n.jcol-l,\n.jcol-r {\n\tdisplay: inline-block;\n\twidth: 50%;\n\tvertical-align: middle;\n\n\ttext-align: left;\n\t}\n\n.jcol-r {\n\ttext-align: right;\n\t}\n\n/* /Justified layout */\n\n/* /Grids\n---------------------------------------------------------------------------------- */\n"
  },
  {
    "path": "assets/css/base/navigation.less",
    "content": "/* Navigation\n---------------------------------------------------------------------------------- */\n\n.source_nav {\n\twhite-space: nowrap;\n\tdisplay: none;\n\n\tfont-family: @font-family-main;\n\tcolor: @color-main;\n\n\t&.__loaded {\n\t\tdisplay: block;\n\t\t}\n\n    &:empty {\n\t\tdisplay: none;\n\t\t}\n\t}\n\n\t@media all and (min-width: 990px) {\n\t\t.source_nav:before {\n\t\t\tcontent: '';\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t\theight: 100%;\n\t\t}\n\t}\n\n.source_nav_c {\n\tdisplay: inline-block;\n\tvertical-align: top;\n\tborder-radius: 10px;\n\twidth: 100%;\n\n\tbox-sizing: border-box;\n\n\tpadding: 20px 21px 10px;\n\tbackground-color: @light-gray;\n\t}\n\n.source_nav_ul {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n\n    li:first-child {\n\t\tmargin-top: 0;\n\t\t}\n\n    a {\n\t\tdisplay: block;\n        line-height: inherit;\n\t\t}\n\t}\n\n.source_main_nav_ul2 {\n    margin: 0;\n    }\n\n/* /Navigation\n---------------------------------------------------------------------------------- */\n"
  },
  {
    "path": "assets/css/base/ntf.less",
    "content": ".source_ntf {\n\tposition: fixed; z-index: 50;\n\ttop: 50px; /* toolbar height */\n    left: 0; right: 0;\n\n\tfont-size: @fz-size-m;\n\tfont-family: @font-family-main;\n\tcolor: #333;\n\ttext-align: center;\n\n\theight: 50px;\n\tline-height: 48px;\n\twhite-space: nowrap;\n\toverflow: hidden;\n\n\tbackground: #FFF6DD;\n\tborder-bottom: 1px solid #ccc;\n\tbox-shadow: 0 0 6px -2px rgba(0, 0, 0, .3);\n\n\topacity: 0;\n\tvisibility: hidden;\n\n\ttransition: opacity .2s, visibility .2s;\n\t}\n\n\t.source_ntf.__active {\n\t\topacity: 1;\n\t\tvisibility: visible;\n\t\t}"
  },
  {
    "path": "assets/css/base/togglers.less",
    "content": "/* Togglers\n---------------------------------------------------------------------------------- */\n\n.source_slider_frame {\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n\tdisplay: block;\n\tmargin: 0 auto;\n\twidth: 50px;\n\theight: 20px;\n\n\tbackground-color: rgb(246, 249, 251);\n\tborder-radius: 4px;\n\tbox-shadow: inset 0px 0px 4px 0 rgba(0, 0, 0, 0.25);\n    -webkit-touch-callout: none;\n\tuser-select: none;\n\t}\n\n.source_slider_button {\n\tdisplay: block;\n\twidth: 30px;\n\theight: 20px;\n\tline-height: 20px;\n\n\tbackground: #EDF2F7;\n\tborder-radius: 4px;\n\ttransition: all 0.25s ease-in-out;\n\tcolor: #000;\n\tfont-family: sans-serif;\n\tfont-size: 9px;\n\ttext-align: center;\n\tcursor: pointer;\n\tbox-shadow: inset 0px 0px 4px 0 rgba(0, 0, 0, 0.25);\n\t}\n\n.source_slider_frame__on .source_slider_button {\n\tmargin-left: 20px;\n\tbackground: #EDF2F7;\n\t}\n\n.source_slider_frame .source_slider_text_on { display: none; }\n\n\t.source_slider_frame__on .source_slider_text_off { display: none; }\n\n\t.source_slider_frame__on .source_slider_text_on { display: block; }\n\n\t.source_slider_frame__on .source_slider_button {\n\t\tbackground: #73c051;\n\t\tcolor: #fff;\n\t\t}\n\n/* /Togglers\n---------------------------------------------------------------------------------- */\n"
  },
  {
    "path": "assets/css/clarify.bundle.less",
    "content": "/*\n*\n* Clarify styles\n*\n*/\n\n//Based on rhr.me/MCSS methodology\n@import url('variables.less');\n@import url('mixins.less');\n@import url('reset.less');\n\n//Project\n@import url('project/clarify.less');"
  },
  {
    "path": "assets/css/cosmetic/helpers.less",
    "content": "/* Helpers\n---------------------------------------------------------------------------------- */\n\n.source_delim {\n\tbackground: none;\n\tborder: 0 none;\n\tborder-top: 1px dotted @black;\n\theight: 0; padding: 0;\n\tmargin: 20px 0;\n\t}\n\n.source_clear {\n\twidth: 100%;\n\tclear: both;\n\theight: 0;\n\tfont-size:0;\n\tline-height:0;\n\t}\n\n.source_tx {\n\tmargin: 5px 0 20px;\n\t}\n\n.source_huge {\n\tfont-size: 1.2em;\n\t}\n\n.source_ul {\n\tmargin: 0; padding: 0;\n\tmargin-left: 18px;\n\n\tlist-style: outside disc;\n\t}\n\t.source_ul li {\n\t\tmargin: 5px 0;\n\t\t}\n\n/* /Helpers\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/cosmetic/highlights.less",
    "content": "/* Highlights\n---------------------------------------------------------------------------------- */\n\n.source_code {\n    background: @light-gray;\n    font-family: Menlo, Monaco, Consolas, monospace;\n    font-size: .85em;\n    padding: 0 3px;\n    border-radius: 3px;\n    border: 1px solid #dfe2e4;\n    white-space: normal;\n    color: #07A;\n    }\n\n.source-only(code,{\n    .source_code;\n    });\n\n.source-main-only(code,{\n    .source_code;\n    });\n\n.lang-source_wide-code {\n    padding: 10px !important;\n    font-size: @fz-size-xs !important;\n    display: inline-block;\n    }\n\n.source_hl {\n    background: #ceeeff;\n    font-family: @font-family-main;\n    font-size: 1em;\n    padding: 1px 3px 2px;\n\n    border: none;\n    border-radius: 3px;\n\n    color: @black;\n    }\n\n/* /Highlights\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/cosmetic/links.less",
    "content": "/* Links\n---------------------------------------------------------------------------------- */\n\n// common link mixin\n.source-link(@color, @hover, @active : lighten(@hover, 10%)) {\n    color: @color;\n\n    &:link,\n    &:visited {\n        text-decoration: none;\n        }\n\n    &:hover {\n        color: @hover;\n        text-decoration: underline;\n        }\n\n    &:active {\n        color: @active;\n        }\n\n    &:focus {\n        outline: 2px solid @color-primary;\n        outline-offset: 2px;\n        }\n    }\n\n// primary link / action link\n.source-a_a {\n    .source-link(@color-primary, lighten(@color-primary, 10%));\n    }\n\n// secondary link / object link\n.source-a_o {\n    .source-link(@color-secondary, lighten(@color-secondary, 10%));\n    }\n\n/* TODO: rename classes */\n.source_a_hl, /* Higlight link */\n.source_a_o { /* Regular link */\n  \t&:link,\n\t&:visited {\n\t  \ttext-decoration:none;\n\t  \tcolor: lighten(@blue, 10%);\n\t\t}\n\n    &:hover {\n\t\tcolor: @blue;\n\t\ttext-decoration: underline;\n\t\t}\n\t}\n\n.source_a_bl { /* Emphasized link */\n  \t&:link,\n\t&:visited {\n\t  \tcolor: @black;\n\t\t}\n\t}\n\n.source_a_l { /* Inverted link */\n  \t&:link,\n\t&:visited {\n\t  \tcolor: lighten(@black, 40%);\n\t  \ttext-decoration: none;\n        line-height: 1.5;\n\t\t}\n\n    &:hover {\n\t \tcolor: #fff;\n\t\t}\n\t}\n\n.source_a_g { /* Object link */\n  \t&:link,\n\t&:visited {\n\t  \tcolor: @blue;\n\t  \ttext-decoration: none;\n\t\t}\n\n    &:hover {\n\t\tcolor: @blue;\n\t\ttext-decoration: underline;\n\t\t}\n\t}\n\n.source_a_hl { /* Higlight link */\n\tfont-size: 16px !important;\n\tline-height: 2;\n\n    &:after {\n\t\tcontent:\"\\A\";\n\t\twhite-space:pre;\n\t\t}\n\t}\n\n.source_a_d { /* Design link */\n  \t&:link,\n\t&:visited {\n    \tcolor: @green !important;\n    \tfont-size: 16px;\n\t\t}\n\n    &:hover {\n        color: @green;\n        text-decoration: underline;\n        }\n\n    &:before {\n        content: '';\n        display: inline;\n\t   \tpadding-right: 25px;\n        background: url(/source/assets/i/spec_design_link.svg) 50% no-repeat;\n        }\n\n    }\n\n.source_a_s { /* Spec link */\n  \t&:link,\n\t&:visited {\n\t  \tcolor: @green !important;\n\t  \tfont-size: 16px;\n\t\t}\n\n    &:hover {\n        color: @green;\n        text-decoration: underline;\n        }\n\n    &:before {\n        content: '';\n        display: inline;\n\t  \tpadding-right: 25px;\n        background: url(/source/assets/i/spec_link.svg) 50% no-repeat;\n      \t}\n\n    }\n\n.source_a_fs-m { /* medium font-size */\n    &:link,\n    &:visited {\n        font-size: @fz-size-m;\n        }\n    }\n\n/* /Links\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/defaults.less",
    "content": "/*\n*\n* Core styles\n*\n* ! Modify with caution or use /user/assets/css/defaults.css to override core styles !\n*\n*/\n\n//Based on rhr.me/MCSS methodology\n@import url('variables.less');\n@import url('mixins.less');\n@import url('reset.less');\n\n//Base\n@import url('base/togglers.less');\n@import url('base/buttons.less');\n@import url('base/navigation.less');\n@import url('base/grids.less');\n@import url('base/ntf.less');\n\n//Project\n@import url('project/layout.less');\n@import url('project/header.less');\n@import url('project/footer.less');\n@import url('project/catalog.less');\n@import url('project/navigation.less');\n@import url('project/info.less');\n@import url('project/section.less');\n@import url('project/examples.less');\n@import url('project/source-code.less');\n@import url('project/search.less');\n@import url('project/modal.less');\n@import url('project/autocomplete.less');\n@import url('project/clarify-in-spec.less');\n@import url('project/auth.less');\n\n//Cosmetic\n@import url('cosmetic/highlights.less');\n@import url('cosmetic/links.less');\n@import url('cosmetic/helpers.less');\n\n/*# sourceMappingURL=defaults.css.map */"
  },
  {
    "path": "assets/css/mixins.less",
    "content": "/* Mixins and functions\n---------------------------------------------------------------------------------- */\n\n/**\n * Mixin for applying styles everywhere except .source_example\n *\n * @Params: @selector - String (div, a, etc)\n *          @rules - css properties ({border: 1px; color: red;})\n *          @reset - Boolean enable of disable reset (enabled by default) [true | false]\n */\n.source-only(@selector, @rules, @reset: true) {\n    .source_section > @{selector}@{notCleaningClasses}:not(.source_section_h):not(h2):not(h3):not(h4):not(.source_note):not(.source_data):not(.source_doc):not(.source_warn):not(.source_info),\n    .source_section > *@{notCleaningClasses} > @{selector},\n    .source_section > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_section > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_section > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n\n    .source_info > @{selector},\n    .source_info > *@{notCleaningClasses} > @{selector},\n    .source_info > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_info > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_info > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n\n    .source_note > @{selector},\n    .source_note > *@{notCleaningClasses} > @{selector},\n    .source_note > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_note > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_note > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n\n    .source_doc > @{selector},\n    .source_doc > *@{notCleaningClasses} > @{selector},\n    .source_doc > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_doc > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_doc > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n\n    .source_warn > @{selector},\n    .source_warn > *@{notCleaningClasses} > @{selector},\n    .source_warn > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_warn > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_warn > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n\n    .source_deps > @{selector},\n    .source_deps > *@{notCleaningClasses} > @{selector},\n    .source_deps > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_deps > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_deps > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector} {\n        & when (@reset = true) {\n            .reset();\n        }\n        @rules();\n        }\n    }\n\n.source-main-only(@selector, @rules, @reset: true) {\n    .source_main > @{selector},\n    .source_main > *@{notCleaningClasses} > @{selector},\n    .source_main > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_main > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector},\n    .source_main > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > *@{notCleaningClasses} > @{selector} {\n        & when (@reset = true) {\n            .reset();\n        }\n        @rules();\n        }\n    }\n\n/* /Mixins and functions\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/project/auth.less",
    "content": ".source_login {\n\tdisplay: inline-block;\n\theight: 40px;\n\tfloat: right;\n\n\tmargin-top: 2px;\n\tvertical-align: top;\n\t}\n\n.source_login-avatar {\n\twidth: 25px;\n\theight: 25px;\n\n\tborder-radius: 50%;\n\tborder: 1px solid #FFF;\n\tcursor: pointer;\n\t}\n\n\t.source_login-avatar.anonymous {\n\t\tborder: 1px solid #333;\n\t\t}\n\n.source_login-button {\n\tdisplay: inline-block;\n\n\tcolor: #999;\n\ttext-decoration: none;\n\tline-height: 1;\n\tcursor: pointer;\n\tvertical-align: top;\n\tmargin: 5px 0px 0px 10px;\n\t}\n\t.source_login-button:hover {\n\t\tcolor: #FFF\n\t\t}"
  },
  {
    "path": "assets/css/project/autocomplete.less",
    "content": "/* Autocomplete\n---------------------------------------------------------------------------------- */\n.autocomplete-wrapper {\n\tborder: 1px solid #ccc;\n\tborder-radius: 4px;\n\tbackground: #FFF;\n\tfont-size: 12px;\n\n\tfont-family: @font-family-main;\n\tline-height: 1.5;\n\t}\n\n.autocomplete-suggestions {\n\toverflow: auto;\n\n\tmargin-top: 1px;\n\t}\n\n\t.autocomplete-suggestions strong {\n\t\tfont-weight: normal;\n\t\ttext-shadow: 0 0 1px @light-gray;\n\t\tcolor: #00A0FE;\n\t\t}\n\n\t.autocomplete-suggestions span {\n\t\tcolor: @gray;\n\t\t}\n\n.autocomplete-suggestion {\n\tpadding: 4px 8px;\n\tpadding-left: 28px;\n\n\twhite-space: nowrap;\n\toverflow: hidden;\n\tmax-width: 100%;\n\n\ttext-overflow: ellipsis;\n\tcursor: pointer;\n\t}\n\n\t.autocomplete-suggestion > a {\n\t\tcolor: @black;\n\t\ttext-decoration: none;\n\t\t}\n\n.autocomplete-selected {\n\tbackground: @light-gray;\n\t}\n\n\t.autocomplete-selected:before,\n    .autocomplete-show-all:hover:before,\n    .autocomplete-show-all.__active:before {\n\t\tcontent: \"►\";\n\t\tcolor: @gray;\n\t\tmargin: 0 6px 0 -18px;\n\t\t}\n\n.autocomplete-show-all {\n\tbackground: @light-gray;\n\t}\n\n\t.autocomplete-show-all:hover,\n    .autocomplete-show-all.__active {\n\t\tbackground: #d1d2d3;\n\t\t}\n\n/* /Autocomplete\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/project/catalog.less",
    "content": "/* Catalog\n---------------------------------------------------------------------------------- */\n\n.source_section .source_catalog {\n    padding: 0 20px 20px;\n    border:1px solid #dfe2e4;\n    border-radius:10px;\n    }\n\n.source_catalog {\n    position: relative;\n    margin-bottom: 20px;\n\n    font-family: @font-family-main;\n    font-size: @fz-size-m;\n    line-height: 1.5;\n\n    color: @gray !important;\n\n    &_h2,\n    h2 {\n        line-height: 1.5 !important;\n        font-size: 22px !important;\n        color: @black !important;\n        margin: 20px 0 5px 0 !important;\n        font-weight: normal !important;\n\n        a {\n            color: @black;\n            text-decoration: underline;\n\n            &:hover {\n                text-decoration: none;\n                }\n            }\n        }\n\n    &.__show-preview {\n        .source_catalog_img {\n            display: block;\n            }\n\n        .source_catalog_list_i {\n            margin-bottom: 30px;\n            }\n        }\n    }\n\n.source_catalog_title {\n    line-height: 1.5;\n\n    a {\n        text-decoration: underline;\n        font-size: inherit;\n\n        &:hover {\n            color: @blue;\n            }\n        }\n    }\n\n.source_catalog_a:hover {\n    text-decoration: none !important;\n\n    .source_catalog_title {\n        color: #fff;\n        }\n    }\n\n.source_catalog > p,\n.source_catalog_tx {\n\tmargin: 0 0 20px !important;\n\n    color: @gray !important;\n    font-size: @fz-size-s !important;\n\n    &.__2l { /* 2 line */\n        min-height: 36px;\n        }\n\n    p {\n\t\tmargin: 0 0 10px;\n\t\t}\n\t}\n\n.source_subhead > p,\n.source_subhead .source_catalog_tx {\n    margin: 0 0 10px !important;\n    min-height: 0;\n    }\n\n.source_catalog_list {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n\t}\n\n.source_catalog_list_i {\n\twidth: 30%;\n\tmargin-right: 3% !important;\n\tdisplay: inline-block;\n\tvertical-align: top;\n\t}\n\n.source_catalog.__show-preview .source_catalog_list_i {\n    vertical-align: baseline;\n    }\n\n@media (min-width: 1200px) {\n    .source_catalog_list_i {\n        width: 22%;\n        margin-right: 3% !important;\n        }\n    }\n\n.source_col .source_catalog_list_i { /* Context */\n    width: 100%;\n    display: block;\n    }\n\n.source_section .source_catalog_list_i {\n    width: 47% !important;\n  }\n\n.source_catalog_a {\n\tposition: relative;\n\tdisplay: block;\n\tmargin-left: -10px;\n\tpadding: 5px 10px;\n\n\tfont-size: @fz-size-m;\n\ttext-decoration: none;\n\n\ta&:hover { //tag for weight\n        text-decoration: none;\n        background-color: @blue__hover !important;\n        color: #fff;\n        border-radius: 5px;\n\n        .source_catalog_footer {\n            color: #fff;\n            }\n\n        }\n\t}\n\n.source_catalog_update-button,\n.source_catalog_image-tumbler {\n    // Reset\n    background: none;\n    border: none;\n    padding: 0;\n    display: inline;\n    cursor: pointer;\n\n    font-size: @fz-size-s;\n    text-decoration: none;\n    border-bottom: 1px dotted;\n    color: #808080;\n\n    &:hover {\n        color: #303030;\n        text-decoration: none;\n        }\n    }\n\n.source_catalog_img {\n    display: none;\n    max-width: 100%;\n    max-height: 60px;\n    margin-bottom: 5px;\n    border-radius: 2px;\n    }\n\n.source_catalog_footer {\n\tcolor: @gray;\n\tfont-size: 11px;\n    line-height: 1.5;\n\ttext-decoration: none !important;\n\t}\n\n.source_catalog_all {\n\tmargin: 20px 0 0 0;\n\n    a.source_a_bl {\n        color: @gray;\n        text-decoration: underline;\n\n        &:hover {\n            color: @black;\n            }\n\n        }\n\t}\n\n.source_catalog-filter {\n    float: right;\n    margin-top: 10px;\n    width: 24.5%;\n    }\n\n.source_sort-list {\n    list-style-type: none;\n    margin: 0;\n    padding: 0;\n    color: #808080;\n    }\n\n.source_sort-list_li {\n    display: inline-block;\n    line-height: 1.5;\n\n    font-size: @fz-size-s;\n    }\n\n.source_sort-list_a {\n    font-size: @fz-size-s;\n    text-decoration: none;\n    border-bottom: 1px dotted;\n    color: #808080;\n\n    &:hover {\n        color: #303030;\n        text-decoration: none;\n        }\n    }\n\n.source_sort-list_li.__active {\n    color: #303030;\n\n    &:after {\n        content: \"\\25B2\";\n        font-size: 11px;\n        display: inline-block;\n        padding-left: 3px;\n        }\n\n    &.__forward:after {\n        content: \"\\25BC\";\n        }\n\n    .source_sort-list_a {\n        color: #303030;\n        }\n    }\n/* /Catalog\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/project/clarify-in-spec.less",
    "content": ".source_clarify-in-spec_link {\n    display: block !important;\n    width: 18px;\n    height: 18px;\n    background: url(\"/source/assets/i/link-external.svg\") 50% no-repeat !important;\n    background-size: contain !important;\n    float: right !important;\n    margin-right: -15px !important;\n    margin-top: 5px !important;\n    }\n\n.source_section > h3 > .source_clarify-in-spec_link {\n    width: 27px;\n    margin-top: 3px !important;\n    margin-right: -19px !important;\n    background-color: #fff !important;\n    z-index: 1 !important;\n    position: relative !important;\n    }"
  },
  {
    "path": "assets/css/project/clarify.less",
    "content": "/* Context\n-------------------------------------------------- */\n\n.source_clarify {\n    }\n\n.source_clarify .source_section_h {\n    margin-bottom: 10px;\n    margin-top: 20px;\n    }\n\n.source_clarify.__clear .source_clarify_content {\n    padding: 0;\n    }\n\n.source_clarify.__clear .source_clarify_panel {\n    margin: 20px 0 0 0;\n    }\n\n/* /Context */\n\n/* Layout\n-------------------------------------------------- */\n\n.source_clarify_content {\n\tpadding: 0 20px 20px;\n    }\n\n/* /Layout */\n\n\n\n/* Panel\n-------------------------------------------------- */\n\n.source_clarify_panel {\n    .reset();\n\n    width: 608px;\n    max-width: calc(100% - 40px);\n    box-sizing: border-box;\n    border-radius: 10px;\n    margin: 0 20px 20px;\n    padding: 20px 21px 10px;\n    background-color: #f1f2f3;\n    font-family: @font-family-main;\n    font-size: @fz-size-m;\n    line-height: 1.5;\n    }\n\n.source_clarify_panel_i {\n    margin-bottom: 15px;\n    }\n\n.source_clarify_panel_i label {\n    .reset();\n    }\n\n.source_clarify_panel_h2 {\n    .reset();\n\n    font-family: @font-family-main;\n    font-size: @fz-size-m;\n\n    color: #333333;\n    margin: 0 0 5px;\n    line-height: 1.5;\n    text-rendering: auto;\n    }\n\n.source_clarify_panel_sections {\n    width: 100%;\n    min-height: 120px;\n    border-color: #dfe2e4;\n    padding: 5px;\n    }\n\n.source_clarify_panel_sections > option {\n    .reset();\n\n    font-family: @font-family-main;\n    font-size: @fz-size-xs;\n    line-height: 1.5;\n    }\n\n.source_clarify_panel_option-list,\n.source_clarify_panel_option-list li {\n    .reset();\n\n    font-family: @font-family-main;\n    font-size: @fz-size-s;\n    line-height: 1.5;\n    }\n\n.source_clarify_panel_go {\n    font-size: 14px;\n    padding: 7px;\n\n    & + .source_clarify_panel_return-link {\n        display: inline-block;\n        margin-left: 10px;\n        }\n    }\n\n.source_clarify_panel_return-link {\n    .reset();\n\n    text-decoration: underline;\n\n    &:hover {\n        text-decoration: none;\n        }\n    }\n\n/* /Panel */\n"
  },
  {
    "path": "assets/css/project/examples.less",
    "content": "/* Code examples\n---------------------------------------------------------------------------------- */\n\n.source_example {\n\tposition: relative;\n\n\tdisplay: inline-block;\n\tvertical-align: top;\n\n\tpadding: 20px;\n\tmin-width: 500px;\n\tborder: 5px solid #f0f0f0;\n\tmargin: 10px 0 15px;\n\n\tbackground: none;\n\t}\n\t.source_example:hover {\n\t\tz-index: 20;\n\t\t}\n\t.source_example:empty {\n\t\tdisplay: none;\n\t\t}\n\n.source_example__2 { width: 215px; }\n.source_example__3 { width: 730px; }\n.source_example__4 { width: 980px; }\n.source_example__5 { width: 1200px; }\n\n.source_example__auto { width: auto; }\n.source_example__full {\n\twidth: 100%;\n\tbox-sizing: border-box;\n\t}\n\n.source_example__2,\n.source_example__3,\n.source_example__4,\n.source_example__5,\n.source_example__auto,\n.source_example__full {\n\tmin-width: 0;\n\t}\n\n.source_example__3,\n.source_example__4,\n.source_example__5,\n.source_example__full {\n\tmargin-right: 0;\n\t}\n\n/* /Code examples\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/project/footer.less",
    "content": "/* Footer\n---------------------------------------------------------------------------------- */\n\n.source_footer {\n\tposition: relative;\n\tz-index: 11; /* Higher than nav */\n\n\tmargin: 0 -25px;\n\n\t-ms-flex-preferred-size: auto;\n\n\tborder-top: 1px solid #eee;\n\tpadding: 30px 0;\n\tbackground: @black;\n\n\tbox-sizing: border-box;\n\n    font-family: @font-family-main;\n\tfont-size: @fz-size-xs;\n    line-height: 1.5;\n\tcolor: @gray;\n\t}\n\n\t.source_footer h2 {\n\t\t.reset();\n\t\tmargin-bottom: 10px;\n\t\tfont-weight: normal;\n\t\tfont-size: 15px;\n\t\tcolor: #666;\n\t\t}\n\n    .source_footer .source_ul {\n        color: @gray;\n        margin: 0;\n        list-style: none;\n        }\n\n.source_footer_copy {\n\tmargin-top: 40px;\n\tline-height: 2;\n\t}\n\n.source_footer_version {\n\tcolor: @color-aux2;\n\t}\n\n/* /Footer\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/project/header.less",
    "content": "/* Header\n---------------------------------------------------------------------------------- */\n\n.source_header {\n    position: relative;\n    margin: -50px -25px 0;\n\n\theight: 50px;\n\tmin-width: 990px;\n\tpadding-top: 11px;\n\tpadding-bottom: 10px;\n\tz-index: 9999; /* overlap all */\n\ttop: 0; left: 0; right: 0;\n\n\tbackground: @black;\n\n\tbox-sizing: border-box;\n\n\ttransition: opacity .2s;\n\n    white-space: nowrap;\n\n    font-family: @font-family-main;\n    font-size: @fz-size-m;\n\n    @media @media_min-step-m {\n\t    position: fixed;\n        margin: 0;\n\t    }\n\n    .source__scrolled-down & {\n        opacity: 1;\n\n        @media @media_min-step-m {opacity: .1;}\n        }\n\n    .source__scrolled-down &:hover {\n        opacity: 1;\n        }\n\t}\n\n\n.source__scrolled-down .source_header__focus,\n.source_header__focus {\n\topacity: 1;\n\t}\n\n.source_header .source_logo {\n\tdisplay: inline-block;\n\tvertical-align: baseline;\n\n\tmargin-right: 25px;\n\n\tline-height: 30px !important;\n\n\tcolor: #67a9d4;\n\tfont-size: 24px !important;\n    font-family: 'Museo', Arial;\n\n\ttext-decoration: none;\n\n    &:hover {\n\t\tcolor: #67a9d4;\n\n\t\ttext-decoration: underline;\n\t\t}\n\t}\n\n/* Navigation\n-------------------------------------------------- */\n\n.source_header_nav {\n\tdisplay: inline-block;\n\tvertical-align: 1px;\n\t}\n\n.source_header_nav_lst {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\t}\n\n.source_header_nav_i {\n\tdisplay: inline-block;\n\tmargin-left: 20px;\n\n\t/* Reset */\n\tline-height: 1.5;\n\n    &:first-child {\n\t\tmargin-left: 0;\n\t\t}\n\t}\n/* /Navigation */\n\n/* /Header\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/project/info.less",
    "content": "/* Info blocks\n---------------------------------------------------------------------------------- */\n\n// !important next to rules are intended solution till we will use shadow DOM or iframes for source_examples\n\n.source_data,\n.source_doc,\n.source_note,\n.source_warn,\n.source_info {\n\tdisplay: block;\n\tposition: relative;\n    box-sizing: content-box !important;\n    margin-top: 20px !important;\n    margin-bottom: 20px !important;\n    line-height: 1.5;\n\n\tborder-radius: @border-radius !important;\n\n    @media @media_min-step-m {\n        // Legacy\n\t    margin-right: @layout_spec--inner-margin-right !important;\n\n        // New spec page modifier\n        .source_page.__spec & { margin-right: 0 !important;}\n        }\n\n    .source_section & {\n        margin-right: 0 !important;\n        }\n\n    .source_section & {\n        font-size: @fz-size-s !important;\n        }\n\n    &:empty {\n\t\tdisplay: none;\n\t\t}\n\n    p {\n\t\tmargin: 0 0 10px !important;\n\n        &:last-child {\n\t\t\tmargin-bottom: 0 !important;\n\t\t\t}\n\t\t}\n\n    th, td {\n        border-color: #868686 !important;\n        }\n\n    > *:last-child {\n        margin-bottom: 0 !important;\n        }\n    }\n\n.source_info {\n\tbackground: #FFF6DD !important;\n\n\tpadding: 15px 25px !important;\n\tmin-height: 50px !important;\n    margin-top: 15px !important;\n    margin-bottom: 15px !important;\n\t}\n\n.source_warn {\n\tpadding: 10px 10px 10px 35px !important;\n\n\tbackground: #ffe2e5 url(/source/assets/i/warn.png) no-repeat 13px 13px !important;\n\n    .source_section & {\n        margin-right: 0 !important;\n        }\n\t}\n\n.source_note {\n    padding: 10px 10px 10px 35px !important;\n\n    background: #DCF1FA url(/source/assets/i/note.png) no-repeat 13px 13px !important;\n    }\n\n.source_doc {\n    padding: 10px 25px !important;\n\n    background: #DCFCDA !important;\n    font-family: Menlo, Monaco, Consolas, monospace !important;\n\n    & code,\n    & p {\n        font-family: Menlo, Monaco, Consolas, monospace !important;\n        }\n    }\n\n.source_data {\n    padding: 10px 25px !important;\n\n    border: 1px dotted #ccc !important;\n    background: #f9f9f9 !important;\n    font-size: 11px !important;\n    }\n\n/* /Info blocks\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/project/layout.less",
    "content": "/* Layout\n---------------------------------------------------------------------------------- */\n\n.source_container {\n\tposition: relative;\n\tpadding: 50px 25px 0; /*350px; /* Footer height + margin */\n\n\tmin-height: 100vh;\n\toverflow-x: hidden;\n\twidth: 100%;\n\n\tdisplay: flex;\n\tflex-direction: column;\n\n\tbox-sizing: border-box;\n\n\t.opera12 & {\n\t\tdisplay: block;\n\t}\n\n    @media @media_min-step-m {\n\t    min-width: 990px;\n        }\n\t}\n\n.source_main {\n\tposition: relative;\n\tpadding: 35px 0 120px;\n\tmargin-bottom: 40px;\n\n\tflex: 1;\n\t-ms-flex: none;\n\n\twidth: 100%;\n\tbox-sizing: border-box;\n\n\tcounter-reset: h2;\n\n    @media @media_min-step-m {\n\t\t.source_page.__spec & {\n\t\t\tpadding-right: @layout_spec--inner-margin-right;\n\t\t\t}\n\t\t}\n\n\t&.__loading:after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\twidth: 100%;\n\t\theight: 90px;\n\t\tleft: 0;\n\t\tbottom: 15px;\n\n\t\tbackground-image: url(data:image/gif;base64,R0lGODlhWgBaAPf/AP///8TY3P3+/v7+/sfa3vr8/NDg4/D19uLs7sbZ3fX4+dzo6vn7++709fz9/cvd4NXj5tbk5+Tt7/b5+uHr7fP3+P7///n7/Mrc4Mzd4ejw8fT4+dvn6tHh5Onw8u/09efv8ePs7urx8/T4+PX5+enx8vv8/d3o693p6+/19vv8/P39/vH29/j6++vy8+rx8t7p68/f4/r7/Mvc4Nfk59fl58rc38/f4sba3fj7++3z9Nrn6dLh5NTj5vf6+tjl6Mja3uPt7/b5+ejw8s7f4tHg5Nbk5v7+/8jb3vv9/dvn6eDr7fL29+Pt7u/09tHg48/g4+3z9fT3+N/q7PH19s3e4eXu8OXu7/f5+tTi5ebu8Mzd4MXY3N7p7Nrm6dXk5sze4dPi5cnc38XZ3ezy9O7z9dfl6Ovx8+zz9NTj5ejv8dvo6snb3/z9/tnm6Pf6+/H29tzo6/L39/39/ebv8Ozy887e4uDq7Nnm6cfa3fL3+OXt7+/19efv8ODq7cjb3+Tu79jm6PP39+Hs7fH1997q7Pj6+tLh5dnl6NPh5evy9Pn6+/n8/N/p7Nzn6s3d4eLr7eHr7vX5+uHs7tbj5uLr7vD29u7z9Ofw8fb6+tXk59Li5Njl5+Dr7Pr8/d3o6vD19+Ps78XZ3MfZ3fz8/c/g4tPh5NDf49Li5ebu8ebv8fz8/NXj5dDh4+309M7f4dHh487e4fr7+/L2+O709Onw8fb4+fX4+OLs7dXj5+zz89Df4u309cnb3trn6t7o693p6srd4Nbl58/e4uTt7vP4+OTs7+nx8eTu8Onx8/P299/p6+fu8PD09e3y9PD19dvo6drm6M3f4vf5+drn6Mrb39Pj5dXi5cvd4dPi5M3e4vv7/Nnl6eXt8Obt79nn6d/r7PT3+djm6fP2+Mnc4Ovx8vD09s3f4fD29+fu8c7f49Dh5N/q69fk6N/q7ery89Ti5szc4Pz+/svd39jk593p7Mna3tDg5N7q6+jx8dnn6OTs7tLg5PL19svc3////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQFCgD/ACwAAAAAWgBaAEAI/wABCBxIsKDBgwgTKlzIsKFDhg24BJhIsWJFCwUtWBjAcYCAjx9XrBDwsKRBAUAIqFxJAAeOBDATPEJYwUkFjCYRCjBhQoWKAkALyJBxoSgDkjkJ+oiApCkSICl3mEhKlaCAAgyy5sjRQsYAhxIePJhBliyGs2g5VF37UMaEt0LikphLQoFdHwMLhAHDt2+Gv0RIsB3scEKFw4gRb0CaFwaRxzci31DSgrBlhj5YaN7MYjHBCAZCG3jypIjpDqg7hGF8+TKTBrBjf5hN20kK1godkJmyQxOKKxta5zRRoQEaHQcU4E5aAYJzCEYiSI9Ag0aNGj8cCU8YBQQIDeCHeP/wUKLEi/Migm83iGXHDiUcOKxZQP8EChQwYPghCGIJhf8IBBhCE0FIYOAVCqx32QpoTLHACSdIwARDQmgQIAJWlJGEgpcxQIBFIHaAE0EaHdGRRyAJMCKHBVHQ0ksxwaQBQSxwIRGIFD3wVUYmcpSiACs4sKNAA/DU009BqbBiUq88BRVLK70UAYtWBSUUURdkpVUOQy40wg82hBmmNQ1QKdwcDGDx1ltvbDiQBXb8tcWcYtVpZw5mVmWLXXxu4Oeff3aZ56AM+RJDDFAkKtqiBkxJaE4kpCDpAZRWaikLBOmQGg+cdqrGo2sxoMOoUURRRmwjLIlQEz20+hwEX0T/Jx0NguUpQC3ikWfeCyL06oILZa5lxXTVXYfdD3jUKpAT7sHHAX0PokCBDAatoAUFF4ZQ4IGYDuSAB959F16uDajKYR/xPQutffjB0EUFBOXgH4DZEmigB6CaxAIGOHZQQEIanYiioPkqNEACOIIIgUElnvjjCuaamcMBGjDxb0Em2JhwRR0w3KOPIInkgKoWCDDHR65B6VKMCRDwBkF33GgRAQck5HDIuDnAk09WXnmBA1VV8CSUKq0M01RmOsBzUEMZpSXQVDlAhFNDs6TJo1c1naWWW7VAcMFgKyQCWmRjICYxYT+kwppsTxCXEHgCIICddI9VFgYTpL2QEHTV/8Xn33aRpMNfhBdeuBZ6LyTAnyM07rjjUqhgkAIIuBFGDTCMkHhOAxTQghBvXLDc5qBagIhkh6aeegSjky6QApbGTgUVTHylAqO4j1Za3q4X1ABts9km6aSU/svAIaeltimnCfZe0AANmBrb9LB9wMBBKoygQwUXOP+QACq08HNOFVCShqvPxTrFCqASUh56IpzxqwtYrLVBD69CNx1116EwqBNqCM943serXp1BCFWBgf6IZZ0amOEHP+iWt0TQBfksIAQsOMJCSDCEAQVBCw1A2kAuEK4AClBXL6jD10wyAQo0EFklgNpAtNCs+KzLPvmZ0EBk8B9sCUhbBpLAFf9c8DwFgEtcdXjZoybwnnTdsF1dWAJ/5uVDBIQAiEFsnveYYMH6sAsGU+heQdrQhx5my4NO8J5BHKCFNGQgADH4gQ4aIrAVOo8FH0qYHcSYEQt8DGQCsGPiFrCxihCxj398mBorUMiKIIFhG7lZyAQJtgPIrJBjgKQkQyIkUDWgAyzLghwKkoVLJgwEHttkkGQoEAvo7EhAYeVaIhElGMWoBDAzZUUSUDOGqbINrBlAEnaGJKZtgy00IJrRYjKFgiiABhUhQBdEaLMUEaxIO+uZ1i4QMYaMICVEe1GMWiccnS0NKNvMiiwf0gIngVNlLwHCoNpQTJ9t7WlVkQDV3sn/Ehz0Mk9Mw5KWGLAVaq2FBGDYJ0t4QM08raAo9+xaC8iZExZ0IQ2bgMAUtAg2ASQBKCag6EIKIIgSsICPalSIAJRmgjYkBARkE1OYEJBSgxRATW17C0qTYIe7lc1sNhBETeWW07f1DWo8oFtZzHKWDIg0bW9wG9/oAji7WEAFW6hb3ciiuZT6raoKANQG2IcHw8mJTmLpWE0XEVaxbuBxI0AgACxAA7Ma7hDsG2oOHieFvkoBMRwFQAFOUIXCGrYKbqjMUAnCgL8mpgJeW6xkJ4uQCSDgB2lwAwLgRdmBDOANJPCTD9xUkAKwQjKojcwh6rdYC4yAUrODA2f0IMMo/6gudYmCgmhmVNMkxO63lKqfBdaRu9xJLqVU+IDwhgdcBwiguKMxTRFQo1g1fkA2wFuupP4lAd1JV3mo4YEUazqBU1GverTRIQA0Bd5OcQpfixWVDkp13gZwliAb+IR7eaAECU7WAUwY1XyjcIC4dTZfFeDE+dAHAQo8dT0VgN/80IAXtjDACK3CX/pkFYJHVWCAuzLg/K5HFQFoQsMbJlYNrjAoBZyQgL0Swa8ulpMD5E9Ws7KOGXYwKB2ISwO5gnGvwkEVFTwHx9R54Q86fBABoNQhKmgdE8IFHiCD+DwvIDFzkFwsB0KwCwVxwgKcta5JPNlbIPjhtiQwykxReahcIFYWVQYwrC4fywvqEUgLvNDELkIIPyHQIEFcQC8r2utA1QWACkTwZis34MFqU4AeEu1ZPu/AifW5T35SQZAomFHNQRQijQlSAB9cIK+g2kAN1bWAOHzRXQSxAhXrtWYJ3Nd1AujzfLwIRVQOhBez/uGhJTBq17VgATakj6s1DYNQLKkEnwa1BCqcUj3A4IkoQAClB7ICNRT6isTwr2QdYNCSeIVFAQEAIfkEBQoA/wAsAAAAAFoAWgBACP8A/wkcSLCgwYMIEybEUkChw4cQI/5zggQJECAEMmbEgSOBxwQEeXAJQLKkyZJLJKo8+ChDhgcwYc7AQBODDQMIRxwYsZIhQgAWLAwYSlSA0aMWVhps4aaKUzAuM6BIorSqQQtGV6xwwHVOUoggDIgdKxZKjLMxYFhdu3KOigJw48qFa4JgDR548+bNgoWtX5UFcggeLLgFgwEFTSDowbhxjykM/kqOKGOC5csTWiAeyCGC5880QtOoQTrQ5smoBQqRImWE6xEbYstWoOC0QwEfJExZg8vDhNRKHUyo0E/PBs1/N3BYvqB58xMnUKCAASMS8IRMdJRpwL3Bhw8pUhz/GH/Ax/WDOZZQWI+gfYgQTYJImE+HoC4QINRo0ODBQ4kSL4ggggsumHfeZAKkoAV8QZSwwUMt0KLBEB6cwYQDB6J2wQwaacTRR4kYtMBIJ51UR4YINfHADDPVZIMNJRAkxx8VYdRhRwk8YpAbJZYoAkEAAGXBEUQRBYBfPEAVVQZbxMQiBnigCGSRRx2lVRsOHAmRAhzc4OUNRNRwgJTADeCACWiqoKYABYXRQQdFxBnnE0+QZUBkZFolgwwX9OlnnwwEGuhXeRYa0RQQJKooBF8Y4ahnHBha1SK0VUobCZhmOg1BfJBmxg+ghuqCpGyZUMGpqJ4qhSFaOgTCDjso/7EcB2s4t0B0BubJ3XfhkTceFSxU4JcHz0UnHXVdTJHrP3Kox5578mmhgkECuLAfhf8FOOCDA63QgA7adefdd3q0SqYLzyLwXnzzSXCFAgQVgB8I+/HnH4ABlkHqSkxUcaNHISIkAw89BqDWvhLZcFGHG32UAA0EUUBiwSWNuS8DLIggyLQG0WiRjR6CSBAkE1McAAsGBXlEkKhVEJNMLdpkQzAtEIRAjQyLkdAFEPTIxRSE/iMkkUUOcJRtK42w5EtOxmwDVWQOWXSVViKt0gphPLVkkzD9ICkARlOtFVdZImy2SmgYAIVZaH15gxZnS7SCCWqqOVcBGApUp518i/+1bNwH3V3Annz+idgHbyauuOJDAO7QAIJGLjkDcxg0gRUo/MBBJPA6vpIFZ16gggNWe74vCoumnmikpieUA6ZCxB47ZlgkZUKjj36mewSh/d36P7DJtoGlxGNYwA+ijUZaDZ+C+tvvBR0xQqqsvRY81AUlQUIKCjQEfURmFmACmyspsAasSsjK3AISkG+oAr36CgcLLFzAFgnpz2rrrcaGUGgF4uKVeHx1gEWsJQT7g86xkMUTgrShARJoDwI0MIKgHcQHZfDPC8gwi7wNxATgikIABXgAFliwKm/A3HRgMAUduE8g73AWBST4HvnMp3MCUQF+rtUfAAnoDC5IQUH/LOCDBoiQO/UjVQvWk64atusKqrDPvHioQW0V6HsCGYEE1RUCG0rACt4jiADIQC8qZktYWCwICCJABALAAg/6ckgDwlASJPwAh2n8BxMwwLAPJSAGMjBIAapgsgXkEQYL61AecOSREw3EBwkwGUnscELHjQBnfXSYDQjyhZJRTALfY0FFLMKwRX6EAAShhCcLdgVSOQECNbFJDdA4kAiMEmQN84gaCDKBVZYoA0ETklCKNJkgNM1FLxrVQCZRI1xyBAgoK4gD7GCyHQBpaEULm192wLRj0uRFFCgICdwAMgykxCEHSAOJkLCAvwkzm1Qzl0oUsKSXrQiZhQoK0YpC/zUBlA4iDFBSVLi2ohZloFD7HEo/tbKCf0KEDlobaNOimSd+VmlsDnhhVSbwhIhG5QEQwF4+xYYlrjhUKRWgwA8iEIhKPO9sRJqDUSopkQq4QA5hzCNCjiCAFfgzIR5om9uIYAWdEmRuaaobXDz4DweEgSxsO8uXpKDTI9TtLYIrAPki0DeoxqAIOsWq4AjHJwCYQE502lvf8Ai9uBDuT386zD9QsLg3yakIdDKCTk0Q18kFKoyO0AteFicMjX5PBZMjTA4YURAVLEGweDkBnowqEBO04LKYbYEJaErZzhrVB1f4BCJg8C7PFqQADLisDFaAEDw4pgeL+kHNjAqAHP9g5rZYcN8BVKe6LygzjSu4VKZgJzshNAQAEVAU7oywO8/UJY2SGB7xLJUpNjVXd8mrwWS/Zz3hSddSGNIAaESzPNL8AJR5vACqWvMa7770A8pbXvNARQbKmipVqnqN7yag0lD9wA+07OwKhpOq7pnWbAo4AaxiNav6IGwCvgIWC5hgP7/I4HwM1l9z4gACSU2AhBGm33Otsob8LadWzjHWCwrVgu6AWH5MVYkgZsWBBBoLBncoFAuOuCvwDJA8vouICdaX4hvDoAsdPsgAchoR0iGEBDqIwnZ67GPyMHmetlLgAruA3oHIAQFNbAIIOGaQFejAXj4cEAkKkp0oj9ClxznwyxFKoOUVwsAPL/3HBWRIwy7ORwMWdEIZsZVmAgVyIA74QJSnvCtBnFQpSZiAArZLEBnO0D3sms9v/wGHHe6nhy+wogtEiugLjO/BTLw0F724h1YOpBxTnBCorSiE7w2AiVtk0BPrOxAWxJpC99LWGUhtugtAItdd9GItDNIAT8u6iiKgNPQUEAQuZhoEFaYWGvTzbAA10LMrILNEVHAEFAUEACH5BAUKAP8ALAAAAABaAFoAQAj/AP8JHEiwoMGDCBMm9KGwocOHEAUeAJOh4oOLM2ZgwGDDhhg2BNMgAUKgZEkcOBKoVEkhosuD/Io8MUCTJpQYMW7cIJIGoQIWCl4yRLgjgNGjSJGKeGmQwQkeUDtILULBAdOrButUSRogzAiIL75AGEu2bI8eCLCqfTmgrdu3AuLGHWjixA8zeGvo1etm6Nq/EAU4GEy4MICCDrR4Wbyj8Y4mBQBLhuhAheXLKhxYIEhhgefPC06IPoECRaHJqAsyypGDgevXry/I3gyRyRBAFECg8Zs6ogBGhia8aVHgCOAJFJIjWL48RIggQSRIANE74YQK2CuMGLGhu4LvCkhE/65u8EIfEOg1aBjiwUOJEi9EiEBD0JIOHVEa6P/wIUWKAwBSMR55k1VwhnslNICFQxfIoV8DVCggAIGoyRDDFhc9kNFGHNnwhUEwAEGSSQSgtBIZFCKkhQE35aQTEUS4QFAFVVSUAYYaasSRAQZxMOJJK6k0howDvTAGV0Y90MJfNEg11Uw1GYDTJykSpAGSSC740ART9JBGGllk4QgTVfYGgAVoHuHWYQMB8EMEcMYpJ5xGGDFgmUzJpeeecrGJ558QBcHBoIQW+llLgDJlgmwyNCpDAZBGCilBLJRWGgyYYtpAomu10cKnoLbA2p0KubDEEskpx5xzTeTw5wBSbP/n3XckkCCEEML9pUNzITQRnXQSeMMAQRucl54G7cFHhlUFDXBAGfv1ByCASw4kQDHZYRcrdxtMkKgTx7KHYHwiuMCbCffpAG20/gFYAacvVQALRhzaYIQKCBUAAYkn4TAFvC7ZURGOGtbrkRsEhTASvyUGmQALAF8gSB0VmGBQElVQZBG9G3kEAUFNLExiSkGOcRAJIHSBQB0XTDZClCzi9CIRUAw70BU24qgRGBAfVAANJpGcwCh+FHQKlkh1oZYCTsoE800vMlslD0gntYRaAtQQVdNRLpBoCVUHkAAJAJftUgNlQXDWWWB6YHZEFhyh5lt0CzTAnBHUKVba1b7/nRBcfOp5GAt70WD44YbDSaTfCQEg1wqQRw55Gw4MYJAPHlBwgh9WeMv4SwAMIMAcAgzg5+dlAzCIYzso4brrgxaNekIOSGp7pIc5MOgaoPXu2Ql9zz4QbAzIZvwFjsow4T8ojCaapShkGrzwAgEQKmusEb88Yj4wMYHF1ENkgWArWP4SFpGcmqqqQ8Cbwwbg1YrrBN+v5cP6FDCHgHPPSaDBnz7QFrfgRyv5ge8qINDf/nr1K+kIoSACYEEJ1DMEHXhOIRdgQn9SwAIhbE8gDtBDtrbVHQJO4HRYYcALoCMdKxzAIA0wFggomCxy8cYB98nPfpzwnwBtoCAAYMQG/7JliyRwigHomSEN3UOuM9BnIPbBz4Ma8AEeTusAMgifQCagnvXUMD5nMGKzDiDFB1XRPxfUokBWUAJE8AADPYjDBxySAk2Y5AHfUGNBKvCKDG2oQ5sglUBO8aOgqeQEelzCxnJkMDHogCAtEIOI+GUilcRAiwqwUQb8qKOOiKEKBOGEyEbmMECEjwkau5EfO+YRDBAkEKMEUsmswClLcMNFO9nBDwmyg1SusmNicNtAsDBJk+RBaAkYAyhnZICkJAAFLQMMHWrSopkR4ZEDkYAvObYFMhnkCaRcyRg4QBAncKFqDzjgVWAAs5i5CEZBKMgE4rCxKiBAjAlhQQSOmf8AG5zgDQXRQdiMQoBoMmUCT3oaLonwpzAM1CiIYsoFnNQBp0UJak/4kxceGgDqYMUDW6toEWAWg3fhSQBIGGhP7AeBkFZ0Jm6Q2p+0gLQEbMplEljADhYACN4ArA4L4IEbKODNq5hAAWWQgh4dAoAzNTUhZFDb2rwUpv8tdSBoihvd2lKQGqSNLFMNih5Dt1W6CYA2HMib3r46lggstayBm5AD8BanOhlhb2mknujiuqfDUABxicMbOfW418BJbgXVA8deFqsXwzniqv8YQOQoVxjCFCQJEviBZjf7g0oYFLKCqawDBIBCyJr2tDnInMo8kFfTAmAOlC3fQUxQCNb/2RYGNrtqEm4XKRWY7x9MeJ0SCkXcMry1UbyVFLMWQFwO+M4zMqWeLIp3vOQ9ClKWey5onCfI2bWGeNQ93gUs54LtOg96VlWjAz6FPfC6ZkAseB70MgWDOV51BaESVXsZgK+C+EAL9O1CN8R6WgFcIL8XiO5pE4WFUJwKValywW8TdQFa3Yp+E8CnWlQwCfWtb1WLwxMDuBU/W2G4DWoZAP7ytyoGGhdPBagACQkYHlvh6oMuUcCHW9w/CWjhT9cRYAnBU+PuPsQBqmqxr4CFIoRoGCKIRUgOsqWdARJZwRGZgP5Y1UAJlKAgGxhCuNyjAyz/I4I77OEBpkcCEWZnnsbw669aLKADLgNLAlYwBEEKQIckLhE+IogCCiugLnapGQ4aFsAQR7gdH9BmMuudgJH7jB410PA95HrhQDaQQzNacVpwwPIKTFA5gLUgiUoUF3zAGOIUdDpanwZQboXnZ/UkC9AiOIOmBcLp+6yLihuclpn9VgBL/xnXDUChHF4N7E/LWYs+KIGqVx2FZxNkAHDQIbt8elXBMEUzKQoIACH5BAUKAP8ALAAAAABaAFoAQAj/AP8JHEiwoMGDCBMmbKFCocOHECP+Y8KjQ4ciTwxohBLjxg0iIAmayUDygckZMzBgsGFDDJsQEmMaHEAjgs0IRr5A2AmhR48siBBOECREJkOEwIAQWMqUAA4cCaImcCHT4IVKP37U2EqDhoSqYA+SuSF1jNl/GyLqWLCAg9u3HJTI3UEnrF2ZCwLo3ct3b4eBDnDBGEwYheEpDO4qljgAQl++D7AYFLGksuUlGhou3gxxgOcBR0KHBkBQC4LTIVKnbtIkiGsrnGMXnNNmhW0BuHPrJt15BBoRasgcSCxb5gAHSQqocLCC990WIDRI1zDEg/USL16IEKGjeEIZLVrk/8jBoPyF8zIKqHfg/aAJHfDLNJj/4UOKA/gPMCFIooL/CiOMsIECBJIgxAQTsNceZwNMQIV9KVRAnEJJTCBFgJLkMMCCsRXQQxEabRRDRyC5YdASJGVg0gMoqbTSJRwipAFPPfmURRZRELQBDxVdFCJHHqVhUBcZbHGSiyyxwQYZBLnAhlJNLWVHDoqtsVUNXd2UE09LxEhQCU09JVVZY/gQkQ8S7LCDF2xSUIGXxelgQF8PgGABQV2coGccbPXp5wJw3oXEY4QG0EKgiMakAQWMNnrao6dpkShYA+gmwGeYeqajBJx22ul+k9p1nAOklupAGxtC9AEIrLI6XXUelP9QQgGIWlAeA+ilp556KqyiGCjWxYqddiKc4QKtA/kAXxTzNVDffSyscJACFVw4YIEHIivQAIuEJx55t17gyaQVMNvss/kdQIW2/zigx38XCngtCSQYEqpMI0DwY0c3uGFCQj+ouGJKGFBwb0xhWJRRiCN6BFIcBF2RopFHqsSSGKCGWsAGDSiQhEEO8GgRiAyTSISJA1mR4sAWt6SkHAZN4MESQejA7l0k2LQlTz6lkUUPFxAEQo8LGxBDB4IktEPFLNmAQEGbAAFllGJOYdcEWNakpU479YwoBFE6BdWYCRhs1wk/mMGV1jZ9ccekLjhFdlRmEXDw3TIR8tZcaqr/6QWTeEdEQaF7mTHQn3/CxcGEgR8kAOGPvVmBYZSjoOflejbQuEMKQL6XBwblQIZp3ZRw6OYyFWDFAgZ4gYBkqDcOQqO0025FqrEflOnumgoE6e+oqRZ07gVZavxu/ySxz2quueapBIwTD5iptdm2Qm53HpSDAjkoKD1EAFjgWfYx5YBJH61GJ90QZeCOqAkX6LqrcioIcBcDrarx6nXD5hhoAeMJV/zkpx77hUUH6wuWrLKzHRecbiADUIATmsUEBjgHIUnIxLWEwAD3/UMA3hLPrXCFnpuFpQANYGCxRuBBPcBHB/KhTwrug5/hCUQA8JJXgQw0gQcCplvfKoAB/xOlgmWd6wNOoKG6MvaP/uRwA9dSAA+9Jz0GHDGJ+aHCHA7iRADpkEDR+94HXXCCCMTgB1M4wEMIEYgVDSMOExBjQTZgihAZAEgfiYB7wlCSkxAMA1aTYxAuUjSj8QskmhsIA7RBEoqxCEk22IQYJ2ARH+3LYUQoAkF2sDI/QlIMkpJeBXrUgUI2DCRQIMgaOvnIlrkEBKFiAgpq9JNlkKAgMCBl0fBIBKokq5GeXInLDFCQEWRhagRgwxRMCJYS7KxrPfBZFhIpkD70iGQa6cgT3mSQHrBMmC5BAUEO0AtkhqkKikHA1mhkoyzUhSA+WIIleYAMKh5EDoiIh0piMf8FH/6jAVILm9iiwgYZhMUHWVonz3yGKEoIVExjehpYCrA2tj2zB3oMFAeoNjayacAuZNDK2hSaFkQ9YCkQHZNZIKCYFnAgK1diWxfuBYK5mWUMdosNCdRAgSlgxp/3IgMKwoAHBMAsLA6YwAFI8C85OqQCIOiCBBrgwYE0gG99Y5MvnToQFBDODLhrwwkUFxcl9G0HcXSqArjguQD4kgJ/WgNZlbCAqubuAW3Vy78Qx1e3vEGODsirXvZDB8xhjk996gRX3ZBXMAwEEJWLrGHMxlUveM4O5GuXBgjDWS0wU4wDmAIB+sKFHdiQq6hNLUJkQIZUGAMEZACqai1AW9r/XhAwErBM7SgQAoOmlneYcs4Idku7R7GAqwC4FHAxJRBIUAB4wIOJU4+nm+AOALoIUE0IWBOEporxNtTVzZ0+oF3mOY9T3XHqqJhjveMNZAStOe/zmCjH9ZrKeiuoKgNE4Kk9vMBMqhWIBQRgKlLZNcCIykE+6JA+/X3gbg6YH/3qt5gkYCJ96qOOdVIwKQeQUAYEpN+BI6KG9O1PWC84bqAcAK4Ph7gAI3aID1ilvwSiWDuKQBR4AmieEu7KnhJpw3Q0zD9inQEOCDkCkB8igMwSxATeajEJ41dAu+SAyDduIDUF4oMGwJA+9mGCtHRHggDNiwQT8K5ALhBlKZ/nnQJjvgsLsrwdNJw2CS80l7OwqB+D+MA/1prXgSYQ538MgAFtvlUBbqsYAcggB2oeiAXyfEQlHqCkAjHEf7wYRR5OYIgEGcD1nKxjI56Lz/hRsUBGsGkzn/lAkY6dDqIQQ2dBKIsKIIgh3gXoL0rRQKDOnQNqvWdLKyNmrfY1CZacOwbwwdYzxA8TmP2PCfQaigTybYBFXRUBMFo2AQEAIfkEBQoA/wAsAAAAAFoAWgBACP8A/wkcSLCgwYMIEybMYUKhw4cQI/6T8qNGDRo0IkQwAqFjjx5ZshBcwKNDhyIGUhqAEuPGDSJEtEiceRDFiRMLcubkwFPJjh1dEPrY4AMAzYYHp2RYuuWB0xkzMEiVioamwQKpusDYisKmhxVWwxosc8iGWTFs2ERQEPEAgrdwEVCYS/eM2Ls0URDYy7cvX5EDQUgYTJiwlQJ4E8+MkKBxgjGQIWfwUXDFBxCYM4PQ4UCxZ4gCFowJQLp0BxIEyXhY7aGE6xIvYr8QccbC59sEDZTezZt0C4k+mPDRQWiDCtxWAQxYfsSCbcUyGkiX/uGDkxQHsmfXgzyhAAcOVqz/EEC+/PLz3Q86qMC+gpQRGzYoUECCxIT7BGW0aJGDgf8LF8hQwIAFqCBAerdZcIEk8yngQxIPCVCAfwzIkMQRCN6mgj4ZacRRRxD0kMYvBklg0kkqrRRDSx9kiBAaC/DEgRI+7eDFAQRN8ENFF3kIYg9uGISASU+otOJLMJVBkA7SLJVBU049UAQDiVHAlU036RQjB1e4SJALUT4Q1VRm2YCWRAx4MNcSbNIhhJfINRAGEHQCQYAdHhSETBBN9BnCn4CGABeEcIo1Dw6I4uDYoo7lUOijM7miwaSUUjrEpR6QAWlYbvTmKQHP/YOFCKSSeoYLqLK16V0ucOFpAGYc//hQBTroEEUZ0zVQ3XUHEAonAOOVJ8B55zWXmALWpYCddgfAwUJnAzHSXgXwyUffNAMYZAEj/TEAIIEFgjUQAOCB10awwm7qA3sjVNsgCULcB61AA+yXQ7feBkigr6tGRIIvGn3xYxf8EqTCAicVaaQE/c4UyEUdRiCwRyAtQZAaJSWc4pEvVdCwCUIcMMG8BO1oUcQfhpgFiQNpkDFKKbHkEkxEeFwQFmeEoEUDt/mg5ZYz/uQFB4gNJAKPHXJEwwYIqdCFSjK7BEhBETiZQZhQSYXAXS10hWUcWvb006M/LIX1VBiU2QReCGwFg9dZ5jQ1pGiISeZZaM0wQcN8z/9UAV2A07VECn1LFAKdfvWFx0CBxuW4XDIU7lDieyWaaAICkVDYYEF07nkTLEj+EKOkN/bCVQe4oMELtFApulVaxNHBDv9Q9rrkZGiWWaUu3K6QGa+WxkZDAmhwKaassfbacb4X5Grwu+nwjwMvuCbbbKWK4ALzzRNkAhLQkybCQRL6UHT3EV1wAAhoqDpTAZfUamuuHyjT7wDkEcucBUbdVUAUUciVrpKlHSY86jvoMo/++hcWJlAnWcvKDhVYcL6BtGAD79kAFpCiEAF4Ql8FcECoBGKBcoUngfnLlmKSIAVmUeENBsnEtNplLfrEi1/14s9/QDggFZCMXuUSjwD/Rlio9bAngzWE1332NhD98KdbABIQgQyEPoGogIZJVKKsCKIgHe5Qij+s4j8aQIEdQOAEQTCgQ+RwAoWFYQm2E6NAhIAIjWzkRz2ABgcHkoQfmARmMVvR1sQIAoj56EdpyAKOBnKBMJxIYSnhWASq6AMznMyOKftIFiY5kEa8DJJRg0meuqeAH1iyRwGjWBYgQJApvGxjLUHSKCG1AQSIbQchwEJBEGBKQ97RI2mQngUzBspYwgQeBVEADZzUlCpQ4DMw2sktbRQ6o/UyYhOLANMM4gZAGsCYRPADQVhQBathbQb3KBhN0oGTsN3SC+MjSAskgEpOaGBWbVwRDxDg/7qB8MFqUBLTmDAAhgrOJAddiZtOZFQjFXoJEUw5290YFhYVvC2hJwDbQme0hkc14mpRGmjazlKCuzjBbXBr506YWKgbPAVteGPDDxJzgSW47aJZCoG4IOWBu5kpLTNwQs8UcQUJaMEF/eTbJaYQgQVIwGZiaUEFfBBGORqkBBTQQosQwoLAUYBNS9iqVQUyhTolbnEDEYAE4OJVuvzGqvagnF809Q8tPC4udBmkGO0g173kIVH/EECgGve4pHavL3+9HKPk8A8XeO5zfgKUTOS4g9KRzg4DecHmNqsKh4pRCZZ1TAwKMgcdXOEKeyjMGfY4Vj/8ITKQSQAHIjfW2v/a9iAqSF0JdEEFw9qWAVOAgAF4sAChGqQNItCdZjzA2ioKIA3BY8MIBjIBzKihUtjVwDbFeIDwkQYGAqkFdo+XvNVsEX0P8C5pPDaE8q7mNbCJTVVvlwD1BoBnFWgNfK9XKkJYNQTqNcBAsCCb7NEGVagZax2e9ypOEqQATtAeqlzAB99aFQBh4E0G7nlbvhXgA/ILoHQqgKH76a85/FOMA+JnK1xNZ1fbLRT+FEis5jAwLLUS8YsJeIAEw2kAKByW/gZw45lcwMU75lUBHzUHB5xLWCkkllgEQD8IMgsOPi6IBc4bkRSTL4hBPk+R3zfA60QwOyyAqkAKIAV2wWelPpnwLBcn5C0pFojL3wEzlAUwZpoAQAHKYtYBqMCEPc5hWkicD7xgWJACeDGKU1SBZ0uo5/J0xwQhPAgAEO0uRcfrrQIxgb0oxMMCqaDEWh6Al1eVhBl2Won4YeSovwguKnbPAu1JtKfv46iBiPqJpL4AuAog59utwD2dpo8SGZ2fWefLzsVuXhJuEZ93CeENXB6IBWSALwAFaL5iPEK2HxJt3AQEACH5BAUKAP8ALAAAAABaAFoAQAj/AP8JHEiwoMGDCBMmvOBAocOHECP+E1KoCwwYKFCcWMBxDQcOO3YAGDjoxw8zNWjQiBDBCISXEHqUkEjzoISbQZqE2ImgJwIKFPYgzDGhRU0GDQ+G4MG0Q4ciTwxInQqlQU2DSRRZsXLlyk0JOgRcHWvwgLAYMW6oJbJjQsQRHuLK9TBkiIa7GviQ3VtzSYa/gDNseUCYcI2BAly5WMyYMZokfCPTdGOjsmXLBgwVFFAhiucyoBvIWSG5dMQpYpCoXp3G7UAWKVIcmE279gEqI03rHsgjge8EOILjyEOgePEcES0UmKCggpAcSXfTHIHCAAEMYSDJkOxgxIgNGxSI/1dAgoSQCeh9SE+YJoD79/DhU1h/UECLHAzyX7ggo4D/AiqYYAJBcziwwgoCJCjAAAwOcIQFFuRGX2kAONCff0mI5dARCiY4gIQTcndHRidsxNECHymBAIj/qGFSDSmt1NIXL7EQIkIHhODTT0BRUAFBb0xhEUYanfjRFAZp8QOMMrr0Ug89HECQE2EwxYNTTz1hxAWRaXDFHl9JEEQQPPUkwo0EReFUEVNJBQVaat1gFEQFNKABCHiCQMacaOp2QA1VBAoGGIecUdAZIiQqwguMNlrCoyVE1+dVNxT2wAyYZorBphgwMOmnNMnRwKgflGrqB044kYKNoF7FgXGwxv96HUEM3AYHC7jmymerZP3mq29uRORDBRVI4R144YlnnoZ9XjBGfNAGEEtkDChr3nnoTYAFs/84cF9+DPD3nwoWGAQAggo2OACEIPrARrTvGTAAqAWAu9+F/gVoArcWOGBghwuqewSvNflAwQlxGMlBKJISlAQFKKnEUksgECyRBe5cRKKJKHKgxA5XEOSCSUumNLGTMW1gsQNvVNACaZsJOaRGHKeIgMgmRTwxjU+moYBBLeigxRAHqGAaAzntpKNPPUIy4EANzFzkAjC4hhUCTcIEgQYF+WIlllC1acVeDIQpJplL9wQUtyF+cqVTUbX5Jlpa7DXAEFx5FWbSL7T/2kCbBsC5lgHqWWy4RBPUZRded+H54+ERaVHFoIEFdoJAFjAKKaRzxTXE05An9NdglpaO6Qj/tLDYGYgq6roIP4eu0ASc1m47Bi4YZMIGoDTwDBNGy16TCiA00sMJEggvPAujNu/8qJYMrDxCeMQKxPXYPzKQqanG5r1tDU//Tx7BySqrVQLYRhsVubIQvvj/2PCrr8LlbtAADlyQIfwSycCCBjoYiwOIRSxjfSc8PigXqCzgBXgFgAt128sADYis8ZTnPG/4lBkcGJ/kkWUCybIWttCDhYZZIAmyCNcF9vUQCwSMQUdgERM4+B4bvK8mAvDBCCdAroIU4Fv6ucB//wDEwoH0C13pahC7NmOFd73HDvYDlQDwE0R8AUhfBHJAG5DooQY9iEXTE4AKrUhE6REEAHPgYhcZxL+DEMIKFFhACECgModsYBAmw4MEdtXGf/hgCjQ7kUc4QIHwOQAGJ4nRySAQwTa6QGNT40iKdiAHghQADy8yGUtQtoA2MmBIGCmRwj6GAoI0gWRM2hlMeqAI/v1Raggb5RoIEoScabIlq+xBHXg1AQ2oDSgaQA5BQCAkSNbMY1IaCAMymbUn9SAaBZmAI5rilDBIIHiRyVGZfgmUxwmkAcUMpYk4EAerDWQFXbglz6DkQYFUwBRfW1PcjHDDiJBBTDrZJo8owP+LglxgCBo7AQzqALOEKIACuPyBFrhEEBbEM0uA48FeZLA3tKWtR586ATXDJje0VEyAevvKmPR5s0khAGyAm5tadkkWPeTNbGjrSQY/1QM2dTQtapklXwoAgq18aW8aYFufXDAVwd2ACAaAg24YkAIXiMAFKShA6JwQgh1MgQ51HMsKLkACBrShjw/ZgAuaoIFkHmQDjNOAGvKkB7AWBAGCAkPlLkcQEcilLmlVK0P7OIEqVC4wpAvgP9Cwuc7RxS7HMCP/DgHY0lkKMo2K7OZKIBeptnEFji1MpjL1oxS8znWRRYNbUbDZGdxuUx0YSFMbw5jWidat/0DBaS+Tjc3/sIC1izlAPfmHADBYRgxisAEKLAvb4hrXIN2hwgfgMAJsHvcfFxhEIMIAARiYlSDpe57zUrDb6dEAe9hbTRVi9w8GaJdUpypcH1lgPuvdQSCn4p6qvCebefXRDu2V1QiOMF/6qm82BeUfEIAjHOKYLwX/wMJ/13crSbhVAvMjcHCIcwhl1oYKt2qfMN1KhlFE+DeHKYgDNtA+FmwAdMbdQA/G4KsqeOC5hhsxASn4BjD2yQIwgBYXgKAGyXCmgN454Hg2PKkl0JALViGLBYB8wBBecK9osgIN38Oqq5ggyBUUIQk/xYMpuwdJYxlAlrWcLU8dBAD2pYmNBTIFLwdAoLACHA95zJMtbRG5W1QM14V6eOYOqStCBQnDlMdGrQvucFsEGcB9qHivcZHCIALgosCWOBAFPABeYUCxZAawAgcIVSCLtpcVAyQpAfzLz16kdEFG4IIDmJlXU8xzo/OFxYH460CoViKg4QcAWYtrXAH6KmK0qEZ1rWvNoRtAEH+dLxM8ejOnTmKDkC08Acw6X6tQ7BlxnWsYA0CBakZTQAAAIfkEBQoA/wAsAAAAAFoAWgBACP8A/wkcSLCgwYMIEyYsoLChw4cQBb6xckWCRQlNQoRAwJGCR4J0CnWBAQPFiRMLUnLgoGQHmogwDVoQQfPFixIlPHgYoqEnCBEIZbS4EJMhQhA/fpipUYNGhKcRjHyBAOFATIMOCNVxwdUFTRYDroo1yIIDVQg9eqRZ5gOijxROnHyYS7eB3QYVxuqNKaGD379FAj95YsCAkoEDKrBYzJgxEwd7I8P8dKOyZcusWhQc4KOC588VJgiQTBriIGlgUoOpUuVH24ETFMgmQZu2ECETck8ozbtgLgzAg88YPvyBcQYQATiQwShHgSSje8fcMCXRjFdGmhjdK4ABgwvgZcj/KEC+gAoVJkxITwghgfsEOHAQmE9/foj1By04WLFCgH//AwQ4gAUWAEBQBwEkqOCCCnKhAX69CSiggQ3pEIaCNnDwGoSlaWFREBlt1BEFahhExkglmYSSShzkxeFBFei0U08agAACCQQxYAVFFwWhUUd7WFCQCCSpmNIaK+2wAxMEsYBHUks15RQH242lQ1c0iWATTjoN0cCLBKUgJVRGnEVVWsg9lIQed0URxQFEgdkbC0rwYKedNehQEBUH9OnnnwekIGh0cooVRmGIJoooFFDEWeijbm0g6aSSymbpbpBehYJxnBq3xRYZhJpBDAQloZtuWGDhgwqZ7qWDDWLY/yCrrMCtAVEBOeTgnXfhjUdeWIXKQAAOedQ3HxDIItFKZKT4Wt556ZkgJGL7/QdggEdQSFABdjDI4B0EvYHBe+/FN18YmQ5g7bXYEqjtPxV4Ky8RrcbEAAg+isiRGisg5IAWRZ6U0gIu1AsTHRdJkC9HCHhEQQkENTAFiiiYNDCSLGFaLwNCyEAoQTtW9GFGDHtU4kAfUGwxiy3toPFADKRQgiJMJFFaAVvm1CWNIKgB2UAs8GgRyUG84S8IKy+wkhIuvDtFUj8wRYNTZD44lgpcZZnzzj09SkHUYz4llZkQ60VLV1nXhNMHmR5Applp9WCEZgbXHREDc92ldwNlvP9sd0Ma3MnDX4T7MdCfgiYeF10f/Px3Qh0EVgRhiiaqwD8FwAEHFXwC6ifdjyfkgwGMQhHD6aijrmdBDhiigBQKTOB46BGZ8AICgSwBAui02y3ECMAHH7ykE0zb+0EniKq88gbYPMAGlkZvaW0kfHy8QMQV1+n2KfwzgG23nXqq9df/k0QsswanPgYzrF7QEQI4IACw5T9UABMlNIBjTAK0kOuu37mADEzwrkJxwFjJQgISrDaW7uwKPAJ0lnlW8Sg3lMtY9EGWFvTiiV6VhzzQMgH9BAIAdf1nAAU8iAsQlCA27AALBZHDGMgFH/nUJwOkGUASzIMeE6yggPHjj7X/JHSEAhFEAfLyFg8MooUZkCsGdWiVBYQ4RAEV0YgDYWESF8TA8lmgigJyl0EKEIMtBmAB9TNIYs7ADARgggx+O4gQ+lCxExRCA2lKI8ysoDCSlWyDBwlFkYx0pLKlkQ8JW9iIKLABgpjgDio7QRwGthIKpDB0BbiCyPqor4ZR4D4D0cDEArYipS3tS+XLAUX20KMfjQgSBBlCJC+2tB2gElItiAJPfKIDGRSEDEIbmr484iKBFIBiAmPZDqbwLh8sAUpM+YEa1COZEXCJazUCwcuCtkkQiSgIvBOIAJpQklLWsosKgBrYpgYVDkTmAFq6ic5mlE0WFKQAOuiRBJxA/76C+EALKoFBCaoEL6hFiWpi+wINqHkVE5xBa/LEJgiOUKhKJEVqCB0bVV6gFyzVJKIzOsajtIDRt8HtllchAdoeGs9rOgpMA/BCRs2Elh50IjIOiALavFITV9SrARGYylniRgkm3UwKKfjAAYphs7+xICRB8MD+xCIAE7SgAP3UY0FIoAMtiMCoB/HB3uxShihMVasCuYLg7PSXJRBkAAdg3AfG2gCGptEHpmAr4SInGLb9gwWJE9TiGNeADxivfsIAjGAolygHwNVzgQqsXGZ3PQEMpnKYbeQIIOs5sKaRAphlVOoiMJANNGYxmuPcAZhw2M+mLgaXqQwNNiOJ0/8uZgNZTSMgWkGE3vb2Bm5Fq3CH25D+kWADE2gBZYlbAAksoAZuoIA91bgBz0jhulII3i1yez0vLE9UYGjFVFUgvBFQilIELZ8cOAWq74YKAQI5r/Sid9b6FWEG28vvpxQAgPnOpjbhG2H5MiAc4uT3AVa5APVIcBvcnOql9bMCrdbHPuJAYCBJcLD4coOFpqL1VbOacHB2YJD+cVhVDJgDcQeiABqI4cWyggVQVlw3ASzCf7rilV0zNYUMAkGBDzCkXgaAYwB60MOFGoQN65NAJPhVLADI8QMj+MHlQkgL7iEWBgmQLDk0cMpUfhZ6HhUGci0ZgRQYiwUCGOZnpaeiDQm5ZENkhxA/0NBcGEQp/9oMwh5SdgBt6M8JAyTnCxhAXlyAL0F6QMMa1gcEknHAB0MoQoLop1qDbpdBzGDGAHDBCQXJQKPjc+HeWABb/sJ0pgeERYGgoNMJ4sIIDrKBOky3XgNQNbsCJMaBVAHWCZJAGqm46iu+CwbADsDl6geAdUloAFc0CARgrWcvrnpAci6AFhc0huDSWM4KGQF3JRMQACH5BAUKAP8ALAAAAABaAFoAQAj/AAEIHEiwoMGDCBMmNCFAocOHECMCuECGjIuLIkS8eFHCg4chGjQQrKPFipUrElIGCRECgUsKKSTKPMiCBZUDOHGmSPHhQ4MGBxCakGFipokVCF1MmdIFhlMUKE6ciLOgaoWZBgWQYMK1Zk0hA7CKNVhhUFUOaJU0aRGxAAkSCuLKlbthw5uxeGeq+cGXr5kagAHToHFn4IAcPhIrXtwwr+OIAyhAmEyZshcGBS2oYMC5M4MCYR+LfihgTxgeh1CpRnWC7UAVBWLLVkFbhYnbRUfrJvjNgO/fwA08eVJEhsQjAwQoH2BhN1YSCGqU4uFGS4HHFpQLGMC9+xELzZ07//yBofyMGQ/Sb8nAnr0V8QeZBJhPv/58LqL+EEyUIAEOHAQEGCAQSBT4hwjw6WbCFDbQZ4Aa4SXUQBoCZtBagroJgAZGGnHkEUg6GHSASSilJEEQTbSEAAkYIuTDATs50dNPDeRAkApokFHHRS502NEQLkQoUAMnmbiSighQsAFBFdyxVBdNPTVIbnhVwIRXNd2UUwpOSNEiQbM8FdUJVZWJFgfXQSTAGxuM4OYIQiTxpXMVUOCGG4HwdUJMBE3g55+ACiHoW6HNKZYXg0Wg6KKMKpqmoZBG5MkFMlRaqWyYqhCpWJEUUUQHoIYqKg8QRCgAbiYkoaoDDjS26Vgf7P9yww0x1BoDFAZM4apCyWmnXXfcHRFpARmk98B67YFRxbIQOAbsAN8JWZAW9tlXDYsFFRADgAISQCASfyBAUAtE2FAeBucZ+wANhc5pRrX1cYHfEEz251+3AxLIw6szFUBGRhx15EEUuxK0giJXlHhiih/wK5MzPJ4BcAkCh9TwQEyUVKRKKSLp2qsCbGZCuwINkOOOHHr4kQYhYlySwigiSQEFHw9UgBw6ODGCA6M5kJNOXM74E1IDkaBjyiWIcAFCK6DBMZIXD2TFUkw5BQNUUp1QB14OYAnHzzDy5BPJCfZR9dVjUlXmGmjgZYEUXF3plZYHjLBpBWOWucCZHCz/gJnDgEtkwlx1Fe7m34FDVIcbfTXuFyADTSDo5G+9NZcCBSde0AB/BVbDYIkyOgEADmBhOqCoT0Cl5gi1sKgRsH8he2VOZFUAAzl8ljnrDyWBhhUoSCAC4rwHXsAFyCev/AWaFp/QEjxEL/30PFDCMwCYZp+pCmQ7/0RwxHkqagcsAKBZbajepmoS0jovkAM82IprcL41gJAF3LnfbwV1HIAFVkdYga9+lb9NWQAGyGKPspZVhRfkJTu+eha0wBOpNaALPeppTwbAoCyRjGU7z4pW+2wGgwbNJwYg6B5ByJCFAVUBGD4oSAXMZR4MZjADRSCaY0SYkHfBiz7y8qBA/xTQH24JCAjf+kOzCCIADajjXDPIQssixYIfAhE/+hkIf4qIL28VCAkI0p9ASsCFH3JhFAowSAGe4B8jHrERYjTIACZwAB2UwBVUqFnr6mAiLejgUXEUSAHQIDEffagOmROAB04Cs47ZL5BS4BHAVAYSDcRwIA5gBolMdCKWuAQEcTSBRSRpSA+ExIED0YHGGokkBJRPf/4aJdI+pIFaEESVJ9mDiTrmkiQx4VUF0IOMZiQHORGEBRUhZcBWJgSCmGCTKvHkS65QEAZo4UlNmUIdrueYFwFtmDQintFkOTEPvGBpBRFACRSWol5SoG0DwQLVChEltJ2AAjoUCwno9v9NoWELk0yQpAsqsDuC5MAFR5JAA1YHAAVQrZ5Yk8oCYMDNmXQtS2DbidBGKB4QMCVKEVVbVaY4EwHIzSsZ5UkzIOUCkOZNb2ghBF4Y0BUs8TMFDMXQADpxNYmu7Ux7cIwArFRTjFZAhRgiBJnMdKYFLKlnPlDABhTgg3w6rAIiCIIadHBJsQzAASpwAFIDOZAXvYAWI1BhAaRauDYdjqwFKcGd8uQ4KxTKAra4XFzaujO45sBxfekcYF7pAyFUznJ6fWogT+AXz30OdDSIgAMskDrKHRZzgRSAYCDbqEWNLgepC21X4wiIzioKdrFbw0AYsBjTudZPd4ErAADxhcr/2BYCC8hMARajGAaM1X0D0AANbguInMr2uMgtWRIKIIsCJOG3cSwACJawABRc4SoGsYAsPMMZ5UGXdQKAAfWmR4n/CUQAy6OUpWQQm4IWbwTjA9V4tSCQS2lPe3A1gnDC96n4dmB0950N+jjKOx7QzzfD8dSn5EA6AdMmfSaQB1w1UKv5HdgAeBhIyCC8vuceN1a0qrCFDdAFgxzBAetj1Ry+67wJcGBWIc4FPJPrsAAKcIAsdo4FEKBABlahFC4QzY1xDKxNSeCGPWZgUPAywOUAK1qQGkK6kLxBBmIXKxB08pMpGKkI1NBYCdwgGCTAZBBumcCY/KdEJlBRgiCAsYboUleY+TQWCYJHSELSAgHglQE1E0QGHegWEpHQCzIThBNwnnIGPfAY73D5ICMooxW5UAWSueFegjbQH5YsECEY4FwXTM8PjGkoAUh60lwIA0FgUMQ84CuJf0ijQRSgAyag81UNsCIQRTGGCN2giG70VhLpqz8HnBpe8hJFDwgyBXsF24sF8vN7x4DqSheEBq3uIoGiFkcR7Llaj7hythLxH3z9IQQ0xt7oZrIB94omIAAh+QQFCgD/ACwAAAAAWgBaAEAI/wD/CRxIsKDBgwgTJnSgsKHDhxAFmmBB5YDFFCk+fGjAMYoOHQRTuBAh4kWJEh48DNGgAYRLQRFjHiRBQoFNBRtyjhhRoecGhA5MMIzpQADCDxKSBgkSIgSCp08pUPgps+CARROyZhVCooWFqmANktAilcKSs2oYQHRwoS2Dt3Dh5igQtq5MFyjynth7YoHfvxIGAlBBuLDhAgPsKo4JaIfjx14id5FREIAAB5gzO5gDYLHnhwMwBapBuoYZM0vUDhTAuvWA17Bhf55dEEWP2xBy6979he5DB1bCZBhjYMcB2lUnSNgRJsIJDSoWNwhAvbp16zaQJ1xDhMiNGzFiQP8xQJ78kyJqtB+UMyaBe/c4cBCYPx/IA4IQ2IixYQMDhhkzPCBgBgS6oB5tS2xB3yEeOPRBDf5hcMoUORxIGwsXZbQRR2XoAIdBFYxU0kkprdSSDxYidIFOI0jRU0++CeQACxhadICGHH7QGUFykGRSSiy5BEIfExAkhDdJKdVEU1YMVdcbW3FVk00sYpEiQQoEsaRTUJVl1hLRgVZADi2U2cIFK1yJnAJ7wOAmDCgMwkJBBdRpp50y5ClDW0eoWRc+fy3AwaCEFmqCn4jGtEJrjDbKWqJgAWKEERFUaumlEQSy4z8AxDbAERaE+hWkdR2QRRhZpJpGGrchANEP18X/St1xiBoQXnnmFdHBroEo5oWs1Y1BBUGqtPdeAvLNl0GRBamQTX//BfjAFgQGNhADPHTn3XfhjbcDpG4cGx999QHxAkFS6MdfhAAKOC0EpMqUBAspOLEhRywkdpAATpT0o0oayBFvTBXZWO+9DXgk8EAKuHCGjygBHCQIFww8gAMFOFkQjQXfaC9HCXuIpYj/mihkH6oRpMIGBzDBrGcr3JTTBju5+KJRA7VQ440ZNcBHmAYJcACJJoPAREEvJCmBlk1BhYATdQkwgZRT4qSTzX2qKYJSTXEZVVkp1AUAlFpJKfMbkCrgtZdfRhLjwHA/NEdcDORgN5ktHBo3RA28/5mXXnwNMZCeebZl+AVx6bt3QnsF6rhfa3CAtgB3Vn4nzosnxEChSnTe+WM7zFnQESs4QIoDbWSdOVENDBEJCGhQtvric6C+wu243/7o7AlJUCkNwAcPfA3fCuSoo7BtyvtAu+n2xaSY6sGpp9QfcYTyyw9Eg6q34bYbrQYBIH72MZmwQRQsoCiTEwkAG0AHGvtJAa667toBD2TYdYD714GBaCHbEg+uDHCeXYmgLgbgX3XOYJApPAA+PGhQQ3QQAWkZYAotKMgG7KAtbgmwPD3AXF2YEAbrJKALehtIIIz1nmTRBwglIAgJ1MUudxEoA2YwyAs20Z3vtOMD8WIhfP/IVZ/7ME9d0PqPu6iVAQOR7x8iGAWyXEifahxEBWHYTxKl9YAlPLEgFshBBajQABaM4G0q4oNJSnAGKqTwi/9IQkUOdq8ogK8gDYBYxEwkuidOwGA44tBHUiYQh+kRSEFyYvZmZCOPaQRkHmkAQeBgyBeUbGIgoMry5gWHRh4Mkh8hCAtIRjSWqEFIIyCVA4TQohdNIH4KYEEnM/TIBnTIEARxAClLhMkYEqQASUtSEAABRM/IwGo0a+WL3vYGihjsYw34ANAGMoAoWBIlRQNB2HJ2BaUxjUtWEGFVcnATZO7kRRXIIEFiZrBnCEFxCCmAEzzAEg8QIn4+2IMwt+T/tKdEzWwyu9qLsHegMwiza04ryx1jMoAo0SSgNasAohqwNH52yUsSDYsJtDK1h1KJZvFL0RWa9rWynEVwdhkAFjgqBK7YBAujSlQFSvqlJURCCLMRgAzMVABxxksBOsCEC5ygTrBY4DICUB0cEdICJujgACRQai7fcje85W2pBKnDm+D0NxQMQXUAoFtc7tYCny6PAVwFHF/+klEVHM5wYiUk+QbBl7487i8rAMCdCLenwzEAntm7q18KNSgUJcFylpPBNpaqAcIS1nN3GIgDCIPYOk3zixr4HOhA50WCAKANJgitaFXggJhi9R9ncERkVusFNYT0tLCF7VFrNwcB/5g2tiYQQRD8QAE1aNKzmtFMG25HUPINABLDK01pdqC+f5Aud8ez7VIVgClLCY8GGjBedB21VC/k5nnQq24EULRd6hV3dhFoHm8mRSmJDoA11KPeUl/Aqu6pNzcoEEx8PxWq8y6PCqniXvd6AAFXVeZToBKVf5/og0KEAVWpooYkYws3J9hAVhB4rZokQMD67SoLIFEMFtrHP3glKhUxGGARPMyDo4XFAWNQIHXcgKgXcGs8uCrgrn4bExfImDoEQNQOtgUeHJengHQICwN+HAATHwSnMmmuQSTQQfB8EFcfCst0FGiHgqjiD+KaDxFeRidW+IeLGXiEFgrCAW0F8JrKigzLAHYALAIUUyAbSIAQcZAHcp3CIBzYTw0HRKA+/mMCWaiyldegYSUfAA2pPIiej4UsIgLBCATxAxLPvMQbkuAgE2hABdCYKCFW2tJIIEgHNh0tGxIoPeSTYgupSAAgACECBKEAq1tNaDLzbgMEaCERa/3ngriB1e0S0BYWmj0XsGFc5CJCQlTwhXWdeQZgsBaFwaKAKwUEACH5BAUKAP8ALAAAAABaAFoAQAj/AAEIHEiwoMGDCBMmFDBAocOHECMCEIBlgsUJJEgoULBhwwgpFSoQVMCi5IGTB1J8+NCgZRkhEmMeVFGgpk0ZFy4w2JmDAUIBcwTIXNHwYAUXSEWIePGiRAkPUIdo8CHzoIMkJrKqoOmgqteDLchoGAuirI4CEQcIWMu2LduiX+NK/CChrl0JQfI2aRLCQ0ELgAMLlks4poUSFBIrVrxHRcELNAJInhwgDJbCmCEOqMMORpfPn63IIJiBsmnKCYRmXj0wBIfXrxfInj3bREQHWiBUIdCBwwHWVX1omOJlQSUXSQo3SICjOYHn0AkAAYKkCvCEnXr0gMD9i5EI4CPQ/6BRw8V1ozZsYFg/Y8aD9xniVylF0A2RGzFiGNhv4EmH/zzwUMZ5qyXRhAHwRXCGBQ4dwAEU+/WAgE8EZjZARUJktFFHI4xQwQQG+VASFSiltFJLF1SIkAM45bQTAznk0NVAAvhQkUUZbujRBgZNwAKJJ6nEUktRUChQC0glpRRTaMwYV1YmbGXTTTk5puJAPizpVFRSkQWCkw8NsMKYKzgwB1xXZpalFVe0KQEIPBI0wJx01mlnmnLtEcKeISDg55+AgonnoA/xcNqhGRDqlQYLxHHCo5CiIKmkUxAEgmlcZMoFBYrKxYQXO4S6gxJKvAYCmgnhkcCqqzoXHQEsDP9qQgQQfAfeeDXk+sMPXRDGwavSUYcEObEOpEF662Hg3gNbZGAAVQWZQEMMEO5XBIA8gEDQBfSkoR133Bnx3RSoqrhGssvCFx8YVdQx0n346cffE9d24EWnMgmQiUY6jpBJuQINsAEcJaagEkz4SnTRBDn2C9JlA7VQEgsFO3FiS7bhawFQAzD4l40XNcxRhx8SJPGPKKVgcUsNlKGDlQQ54MMICrSgWmEDTNmiTjzlgKYKN2LErwKCDiRwkBc3IElBzSR5xpJNPeWBSF8dESVNUxbQ4ouDHuCCUkttGdVYGlD9FVZQSjllxoP6IHaXGqhRlgZsJ2w3RBu7tRaZN9///RATbe5x1106GG3nnHr37fdBA9SlF1988uknhYAdYfkRhwO8eEEFAAroYhRIsfl5bTCBBgiKHADz6HZbYMChlIFRNOsDDTGppDDkrjsFKwBwAeyHmk37QGvQZryjkCoAgA9jAC8ZF0wMb5ADKIxaKmywySb8QDJQocYBb0gvkQMTHFBBDlUdAASrrOLwXBazq2jFreTVsOuuDch1APuuvgqEAYNCALhqFR5c5coMhfvKJvIArGAh4YFkKIgKKBADZT0AAiLQ3EA+oIT+dAACITCSQEiQhW+ByzvhiYASFOcVPUDAgTagQN0AsAZksec9D4hPBsBgnoFM4D75mVe9/wK0gIIIAA0/2A53FkCFTgnChu3BoQ4zMJ/6wIta/DFAvTogIPEJhAztSVez4kMEEEWLE/GqlrU6IAEvGkQFLZiAAibQgvgRxAQjQAk6NmBH2gmAYUPjEM3KNYAKoCxlFvuA8twoAxxpyGEVqJsAJgaklAipJcWSHkVCFkiPgGQEBBHCxCo2pJZAbHg1CprIPOIh4YmSBQQL0iWJBC1CCcATPNtJARTHAJBZ5JEcqgBaaDSilCUtCnyIVgqSpJQzVICFXnFATXb2ohiBSQU+4ORGRla0I1QAkaWMAii5l6SvQc0pZICmRJKQta1Vc4YDuIAjFXABjyUkCSMQUgoU0P+7bZXznFLzQDLUGSa16cxFPOmakpgiNg90aXsSsYBWsHZQng1KDk8Lm9SGADc1kCAuAoDS1dp5AYICxwKKiNrYyFaWKBDGAklA20hrkpxOCWGlGigLCDTQgtVszAFAJcriRKSDFFRgNHKZkxshcgGSVMAH9vyLW8jkAJMO7wBschPhopq4qS5VIAW4wuDukpcgfBQAdeoqW74KArI+LnIhEErm7LRWNw4gCHuBa5885xPMzfVOS9WB5wbrJzoMRDCIvZwGaSdY0IFOC1/9igU+gADQLaFJkc2sZhGigAUgqAMLyORmAeAAXgzBCn0ggxkLwoAHAA8Ji/zqAPqgu9r/5o4CRiqB8yYTgq9iIVK3ux0M0AAACzRvt5JJkRs7cTxIORcFMkLuZFYrvjjExnjH+ygMpEuDr+qAVNi77myaMJBLHUpTCMhsBURlvfBCtiAsMJSmuAALl462BcYAlajuAIfR2i0FD2Bfq2rQxwppwID380IKCuOD9fHPfdAxg6JKYCvx1M8M9xPdVxxAgAc3kAOD0gG4KmxA+/2AujGpQ/sg7D8gPGBQhVBiuApowGR8hQHNYXF0pvNATiBkBSiGSB0RogZvyRiFNIboXBoonQcioQNR1QAY1GPB9yTilJzjRhbrZQq/EGQKRh4gkiNg37gMYAE7FtYDFjwQBaSHlspijI81UDUF/KjRP9gSng8QoR0Z12oJBZbJBajQgNgSRABvRpcU1+UGgjQBiPJaIxcDhGUsHUABqyNUCmxYZWbpsApVsOcXrnjnIfJABOKbgz/QlS4dsmsHBAkCqbf8Hy7WcngKwIay4ryuNKAqDjeIVxbp9R/Rig8NVcBhDuOTiDgZxATRyI8aDZAt/2KzKhOwKmECAgAh+QQFCgD/ACwAAAAAWgBaAEAI/wD/CRxIsKDBgwgTJhxwRKHDhxAj/hugQkWBiwVkXLjAgEGOHC1aEGwxYYIQEgpSbhgxooLLCgwkyjw4oOYAAThzrljhoCdCmzMFJJxA5YDRAylSfFjaoGmDmDMNWph6xGbNqFgPXmDRIIqOrzpYJIm4JIDZs2jP0sjKdqYeES/ilpg714NdD2UGMniQFi2BEW0Dy2wAorBhwy8cFJRhZoxjxwkSZPEhuHJEJ3skaN4sQgXBVwRCix4tmo3l0wVBUFjNmgKC17ARKI4IgoaBYGlgsEAdlYELCVMoaGkwu20KGzYwKMcwY8aD51syZCjCO2EQLzt2KFHCgcOaBeAXnP84kbe6wQ1E0t+4EQOKgfcGinTokIXgiTBZevSAwN9IhP801FDDAead5oAVPcDnhQ4PMTEFfxC4oUUBBZ5mAUYZbdSRRy3IYJAMJZGAkkorSVGBCRX+lJMAO/XkwAAEHWFCRRhpxJFHUBF0wQQjKrBSSy9ROFABLBR1VFJOUCFUWxZUZdVNKwoAY4oDXYCUUh841ZRXX0lUQRhpxcAglagxwIcLZ4igJhpYEGRBAn3FGQBlZGZ1hgdD5KnBnnz2WeefM4UR2aCEJoDDoecAihUasYXg6KOONnEFQR6MBsSlQCARgqJtbXDHHX4sIeoSq7kQEQdsiIFccss595wcfzr/sEB3HIQn3gko5LppWyg09xx00mWgTQUEiZAeEezFAN8TELxhUBLQ7NcfgAKKQFABceCBXXbcdbdAEw39WQiy7Lm37HwdlCeQEPiloR+E/gEIA6czUWTjhjkUYAFCR7RwUko+rpQjvRBZVKOGHYHU4bUlnTTiBj++VJyiAFRlAQAGATCjwRchzKGHQzb8cIkvVTCxQAIwgEULBUwpGABQRrlCGy5iPNAKHGfY0ZIH5UAikDAVtAELRxmVghNLZSkEWzA/GSWLPP0pxZFYatlAGVEszRZVT8bscp0XIK0l1mBdcjLBaDsEgpxnLZG2RAqkqSZccb0wlyUos92XAm8r/2QBXXcFnucQe1Iogt5nIdC3Qyb0edjjExhUAQymPPIEIkwsHpUAIxzgAh8VjKV53x0UarodoytERhOsB+H665ppIZQMkR1qOw6khQZY6gWtFtvvrzkaeQt/5G4pEMTyXpAACIza2vMbHERkCXCIpLxEPgiiAMgzzZCqqsgttxanQ4QXx3i5wqBbWyyAz6pyrkIXxp9acEurreijkAJbubQa/wPBysCYBmKCIIShXG5Aw0Oo0IUv/McLWrhAQbCgrW11yzvhmUJlKvCDB0QnA3YIgegG0oVjrac95+rAAP/hA/y8CwIOpFYNKFCQATTgBBakQPIAVQH1JAs+BniCfP/oY592SQuG8aJBgPZ3vX/oYBcxUBYQ5RMGOhEkCY7IzxG/EC8QNNEgKzBBARhQABXwLCEO8BnAWnDGLw7gIvdKWA4usK+CWOANJukRxFhivSY6AENx5FALVkCQAYhsZCwxEd+ud4Sc6SxhIenjPxggMoDt0UQukaDyBjAjQCLsIyEhCCXz+DOgVUCTgLIATlrkgDnUcSBt6OTB8NWCiRmSR4gsWfQI4oANFM0okatMzHRCs558LYwci2MO2vgPC/gAkZisgLMGkoQiFQ1JS6HC16Jik6ex0gFtPMIf4XgBB9gsIStoQYlGwMaCqMCaVEtaU/jANKfJjCdnK1Dn4sn/FKeUIZhRaZo9VzSzP5HAaFXTUhS8IsmZAKBJXYvSK8nEgoQ2hWxfyVxbHso1p9GrBWMDiw4ugcqXTcUCNTkn2i4wtAoIAUVZ2QoIDjCwLyJEBT4YgRAYoFKCSIBtd7BpQYqBprmpKS5wOKcJCIC4AOzGpkkwat3oUpdpZqCpAUgAM1OHBrkALnB4GsI/CoBVs+zwemANK+H6pAEKgampDxAqKNjaJzUYxlrNNADiHpBP3h3gcYA1lY5oEKcwtEmoBGGCBujA2MamgJCIjaxkERKHDmTgEHGYrEEOQIYSiOADDR3II0w3KBtM1gVB2IxqJTChgYiAtKaTgFBbAKlH/7GuCa9jIgEKdTsc5EE0QmqiFYAXvNpK8Ha/NV5ohIqA1hAXNpSZgnJJ4wahHkBUz2MNbDQwkEoZD1OyRawCQOW85+E1sT3AVKbC0ADNTlINnwrVEgBxVvcC6gB2YEOqVoUBL0CWUy64Va5QAIM7aDQw3hMD+JbDnAfsQFFo8BZ4zocrAsOABG0JhvsY/L8u/IkP2rlfePKHAivORAf89d+vohODP4XAgt35zojHs0KZXIDBzPlfsB6MEBNHhAH/LYgItGW/GONvkVhJAfx0HKweCLkV5EKhASIwTYOYAAUQ+k8EAiTYgYSigkXG4AIIFJhG/MqDwSLCUwUygWH4UJrKQeyAGQyCgPzAS8sBMsMuBZKDenhhWyHmgASCXBkmfADDB3GzeqI4xfmcgCBacOERk5jn0P6jBUyYAEw5RQUTlqvRHeABQbxgRAjFcMsCqrHmVnCDKEvxPUKcz7wGQodS35lall7cBAyQLHO9Z4hzLsgSsqBFU2s5AvVVXgM64OsgFqEGiH7WL17YHzOcV7ImyLVCfLBN3gQEACH5BAUKAP8ALAAAAABaAFoAQAj/AP8JHEiwoMGDCBMmtABAocOHECP+A2DBwpEBGAcI2ChgxQoHDgg6MKGigMkCMi5cYMAyRwsTEmMaFMAlgM2bOG8+QAigp8wBDQ9emEBUCAkSCpJuWDpiBEyZBX2E4VIT54+nULMSTCJkRIWvXyesiIiAAAEcaNEmWMv2h9a3MiccmEt3boq7d8cNvEAEiV8kQAIHnqEArmGJAGZFWRxFh2PHHwwW2CGmshgbmGsYOswZooUKZ1yIHp0i5EAeD1KrVr0lg2s7nWMXJANCg+3bGobo9sA75gsOPaAgolBBNtQCKUpYAXGGyVjDcG7EiAHFgHXrT4p02B7BeMIhSyiI/6eAoDyCECGaBAnCwvtBElnS9IBAH4KRCBFo0KjxwwvBSV7ssAMHHKyxwIEnoIACDDDM4p5sGlCDXwSN8BFUQiMQQ+ACU7zwoGwAZIQRRxt9NIdBK5B0EkoqscSAAB8iNEVOOIFAUE8ViUjiRwa1UZJJKa3EgEstPCeQA0QVdVRSEwxgGAY0RglBjCIZlZQCTI0gBVgVwBgRBGytZUAUVBpnwgYspEkFFUwwUBAbZsUp55wtlPkWKB/kqecHDfTpZwNe2iloRBFgYOihhs6gqKI8DJoVIbyVIOmkL1RaqQsEneHaphmAAUYVVzgKVyZ09AHCqaiCYM4REE1BBBE3SP833XXWFTHCoJCYd156QUjgqwQaGEYBrdpt1wEPYdw6EBpZ9DAfffflt0MOBjmwhBIbLhBHggyWQZAJISwR3ni6DmHBoAg8C8EX0epXA38HEORDgDtgy8GBCCYYhKgyhajRjitcWBAADqzI4gWm8RuRRTru2IYDgf6Togo/AtnikDlEPGgLB4DAQgEHUWSBiP+W6MCJA028YkouEqnxPwMkUYAJCR/GQpQ5jeHDjQxnxBGrIctcwMU55ICVQIskKYSVVy51wVtM4Bzl0R+2MIFRSCmV5ZZuauXAFlXhHIajJmjd1JZcvqzw2gppEObba1HAtkQtsAAHFXXVVZhAc87/mRYOCcz9EF14peCEE3vmGVIdgfU9576CK+TAn5T/uYhBI0wBQSlhKFFc5D/5MAIcUkxQM+hrs4IZZoge2oGRqBsEh6UviGD77SKQ4WQBGCy66Gqr7R07QbbpNgRvyHswaQnU5gBGaq1xuikYyg5fkAepgqAGbrbtfFAFLrRpvUQrMECCD1RDxIQBr8Yqa3VK8KvDruv9KsEV1Wclh/vTVUdrdh0wg6BcQC7zoEc9v/pcVvDgv+sAcDs84EFktgKCQNDnC12YoEIqIAEELUEEICNIC/wwLvHoald0cJJhNrCAYnUgC1o43STio64vTGg/ZkgBQXIQIHvh6wTcgoEV/wzChCaMhwJaIIGoFCAfdUUrP+/qz3/o5cN8KQgGTBifQA5Qnye6Sxx1KogDBlEvAt3rQNvClBYHVrIBAE0hMTuJDEygwjUKxF8j2pEDBHZHUlTsYCtJgh1H1jCOrOBhdfyHBUjyxyC5iBFapMhFCtmRj9SsDYyU48UwdjrQiWySeTQkSAiCyUYSzSWdpJIODJCTMGSRZz0LZUcckMhFVsyRGGvB0wgiAKspiQQXSORb7iA1m3gAlqDc0bkGtgpNtuwlvEzS1ZZ0JUksUysQKOZNYDAwQo5ImAcZgAkulgRhIklpWdPaBm4BzohUQJs4UZt3fIm1pm2ta1DxATxtEv84O12gnmY721dCmBUE7DNedgKAEOwpULBMwDAK6EXYchKD9FFJBVvjUgUE2RkqLIAHMeABCoS3NhNYzQcMSGVEZMCEYNnxIQ64wBsYYFGBXAFubFnCS+WVJhbgTW8FEUNacLqWV65xBWvKW13uEkIizCkPf2MLEF7KhLwV7nB6cpLj+gbVQeIFq4njU58EqYmtzgk2dlRAnipHOUsMJAuCiSsQ4oTWl26AcmUoA2OiAIqCFMANfwmsEby304mQoAGPecwI5FnYxu6UBI3IQgy+MAU5OJaXaOLDASogA6EYYHWgxUwsHrpTCxwAd7g7gzOwQobWudZQWnhpAZZHO0v/2e5z2ECU72YAvJcq4njJWx6lVLCC3wFvNa0h7PiOwb3dJI83bsLFcaPHqTi8tAKp4l7xhkAmgZyButLzFB0K6wNTZa82tuGDQSrwA9d4qgo1QKhjC4CGUqFKBKS9LL+YEIZXwUpWKGBsjD6AQPvRgaRaaQH7/isrWnFzUAcwYAjqZz/lymQFUOAfdWhlgCd0YBKCYoIJJVxgX+FTJh+IVf84/MAp2QkTR9TVAXslAfnKpAAr/p8LedAIhPQSKjKQZwPEVUASByG/UGEBi3fMAzcURAdGcCJ+HEGtgzgAAWdcABAXpEGBqIHIRS5PCBT4FgTUasdZsOxAfHCNZkkZj4ooMAgdypjlBC0IBkiWgTHAPOISCPg4FTgAFhDSZmd1ET/uMkMlCPKCHmZLy3Zm0In3ooAWqJRKTHBzfWyI6Cj+4EJToJcZfxhEG6NOABBQl31uGEUEEEQEVHz0tq44adT5QBObviEOH0yQPQjIXnVOkBLteAAarLrTCxi0lREwoEcDo7uOdUCtHxLGDwUEADs=);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: 50% 0;\n\t\t}\n\t}\n\n.source_main_h1 {\n\tmargin: 0;\n    padding: 10px 0 0 0;\n\n    font-size: 36px;\n    font-weight: normal;\n    font-family: 'Museo', Arial;\n\n    /* reset */\n    line-height: 1.5;\n    color: @black;\n    }\n\n.source_header-meta {\n\tfont-size: @fz-size-xs !important;\n\tline-height: 1.2 !important;\n    color: @color-aux;\n\tmargin-bottom: 20px;\n\t}\n\n.source-main-only(h1,{\n    .source_main_h1;\n    });\n\n/* for custom cases */\n\n\n.source_subhead {\n    position: relative;\n    margin: -35px -100% 20px;\n    padding: 0 100% 10px;\n\n    background-color: #f2f2f2;\n\n    font-family: @font-family-main;\n    font-size: @fz-size-m;\n\tcolor: @gray;\n    line-height: 1.5;\n\n    // Clearfix\n    &:before,\n    &:after {\n        content: \" \"; /* 1 */\n        display: table; /* 2 */\n        }\n\n    &:after {\n        clear: both;\n        }\n    }\n\n.source_main_descr > ul,\n.source_main_descr > p,\n.source_main_descr {\n\tmargin-bottom: 20px;\n\tfont-size: @fz-size-m;\n\t}\n\n/* /Layout\n---------------------------------------------------------------------------------- */\n"
  },
  {
    "path": "assets/css/project/modal.less",
    "content": "/* Modalbox\n---------------------------------------------------------------------------------- */\n\n.source_modal_box {\n    background: #fff;\n    }\n\n    .source_modal_title {\n        font-size: 22px;\n        margin: 20px 0 5px 0;\n        }\n\n    .source_modal_close {\n        position: absolute;\n        top: 10px;\n        right: 10px;\n\n        color: #fff;\n        border-radius: 30px;\n        background: #605F61;\n        font-size: 20px !important;\n        display: inline-block;\n        line-height: 0px !important;\n        padding: 9px 3px;\n        cursor: pointer;\n        }\n\n        .source_modal_close:before {\n            content: \"×\";\n            }\n\n/* /Modalbox\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/project/navigation.less",
    "content": "/* Navigation\n---------------------------------------------------------------------------------- */\n\n.source_main_nav {\n    margin-top: 40px;\n\n\t@media @media_min-step-m {\n        position: fixed;\n        z-index: 10;\n\n        top: 170px; //@source_main_nav--top;\n        right: @layout_col-main--padding;\n        bottom: 40px;\n\n        width: @source_main_nav--width;\n\n        margin-top: 0; //reset\n        margin-right: 0; //reset\n\n        transition: top 0.3s;\n\n        .source__scrolled-down & {\n        \ttop: 70px;\n        \t}\n\t\t}\n\n\t@media @media_min-step-l {\n        position: fixed;\n        z-index: 10;\n\n        left: 50%;\n        top: @source_main_nav--top;\n        width: @source_main_nav--width;\n        margin-left: @layout_col-main--max-width / 2 - @source_main_nav--width;\n\n        margin-top: 0; //reset\n        margin-right: 0; //reset\n\t\t}\n\t}\n\n\t.source_main_nav:hover {\n\t\tz-index: 20; /* Higher than any other elements */\n\t\t}\n\n\t.source_main_nav h2 {\n\t\tfont-weight: normal;\n\t\tfont-size: 15px;\n\t\tcolor: @black;\n\t\tmargin: 0 0 5px;\n\t\tline-height: 1.5;\n\t\tfont-family: inherit;\n\t\ttext-rendering: auto;\n\t\t}\n\n\t.source_main_nav.__menuScroll {\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tbottom: 15px;\n\t\t}\n\n\t.source_main_nav_i {\n\t\tmargin: 10px 0;\n\t\tfont-size: @fz-size-xs;\n\t\t}\n\t\t.source_main_nav_i:first-child {\n\t\t\tmargin-top: 0;\n\t\t\t}\n\n\t.source_main_nav_i + .source_main_nav_i {\n\t\tpadding-top: 10px;\n\t\tborder-top: 1px solid #dfe2e4;\n\t\t}\n\n.source_main_nav_ul {\n\tmargin-left: -21px; /* menu padding compensation  */\n\tmargin-right: -21px;\n\t}\n\n.source_main_nav_li {\n\tline-height: 20px;\n\tmargin-bottom: 2px;\n\t}\n\n.source_main_nav_ul2 {\n\tpadding: 0;\n\t}\n\n.source_main_nav_li2 {\n\tcolor: #666;\n\toverflow: hidden;\n\tdisplay: none;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\t}\n\t.source_main_nav_li.__active .source_main_nav_li2 {\n\t\tdisplay: block;\n\t\t}\n\n.source_nav_ul .source_main_nav_a {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n    text-decoration: none;\n\tpadding: 0 21px;\n    color: #4792D2;\n\n    &:hover {\n        color: #1c76c2;\n        text-decoration: underline;\n        }\n\t}\n\t.source_main_nav_li2 .source_main_nav_a {\n\t\tpadding: 0 37px;\n\t\t}\n\t.source_main_nav .source_main_nav_a.__active  { /* for weight */\n\t\tbackground-color: #8AB5D6;\n\t\tcolor: #F9FBFD;\n\t\t}\n\n.source_main_nav_ac_item {\n\tposition: relative;\n\tline-height: 24px;\n\n    &.__simple {\n        text-align: right;\n        }\n\t}\n\n    .source_main_nav_ac_tx {\n        line-height: 24px;\n        }\n\n.source_main_nav_ac_item.__simple {\n\ttext-align: right;\n    white-space: normal;\n\t}\n\n    .source_main_nav_ac_item.__simple .source_main_nav_ac_tx {\n        float: left;\n        }\n\n/* /Navigation\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/project/search.less",
    "content": "/* Search\n---------------------------------------------------------------------------------- */\n\n.source_search {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\theight: 28px;\n\twidth: 100%;\n\n\tborder: 1px solid #444;\n\tborder-radius: 5px;\n\tvertical-align: top;\n\t}\n\n\t.source_search.__light {\n\t\tborder-color: #ccc;\n\t\t}\n\n\t.source_search.__light input.source_search_it { /* Cascade for weight */\n\t\tbackground-color: #FFF;\n\t\t}\n\n.source_container input.source_search_it { /* Cascade for weight */\n\tpadding: 6px 8px;\n\tpadding-left: 28px;\n\theight: 30px;\n\tmargin: -1px 0 0 -1px;\n\twidth: 101%;\n\n\tborder: 0 none;\n\tline-height: 15px;\n\tbackground: #000 url(/source/assets/i/search.png) no-repeat 8px 50%;\n\n\tbox-sizing: border-box;\n\n    color: @gray;\n\n\t/* Resets */\n\tdisplay: block;\n\n\tbox-shadow: none;\n\n\tborder-radius: 0;\n\n\ttransition: none;\n\n\tfont-weight: 400;\n\tfont-family: @font-family-main;\n\tfont-size: @fz-size-m;\n\tline-height: 1.5;\n\n\tvertical-align: middle;\n\t}\n\n.source_container input.source_search_it:focus {\n\tbackground: #fff url(/source/assets/i/search.png) no-repeat 8px 50%;\n\tcolor: @black;\n\t}\n\n/* /Search\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/project/section.less",
    "content": "/* Section\n---------------------------------------------------------------------------------- */\n\n.source_section {\n\tpadding-left: @layout_spec--inner-padding;\n\tcounter-reset: h3;\n\n    @media @media_min-step-m {\n\t\t// Legacy\n\t\tmargin-right: @layout_spec--inner-margin-right;\n\n\t\t// New spec page modifier\n\t\t.source_page.__spec & { margin-right: 0; }\n\t\t}\n\n    & > h2:first-child {\n\t\tmargin-left: -@layout_spec--inner-padding !important;\n\n        &:before {\n\t\t\tcounter-increment: h2 1;\n\t\t\tcontent: counter(h2)\". \";\n\t\t\tcolor: #666;\n\t\t\t}\n\t\t}\n\n    /* Error detection */\n    & > h2:not(:first-child) {\n\t\t.reset();\n\n\t\tbackground-color: rgba(250, 0, 0, .2);\n\t\toutline: 3px solid red;\n\t\toutline-offset: 3px;\n\n\t\t&:after {\n\t\t\tcontent: \" error - duplicate h2 or not first tag in section\";\n\t\t\tfont-weight: normal;\n\t\t\tcolor: @black;\n\t\t\t}\n\t\t}\n\n    & > h3 {\n\t\tposition: relative;\n\t\tmargin: 30px 0 15px -25px;\n\t\tpadding: 0 25px;\n\n\t\tfont-size: 16px;\n\t\tcolor: #000;\n\t\tfont-weight: normal;\n\t\tline-height: 1.5;\n\t\tfont-family: inherit;\n\n\t\tcounter-reset: h4;\n\n        &:after {\n\t\t\tcontent: \"\";\n\t\t\tborder-bottom: 1px dotted #666;\n\t\t\tposition: absolute;\n\t\t\tleft: 0; right: 0; top: 50%;\n\t\t\t}\n\t\t}\n\n    & > h3 > span {\n\t\tposition: relative; z-index: 1;\n\t\tdisplay: inline-block;\n\t\tpadding: 0 5px; background: #fff;\n\n        &:before {\n\t\t\tcolor: @gray;\n\t\t\tcounter-increment: h3 1;\n\t\t\tcontent: counter(h2)\".\"counter(h3)\". \";\n\t\t\t}\n\t\t}\n\n    & > h4 {\n\t\tmargin: 30px 0 10px;\n\t\tpadding: 0;\n\t\tfont-size: @fz-size-m;\n\t\tfont-family: @font-family-main;\n\t\tcolor: @black;\n\t\tfont-weight: normal;\n\t\ttext-indent: .5ex;\n\t\tline-height: 1.5;\n\n        &:before {\n\t\t\tcolor: @gray;\n\t\t\tcounter-increment: h4 1;\n\t\t\tcontent: counter(h2)\".\"counter(h3)\".\"counter(h4)\". \";\n\t\t\t}\n\t\t}\n\n\t& > p {\n\t\tmargin: 15px 0;\n\t\t}\n\n\t& > pre {\n\t\t.reset();\n\t\t}\n\t}\n\n/* Dynamics\n-------------------------------------------------- */\n\n/* Everything closed by default */\n.source_section {\n\tposition: absolute;\n\theight: 0;\n\twidth: 0;\n\ttop: -9999px;\n\toverflow: hidden;\n\n\t&.__loaded {\n\t\tposition: relative;\n\t\theight: auto;\n\t\twidth: auto;\n\t\toverflow: visible;\n\t\ttop: 0;\n\t\tmargin-top: 20px;\n\t\tmargin-bottom: 40px;\n\t}\n\n    & > script,\n    & > style {\n    \tdisplay: none !important;\n    \t}\n\n    body & > * { //body for weihgt\n        display: none;\n        }\n\n    body & > h2:first-child { //body for weihgt\n\t\tdisplay: block;\n\t\t}\n\t}\n\n.source_section__open {\n\n    & > *:not(.source_example) {\n\t\tdisplay: block;\n\t\t}\n\n    & > .source_a_hl {\n\t\tdisplay: inline;\n\t\t}\n\n    .source_example {\n\t\tdisplay: inline-block;\n\t\t}\n\n    .spoiler-cont_css_w,\n\t.spoiler-cont_js_w,\n\t.spoiler-cont_xml_w {\n\t\tdisplay: none !important;\n\t\t}\n\n    .source_section_h_expand:after {\n\t\tcontent: \"▼\";\n\t\t}\n\n    .source_source-code__show, .source_source-code__static, .source_context.__show {\n\t\tdisplay: block !important;\n\t\t}\n\n    .source_context {\n        display: none !important;\n        }\n\t}\n\n/* Header actions */\n\n.source_section > h2:first-child,\n.source_section_h {\n\t.reset();\n\n\tposition: relative;\n\tmargin: 0 0 25px;\n\n\tpadding: 5px @layout_spec--inner-padding;\n\tline-height: 28px;\n\tcolor: @black;\n\n\tborder-radius: 10px;\n\tbackground-color: @light-gray;\n\n\tfont-size: @fz-size-l;\n\tfont-family: @font-family-main;\n\n    &:hover .source_section_h_expand {\n\t\tcolor:#4792D2 !important; //important to override link style\n\t\t}\n\t}\n\n    .source_subsection_h {\n        background-color: #fff !important;\n        padding: 0 5px !important;\n        }\n\n.source_section_h_expand {\n\tposition: absolute;\n\ttop: 0; left: -20px;\n\n\twidth: 20px;\n\theight: 38px;\n\tmargin: 0 10px 0 0;\n\n\tfont-size: 12px !important; //override reset styles\n\ttext-decoration: none;\n\tcolor: @gray !important; //important to override link style\n\n    &:after {\n        content: \"►\";\n\n        position: absolute;\n        top: 0; left: 0;\n        width: 100%;\n\n        text-align: left;\n        line-height: 38px;\n        }\n\t}\n\n/* /Header actions */\n\n/* /Dynamics */\n\n/* /Section\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/project/source-code.less",
    "content": "/* Code highlighting\n---------------------------------------------------------------------------------- */\n\n.source_source-code,\ncode.brush {\n\tdisplay: none !important; /* Hide all code source by default */\n\t}\n\n.source_source-code {\n\tfont-size: @fz-size-m;\n\t}\n\n.source_source-code .source_source-code_toggle .source_show {display: none;} /* Default maximazed */\n.source_source-code__min .source_source-code_toggle .source_hide {display: none;} /* minimized */\n.source_source-code__min .source_source-code_toggle .source_show {display: inline;}\n\n.source_source-code__min .source_source-code_cnt {\n\tdisplay: none;\n\t}\n\n.source_source-code_toggle {\n\tdisplay: inline-block;\n\theight: 14px;\n\tmargin-bottom: 10px;\n\tborder-bottom: #25588D dashed 1px !important;\n\tfont-size: 10px !important;\n\ttext-decoration: none;\n\n\t& span {\n\t\tcolor: inherit !important;\n\t\t}\n\t}\n\t.source_source-code_toggle:hover {\n\t\tborder-bottom: none !important;\n        text-decoration: none !important;\n\t\tpadding-bottom: 1px;\n\t\t}\n\n\t.source_source-code_toggle__css .source_show:after,\n\t.source_source-code_toggle__css .source_hide:after {\n\t\tcontent: \" CSS\";\n\t\t}\n\n\t.source_source-code_toggle__html .source_show:after,\n\t.source_source-code_toggle__html .source_hide:after {\n\t\tcontent: \" HTML\";\n\t\t}\n\n\t.source_source-code_toggle__js .source_show:after,\n\t.source_source-code_toggle__js .source_hide:after {\n\t\tcontent: \" JavaScript\";\n\t\t}\n\n.source_source-code_toggle-all .source_hide {display: none;} /* Default hidden */\n.source_source-code_toggle-all__hide .source_show {display: none;}\n.source_source-code_toggle-all__hide .source_hide {display: inline;}\n\n/* /Code highlighting\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/reset.less",
    "content": "/* Reset\n---------------------------------------------------------------------------------- */\n.reset() {\n    margin: 0;\n    padding: 0;\n    border: 0;\n    border-radius: 0;\n    font-size: 100%;\n    font-family: @font-family-main;\n    font-weight: normal;\n    vertical-align: baseline;\n    background: none;\n    outline: none;\n    text-align: left;\n    text-decoration: none;\n    z-index: 1;\n    line-height: 1;\n    list-style: none;\n    quotes: none;\n    content: none;\n    border-collapse: collapse;\n    border-spacing: 0;\n    box-sizing: border-box;\n    box-shadow: none;\n    color: #333;\n    }\n\n\n\n/* Fonts\n-------------------------------------------------- */\n\n/*\n * Web Fonts from fontspring.com\n *\n * All OpenType features and all extended glyphs have been removed.\n * Fully installable fonts can be purchased at http://www.fontspring.com\n *\n * The fonts included in this stylesheet are subject to the End User License you purchased\n * from Fontspring. The fonts are protected under domestic and international trademark and\n * copyright law. You are prohibited from modifying, reverse engineering, duplicating, or\n * distributing this font software.\n *\n * (c) 2010-2014 Fontspring\n *\n *\n *\n *\n * The fonts included are copyrighted by the vendor listed below.\n *\n * Vendor:      exljbris Font Foundry\n * License URL: http://www.fontspring.com/licenses/exljbris/webfont\n *\n *\n */\n\n@media @media_min-step-m {\n    /* A font by Jos Buivenga (exljbris) -> www.exljbris.com */\n    @font-face {\n        font-family: 'Museo';\n        src: url('/source/assets/fonts/MuseoCyrl_500-webfont.woff2') format('woff2'),\n             url('/source/assets/fonts/MuseoCyrl_500-webfont.woff') format('woff');\n        font-weight: normal;\n        font-style: normal;\n        }\n\n    @font-face {\n        font-family: 'Museo Sans';\n        src: url('/source/assets/fonts/MuseoSansCyrl_500-webfont.woff2') format('woff2'),\n             url('/source/assets/fonts/MuseoSansCyrl_500-webfont.woff') format('woff');\n        font-weight: normal;\n        font-style: normal;\n        }\n\t}\n\n/* /Fonts */\n\n\n\n/* Spec page resets\n-------------------------------------------------- */\n\nhtml,\nbody {\n    margin: 0;\n    padding: 0;\n    min-width: none;\n    max-width: none;\n    }\n\n@{cleaningClasses} {\n    background: none;\n    }\n\n.source-only(a,{\n    color: #4792D2;\n    text-decoration: none;\n    font-size: @fz-size-m;\n    line-height: 1.5;\n\n    &:hover {\n        color: #1c76c2;\n        text-decoration: underline;\n        }\n    });\n\n.source-only(div,{\n    line-height: 1.5;\n    });\n\n.source-only(p,{\n    font-family: @font-family-main;\n    font-size: @fz-size-m;\n    line-height: 1.5;\n    margin: 15px 0;\n    });\n\n.source-only(ul,{\n    margin: 25px 0 25px 22px;\n    });\n\n.source-only(ul ul,{\n    margin-top: 0 !important;\n    });\n\n.source-only(li,{\n    font-size: @fz-size-m;\n    line-height: 1.5;\n    list-style: disc inside;\n    });\n\n.source-only(ol,{\n    margin: 25px 0 25px 22px;\n    });\n\n.source-only(ol li,{\n    font-size: @fz-size-m;\n    line-height: 1.5;\n    list-style: decimal inside !important;\n    });\n\n.source-only(ol ol,{\n    margin-top: 0 !important;\n    });\n\n.source-only(ul ol,{\n    margin-top: 0 !important;\n    });\n\n.source-only(ol ul,{\n    margin-top: 0 !important;\n    });\n\n.source-only(h2,{});\n.source-only(h3,{});\n.source-only(h4,{});\n.source-only(h5,{});\n.source-only(h6,{});\n.source-only(span,{});\n.source-only(label,{});\n.source-only(q,{});\n.source-only(blockquote,{});\n\n.source-only(strong,{\n    font-weight: 700;\n    });\n.source-only(b,{\n    font-weight: 700;\n    });\n\n.source-only(em,{});\n.source-only(i,{});\n.source-only(section,{});\n\n.source-only(table,{\n    margin: 20px 0 30px;\n    border-collapse: collapse;\n    border-spacing: 0;\n    font-size: @fz-size-m;\n    font-family: @font-family-main;\n    line-height: 1.5;\n    });\n\n.source-only(td,{\n    padding: 0;\n    });\n\n.source-only(th,{\n    padding: 6px 13px;\n    border: 1px solid #ddd;\n    font-weight: 700;\n    });\n\n.source-only(td,{\n    padding: 6px 13px;\n    border: 1px solid #ddd;\n    });\n\n.source-only(tr,{\n    padding: 6px 13px;\n    border: 1px solid #ddd;\n    });\n\n.source-only(nav,{});\n.source-only(aside,{});\n\n.source_main > .source_main_nav,\n.source_main > .source_deps,\n.source_main > .source_warn,\n.source_main > .source_info,\n.source_main > .source_doc,\n.source_main > p:not(.source_section),\n.source_main > section:not(.source_section),\n.source_main > div:not(.source_section),\n.source_main > a:not(.source_section) {\n  font-family: @font-family-main;\n  font-size: @fz-size-m;\n  line-height: 1.5;\n}\n\n.source_header a,\n.source_footer a,\n.source_main_nav a,\n.source_main > p > a{\n    .reset();\n    }\n\n/* /Spec page resets */\n\n/* /Reset\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/css/source.css",
    "content": "/*!\n* SourceJS - Living Style Guides Engine and Integrated Maintenance Environment for Front-end Components\n* @copyright 2013-2015 SourceJS.com\n* @license MIT license: http://github.com/sourcejs/source/wiki/MIT-License\n* */\n\n/* Default core styles */\n@import url('/source/assets/css/defaults.css');\n\n/* Users override */\n@import url('/assets/css/defaults.css');"
  },
  {
    "path": "assets/css/variables.less",
    "content": "/* Variables\n---------------------------------------------------------------------------------- */\n@max-width: 1400px;\n\n\n/* Media\n-------------------------------------------------- */\n//Mobile first\n@media_min-step-m: ~'all and (min-width: 990px)';\n@media_min-step-l: ~'all and (min-width: 1400px)';\n/* /Media */\n\n\n/* Layout\n-------------------------------------------------- */\n@border-radius: 10px;\n\n@layout_col-main--padding: 25px;\n@layout_col-main--max-width: @max-width - @layout_col-main--padding * 2;\n\n@layout_spec--inner-padding: 25px;\n@layout_spec--inner-margin-right: 32%;\n/* /Layout */\n\n\n/* Navigation\n-------------------------------------------------- */\n@source_main_nav--width: 280px;\n@source_main_nav--top: 163px;\n/* /Navigation */\n\n\n/* Colors\n-------------------------------------------------- */\n// primary\n@color-primary : #4593D5;\n@blue : @color-primary;\n\n@color-highlight : #7EB6D9;\n@blue__hover: @color-highlight;\n\n// secondary\n@color-secondary : #1b9b19;\n@green: @color-secondary;\n\n// main\n@color-main : #333;\n@black: @color-main;\n\n// aux\n@color-aux : #999;\n@gray: @color-aux;\n\n// aux level2\n@color-aux2 : #696969;\n@dark-gray: @color-aux2;\n\n// utility\n@color-utility: #f1f2f3;\n@light-gray: @color-utility;\n\n/* /Colors */\n\n\n/* Fonts\n-------------------------------------------------- */\n@font-family-main : Arial, Helvetica, sans-serif;\n/* /Fonts */\n\n\n/* Sizes\n-------------------------------------------------- */\n@fz-size-l : 16px;\n@fz-size-m : 15px;\n@fz-size-s : 14px;\n@fz-size-xs : 13px;\n/* /Fonts */\n\n\n/* Extras\n-------------------------------------------------- */\n\n@cleaningClasses: ~'.source_example, .source_clean';\n@notCleaningClasses: ~':not(.source_example):not(.source_clean):not(.dataTables_wrapper):not(.source_status-controls):not(.source_catalog):not(.source_source-code_cnt)'; // TODO: generate automatically\n\n/* /Extras */\n\n/* /Variables\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "assets/fonts/Webfont EULA 1.6.txt",
    "content": "The Fontspring Webfont End User License Agreement\nVersion 1.6.0 - March 13, 2014\n\nBy downloading, installing and/or embedding font software (“Webfont”) offered by Fontspring or its distributors, you (“Licensee”) agree to be bound by the following terms and conditions of this End User Licensing Agreement (“EULA”):\n\n1. Right Granted\nFontspring grants Licensee a perpetual, worldwide, non-exclusive and non-transferrable license to link the Webfont to Websites using the @font-face selector in CSS files.\n\n2. Requirements and Restrictions \nLicensee agrees to abide by the following requirements and restrictions:\na. Licensee must use the Webfont provided by Fontspring under this EULA. Licensee may not  link to the full, CFF OpenType or TrueType font designed for desktop installation.\nb. Licensee must include the entire commented header in the provided CSS file.\nc. The total traffic of the Website(s), measured in pageviews per month, may be no greater than the number of pageviews specified in the Receipt.\nd. Licensee may only install the Webfont on Websites that it owns or controls.\ne. Licensee may embed Webfont in reports generated by the Website(s), provided that Licensee does not sell the reports for profit.\n\n3. Provision to Third Parties\nLicensee may temporarily provide the Webfont to a website developer, agent or independent contractor, who is working on behalf of the Licensee, ONLY IF the developer, agent or independent contractor (1) agrees in writing to use the Font exclusively for Licensee’s work, according to the terms of this EULA, and (2) retains no copies of the Font upon completion of the work.\n\nLicensee may not otherwise distribute the Webfont to third parties or make the Webfont publicly accessible or available except by embedding or linking in accordance with this EULA.\n\n4. Term\nThis EULA grants a perpetual license for the rights set forth in Paragraph 1 unless and until the EULA terminates under Paragraph 8.  Fontspring will not charge additional fees post purchase, annually or otherwise.\n\n5. Other Usage\nLicenses for desktop use, computer applications and games, installable interactive books, software, mobile applications and games, Ebooks and Epubs, product creation websites, website template distribution, website templates, and other uses not allowed by this EULA may be available for an additional fee. Contact Fontspring at support@fontspring.com for more information.\n\n6. Modifications\nLicensee may not modify the Webfont or create derivative works based upon the Webfont without prior written consent from Fontspring or the owning foundry EXCEPT THAT Licensee may generate files necessary for embedding or linking in accordance with this EULA.\n\n7. Copyright\nThe Webfont is protected by copyright law.   The Foundry is the sole, exclusive owner of all intellectual property rights, including rights under copyright and trademark law.  Licensee agrees not to use the Webfont in any manner that infringes the intellectual property rights of the Foundry or violates the terms of this EULA.  Licensee will be held legally responsible, and indemnifies Fontspring, for any infringements on the foundry's rights caused by failure to abide by the terms of this EULA.\n\n8. Termination\nThis EULA is effective until terminated. If Licensee fails to comply with any term of this EULA, Fontspring may terminate the EULA with 30 days notice.  This EULA will terminate automatically 30 days after the issuance of such notice.\n\n9. Disclaimer and Limited Warranty\nFontspring warrants the Product to be free from defects in materials and workmanship under normal use for a period of twenty one (21) days from the date of delivery as shown on Receipt. Fontspring's entire liability, and Licensee’s exclusive remedy, for a defective product shall be, at Fontspring's election, either (1) return of purchase price or (2) replacement of any such product that is returned to Fontspring with a copy of the Receipt. Fontspring shall have no responsibility to replace the product or refund the purchase price if failure results from accident, abuse or misapplication, or if any product is lost or damaged due to theft, fire, or negligence. Any replacement product will be warranted for twenty one (21) days. This warranty gives Licensee specific legal rights. Licensee may have other rights, which vary from state to state.\n\nEXCEPT AS EXPRESSLY PROVIDED ABOVE, THE PRODUCT, IS PROVIDED “AS IS”. FONTSPRING MAKES NO WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n\nThe entire risk as to the quality and performance of the Product rests upon Licensee. Neither Fontspring nor the Foundry warrants that the functions contained in the Product will meet Licensee’s requirements or that the operation of the software will be uninterrupted or error free.\n\nFONTSPRING SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES (INCLUDING DAMAGES FROM LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, AND THE LIKE) ARISING OUT OF THE USE OF OR INABILITY TO USE THE PRODUCT EVEN IF FONTSPRING OR THE FOUNDRY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\nBecause some states do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to Licensee.\n\n10. Governing Law\nThis EULA is governed by the laws of the United States of America and the State of Delaware.\n\n11.  Entire Agreement\nThis EULA, in conjunction with the receipt (“Receipt”) that accompanies each Font licensed from Fontspring or its distributors, constitutes the entire agreement between Fontspring and Licensee.\n\n12.  Modification\nThe Parties may modify or amend this EULA in writing.\n\n13. Waiver. The waiver of one breach or default hereunder shall not constitute the waiver of any subsequent breach or default. \n"
  },
  {
    "path": "assets/js/_require.bundle.js",
    "content": "\"{%= grunt.file.read('assets/js/lib/require.js') %}\"\n\"{%= grunt.file.read('assets/js/lib/jquery-2.1.4.min.js') %}\"\n\"{%= grunt.file.read('assets/js/require-config.js') %}\"\n\n// Extending base js config with npm packages list\nrequirejs.config({\n    // Create shorthands routes to clint-side npm plugins\n    packages: function () {\n        var modulesList = \"{%= npmPluginsEnabled %}\";\n\n        var npmPackages = [];\n        for (var module in modulesList) {\n            npmPackages.push({\n                name: module,\n                location: '/node_modules/' + module + '/assets',\n                main: 'index'\n            })\n        }\n\n        return npmPackages;\n    }()\n});\n"
  },
  {
    "path": "assets/js/clarify.js",
    "content": "/*!\n* SourceJS - Front-end documentation engine\n* @copyright 2013-2015 Sourcejs.com\n* @license MIT license: http://github.com/sourcejs/source/wiki/MIT-License\n* */\n\nrequire([\n    \"jquery\",\n    'text!/api/options',\n    \"sourceModules/utils\",\n    \"sourceLib/lodash\",\n    \"text!sourceTemplates/clarifyPanel.inc.html\"\n    ], function ($, options, u, _, clarifyPanelTpl){\n\n    // If we have data from Clarify output\n    if (window.sourceClarifyData){\n        var _options = JSON.parse(options);\n        var htmlParser = _options.plugins && _options.plugins.htmlParser && _options.plugins.htmlParser.enabled;\n\n        var $panelTemplate = $(_.template(clarifyPanelTpl, {\n            htmlParser: htmlParser,\n            showApiTargetOption: window.sourceClarifyData.showApiTargetOption,\n            specUrl: window.sourceClarifyData.specUrl,\n            tplList: window.sourceClarifyData.tplList,\n            sectionsIDList: window.sourceClarifyData.sectionsIDList || []\n        }));\n\n        var enableCheckboxes = function(param){\n            if (u.getUrlParameter(param)) {\n                $panelTemplate.find('.js-source_clarify_panel_option-checkbox[name=\"'+param+'\"]').attr('checked', true);\n            }\n        };\n\n        // Restoring options from URL\n        var checkboxes = ['nojs','fromApi','apiUpdate'];\n\n        checkboxes.forEach(function(item){\n            enableCheckboxes(item);\n        });\n\n        var template = u.getUrlParameter('tpl') ? u.getUrlParameter('tpl') : 'default';\n        $panelTemplate.find('.js-source_clarify_panel_select-tpl').val(template);\n\n        var sections = u.getUrlParameter('sections') ? u.getUrlParameter('sections').split(',') : undefined;\n        if (sections) {\n            sections.forEach(function(item){\n                $panelTemplate.find('.js-source_clarify_panel_sections > option[data-section=\"' + item + '\"]').attr('selected', true);\n            });\n        }\n\n        // Import template\n        $('.js-source_clarify_panel').replaceWith($panelTemplate);\n\n        // Activating changes\n        $('.js-source_clarify_panel_go').on('click', function(e){\n            e.preventDefault();\n\n            var currentUrl = window.location.href.split('?')[0];\n            var clarifyBaseUrl = currentUrl + '?clarify=true';\n            var constructedParams = '';\n\n            $('.js-source_clarify_panel_option-checkbox').each(function(){\n                var t = $(this);\n\n                if (t.is(':checked')){\n                    constructedParams += '&' + t.attr('name') + '=true'\n                }\n            });\n\n            var selectedTpl = $('.js-source_clarify_panel_select-tpl').val();\n            if (selectedTpl !== 'default'){\n                constructedParams += '&tpl=' + selectedTpl;\n            }\n\n            var selectedSections = [];\n            $('.js-source_clarify_panel_sections > option:selected').each(function(){\n                var t = $(this);\n\n                selectedSections.push(t.attr('data-section'));\n            });\n\n            if (selectedSections.length > 0){\n                constructedParams += '&sections=' + selectedSections.join(',');\n            }\n\n            location.href = clarifyBaseUrl + constructedParams;\n        });\n    } else {\n        console.log('Clarify panel failed to receive expected data from clarify, check your tpl.');\n    }\n});\n"
  },
  {
    "path": "assets/js/enter-the-source.js",
    "content": "/*!\n* SourceJS - Front-end documentation engine\n* @copyright 2013-2015 Sourcejs.com\n* @license MIT license: http://github.com/sourcejs/source/wiki/MIT-License\n* */\n\nrequire([\n    \"jquery\",\n    \"source/load-options\", // TODO: remove when all modules inherit Module()\n    \"sourceModules/browser\",\n    \"sourceModules/moduleLoader\",\n    'sourceModules/auth'\n    ], function ($, options, browser, Loader, Auth) {\n        if (options && options.modulesEnabled && options.modulesEnabled.auth === true) {\n            new Auth({\n                target: $('.js-hook.source_login')\n            });\n        }\n});\n"
  },
  {
    "path": "assets/js/lib/autocomplete.js",
    "content": "\"use strict\";\n(function(module) {\n    if (typeof(define) === \"function\" && define.amd) {\n        define([\"jquery\"], module);\n    } else {\n        module(jquery);\n    }\n})(function($) {\n\n    var Autocomplete = function(target, options) {\n        if (!target) return;\n        this.init(target, options);\n    };\n\n    var keys = { \"ESC\": 27, \"TAB\": 9, \"RETURN\": 13, \"UP\": 38, \"DOWN\": 40, \"CTRL\": 17, \"CMD\": 91 };\n\n    var transliteration = {\n        'ЗГ':'ZGH', 'Зг':'Zgh', 'зг':'zgh',\n        'А':'A', 'а':'a',\n        'Б':'B', 'б':'b',\n        'В':'V', 'в':'v',\n        'Г':'G', 'г':'g',\n        'Д':'D', 'д':'d',\n        'Е':'E', 'е':'e',\n        'Ж':'Zh', 'ж':'zh',\n        'З':'Z', 'з':'z',\n        'И':'I', 'и':'i',\n        'ї':'i',\n        'Й':'I', 'й':'i',\n        'К':'K', 'к':'k',\n        'Л':'L', 'л':'l',\n        'М':'M', 'м':'m',\n        'Н':'N', 'н':'n',\n        'О':'O', 'о':'o',\n        'П':'P', 'п':'p',\n        'Р':'R', 'р':'r',\n        'С':'S', 'с':'s',\n        'Т':'T', 'т':'t',\n        'У':'U', 'у':'u',\n        'Ф':'F', 'ф':'f',\n        'Х':'Kh', 'х':'kh',\n        'Ц':'Ts', 'ц':'ts',\n        'Ч':'Ch', 'ч':'ch',\n        'Ш':'Sh', 'ш':'sh',\n        'Щ':'Shch', 'щ':'shch',\n        'Ы':'Y', 'ы':'y',\n        'Э':'E', 'э':'e',\n        'Ю':'Yu', 'ю':'iu',\n        'Я':'Ya', 'я':'ia',\n        'Ь': '`', 'ь': '`',\n        'Ъ': '`', 'ъ': '`'\n    };\n\n    Autocomplete.prototype = {\n        config : {\n            \"lookup\": [],\n            \"transliteration\": true,\n            \"autoSelectFirst\": true,\n            \"caseSensetive\": false,\n            \"classes\": {\n                \"container\": \"autocomplete-suggestions\",\n                \"selected\": \"autocomplete-selected\",\n                \"suggestion\": \"autocomplete-suggestion\",\n                \"wrapper\": \"autocomplete-wrapper\",\n                \"showAll\": \"autocomplete-show-all autocomplete-suggestion\",\n                \"active\": \"__active\"\n            },\n            \"containerParent\": \"body\",\n            \"containerHeight\": 500, // px\n            \"showAll\": undefined, // e.g. function(data) { <do smth> }\n            \"labels\": {\n                \"showAllButtonText\": \"Show all\"\n            },\n            \"suggestionsLimit\": 0\n        },\n\n        init: function(target, options) {\n            this.$target = $(target);\n            this.visible = false;\n            this.resultsCount = 0;\n            this.cachedSearchResults = this.cachedSearchResults || {};\n\n            $.extend(true, this.config, options);\n\n            this.initContainer();\n            this.initHandlers();\n        },\n\n        /**\n         * @function initContainer. It initializes search results box,\n         * its position and size.\n         */\n        initContainer: function() {\n            var config = this.config;\n            var $target = this.$target;\n            var $container = this.$container = $('<div>').addClass(config.classes.container);\n            var rootElement = $container;\n            var containerHeight = this.config.containerHeight;\n\n\n            if (typeof(config.showAll) === \"function\") {\n                var showAllLabel = this.resultsCount > 0\n                    ? config.labels.showAllButtonText + ' (' + this.resultsCount +')'\n                    : config.labels.showAllButtonText;\n\n                var $showAll = this.$showAll = $(\"<div>\")\n                    .addClass(config.classes.showAll)\n                    .html(\"<a href=\\\"#\\\">\" + showAllLabel + \"</a>\");\n                var $wrapper = $(\"<div>\").addClass(config.classes.wrapper)\n                    .append($container)\n                    .append($showAll);\n                rootElement = $wrapper;\n            }\n\n            this.$root = rootElement.css({\n                \"position\": \"fixed\",\n                \"display\": \"none\",\n                \"z-index\": 9999\n            });\n\n            rootElement.appendTo(config.containerParent);\n\n            var _this = this;\n\n            var relocateContainer = function() {\n                var offset = _this.$target.position();\n                var bottomOffset = 75; // px\n                var headerPadding\n                var wHeight = $(window).height();\n                rootElement.css({\n                    \"top\": (offset.top + _this.$target.outerHeight(true)) + \"px\",\n                    \"left\": offset.left + \"px\"\n                });\n                $container.css(\"max-height\", (wHeight < containerHeight ? wHeight - bottomOffset : containerHeight) + \"px\");\n                var width = $target.outerWidth(true) - 2;\n                rootElement.width(width);\n            };\n            $(window).resize(relocateContainer);\n            relocateContainer();\n        },\n\n        /**\n         * @function initHandlers. It initializes handlers for search items & container events\n         *\n         * N.B.\n         * To implement new handler you need to add it in \"handlers\" object below\n         * To use implemented event handler you can recieve it by getHandler(<handlerName>) method.\n         *\n         * JFYI: Implemented handlers are binded (by jQuery.proxy) to Autocomplete instance,\n         * due to that, \"this\" in handlers body is a pointer to Autocomplete instance.\n         */\n        initHandlers: function() {\n            var _this = this;\n            this.keyMap = []; // this array helps to catch keys combination.\n\n            this.$target.on(window.opera ? \"keypress\" : \"keydown\", this.getHandler(\"onKeyPress\"))\n                .on('keyup', this.getHandler(\"onKeyUp\"))\n                .on('input', this.getHandler(\"onValueChanged\"));\n\n            this.$target.on(\"blur\", function(e) {\n                $(document).one(\"click\", function(e) {\n                    if (!$(e.target).is(_this.$target) && !$.contains(_this.$container.get(0), e.target)) {\n                            if ($(e.target).is(_this.$showAll) || $.contains(_this.$showAll.get(0), e.target)) {\n                                _this.visible = false;\n                                _this.$root.hide();\n                                _this.flushSelection();\n                            } else {\n                                _this.flush();\n                            }\n                    }\n                });\n            });\n            var containerSelector = \".\" + this.config.classes.container;\n            var itemSelector = \".\" + this.config.classes.suggestion;\n            var callback = this.config.onSelect;\n\n            this.$container.on(\"mouseenter\", itemSelector, function() {\n                _this.select($(this).data(\"index\"));\n            });\n            this.$container.on(\"mouseleave\", itemSelector, function() {\n                _this.selectedIndex = -1;\n                _this.select();\n            });\n\n            if (this.$showAll) {\n                this.$showAll.on('click', this.getHandler(\"onShowAllClick\"));\n            }\n        },\n\n        getHandler: function(name) {\n            return $.proxy(handlers[name], this);\n        },\n\n        createResultRow: function(index, item) {\n            return $(\"<div>\")\n                .addClass(this.config.classes.suggestion)\n                .data(\"index\", index)\n                .html('<a href=\"' + item.data + '\">' + item.value + '</a>').get(0);\n        },\n\n        wrapItems: function(data) {\n            var result = document.createDocumentFragment();\n            var _this = this;\n            var limit = this.config.suggestionsLimit;\n            var max = limit > 0 && limit < data.length ? limit : data.length;\n            for (var i = 0; i < max; i++) {\n                result.appendChild(_this.createResultRow(i, data[i]));\n            }\n            return result;\n        },\n\n        getSearchQuery: function() {\n            var inputText = this.$target.val();\n            if (!inputText || !inputText.length) {\n                return;\n            }\n            var isTranslitEnabled = this.config.transliteration;\n            var transliterated = inputText;\n            // TODO: make sure that we realy need it\n            inputText = inputText.replace(/[\\{\\}\\[\\]\\(\\)\\\\\\.\\*\\?\\+]{1}/g, \"\");\n            inputText = this.config.caseSensetive ? inputText : inputText.toLowerCase();\n            var cyrillic = /[\\u0400-\\u04FF]/gi;\n            if (isTranslitEnabled) {\n                if (transliterated.search(cyrillic) >= 0) {\n                    transliterated = transliterated.replace(cyrillic, function(ch) {\n                        return transliteration[ch];\n                    });\n                } else {\n                    $.each(transliteration, function(cyr, lat) {\n                        transliterated = transliterated.replace(new RegExp(lat,[\"g\"]), cyr);\n                    });\n                }\n            }\n            return isTranslitEnabled ? transliterated + \"|\" + inputText : inputText;\n        },\n\n        getSearchResults: function(searchQuery) {\n            var data = [];\n            var caseSensetive = this.config.caseSensetive;\n            var replacementExpr = \"<strong>$1</strong>\";\n\n            $.map(this.config.lookup, function(item) {\n                var pattern = caseSensetive ? item.value : item.value.toLowerCase();\n                var substrStartPos = pattern.search(new RegExp(searchQuery));\n                if (substrStartPos < 0) return true;\n                data.push({\n                    \"value\": item.value.replace(new RegExp(\"(\" + searchQuery + \")\",'gi'), replacementExpr),\n                    \"data\": item.data\n                });\n            });\n\n            if (data.length && searchQuery) {\n                this.cachedSearchResults[searchQuery] = data;\n            }\n\n            return data;\n        },\n\n        formatSearchResult: function() {\n            var searchQuery = this.getSearchQuery();\n            if (!searchQuery || !searchQuery.length) {\n                this.flush();\n            } else {\n                var cachedResult = this.cachedSearchResults[searchQuery];\n                var searchResult = cachedResult && cachedResult.length\n                    ? cachedResult\n                    : this.getSearchResults(searchQuery);\n                this.resultsCount = searchResult.length;\n                this.refreshItemsCount();\n                return searchResult;\n            }\n        },\n\n        flush: function() {\n            this.visible = false;\n            this.$target.val(\"\");\n            this.$container.empty()\n            this.$root.hide();\n            this.flushSelection();\n        },\n\n        refreshItemsCount: function() {\n            var showAllLabel = this.resultsCount > 0\n                ? this.config.labels.showAllButtonText + ' (' + this.resultsCount +')'\n                : this.config.labels.showAllButtonText;\n\n            this.$showAll.find('a').html(showAllLabel);\n        },\n\n        /**\n         * selection handlers for search results\n         */\n        selectNext: function() {\n            var $container = this.$container;\n            var itemsLength = $container.children().length;\n            if ((this.selectedIndex < 0) || (this.selectedIndex + 1 >= itemsLength)) {\n                this.$showAll.addClass(this.config.classes.active);\n                var selectedClass = this.config.classes.selected;\n                $container.children(\".\" + selectedClass).removeClass(selectedClass);\n                return;\n            }\n            this.selectedIndex += 1;\n\n            var newItem = $(this.$container.children().get(this.selectedIndex));\n            var outerHeight = newItem.outerHeight();\n            var viewPortBottom = $container.scrollTop() + $container.height();\n            var itemBottom = (1 + this.selectedIndex) * outerHeight;\n\n            if (viewPortBottom <= itemBottom) {\n                $container.scrollTop($container.scrollTop() + outerHeight);\n            }\n\n            this.select();\n        },\n\n        selectPrev: function() {\n            var $container = this.$container;\n            var itemsLength = $container.children().length;\n            if (!this.$showAll.hasClass(this.config.classes.active)) {\n                this.selectedIndex  = this.selectedIndex < 0\n                    ? 0\n                    : this.selectedIndex === 0 ? 0 : this.selectedIndex - 1;\n            }\n            var newItem = $(this.$container.children().get(this.selectedIndex));\n            var viewPortTop = $container.scrollTop();\n            var outerHeight = newItem.outerHeight();\n\n            var itemTop = (this.selectedIndex) * outerHeight;\n            if (viewPortTop >= itemTop) {\n                $container.scrollTop($container.scrollTop() - outerHeight);\n            }\n            this.select();\n        },\n\n        select: function(index) {\n            this.$showAll.removeClass(this.config.classes.active);\n            var selectionIndex = this.selectedIndex = index >= 0 ? index : this.selectedIndex;\n            var $container = this.$container;\n            var selectedClass = this.config.classes.selected;\n\n            if (selectionIndex < 0) {\n                $container.children(\".\" + selectedClass).removeClass(selectedClass);\n                return;\n            }\n\n            var items = this.$container.children();\n            if (!items || !items.length) return;\n            setTimeout(function() {\n                $container.children(\".\" + selectedClass).removeClass(selectedClass);\n                $(items.get(selectionIndex)).addClass(selectedClass);\n            }, 1);\n        },\n\n        flushSelection: function() {\n            this.selectedIndex = this.config.autoSelectFirst ? 0 : -1;\n            this.select();\n        },\n\n        openSelected: function(inNewTab) {\n            var selectedItem = this.$container.children().get(this.selectedIndex);\n            if (!selectedItem) return;\n\n            var link = $(selectedItem).find(\"a\").attr(\"href\");\n            if (!link) return;\n\n            // we should check if origin exists (in case of IE)\n            var winLocation = window.location;\n            var isOriginExists = winLocation && winLocation.origin;\n            var url = isOriginExists\n                ? winLocation.origin + link\n                : winLocation.protocol + \"//\" + winLocation.hostname + (winLocation.port ? \":\" + winLocation.port : \"\") + link;\n\n            window.open(url, inNewTab ? \"_blank\" : \"_self\");\n            window.focus();\n        }\n    };\n\n    // We use setTimeout here to prevent huge number of handlers calls\n    var searchQueryTimeout;\n    Autocomplete.prototype.getSearchData = function() {\n        if (!searchQueryTimeout) {\n            var _this = this;\n            searchQueryTimeout = setTimeout(function() {\n                var dataSubset = _this.formatSearchResult();\n                if (dataSubset && dataSubset.length) {\n                    _this.$container.html(_this.wrapItems(dataSubset));\n                    _this.$root.show();\n                    _this.visible = true;\n                } else {\n                    _this.visible = false;\n                    _this.$container.empty();\n                    _this.$root.hide();\n                }\n                searchQueryTimeout = 0;\n                _this.flushSelection();\n            }, 50);\n        }\n    };\n\n    // this for handlers is Autocomplete object instance\n    var handlers = {\n        \"onKeyPress\": function(e) {\n            e = e || event; //to make a deal with old IE\n            this.keyMap.push(e.keyCode);\n            switch(e.keyCode) {\n                case (keys.ESC) :\n                    this.flush();\n                    break;\n                case (keys.UP):\n                    this.selectPrev();\n                    break;\n                case (keys.DOWN):\n                    this.selectNext();\n                    break;\n                case (keys.TAB):\n                    this.selectNext();\n                    break;\n                case (keys.RETURN):\n                    break;\n                default:\n                    return;\n            }\n        },\n        \"onKeyUp\": function(e) {\n            e = e || event; // to make a deal with IE\n            if (~$.inArray(keys.RETURN, this.keyMap)) {\n                if (this.$showAll.hasClass(this.config.classes.active)) {\n                    this.$showAll.trigger(\"click\");\n                    this.visible = false;\n                    this.$root.hide();\n                    this.flushSelection();\n                    this.keyMap = [];\n                    return;\n                }\n                var isModifierPressed = ~$.inArray(keys.CTRL, this.keyMap) || ~$.inArray(keys.CMD, this.keyMap);\n                this.openSelected(isModifierPressed);\n            }\n            this.keyMap = [];\n        },\n        \"onValueChanged\": function(e) {\n            this.getSearchData();\n        },\n        \"onShowAllClick\": function(e) {\n            var callback = this.config.showAll;\n            if (typeof(callback) !== \"function\") return false;\n            callback.call(this, this.formatSearchResult());\n        }\n    };\n\n    $.fn.autocomplete = function(options, args) {\n        return this.each(function () {\n            var searchInstance = new Autocomplete(this, options);\n        });\n    };\n});"
  },
  {
    "path": "assets/js/lib/codeFormat.js",
    "content": "/*\n *\n * HTML Code Formatter\n *\n * @author Dennis Przendzinski\n *\n * */\n\n\ndefine([\n    \"jquery\"\n], function($) {\n\n    return function($el, options) {\n\n        var selfClosing = [\"area\", \"base\", \"br\", \"col\", \"command\", \"embed\", \"hr\", \"img\", \"input\", \"keygen\", \"link\", \"meta\", \"param\", \"source\", \"track\", \"wbr\"]; // list of self-closing tags\n\n        return $el.each(function() {\n\n            var settings = $.extend({\n                    escape:true // escape HTML symbols (<,>,&)\n                    ,log:false // console log source code\n                }, options)\n                , tabs = 0\n                , code = $(this).html()\n                ;\n\n            var indentCode = function (line) {\n                var _tabs = tabs < 0 ? 0 : tabs;\n\n                return new Array(_tabs + 1).join(' ') + line;\n            };\n\n            if (code.length > 0) {\n                code = code.trim()\n                    .replace(/[\\n\\t\\r]/g, '') // strip all tabs, carriage returns and new lines\n                    .replace(/\\s{2,}/g, ' ') // strip extra (2+) white spaces\n                    .replace(/< /g, \"<\") // remove spaces after \"<\"\n                    .replace(new RegExp('<(\\\\b(' + selfClosing.join(\"|\") + ')\\\\b[^>]*?)>', \"g\"), '<$1/>') // create regex from inline array or self-closing tags and close them if required\n                    .replace(/<(?!\\/)/g, \"\\n<\") // start each tag from new line\n                    .match(/<(?!\\/)[^>].+?\\/>|<!--.*?-->|<(?!\\/)[^>]+?>.*?<\\/[^>]+?>.*?(?=<)|<(?!\\/)[^>]+?>*?<\\/[^>]+?>|<(?!\\/)[^>]+?>.+?<\\/[^>]+?>|<(?!\\/)[^>]+>.*|<(?=\\/)[^>].+?>|[^<\\r\\n]+/g) // combine into array\n                ;\n\n                for (var i=0; i< code.length; i++) {\n                    if (code[i].match(/<(?!\\/)/) && !(code[i].match(/<(?=\\/)/)) && !(code[i].match(/<!-.*?-->/))) { // if the string contains opening tag and doesn't contain closing tag...\n                        var tag = code[i].match(/<([^ \\/>]+)/)[1]; // ...strip the tag (<img class=\"foo\"> -> img) to check against the array of self-closing tags and increase indentation\n                        code[i] = indentCode(code[i]);\n                        if (selfClosing.indexOf(tag) === -1) {\n                            tabs +=2;\n                        }\n                    }\n                    else if (!(code[i].match(/<(?!\\/)/)) && code[i].match(/<(?=\\/)/)) { // if the string contains closing tag and doesn't contain opening tag, decrease indentation\n                        tabs -=2;\n                        code[i] = indentCode(code[i]);\n                    }\n                    else { // otherwise just keep current indentation\n                        code[i] = indentCode(code[i]);\n                    }\n\n                    if (settings.escape) { code[i] = code[i].replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g,\"&gt;\"); }\n                    if (settings.log) { console.log(code[i]); }\n                }\n                $(this).html(code.join('\\n'));\n            }\n        });\n    }\n\n});"
  },
  {
    "path": "assets/js/lib/html5shiv.js",
    "content": "/*! HTML5 Shiv vpre3.6 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */\n(function(g,i){var l=g.html5||{};var c=/^<|^(?:button|form|map|select|textarea|object|iframe|option|optgroup)$/i;var j=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i;var b;var d;(function(){var m=i.createElement(\"a\");m.innerHTML=\"<xyz></xyz>\";b=(\"hidden\" in m);if(b&&typeof injectElementWithStyles==\"function\"){injectElementWithStyles(\"#modernizr{}\",function(n){n.hidden=true;b=(g.getComputedStyle?getComputedStyle(n,null):n.currentStyle).display==\"none\"})}d=m.childNodes.length==1||(function(){try{(i.createElement)(\"a\")}catch(n){return true}var o=i.createDocumentFragment();return(typeof o.cloneNode==\"undefined\"||typeof o.createDocumentFragment==\"undefined\"||typeof o.createElement==\"undefined\")}())}());function k(m,o){var q=m.createElement(\"p\"),n=m.getElementsByTagName(\"head\")[0]||m.documentElement;q.innerHTML=\"x<style>\"+o+\"</style>\";return n.insertBefore(q.lastChild,n.firstChild)}function f(){var m=e.elements;return typeof m==\"string\"?m.split(\" \"):m}function h(n){var m={},q=n.createElement,o=n.createDocumentFragment,p=o();n.createElement=function(s){if(!e.shivMethods){return q(s)}var r;if(m[s]){r=m[s].cloneNode()}else{if(j.test(s)){r=(m[s]=q(s)).cloneNode()}else{r=q(s)}}return r.canHaveChildren&&!c.test(s)?p.appendChild(r):r};n.createDocumentFragment=Function(\"h,f\",\"return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(\"+f().join().replace(/\\w+/g,function(r){q(r);p.createElement(r);return'c(\"'+r+'\")'})+\");return n}\")(e,p)}function a(n){var m;if(n.documentShived){return n}if(e.shivCSS&&!b){m=!!k(n,\"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}\")}if(!d){m=!h(n)}if(m){n.documentShived=m}return n}var e={elements:l.elements||\"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video\",shivCSS:!(l.shivCSS===false),shivMethods:!(l.shivMethods===false),type:\"default\",shivDocument:a};g.html5=e;a(i)}(this,document));"
  },
  {
    "path": "assets/js/lib/jquery.autocomplete.js",
    "content": "/**\n*  Ajax Autocomplete for jQuery, version 1.2.4\n*  (c) 2013 Tomas Kirda\n*\n*  Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.\n*  For details, see the web site: http://www.devbridge.com/projects/autocomplete/jquery/\n*\n*/\n\n/*jslint  browser: true, white: true, plusplus: true */\n/*global define, window, document, jQuery */\n\n// Expose plugin as an AMD module if AMD loader is present:\n(function (factory) {\n    'use strict';\n    if (typeof define === 'function' && define.amd) {\n        // AMD. Register as an anonymous module.\n        define(['jquery'], factory);\n    } else {\n        // Browser globals\n        factory(jQuery);\n    }\n}(function ($) {\n    'use strict';\n\n    var\n        utils = (function () {\n            return {\n\n                extend: function (target, source) {\n                    return $.extend(target, source);\n                },\n\n                addEvent: function (element, eventType, handler) {\n                    if (element.addEventListener) {\n                        element.addEventListener(eventType, handler, false);\n                    } else if (element.attachEvent) {\n                        element.attachEvent('on' + eventType, handler);\n                    } else {\n                        throw new Error('Browser doesn\\'t support addEventListener or attachEvent');\n                    }\n                },\n\n                removeEvent: function (element, eventType, handler) {\n                    if (element.removeEventListener) {\n                        element.removeEventListener(eventType, handler, false);\n                    } else if (element.detachEvent) {\n                        element.detachEvent('on' + eventType, handler);\n                    }\n                },\n\n                createNode: function (html) {\n                    var div = document.createElement('div');\n                    div.innerHTML = html;\n                    return div.firstChild;\n                }\n\n            };\n        }()),\n\n        keys = {\n            ESC: 27,\n            TAB: 9,\n            RETURN: 13,\n            UP: 38,\n            DOWN: 40\n        };\n\n    function Autocomplete(el, options) {\n        var noop = function () { },\n            that = this,\n            defaults = {\n                autoSelectFirst: false,\n                appendTo: 'body',\n                serviceUrl: null,\n                lookup: null,\n                onSelect: null,\n                width: 'auto',\n                minChars: 1,\n                maxHeight: 300,\n                deferRequestBy: 0,\n                params: {},\n                formatResult: Autocomplete.formatResult,\n                delimiter: null,\n                zIndex: 9999,\n                type: 'GET',\n                noCache: false,\n                onSearchStart: noop,\n                onSearchComplete: noop,\n                containerClass: 'autocomplete-suggestions',\n                tabDisabled: false,\n                dataType: 'text',\n                lookupFilter: function (suggestion, originalQuery, queryLowerCase) {\n                    return suggestion.value.toLowerCase().indexOf(queryLowerCase) !== -1;\n                },\n                paramName: 'query',\n                transformResult: function (response, originalQuery) {\n                    var result = typeof response === 'string' ? $.parseJSON(response) : response;\n                    result.query = originalQuery;\n                    return result;\n                }\n            };\n\n        // Shared variables:\n        that.element = el;\n        that.el = $(el);\n        that.suggestions = [];\n        that.badQueries = [];\n        that.selectedIndex = -1;\n        that.currentValue = that.element.value;\n        that.intervalId = 0;\n        that.cachedResponse = [];\n        that.onChangeInterval = null;\n        that.onChange = null;\n        that.ignoreValueChange = false;\n        that.isLocal = false;\n        that.suggestionsContainer = null;\n        that.options = $.extend({}, defaults, options);\n        that.classes = {\n            selected: 'autocomplete-selected',\n            suggestion: 'autocomplete-suggestion'\n        };\n\n        // Initialize and set options:\n        that.initialize();\n        that.setOptions(options);\n    }\n\n    Autocomplete.utils = utils;\n\n    $.Autocomplete = Autocomplete;\n\n    Autocomplete.formatResult = function (suggestion, currentValue) {\n        var reEscape = new RegExp('(\\\\' + ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\\\'].join('|\\\\') + ')', 'g'),\n            pattern = '(' + currentValue.replace(reEscape, '\\\\$1') + ')';\n\n        return suggestion.value.replace(new RegExp(pattern, 'gi'), '<strong>$1<\\/strong>');\n    };\n\n    Autocomplete.prototype = {\n\n        killerFn: null,\n\n        initialize: function () {\n            var that = this,\n                suggestionSelector = '.' + that.classes.suggestion,\n                selected = that.classes.selected,\n                options = that.options,\n                container;\n\n            // Remove autocomplete attribute to prevent native suggestions:\n            that.element.setAttribute('autocomplete', 'off');\n\n            that.killerFn = function (e) {\n                if ($(e.target).closest('.' + that.options.containerClass).length === 0) {\n                    that.killSuggestions();\n                    that.disableKillerFn();\n                }\n            };\n\n            // Determine suggestions width:\n            if (!options.width || options.width === 'auto') {\n                options.width = that.el.outerWidth(true) - 2;\n            }\n\n            that.suggestionsContainer = Autocomplete.utils.createNode('<div class=\"' + options.containerClass + '\" style=\"position: absolute; display: none;\"></div>');\n\n            container = $(that.suggestionsContainer);\n\n            container.appendTo(options.appendTo).width(options.width);\n\n            // Listen for mouse over event on suggestions list:\n            container.on('mouseover', suggestionSelector, function () {\n                that.activate($(this).data('index'));\n            });\n\n            // Deselect active element when mouse leaves suggestions container:\n            container.on('mouseout', function () {\n                that.selectedIndex = -1;\n                container.children('.' + selected).removeClass(selected);\n            });\n\n            // Listen for click event on suggestions list:\n            container.on('click', suggestionSelector, function () {\n                that.select($(this).data('index'), false);\n            });\n\n            that.fixPosition();\n\n            // Opera does not like keydown:\n            if (window.opera) {\n                that.el.on('keypress', function (e) { that.onKeyPress(e); });\n            } else {\n                that.el.on('keydown', function (e) { that.onKeyPress(e); });\n            }\n\n            that.el.on('keyup', function (e) { that.onKeyUp(e); });\n            that.el.on('blur', function () { that.onBlur(); });\n            that.el.on('focus', function () { that.fixPosition(); });\n\n            $(window).resize(function(){\n                that.fixPosition();\n                $(that.suggestionsContainer).css({\n                    'width': that.el.outerWidth(true) - 2 + 'px'\n                });\n            });\n\n        },\n\n        onBlur: function () {\n            this.enableKillerFn();\n        },\n\n        setOptions: function (suppliedOptions) {\n            var that = this,\n                options = that.options;\n\n            utils.extend(options, suppliedOptions);\n\n            that.isLocal = $.isArray(options.lookup);\n\n            if (that.isLocal) {\n                options.lookup = that.verifySuggestionsFormat(options.lookup);\n            }\n\n            // Adjust height, width and z-index:\n            $(that.suggestionsContainer).css({\n                'max-height': options.maxHeight + 'px',\n                'width': options.width + 'px',\n                'z-index': options.zIndex\n            });\n\n        },\n\n        clearCache: function () {\n            this.cachedResponse = [];\n            this.badQueries = [];\n        },\n\n        disable: function () {\n            this.disabled = true;\n        },\n\n        enable: function () {\n            this.disabled = false;\n        },\n\n        fixPosition: function () {\n            var that = this,\n                offset;\n\n            // Don't adjsut position if custom container has been specified:\n            if (that.options.appendTo !== 'body') {\n                return;\n            }\n\n            offset = that.el.offset();\n\n            $(that.suggestionsContainer).css({\n                top: (offset.top + that.el.outerHeight(true)) + 'px',\n                left: offset.left + 'px'\n            });\n        },\n\n        enableKillerFn: function () {\n            var that = this;\n            $(document).on('click', that.killerFn);\n        },\n\n        disableKillerFn: function () {\n            var that = this;\n            $(document).off('click', that.killerFn);\n        },\n\n        killSuggestions: function () {\n            var that = this;\n            that.stopKillSuggestions();\n            that.intervalId = window.setInterval(function () {\n                that.hide();\n                that.stopKillSuggestions();\n            }, 300);\n        },\n\n        stopKillSuggestions: function () {\n            window.clearInterval(this.intervalId);\n        },\n\n        onKeyPress: function (e) {\n            var that = this;\n\n            // If suggestions are hidden and user presses arrow down, display suggestions:\n            if (!that.disabled && !that.visible && e.keyCode === keys.DOWN && that.currentValue) {\n                that.suggest();\n                return;\n            }\n\n            if (that.disabled || !that.visible) {\n                return;\n            }\n\n            switch (e.keyCode) {\n                case keys.ESC:\n                    that.el.val(that.currentValue);\n                    that.hide();\n                    break;\n                case keys.TAB:\n                case keys.RETURN:\n                    if (that.selectedIndex === -1) {\n                        that.hide();\n                        return;\n                    }\n                    that.select(that.selectedIndex, e.keyCode === keys.RETURN);\n                    if (e.keyCode === keys.TAB && this.options.tabDisabled === false) {\n                        return;\n                    }\n                    break;\n                case keys.UP:\n                    that.moveUp();\n                    break;\n                case keys.DOWN:\n                    that.moveDown();\n                    break;\n                default:\n                    return;\n            }\n\n            // Cancel event if function did not return:\n            e.stopImmediatePropagation();\n            e.preventDefault();\n        },\n\n        onKeyUp: function (e) {\n            var that = this;\n\n            if (that.disabled) {\n                return;\n            }\n\n            switch (e.keyCode) {\n                case keys.UP:\n                case keys.DOWN:\n                    return;\n            }\n\n            clearInterval(that.onChangeInterval);\n\n            if (that.currentValue !== that.el.val()) {\n                if (that.options.deferRequestBy > 0) {\n                    // Defer lookup in case when value changes very quickly:\n                    that.onChangeInterval = setInterval(function () {\n                        that.onValueChange();\n                    }, that.options.deferRequestBy);\n                } else {\n                    that.onValueChange();\n                }\n            }\n        },\n\n        onValueChange: function () {\n            var that = this,\n                q;\n\n            clearInterval(that.onChangeInterval);\n            that.currentValue = that.element.value;\n\n            q = that.getQuery(that.currentValue);\n            that.selectedIndex = -1;\n\n            if (that.ignoreValueChange) {\n                that.ignoreValueChange = false;\n                return;\n            }\n\n            if (q.length < that.options.minChars) {\n                that.hide();\n            } else {\n                that.getSuggestions(q);\n            }\n        },\n\n        getQuery: function (value) {\n            var delimiter = this.options.delimiter,\n                parts;\n\n            if (!delimiter) {\n                return $.trim(value);\n            }\n            parts = value.split(delimiter);\n            return $.trim(parts[parts.length - 1]);\n        },\n\n        getSuggestionsLocal: function (query) {\n            var that = this,\n                queryLowerCase = query.toLowerCase(),\n                filter = that.options.lookupFilter;\n\n            return {\n                suggestions: $.grep(that.options.lookup, function (suggestion) {\n                    return filter(suggestion, query, queryLowerCase);\n                })\n            };\n        },\n\n        getSuggestions: function (q) {\n            var response,\n                that = this,\n                options = that.options;\n\n            response = that.isLocal ? that.getSuggestionsLocal(q) : that.cachedResponse[q];\n\n            if (response && $.isArray(response.suggestions)) {\n                that.suggestions = response.suggestions;\n                that.suggest();\n            } else if (!that.isBadQuery(q)) {\n                options.params[options.paramName] = q;\n                options.onSearchStart.call(that.element, options.params);\n                $.ajax({\n                    url: options.serviceUrl,\n                    data: options.params,\n                    type: options.type,\n                    dataType: options.dataType\n                }).done(function (data) {\n                    that.processResponse(data, q);\n                    options.onSearchComplete.call(that.element, q);\n                });\n            }\n        },\n\n        isBadQuery: function (q) {\n            var badQueries = this.badQueries,\n                i = badQueries.length;\n\n            while (i--) {\n                if (q.indexOf(badQueries[i]) === 0) {\n                    return true;\n                }\n            }\n\n            return false;\n        },\n\n        hide: function () {\n            var that = this;\n            that.visible = false;\n            that.selectedIndex = -1;\n            $(that.suggestionsContainer).hide();\n        },\n\n        suggest: function () {\n            if (this.suggestions.length === 0) {\n                this.hide();\n                return;\n            }\n\n            var that = this,\n                formatResult = that.options.formatResult,\n                value = that.getQuery(that.currentValue),\n                className = that.classes.suggestion,\n                classSelected = that.classes.selected,\n                container = $(that.suggestionsContainer),\n                html = '';\n\n            // Build suggestions inner HTML:\n            $.each(that.suggestions, function (i, suggestion) {\n                html += '<div class=\"' + className + '\" data-index=\"' + i + '\">' + formatResult(suggestion, value) + '</div>';\n            });\n\n            container.html(html).show();\n            that.visible = true;\n\n            // Select first value by default:\n            if (that.options.autoSelectFirst) {\n                that.selectedIndex = 0;\n                container.children().first().addClass(classSelected);\n            }\n        },\n\n        verifySuggestionsFormat: function (suggestions) {\n            // If suggestions is string array, convert them to supported format:\n            if (suggestions.length && typeof suggestions[0] === 'string') {\n                return $.map(suggestions, function (value) {\n                    return { value: value, data: null };\n                });\n            }\n\n            return suggestions;\n        },\n\n        processResponse: function (response, originalQuery) {\n            var that = this,\n                options = that.options,\n                result = that.options.transformResult(response, originalQuery);\n\n            result.suggestions = that.verifySuggestionsFormat(result.suggestions);\n\n            // Cache results if cache is not disabled:\n            if (!options.noCache) {\n                that.cachedResponse[result[options.paramName]] = result;\n                if (result.suggestions.length === 0) {\n                    that.badQueries.push(result[options.paramName]);\n                }\n            }\n\n            // Display suggestions only if returned query matches current value:\n            if (result.query === that.getQuery(that.currentValue)) {\n                that.suggestions = result.suggestions;\n                that.suggest();\n            }\n        },\n\n        activate: function (index) {\n            var that = this,\n                activeItem,\n                selected = that.classes.selected,\n                container = $(that.suggestionsContainer),\n                children = container.children();\n\n            container.children('.' + selected).removeClass(selected);\n\n            that.selectedIndex = index;\n\n            if (that.selectedIndex !== -1 && children.length > that.selectedIndex) {\n                activeItem = children.get(that.selectedIndex);\n                $(activeItem).addClass(selected);\n                return activeItem;\n            }\n\n            return null;\n        },\n\n        select: function (i, shouldIgnoreNextValueChange) {\n            var that = this,\n                selectedValue = that.suggestions[i];\n\n            if (selectedValue) {\n                that.el.val(selectedValue);\n                that.ignoreValueChange = shouldIgnoreNextValueChange;\n                that.hide();\n                that.onSelect(i);\n            }\n        },\n\n        moveUp: function () {\n            var that = this;\n\n            if (that.selectedIndex === -1) {\n                return;\n            }\n\n            if (that.selectedIndex === 0) {\n                $(that.suggestionsContainer).children().first().removeClass(that.classes.selected);\n                that.selectedIndex = -1;\n                that.el.val(that.currentValue);\n                return;\n            }\n\n            that.adjustScroll(that.selectedIndex - 1);\n        },\n\n        moveDown: function () {\n            var that = this;\n\n            if (that.selectedIndex === (that.suggestions.length - 1)) {\n                return;\n            }\n\n            that.adjustScroll(that.selectedIndex + 1);\n        },\n\n        adjustScroll: function (index) {\n            var that = this,\n                activeItem = that.activate(index),\n                offsetTop,\n                upperBound,\n                lowerBound,\n                heightDelta = 25;\n\n            if (!activeItem) {\n                return;\n            }\n\n            offsetTop = activeItem.offsetTop;\n            upperBound = $(that.suggestionsContainer).scrollTop();\n            lowerBound = upperBound + that.options.maxHeight - heightDelta;\n\n            if (offsetTop < upperBound) {\n                $(that.suggestionsContainer).scrollTop(offsetTop);\n            } else if (offsetTop > lowerBound) {\n                $(that.suggestionsContainer).scrollTop(offsetTop - that.options.maxHeight + heightDelta);\n            }\n\n            that.el.val(that.getValue(that.suggestions[index].value));\n        },\n\n        onSelect: function (index) {\n            var that = this,\n                onSelectCallback = that.options.onSelect,\n                suggestion = that.suggestions[index];\n\n            that.el.val(that.getValue(suggestion.value));\n\n            if ($.isFunction(onSelectCallback)) {\n                onSelectCallback.call(that.element, suggestion);\n            }\n        },\n\n        getValue: function (value) {\n            var that = this,\n                delimiter = that.options.delimiter,\n                currentValue,\n                parts;\n\n            if (!delimiter) {\n                return value;\n            }\n\n            currentValue = that.currentValue;\n            parts = currentValue.split(delimiter);\n\n            if (parts.length === 1) {\n                return value;\n            }\n\n            return currentValue.substr(0, currentValue.length - parts[parts.length - 1].length) + value;\n        }\n    };\n\n    // Create chainable jQuery plugin:\n    $.fn.autocomplete = function (options, args) {\n        return this.each(function () {\n            var dataKey = 'autocomplete',\n                inputElement = $(this),\n                instance;\n\n            if (typeof options === 'string') {\n                instance = inputElement.data(dataKey);\n                if (typeof instance[options] === 'function') {\n                    instance[options](args);\n                }\n            } else {\n                instance = new Autocomplete(this, options);\n                inputElement.data(dataKey, instance);\n            }\n        });\n    };\n}));"
  },
  {
    "path": "assets/js/lib/jquery.couch.js",
    "content": "// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License. You may obtain a copy of\n// the License at\n//\n//   http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n// License for the specific language governing permissions and limitations under\n// the License.\n\n/**\n * @namespace\n * $.couch is used to communicate with a CouchDB server, the server methods can\n * be called directly without creating an instance. Typically all methods are\n * passed an <code>options</code> object which defines a success callback which\n * is called with the data returned from the http request to CouchDB, you can\n * find the other settings that can be used in the <code>options</code> object\n * from <a href=\"http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings\">\n * jQuery.ajax settings</a>\n * <pre><code>$.couch.activeTasks({\n *   success: function (data) {\n *     console.log(data);\n *   }\n * });</code></pre>\n * Outputs (for example):\n * <pre><code>[\n *  {\n *   \"pid\" : \"<0.11599.0>\",\n *   \"status\" : \"Copied 0 of 18369 changes (0%)\",\n *   \"task\" : \"recipes\",\n *   \"type\" : \"Database Compaction\"\n *  }\n *]</code></pre>\n */\n(function($) {\n\n  $.couch = $.couch || {};\n  /** @lends $.couch */\n\n  /**\n   * @private\n   */\n  function encodeDocId(docID) {\n    var parts = docID.split(\"/\");\n    if (parts[0] == \"_design\") {\n      parts.shift();\n      return \"_design/\" + encodeURIComponent(parts.join('/'));\n    }\n    return encodeURIComponent(docID);\n  }\n\n  /**\n   * @private\n   */\n\n  var uuidCache = [];\n\n  $.extend($.couch, {\n    urlPrefix: '',\n\n    /**\n     * You can obtain a list of active tasks by using the /_active_tasks URL.\n     * The result is a JSON array of the currently running tasks, with each task\n     * being described with a single object.\n     * @see <a href=\"http://techzone.couchbase.com/sites/default/files/uploads/\n     * all/documentation/couchbase-api-misc.html#couchbase-api-misc_active-task\n     * s_get\">docs for /_active_tasks</a>\n     * @param {ajaxSettings} options <a href=\"http://api.jquery.com/jQuery.ajax\n     * /#jQuery-ajax-settings\">jQuery ajax settings</a>\n     */\n    activeTasks: function(options) {\n      ajax(\n        {url: this.urlPrefix + \"/_active_tasks\"},\n        options,\n        \"Active task status could not be retrieved\"\n      );\n    },\n\n    /**\n     * Returns a list of all the databases in the CouchDB instance\n     * @see <a href=\"http://techzone.couchbase.com/sites/default/files/uploads/\n     * all/documentation/couchbase-api-misc.html#couchbase-api-misc_active-task\n     * s_get\">docs for /_all_dbs</a>\n     * @param {ajaxSettings} options <a href=\"http://api.jquery.com/jQuery.ajax\n     * /#jQuery-ajax-settings\">jQuery ajax settings</a>\n     */\n    allDbs: function(options) {\n      ajax(\n        {url: this.urlPrefix + \"/_all_dbs\"},\n        options,\n        \"An error occurred retrieving the list of all databases\"\n      );\n    },\n\n    /**\n     * View and edit the CouchDB configuration, called with just the options\n     * parameter the entire config is returned, you can be more specific by\n     * passing the section and option parameters, if you specify a value that\n     * value will be stored in the configuration.\n     * @see <a href=\"http://techzone.couchbase.com/sites/default/files/uploads/\n     * all/documentation/couchbase-api-config.html#couchbase-api-config_config\n     * -section-key_put\">docs for /_config</a>\n     * @param {ajaxSettings} options\n     * <a href=\"http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings\">\n     * jQuery ajax settings</a>\n     * @param {String} [section] the section of the config\n     * @param {String} [option] the particular config option\n     * @param {String} [value] value to be set\n     */\n    config: function(options, section, option, value) {\n      var req = {url: this.urlPrefix + \"/_config/\"};\n      if (section) {\n        req.url += encodeURIComponent(section) + \"/\";\n        if (option) {\n          req.url += encodeURIComponent(option);\n        }\n      }\n      if (value === null) {\n        req.type = \"DELETE\";        \n      } else if (value !== undefined) {\n        req.type = \"PUT\";\n        req.data = toJSON(value);\n        req.contentType = \"application/json\";\n        req.processData = false\n      }\n\n      ajax(req, options,\n        \"An error occurred retrieving/updating the server configuration\"\n      );\n    },\n    \n    /**\n     * Returns the session information for the currently logged in user.\n     * @param {ajaxSettings} options\n     * <a href=\"http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings\">\n     * jQuery ajax settings</a>\n     */\n    session: function(options) {\n      options = options || {};\n      ajax({\n        type: \"GET\", url: this.urlPrefix + \"/_session\",\n        beforeSend: function(xhr) {\n            xhr.setRequestHeader('Accept', 'application/json');\n        },\n        complete: function(req) {\n          var resp = $.parseJSON(req.responseText);\n          if (req.status == 200) {\n            if (options.success) options.success(resp);\n          } else if (options.error) {\n            options.error(req.status, resp.error, resp.reason);\n          } else {\n            throw \"An error occurred getting session info: \" + resp.reason;\n          }\n        }\n      });\n    },\n\n    /**\n     * @private\n     */\n    userDb : function(callback) {\n      $.couch.session({\n        success : function(resp) {\n          var userDb = $.couch.db(resp.info.authentication_db);\n          callback(userDb);\n        }\n      });\n    },\n\n    /**\n     * Create a new user on the CouchDB server, <code>user_doc</code> is an\n     * object with a <code>name</code> field and other information you want\n     * to store relating to that user, for example\n     * <code>{\"name\": \"daleharvey\"}</code>\n     * @param {Object} user_doc Users details\n     * @param {String} password Users password\n     * @param {ajaxSettings} options\n     * <a href=\"http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings\">\n      * jQuery ajax settings</a>\n     */\n    signup: function(user_doc, password, options) {      \n      options = options || {};\n      user_doc.password = password;\n      user_doc.roles =  user_doc.roles || [];\n      user_doc.type =  user_doc.type = \"user\" || [];\n      var user_prefix = \"org.couchdb.user:\";\n      user_doc._id = user_doc._id || user_prefix + user_doc.name;\n\n      $.couch.userDb(function(db) {\n        db.saveDoc(user_doc, options);\n      });\n    },\n\n    /**\n     * Authenticate against CouchDB, the <code>options</code> parameter is\n      *expected to have <code>name</code> and <code>password</code> fields.\n     * @param {ajaxSettings} options\n     * <a href=\"http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings\">\n     * jQuery ajax settings</a>\n     */\n    login: function(options) {\n      options = options || {};\n      $.ajax({\n        type: \"POST\", url: this.urlPrefix + \"/_session\", dataType: \"json\",\n        data: {name: options.name, password: options.password},\n        beforeSend: function(xhr) {\n            xhr.setRequestHeader('Accept', 'application/json');\n        },\n        complete: function(req) {\n          var resp = $.parseJSON(req.responseText);\n          if (req.status == 200) {\n            if (options.success) options.success(resp);\n          } else if (options.error) {\n            options.error(req.status, resp.error, resp.reason);\n          } else {\n            throw 'An error occurred logging in: ' + resp.reason;\n          }\n        }\n      });\n    },\n\n\n    /**\n     * Delete your current CouchDB user session\n     * @param {ajaxSettings} options\n     * <a href=\"http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings\">\n     * jQuery ajax settings</a>\n     */\n    logout: function(options) {\n      options = options || {};\n      $.ajax({\n        type: \"DELETE\", url: this.urlPrefix + \"/_session\", dataType: \"json\",\n        username : \"_\", password : \"_\",\n        beforeSend: function(xhr) {\n            xhr.setRequestHeader('Accept', 'application/json');\n        },\n        complete: function(req) {\n          var resp = $.parseJSON(req.responseText);\n          if (req.status == 200) {\n            if (options.success) options.success(resp);\n          } else if (options.error) {\n            options.error(req.status, resp.error, resp.reason);\n          } else {\n            throw 'An error occurred logging out: ' + resp.reason;\n          }\n        }\n      });\n    },\n\n    /**\n     * @namespace\n     * $.couch.db is used to communicate with a specific CouchDB database\n     * <pre><code>var $db = $.couch.db(\"mydatabase\");\n     *$db.allApps({\n     *  success: function (data) {\n     *    ... process data ...\n     *  }\n     *});\n     * </code></pre>\n     */\n    db: function(name, db_opts) {\n      db_opts = db_opts || {};\n      var rawDocs = {};\n      function maybeApplyVersion(doc) {\n        if (doc._id && doc._rev && rawDocs[doc._id] &&\n            rawDocs[doc._id].rev == doc._rev) {\n          // todo: can we use commonjs require here?\n          if (typeof Base64 == \"undefined\") {\n            throw 'Base64 support not found.';\n          } else {\n            doc._attachments = doc._attachments || {};\n            doc._attachments[\"rev-\"+doc._rev.split(\"-\")[0]] = {\n              content_type :\"application/json\",\n              data : Base64.encode(rawDocs[doc._id].raw)\n            };\n            return true;\n          }\n        }\n      };\n      return /** @lends $.couch.db */{\n        name: name,\n        uri: this.urlPrefix + \"/\" + encodeURIComponent(name) + \"/\",\n\n        /**\n         * Request compaction of the specified database.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_\n         * db-compact_post\">docs for /db/_compact</a>\n         * @param {ajaxSettings} options\n         * <a href=\"http://api.jquery.com/jQuery.ajax/#jQuery-ajax-settings\">\n         * jQuery ajax settings</a>\n         */\n        compact: function(options) {\n          $.extend(options, {successStatus: 202});\n          ajax({\n              type: \"POST\", url: this.uri + \"_compact\",\n              data: \"\", processData: false\n            },\n            options,\n            \"The database could not be compacted\"\n          );\n        },\n\n        /**\n         * Cleans up the cached view output on disk for a given view.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db\n         * _db-view-cleanup_post\">docs for /db/_compact</a>\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        viewCleanup: function(options) {\n          $.extend(options, {successStatus: 202});\n          ajax({\n              type: \"POST\", url: this.uri + \"_view_cleanup\",\n              data: \"\", processData: false\n            },\n            options,\n            \"The views could not be cleaned up\"\n          );\n        },\n\n        /**\n         * Compacts the view indexes associated with the specified design\n         * document. You can use this in place of the full database compaction\n         * if you know a specific set of view indexes have been affected by a\n         * recent database change.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/upl\n         * oads/all/documentation/couchbase-api-db.html#couchbase-api-db_db-\n         * compact-design-doc_post\">docs for /db/_compact/design-doc</a>\n         * @param {String} groupname Name of design-doc to compact\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        compactView: function(groupname, options) {\n          $.extend(options, {successStatus: 202});\n          ajax({\n              type: \"POST\", url: this.uri + \"_compact/\" + groupname,\n              data: \"\", processData: false\n            },\n            options,\n            \"The view could not be compacted\"\n          );\n        },\n\n        /**\n         * Create a new database\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_\n         * db_put\">docs for PUT /db/</a>\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        create: function(options) {\n          $.extend(options, {successStatus: 201});\n          ajax({\n              type: \"PUT\", url: this.uri, contentType: \"application/json\",\n              data: \"\", processData: false\n            },\n            options,\n            \"The database could not be created\"\n          );\n        },\n\n        /**\n         * Deletes the specified database, and all the documents and\n         * attachments contained within it.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_\n         * db_delete\">docs for DELETE /db/</a>\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        drop: function(options) {\n          ajax(\n            {type: \"DELETE\", url: this.uri},\n            options,\n            \"The database could not be deleted\"\n          );\n        },\n\n        /**\n         * Gets information about the specified database.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db\n         * _db_get\">docs for GET /db/</a>\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        info: function(options) {\n          ajax(\n            {url: this.uri},\n            options,\n            \"Database information could not be retrieved\"\n          );\n        },\n\n        /**\n         * @namespace\n         * $.couch.db.changes provides an API for subscribing to the changes\n         * feed\n         * <pre><code>var $changes = $.couch.db(\"mydatabase\").changes();\n         *$changes.onChange = function (data) {\n         *    ... process data ...\n         * }\n         * $changes.stop();\n         * </code></pre>\n         */\n        changes: function(since, options) {\n\n          options = options || {};\n          // set up the promise object within a closure for this handler\n          var timeout = 100, db = this, active = true,\n            listeners = [],\n            promise = /** @lends $.couch.db.changes */ {\n              /**\n               * Add a listener callback\n               * @see <a href=\"http://techzone.couchbase.com/sites/default/\n               * files/uploads/all/documentation/couchbase-api-db.html#couch\n               * base-api-db_db-changes_get\">docs for /db/_changes</a>\n               * @param {Function} fun Callback function to run when\n               * notified of changes.\n               */\n            onChange : function(fun) {\n              listeners.push(fun);\n            },\n              /**\n               * Stop subscribing to the changes feed\n               */\n            stop : function() {\n              active = false;\n            }\n          };\n          // call each listener when there is a change\n          function triggerListeners(resp) {\n            $.each(listeners, function() {\n              this(resp);\n            });\n          };\n          // when there is a change, call any listeners, then check for\n          // another change\n          options.success = function(resp) {\n            timeout = 100;\n            if (active) {\n              since = resp.last_seq;\n              triggerListeners(resp);\n              getChangesSince();\n            };\n          };\n          options.error = function() {\n            if (active) {\n              setTimeout(getChangesSince, timeout);\n              timeout = timeout * 2;\n            }\n          };\n          // actually make the changes request\n          function getChangesSince() {\n            var opts = $.extend({heartbeat : 10 * 1000}, options, {\n              feed : \"longpoll\",\n              since : since\n            });\n            ajax(\n              {url: db.uri + \"_changes\"+encodeOptions(opts)},\n              options,\n              \"Error connecting to \"+db.uri+\"/_changes.\"\n            );\n          }\n          // start the first request\n          if (since) {\n            getChangesSince();\n          } else {\n            db.info({\n              success : function(info) {\n                since = info.update_seq;\n                getChangesSince();\n              }\n            });\n          }\n          return promise;\n        },\n\n        /**\n         * Fetch all the docs in this db, you can specify an array of keys to\n         * fetch by passing the <code>keys</code> field in the\n         * <code>options</code>\n         * parameter.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_\n         * db-all-docs_get\">docs for /db/all_docs/</a>\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        allDocs: function(options) {\n          var type = \"GET\";\n          var data = null;\n          if (options[\"keys\"]) {\n            type = \"POST\";\n            var keys = options[\"keys\"];\n            delete options[\"keys\"];\n            data = toJSON({ \"keys\": keys });\n          }\n          ajax({\n              type: type,\n              data: data,\n              url: this.uri + \"_all_docs\" + encodeOptions(options)\n            },\n            options,\n            \"An error occurred retrieving a list of all documents\"\n          );\n        },\n\n        /**\n         * Fetch all the design docs in this db\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        allDesignDocs: function(options) {\n          this.allDocs($.extend(\n            {startkey:\"_design\", endkey:\"_design0\"}, options));\n        },\n\n        /**\n         * Fetch all the design docs with an index.html, <code>options</code>\n         * parameter expects an <code>eachApp</code> field which is a callback\n         * called on each app found.\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        allApps: function(options) {\n          options = options || {};\n          var self = this;\n          if (options.eachApp) {\n            this.allDesignDocs({\n              success: function(resp) {\n                $.each(resp.rows, function() {\n                  self.openDoc(this.id, {\n                    success: function(ddoc) {\n                      var index, appPath, appName = ddoc._id.split('/');\n                      appName.shift();\n                      appName = appName.join('/');\n                      index = ddoc.couchapp && ddoc.couchapp.index;\n                      if (index) {\n                        appPath = ['', name, ddoc._id, index].join('/');\n                      } else if (ddoc._attachments &&\n                                 ddoc._attachments[\"index.html\"]) {\n                        appPath = ['', name, ddoc._id, \"index.html\"].join('/');\n                      }\n                      if (appPath) options.eachApp(appName, appPath, ddoc);\n                    }\n                  });\n                });\n              }\n            });\n          } else {\n            throw 'Please provide an eachApp function for allApps()';\n          }\n        },\n\n        /**\n         * Returns the specified doc from the specified db.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-dbdoc.html#couchbase-api-\n         * dbdoc_db-doc_get\">docs for GET /db/doc</a>\n         * @param {String} docId id of document to fetch\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         * @param {ajaxSettings} ajaxOptions <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        openDoc: function(docId, options, ajaxOptions) {\n          options = options || {};\n          if (db_opts.attachPrevRev || options.attachPrevRev) {\n            $.extend(options, {\n              beforeSuccess : function(req, doc) {\n                rawDocs[doc._id] = {\n                  rev : doc._rev,\n                  raw : req.responseText\n                };\n              }\n            });\n          } else {\n            $.extend(options, {\n              beforeSuccess : function(req, doc) {\n                if (doc[\"jquery.couch.attachPrevRev\"]) {\n                  rawDocs[doc._id] = {\n                    rev : doc._rev,\n                    raw : req.responseText\n                  };\n                }\n              }\n            });\n          }\n          ajax({url: this.uri + encodeDocId(docId) + encodeOptions(options)},\n            options,\n            \"The document could not be retrieved\",\n            ajaxOptions\n          );\n        },\n\n        /**\n         * Create a new document in the specified database, using the supplied\n         * JSON document structure. If the JSON structure includes the _id\n         * field, then the document will be created with the specified document\n         * ID. If the _id field is not specified, a new unique ID will be\n         * generated.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-dbdoc.html#couchbase-api-\n         * dbdoc_db_post\">docs for GET /db/doc</a>\n         * @param {String} doc document to save\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        saveDoc: function(doc, options) {\n          options = options || {};\n          var db = this;\n          var beforeSend = fullCommit(options);\n          if (doc._id === undefined) {\n            var method = \"POST\";\n            var uri = this.uri;\n          } else {\n            var method = \"PUT\";\n            var uri = this.uri + encodeDocId(doc._id);\n          }\n          var versioned = maybeApplyVersion(doc);\n          $.ajax({\n            type: method, url: uri + encodeOptions(options),\n            contentType: \"application/json\",\n            dataType: \"json\", data: toJSON(doc),\n            beforeSend : beforeSend,\n            complete: function(req) {\n              var resp = $.parseJSON(req.responseText);\n              if (req.status == 200 || req.status == 201 || req.status == 202) {\n                doc._id = resp.id;\n                doc._rev = resp.rev;\n                if (versioned) {\n                  db.openDoc(doc._id, {\n                    attachPrevRev : true,\n                    success : function(d) {\n                      doc._attachments = d._attachments;\n                      if (options.success) options.success(resp);\n                    }\n                  });\n                } else {\n                  if (options.success) options.success(resp);\n                }\n              } else if (options.error) {\n                options.error(req.status, resp.error, resp.reason);\n              } else {\n                throw \"The document could not be saved: \" + resp.reason;\n              }\n            }\n          });\n        },\n\n        /**\n         * Save a list of documents\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_\n         * db-bulk-docs_post\">docs for /db/_bulk_docs</a>\n         * @param {Object[]} docs List of documents to save\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        bulkSave: function(docs, options) {\n          var beforeSend = fullCommit(options);\n          $.extend(options, {successStatus: 201, beforeSend : beforeSend});\n          ajax({\n              type: \"POST\",\n              url: this.uri + \"_bulk_docs\" + encodeOptions(options),\n              contentType: \"application/json\", data: toJSON(docs)\n            },\n            options,\n            \"The documents could not be saved\"\n          );\n        },\n\n        /**\n         * Deletes the specified document from the database. You must supply\n         * the current (latest) revision and <code>id</code> of the document\n         * to delete eg <code>removeDoc({_id:\"mydoc\", _rev: \"1-2345\"})</code>\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-dbdoc.html#couchbase-api\n         * -dbdoc_db-doc_delete\">docs for DELETE /db/doc</a>\n         * @param {Object} doc Document to delete\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        removeDoc: function(doc, options) {\n          ajax({\n              type: \"DELETE\",\n              url: this.uri +\n                   encodeDocId(doc._id) +\n                   encodeOptions({rev: doc._rev})\n            },\n            options,\n            \"The document could not be deleted\"\n          );\n        },\n\n        /**\n         * Remove a set of documents\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db_\n         * db-bulk-docs_post\">docs for /db/_bulk_docs</a>\n         * @param {String[]} docs List of document id's to remove\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        bulkRemove: function(docs, options){\n          docs.docs = $.each(\n            docs.docs, function(i, doc){\n              doc._deleted = true;\n            }\n          );\n          $.extend(options, {successStatus: 201});\n          ajax({\n              type: \"POST\",\n              url: this.uri + \"_bulk_docs\" + encodeOptions(options),\n              data: toJSON(docs)\n            },\n            options,\n            \"The documents could not be deleted\"\n          );\n        },\n\n        /**\n         * The COPY command (which is non-standard HTTP) copies an existing\n         * document to a new or existing document.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-dbdoc.html#couchbase-api-\n         * dbdoc_db-doc_copy\">docs for COPY /db/doc</a>\n         * @param {String[]} docId document id to copy\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        copyDoc: function(docId, options, ajaxOptions) {\n          ajaxOptions = $.extend(ajaxOptions, {\n            complete: function(req) {\n              var resp = $.parseJSON(req.responseText);\n              if (req.status == 201) {\n                if (options.success) options.success(resp);\n              } else if (options.error) {\n                options.error(req.status, resp.error, resp.reason);\n              } else {\n                throw \"The document could not be copied: \" + resp.reason;\n              }\n            }\n          });\n          ajax({\n              type: \"COPY\",\n              url: this.uri + encodeDocId(docId)\n            },\n            options,\n            \"The document could not be copied\",\n            ajaxOptions\n          );\n        },\n\n        /**\n         * Creates (and executes) a temporary view based on the view function\n         * supplied in the JSON request.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-db.html#couchbase-api-db\n         * _db-temp-view_post\">docs for /db/_temp_view</a>\n         * @param {Function} mapFun Map function\n         * @param {Function} reduceFun Reduce function\n         * @param {Function} language Language the map / reduce funs are\n         * implemented in\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        query: function(mapFun, reduceFun, language, options) {\n          language = language || \"javascript\";\n          if (typeof(mapFun) !== \"string\") {\n            mapFun = mapFun.toSource ? mapFun.toSource()\n              : \"(\" + mapFun.toString() + \")\";\n          }\n          var body = {language: language, map: mapFun};\n          if (reduceFun != null) {\n            if (typeof(reduceFun) !== \"string\")\n              reduceFun = reduceFun.toSource ? reduceFun.toSource()\n                : \"(\" + reduceFun.toString() + \")\";\n            body.reduce = reduceFun;\n          }\n          ajax({\n              type: \"POST\",\n              url: this.uri + \"_temp_view\" + encodeOptions(options),\n              contentType: \"application/json\", data: toJSON(body)\n            },\n            options,\n            \"An error occurred querying the database\"\n          );\n        },\n\n        /**\n         * Fetch a _list view output, you can specify a list of\n         * <code>keys</code> in the options object to recieve only those keys.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-design.html#couchbase-api\n         * -design_db-design-designdoc-list-listname-viewname_get\">\n         * docs for /db/_design/design-doc/_list/l1/v1</a>\n         * @param {String} list Listname in the form of ddoc/listname\n         * @param {String} view View to run list against\n         * @param {options} CouchDB <a href=\"http://wiki.apache.org/couchdb/\n         * HTTP_view_API\">View Options</a>\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        list: function(list, view, options, ajaxOptions) {\n          var list = list.split('/');\n          var options = options || {};\n          var type = 'GET';\n          var data = null;\n          if (options['keys']) {\n            type = 'POST';\n            var keys = options['keys'];\n            delete options['keys'];\n            data = toJSON({'keys': keys });\n          }\n          ajax({\n              type: type,\n              data: data,\n              url: this.uri + '_design/' + list[0] +\n                   '/_list/' + list[1] + '/' + view + encodeOptions(options)\n              },\n              ajaxOptions, 'An error occured accessing the list'\n          );\n        },\n\n        /**\n         * Executes the specified view-name from the specified design-doc\n         * design document, you can specify a list of <code>keys</code>\n         * in the options object to recieve only those keys.\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api-design.html#couchbase-api-\n         * design_db-design-designdoc-view-viewname_get\">docs for /db/\n         * _design/design-doc/_list/l1/v1</a>\n         * @param {String} name View to run list against (string should have \n         * the design-doc name followed by a slash and the view name)\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        view: function(name, options) {\n          var name = name.split('/');\n          var options = options || {};\n          var type = \"GET\";\n          var data= null;\n          if (options[\"keys\"]) {\n            type = \"POST\";\n            var keys = options[\"keys\"];\n            delete options[\"keys\"];\n            data = toJSON({ \"keys\": keys });\n          }\n          ajax({\n              type: type,\n              data: data,\n              url: this.uri + \"_design/\" + name[0] +\n                   \"/_view/\" + name[1] + encodeOptions(options)\n            },\n            options, \"An error occurred accessing the view\"\n          );\n        },\n\n        /**\n         * Fetch an arbitrary CouchDB database property\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api.html\">docs for /db/_prop</a>\n         * @param {String} propName Propery name to fetch\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         * @param {ajaxSettings} ajaxOptions <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        getDbProperty: function(propName, options, ajaxOptions) {\n          ajax({url: this.uri + propName + encodeOptions(options)},\n            options,\n            \"The property could not be retrieved\",\n            ajaxOptions\n          );\n        },\n\n        /**\n         * Set an arbitrary CouchDB database property\n         * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n         * uploads/all/documentation/couchbase-api.html\">docs for /db/_prop</a>\n         * @param {String} propName Propery name to fetch\n         * @param {String} propValue Propery value to set\n         * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         * @param {ajaxSettings} ajaxOptions <a href=\"http://api.jquery.com/\n         * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n         */\n        setDbProperty: function(propName, propValue, options, ajaxOptions) {\n          ajax({\n            type: \"PUT\", \n            url: this.uri + propName + encodeOptions(options),\n            data : JSON.stringify(propValue)\n          },\n            options,\n            \"The property could not be updated\",\n            ajaxOptions\n          );\n        }\n      };\n    },\n\n    encodeDocId: encodeDocId, \n\n    /**\n     * Accessing the root of a CouchDB instance returns meta information about\n     * the instance. The response is a JSON structure containing information\n     * about the server, including a welcome message and the version of the\n     * server.\n     * @see <a href=\"http://techzone.couchbase.com/sites/default/files/uploads/\n     * all/documentation/couchbase-api-misc.html#couchbase-api-misc_root_get\">\n     * docs for GET /</a>\n     * @param {ajaxSettings} options <a href=\"http://api.jquery.com/\n     * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n     */\n    info: function(options) {\n      ajax(\n        {url: this.urlPrefix + \"/\"},\n        options,\n        \"Server information could not be retrieved\"\n      );\n    },\n\n    /**\n     * Request, configure, or stop, a replication operation.\n     * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n     * uploads/all/documentation/couchbase-api-misc.html#couchbase-api-\n     * misc_replicate_post\">docs for POST /_replicate</a>\n     * @param {String} source Path or url to source database\n     * @param {String} target Path or url to target database\n     * @param {ajaxSettings} ajaxOptions <a href=\"http://api.jquery.com/\n     * jQuery.ajax/#jQuery-ajax-settings\">jQuery ajax settings</a>\n     * @param {Object} repOpts Additional replication options\n     */\n    replicate: function(source, target, ajaxOptions, repOpts) {\n      repOpts = $.extend({source: source, target: target}, repOpts);\n      if (repOpts.continuous && !repOpts.cancel) {\n        ajaxOptions.successStatus = 202;\n      }\n      ajax({\n          type: \"POST\", url: this.urlPrefix + \"/_replicate\",\n          data: JSON.stringify(repOpts),\n          contentType: \"application/json\"\n        },\n        ajaxOptions,\n        \"Replication failed\"\n      );\n    },\n\n    /**\n     * Fetch a new UUID\n     * @see <a href=\"http://techzone.couchbase.com/sites/default/files/\n     * uploads/all/documentation/couchbase-api-misc.html#couchbase-api-\n     * misc_uuids_get\">docs for /_uuids</a>\n     * @param {Int} cacheNum Number of uuids to keep cached for future use\n     */\n    newUUID: function(cacheNum) {\n      if (cacheNum === undefined) {\n        cacheNum = 1;\n      }\n      if (!uuidCache.length) {\n        ajax({url: this.urlPrefix + \"/_uuids\", data: {count: cacheNum}, async:\n              false}, {\n            success: function(resp) {\n              uuidCache = resp.uuids;\n            }\n          },\n          \"Failed to retrieve UUID batch.\"\n        );\n      }\n      return uuidCache.shift();\n    }\n  });\n\n  /**\n   * @private\n   */\n  function ajax(obj, options, errorMessage, ajaxOptions) {\n    var timeStart;\n    var defaultAjaxOpts = {\n      contentType: \"application/json\",\n      headers:{\"Accept\": \"application/json\"}\n    };\n\n    options = $.extend({successStatus: 200}, options);\n    ajaxOptions = $.extend(defaultAjaxOpts, ajaxOptions);\n    errorMessage = errorMessage || \"Unknown error\";\n    timeStart = (new Date()).getTime();\n    $.ajax($.extend($.extend({\n      type: \"GET\", dataType: \"json\", cache : !$.browser.msie,\n      beforeSend: function(xhr){\n        if(ajaxOptions && ajaxOptions.headers){\n          for (var header in ajaxOptions.headers){\n            xhr.setRequestHeader(header, ajaxOptions.headers[header]);\n          }\n        }\n      },\n      complete: function(req) {\n        var reqDuration = (new Date()).getTime() - timeStart;\n        try {\n          var resp = $.parseJSON(req.responseText);\n        } catch(e) {\n          if (options.error) {\n            options.error(req.status, req, e);\n          } else {\n            throw errorMessage + ': ' + e;\n          }\n          return;\n        }\n        if (options.ajaxStart) {\n          options.ajaxStart(resp);\n        }\n        if (req.status == options.successStatus) {\n          if (options.beforeSuccess) options.beforeSuccess(req, resp, reqDuration);\n          if (options.success) options.success(resp, reqDuration);\n        } else if (options.error) {\n          options.error(req.status, resp && resp.error ||\n                        errorMessage, resp && resp.reason || \"no response\",\n                        reqDuration);\n        } else {\n          throw errorMessage + \": \" + resp.reason;\n        }\n      }\n    }, obj), ajaxOptions));\n  }\n\n  /**\n   * @private\n   */\n  function fullCommit(options) {\n    var options = options || {};\n    if (typeof options.ensure_full_commit !== \"undefined\") {\n      var commit = options.ensure_full_commit;\n      delete options.ensure_full_commit;\n      return function(xhr) {\n        xhr.setRequestHeader('Accept', 'application/json');\n        xhr.setRequestHeader(\"X-Couch-Full-Commit\", commit.toString());\n      };\n    }\n  };\n\n  /**\n   * @private\n   */\n  // Convert a options object to an url query string.\n  // ex: {key:'value',key2:'value2'} becomes '?key=\"value\"&key2=\"value2\"'\n  function encodeOptions(options) {\n    var buf = [];\n    if (typeof(options) === \"object\" && options !== null) {\n      for (var name in options) {\n        if ($.inArray(name,\n                      [\"error\", \"success\", \"beforeSuccess\", \"ajaxStart\"]) >= 0)\n          continue;\n        var value = options[name];\n        if ($.inArray(name, [\"key\", \"startkey\", \"endkey\"]) >= 0) {\n          value = toJSON(value);\n        }\n        buf.push(encodeURIComponent(name) + \"=\" + encodeURIComponent(value));\n      }\n    }\n    return buf.length ? \"?\" + buf.join(\"&\") : \"\";\n  }\n\n  /**\n   * @private\n   */\n  function toJSON(obj) {\n    return obj !== null ? JSON.stringify(obj) : null;\n  }\n\n})(jQuery);\n"
  },
  {
    "path": "assets/js/lib/jquery.mb.browser.js",
    "content": "/*\n * ******************************************************************************\n *  jquery.mb.components\n *  file: jquery.mb.browser.min.js\n *\n *  Copyright (c) 2001-2014. Matteo Bicocchi (Pupunzi);\n *  Open lab srl, Firenze - Italy\n *  email: matteo@open-lab.com\n *  site: \thttp://pupunzi.com\n *  blog:\thttp://pupunzi.open-lab.com\n * \thttp://open-lab.com\n *\n *  Licences: MIT, GPL\n *  http://www.opensource.org/licenses/mit-license.php\n *  http://www.gnu.org/licenses/gpl.html\n *\n *  last modified: 26/03/14 21.43\n *  *****************************************************************************\n */\n\nvar nAgt=navigator.userAgent;if(!jQuery.browser){jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.msie=!1,jQuery.browser.ua=nAgt,jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=\"\"+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if(-1!=(verOffset=nAgt.indexOf(\"Opera\")))jQuery.browser.opera=!0,jQuery.browser.name=\"Opera\",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf(\"Version\"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8));else if(-1!=(verOffset=nAgt.indexOf(\"OPR\")))jQuery.browser.opera=!0,jQuery.browser.name=\"Opera\",jQuery.browser.fullVersion=nAgt.substring(verOffset+4);else if(-1!=(verOffset=nAgt.indexOf(\"MSIE\")))jQuery.browser.msie=!0,jQuery.browser.name=\"Microsoft Internet Explorer\",jQuery.browser.fullVersion=nAgt.substring(verOffset+5);else if(-1!=nAgt.indexOf(\"Trident\")){jQuery.browser.msie=!0,jQuery.browser.name=\"Microsoft Internet Explorer\";var start=nAgt.indexOf(\"rv:\")+3,end=start+4;jQuery.browser.fullVersion=nAgt.substring(start,end)}else-1!=(verOffset=nAgt.indexOf(\"Chrome\"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name=\"Chrome\",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf(\"Safari\"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name=\"Safari\",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf(\"Version\"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf(\"AppleWebkit\"))?(jQuery.browser.webkit=!0,jQuery.browser.name=\"Safari\",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf(\"Version\"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf(\"Firefox\"))?(jQuery.browser.mozilla=!0,jQuery.browser.name=\"Firefox\",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(\" \")+1)<(verOffset=nAgt.lastIndexOf(\"/\"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase()&&(jQuery.browser.name=navigator.appName));-1!=(ix=jQuery.browser.fullVersion.indexOf(\";\"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(\" \"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(\"\"+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=\"\"+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion}jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.isMobile=jQuery.browser.mobile,jQuery.isTablet=jQuery.browser.mobile&&jQuery(window).width()>765,jQuery.isAndroidDefault=jQuery.browser.android&&!/chrome/i.test(nAgt);\n"
  },
  {
    "path": "assets/js/lib/lodash.js",
    "content": "/**\n * @license\n * Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE\n * Build: `lodash modern -o ./dist/lodash.js`\n */\n;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++e<r;)if(n[e]===t)return e;return-1}function t(t,e){var r=typeof e;if(t=t.l,\"boolean\"==r||null==e)return t[e]?0:-1;\"number\"!=r&&\"string\"!=r&&(r=\"object\");var u=\"number\"==r?e:m+e;return t=(t=t[r])&&t[u],\"object\"==r?t&&-1<n(t,e)?0:-1:t?0:-1}function e(n){var t=this.l,e=typeof n;if(\"boolean\"==e||null==n)t[n]=true;else{\"number\"!=e&&\"string\"!=e&&(e=\"object\");var r=\"number\"==e?n:m+n,t=t[e]||(t[e]={});\"object\"==e?(t[r]||(t[r]=[])).push(n):t[r]=true\n}}function r(n){return n.charCodeAt(0)}function u(n,t){for(var e=n.m,r=t.m,u=-1,o=e.length;++u<o;){var i=e[u],a=r[u];if(i!==a){if(i>a||typeof i==\"undefined\")return 1;if(i<a||typeof a==\"undefined\")return-1}}return n.n-t.n}function o(n){var t=-1,r=n.length,u=n[0],o=n[r/2|0],i=n[r-1];if(u&&typeof u==\"object\"&&o&&typeof o==\"object\"&&i&&typeof i==\"object\")return false;for(u=f(),u[\"false\"]=u[\"null\"]=u[\"true\"]=u.undefined=false,o=f(),o.k=n,o.l=u,o.push=e;++t<r;)o.push(n[t]);return o}function i(n){return\"\\\\\"+U[n]\n}function a(){return h.pop()||[]}function f(){return g.pop()||{k:null,l:null,m:null,\"false\":false,n:0,\"null\":false,number:null,object:null,push:null,string:null,\"true\":false,undefined:false,o:null}}function l(n){n.length=0,h.length<_&&h.push(n)}function c(n){var t=n.l;t&&c(t),n.k=n.l=n.m=n.object=n.number=n.string=n.o=null,g.length<_&&g.push(n)}function p(n,t,e){t||(t=0),typeof e==\"undefined\"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Array(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function s(e){function h(n,t,e){if(!n||!V[typeof n])return n;\nt=t&&typeof e==\"undefined\"?t:tt(t,e,3);for(var r=-1,u=V[typeof n]&&Fe(n),o=u?u.length:0;++r<o&&(e=u[r],false!==t(n[e],e,n)););return n}function g(n,t,e){var r;if(!n||!V[typeof n])return n;t=t&&typeof e==\"undefined\"?t:tt(t,e,3);for(r in n)if(false===t(n[r],r,n))break;return n}function _(n,t,e){var r,u=n,o=u;if(!u)return o;for(var i=arguments,a=0,f=typeof e==\"number\"?2:i.length;++a<f;)if((u=i[a])&&V[typeof u])for(var l=-1,c=V[typeof u]&&Fe(u),p=c?c.length:0;++l<p;)r=c[l],\"undefined\"==typeof o[r]&&(o[r]=u[r]);\nreturn o}function U(n,t,e){var r,u=n,o=u;if(!u)return o;var i=arguments,a=0,f=typeof e==\"number\"?2:i.length;if(3<f&&\"function\"==typeof i[f-2])var l=tt(i[--f-1],i[f--],2);else 2<f&&\"function\"==typeof i[f-1]&&(l=i[--f]);for(;++a<f;)if((u=i[a])&&V[typeof u])for(var c=-1,p=V[typeof u]&&Fe(u),s=p?p.length:0;++c<s;)r=p[c],o[r]=l?l(o[r],u[r]):u[r];return o}function H(n){var t,e=[];if(!n||!V[typeof n])return e;for(t in n)me.call(n,t)&&e.push(t);return e}function J(n){return n&&typeof n==\"object\"&&!Te(n)&&me.call(n,\"__wrapped__\")?n:new Q(n)\n}function Q(n,t){this.__chain__=!!t,this.__wrapped__=n}function X(n){function t(){if(r){var n=p(r);be.apply(n,arguments)}if(this instanceof t){var o=nt(e.prototype),n=e.apply(o,n||arguments);return wt(n)?n:o}return e.apply(u,n||arguments)}var e=n[0],r=n[2],u=n[4];return $e(t,n),t}function Z(n,t,e,r,u){if(e){var o=e(n);if(typeof o!=\"undefined\")return o}if(!wt(n))return n;var i=ce.call(n);if(!K[i])return n;var f=Ae[i];switch(i){case T:case F:return new f(+n);case W:case P:return new f(n);case z:return o=f(n.source,C.exec(n)),o.lastIndex=n.lastIndex,o\n}if(i=Te(n),t){var c=!r;r||(r=a()),u||(u=a());for(var s=r.length;s--;)if(r[s]==n)return u[s];o=i?f(n.length):{}}else o=i?p(n):U({},n);return i&&(me.call(n,\"index\")&&(o.index=n.index),me.call(n,\"input\")&&(o.input=n.input)),t?(r.push(n),u.push(o),(i?St:h)(n,function(n,i){o[i]=Z(n,t,e,r,u)}),c&&(l(r),l(u)),o):o}function nt(n){return wt(n)?ke(n):{}}function tt(n,t,e){if(typeof n!=\"function\")return Ut;if(typeof t==\"undefined\"||!(\"prototype\"in n))return n;var r=n.__bindData__;if(typeof r==\"undefined\"&&(De.funcNames&&(r=!n.name),r=r||!De.funcDecomp,!r)){var u=ge.call(n);\nDe.funcNames||(r=!O.test(u)),r||(r=E.test(u),$e(n,r))}if(false===r||true!==r&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,u){return n.call(t,e,r,u)};case 4:return function(e,r,u,o){return n.call(t,e,r,u,o)}}return Mt(n,t)}function et(n){function t(){var n=f?i:this;if(u){var h=p(u);be.apply(h,arguments)}return(o||c)&&(h||(h=p(arguments)),o&&be.apply(h,o),c&&h.length<a)?(r|=16,et([e,s?r:-4&r,h,null,i,a])):(h||(h=arguments),l&&(e=n[v]),this instanceof t?(n=nt(e.prototype),h=e.apply(n,h),wt(h)?h:n):e.apply(n,h))\n}var e=n[0],r=n[1],u=n[2],o=n[3],i=n[4],a=n[5],f=1&r,l=2&r,c=4&r,s=8&r,v=e;return $e(t,n),t}function rt(e,r){var u=-1,i=st(),a=e?e.length:0,f=a>=b&&i===n,l=[];if(f){var p=o(r);p?(i=t,r=p):f=false}for(;++u<a;)p=e[u],0>i(r,p)&&l.push(p);return f&&c(r),l}function ut(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r<u;){var i=n[r];if(i&&typeof i==\"object\"&&typeof i.length==\"number\"&&(Te(i)||yt(i))){t||(i=ut(i,t,e));var a=-1,f=i.length,l=o.length;for(o.length+=f;++a<f;)o[l++]=i[a]}else e||o.push(i)}return o\n}function ot(n,t,e,r,u,o){if(e){var i=e(n,t);if(typeof i!=\"undefined\")return!!i}if(n===t)return 0!==n||1/n==1/t;if(n===n&&!(n&&V[typeof n]||t&&V[typeof t]))return false;if(null==n||null==t)return n===t;var f=ce.call(n),c=ce.call(t);if(f==D&&(f=q),c==D&&(c=q),f!=c)return false;switch(f){case T:case F:return+n==+t;case W:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case z:case P:return n==oe(t)}if(c=f==$,!c){var p=me.call(n,\"__wrapped__\"),s=me.call(t,\"__wrapped__\");if(p||s)return ot(p?n.__wrapped__:n,s?t.__wrapped__:t,e,r,u,o);\nif(f!=q)return false;if(f=n.constructor,p=t.constructor,f!=p&&!(dt(f)&&f instanceof f&&dt(p)&&p instanceof p)&&\"constructor\"in n&&\"constructor\"in t)return false}for(f=!u,u||(u=a()),o||(o=a()),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,i=true;if(u.push(n),o.push(t),c){if(p=n.length,v=t.length,(i=v==p)||r)for(;v--;)if(c=p,s=t[v],r)for(;c--&&!(i=ot(n[c],s,e,r,u,o)););else if(!(i=ot(n[v],s,e,r,u,o)))break}else g(t,function(t,a,f){return me.call(f,a)?(v++,i=me.call(n,a)&&ot(n[a],t,e,r,u,o)):void 0}),i&&!r&&g(n,function(n,t,e){return me.call(e,t)?i=-1<--v:void 0\n});return u.pop(),o.pop(),f&&(l(u),l(o)),i}function it(n,t,e,r,u){(Te(t)?St:h)(t,function(t,o){var i,a,f=t,l=n[o];if(t&&((a=Te(t))||Pe(t))){for(f=r.length;f--;)if(i=r[f]==t){l=u[f];break}if(!i){var c;e&&(f=e(l,t),c=typeof f!=\"undefined\")&&(l=f),c||(l=a?Te(l)?l:[]:Pe(l)?l:{}),r.push(t),u.push(l),c||it(l,t,e,r,u)}}else e&&(f=e(l,t),typeof f==\"undefined\"&&(f=t)),typeof f!=\"undefined\"&&(l=f);n[o]=l})}function at(n,t){return n+he(Re()*(t-n+1))}function ft(e,r,u){var i=-1,f=st(),p=e?e.length:0,s=[],v=!r&&p>=b&&f===n,h=u||v?a():s;\nfor(v&&(h=o(h),f=t);++i<p;){var g=e[i],y=u?u(g,i,e):g;(r?!i||h[h.length-1]!==y:0>f(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(l(h.k),c(h)):u&&l(h),s}function lt(n){return function(t,e,r){var u={};e=J.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o==\"number\")for(;++r<o;){var i=t[r];n(u,i,e(i,r,t),t)}else h(t,function(t,r,o){n(u,t,e(t,r,o),o)});return u}}function ct(n,t,e,r,u,o){var i=1&t,a=4&t,f=16&t,l=32&t;if(!(2&t||dt(n)))throw new ie;f&&!e.length&&(t&=-17,f=e=false),l&&!r.length&&(t&=-33,l=r=false);\nvar c=n&&n.__bindData__;return c&&true!==c?(c=p(c),c[2]&&(c[2]=p(c[2])),c[3]&&(c[3]=p(c[3])),!i||1&c[1]||(c[4]=u),!i&&1&c[1]&&(t|=8),!a||4&c[1]||(c[5]=o),f&&be.apply(c[2]||(c[2]=[]),e),l&&we.apply(c[3]||(c[3]=[]),r),c[1]|=t,ct.apply(null,c)):(1==t||17===t?X:et)([n,t,e,r,u,o])}function pt(n){return Be[n]}function st(){var t=(t=J.indexOf)===Wt?n:t;return t}function vt(n){return typeof n==\"function\"&&pe.test(n)}function ht(n){var t,e;return n&&ce.call(n)==q&&(t=n.constructor,!dt(t)||t instanceof t)?(g(n,function(n,t){e=t\n}),typeof e==\"undefined\"||me.call(n,e)):false}function gt(n){return We[n]}function yt(n){return n&&typeof n==\"object\"&&typeof n.length==\"number\"&&ce.call(n)==D||false}function mt(n,t,e){var r=Fe(n),u=r.length;for(t=tt(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function bt(n){var t=[];return g(n,function(n,e){dt(n)&&t.push(e)}),t.sort()}function _t(n){for(var t=-1,e=Fe(n),r=e.length,u={};++t<r;){var o=e[t];u[n[o]]=o}return u}function dt(n){return typeof n==\"function\"}function wt(n){return!(!n||!V[typeof n])\n}function jt(n){return typeof n==\"number\"||n&&typeof n==\"object\"&&ce.call(n)==W||false}function kt(n){return typeof n==\"string\"||n&&typeof n==\"object\"&&ce.call(n)==P||false}function xt(n){for(var t=-1,e=Fe(n),r=e.length,u=Xt(r);++t<r;)u[t]=n[e[t]];return u}function Ct(n,t,e){var r=-1,u=st(),o=n?n.length:0,i=false;return e=(0>e?Ie(0,o+e):e)||0,Te(n)?i=-1<u(n,t,e):typeof o==\"number\"?i=-1<(kt(n)?n.indexOf(t,e):u(n,t,e)):h(n,function(n){return++r<e?void 0:!(i=n===t)}),i}function Ot(n,t,e){var r=true;t=J.createCallback(t,e,3),e=-1;\nvar u=n?n.length:0;if(typeof u==\"number\")for(;++e<u&&(r=!!t(n[e],e,n)););else h(n,function(n,e,u){return r=!!t(n,e,u)});return r}function Nt(n,t,e){var r=[];t=J.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u==\"number\")for(;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}else h(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function It(n,t,e){t=J.createCallback(t,e,3),e=-1;var r=n?n.length:0;if(typeof r!=\"number\"){var u;return h(n,function(n,e,r){return t(n,e,r)?(u=n,false):void 0}),u}for(;++e<r;){var o=n[e];\nif(t(o,e,n))return o}}function St(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e==\"undefined\"?t:tt(t,e,3),typeof u==\"number\")for(;++r<u&&false!==t(n[r],r,n););else h(n,t);return n}function Et(n,t,e){var r=n?n.length:0;if(t=t&&typeof e==\"undefined\"?t:tt(t,e,3),typeof r==\"number\")for(;r--&&false!==t(n[r],r,n););else{var u=Fe(n),r=u.length;h(n,function(n,e,o){return e=u?u[--r]:--r,t(o[e],e,o)})}return n}function Rt(n,t,e){var r=-1,u=n?n.length:0;if(t=J.createCallback(t,e,3),typeof u==\"number\")for(var o=Xt(u);++r<u;)o[r]=t(n[r],r,n);\nelse o=[],h(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function At(n,t,e){var u=-1/0,o=u;if(typeof t!=\"function\"&&e&&e[t]===n&&(t=null),null==t&&Te(n)){e=-1;for(var i=n.length;++e<i;){var a=n[e];a>o&&(o=a)}}else t=null==t&&kt(n)?r:J.createCallback(t,e,3),St(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Dt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=J.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i==\"number\")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else h(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)\n});return e}function $t(n,t,e,r){var u=3>arguments.length;return t=J.createCallback(t,r,4),Et(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)}),e}function Tt(n){var t=-1,e=n?n.length:0,r=Xt(typeof e==\"number\"?e:0);return St(n,function(n){var e=at(0,++t);r[t]=r[e],r[e]=n}),r}function Ft(n,t,e){var r;t=J.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u==\"number\")for(;++e<u&&!(r=t(n[e],e,n)););else h(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function Bt(n,t,e){var r=0,u=n?n.length:0;if(typeof t!=\"number\"&&null!=t){var o=-1;\nfor(t=J.createCallback(t,e,3);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[0]:v;return p(n,0,Se(Ie(0,r),u))}function Wt(t,e,r){if(typeof r==\"number\"){var u=t?t.length:0;r=0>r?Ie(0,u+r):r||0}else if(r)return r=zt(t,e),t[r]===e?r:-1;return n(t,e,r)}function qt(n,t,e){if(typeof t!=\"number\"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=J.createCallback(t,e,3);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Ie(0,t);return p(n,r)}function zt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?J.createCallback(e,r,1):Ut,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;\nreturn u}function Pt(n,t,e,r){return typeof t!=\"boolean\"&&null!=t&&(r=e,e=typeof t!=\"function\"&&r&&r[t]===n?null:t,t=false),null!=e&&(e=J.createCallback(e,r,3)),ft(n,t,e)}function Kt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,e=n?At(Ve(n,\"length\")):0,r=Xt(0>e?0:e);++t<e;)r[t]=Ve(n,t);return r}function Lt(n,t){var e=-1,r=n?n.length:0,u={};for(t||!r||Te(n[0])||(t=[]);++e<r;){var o=n[e];t?u[o]=t[e]:o&&(u[o[0]]=o[1])}return u}function Mt(n,t){return 2<arguments.length?ct(n,17,p(arguments,2),null,t):ct(n,1,null,null,t)\n}function Vt(n,t,e){function r(){c&&ve(c),i=c=p=v,(g||h!==t)&&(s=Ue(),a=n.apply(l,o),c||i||(o=l=null))}function u(){var e=t-(Ue()-f);0<e?c=_e(u,e):(i&&ve(i),e=p,i=c=p=v,e&&(s=Ue(),a=n.apply(l,o),c||i||(o=l=null)))}var o,i,a,f,l,c,p,s=0,h=false,g=true;if(!dt(n))throw new ie;if(t=Ie(0,t)||0,true===e)var y=true,g=false;else wt(e)&&(y=e.leading,h=\"maxWait\"in e&&(Ie(t,e.maxWait)||0),g=\"trailing\"in e?e.trailing:g);return function(){if(o=arguments,f=Ue(),l=this,p=g&&(c||!y),false===h)var e=y&&!c;else{i||y||(s=f);var v=h-(f-s),m=0>=v;\nm?(i&&(i=ve(i)),s=f,a=n.apply(l,o)):i||(i=_e(r,v))}return m&&c?c=ve(c):c||t===h||(c=_e(u,t)),e&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Ut(n){return n}function Gt(n,t,e){var r=true,u=t&&bt(t);t&&(e||u.length)||(null==e&&(e=t),o=Q,t=n,n=J,u=bt(t)),false===e?r=false:wt(e)&&\"chain\"in e&&(r=e.chain);var o=n,i=dt(o);St(u,function(e){var u=n[e]=t[e];i&&(o.prototype[e]=function(){var t=this.__chain__,e=this.__wrapped__,i=[e];if(be.apply(i,arguments),i=u.apply(n,i),r||t){if(e===i&&wt(i))return this;\ni=new o(i),i.__chain__=t}return i})})}function Ht(){}function Jt(n){return function(t){return t[n]}}function Qt(){return this.__wrapped__}e=e?Y.defaults(G.Object(),e,Y.pick(G,A)):G;var Xt=e.Array,Yt=e.Boolean,Zt=e.Date,ne=e.Function,te=e.Math,ee=e.Number,re=e.Object,ue=e.RegExp,oe=e.String,ie=e.TypeError,ae=[],fe=re.prototype,le=e._,ce=fe.toString,pe=ue(\"^\"+oe(ce).replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\").replace(/toString| for [^\\]]+/g,\".*?\")+\"$\"),se=te.ceil,ve=e.clearTimeout,he=te.floor,ge=ne.prototype.toString,ye=vt(ye=re.getPrototypeOf)&&ye,me=fe.hasOwnProperty,be=ae.push,_e=e.setTimeout,de=ae.splice,we=ae.unshift,je=function(){try{var n={},t=vt(t=re.defineProperty)&&t,e=t(n,n,n)&&t\n}catch(r){}return e}(),ke=vt(ke=re.create)&&ke,xe=vt(xe=Xt.isArray)&&xe,Ce=e.isFinite,Oe=e.isNaN,Ne=vt(Ne=re.keys)&&Ne,Ie=te.max,Se=te.min,Ee=e.parseInt,Re=te.random,Ae={};Ae[$]=Xt,Ae[T]=Yt,Ae[F]=Zt,Ae[B]=ne,Ae[q]=re,Ae[W]=ee,Ae[z]=ue,Ae[P]=oe,Q.prototype=J.prototype;var De=J.support={};De.funcDecomp=!vt(e.a)&&E.test(s),De.funcNames=typeof ne.name==\"string\",J.templateSettings={escape:/<%-([\\s\\S]+?)%>/g,evaluate:/<%([\\s\\S]+?)%>/g,interpolate:N,variable:\"\",imports:{_:J}},ke||(nt=function(){function n(){}return function(t){if(wt(t)){n.prototype=t;\nvar r=new n;n.prototype=null}return r||e.Object()}}());var $e=je?function(n,t){M.value=t,je(n,\"__bindData__\",M)}:Ht,Te=xe||function(n){return n&&typeof n==\"object\"&&typeof n.length==\"number\"&&ce.call(n)==$||false},Fe=Ne?function(n){return wt(n)?Ne(n):[]}:H,Be={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#39;\"},We=_t(Be),qe=ue(\"(\"+Fe(We).join(\"|\")+\")\",\"g\"),ze=ue(\"[\"+Fe(Be).join(\"\")+\"]\",\"g\"),Pe=ye?function(n){if(!n||ce.call(n)!=q)return false;var t=n.valueOf,e=vt(t)&&(e=ye(t))&&ye(e);return e?n==e||ye(n)==e:ht(n)\n}:ht,Ke=lt(function(n,t,e){me.call(n,e)?n[e]++:n[e]=1}),Le=lt(function(n,t,e){(me.call(n,e)?n[e]:n[e]=[]).push(t)}),Me=lt(function(n,t,e){n[e]=t}),Ve=Rt,Ue=vt(Ue=Zt.now)&&Ue||function(){return(new Zt).getTime()},Ge=8==Ee(d+\"08\")?Ee:function(n,t){return Ee(kt(n)?n.replace(I,\"\"):n,t||0)};return J.after=function(n,t){if(!dt(t))throw new ie;return function(){return 1>--n?t.apply(this,arguments):void 0}},J.assign=U,J.at=function(n){for(var t=arguments,e=-1,r=ut(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Xt(t);++e<t;)u[e]=n[r[e]];\nreturn u},J.bind=Mt,J.bindAll=function(n){for(var t=1<arguments.length?ut(arguments,true,false,1):bt(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=ct(n[u],1,null,null,n)}return n},J.bindKey=function(n,t){return 2<arguments.length?ct(t,19,p(arguments,2),null,n):ct(t,3,null,null,n)},J.chain=function(n){return n=new Q(n),n.__chain__=true,n},J.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},J.compose=function(){for(var n=arguments,t=n.length;t--;)if(!dt(n[t]))throw new ie;\nreturn function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},J.constant=function(n){return function(){return n}},J.countBy=Ke,J.create=function(n,t){var e=nt(n);return t?U(e,t):e},J.createCallback=function(n,t,e){var r=typeof n;if(null==n||\"function\"==r)return tt(n,t,e);if(\"object\"!=r)return Jt(n);var u=Fe(n),o=u[0],i=n[o];return 1!=u.length||i!==i||wt(i)?function(t){for(var e=u.length,r=false;e--&&(r=ot(t[u[e]],n[u[e]],null,true)););return r}:function(n){return n=n[o],i===n&&(0!==i||1/i==1/n)\n}},J.curry=function(n,t){return t=typeof t==\"number\"?t:+t||n.length,ct(n,4,null,null,null,t)},J.debounce=Vt,J.defaults=_,J.defer=function(n){if(!dt(n))throw new ie;var t=p(arguments,1);return _e(function(){n.apply(v,t)},1)},J.delay=function(n,t){if(!dt(n))throw new ie;var e=p(arguments,2);return _e(function(){n.apply(v,e)},t)},J.difference=function(n){return rt(n,ut(arguments,true,true,1))},J.filter=Nt,J.flatten=function(n,t,e,r){return typeof t!=\"boolean\"&&null!=t&&(r=e,e=typeof t!=\"function\"&&r&&r[t]===n?null:t,t=false),null!=e&&(n=Rt(n,e,r)),ut(n,t)\n},J.forEach=St,J.forEachRight=Et,J.forIn=g,J.forInRight=function(n,t,e){var r=[];g(n,function(n,t){r.push(t,n)});var u=r.length;for(t=tt(t,e,3);u--&&false!==t(r[u--],r[u],n););return n},J.forOwn=h,J.forOwnRight=mt,J.functions=bt,J.groupBy=Le,J.indexBy=Me,J.initial=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!=\"number\"&&null!=t){var o=u;for(t=J.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return p(n,0,Se(Ie(0,u-r),u))},J.intersection=function(){for(var e=[],r=-1,u=arguments.length,i=a(),f=st(),p=f===n,s=a();++r<u;){var v=arguments[r];\n(Te(v)||yt(v))&&(e.push(v),i.push(p&&v.length>=b&&o(r?e[r]:s)))}var p=e[0],h=-1,g=p?p.length:0,y=[];n:for(;++h<g;){var m=i[0],v=p[h];if(0>(m?t(m,v):f(s,v))){for(r=u,(m||s).push(v);--r;)if(m=i[r],0>(m?t(m,v):f(e[r],v)))continue n;y.push(v)}}for(;u--;)(m=i[u])&&c(m);return l(i),l(s),y},J.invert=_t,J.invoke=function(n,t){var e=p(arguments,2),r=-1,u=typeof t==\"function\",o=n?n.length:0,i=Xt(typeof o==\"number\"?o:0);return St(n,function(n){i[++r]=(u?t:n[t]).apply(n,e)}),i},J.keys=Fe,J.map=Rt,J.mapValues=function(n,t,e){var r={};\nreturn t=J.createCallback(t,e,3),h(n,function(n,e,u){r[e]=t(n,e,u)}),r},J.max=At,J.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):m+arguments[0];return me.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!dt(n))throw new ie;return e.cache={},e},J.merge=function(n){var t=arguments,e=2;if(!wt(n))return n;if(\"number\"!=typeof t[2]&&(e=t.length),3<e&&\"function\"==typeof t[e-2])var r=tt(t[--e-1],t[e--],2);else 2<e&&\"function\"==typeof t[e-1]&&(r=t[--e]);for(var t=p(arguments,1,e),u=-1,o=a(),i=a();++u<e;)it(n,t[u],r,o,i);\nreturn l(o),l(i),n},J.min=function(n,t,e){var u=1/0,o=u;if(typeof t!=\"function\"&&e&&e[t]===n&&(t=null),null==t&&Te(n)){e=-1;for(var i=n.length;++e<i;){var a=n[e];a<o&&(o=a)}}else t=null==t&&kt(n)?r:J.createCallback(t,e,3),St(n,function(n,e,r){e=t(n,e,r),e<u&&(u=e,o=n)});return o},J.omit=function(n,t,e){var r={};if(typeof t!=\"function\"){var u=[];g(n,function(n,t){u.push(t)});for(var u=rt(u,ut(arguments,true,false,1)),o=-1,i=u.length;++o<i;){var a=u[o];r[a]=n[a]}}else t=J.createCallback(t,e,3),g(n,function(n,e,u){t(n,e,u)||(r[e]=n)\n});return r},J.once=function(n){var t,e;if(!dt(n))throw new ie;return function(){return t?e:(t=true,e=n.apply(this,arguments),n=null,e)}},J.pairs=function(n){for(var t=-1,e=Fe(n),r=e.length,u=Xt(r);++t<r;){var o=e[t];u[t]=[o,n[o]]}return u},J.partial=function(n){return ct(n,16,p(arguments,1))},J.partialRight=function(n){return ct(n,32,null,p(arguments,1))},J.pick=function(n,t,e){var r={};if(typeof t!=\"function\")for(var u=-1,o=ut(arguments,true,false,1),i=wt(n)?o.length:0;++u<i;){var a=o[u];a in n&&(r[a]=n[a])\n}else t=J.createCallback(t,e,3),g(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},J.pluck=Ve,J.property=Jt,J.pull=function(n){for(var t=arguments,e=0,r=t.length,u=n?n.length:0;++e<r;)for(var o=-1,i=t[e];++o<u;)n[o]===i&&(de.call(n,o--,1),u--);return n},J.range=function(n,t,e){n=+n||0,e=typeof e==\"number\"?e:+e||1,null==t&&(t=n,n=0);var r=-1;t=Ie(0,se((t-n)/(e||1)));for(var u=Xt(t);++r<t;)u[r]=n,n+=e;return u},J.reject=function(n,t,e){return t=J.createCallback(t,e,3),Nt(n,function(n,e,r){return!t(n,e,r)\n})},J.remove=function(n,t,e){var r=-1,u=n?n.length:0,o=[];for(t=J.createCallback(t,e,3);++r<u;)e=n[r],t(e,r,n)&&(o.push(e),de.call(n,r--,1),u--);return o},J.rest=qt,J.shuffle=Tt,J.sortBy=function(n,t,e){var r=-1,o=Te(t),i=n?n.length:0,p=Xt(typeof i==\"number\"?i:0);for(o||(t=J.createCallback(t,e,3)),St(n,function(n,e,u){var i=p[++r]=f();o?i.m=Rt(t,function(t){return n[t]}):(i.m=a())[0]=t(n,e,u),i.n=r,i.o=n}),i=p.length,p.sort(u);i--;)n=p[i],p[i]=n.o,o||l(n.m),c(n);return p},J.tap=function(n,t){return t(n),n\n},J.throttle=function(n,t,e){var r=true,u=true;if(!dt(n))throw new ie;return false===e?r=false:wt(e)&&(r=\"leading\"in e?e.leading:r,u=\"trailing\"in e?e.trailing:u),L.leading=r,L.maxWait=t,L.trailing=u,Vt(n,t,L)},J.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Xt(n);for(t=tt(t,e,1);++r<n;)u[r]=t(r);return u},J.toArray=function(n){return n&&typeof n.length==\"number\"?p(n):xt(n)},J.transform=function(n,t,e,r){var u=Te(n);if(null==e)if(u)e=[];else{var o=n&&n.constructor;e=nt(o&&o.prototype)}return t&&(t=J.createCallback(t,r,4),(u?St:h)(n,function(n,r,u){return t(e,n,r,u)\n})),e},J.union=function(){return ft(ut(arguments,true,true))},J.uniq=Pt,J.values=xt,J.where=Nt,J.without=function(n){return rt(n,p(arguments,1))},J.wrap=function(n,t){return ct(t,16,[n])},J.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var e=arguments[n];if(Te(e)||yt(e))var r=r?ft(rt(r,e).concat(rt(e,r))):e}return r||[]},J.zip=Kt,J.zipObject=Lt,J.collect=Rt,J.drop=qt,J.each=St,J.eachRight=Et,J.extend=U,J.methods=bt,J.object=Lt,J.select=Nt,J.tail=qt,J.unique=Pt,J.unzip=Kt,Gt(J),J.clone=function(n,t,e,r){return typeof t!=\"boolean\"&&null!=t&&(r=e,e=t,t=false),Z(n,t,typeof e==\"function\"&&tt(e,r,1))\n},J.cloneDeep=function(n,t,e){return Z(n,true,typeof t==\"function\"&&tt(t,e,1))},J.contains=Ct,J.escape=function(n){return null==n?\"\":oe(n).replace(ze,pt)},J.every=Ot,J.find=It,J.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=J.createCallback(t,e,3);++r<u;)if(t(n[r],r,n))return r;return-1},J.findKey=function(n,t,e){var r;return t=J.createCallback(t,e,3),h(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},J.findLast=function(n,t,e){var r;return t=J.createCallback(t,e,3),Et(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0\n}),r},J.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=J.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},J.findLastKey=function(n,t,e){var r;return t=J.createCallback(t,e,3),mt(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},J.has=function(n,t){return n?me.call(n,t):false},J.identity=Ut,J.indexOf=Wt,J.isArguments=yt,J.isArray=Te,J.isBoolean=function(n){return true===n||false===n||n&&typeof n==\"object\"&&ce.call(n)==T||false},J.isDate=function(n){return n&&typeof n==\"object\"&&ce.call(n)==F||false\n},J.isElement=function(n){return n&&1===n.nodeType||false},J.isEmpty=function(n){var t=true;if(!n)return t;var e=ce.call(n),r=n.length;return e==$||e==P||e==D||e==q&&typeof r==\"number\"&&dt(n.splice)?!r:(h(n,function(){return t=false}),t)},J.isEqual=function(n,t,e,r){return ot(n,t,typeof e==\"function\"&&tt(e,r,2))},J.isFinite=function(n){return Ce(n)&&!Oe(parseFloat(n))},J.isFunction=dt,J.isNaN=function(n){return jt(n)&&n!=+n},J.isNull=function(n){return null===n},J.isNumber=jt,J.isObject=wt,J.isPlainObject=Pe,J.isRegExp=function(n){return n&&typeof n==\"object\"&&ce.call(n)==z||false\n},J.isString=kt,J.isUndefined=function(n){return typeof n==\"undefined\"},J.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e==\"number\"&&(r=(0>e?Ie(0,r+e):Se(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},J.mixin=Gt,J.noConflict=function(){return e._=le,this},J.noop=Ht,J.now=Ue,J.parseInt=Ge,J.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n==\"boolean\"&&u?(e=n,n=1):u||typeof t!=\"boolean\"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=Re(),Se(n+e*(t-n+parseFloat(\"1e-\"+((e+\"\").length-1))),t)):at(n,t)\n},J.reduce=Dt,J.reduceRight=$t,J.result=function(n,t){if(n){var e=n[t];return dt(e)?n[t]():e}},J.runInContext=s,J.size=function(n){var t=n?n.length:0;return typeof t==\"number\"?t:Fe(n).length},J.some=Ft,J.sortedIndex=zt,J.template=function(n,t,e){var r=J.templateSettings;n=oe(n||\"\"),e=_({},e,r);var u,o=_({},e.imports,r.imports),r=Fe(o),o=xt(o),a=0,f=e.interpolate||S,l=\"__p+='\",f=ue((e.escape||S).source+\"|\"+f.source+\"|\"+(f===N?x:S).source+\"|\"+(e.evaluate||S).source+\"|$\",\"g\");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(a,c).replace(R,i),e&&(l+=\"'+__e(\"+e+\")+'\"),f&&(u=true,l+=\"';\"+f+\";\\n__p+='\"),r&&(l+=\"'+((__t=(\"+r+\"))==null?'':__t)+'\"),a=c+t.length,t\n}),l+=\"';\",f=e=e.variable,f||(e=\"obj\",l=\"with(\"+e+\"){\"+l+\"}\"),l=(u?l.replace(w,\"\"):l).replace(j,\"$1\").replace(k,\"$1;\"),l=\"function(\"+e+\"){\"+(f?\"\":e+\"||(\"+e+\"={});\")+\"var __t,__p='',__e=_.escape\"+(u?\",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}\":\";\")+l+\"return __p}\";try{var c=ne(r,\"return \"+l).apply(v,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},J.unescape=function(n){return null==n?\"\":oe(n).replace(qe,gt)},J.uniqueId=function(n){var t=++y;return oe(null==n?\"\":n)+t\n},J.all=Ot,J.any=Ft,J.detect=It,J.findWhere=It,J.foldl=Dt,J.foldr=$t,J.include=Ct,J.inject=Dt,Gt(function(){var n={};return h(J,function(t,e){J.prototype[e]||(n[e]=t)}),n}(),false),J.first=Bt,J.last=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!=\"number\"&&null!=t){var o=u;for(t=J.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:v;return p(n,Ie(0,u-r))},J.sample=function(n,t,e){return n&&typeof n.length!=\"number\"&&(n=xt(n)),null==t||e?n?n[at(0,n.length-1)]:v:(n=Tt(n),n.length=Se(Ie(0,t),n.length),n)\n},J.take=Bt,J.head=Bt,h(J,function(n,t){var e=\"sample\"!==t;J.prototype[t]||(J.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t==\"function\")?new Q(o,u):o})}),J.VERSION=\"2.4.1\",J.prototype.chain=function(){return this.__chain__=true,this},J.prototype.toString=function(){return oe(this.__wrapped__)},J.prototype.value=Qt,J.prototype.valueOf=Qt,St([\"join\",\"pop\",\"shift\"],function(n){var t=ae[n];J.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);\nreturn n?new Q(e,n):e}}),St([\"push\",\"reverse\",\"sort\",\"unshift\"],function(n){var t=ae[n];J.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),St([\"concat\",\"slice\",\"splice\"],function(n){var t=ae[n];J.prototype[n]=function(){return new Q(t.apply(this.__wrapped__,arguments),this.__chain__)}}),J}var v,h=[],g=[],y=0,m=+new Date+\"\",b=75,_=40,d=\" \\t\\x0B\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\",w=/\\b__p\\+='';/g,j=/\\b(__p\\+=)''\\+/g,k=/(__e\\(.*?\\)|\\b__t\\))\\+'';/g,x=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,C=/\\w*$/,O=/^\\s*function[ \\n\\r\\t]+\\w/,N=/<%=([\\s\\S]+?)%>/g,I=RegExp(\"^[\"+d+\"]*0+(?=.$)\"),S=/($^)/,E=/\\bthis\\b/,R=/['\\n\\r\\t\\u2028\\u2029\\\\]/g,A=\"Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setTimeout\".split(\" \"),D=\"[object Arguments]\",$=\"[object Array]\",T=\"[object Boolean]\",F=\"[object Date]\",B=\"[object Function]\",W=\"[object Number]\",q=\"[object Object]\",z=\"[object RegExp]\",P=\"[object String]\",K={};\nK[B]=false,K[D]=K[$]=K[T]=K[F]=K[W]=K[q]=K[z]=K[P]=true;var L={leading:false,maxWait:0,trailing:false},M={configurable:false,enumerable:false,value:null,writable:false},V={\"boolean\":false,\"function\":true,object:true,number:false,string:false,undefined:false},U={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\t\":\"t\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},G=V[typeof window]&&window||this,H=V[typeof exports]&&exports&&!exports.nodeType&&exports,J=V[typeof module]&&module&&!module.nodeType&&module,Q=J&&J.exports===H&&H,X=V[typeof global]&&global;!X||X.global!==X&&X.window!==X||(G=X);\nvar Y=s();typeof define==\"function\"&&typeof define.amd==\"object\"&&define.amd?(G._=Y, define(function(){return Y})):H&&J?Q?(J.exports=Y)._=Y:H._=Y:G._=Y}).call(this);"
  },
  {
    "path": "assets/js/lib/modalbox.js",
    "content": "\"use strict\";\ndefine([\n    'jquery',\n    'sourceModules/module',\n    'sourceLib/lodash'\n    ], function($, module, _) {\n\nvar context; // instance of box\n\nvar ModalBox = function(config, data) {\n    var isNewInstance = !context;\n    context = context || this;\n    context.data = data ? data : initialBlocksData;    \n\n    if (!isNewInstance) {\n        context.render();\n        return context;\n    }\n\n    var modulesOptions = context.options.modulesOptions;\n    modulesOptions.modalBox = $.extend(true, {\n        \"classes\": {\n            \"box\": [context.options.mainClass, context.options.colMain, \"source_modal_box\"].join(' '),\n            \"title\": \"source_modal_title\",\n            \"body\": \"source_modal_body\",\n            \"close\": \"source_modal_close\"\n        },\n        \"labels\": {\n            \"close\": \"Close extended search results\"\n        },\n        \"appendTo\": \".source_main\"\n    }, modulesOptions.modalBox,  config);\n\n    context.init();\n};\n\nModalBox.prototype = module.createInstance();\nModalBox.prototype.constructor = ModalBox;\n\nModalBox.prototype.init = function() {\n    this.render();\n    this.initCloseHandler();\n};\n\nModalBox.prototype.templates = {\n    box: _.template('<div class=\"<%= classes.box %>\"></div>'),\n    title: _.template('<div class=\"<%= classes.title %>\"></div>'),\n    close: _.template('<div class=\"<%= classes.close %>\" title=\"<%= labels.close %>\"></div>'),\n    body: _.template('<div class=\"<%= classes.body %>\"></div>')\n};\n\nModalBox.prototype.renderers = {};\n\nModalBox.prototype.renderers.box = function(element) {\n    $(this.options.modulesOptions.modalBox.appendTo).after(element);\n};\n\nModalBox.prototype.renderers.close = function(element) {\n    $(element).html(this.data.close ? this.data.close : \"\");\n    $(this.box).append(element);\n};\n\nModalBox.prototype.renderers.title = function(element) {\n    $(element).html(this.data.title ? this.data.title : \"\");\n    $(this.box).append(element);\n};\n\nModalBox.prototype.renderers.body = function(element) {\n    $(element).html(this.data.body ? this.data.body : \"\");\n    $(this.box).append(element);\n};\n\nModalBox.prototype.render = function() {\n    var config = this.options.modulesOptions.modalBox;\n    $.each(context.renderers, function(name, callback) {\n        var element = context[name] = context[name]\n            ? context[name]\n            : $(context.templates[name].call(context, config));\n\n        callback.call(context, element);\n    });\n};\n\nModalBox.prototype.initCloseHandler = function() {\n    $(this.close).on(\"click\", function(e) {\n        context.hide();\n    });\n};\n\nModalBox.prototype.show = function() {\n    var config = this.options.modulesOptions.modalBox;\n    $(config.appendTo).hide();\n    $(this.box).show();\n    return this;\n};\n\nModalBox.prototype.hide = function() {\n    var config = this.options.modulesOptions.modalBox;\n    $(config.appendTo).show();\n    $(this.box).hide();\n    return this;\n};\n\nreturn ModalBox;\n});"
  },
  {
    "path": "assets/js/lib/prism/prism.css",
    "content": "/**\n * prism.js default theme for JavaScript, CSS and HTML\n * Based on dabblet (http://dabblet.com)\n * @author Lea Verou\n */\n\npre[class*=\"src-\"],\npre[class*=\"src-\"] code {\n    color: #000;\n    font: 12px/1.5 Consolas, Menlo, Monaco, 'Andale Mono', monospace;\n    border-radius:10px;\n    border:0;\n    direction: ltr;\n    text-align: left;\n    white-space: pre;\n    word-spacing: normal;\n    position: relative;\n\n    -moz-tab-size: 4;\n    -o-tab-size: 4;\n    tab-size: 4;\n    -webkit-hyphens: none;\n    -moz-hyphens: none;\n    -ms-hyphens: none;\n    hyphens: none;\n\n}\npre[class*=\"src-\"] code.__visible {\n    opacity:1;\n    -webkit-transition: opacity .3s;\n    -moz-transition: opacity .3s;\n    -o-transition: opacity .3s;\n    transition: opacity .3s;\n}\n\n@media print {\n    pre[class*=\"src-\"],\n    pre[class*=\"src-\"] code {\n        text-shadow: none;\n    }\n}\n\n/* Code blocks */\npre[class*=\"src-\"] {\n    counter-reset: linenumber;\n    padding: 10px 20px;\n    margin: .5em 0;\n    overflow: auto;\n    resize:horizontal;\n}\n\n:not(pre) > code[class*=\"src-\"],\npre[class*=\"src-\"] {\n    background: #f1f2f3;\n    border:1px solid #dfe2e4;\n\t-moz-box-sizing: border-box;\n\tbox-sizing: border-box;\n}\n\n/* Inline code */\n:not(pre) > code[class*=\"src-\"] {\n    padding: .1em;\n    border-radius: .3em;\n}\n\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n    color: slategray;\n}\n\n.token.punctuation {\n    color: #999;\n}\n\n.namespace {\n    opacity: .7;\n}\n\n.token.property,\n.token.prism_tag,\n.token.boolean,\n.token.number,\n.token.constant,\n.token.symbol {\n    color: #905;\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.builtin {\n    color: #690;\n}\n\n.token.operator,\n.token.entity,\n.token.url,\n.src-css .token.string,\n.style .token.string,\n.token.variable {\n    color: #a67f59;\n}\n\n.token.atrule,\n.token.attr-value,\n.token.keyword {\n    color: #07a;\n}\n\n\n.token.regex,\n.token.important {\n    color: #e90;\n}\n\n.token.important {\n    font-weight: bold;\n}\n\n.token.entity {\n    cursor: help;\n}\n\n.token.json-property {\n    color: #07A;\n    }\n\n.token.old {\n    margin-right: .25em;\n    color: #f66;\n    text-decoration:line-through\n    }\n\n.token.new {\n    color:#690\n    }\n\n.line-numbers-rows {\n    position: absolute;\n    pointer-events: none;\n    top: 0;\n    font-size: 100%;\n    left: -3.8em;\n    width: 3em; /* works for line-numbers below 1000 lines */\n    letter-spacing: -1px;\n    border-right: 1px solid #aaa;\n    line-height:1.5;\n    -webkit-user-select: none;\n    -moz-user-select: none;\n    -ms-user-select: none;\n    user-select: none;\n\n}\n\n.line-numbers-rows > span {\n    pointer-events: none;\n    display: block;\n    counter-increment: linenumber;\n}\n\n.line-numbers-rows > span:before {\n    content: counter(linenumber);\n    color: #aaa;\n    display: block;\n    padding-right: 0.8em;\n    text-align: right;\n}\n"
  },
  {
    "path": "assets/js/lib/prism/prism.js",
    "content": "/**\n * Prism: Lightweight, robust, elegant syntax highlighting\n * MIT license http://www.opensource.org/licenses/mit-license.php/\n * @author Lea Verou http://lea.verou.me\n */\n\n(function(){\n\n// Private helper vars\n    var lang = /\\bsrc?-(?!\\*)(\\w+)\\b/i;\n\n    var _ = self.Prism = {\n        util: {\n            type: function (o) {\n                return Object.prototype.toString.call(o).match(/\\[object (\\w+)\\]/)[1];\n            },\n\n            // Deep clone a language definition (e.g. to extend it)\n            clone: function (o) {\n                var type = _.util.type(o);\n\n                switch (type) {\n                    case 'Object':\n                        var clone = {};\n\n                        for (var key in o) {\n                            if (o.hasOwnProperty(key)) {\n                                clone[key] = _.util.clone(o[key]);\n                            }\n                        }\n\n                        return clone;\n\n                    case 'Array':\n                        return o.slice();\n                }\n\n                return o;\n            }\n        },\n\n        languages: {\n            extend: function (id, redef) {\n                var lang = _.util.clone(_.languages[id]);\n\n                for (var key in redef) {\n                    lang[key] = redef[key];\n                }\n\n                return lang;\n            },\n\n            // Insert a token before another token in a language literal\n            insertBefore: function (inside, before, insert, root) {\n                root = root || _.languages;\n                var grammar = root[inside];\n                var ret = {};\n\n                for (var token in grammar) {\n\n                    if (grammar.hasOwnProperty(token)) {\n\n                        if (token == before) {\n\n                            for (var newToken in insert) {\n\n                                if (insert.hasOwnProperty(newToken)) {\n                                    ret[newToken] = insert[newToken];\n                                }\n                            }\n                        }\n\n                        ret[token] = grammar[token];\n                    }\n                }\n\n                return root[inside] = ret;\n            },\n\n            // Traverse a language definition with Depth First Search\n            DFS: function(o, callback) {\n                for (var i in o) {\n                    callback.call(o, i, o[i]);\n\n                    if (_.util.type(o) === 'Object') {\n                        _.languages.DFS(o[i], callback);\n                    }\n                }\n            }\n        },\n\n        highlightAll: function(async, callback) {\n//            var elements = document.querySelectorAll('code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code');\n            var elements = document.querySelectorAll('pre[class*=\"src\"] code');\n\n            for (var i=0, element; element = elements[i++];) {\n                _.highlightElement(element, async === true, callback);\n            }\n        },\n\n        highlightElement: function(element, async, callback) {\n            // Find language\n            var language, grammar, parent = element;\n\n            while (parent && !lang.test(parent.className)) {\n                parent = parent.parentNode;\n            }\n\n            if (parent) {\n                language = (parent.className.match(lang) || [,''])[1];\n                grammar = _.languages[language];\n            }\n\n            if (!grammar) {\n                return;\n            }\n\n            // Set language on the element, if not present\n//            element.className = element.className.replace(lang, '').replace(/\\s+/g, ' ') + 'lang-' + language;\n\n            // Set language on the parent, for styling\n            parent = element.parentNode;\n\n            if (/pre/i.test(parent.nodeName)) {\n                parent.className = parent.className.replace(lang, '').replace(/\\s+/g, ' ') + ' src-' + language;\n            }\n\n            var code = element.textContent;\n\n            if(!code) {\n                return;\n            }\n\n            code = code.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\\u00a0/g, ' ');\n\n            var env = {\n                element: element,\n                language: language,\n                grammar: grammar,\n                code: code\n            };\n\n            _.hooks.run('before-highlight', env);\n\n            if (async && self.Worker) {\n                var worker = new Worker(_.filename);\n\n                worker.onmessage = function(evt) {\n                    env.highlightedCode = Token.stringify(JSON.parse(evt.data), language);\n\n                    _.hooks.run('before-insert', env);\n\n                    env.element.innerHTML = env.highlightedCode;\n\n                    callback && callback.call(env.element);\n                    _.hooks.run('after-highlight', env);\n                };\n\n                worker.postMessage(JSON.stringify({\n                    language: env.language,\n                    code: env.code\n                }));\n            }\n            else {\n                env.highlightedCode = _.highlight(env.code, env.grammar, env.language)\n\n                _.hooks.run('before-insert', env);\n\n                env.element.innerHTML = env.highlightedCode;\n\n                callback && callback.call(element);\n\n                _.hooks.run('after-highlight', env);\n            }\n        },\n\n        highlight: function (text, grammar, language) {\n            return Token.stringify(_.tokenize(text, grammar), language);\n        },\n\n        tokenize: function(text, grammar, language) {\n            var Token = _.Token;\n\n            var strarr = [text];\n\n            var rest = grammar.rest;\n\n            if (rest) {\n                for (var token in rest) {\n                    grammar[token] = rest[token];\n                }\n\n                delete grammar.rest;\n            }\n\n            tokenloop: for (var token in grammar) {\n                if(!grammar.hasOwnProperty(token) || !grammar[token]) {\n                    continue;\n                }\n\n                var pattern = grammar[token],\n                    inside = pattern.inside,\n                    lookbehind = !!pattern.lookbehind,\n                    lookbehindLength = 0;\n\n                pattern = pattern.pattern || pattern;\n\n                for (var i=0; i<strarr.length; i++) { // Don’t cache length as it changes during the loop\n\n                    var str = strarr[i];\n\n                    if (strarr.length > text.length) {\n                        // Something went terribly wrong, ABORT, ABORT!\n                        break tokenloop;\n                    }\n\n                    if (str instanceof Token) {\n                        continue;\n                    }\n\n                    pattern.lastIndex = 0;\n\n                    var match = pattern.exec(str);\n\n                    if (match) {\n                        if(lookbehind) {\n                            lookbehindLength = match[1].length;\n                        }\n\n                        var from = match.index - 1 + lookbehindLength,\n                            match = match[0].slice(lookbehindLength),\n                            len = match.length,\n                            to = from + len,\n                            before = str.slice(0, from + 1),\n                            after = str.slice(to + 1);\n\n                        var args = [i, 1];\n\n                        if (before) {\n                            args.push(before);\n                        }\n\n                        var wrapped = new Token(token, inside? _.tokenize(match, inside) : match);\n\n                        args.push(wrapped);\n\n                        if (after) {\n                            args.push(after);\n                        }\n\n                        Array.prototype.splice.apply(strarr, args);\n                    }\n                }\n            }\n\n            return strarr;\n        },\n\n        hooks: {\n            all: {},\n\n            add: function (name, callback) {\n                var hooks = _.hooks.all;\n\n                hooks[name] = hooks[name] || [];\n\n                hooks[name].push(callback);\n            },\n\n            run: function (name, env) {\n                var callbacks = _.hooks.all[name];\n\n                if (!callbacks || !callbacks.length) {\n                    return;\n                }\n\n                for (var i=0, callback; callback = callbacks[i++];) {\n                    callback(env);\n                }\n            }\n        }\n    };\n\n    var Token = _.Token = function(type, content) {\n        this.type = type;\n        this.content = content;\n    };\n\n    Token.stringify = function(o, language, parent) {\n        if (typeof o == 'string') {\n            return o;\n        }\n\n        if (Object.prototype.toString.call(o) == '[object Array]') {\n            return o.map(function(element) {\n                return Token.stringify(element, language, o);\n            }).join('');\n        }\n\n        var env = {\n            type: o.type,\n            content: Token.stringify(o.content, language, parent),\n            prism_tag: 'span',\n            classes: ['token', o.type],\n            attributes: {},\n            language: language,\n            parent: parent\n        };\n\n        if (env.type == 'comment') {\n            env.attributes['spellcheck'] = 'true';\n        }\n\n        _.hooks.run('wrap', env);\n\n        var attributes = '';\n\n        for (var name in env.attributes) {\n            attributes += name + '=\"' + (env.attributes[name] || '') + '\"';\n        }\n\n        return '<' + env.prism_tag + ' class=\"' + env.classes.join(' ') + '\" ' + attributes + '>' + env.content + '</' + env.prism_tag + '>';\n\n    };\n\n    if (!self.document) {\n        // In worker\n        self.addEventListener('message', function(evt) {\n            var message = JSON.parse(evt.data),\n                lang = message.language,\n                code = message.code;\n\n            self.postMessage(JSON.stringify(_.tokenize(code, _.languages[lang])));\n            self.close();\n        }, false);\n\n        return;\n    }\n\n// Get current script and highlight\n    var script = document.getElementsByTagName('script');\n\n    script = script[script.length - 1];\n\n    if (script) {\n        _.filename = script.src;\n\n        if (document.addEventListener && !script.hasAttribute('data-manual')) {\n            document.addEventListener('DOMContentLoaded', _.highlightAll);\n        }\n    }\n\n})();\n\nPrism.languages.html = {\n    'comment': /&lt;!--[\\w\\W]*?-->/g,\n    'prolog': /&lt;\\?.+?\\?>/,\n    'doctype': /&lt;!DOCTYPE.+?>/,\n    'cdata': /&lt;!\\[CDATA\\[[\\w\\W]*?]]>/i,\n    'prism_tag': {\n        pattern: /&lt;\\/?[\\w:-]+\\s*(?:\\s+[\\w:-]+(?:=(?:(\"|')(\\\\?[\\w\\W])*?\\1|\\w+))?\\s*)*\\/?>/gi,\n        inside: {\n            'prism_tag': {\n                pattern: /^&lt;\\/?[\\w:-]+/i,\n                inside: {\n                    'punctuation': /^&lt;\\/?/,\n                    'namespace': /^[\\w-]+?:/\n                }\n            },\n            'attr-value': {\n                pattern: /=(?:('|\")[\\w\\W]*?(\\1)|[^\\s>]+)/gi,\n                inside: {\n                    'punctuation': /=|>|\"/g\n                }\n            },\n            'punctuation': /\\/?>/g,\n            'attr-name': {\n                pattern: /[\\w:-]+/g,\n                inside: {\n                    'namespace': /^[\\w-]+?:/\n                }\n            }\n\n        }\n    },\n    'entity': /&amp;#?[\\da-z]{1,8};/gi\n};\n\n// Plugin to make entity title show the real entity, idea by Roman Komarov\nPrism.hooks.add('wrap', function(env) {\n\n    if (env.type === 'entity') {\n        env.attributes['title'] = env.content.replace(/&amp;/, '&');\n    }\n});;\nPrism.languages.css = {\n    'comment': /\\/\\*[\\w\\W]*?\\*\\//g,\n    'atrule': {\n        pattern: /@[\\w-]+?.*?(;|(?=\\s*{))/gi,\n        inside: {\n            'punctuation': /[;:]/g\n        }\n    },\n    'url': /url\\(([\"']?).*?\\1\\)/gi,\n    'selector': /[^\\{\\}\\s][^\\{\\};]*(?=\\s*\\{)/g,\n    'property': /(\\b|\\B)[\\w-]+(?=\\s*:)/ig,\n    'string': /(\"|')(\\\\?.)*?\\1/g,\n    'important': /\\B!important\\b/gi,\n    'ignore': /&(lt|gt|amp);/gi,\n    'punctuation': /[\\{\\};:]/g\n};\n\nif (Prism.languages.html) {\n    Prism.languages.insertBefore('html', 'prism_tag', {\n        'style': {\n            pattern: /(&lt;|<)style[\\w\\W]*?(>|&gt;)[\\w\\W]*?(&lt;|<)\\/style(>|&gt;)/ig,\n            inside: {\n                'prism_tag': {\n                    pattern: /(&lt;|<)style[\\w\\W]*?(>|&gt;)|(&lt;|<)\\/style(>|&gt;)/ig,\n                    inside: Prism.languages.html.prism_tag.inside\n                },\n                rest: Prism.languages.css\n            }\n        }\n    });\n};\nPrism.languages.clike = {\n    'comment': {\n        pattern: /(^|[^\\\\])(\\/\\*[\\w\\W]*?\\*\\/|(^|[^:])\\/\\/.*?(\\r?\\n|$))/g,\n        lookbehind: true\n    },\n    'string': /(\"|')(\\\\?.)*?\\1/g,\n    'class-name': {\n        pattern: /((?:(?:class|interface|extends|implements|trait|instanceof|new)\\s+)|(?:catch\\s+\\())[a-z0-9_\\.\\\\]+/ig,\n        lookbehind: true,\n        inside: {\n            punctuation: /(\\.|\\\\)/\n        }\n    },\n    'keyword': /\\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\\b/g,\n    'boolean': /\\b(true|false)\\b/g,\n    'function': {\n        pattern: /[a-z0-9_]+\\(/ig,\n        inside: {\n            punctuation: /\\(/\n        }\n    },\n    'number': /\\b-?(0x[\\dA-Fa-f]+|\\d*\\.?\\d+([Ee]-?\\d+)?)\\b/g,\n    'operator': /[-+]{1,2}|!|&lt;=?|>=?|={1,3}|(&amp;){1,2}|\\|?\\||\\?|\\*|\\/|\\~|\\^|\\%/g,\n    'ignore': /&(lt|gt|amp);/gi,\n    'punctuation': /[{}[\\];(),.:]/g\n};\n;\nPrism.languages.js = Prism.languages.extend('clike', {\n    'keyword': /\\b(var|let|if|else|while|do|for|return|in|instanceof|function|new|with|typeof|try|throw|catch|finally|null|break|continue)\\b/g,\n    'number': /\\b-?(0x[\\dA-Fa-f]+|\\d*\\.?\\d+([Ee]-?\\d+)?|NaN|-?Infinity)\\b/g\n});\n\nPrism.languages.insertBefore('js', 'keyword', {\n    'regex': {\n        pattern: /(^|[^/])\\/(?!\\/)(\\[.+?]|\\\\.|[^/\\r\\n])+\\/[gim]{0,3}(?=\\s*($|[\\r\\n,.;})]))/g,\n        lookbehind: true\n    }\n});\n\nif (Prism.languages.html) {\n    Prism.languages.insertBefore('html', 'prism_tag', {\n        'script': {\n            pattern: /(&lt;|<)script[\\w\\W]*?(>|&gt;)[\\w\\W]*?(&lt;|<)\\/script(>|&gt;)/ig,\n            inside: {\n                'prism_tag': {\n                    pattern: /(&lt;|<)script[\\w\\W]*?(>|&gt;)|(&lt;|<)\\/script(>|&gt;)/ig,\n                    inside: Prism.languages.html.prism_tag.inside\n                },\n                rest: Prism.languages.js\n            }\n        }\n    });\n}\n;\nPrism.languages.bash = Prism.languages.extend('clike', {\n    'comment': {\n        pattern: /(^|[^\"{\\\\])(#.*?(\\r?\\n|$))/g,\n        lookbehind: true\n    },\n    'string': {\n        //allow multiline string\n        pattern: /(\"|')(\\\\?[\\s\\S])*?\\1/g,\n        inside: {\n            //'property' class reused for bash variables\n            'property': /\\$([a-zA-Z0-9_#\\?\\-\\*!@]+|\\{[^\\}]+\\})/g\n        }\n    },\n    'keyword': /\\b(if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)\\b/g\n});\n\nPrism.languages.insertBefore('bash', 'keyword', {\n    //'property' class reused for bash variables\n    'property': /\\$([a-zA-Z0-9_#\\?\\-\\*!@]+|\\{[^}]+\\})/g\n});\nPrism.languages.insertBefore('bash', 'comment', {\n    //shebang must be before comment, 'important' class from css reused\n    'important': /(^#!\\s*\\/bin\\/bash)|(^#!\\s*\\/bin\\/sh)/g\n});"
  },
  {
    "path": "assets/js/lib/require.js",
    "content": "/** vim: et:ts=4:sw=4:sts=4\n * @license RequireJS 2.1.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/jrburke/requirejs for details\n */\n//Not using strict: uneven strict support in browsers, #392, and causes\n//problems with requirejs.exec()/transpiler plugins that may not be strict.\n/*jslint regexp: true, nomen: true, sloppy: true */\n/*global window, navigator, document, importScripts, setTimeout, opera */\n\nvar requirejs, require, define;\n(function (global) {\n    var req, s, head, baseElement, dataMain, src,\n        interactiveScript, currentlyAddingScript, mainScript, subPath,\n        version = '2.1.14',\n        commentRegExp = /(\\/\\*([\\s\\S]*?)\\*\\/|([^:]|^)\\/\\/(.*)$)/mg,\n        cjsRequireRegExp = /[^.]\\s*require\\s*\\(\\s*[\"']([^'\"\\s]+)[\"']\\s*\\)/g,\n        jsSuffixRegExp = /\\.js$/,\n        currDirRegExp = /^\\.\\//,\n        op = Object.prototype,\n        ostring = op.toString,\n        hasOwn = op.hasOwnProperty,\n        ap = Array.prototype,\n        apsp = ap.splice,\n        isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),\n        isWebWorker = !isBrowser && typeof importScripts !== 'undefined',\n        //PS3 indicates loaded and complete, but need to wait for complete\n        //specifically. Sequence is 'loading', 'loaded', execution,\n        // then 'complete'. The UA check is unfortunate, but not sure how\n        //to feature test w/o causing perf issues.\n        readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?\n                      /^complete$/ : /^(complete|loaded)$/,\n        defContextName = '_',\n        //Oh the tragedy, detecting opera. See the usage of isOpera for reason.\n        isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',\n        contexts = {},\n        cfg = {},\n        globalDefQueue = [],\n        useInteractive = false;\n\n    function isFunction(it) {\n        return ostring.call(it) === '[object Function]';\n    }\n\n    function isArray(it) {\n        return ostring.call(it) === '[object Array]';\n    }\n\n    /**\n     * Helper function for iterating over an array. If the func returns\n     * a true value, it will break out of the loop.\n     */\n    function each(ary, func) {\n        if (ary) {\n            var i;\n            for (i = 0; i < ary.length; i += 1) {\n                if (ary[i] && func(ary[i], i, ary)) {\n                    break;\n                }\n            }\n        }\n    }\n\n    /**\n     * Helper function for iterating over an array backwards. If the func\n     * returns a true value, it will break out of the loop.\n     */\n    function eachReverse(ary, func) {\n        if (ary) {\n            var i;\n            for (i = ary.length - 1; i > -1; i -= 1) {\n                if (ary[i] && func(ary[i], i, ary)) {\n                    break;\n                }\n            }\n        }\n    }\n\n    function hasProp(obj, prop) {\n        return hasOwn.call(obj, prop);\n    }\n\n    function getOwn(obj, prop) {\n        return hasProp(obj, prop) && obj[prop];\n    }\n\n    /**\n     * Cycles over properties in an object and calls a function for each\n     * property value. If the function returns a truthy value, then the\n     * iteration is stopped.\n     */\n    function eachProp(obj, func) {\n        var prop;\n        for (prop in obj) {\n            if (hasProp(obj, prop)) {\n                if (func(obj[prop], prop)) {\n                    break;\n                }\n            }\n        }\n    }\n\n    /**\n     * Simple function to mix in properties from source into target,\n     * but only if target does not already have a property of the same name.\n     */\n    function mixin(target, source, force, deepStringMixin) {\n        if (source) {\n            eachProp(source, function (value, prop) {\n                if (force || !hasProp(target, prop)) {\n                    if (deepStringMixin && typeof value === 'object' && value &&\n                        !isArray(value) && !isFunction(value) &&\n                        !(value instanceof RegExp)) {\n\n                        if (!target[prop]) {\n                            target[prop] = {};\n                        }\n                        mixin(target[prop], value, force, deepStringMixin);\n                    } else {\n                        target[prop] = value;\n                    }\n                }\n            });\n        }\n        return target;\n    }\n\n    //Similar to Function.prototype.bind, but the 'this' object is specified\n    //first, since it is easier to read/figure out what 'this' will be.\n    function bind(obj, fn) {\n        return function () {\n            return fn.apply(obj, arguments);\n        };\n    }\n\n    function scripts() {\n        return document.getElementsByTagName('script');\n    }\n\n    function defaultOnError(err) {\n        throw err;\n    }\n\n    //Allow getting a global that is expressed in\n    //dot notation, like 'a.b.c'.\n    function getGlobal(value) {\n        if (!value) {\n            return value;\n        }\n        var g = global;\n        each(value.split('.'), function (part) {\n            g = g[part];\n        });\n        return g;\n    }\n\n    /**\n     * Constructs an error with a pointer to an URL with more information.\n     * @param {String} id the error ID that maps to an ID on a web page.\n     * @param {String} message human readable error.\n     * @param {Error} [err] the original error, if there is one.\n     *\n     * @returns {Error}\n     */\n    function makeError(id, msg, err, requireModules) {\n        var e = new Error(msg + '\\nhttp://requirejs.org/docs/errors.html#' + id);\n        e.requireType = id;\n        e.requireModules = requireModules;\n        if (err) {\n            e.originalError = err;\n        }\n        return e;\n    }\n\n    if (typeof define !== 'undefined') {\n        //If a define is already in play via another AMD loader,\n        //do not overwrite.\n        return;\n    }\n\n    if (typeof requirejs !== 'undefined') {\n        if (isFunction(requirejs)) {\n            //Do not overwrite an existing requirejs instance.\n            return;\n        }\n        cfg = requirejs;\n        requirejs = undefined;\n    }\n\n    //Allow for a require config object\n    if (typeof require !== 'undefined' && !isFunction(require)) {\n        //assume it is a config object.\n        cfg = require;\n        require = undefined;\n    }\n\n    function newContext(contextName) {\n        var inCheckLoaded, Module, context, handlers,\n            checkLoadedTimeoutId,\n            config = {\n                //Defaults. Do not set a default for map\n                //config to speed up normalize(), which\n                //will run faster if there is no default.\n                waitSeconds: 7,\n                baseUrl: './',\n                paths: {},\n                bundles: {},\n                pkgs: {},\n                shim: {},\n                config: {}\n            },\n            registry = {},\n            //registry of just enabled modules, to speed\n            //cycle breaking code when lots of modules\n            //are registered, but not activated.\n            enabledRegistry = {},\n            undefEvents = {},\n            defQueue = [],\n            defined = {},\n            urlFetched = {},\n            bundlesMap = {},\n            requireCounter = 1,\n            unnormalizedCounter = 1;\n\n        /**\n         * Trims the . and .. from an array of path segments.\n         * It will keep a leading path segment if a .. will become\n         * the first path segment, to help with module name lookups,\n         * which act like paths, but can be remapped. But the end result,\n         * all paths that use this function should look normalized.\n         * NOTE: this method MODIFIES the input array.\n         * @param {Array} ary the array of path segments.\n         */\n        function trimDots(ary) {\n            var i, part;\n            for (i = 0; i < ary.length; i++) {\n                part = ary[i];\n                if (part === '.') {\n                    ary.splice(i, 1);\n                    i -= 1;\n                } else if (part === '..') {\n                    // If at the start, or previous value is still ..,\n                    // keep them so that when converted to a path it may\n                    // still work when converted to a path, even though\n                    // as an ID it is less than ideal. In larger point\n                    // releases, may be better to just kick out an error.\n                    if (i === 0 || (i == 1 && ary[2] === '..') || ary[i - 1] === '..') {\n                        continue;\n                    } else if (i > 0) {\n                        ary.splice(i - 1, 2);\n                        i -= 2;\n                    }\n                }\n            }\n        }\n\n        /**\n         * Given a relative module name, like ./something, normalize it to\n         * a real name that can be mapped to a path.\n         * @param {String} name the relative name\n         * @param {String} baseName a real name that the name arg is relative\n         * to.\n         * @param {Boolean} applyMap apply the map config to the value. Should\n         * only be done if this normalization is for a dependency ID.\n         * @returns {String} normalized name\n         */\n        function normalize(name, baseName, applyMap) {\n            var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,\n                foundMap, foundI, foundStarMap, starI, normalizedBaseParts,\n                baseParts = (baseName && baseName.split('/')),\n                map = config.map,\n                starMap = map && map['*'];\n\n            //Adjust any relative paths.\n            if (name) {\n                name = name.split('/');\n                lastIndex = name.length - 1;\n\n                // If wanting node ID compatibility, strip .js from end\n                // of IDs. Have to do this here, and not in nameToUrl\n                // because node allows either .js or non .js to map\n                // to same file.\n                if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\n                    name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');\n                }\n\n                // Starts with a '.' so need the baseName\n                if (name[0].charAt(0) === '.' && baseParts) {\n                    //Convert baseName to array, and lop off the last part,\n                    //so that . matches that 'directory' and not name of the baseName's\n                    //module. For instance, baseName of 'one/two/three', maps to\n                    //'one/two/three.js', but we want the directory, 'one/two' for\n                    //this normalization.\n                    normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);\n                    name = normalizedBaseParts.concat(name);\n                }\n\n                trimDots(name);\n                name = name.join('/');\n            }\n\n            //Apply map config if available.\n            if (applyMap && map && (baseParts || starMap)) {\n                nameParts = name.split('/');\n\n                outerLoop: for (i = nameParts.length; i > 0; i -= 1) {\n                    nameSegment = nameParts.slice(0, i).join('/');\n\n                    if (baseParts) {\n                        //Find the longest baseName segment match in the config.\n                        //So, do joins on the biggest to smallest lengths of baseParts.\n                        for (j = baseParts.length; j > 0; j -= 1) {\n                            mapValue = getOwn(map, baseParts.slice(0, j).join('/'));\n\n                            //baseName segment has config, find if it has one for\n                            //this name.\n                            if (mapValue) {\n                                mapValue = getOwn(mapValue, nameSegment);\n                                if (mapValue) {\n                                    //Match, update name to the new value.\n                                    foundMap = mapValue;\n                                    foundI = i;\n                                    break outerLoop;\n                                }\n                            }\n                        }\n                    }\n\n                    //Check for a star map match, but just hold on to it,\n                    //if there is a shorter segment match later in a matching\n                    //config, then favor over this star map.\n                    if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {\n                        foundStarMap = getOwn(starMap, nameSegment);\n                        starI = i;\n                    }\n                }\n\n                if (!foundMap && foundStarMap) {\n                    foundMap = foundStarMap;\n                    foundI = starI;\n                }\n\n                if (foundMap) {\n                    nameParts.splice(0, foundI, foundMap);\n                    name = nameParts.join('/');\n                }\n            }\n\n            // If the name points to a package's name, use\n            // the package main instead.\n            pkgMain = getOwn(config.pkgs, name);\n\n            return pkgMain ? pkgMain : name;\n        }\n\n        function removeScript(name) {\n            if (isBrowser) {\n                each(scripts(), function (scriptNode) {\n                    if (scriptNode.getAttribute('data-requiremodule') === name &&\n                            scriptNode.getAttribute('data-requirecontext') === context.contextName) {\n                        scriptNode.parentNode.removeChild(scriptNode);\n                        return true;\n                    }\n                });\n            }\n        }\n\n        function hasPathFallback(id) {\n            var pathConfig = getOwn(config.paths, id);\n            if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {\n                //Pop off the first array value, since it failed, and\n                //retry\n                pathConfig.shift();\n                context.require.undef(id);\n\n                //Custom require that does not do map translation, since\n                //ID is \"absolute\", already mapped/resolved.\n                context.makeRequire(null, {\n                    skipMap: true\n                })([id]);\n\n                return true;\n            }\n        }\n\n        //Turns a plugin!resource to [plugin, resource]\n        //with the plugin being undefined if the name\n        //did not have a plugin prefix.\n        function splitPrefix(name) {\n            var prefix,\n                index = name ? name.indexOf('!') : -1;\n            if (index > -1) {\n                prefix = name.substring(0, index);\n                name = name.substring(index + 1, name.length);\n            }\n            return [prefix, name];\n        }\n\n        /**\n         * Creates a module mapping that includes plugin prefix, module\n         * name, and path. If parentModuleMap is provided it will\n         * also normalize the name via require.normalize()\n         *\n         * @param {String} name the module name\n         * @param {String} [parentModuleMap] parent module map\n         * for the module name, used to resolve relative names.\n         * @param {Boolean} isNormalized: is the ID already normalized.\n         * This is true if this call is done for a define() module ID.\n         * @param {Boolean} applyMap: apply the map config to the ID.\n         * Should only be true if this map is for a dependency.\n         *\n         * @returns {Object}\n         */\n        function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {\n            var url, pluginModule, suffix, nameParts,\n                prefix = null,\n                parentName = parentModuleMap ? parentModuleMap.name : null,\n                originalName = name,\n                isDefine = true,\n                normalizedName = '';\n\n            //If no name, then it means it is a require call, generate an\n            //internal name.\n            if (!name) {\n                isDefine = false;\n                name = '_@r' + (requireCounter += 1);\n            }\n\n            nameParts = splitPrefix(name);\n            prefix = nameParts[0];\n            name = nameParts[1];\n\n            if (prefix) {\n                prefix = normalize(prefix, parentName, applyMap);\n                pluginModule = getOwn(defined, prefix);\n            }\n\n            //Account for relative paths if there is a base name.\n            if (name) {\n                if (prefix) {\n                    if (pluginModule && pluginModule.normalize) {\n                        //Plugin is loaded, use its normalize method.\n                        normalizedName = pluginModule.normalize(name, function (name) {\n                            return normalize(name, parentName, applyMap);\n                        });\n                    } else {\n                        // If nested plugin references, then do not try to\n                        // normalize, as it will not normalize correctly. This\n                        // places a restriction on resourceIds, and the longer\n                        // term solution is not to normalize until plugins are\n                        // loaded and all normalizations to allow for async\n                        // loading of a loader plugin. But for now, fixes the\n                        // common uses. Details in #1131\n                        normalizedName = name.indexOf('!') === -1 ?\n                                         normalize(name, parentName, applyMap) :\n                                         name;\n                    }\n                } else {\n                    //A regular module.\n                    normalizedName = normalize(name, parentName, applyMap);\n\n                    //Normalized name may be a plugin ID due to map config\n                    //application in normalize. The map config values must\n                    //already be normalized, so do not need to redo that part.\n                    nameParts = splitPrefix(normalizedName);\n                    prefix = nameParts[0];\n                    normalizedName = nameParts[1];\n                    isNormalized = true;\n\n                    url = context.nameToUrl(normalizedName);\n                }\n            }\n\n            //If the id is a plugin id that cannot be determined if it needs\n            //normalization, stamp it with a unique ID so two matching relative\n            //ids that may conflict can be separate.\n            suffix = prefix && !pluginModule && !isNormalized ?\n                     '_unnormalized' + (unnormalizedCounter += 1) :\n                     '';\n\n            return {\n                prefix: prefix,\n                name: normalizedName,\n                parentMap: parentModuleMap,\n                unnormalized: !!suffix,\n                url: url,\n                originalName: originalName,\n                isDefine: isDefine,\n                id: (prefix ?\n                        prefix + '!' + normalizedName :\n                        normalizedName) + suffix\n            };\n        }\n\n        function getModule(depMap) {\n            var id = depMap.id,\n                mod = getOwn(registry, id);\n\n            if (!mod) {\n                mod = registry[id] = new context.Module(depMap);\n            }\n\n            return mod;\n        }\n\n        function on(depMap, name, fn) {\n            var id = depMap.id,\n                mod = getOwn(registry, id);\n\n            if (hasProp(defined, id) &&\n                    (!mod || mod.defineEmitComplete)) {\n                if (name === 'defined') {\n                    fn(defined[id]);\n                }\n            } else {\n                mod = getModule(depMap);\n                if (mod.error && name === 'error') {\n                    fn(mod.error);\n                } else {\n                    mod.on(name, fn);\n                }\n            }\n        }\n\n        function onError(err, errback) {\n            var ids = err.requireModules,\n                notified = false;\n\n            if (errback) {\n                errback(err);\n            } else {\n                each(ids, function (id) {\n                    var mod = getOwn(registry, id);\n                    if (mod) {\n                        //Set error on module, so it skips timeout checks.\n                        mod.error = err;\n                        if (mod.events.error) {\n                            notified = true;\n                            mod.emit('error', err);\n                        }\n                    }\n                });\n\n                if (!notified) {\n                    req.onError(err);\n                }\n            }\n        }\n\n        /**\n         * Internal method to transfer globalQueue items to this context's\n         * defQueue.\n         */\n        function takeGlobalQueue() {\n            //Push all the globalDefQueue items into the context's defQueue\n            if (globalDefQueue.length) {\n                //Array splice in the values since the context code has a\n                //local var ref to defQueue, so cannot just reassign the one\n                //on context.\n                apsp.apply(defQueue,\n                           [defQueue.length, 0].concat(globalDefQueue));\n                globalDefQueue = [];\n            }\n        }\n\n        handlers = {\n            'require': function (mod) {\n                if (mod.require) {\n                    return mod.require;\n                } else {\n                    return (mod.require = context.makeRequire(mod.map));\n                }\n            },\n            'exports': function (mod) {\n                mod.usingExports = true;\n                if (mod.map.isDefine) {\n                    if (mod.exports) {\n                        return (defined[mod.map.id] = mod.exports);\n                    } else {\n                        return (mod.exports = defined[mod.map.id] = {});\n                    }\n                }\n            },\n            'module': function (mod) {\n                if (mod.module) {\n                    return mod.module;\n                } else {\n                    return (mod.module = {\n                        id: mod.map.id,\n                        uri: mod.map.url,\n                        config: function () {\n                            return  getOwn(config.config, mod.map.id) || {};\n                        },\n                        exports: mod.exports || (mod.exports = {})\n                    });\n                }\n            }\n        };\n\n        function cleanRegistry(id) {\n            //Clean up machinery used for waiting modules.\n            delete registry[id];\n            delete enabledRegistry[id];\n        }\n\n        function breakCycle(mod, traced, processed) {\n            var id = mod.map.id;\n\n            if (mod.error) {\n                mod.emit('error', mod.error);\n            } else {\n                traced[id] = true;\n                each(mod.depMaps, function (depMap, i) {\n                    var depId = depMap.id,\n                        dep = getOwn(registry, depId);\n\n                    //Only force things that have not completed\n                    //being defined, so still in the registry,\n                    //and only if it has not been matched up\n                    //in the module already.\n                    if (dep && !mod.depMatched[i] && !processed[depId]) {\n                        if (getOwn(traced, depId)) {\n                            mod.defineDep(i, defined[depId]);\n                            mod.check(); //pass false?\n                        } else {\n                            breakCycle(dep, traced, processed);\n                        }\n                    }\n                });\n                processed[id] = true;\n            }\n        }\n\n        function checkLoaded() {\n            var err, usingPathFallback,\n                waitInterval = config.waitSeconds * 1000,\n                //It is possible to disable the wait interval by using waitSeconds of 0.\n                expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),\n                noLoads = [],\n                reqCalls = [],\n                stillLoading = false,\n                needCycleCheck = true;\n\n            //Do not bother if this call was a result of a cycle break.\n            if (inCheckLoaded) {\n                return;\n            }\n\n            inCheckLoaded = true;\n\n            //Figure out the state of all the modules.\n            eachProp(enabledRegistry, function (mod) {\n                var map = mod.map,\n                    modId = map.id;\n\n                //Skip things that are not enabled or in error state.\n                if (!mod.enabled) {\n                    return;\n                }\n\n                if (!map.isDefine) {\n                    reqCalls.push(mod);\n                }\n\n                if (!mod.error) {\n                    //If the module should be executed, and it has not\n                    //been inited and time is up, remember it.\n                    if (!mod.inited && expired) {\n                        if (hasPathFallback(modId)) {\n                            usingPathFallback = true;\n                            stillLoading = true;\n                        } else {\n                            noLoads.push(modId);\n                            removeScript(modId);\n                        }\n                    } else if (!mod.inited && mod.fetched && map.isDefine) {\n                        stillLoading = true;\n                        if (!map.prefix) {\n                            //No reason to keep looking for unfinished\n                            //loading. If the only stillLoading is a\n                            //plugin resource though, keep going,\n                            //because it may be that a plugin resource\n                            //is waiting on a non-plugin cycle.\n                            return (needCycleCheck = false);\n                        }\n                    }\n                }\n            });\n\n            if (expired && noLoads.length) {\n                //If wait time expired, throw error of unloaded modules.\n                err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);\n                err.contextName = context.contextName;\n                return onError(err);\n            }\n\n            //Not expired, check for a cycle.\n            if (needCycleCheck) {\n                each(reqCalls, function (mod) {\n                    breakCycle(mod, {}, {});\n                });\n            }\n\n            //If still waiting on loads, and the waiting load is something\n            //other than a plugin resource, or there are still outstanding\n            //scripts, then just try back later.\n            if ((!expired || usingPathFallback) && stillLoading) {\n                //Something is still waiting to load. Wait for it, but only\n                //if a timeout is not already in effect.\n                if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {\n                    checkLoadedTimeoutId = setTimeout(function () {\n                        checkLoadedTimeoutId = 0;\n                        checkLoaded();\n                    }, 50);\n                }\n            }\n\n            inCheckLoaded = false;\n        }\n\n        Module = function (map) {\n            this.events = getOwn(undefEvents, map.id) || {};\n            this.map = map;\n            this.shim = getOwn(config.shim, map.id);\n            this.depExports = [];\n            this.depMaps = [];\n            this.depMatched = [];\n            this.pluginMaps = {};\n            this.depCount = 0;\n\n            /* this.exports this.factory\n               this.depMaps = [],\n               this.enabled, this.fetched\n            */\n        };\n\n        Module.prototype = {\n            init: function (depMaps, factory, errback, options) {\n                options = options || {};\n\n                //Do not do more inits if already done. Can happen if there\n                //are multiple define calls for the same module. That is not\n                //a normal, common case, but it is also not unexpected.\n                if (this.inited) {\n                    return;\n                }\n\n                this.factory = factory;\n\n                if (errback) {\n                    //Register for errors on this module.\n                    this.on('error', errback);\n                } else if (this.events.error) {\n                    //If no errback already, but there are error listeners\n                    //on this module, set up an errback to pass to the deps.\n                    errback = bind(this, function (err) {\n                        this.emit('error', err);\n                    });\n                }\n\n                //Do a copy of the dependency array, so that\n                //source inputs are not modified. For example\n                //\"shim\" deps are passed in here directly, and\n                //doing a direct modification of the depMaps array\n                //would affect that config.\n                this.depMaps = depMaps && depMaps.slice(0);\n\n                this.errback = errback;\n\n                //Indicate this module has be initialized\n                this.inited = true;\n\n                this.ignore = options.ignore;\n\n                //Could have option to init this module in enabled mode,\n                //or could have been previously marked as enabled. However,\n                //the dependencies are not known until init is called. So\n                //if enabled previously, now trigger dependencies as enabled.\n                if (options.enabled || this.enabled) {\n                    //Enable this module and dependencies.\n                    //Will call this.check()\n                    this.enable();\n                } else {\n                    this.check();\n                }\n            },\n\n            defineDep: function (i, depExports) {\n                //Because of cycles, defined callback for a given\n                //export can be called more than once.\n                if (!this.depMatched[i]) {\n                    this.depMatched[i] = true;\n                    this.depCount -= 1;\n                    this.depExports[i] = depExports;\n                }\n            },\n\n            fetch: function () {\n                if (this.fetched) {\n                    return;\n                }\n                this.fetched = true;\n\n                context.startTime = (new Date()).getTime();\n\n                var map = this.map;\n\n                //If the manager is for a plugin managed resource,\n                //ask the plugin to load it now.\n                if (this.shim) {\n                    context.makeRequire(this.map, {\n                        enableBuildCallback: true\n                    })(this.shim.deps || [], bind(this, function () {\n                        return map.prefix ? this.callPlugin() : this.load();\n                    }));\n                } else {\n                    //Regular dependency.\n                    return map.prefix ? this.callPlugin() : this.load();\n                }\n            },\n\n            load: function () {\n                var url = this.map.url;\n\n                //Regular dependency.\n                if (!urlFetched[url]) {\n                    urlFetched[url] = true;\n                    context.load(this.map.id, url);\n                }\n            },\n\n            /**\n             * Checks if the module is ready to define itself, and if so,\n             * define it.\n             */\n            check: function () {\n                if (!this.enabled || this.enabling) {\n                    return;\n                }\n\n                var err, cjsModule,\n                    id = this.map.id,\n                    depExports = this.depExports,\n                    exports = this.exports,\n                    factory = this.factory;\n\n                if (!this.inited) {\n                    this.fetch();\n                } else if (this.error) {\n                    this.emit('error', this.error);\n                } else if (!this.defining) {\n                    //The factory could trigger another require call\n                    //that would result in checking this module to\n                    //define itself again. If already in the process\n                    //of doing that, skip this work.\n                    this.defining = true;\n\n                    if (this.depCount < 1 && !this.defined) {\n                        if (isFunction(factory)) {\n                            //If there is an error listener, favor passing\n                            //to that instead of throwing an error. However,\n                            //only do it for define()'d  modules. require\n                            //errbacks should not be called for failures in\n                            //their callbacks (#699). However if a global\n                            //onError is set, use that.\n                            if ((this.events.error && this.map.isDefine) ||\n                                req.onError !== defaultOnError) {\n                                try {\n                                    exports = context.execCb(id, factory, depExports, exports);\n                                } catch (e) {\n                                    err = e;\n                                }\n                            } else {\n                                exports = context.execCb(id, factory, depExports, exports);\n                            }\n\n                            // Favor return value over exports. If node/cjs in play,\n                            // then will not have a return value anyway. Favor\n                            // module.exports assignment over exports object.\n                            if (this.map.isDefine && exports === undefined) {\n                                cjsModule = this.module;\n                                if (cjsModule) {\n                                    exports = cjsModule.exports;\n                                } else if (this.usingExports) {\n                                    //exports already set the defined value.\n                                    exports = this.exports;\n                                }\n                            }\n\n                            if (err) {\n                                err.requireMap = this.map;\n                                err.requireModules = this.map.isDefine ? [this.map.id] : null;\n                                err.requireType = this.map.isDefine ? 'define' : 'require';\n                                return onError((this.error = err));\n                            }\n\n                        } else {\n                            //Just a literal value\n                            exports = factory;\n                        }\n\n                        this.exports = exports;\n\n                        if (this.map.isDefine && !this.ignore) {\n                            defined[id] = exports;\n\n                            if (req.onResourceLoad) {\n                                req.onResourceLoad(context, this.map, this.depMaps);\n                            }\n                        }\n\n                        //Clean up\n                        cleanRegistry(id);\n\n                        this.defined = true;\n                    }\n\n                    //Finished the define stage. Allow calling check again\n                    //to allow define notifications below in the case of a\n                    //cycle.\n                    this.defining = false;\n\n                    if (this.defined && !this.defineEmitted) {\n                        this.defineEmitted = true;\n                        this.emit('defined', this.exports);\n                        this.defineEmitComplete = true;\n                    }\n\n                }\n            },\n\n            callPlugin: function () {\n                var map = this.map,\n                    id = map.id,\n                    //Map already normalized the prefix.\n                    pluginMap = makeModuleMap(map.prefix);\n\n                //Mark this as a dependency for this plugin, so it\n                //can be traced for cycles.\n                this.depMaps.push(pluginMap);\n\n                on(pluginMap, 'defined', bind(this, function (plugin) {\n                    var load, normalizedMap, normalizedMod,\n                        bundleId = getOwn(bundlesMap, this.map.id),\n                        name = this.map.name,\n                        parentName = this.map.parentMap ? this.map.parentMap.name : null,\n                        localRequire = context.makeRequire(map.parentMap, {\n                            enableBuildCallback: true\n                        });\n\n                    //If current map is not normalized, wait for that\n                    //normalized name to load instead of continuing.\n                    if (this.map.unnormalized) {\n                        //Normalize the ID if the plugin allows it.\n                        if (plugin.normalize) {\n                            name = plugin.normalize(name, function (name) {\n                                return normalize(name, parentName, true);\n                            }) || '';\n                        }\n\n                        //prefix and name should already be normalized, no need\n                        //for applying map config again either.\n                        normalizedMap = makeModuleMap(map.prefix + '!' + name,\n                                                      this.map.parentMap);\n                        on(normalizedMap,\n                            'defined', bind(this, function (value) {\n                                this.init([], function () { return value; }, null, {\n                                    enabled: true,\n                                    ignore: true\n                                });\n                            }));\n\n                        normalizedMod = getOwn(registry, normalizedMap.id);\n                        if (normalizedMod) {\n                            //Mark this as a dependency for this plugin, so it\n                            //can be traced for cycles.\n                            this.depMaps.push(normalizedMap);\n\n                            if (this.events.error) {\n                                normalizedMod.on('error', bind(this, function (err) {\n                                    this.emit('error', err);\n                                }));\n                            }\n                            normalizedMod.enable();\n                        }\n\n                        return;\n                    }\n\n                    //If a paths config, then just load that file instead to\n                    //resolve the plugin, as it is built into that paths layer.\n                    if (bundleId) {\n                        this.map.url = context.nameToUrl(bundleId);\n                        this.load();\n                        return;\n                    }\n\n                    load = bind(this, function (value) {\n                        this.init([], function () { return value; }, null, {\n                            enabled: true\n                        });\n                    });\n\n                    load.error = bind(this, function (err) {\n                        this.inited = true;\n                        this.error = err;\n                        err.requireModules = [id];\n\n                        //Remove temp unnormalized modules for this module,\n                        //since they will never be resolved otherwise now.\n                        eachProp(registry, function (mod) {\n                            if (mod.map.id.indexOf(id + '_unnormalized') === 0) {\n                                cleanRegistry(mod.map.id);\n                            }\n                        });\n\n                        onError(err);\n                    });\n\n                    //Allow plugins to load other code without having to know the\n                    //context or how to 'complete' the load.\n                    load.fromText = bind(this, function (text, textAlt) {\n                        /*jslint evil: true */\n                        var moduleName = map.name,\n                            moduleMap = makeModuleMap(moduleName),\n                            hasInteractive = useInteractive;\n\n                        //As of 2.1.0, support just passing the text, to reinforce\n                        //fromText only being called once per resource. Still\n                        //support old style of passing moduleName but discard\n                        //that moduleName in favor of the internal ref.\n                        if (textAlt) {\n                            text = textAlt;\n                        }\n\n                        //Turn off interactive script matching for IE for any define\n                        //calls in the text, then turn it back on at the end.\n                        if (hasInteractive) {\n                            useInteractive = false;\n                        }\n\n                        //Prime the system by creating a module instance for\n                        //it.\n                        getModule(moduleMap);\n\n                        //Transfer any config to this other module.\n                        if (hasProp(config.config, id)) {\n                            config.config[moduleName] = config.config[id];\n                        }\n\n                        try {\n                            req.exec(text);\n                        } catch (e) {\n                            return onError(makeError('fromtexteval',\n                                             'fromText eval for ' + id +\n                                            ' failed: ' + e,\n                                             e,\n                                             [id]));\n                        }\n\n                        if (hasInteractive) {\n                            useInteractive = true;\n                        }\n\n                        //Mark this as a dependency for the plugin\n                        //resource\n                        this.depMaps.push(moduleMap);\n\n                        //Support anonymous modules.\n                        context.completeLoad(moduleName);\n\n                        //Bind the value of that module to the value for this\n                        //resource ID.\n                        localRequire([moduleName], load);\n                    });\n\n                    //Use parentName here since the plugin's name is not reliable,\n                    //could be some weird string with no path that actually wants to\n                    //reference the parentName's path.\n                    plugin.load(map.name, localRequire, load, config);\n                }));\n\n                context.enable(pluginMap, this);\n                this.pluginMaps[pluginMap.id] = pluginMap;\n            },\n\n            enable: function () {\n                enabledRegistry[this.map.id] = this;\n                this.enabled = true;\n\n                //Set flag mentioning that the module is enabling,\n                //so that immediate calls to the defined callbacks\n                //for dependencies do not trigger inadvertent load\n                //with the depCount still being zero.\n                this.enabling = true;\n\n                //Enable each dependency\n                each(this.depMaps, bind(this, function (depMap, i) {\n                    var id, mod, handler;\n\n                    if (typeof depMap === 'string') {\n                        //Dependency needs to be converted to a depMap\n                        //and wired up to this module.\n                        depMap = makeModuleMap(depMap,\n                                               (this.map.isDefine ? this.map : this.map.parentMap),\n                                               false,\n                                               !this.skipMap);\n                        this.depMaps[i] = depMap;\n\n                        handler = getOwn(handlers, depMap.id);\n\n                        if (handler) {\n                            this.depExports[i] = handler(this);\n                            return;\n                        }\n\n                        this.depCount += 1;\n\n                        on(depMap, 'defined', bind(this, function (depExports) {\n                            this.defineDep(i, depExports);\n                            this.check();\n                        }));\n\n                        if (this.errback) {\n                            on(depMap, 'error', bind(this, this.errback));\n                        }\n                    }\n\n                    id = depMap.id;\n                    mod = registry[id];\n\n                    //Skip special modules like 'require', 'exports', 'module'\n                    //Also, don't call enable if it is already enabled,\n                    //important in circular dependency cases.\n                    if (!hasProp(handlers, id) && mod && !mod.enabled) {\n                        context.enable(depMap, this);\n                    }\n                }));\n\n                //Enable each plugin that is used in\n                //a dependency\n                eachProp(this.pluginMaps, bind(this, function (pluginMap) {\n                    var mod = getOwn(registry, pluginMap.id);\n                    if (mod && !mod.enabled) {\n                        context.enable(pluginMap, this);\n                    }\n                }));\n\n                this.enabling = false;\n\n                this.check();\n            },\n\n            on: function (name, cb) {\n                var cbs = this.events[name];\n                if (!cbs) {\n                    cbs = this.events[name] = [];\n                }\n                cbs.push(cb);\n            },\n\n            emit: function (name, evt) {\n                each(this.events[name], function (cb) {\n                    cb(evt);\n                });\n                if (name === 'error') {\n                    //Now that the error handler was triggered, remove\n                    //the listeners, since this broken Module instance\n                    //can stay around for a while in the registry.\n                    delete this.events[name];\n                }\n            }\n        };\n\n        function callGetModule(args) {\n            //Skip modules already defined.\n            if (!hasProp(defined, args[0])) {\n                getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);\n            }\n        }\n\n        function removeListener(node, func, name, ieName) {\n            //Favor detachEvent because of IE9\n            //issue, see attachEvent/addEventListener comment elsewhere\n            //in this file.\n            if (node.detachEvent && !isOpera) {\n                //Probably IE. If not it will throw an error, which will be\n                //useful to know.\n                if (ieName) {\n                    node.detachEvent(ieName, func);\n                }\n            } else {\n                node.removeEventListener(name, func, false);\n            }\n        }\n\n        /**\n         * Given an event from a script node, get the requirejs info from it,\n         * and then removes the event listeners on the node.\n         * @param {Event} evt\n         * @returns {Object}\n         */\n        function getScriptData(evt) {\n            //Using currentTarget instead of target for Firefox 2.0's sake. Not\n            //all old browsers will be supported, but this one was easy enough\n            //to support and still makes sense.\n            var node = evt.currentTarget || evt.srcElement;\n\n            //Remove the listeners once here.\n            removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');\n            removeListener(node, context.onScriptError, 'error');\n\n            return {\n                node: node,\n                id: node && node.getAttribute('data-requiremodule')\n            };\n        }\n\n        function intakeDefines() {\n            var args;\n\n            //Any defined modules in the global queue, intake them now.\n            takeGlobalQueue();\n\n            //Make sure any remaining defQueue items get properly processed.\n            while (defQueue.length) {\n                args = defQueue.shift();\n                if (args[0] === null) {\n                    return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));\n                } else {\n                    //args are id, deps, factory. Should be normalized by the\n                    //define() function.\n                    callGetModule(args);\n                }\n            }\n        }\n\n        context = {\n            config: config,\n            contextName: contextName,\n            registry: registry,\n            defined: defined,\n            urlFetched: urlFetched,\n            defQueue: defQueue,\n            Module: Module,\n            makeModuleMap: makeModuleMap,\n            nextTick: req.nextTick,\n            onError: onError,\n\n            /**\n             * Set a configuration for the context.\n             * @param {Object} cfg config object to integrate.\n             */\n            configure: function (cfg) {\n                //Make sure the baseUrl ends in a slash.\n                if (cfg.baseUrl) {\n                    if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {\n                        cfg.baseUrl += '/';\n                    }\n                }\n\n                //Save off the paths since they require special processing,\n                //they are additive.\n                var shim = config.shim,\n                    objs = {\n                        paths: true,\n                        bundles: true,\n                        config: true,\n                        map: true\n                    };\n\n                eachProp(cfg, function (value, prop) {\n                    if (objs[prop]) {\n                        if (!config[prop]) {\n                            config[prop] = {};\n                        }\n                        mixin(config[prop], value, true, true);\n                    } else {\n                        config[prop] = value;\n                    }\n                });\n\n                //Reverse map the bundles\n                if (cfg.bundles) {\n                    eachProp(cfg.bundles, function (value, prop) {\n                        each(value, function (v) {\n                            if (v !== prop) {\n                                bundlesMap[v] = prop;\n                            }\n                        });\n                    });\n                }\n\n                //Merge shim\n                if (cfg.shim) {\n                    eachProp(cfg.shim, function (value, id) {\n                        //Normalize the structure\n                        if (isArray(value)) {\n                            value = {\n                                deps: value\n                            };\n                        }\n                        if ((value.exports || value.init) && !value.exportsFn) {\n                            value.exportsFn = context.makeShimExports(value);\n                        }\n                        shim[id] = value;\n                    });\n                    config.shim = shim;\n                }\n\n                //Adjust packages if necessary.\n                if (cfg.packages) {\n                    each(cfg.packages, function (pkgObj) {\n                        var location, name;\n\n                        pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;\n\n                        name = pkgObj.name;\n                        location = pkgObj.location;\n                        if (location) {\n                            config.paths[name] = pkgObj.location;\n                        }\n\n                        //Save pointer to main module ID for pkg name.\n                        //Remove leading dot in main, so main paths are normalized,\n                        //and remove any trailing .js, since different package\n                        //envs have different conventions: some use a module name,\n                        //some use a file name.\n                        config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')\n                                     .replace(currDirRegExp, '')\n                                     .replace(jsSuffixRegExp, '');\n                    });\n                }\n\n                //If there are any \"waiting to execute\" modules in the registry,\n                //update the maps for them, since their info, like URLs to load,\n                //may have changed.\n                eachProp(registry, function (mod, id) {\n                    //If module already has init called, since it is too\n                    //late to modify them, and ignore unnormalized ones\n                    //since they are transient.\n                    if (!mod.inited && !mod.map.unnormalized) {\n                        mod.map = makeModuleMap(id);\n                    }\n                });\n\n                //If a deps array or a config callback is specified, then call\n                //require with those args. This is useful when require is defined as a\n                //config object before require.js is loaded.\n                if (cfg.deps || cfg.callback) {\n                    context.require(cfg.deps || [], cfg.callback);\n                }\n            },\n\n            makeShimExports: function (value) {\n                function fn() {\n                    var ret;\n                    if (value.init) {\n                        ret = value.init.apply(global, arguments);\n                    }\n                    return ret || (value.exports && getGlobal(value.exports));\n                }\n                return fn;\n            },\n\n            makeRequire: function (relMap, options) {\n                options = options || {};\n\n                function localRequire(deps, callback, errback) {\n                    var id, map, requireMod;\n\n                    if (options.enableBuildCallback && callback && isFunction(callback)) {\n                        callback.__requireJsBuild = true;\n                    }\n\n                    if (typeof deps === 'string') {\n                        if (isFunction(callback)) {\n                            //Invalid call\n                            return onError(makeError('requireargs', 'Invalid require call'), errback);\n                        }\n\n                        //If require|exports|module are requested, get the\n                        //value for them from the special handlers. Caveat:\n                        //this only works while module is being defined.\n                        if (relMap && hasProp(handlers, deps)) {\n                            return handlers[deps](registry[relMap.id]);\n                        }\n\n                        //Synchronous access to one module. If require.get is\n                        //available (as in the Node adapter), prefer that.\n                        if (req.get) {\n                            return req.get(context, deps, relMap, localRequire);\n                        }\n\n                        //Normalize module name, if it contains . or ..\n                        map = makeModuleMap(deps, relMap, false, true);\n                        id = map.id;\n\n                        if (!hasProp(defined, id)) {\n                            return onError(makeError('notloaded', 'Module name \"' +\n                                        id +\n                                        '\" has not been loaded yet for context: ' +\n                                        contextName +\n                                        (relMap ? '' : '. Use require([])')));\n                        }\n                        return defined[id];\n                    }\n\n                    //Grab defines waiting in the global queue.\n                    intakeDefines();\n\n                    //Mark all the dependencies as needing to be loaded.\n                    context.nextTick(function () {\n                        //Some defines could have been added since the\n                        //require call, collect them.\n                        intakeDefines();\n\n                        requireMod = getModule(makeModuleMap(null, relMap));\n\n                        //Store if map config should be applied to this require\n                        //call for dependencies.\n                        requireMod.skipMap = options.skipMap;\n\n                        requireMod.init(deps, callback, errback, {\n                            enabled: true\n                        });\n\n                        checkLoaded();\n                    });\n\n                    return localRequire;\n                }\n\n                mixin(localRequire, {\n                    isBrowser: isBrowser,\n\n                    /**\n                     * Converts a module name + .extension into an URL path.\n                     * *Requires* the use of a module name. It does not support using\n                     * plain URLs like nameToUrl.\n                     */\n                    toUrl: function (moduleNamePlusExt) {\n                        var ext,\n                            index = moduleNamePlusExt.lastIndexOf('.'),\n                            segment = moduleNamePlusExt.split('/')[0],\n                            isRelative = segment === '.' || segment === '..';\n\n                        //Have a file extension alias, and it is not the\n                        //dots from a relative path.\n                        if (index !== -1 && (!isRelative || index > 1)) {\n                            ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);\n                            moduleNamePlusExt = moduleNamePlusExt.substring(0, index);\n                        }\n\n                        return context.nameToUrl(normalize(moduleNamePlusExt,\n                                                relMap && relMap.id, true), ext,  true);\n                    },\n\n                    defined: function (id) {\n                        return hasProp(defined, makeModuleMap(id, relMap, false, true).id);\n                    },\n\n                    specified: function (id) {\n                        id = makeModuleMap(id, relMap, false, true).id;\n                        return hasProp(defined, id) || hasProp(registry, id);\n                    }\n                });\n\n                //Only allow undef on top level require calls\n                if (!relMap) {\n                    localRequire.undef = function (id) {\n                        //Bind any waiting define() calls to this context,\n                        //fix for #408\n                        takeGlobalQueue();\n\n                        var map = makeModuleMap(id, relMap, true),\n                            mod = getOwn(registry, id);\n\n                        removeScript(id);\n\n                        delete defined[id];\n                        delete urlFetched[map.url];\n                        delete undefEvents[id];\n\n                        //Clean queued defines too. Go backwards\n                        //in array so that the splices do not\n                        //mess up the iteration.\n                        eachReverse(defQueue, function(args, i) {\n                            if(args[0] === id) {\n                                defQueue.splice(i, 1);\n                            }\n                        });\n\n                        if (mod) {\n                            //Hold on to listeners in case the\n                            //module will be attempted to be reloaded\n                            //using a different config.\n                            if (mod.events.defined) {\n                                undefEvents[id] = mod.events;\n                            }\n\n                            cleanRegistry(id);\n                        }\n                    };\n                }\n\n                return localRequire;\n            },\n\n            /**\n             * Called to enable a module if it is still in the registry\n             * awaiting enablement. A second arg, parent, the parent module,\n             * is passed in for context, when this method is overridden by\n             * the optimizer. Not shown here to keep code compact.\n             */\n            enable: function (depMap) {\n                var mod = getOwn(registry, depMap.id);\n                if (mod) {\n                    getModule(depMap).enable();\n                }\n            },\n\n            /**\n             * Internal method used by environment adapters to complete a load event.\n             * A load event could be a script load or just a load pass from a synchronous\n             * load call.\n             * @param {String} moduleName the name of the module to potentially complete.\n             */\n            completeLoad: function (moduleName) {\n                var found, args, mod,\n                    shim = getOwn(config.shim, moduleName) || {},\n                    shExports = shim.exports;\n\n                takeGlobalQueue();\n\n                while (defQueue.length) {\n                    args = defQueue.shift();\n                    if (args[0] === null) {\n                        args[0] = moduleName;\n                        //If already found an anonymous module and bound it\n                        //to this name, then this is some other anon module\n                        //waiting for its completeLoad to fire.\n                        if (found) {\n                            break;\n                        }\n                        found = true;\n                    } else if (args[0] === moduleName) {\n                        //Found matching define call for this script!\n                        found = true;\n                    }\n\n                    callGetModule(args);\n                }\n\n                //Do this after the cycle of callGetModule in case the result\n                //of those calls/init calls changes the registry.\n                mod = getOwn(registry, moduleName);\n\n                if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {\n                    if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {\n                        if (hasPathFallback(moduleName)) {\n                            return;\n                        } else {\n                            return onError(makeError('nodefine',\n                                             'No define call for ' + moduleName,\n                                             null,\n                                             [moduleName]));\n                        }\n                    } else {\n                        //A script that does not call define(), so just simulate\n                        //the call for it.\n                        callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);\n                    }\n                }\n\n                checkLoaded();\n            },\n\n            /**\n             * Converts a module name to a file path. Supports cases where\n             * moduleName may actually be just an URL.\n             * Note that it **does not** call normalize on the moduleName,\n             * it is assumed to have already been normalized. This is an\n             * internal API, not a public one. Use toUrl for the public API.\n             */\n            nameToUrl: function (moduleName, ext, skipExt) {\n                var paths, syms, i, parentModule, url,\n                    parentPath, bundleId,\n                    pkgMain = getOwn(config.pkgs, moduleName);\n\n                if (pkgMain) {\n                    moduleName = pkgMain;\n                }\n\n                bundleId = getOwn(bundlesMap, moduleName);\n\n                if (bundleId) {\n                    return context.nameToUrl(bundleId, ext, skipExt);\n                }\n\n                //If a colon is in the URL, it indicates a protocol is used and it is just\n                //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)\n                //or ends with .js, then assume the user meant to use an url and not a module id.\n                //The slash is important for protocol-less URLs as well as full paths.\n                if (req.jsExtRegExp.test(moduleName)) {\n                    //Just a plain path, not module name lookup, so just return it.\n                    //Add extension if it is included. This is a bit wonky, only non-.js things pass\n                    //an extension, this method probably needs to be reworked.\n                    url = moduleName + (ext || '');\n                } else {\n                    //A module that needs to be converted to a path.\n                    paths = config.paths;\n\n                    syms = moduleName.split('/');\n                    //For each module name segment, see if there is a path\n                    //registered for it. Start with most specific name\n                    //and work up from it.\n                    for (i = syms.length; i > 0; i -= 1) {\n                        parentModule = syms.slice(0, i).join('/');\n\n                        parentPath = getOwn(paths, parentModule);\n                        if (parentPath) {\n                            //If an array, it means there are a few choices,\n                            //Choose the one that is desired\n                            if (isArray(parentPath)) {\n                                parentPath = parentPath[0];\n                            }\n                            syms.splice(0, i, parentPath);\n                            break;\n                        }\n                    }\n\n                    //Join the path parts together, then figure out if baseUrl is needed.\n                    url = syms.join('/');\n                    url += (ext || (/^data\\:|\\?/.test(url) || skipExt ? '' : '.js'));\n                    url = (url.charAt(0) === '/' || url.match(/^[\\w\\+\\.\\-]+:/) ? '' : config.baseUrl) + url;\n                }\n\n                return config.urlArgs ? url +\n                                        ((url.indexOf('?') === -1 ? '?' : '&') +\n                                         config.urlArgs) : url;\n            },\n\n            //Delegates to req.load. Broken out as a separate function to\n            //allow overriding in the optimizer.\n            load: function (id, url) {\n                req.load(context, id, url);\n            },\n\n            /**\n             * Executes a module callback function. Broken out as a separate function\n             * solely to allow the build system to sequence the files in the built\n             * layer in the right sequence.\n             *\n             * @private\n             */\n            execCb: function (name, callback, args, exports) {\n                return callback.apply(exports, args);\n            },\n\n            /**\n             * callback for script loads, used to check status of loading.\n             *\n             * @param {Event} evt the event from the browser for the script\n             * that was loaded.\n             */\n            onScriptLoad: function (evt) {\n                //Using currentTarget instead of target for Firefox 2.0's sake. Not\n                //all old browsers will be supported, but this one was easy enough\n                //to support and still makes sense.\n                if (evt.type === 'load' ||\n                        (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {\n                    //Reset interactive script so a script node is not held onto for\n                    //to long.\n                    interactiveScript = null;\n\n                    //Pull out the name of the module and the context.\n                    var data = getScriptData(evt);\n                    context.completeLoad(data.id);\n                }\n            },\n\n            /**\n             * Callback for script errors.\n             */\n            onScriptError: function (evt) {\n                var data = getScriptData(evt);\n                if (!hasPathFallback(data.id)) {\n                    return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));\n                }\n            }\n        };\n\n        context.require = context.makeRequire();\n        return context;\n    }\n\n    /**\n     * Main entry point.\n     *\n     * If the only argument to require is a string, then the module that\n     * is represented by that string is fetched for the appropriate context.\n     *\n     * If the first argument is an array, then it will be treated as an array\n     * of dependency string names to fetch. An optional function callback can\n     * be specified to execute when all of those dependencies are available.\n     *\n     * Make a local req variable to help Caja compliance (it assumes things\n     * on a require that are not standardized), and to give a short\n     * name for minification/local scope use.\n     */\n    req = requirejs = function (deps, callback, errback, optional) {\n\n        //Find the right context, use default\n        var context, config,\n            contextName = defContextName;\n\n        // Determine if have config object in the call.\n        if (!isArray(deps) && typeof deps !== 'string') {\n            // deps is a config object\n            config = deps;\n            if (isArray(callback)) {\n                // Adjust args if there are dependencies\n                deps = callback;\n                callback = errback;\n                errback = optional;\n            } else {\n                deps = [];\n            }\n        }\n\n        if (config && config.context) {\n            contextName = config.context;\n        }\n\n        context = getOwn(contexts, contextName);\n        if (!context) {\n            context = contexts[contextName] = req.s.newContext(contextName);\n        }\n\n        if (config) {\n            context.configure(config);\n        }\n\n        return context.require(deps, callback, errback);\n    };\n\n    /**\n     * Support require.config() to make it easier to cooperate with other\n     * AMD loaders on globally agreed names.\n     */\n    req.config = function (config) {\n        return req(config);\n    };\n\n    /**\n     * Execute something after the current tick\n     * of the event loop. Override for other envs\n     * that have a better solution than setTimeout.\n     * @param  {Function} fn function to execute later.\n     */\n    req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {\n        setTimeout(fn, 4);\n    } : function (fn) { fn(); };\n\n    /**\n     * Export require as a global, but only if it does not already exist.\n     */\n    if (!require) {\n        require = req;\n    }\n\n    req.version = version;\n\n    //Used to filter out dependencies that are already paths.\n    req.jsExtRegExp = /^\\/|:|\\?|\\.js$/;\n    req.isBrowser = isBrowser;\n    s = req.s = {\n        contexts: contexts,\n        newContext: newContext\n    };\n\n    //Create default context.\n    req({});\n\n    //Exports some context-sensitive methods on global require.\n    each([\n        'toUrl',\n        'undef',\n        'defined',\n        'specified'\n    ], function (prop) {\n        //Reference from contexts instead of early binding to default context,\n        //so that during builds, the latest instance of the default context\n        //with its config gets used.\n        req[prop] = function () {\n            var ctx = contexts[defContextName];\n            return ctx.require[prop].apply(ctx, arguments);\n        };\n    });\n\n    if (isBrowser) {\n        head = s.head = document.getElementsByTagName('head')[0];\n        //If BASE tag is in play, using appendChild is a problem for IE6.\n        //When that browser dies, this can be removed. Details in this jQuery bug:\n        //http://dev.jquery.com/ticket/2709\n        baseElement = document.getElementsByTagName('base')[0];\n        if (baseElement) {\n            head = s.head = baseElement.parentNode;\n        }\n    }\n\n    /**\n     * Any errors that require explicitly generates will be passed to this\n     * function. Intercept/override it if you want custom error handling.\n     * @param {Error} err the error object.\n     */\n    req.onError = defaultOnError;\n\n    /**\n     * Creates the node for the load command. Only used in browser envs.\n     */\n    req.createNode = function (config, moduleName, url) {\n        var node = config.xhtml ?\n                document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :\n                document.createElement('script');\n        node.type = config.scriptType || 'text/javascript';\n        node.charset = 'utf-8';\n        node.async = true;\n        return node;\n    };\n\n    /**\n     * Does the request to load a module for the browser case.\n     * Make this a separate function to allow other environments\n     * to override it.\n     *\n     * @param {Object} context the require context to find state.\n     * @param {String} moduleName the name of the module.\n     * @param {Object} url the URL to the module.\n     */\n    req.load = function (context, moduleName, url) {\n        var config = (context && context.config) || {},\n            node;\n        if (isBrowser) {\n            //In the browser so use a script tag\n            node = req.createNode(config, moduleName, url);\n\n            node.setAttribute('data-requirecontext', context.contextName);\n            node.setAttribute('data-requiremodule', moduleName);\n\n            //Set up load listener. Test attachEvent first because IE9 has\n            //a subtle issue in its addEventListener and script onload firings\n            //that do not match the behavior of all other browsers with\n            //addEventListener support, which fire the onload event for a\n            //script right after the script execution. See:\n            //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution\n            //UNFORTUNATELY Opera implements attachEvent but does not follow the script\n            //script execution mode.\n            if (node.attachEvent &&\n                    //Check if node.attachEvent is artificially added by custom script or\n                    //natively supported by browser\n                    //read https://github.com/jrburke/requirejs/issues/187\n                    //if we can NOT find [native code] then it must NOT natively supported.\n                    //in IE8, node.attachEvent does not have toString()\n                    //Note the test for \"[native code\" with no closing brace, see:\n                    //https://github.com/jrburke/requirejs/issues/273\n                    !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&\n                    !isOpera) {\n                //Probably IE. IE (at least 6-8) do not fire\n                //script onload right after executing the script, so\n                //we cannot tie the anonymous define call to a name.\n                //However, IE reports the script as being in 'interactive'\n                //readyState at the time of the define call.\n                useInteractive = true;\n\n                node.attachEvent('onreadystatechange', context.onScriptLoad);\n                //It would be great to add an error handler here to catch\n                //404s in IE9+. However, onreadystatechange will fire before\n                //the error handler, so that does not help. If addEventListener\n                //is used, then IE will fire error before load, but we cannot\n                //use that pathway given the connect.microsoft.com issue\n                //mentioned above about not doing the 'script execute,\n                //then fire the script load event listener before execute\n                //next script' that other browsers do.\n                //Best hope: IE10 fixes the issues,\n                //and then destroys all installs of IE 6-9.\n                //node.attachEvent('onerror', context.onScriptError);\n            } else {\n                node.addEventListener('load', context.onScriptLoad, false);\n                node.addEventListener('error', context.onScriptError, false);\n            }\n            node.src = url;\n\n            //For some cache cases in IE 6-8, the script executes before the end\n            //of the appendChild execution, so to tie an anonymous define\n            //call to the module name (which is stored on the node), hold on\n            //to a reference to this node, but clear after the DOM insertion.\n            currentlyAddingScript = node;\n            if (baseElement) {\n                head.insertBefore(node, baseElement);\n            } else {\n                head.appendChild(node);\n            }\n            currentlyAddingScript = null;\n\n            return node;\n        } else if (isWebWorker) {\n            try {\n                //In a web worker, use importScripts. This is not a very\n                //efficient use of importScripts, importScripts will block until\n                //its script is downloaded and evaluated. However, if web workers\n                //are in play, the expectation that a build has been done so that\n                //only one script needs to be loaded anyway. This may need to be\n                //reevaluated if other use cases become common.\n                importScripts(url);\n\n                //Account for anonymous modules\n                context.completeLoad(moduleName);\n            } catch (e) {\n                context.onError(makeError('importscripts',\n                                'importScripts failed for ' +\n                                    moduleName + ' at ' + url,\n                                e,\n                                [moduleName]));\n            }\n        }\n    };\n\n    function getInteractiveScript() {\n        if (interactiveScript && interactiveScript.readyState === 'interactive') {\n            return interactiveScript;\n        }\n\n        eachReverse(scripts(), function (script) {\n            if (script.readyState === 'interactive') {\n                return (interactiveScript = script);\n            }\n        });\n        return interactiveScript;\n    }\n\n    //Look for a data-main script attribute, which could also adjust the baseUrl.\n    if (isBrowser && !cfg.skipDataMain) {\n        //Figure out baseUrl. Get it from the script tag with require.js in it.\n        eachReverse(scripts(), function (script) {\n            //Set the 'head' where we can append children by\n            //using the script's parent.\n            if (!head) {\n                head = script.parentNode;\n            }\n\n            //Look for a data-main attribute to set main script for the page\n            //to load. If it is there, the path to data main becomes the\n            //baseUrl, if it is not already set.\n            dataMain = script.getAttribute('data-main');\n            if (dataMain) {\n                //Preserve dataMain in case it is a path (i.e. contains '?')\n                mainScript = dataMain;\n\n                //Set final baseUrl if there is not already an explicit one.\n                if (!cfg.baseUrl) {\n                    //Pull off the directory of data-main for use as the\n                    //baseUrl.\n                    src = mainScript.split('/');\n                    mainScript = src.pop();\n                    subPath = src.length ? src.join('/')  + '/' : './';\n\n                    cfg.baseUrl = subPath;\n                }\n\n                //Strip off any trailing .js since mainScript is now\n                //like a module name.\n                mainScript = mainScript.replace(jsSuffixRegExp, '');\n\n                 //If mainScript is still a path, fall back to dataMain\n                if (req.jsExtRegExp.test(mainScript)) {\n                    mainScript = dataMain;\n                }\n\n                //Put the data-main script in the files to load.\n                cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];\n\n                return true;\n            }\n        });\n    }\n\n    /**\n     * The function that handles definitions of modules. Differs from\n     * require() in that a string for the module should be the first argument,\n     * and the function to execute after dependencies are loaded should\n     * return a value to define the module corresponding to the first argument's\n     * name.\n     */\n    define = function (name, deps, callback) {\n        var node, context;\n\n        //Allow for anonymous modules\n        if (typeof name !== 'string') {\n            //Adjust args appropriately\n            callback = deps;\n            deps = name;\n            name = null;\n        }\n\n        //This module may not have dependencies\n        if (!isArray(deps)) {\n            callback = deps;\n            deps = null;\n        }\n\n        //If no name, and callback is a function, then figure out if it a\n        //CommonJS thing with dependencies.\n        if (!deps && isFunction(callback)) {\n            deps = [];\n            //Remove comments from the callback string,\n            //look for require calls, and pull them into the dependencies,\n            //but only if there are function args.\n            if (callback.length) {\n                callback\n                    .toString()\n                    .replace(commentRegExp, '')\n                    .replace(cjsRequireRegExp, function (match, dep) {\n                        deps.push(dep);\n                    });\n\n                //May be a CommonJS thing even without require calls, but still\n                //could use exports, and module. Avoid doing exports and module\n                //work though if it just needs require.\n                //REQUIRES the function to expect the CommonJS variables in the\n                //order listed below.\n                deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);\n            }\n        }\n\n        //If in IE 6-8 and hit an anonymous define() call, do the interactive\n        //work.\n        if (useInteractive) {\n            node = currentlyAddingScript || getInteractiveScript();\n            if (node) {\n                if (!name) {\n                    name = node.getAttribute('data-requiremodule');\n                }\n                context = contexts[node.getAttribute('data-requirecontext')];\n            }\n        }\n\n        //Always save off evaluating the def call until the script onload handler.\n        //This allows multiple modules to be in a file without prematurely\n        //tracing dependencies, and allows for anonymous module support,\n        //where the module name is not known until the script onload event\n        //occurs. If no context, use the global queue, and get it processed\n        //in the onscript load callback.\n        (context ? context.defQueue : globalDefQueue).push([name, deps, callback]);\n    };\n\n    define.amd = {\n        jQuery: true\n    };\n\n\n    /**\n     * Executes the text. Normally just uses eval, but can be modified\n     * to use a better, environment-specific call. Only used for transpiling\n     * loader plugins, not for plain JS modules.\n     * @param {String} text the text to execute/evaluate.\n     */\n    req.exec = function (text) {\n        /*jslint evil: true */\n        return eval(text);\n    };\n\n    //Set up with config info.\n    req(cfg);\n}(this));"
  },
  {
    "path": "assets/js/lib/text.js",
    "content": "/**\n * @license RequireJS text 2.0.12 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/requirejs/text for details\n */\n/*jslint regexp: true */\n/*global require, XMLHttpRequest, ActiveXObject,\n  define, window, process, Packages,\n  java, location, Components, FileUtils */\n\ndefine(['module'], function (module) {\n    'use strict';\n\n    var text, fs, Cc, Ci, xpcIsWindows,\n        progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'],\n        xmlRegExp = /^\\s*<\\?xml(\\s)+version=[\\'\\\"](\\d)*.(\\d)*[\\'\\\"](\\s)*\\?>/im,\n        bodyRegExp = /<body[^>]*>\\s*([\\s\\S]+)\\s*<\\/body>/im,\n        hasLocation = typeof location !== 'undefined' && location.href,\n        defaultProtocol = hasLocation && location.protocol && location.protocol.replace(/\\:/, ''),\n        defaultHostName = hasLocation && location.hostname,\n        defaultPort = hasLocation && (location.port || undefined),\n        buildMap = {},\n        masterConfig = (module.config && module.config()) || {};\n\n    text = {\n        version: '2.0.12',\n\n        strip: function (content) {\n            //Strips <?xml ...?> declarations so that external SVG and XML\n            //documents can be added to a document without worry. Also, if the string\n            //is an HTML document, only the part inside the body tag is returned.\n            if (content) {\n                content = content.replace(xmlRegExp, \"\");\n                var matches = content.match(bodyRegExp);\n                if (matches) {\n                    content = matches[1];\n                }\n            } else {\n                content = \"\";\n            }\n            return content;\n        },\n\n        jsEscape: function (content) {\n            return content.replace(/(['\\\\])/g, '\\\\$1')\n                .replace(/[\\f]/g, \"\\\\f\")\n                .replace(/[\\b]/g, \"\\\\b\")\n                .replace(/[\\n]/g, \"\\\\n\")\n                .replace(/[\\t]/g, \"\\\\t\")\n                .replace(/[\\r]/g, \"\\\\r\")\n                .replace(/[\\u2028]/g, \"\\\\u2028\")\n                .replace(/[\\u2029]/g, \"\\\\u2029\");\n        },\n\n        createXhr: masterConfig.createXhr || function () {\n            //Would love to dump the ActiveX crap in here. Need IE 6 to die first.\n            var xhr, i, progId;\n            if (typeof XMLHttpRequest !== \"undefined\") {\n                return new XMLHttpRequest();\n            } else if (typeof ActiveXObject !== \"undefined\") {\n                for (i = 0; i < 3; i += 1) {\n                    progId = progIds[i];\n                    try {\n                        xhr = new ActiveXObject(progId);\n                    } catch (e) {}\n\n                    if (xhr) {\n                        progIds = [progId];  // so faster next time\n                        break;\n                    }\n                }\n            }\n\n            return xhr;\n        },\n\n        /**\n         * Parses a resource name into its component parts. Resource names\n         * look like: module/name.ext!strip, where the !strip part is\n         * optional.\n         * @param {String} name the resource name\n         * @returns {Object} with properties \"moduleName\", \"ext\" and \"strip\"\n         * where strip is a boolean.\n         */\n        parseName: function (name) {\n            var modName, ext, temp,\n                strip = false,\n                index = name.indexOf(\".\"),\n                isRelative = name.indexOf('./') === 0 ||\n                             name.indexOf('../') === 0;\n\n            if (index !== -1 && (!isRelative || index > 1)) {\n                modName = name.substring(0, index);\n                ext = name.substring(index + 1, name.length);\n            } else {\n                modName = name;\n            }\n\n            temp = ext || modName;\n            index = temp.indexOf(\"!\");\n            if (index !== -1) {\n                //Pull off the strip arg.\n                strip = temp.substring(index + 1) === \"strip\";\n                temp = temp.substring(0, index);\n                if (ext) {\n                    ext = temp;\n                } else {\n                    modName = temp;\n                }\n            }\n\n            return {\n                moduleName: modName,\n                ext: ext,\n                strip: strip\n            };\n        },\n\n        xdRegExp: /^((\\w+)\\:)?\\/\\/([^\\/\\\\]+)/,\n\n        /**\n         * Is an URL on another domain. Only works for browser use, returns\n         * false in non-browser environments. Only used to know if an\n         * optimized .js version of a text resource should be loaded\n         * instead.\n         * @param {String} url\n         * @returns Boolean\n         */\n        useXhr: function (url, protocol, hostname, port) {\n            var uProtocol, uHostName, uPort,\n                match = text.xdRegExp.exec(url);\n            if (!match) {\n                return true;\n            }\n            uProtocol = match[2];\n            uHostName = match[3];\n\n            uHostName = uHostName.split(':');\n            uPort = uHostName[1];\n            uHostName = uHostName[0];\n\n            return (!uProtocol || uProtocol === protocol) &&\n                   (!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) &&\n                   ((!uPort && !uHostName) || uPort === port);\n        },\n\n        finishLoad: function (name, strip, content, onLoad) {\n            content = strip ? text.strip(content) : content;\n            if (masterConfig.isBuild) {\n                buildMap[name] = content;\n            }\n            onLoad(content);\n        },\n\n        load: function (name, req, onLoad, config) {\n            //Name has format: some.module.filext!strip\n            //The strip part is optional.\n            //if strip is present, then that means only get the string contents\n            //inside a body tag in an HTML string. For XML/SVG content it means\n            //removing the <?xml ...?> declarations so the content can be inserted\n            //into the current doc without problems.\n\n            // Do not bother with the work if a build and text will\n            // not be inlined.\n            if (config && config.isBuild && !config.inlineText) {\n                onLoad();\n                return;\n            }\n\n            masterConfig.isBuild = config && config.isBuild;\n\n            var parsed = text.parseName(name),\n                nonStripName = parsed.moduleName +\n                    (parsed.ext ? '.' + parsed.ext : ''),\n                url = req.toUrl(nonStripName),\n                useXhr = (masterConfig.useXhr) ||\n                         text.useXhr;\n\n            // Do not load if it is an empty: url\n            if (url.indexOf('empty:') === 0) {\n                onLoad();\n                return;\n            }\n\n            //Load the text. Use XHR if possible and in a browser.\n            if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, defaultPort)) {\n                text.get(url, function (content) {\n                    text.finishLoad(name, parsed.strip, content, onLoad);\n                }, function (err) {\n                    if (onLoad.error) {\n                        onLoad.error(err);\n                    }\n                });\n            } else {\n                //Need to fetch the resource across domains. Assume\n                //the resource has been optimized into a JS module. Fetch\n                //by the module name + extension, but do not include the\n                //!strip part to avoid file system issues.\n                req([nonStripName], function (content) {\n                    text.finishLoad(parsed.moduleName + '.' + parsed.ext,\n                                    parsed.strip, content, onLoad);\n                });\n            }\n        },\n\n        write: function (pluginName, moduleName, write, config) {\n            if (buildMap.hasOwnProperty(moduleName)) {\n                var content = text.jsEscape(buildMap[moduleName]);\n                write.asModule(pluginName + \"!\" + moduleName,\n                               \"define(function () { return '\" +\n                                   content +\n                               \"';});\\n\");\n            }\n        },\n\n        writeFile: function (pluginName, moduleName, req, write, config) {\n            var parsed = text.parseName(moduleName),\n                extPart = parsed.ext ? '.' + parsed.ext : '',\n                nonStripName = parsed.moduleName + extPart,\n                //Use a '.js' file name so that it indicates it is a\n                //script that can be loaded across domains.\n                fileName = req.toUrl(parsed.moduleName + extPart) + '.js';\n\n            //Leverage own load() method to load plugin value, but only\n            //write out values that do not have the strip argument,\n            //to avoid any potential issues with ! in file names.\n            text.load(nonStripName, req, function (value) {\n                //Use own write() method to construct full module value.\n                //But need to create shell that translates writeFile's\n                //write() to the right interface.\n                var textWrite = function (contents) {\n                    return write(fileName, contents);\n                };\n                textWrite.asModule = function (moduleName, contents) {\n                    return write.asModule(moduleName, fileName, contents);\n                };\n\n                text.write(pluginName, nonStripName, textWrite, config);\n            }, config);\n        }\n    };\n\n    if (masterConfig.env === 'node' || (!masterConfig.env &&\n            typeof process !== \"undefined\" &&\n            process.versions &&\n            !!process.versions.node &&\n            !process.versions['node-webkit'])) {\n        //Using special require.nodeRequire, something added by r.js.\n        fs = require.nodeRequire('fs');\n\n        text.get = function (url, callback, errback) {\n            try {\n                var file = fs.readFileSync(url, 'utf8');\n                //Remove BOM (Byte Mark Order) from utf8 files if it is there.\n                if (file.indexOf('\\uFEFF') === 0) {\n                    file = file.substring(1);\n                }\n                callback(file);\n            } catch (e) {\n                if (errback) {\n                    errback(e);\n                }\n            }\n        };\n    } else if (masterConfig.env === 'xhr' || (!masterConfig.env &&\n            text.createXhr())) {\n        text.get = function (url, callback, errback, headers) {\n            var xhr = text.createXhr(), header;\n            xhr.open('GET', url, true);\n\n            //Allow plugins direct access to xhr headers\n            if (headers) {\n                for (header in headers) {\n                    if (headers.hasOwnProperty(header)) {\n                        xhr.setRequestHeader(header.toLowerCase(), headers[header]);\n                    }\n                }\n            }\n\n            //Allow overrides specified in config\n            if (masterConfig.onXhr) {\n                masterConfig.onXhr(xhr, url);\n            }\n\n            xhr.onreadystatechange = function (evt) {\n                var status, err;\n                //Do not explicitly handle errors, those should be\n                //visible via console output in the browser.\n                if (xhr.readyState === 4) {\n                    status = xhr.status || 0;\n                    if (status > 399 && status < 600) {\n                        //An http 4xx or 5xx error. Signal an error.\n                        err = new Error(url + ' HTTP status: ' + status);\n                        err.xhr = xhr;\n                        if (errback) {\n                            errback(err);\n                        }\n                    } else {\n                        callback(xhr.responseText);\n                    }\n\n                    if (masterConfig.onXhrComplete) {\n                        masterConfig.onXhrComplete(xhr, url);\n                    }\n                }\n            };\n            xhr.send(null);\n        };\n    } else if (masterConfig.env === 'rhino' || (!masterConfig.env &&\n            typeof Packages !== 'undefined' && typeof java !== 'undefined')) {\n        //Why Java, why is this so awkward?\n        text.get = function (url, callback) {\n            var stringBuffer, line,\n                encoding = \"utf-8\",\n                file = new java.io.File(url),\n                lineSeparator = java.lang.System.getProperty(\"line.separator\"),\n                input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)),\n                content = '';\n            try {\n                stringBuffer = new java.lang.StringBuffer();\n                line = input.readLine();\n\n                // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324\n                // http://www.unicode.org/faq/utf_bom.html\n\n                // Note that when we use utf-8, the BOM should appear as \"EF BB BF\", but it doesn't due to this bug in the JDK:\n                // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058\n                if (line && line.length() && line.charAt(0) === 0xfeff) {\n                    // Eat the BOM, since we've already found the encoding on this file,\n                    // and we plan to concatenating this buffer with others; the BOM should\n                    // only appear at the top of a file.\n                    line = line.substring(1);\n                }\n\n                if (line !== null) {\n                    stringBuffer.append(line);\n                }\n\n                while ((line = input.readLine()) !== null) {\n                    stringBuffer.append(lineSeparator);\n                    stringBuffer.append(line);\n                }\n                //Make sure we return a JavaScript string and not a Java string.\n                content = String(stringBuffer.toString()); //String\n            } finally {\n                input.close();\n            }\n            callback(content);\n        };\n    } else if (masterConfig.env === 'xpconnect' || (!masterConfig.env &&\n            typeof Components !== 'undefined' && Components.classes &&\n            Components.interfaces)) {\n        //Avert your gaze!\n        Cc = Components.classes;\n        Ci = Components.interfaces;\n        Components.utils['import']('resource://gre/modules/FileUtils.jsm');\n        xpcIsWindows = ('@mozilla.org/windows-registry-key;1' in Cc);\n\n        text.get = function (url, callback) {\n            var inStream, convertStream, fileObj,\n                readData = {};\n\n            if (xpcIsWindows) {\n                url = url.replace(/\\//g, '\\\\');\n            }\n\n            fileObj = new FileUtils.File(url);\n\n            //XPCOM, you so crazy\n            try {\n                inStream = Cc['@mozilla.org/network/file-input-stream;1']\n                           .createInstance(Ci.nsIFileInputStream);\n                inStream.init(fileObj, 1, 0, false);\n\n                convertStream = Cc['@mozilla.org/intl/converter-input-stream;1']\n                                .createInstance(Ci.nsIConverterInputStream);\n                convertStream.init(inStream, \"utf-8\", inStream.available(),\n                Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);\n\n                convertStream.readString(inStream.available(), readData);\n                convertStream.close();\n                inStream.close();\n                callback(readData.value);\n            } catch (e) {\n                throw new Error((fileObj && fileObj.path || '') + ': ' + e);\n            }\n        };\n    }\n    return text;\n});\n"
  },
  {
    "path": "assets/js/load-options.js",
    "content": "/*\n *\n * Assets options\n *\n * */\n\ndefine([\n    'jquery',\n    'text!/api/options',\n    'sourceModules/inlineOptions'\n    ], function($, options, inlineOptions) {\n\n    // Default + User options merged built. Built from Grunt.\n    var sourceOptions = JSON.parse(options);\n\n    // Override with from page inline options\n    $.extend(true, sourceOptions, inlineOptions);\n\n    return sourceOptions;\n});"
  },
  {
    "path": "assets/js/modules/auth.js",
    "content": "define([\n    'jquery',\n    'sourceModules/module'\n], function($, Module) {\n    \n    'use strict';\n\n    /**\n     * @Object default module option values\n     */\n    var defaults = {\n        'storageKey': 'sourcejsUser',\n        'defaultAvatarURL': '/source/assets/i/unknown.gif',\n        'classes': {\n            'controlsWrapper': 'source_login',\n            'loginButton': 'source_login-button',\n            'avatar': 'source_login-avatar',\n            'anonymous': 'anonymous',\n            'hook': 'js-hook'\n        },\n        'labels': {\n            'login': 'Login',\n            'logout': 'Logout'\n        }\n    };\n\n    /**\n     * @module Auth - basic GitHub authorization module.\n     *\n     * @constructor\n     *\n     * @param [Object] config - auth inline configuration set of options\n     *\n     * @param [Object] config.target - jquery domElement which goes to be auth controlls container\n     *\n     * @param [Object] config.options - options set, which allows to define component configuration.\n     */\n\n    function Auth(config) {\n        var _this = this;\n\n        this.conf = $.extend(true, {},\n            defaults,\n            config.options,\n            this.options.modulesOptions.auth\n        );\n\n        this.target = config.target || $(this.conf.classes.hook);\n        if(!$(this.target).hasClass(this.conf.classes.controlsWrapper)) {\n            $(this.target).addClass(this.conf.classes.controlsWrapper);\n        }\n        this.popup;\n\n        $(function() {\n            _this.init();\n        });\n    }\n\n    Auth.prototype = Module.createInstance();\n    Auth.prototype.constructor = Auth;\n\n    Auth.renderers = {\n        'avatar': function() {\n            var hasAvatar = this.user && this.user.avatar_url;\n            this.target.append($([\n                    '<img class=\"', this.conf.classes.avatar, ' ',\n                    (hasAvatar ? '' : this.conf.classes.anonymous), '\" src=\"',\n                    (hasAvatar ? this.user.avatar_url : this.conf.defaultAvatarURL),\n                    '\">'\n                ].join('')\n            ));\n        },\n        'loginButton': function() {\n            this.target.append($([\n                    '<div class=\"', this.conf.classes.loginButton, '\">',\n                    (this.user && this.user.id ? this.conf.labels.logout : this.conf.labels.login),\n                    '</div>'\n                ].join('')\n            ));\n        }\n    };\n\n    /**\n     * @method Auth.login.\n     * This function initiates logging in process and creates github login popup.\n     */\n    Auth.prototype.login = function() {\n        this.popup = open('/auth/stub', 'popup', 'width=1015,height=500');\n    };\n\n    /**\n     * @method Auth.logout.\n     * This method removes existed user entity and refreshes control.\n     */\n    Auth.prototype.logout = function() {\n        localStorage.removeItem(this.conf.storageKey);\n        this.render();\n    };\n\n    /**\n     * @method Auth.isLoginned User state getter.\n     *\n     * @returns {Boolean} isLoginned. It returns true if user is loginned.\n     */\n    Auth.prototype.isLoginned = function() {\n        return !!localStorage[this.conf.storageKey];\n    };\n\n    /**\n     * @method Auth.getUser GitHub user entity getter.\n     *\n     * @returns {Object} user || null.\n     * If user is loginned it returns user object and null in other case.\n     */\n    Auth.prototype.getUser = function() {\n        return this.isLoginned()\n            ? JSON.parse(localStorage.getItem(this.conf.storageKey))\n            : null;\n    };\n\n    Auth.prototype.init = function() {\n        window.sourcejs = window.sourcejs || {};\n        var self = window.sourcejs.__auth = this;\n        this.render();\n        $('body').on('click', '.' + this.conf.classes.loginButton, function(e) {\n            e.preventDefault();\n            if (self.isLoginned()) {\n                self.logout();\n            } else {\n                self.login();\n            }\n        });\n    };\n\n    Auth.prototype.render = function() {\n        var user = this.getUser();\n        var self = this;\n        this.target.html('');\n        Object.keys(Auth.renderers).forEach(function(name) {\n            Auth.renderers[name].call({\n                'target': self.target,\n                'user': user,\n                'conf': self.conf\n            });\n        });\n    };\n\n    Auth.prototype.done = function(user) {\n        this.popup.close();\n        localStorage.setItem(this.conf.storageKey, JSON.stringify(user));\n        this.render();\n    };\n\n    return Auth;\n});"
  },
  {
    "path": "assets/js/modules/browser.js",
    "content": "\"use strict\";\n\ndefine([\"sourceLib/jquery.mb.browser\"], function() {\n    //Browser context classes\n    var browserClasses = {\n        msie: \"ie\",\n        opera: \"opera\",\n        mozilla: \"mozilla\",\n        webkit: \"webkit\"\n    };\n\n    var classString = \"\";\n\n    if ($.browser.msie) {\n        classString += browserClasses.msie;\n        classString += \" \" + browserClasses.msie + $.browser.version;\n    } else if ($.browser.opera) {\n        classString += browserClasses.opera;\n        classString += \" \" + browserClasses.opera + $.browser.version;\n    } else if ($.browser.mozilla) {\n        classString += browserClasses.mozilla;\n        classString += \" \" + browserClasses.mozilla + $.browser.version;\n    } else if ($.browser.webkit) {\n        classString += browserClasses.webkit;\n        classString += \" \" + browserClasses.webkit + $.browser.version;\n    } else {\n        classString += $.browser.name.toLowerCase();\n    }\n\n    $('html').addClass(classString);\n\n    return $.browser;\n});"
  },
  {
    "path": "assets/js/modules/clarifyInSpec.js",
    "content": "/*\n*\n* Clarify helpers on spec page\n*\n* @author Robert Haritonov http://rhr.me\n*\n* */\n\n'use strict';\n\ndefine([\n    'jquery',\n    'sourceModules/module',\n    'sourceModules/sections',\n    'sourceModules/specDecorations'\n], function($, module, sections, specDecorations) {\n\n    function ClarifyInSpec() {\n        var _this = this;\n\n        this.options.modulesOptions.clarifyInSpec = $.extend({}, {\n            linkTitle: 'Open this example in Clarify'\n        }, this.options.modulesOptions.clarifyInSpec);\n        this.moduleOptions = this.options.modulesOptions.clarifyInSpec;\n\n        $(function(){\n            _this.drawClarifyLinks();\n        });\n    }\n\n    ClarifyInSpec.prototype = module.createInstance();\n    ClarifyInSpec.prototype.constructor = ClarifyInSpec;\n\n    ClarifyInSpec.prototype.drawClarifyLinks = function(){\n        var _this = this;\n\n        var prependHTML = function($el, id){\n            $el.prepend('<a class=\"source_clarify-in-spec_link\" href=\"?clarify=true&sections=' + id + '\" title=\"' + _this.moduleOptions.linkTitle + '\"></a>');\n        };\n\n        for (var i = 0; i < sections.getQuantity(); i++) {\n            var section = sections.getSections()[i];\n            var $sectionHeader = section.headerElement;\n\n            if (_this.haveSectionsInside($sectionHeader)) prependHTML($sectionHeader, section.id);\n\n            if (section.subHeaderElements !== undefined) {\n                for (var j = 0; j < section.subHeaderElements.length; j++) {\n                    var $sectionSubHeader = section.subHeaderElements[j];\n                    var subHeaderID = $sectionSubHeader.attr('id');\n\n                    if (subHeaderID && _this.haveSectionsInside($sectionSubHeader)) {\n                        prependHTML($sectionSubHeader, subHeaderID);\n                    }\n                }\n            }\n        }\n    };\n\n    ClarifyInSpec.prototype.haveSectionsInside = function($element){\n        var _this = this;\n        var response = false;\n        var nodes = $element.closest(\"*\").nextUntil(\"h2,h3,h4\");\n\n        nodes.each(function(){\n            if ($(this).hasClass(_this.options.exampleSectionClass)) {\n                response = true;\n                return false;\n            }\n        });\n\n        return response;\n    };\n\n    return new ClarifyInSpec();\n});"
  },
  {
    "path": "assets/js/modules/codeSource.js",
    "content": "/*\n *\n * View demo-examples source code\n *\n * */\n\ndefine([\n    \"jquery\",\n    \"source/load-options\",\n    \"sourceModules/utils\",\n    \"sourceModules/css\",\n    \"sourceModules/browser\",\n    \"sourceLib/codeFormat\",\n    \"sourceModules/innerNavigation\",\n    \"sourceLib/prism/prism\"\n], function($, options, utils, Css, browser, codeFormat, innerNavigation) {\n    'use strict';\n\n    if (!(browser.msie && parseInt(browser.version, 10) < 9)) { // and if not ie < 9\n        $(document).ready(function() {\n            var SourceCode = 'source_source-code';\n            var SourceCodeShow = SourceCode + '__show';\n            var SourceCodeMin = SourceCode + '__min';\n            var SourceCodeStatic = SourceCode + '__static';\n\n            var SourceCodeCnt = 'source_source-code_cnt';\n\n            var SourceCodeToggle = 'source_source-code_toggle';\n            var SourceCodeToggleCSS = SourceCodeToggle + '__css';\n            var SourceCodeToggleHTML = SourceCodeToggle + '__html';\n            var SourceCodeToggleJS = SourceCodeToggle + '__js';\n\n            var SourceCodeToggleAll = 'source_source-code_toggle-all';\n            var SourceCodeToggleAllHide = SourceCodeToggleAll + '__hide';\n\n            var RES_HIDE_CODE = 'Hide';\n            var RES_SHOW_CODE = 'Show';\n            var RES_CODE = 'code';\n            var RES_TOGGLER_SHOW_CODE = 'Show source code';\n\n            var prepared = false;\n            var onlyStatic = true;\n\n\n            //Add HTML source code container before each example without it\n            $('.source_example').each(function () {\n                var _this = $(this);\n\n                // <pre class=\"src-*\"><code>...</code></pre> is the wrapper for prism.js plugin\n                if ( !_this.prev().hasClass('src-html') ) {\n                    _this.before('<pre class=\"src-html\" style=\"display:none\"><code></code></pre>');\n                }\n            });\n\n            var wrapTags = function() {\n                // temporary solution while code:brush is still used, later this section will be removed\n                $('.source_section').find('code[class*=\"brush\"]').each(function () {\n\n                    var _this = $(this);\n                    var formatClass = 'src-';\n\n                    if (_this.hasClass('css')) {\n                        formatClass += 'css';\n                    } else if (_this.hasClass('js')) {\n                        formatClass += 'js';\n                    } else if (_this.hasClass('json')) {\n                        formatClass += 'json';\n                    } else {\n                        formatClass += 'html';\n                    }\n\n                    if (_this.hasClass('source_visible')) {\n                        formatClass += ' source_visible ';\n                    }\n\n                    if (!_this.parent().is('pre')) {\n                        _this.html().trim();\n                        _this.wrap('<pre></pre>');\n                    }\n\n                    if (_this.hasClass('html')) {\n                        var HTMLcode = _this.html();\n                        _this.html(HTMLcode.replace(/</g, \"&lt;\").replace(/>/g,\"&gt;\"));\n                    }\n\n                    _this.parent()\n                        .attr('class', formatClass)\n                        .attr('style', 'display:none');\n\n                    _this[0].removeAttribute(\"class\");\n                });\n\n                // wrapper for new syntax: <code class=\"src-*\"></code>\n                $('.source_section').find('code[class*=\"src-\"]').each(function () {\n                    var _this = $(this);\n\n                    if (!_this.parent().is('pre')) {\n                        _this.html().trim();\n                        _this.wrap('<pre></pre>');\n                    }\n\n                    if (_this.hasClass('src-html')) {\n                        var HTMLcode = _this.html();\n                        _this.html(HTMLcode.replace(/</g, \"&lt;\").replace(/>/g,\"&gt;\"));\n                    }\n\n                    _this.parent()\n                        .attr('class', _this.attr('class'))\n                        .attr('style', 'display:none');\n\n                    _this[0].removeAttribute('class');\n                });\n            };\n\n            //Code show toggle on each code block\n            var prepareCodeBlocks = function() {\n                new Css('/source/assets/js/lib/prism/prism.css', 'core');\n                var selection = onlyStatic ? $('.source_section pre[class*=\"src-\"].source_visible > code') : $('.source_section pre[class*=\"src-\"] > code');\n                selection.each(function () {\n                    var _this = $(this);\n                    var parent = _this.parent();\n                    var langClass='';\n                    if (!parent.hasClass('src-json')) {\n                        if (parent.hasClass('src-css')) {\n                            langClass = SourceCodeToggleCSS;\n                        } else if (parent.hasClass('src-js')) {\n                            langClass = SourceCodeToggleJS;\n                        } else {\n                            langClass = SourceCodeToggleHTML;\n                        }\n                        if (parent.hasClass('source_visible')) {\n                            parent.wrap('<div class=\"'+SourceCode+' '+SourceCodeStatic+'\"><div class=\"' + SourceCodeCnt + '\"></div></div>');\n                        }\n                        else if (!parent.hasClass('src-json')) {\n                            parent.wrap('<div class=\"'+SourceCode+'\"><div class=\"' + SourceCodeCnt + '\"></div></div>');\n                            _this.closest('.' + SourceCode).prepend('' +\n                                '<a href=\"\" class=\"' + SourceCodeToggle + ' ' + langClass + '\"><span class=\"source_hide\">' + RES_HIDE_CODE + '</span><span class=\"source_show\">' + RES_SHOW_CODE + '</span> ' + RES_CODE + '</a>' +\n                                '');\n                        }\n                        Prism.highlightElement(_this[0]);\n                    }\n                });\n            };\n            var fillCodeContainers = function() {\n                //Auto copy HTML in code.html if it's now filled\n                var selection = onlyStatic ? $('.source_section pre[class*=\"src-\"].source_visible > code') : $('.source_section pre[class*=\"src-\"] > code');\n                selection.each(function () {\n                    var _this = $(this);\n                    var HTMLcode;\n\n                    if (_this.html().trim().length === 0) {\n                        HTMLcode = _this.parent().nextAll('.'+ options.exampleSectionClass ).html();\n                        _this.html(HTMLcode);\n\n                        if (_this.parent().hasClass('src-html')) {\n                            codeFormat(_this);\n                        }\n                    } else {\n                        HTMLcode = _this.html();\n                        var spaces = HTMLcode.replace(/\\t/,'  ').match(/^\\s{0,}/)[0].length;\n                        var HTMLarray = HTMLcode.trim().split(\"\\n\");\n                        for (var i=0; i<HTMLarray.length;i++) {\n                            HTMLarray[i] = HTMLarray[i].replace(new RegExp(' {'+(spaces-1)+'}'), '');\n                        }\n                        HTMLcode = HTMLarray.join('\\n').replace(/\\s{1,}<span class=\"line-num/g, '<span class=\"line-num');\n\n                        _this.html(HTMLcode);\n                    }\n                });\n            };\n\n            var afterActivation = function() {\n                var sources = $('.' + SourceCode);\n                sources.addClass(SourceCodeShow);\n\n                //Scroll to section\n                var navHash = utils.parseNavHash();\n                utils.scrollToSection(navHash);\n            };\n\n            //Toggle show source sections\n            var initCodePartToggler = function() {\n                $('.source_container').on('click', '.' + SourceCodeToggle, function (e) {\n                    e.preventDefault();\n                    var codeCnt = $(this).closest('.' + SourceCode);\n                    codeCnt.toggleClass(SourceCodeMin);\n                });\n            };\n\n            //Show / hide source\n            var showAllCode = function () {\n                if (!prepared) {\n                    fillCodeContainers();\n                    prepareCodeBlocks();\n                    $('pre').removeAttr('style');\n                    prepared = true;\n                }\n                afterActivation();\n            };\n\n            var showStaticCode = function () {\n                wrapTags();\n                fillCodeContainers();\n                prepareCodeBlocks();\n                initCodePartToggler();\n                onlyStatic = false;\n                $('pre[class*=\"src-\"] > code').addClass('__visible');\n                $('pre.source_visible').removeAttr('style');\n\n                //Scroll to section\n                var navHash = utils.parseNavHash();\n                utils.scrollToSection(navHash);\n            };\n\n            var hideAllCode = function () {\n                $('.' + SourceCode).removeClass(SourceCodeShow);\n                $('.' + SourceCodeToggleAll).removeClass(SourceCodeToggleAllHide);\n\n                //Scroll to section\n                var navHash = utils.parseNavHash();\n                utils.scrollToSection(navHash);\n            };\n\n            if ($('[class*=\"src-\"]:not(.source_visible)')[0]) {\n                innerNavigation.addMenuItem(RES_TOGGLER_SHOW_CODE, showAllCode, hideAllCode, 'source_source-code_action-item');\n            }\n\n            showStaticCode();\n        });\n    }\n});"
  },
  {
    "path": "assets/js/modules/couch.js",
    "content": "/*\n*\n* Couch module and utils\n*\n* jquery.cocuh docs http://daleharvey.github.io/jquery.couch.js-docs/symbols/\n* jquery.couchlib  http://<path_to_couchdb_server>/_utils/script/jquery.couch.js\n*\n* */\n\ndefine([\n    'jquery',\n    'sourceModules/module',\n    'sourceModules/utils',\n    'sourceLib/jquery.couch'\n    ], function ($, module, utils, couch) {\n\n'use strict';\n\n    function Couch() {\n        this.options.modulesOptions.couch = $.extend({\n\n            server: 'http://127.0.0.1:5984'\n\n        }, this.options.modulesOptions.couch);\n\n        $.couch.urlPrefix = this.options.modulesOptions.couch.server;\n    }\n\n    Couch.prototype = module.createInstance();\n    Couch.prototype.constructor = Couch;\n\n    //Preparing remote storage object, and create it if its not ready\n    Couch.prototype.prepareRemote = function (dbname, doc, id) {\n        var _this = this;\n        var dfd = new $.Deferred();\n\n        var dbName = dbname;\n        var storedData = doc;\n        var specID = id;\n\n        storedData['_id'] = specID;\n\n        var db = $.couch.db(dbName);\n\n        db.openDoc(specID, {\n            success: function(data) {\n                dfd.resolve(data);\n            },\n            error: function(status) {\n                if (status === 404) {\n                    console.log('creating new node');\n\n                     $.when( _this.updateRemote(dbName, storedData) ).then(\n                        function(data) {\n                            dfd.resolve(data);\n                        }\n                    );\n                }\n            }\n        });\n\n        return dfd.promise();\n    };\n\n\n    /*\n\n        fn(remote db name, actual data [, data to update] [, pass existing deffered] )\n\n        Actual data storing is needed for sending updated data to remote,\n        prepared object for sending must have same _id and _rev as remote stored object.\n\n     */\n\n    Couch.prototype.updateRemote = function (dbname, actualData, dataToUpdate, deffered) {\n        var _this = this;\n\n        var dbName = dbname;\n        var dataToStore = actualData;\n        var updateData = dataToUpdate;\n\n        var db = $.couch.db(dbName);\n        var dfd = typeof deffered !== 'object' ? new $.Deferred() : deffered;\n\n        //If need to update\n        if (typeof dataToUpdate === 'object') {\n            dataToStore = $.extend(dataToStore, updateData);\n        }\n\n        db.saveDoc(dataToStore, {\n            success: function(data) {\n                //Server send response status\n                var response = data;\n\n                //If remote object succesfully updated\n                if (response.ok) {\n                    //Return updated data\n                    dfd.resolve(dataToStore);\n                } else {\n                    console.log(\"Failed to update remote object\");\n                    dfd.reject(\"Failed to update remote object\");\n                }\n\n            },\n            error: function(status) {\n\n                console.log(\"Failed to update remote object, maybe DB is not created?\");\n\n                //Create new db\n                db.create({\n                    success: function(data) {\n\n                        if (data === 412) {\n                            console.log(\"DB alreaty exist\");\n                            dfd.reject(\"DB alreaty exist\");\n                        } else if (data.ok) {\n                            console.log(\"New DB created, trying to fill it\");\n\n                            //Try again\n                            _this.updateRemote(dbName, dataToStore, updateData, dfd);\n                        }\n                    },\n                    error: function(status) {\n                        console.log(\"Failed to create db\");\n                        dfd.reject(\"Failed to create db\");\n                    }\n                });\n            }\n        });\n\n        return dfd.promise();\n    };\n\n    return new Couch();\n\n});"
  },
  {
    "path": "assets/js/modules/css.js",
    "content": "'use strict';\n\ndefine([\"source/load-options\"], function(options) {\n    function Css (url, cat) {\n        this.url = url;\n        this.cat = cat || 'plugin';\n\n        this.inject();\n    }\n\n    Css.prototype.inject = function(){\n\t\tvar href = this.url;\n\n\t\tvar link = document.createElement(\"link\");\n\n        link.type = \"text/css\";\n        link.rel = \"stylesheet\";\n        link.dataset.source = this.cat;\n\t\tlink.href = href;\n\n        document.getElementsByTagName(\"head\")[0].appendChild(link);\n    };\n\n    return Css;\n});"
  },
  {
    "path": "assets/js/modules/globalNav.js",
    "content": "/*\n*\n* @author Robert Haritonov (http://rhr.me)\n*\n* */\n\ndefine([\n    \"jquery\",\n    \"sourceModules/module\",\n    \"sourceModules/utils\",\n    \"sourceModules/parseFileTree\",\n    \"sourceModules/ntf\",\n    \"sourceLib/lodash\"\n    ], function($, module, utils, parseFileTree, ntf, _) {\n    \"use strict\";\n\n    /**\n     * @Object defaults. It represents preseted options to initialize\n     * navigation module. Can be overrided by options.moduleOptions.globalNav.\n     */\n    var defaults = {\n        \"filterEnabled\": true,\n        \"useHeaderUrlForNavigation\": true,\n        \"showPreviews\": false,\n        \"sortType\": \"sortByDate\",\n        \"sortDirection\":\"forward\",\n        \"delimeter\": \",\",\n        \"pageLimit\": 999,\n        \"ignorePages\": [],\n        \"thumbnailName\": \"thumbnail.png\",\n        \"classes\": {\n            \"catalog\": \"source_catalog\",\n            \"catalogList\": \"source_catalog_list\",\n            \"catalogListItem\": \"source_catalog_list_i\",\n            \"catalogListAll\": \"source_catalog_all\",\n            \"catalogLinkToAll\": \"source_a_bl\",\n            \"catalogImageThumbler\": \"source_catalog_image-tumbler\",\n            \"catalogListLink\": \"source_catalog_a\",\n            \"catalogListImage\": \"source_catalog_img\",\n            \"catalogListTitle\": \"source_catalog_title\",\n            \"catalogListDate\": \"source_catalog_footer\",\n            \"catalogFilter\" : \"source_catalog-filter\",\n            \"sourceSubhead\" : \"source_subhead\",\n            \"catalogText\": \"source_catalog_tx\",\n            \"showPreview\": \"__show-preview\",\n            \"updateButton\": \"source_catalog_update-button\"\n        },\n        \"labels\": {\n            \"noDataInCat\": \"No data in specified nav category\",\n            \"linkToAllSpecs\": \"All specs\",\n            \"author\" : \"Author\",\n            \"noDataAttr\" : \"Data-nav attr not set\",\n            \"loading\": \"Loading...\",\n            \"hidePreview\": \"Hide thumbnails\",\n            \"showPreview\": \"Show thumbnails\",\n            \"updateButton\": \"Update navigation\"\n        },\n        \"templates\": {}\n    };\n\n    /**\n     * @constructor GlobalNav\n     *\n     * @function GlobalNav. Module constructor.\n     * It implements module initialization.\n     */\n    function GlobalNav() {\n        var _this = this;\n        this.options.modulesOptions.globalNav = $.extend(true, defaults,\n            this.options.modulesOptions.globalNav,\n            JSON.parse(localStorage.getItem(\"source_enabledFilter\")) || {}\n        );\n        this.initTemplates();\n        $(function() {\n            _this.init();\n        });\n    }\n\n    GlobalNav.prototype = module.createInstance();\n    GlobalNav.prototype.constructor = GlobalNav;\n\n    /**\n     * @returns Object templates. Contains basic navigation templates.\n     * It uses lo-dash template function.\n     */\n    GlobalNav.prototype.initTemplates = function() {\n        this.templates = $.extend(true, {\n            catalogList: _.template([\n                '<ul class=\"<%= classes.catalogList %>\">',\n                    '<img src=\"/source/assets/i/process.gif\" alt=\"<%= labels.loading %>\"/>',\n                '</ul>'\n            ].join(\"\")),\n\n            catalogHeader: _.template('<h2 class=\"<%= classes.catalogListTitle %>\"> <%= catalogMeta.title %></h2>'),\n\n            catalogMeta: _.template('<div class=\"<%= classes.catalogText %>\"><%= catalogMeta.info %></div>'),\n\n            catalogLinkToAll: _.template([\n                '<li class=\"<%= classes.catalogListItem %> <%= classes.catalogListAll %>\">',\n                    '<a class=\"<%= classes.catalogLinkToAll %>\" href=\"<%= url %>\"><%= labels.linkToAllSpecs %> <%= length %> </a>',\n                '</li>'\n            ].join(\"\")),\n\n            navigationListItem: _.template([\n                '<li class=\"<%= classes.catalogListItem %>\">',\n                    '<a class=\"<%= classes.catalogListLink %> source_a_g\" href=\"#\">',\n                        '<span class=\"<%= classes.catalogListTitle %>\"></span>',\n                        '<div class=\"<%= classes.catalogListDate %>\"></div>',\n                    '</a>',\n                '</li>'\n            ].join(\"\")),\n\n            catalogFilter: _.template('<div class=\"<%= classes.catalogFilter %>\"></div>'),\n\n            togglePreviewLink: _.template('<button class=\"<%= classes.catalogImageThumbler %>\"><%= togglePreviewLabel %></button>'),\n            updateButton: _.template('<button class=\"<%= classes.updateButton %>\"><%= labels.updateButton %></button>'),\n\n            sortList: _.template([\n                '<ul class=\"source_sort-list\">',\n                    '<li class=\"source_sort-list_li\">Sort by&nbsp;</li>',\n                    '<li class=\"source_sort-list_li\"><a class=\"source_sort-list_a\" id=\"sortByAlph\" href=\"#sort=alph\">alphabet</a></li>',\n                    '<li class=\"source_sort-list_li\">&nbsp;or&nbsp;</li>',\n                    '<li class=\"source_sort-list_li\"><a class=\"source_sort-list_a\" id=\"sortByDate\" href=\"#sort=date\">date</a></li>',\n                '</ul>'\n            ].join(\"\"))\n        }, this.options.modulesOptions.globalNav.templates);\n    };\n\n    /**\n     * @method init. This method implements initial module definition.\n     */\n    GlobalNav.prototype.init = function () {\n        var navOptions = this.options.modulesOptions.globalNav;\n        this.catalog = $(\".\" + navOptions.classes.catalog);\n        this.renderNavigation();\n\n        if (this.options.modulesOptions.globalNav.filterEnabled) {\n            this.initCatalogFilter();\n        }\n    };\n\n    /**\n     * @private\n     * @method skipSpec. Filtering by specified catalogue\n     *\n     * @param {String|Array} navListCat catalogue type\n     * @param {Object} obj - object to filter\n     *\n     * @returns {Boolean} true if spec shoud be skipped.\n     */\n    var skipSpec = function(navListCat, obj) {\n        obj = obj || {};\n\n        // obj[\"cat\"] is an array; if cat has needed value\n        var isSingleTag = !!obj[\"tag\"] && typeof(navListCat) === \"string\";\n        var inArray = isSingleTag\n            ? !!~obj[\"tag\"].indexOf(navListCat)\n            : !!obj[\"tag\"] && _.reduce(navListCat, function(inArray, item) {\n                return inArray && !!~obj['tag'].indexOf(item);\n            }, true);\n        // without-cat mode, showing all specs without cat field in info.json defined or\n        var isWithoutCat = navListCat === \"without-tag\" && (!obj[\"tag\"] || obj[\"tag\"].length === 0);\n        return !inArray && !isWithoutCat;\n    };\n\n    /**\n     * @private\n     * @method isHidden. It helps to filter hidden specs.\n     *\n     * @param {Object} obj - spec to check.\n     *\n     * @returns {Boolean} true if spec is hidden.\n     */\n    var isHidden = function(obj) {\n        return !!obj[\"tag\"] && !!~obj[\"tag\"].indexOf(\"hidden\");\n    };\n\n    /**\n     * @method initCatalog - initialize catalog DomElement\n     *\n     * @param {Object} catalog - Catalog DomElement\n     * @param {Object} catalogMeta - additional catalog information.\n     * @param {Boolean} specifCatAndDirDefined - boolean flag, which defines if some cat and dir are defined\n     */\n    GlobalNav.prototype.initCatalog = function(catalog, catalogMeta, specifCatAndDirDefined) {\n        var config = this.options.modulesOptions.globalNav;\n        var classes = config.classes;\n        if (catalog.find(\".\" + classes.catalogList).length === 0) {\n            catalog.append(this.templates.catalogList(config));\n        }\n        if (specifCatAndDirDefined || !catalogMeta) {\n            return;\n        }\n        var isHeaderAdded = (\n            catalog.find(\".\" + classes.catalogListTitle).length !== 0 ||\n            catalog.children(\"h2\").length !== 0\n        );\n        var isInfoAdded = (\n            catalog.find(\".\" + classes.catalogText).length !== 0 ||\n            catalog.children(\"p\").length !== 0\n        );\n\n        if (catalogMeta && !isHeaderAdded) {\n            catalog.prepend(this.templates.catalogHeader({\"classes\": classes, \"catalogMeta\": catalogMeta}));\n        }\n        if (catalogMeta && catalogMeta.info && $.trim(catalogMeta.info) !== \"\" && !isInfoAdded) {\n            catalog\n                .children(\".\" + classes.catalogListTitle)\n                .first()\n                .after(this.templates.catalogMeta({\"classes\": classes, \"catalogMeta\": catalogMeta}));\n        }\n    };\n\n    /**\n     * @method renderNavigation. Drawing navigation and page info in each catalog defined on page.\n     *\n     * @param {String} [sortType] - type of sorting\n     * @param {String} [sortDirection] - ASC || DESC\n     */\n    GlobalNav.prototype.renderNavigation = function (sortType, sortDirection) {\n        var _this = this;\n        var navOptions = this.options.modulesOptions.globalNav;\n        var classes = navOptions.classes;\n        var labels = navOptions.labels;\n\n        sortType = sortType || navOptions.sortType;\n        sortDirection = sortDirection || navOptions.sortDirection;\n\n        this.catalog.each(function () {\n            var catalog = $(this);\n            var navListDir = _this.processDefinedTargetCatalogue(catalog.attr(\"data-nav\"));\n            var navListCat = catalog.attr(\"data-tag\");\n\n            // Catalog has no data about category\n            var targetCatalog = parseFileTree.getCurrentCatalogSpec(navListDir) || {};\n\n            _this.initCatalog(catalog, targetCatalog, !!navListDir && !!navListCat);\n\n            if (navListDir && !navListDir.length) {\n                // Display error\n                catalog.find(\".\" + classes.catalogList).html(labels.noDataAttr);\n                return;\n            }\n\n            var targetData = parseFileTree.getSortedCatalogsArray(navListDir, _this.getSortCondition(sortType, sortDirection));\n\n            _this.renderNavigationList(catalog, targetData);\n        });\n\n        // Scroll to hash after render\n        var navHash = utils.parseNavHash();\n        utils.scrollToSection(navHash);\n    };\n\n    /**\n     * @method renderNavigationList. It draws navigation list into catalog.\n     *\n     * @param {Object} catalog - DomElement to fill\n     * @param {Object} data - content\n     */\n    GlobalNav.prototype.renderNavigationList = function(catalog, data) {\n        var navOptions = this.options.modulesOptions.globalNav;\n        var delimeter = navOptions.delimeter;\n        var target = catalog.find(\".\" + navOptions.classes.catalogList);\n        var navListDir = catalog.attr(\"data-nav\");\n        var navListCat = catalog.attr(\"data-tag\");\n        navListCat = typeof(navListCat) === \"string\" ? navListCat.split(' ').join('') : navListCat;\n        navListCat = navListCat && !!~navListCat.indexOf(delimeter) ? navListCat.split(delimeter) : navListCat;\n        var catalogHeaderURL = catalog.find(\".\" + navOptions.classes.catalogListTitle + '>a').attr('href');\n\n        var filter = function(spec) {\n            var isInIgnoreList = !spec || !spec.title || !spec.url || !!~$.inArray(spec.title, navOptions.ignorePages);\n            var isFiltered = !!navListDir && !!navListCat && skipSpec(navListCat, spec) || isHidden(spec);\n            return isInIgnoreList || isFiltered ? false : true;\n        };\n\n        if (!data || !data.length) {\n            target.html(navOptions.labels.noDataInCat);\n            return;\n        }\n\n        if(target && target.length === 1) {\n            var url = catalogHeaderURL && catalogHeaderURL.length && navOptions.useHeaderUrlForNavigation\n                ? catalogHeaderURL : navListDir;\n            var specs = _.reduce(data, function(result, item) {\n                filter(item[\"specFile\"]) && result.push(item);\n                return result;\n            }, []);\n            target.html(this.getNavigationItemsList(specs, url));\n        }\n    };\n\n    /**\n     * @methor getNavigationItemsList. It creates the list of navigation items.\n     *\n     * @param [Array] specifications - list of items to create nav items.\n     * @param {String} catalogUrl - URL to catalog\n     * @param [function] isValid - callback to check if spec is valid.\n     *\n     * @returns {Object} document fragment which contains list of navItems.\n     */\n    GlobalNav.prototype.getNavigationItemsList = function(specifications, catalogUrl) {\n        // temporary container to hold navigation items.\n        var navigationItemsList = document.createDocumentFragment();\n        var self = this;\n        var navOptions = this.options.modulesOptions.globalNav;\n        var pageLimit = navOptions.pageLimit;\n        var classes = navOptions.classes;\n        var labels = navOptions.labels;\n        var lengthLimit = pageLimit > specifications.length\n            ? specifications.length\n            : pageLimit;\n\n        var specsToShow = specifications.slice(0, lengthLimit);\n        _.map(specsToShow, function(item) {\n            navigationItemsList.appendChild(self.renderNavTreeItem(item[\"specFile\"]).get(0));\n        });\n\n        // Go to cat page link\n        if (specifications.length > lengthLimit) {\n            navigationItemsList.appendChild(\n                $(this.templates.catalogLinkToAll({\n                    classes: classes,\n                    labels: labels,\n                    url: catalogUrl,\n                    length: specifications.length\n                })).get(0)\n            );\n        }\n\n        return navigationItemsList;\n    };\n\n    /**\n     * @method renderNavTreeItem. Returns single navigation tree item. It uses item template for it.\n     *\n     * @param {Object} itemData - data of single list item.\n     *\n     * @returns {Object} result - rendering result\n     */\n    GlobalNav.prototype.renderNavTreeItem = function(itemData) {\n        if (!itemData || !itemData.url || !itemData.title) return;\n\n        var navConfig = this.options.modulesOptions.globalNav;\n        var classes = navConfig.classes;\n        var lastMod = itemData.lastmod || '';\n        var author = itemData.author ? navConfig.labels.author + \": \" + itemData.author : '';\n        var metaInfo = '';\n\n        var addToMeta = function(data){\n            if (data === '') return;\n\n            if (metaInfo === '') {\n                metaInfo = data;\n            } else {\n                metaInfo += ' | ' + data;\n            }\n        };\n\n        addToMeta(lastMod);\n        addToMeta(author);\n\n        if (metaInfo === '') metaInfo = '&nbsp;';\n\n        // fixing relative path due to server settings\n        var itemDataUrl = itemData.url.charAt(0) === \"/\" ? itemData.url : \"/\" + itemData.url;\n        var imageUrl = itemData.thumbnail;\n        if (!this.renderNavTreeItem.template) {\n            this.renderNavTreeItem.template = this.templates.navigationListItem(navConfig);\n        }\n\n        var result = $(this.renderNavTreeItem.template).clone(true);\n        result.find(\".\" + classes.catalogListLink.split(\" \").join(\".\")).attr(\"href\", itemDataUrl);\n        if (imageUrl) {\n            result.find(\".\" + classes.catalogListLink)\n                .prepend('<img class=\"'+ classes.catalogListImage +'\" src=\"'+ imageUrl +'\">');\n        }\n        result.find(\".\" + classes.catalogListTitle).html(itemData.title);\n        result.find(\".\" + classes.catalogListDate).html(metaInfo);\n\n        return result;\n    };\n\n    /**\n     * @method initCatalogFilter - function that initializes filters.\n     * Rendering is also calls from it.\n     */\n    GlobalNav.prototype.initCatalogFilter = function() {\n        var classes = this.options.modulesOptions.globalNav.classes;\n        var $subhead = $(\".\" + classes.sourceSubhead);\n        var $catalog = $(\".\" + classes.catalog);\n        if (!$subhead.length || !$catalog.length) return;\n\n        this.renderFilters($subhead);\n    };\n\n    /**\n     * @method renderFilters. It renders filters layout.\n     *\n     * @param {Object} filtersTarget - dom element which is going to be\n     * container for rendering.\n     */\n    GlobalNav.prototype.renderFilters = function(filtersTarget) {\n        var classes = this.options.modulesOptions.globalNav.classes;\n        if (!filtersTarget.find(\".\" + classes.catalogFilter).length) {\n            filtersTarget.prepend(this.templates.catalogFilter({\"classes\": classes}));\n        }\n        this.renderSortFilters();\n        this.renderPreviewsToggler();\n        this.updateButton();\n    };\n\n    /**\n     * @method renderPreviewsToggler. It draws preview toggler.\n     */\n    GlobalNav.prototype.renderPreviewsToggler = function() {\n        var classes = this.options.modulesOptions.globalNav.classes;\n        var labels = this.options.modulesOptions.globalNav.labels;\n        var showPreviews = this.options.modulesOptions.globalNav.previews;\n        var initPreviewValue = localStorage.getItem( \"source_showPreviews\") || showPreviews;\n        var $filter = $(\".\" + classes.catalogFilter);\n        var catalog = this.catalog;\n\n        if (initPreviewValue === \"true\") { // initPreviewValue is string, not boolean\n            catalog.addClass(classes.showPreview);\n            $filter.append(this.templates.togglePreviewLink({\"classes\": classes, \"togglePreviewLabel\": labels.hidePreview}));\n        } else {\n            $filter.append(this.templates.togglePreviewLink({\"classes\": classes, \"togglePreviewLabel\": labels.showPreview}));\n        }\n\n        $(document).on(\"click\", \".\" + classes.catalogImageThumbler, function(e) {\n            e.preventDefault();\n            var showPreviews = localStorage.getItem( \"source_showPreviews\");\n            var $this = $(this);\n            var previewText;\n\n            if (showPreviews === \"true\") { // string\n                previewText = labels.showPreview;\n                localStorage.setItem(\"source_showPreviews\" , false);\n            } else {\n                previewText = labels.hidePreview;\n                localStorage.setItem(\"source_showPreviews\", true);\n            }\n\n            $this.text(previewText);\n            catalog.toggleClass(classes.showPreview);\n        });\n    };\n\n    /**\n     * @method updateButton. It draws link that allows to trigger page update.\n     */\n    GlobalNav.prototype.updateButton = function() {\n        var classes = this.options.modulesOptions.globalNav.classes;\n        var labels = this.options.modulesOptions.globalNav.labels;\n        var $filter = $(\".\" + classes.catalogFilter);\n\n        $filter.append(\n            ' | ',\n            this.templates.updateButton({\n                classes: classes,\n                labels: labels\n            }\n        ));\n\n        $(document).on(\"click\", \".\" + classes.updateButton, function(e) {\n            e.preventDefault();\n\n            $.get('/api/updateFileTree')\n                .done(function (data) {\n                    if (utils.isDevelopmentMode()) console.log('Navigation update done: ', data.message);\n\n                    location.reload();\n                })\n                .fail(function (err) {\n                    console.log('Error updating navigation: ', err);\n\n                    ntf.alert('Error updating navigation');\n                });\n        });\n    };\n\n\n    /**\n     * @method renderSortFilters. It draws Sort Filters layout.\n     */\n    GlobalNav.prototype.renderSortFilters = function() {\n        var defaultSort = this.options.modulesOptions.globalNav.sortType;\n        var $filterWrapper = $(\".\" + this.options.modulesOptions.globalNav.classes.catalogFilter);\n        var enabledFilter = JSON.parse(localStorage.getItem(\"source_enabledFilter\")) || {\"sortType\":defaultSort,\"sortDirection\":\"forward\"};\n        var nav = this.templates.sortList();\n        var _this = this;\n\n        $filterWrapper.append(nav);\n\n        var $activeFilter = $(\"#\" + enabledFilter.sortType);\n        $activeFilter.parent().addClass(\"__active\");\n\n        if (enabledFilter.sortDirection === \"forward\") {\n            $activeFilter.parent().addClass(\"__forward\");\n        }\n\n        var updateView = function(el) {\n            var $this = el;\n            var sortType = $this.attr(\"id\");\n            var sortDirection = \"backward\";\n\n            $(\".source_sort-list_li\").removeClass(\"__active\");\n            $this.parent()\n                .addClass(\"__active\")\n                .toggleClass(\"__forward\");\n\n            if ( $this.parent().hasClass(\"__forward\") ) {\n                sortDirection = \"forward\";\n            }\n\n            enabledFilter.sortType = sortType;\n            enabledFilter.sortDirection = sortDirection;\n            localStorage.setItem(\"source_enabledFilter\", JSON.stringify(enabledFilter));\n            _this.renderNavigation(sortType, sortDirection);\n        };\n\n        $(document).on(\"click\", \".source_sort-list_a\", function() {\n            updateView($(this));\n        });\n    };\n\n    /**\n     * @method getSortCondition. It defines current sorting property and order.\n     *\n     * @param {String} type - on of predefined sort types.\n     * @param {String} direction - ASC or DESC sort odrer\n     *\n     * @returns [Function] sortingCallback - function to sort items.\n     */\n    GlobalNav.prototype.getSortCondition = function(type, direction) {\n        var multiplexer = direction === \"forward\" ? 1 : -1;\n        if (type === \"sortByAlph\") {\n            return function sortByAlph(a, b) {\n                if (!a[\"specFile\"].title || !b[\"specFile\"].title) return 0;\n                a = a[\"specFile\"].title.replace(/(^\\s+|\\s+$)/g, \"\");\n                b = b[\"specFile\"].title.replace(/(^\\s+|\\s+$)/g, \"\");\n\n                if (a === b) return 0;\n                return multiplexer * ((a > b) ? 1 : -1);\n            };\n        }\n        // type === \"sortByDate\", this is default one\n        return function sortByDate(a, b) {\n            a = parseInt(a[\"specFile\"].lastmodSec, 10);\n            b = parseInt(b[\"specFile\"].lastmodSec, 10);\n            if(a === b) return 0;\n            return multiplexer * ((a > b) ? -1 : 1);\n        };\n    };\n\n    GlobalNav.prototype.processDefinedTargetCatalogue = function(targetCatalogue) {\n        var endTarget = targetCatalogue;\n        var relativeRegExt = new RegExp(/^.\\//);\n\n        // If relative with `./`\n        if (relativeRegExt.test(endTarget)) {\n            endTarget = endTarget.replace(relativeRegExt, utils.getPathToPage() + '/');\n        }\n\n        return endTarget;\n    };\n\n    return new GlobalNav();\n});\n"
  },
  {
    "path": "assets/js/modules/headerFooter.js",
    "content": "define(['source/load-options'], function(options) {\n\n    'use strict';\n\n    var $header = $(\".source_header\");\n    var $footer = $(\".source_footer\");\n\n    if(options.modulesEnabled.headerFooter) {\n        var headerExists = $header.length > 0;\n        var footerExists = $footer.length > 0;\n\n        //Header and Footer injection\n        var source_container = $('.source_container');\n\n        if (!headerExists) {\n            source_container.prepend($('<div class=\"source_header\"></div>'));\n        }\n\n        if (!footerExists) {\n            source_container.append($('<div class=\"source_footer\"></div>'));\n        }\n\n        if (source_container.length && !(headerExists && footerExists)) {\n            //some empty page\n            if (!source_container.contents().length) {\n                source_container.append($('<div class=\"source_main source_col-main\" role=\"main\">Welcome to Source!</div>'));\n            }\n\n            var insertHeader = function(data) {\n                $('.source_header').replaceWith(data.responseText);\n            };\n\n            var headerFile = 'header.inc.html';\n            var footerFile = 'footer.inc.html';\n\n            $.ajax({\n                url:\"/assets/templates/\"+headerFile,\n                async:true,\n                complete:function (data, status) {\n                    if (status === 'success') {\n                        insertHeader(data);\n                    } else {\n                        $.ajax({\n                            url:\"/source/assets/templates/\"+headerFile,\n                            async:true,\n                            complete:function (data) {\n                                insertHeader(data);\n                            }\n                        });\n                    }\n                }\n            });\n\n            var insertFooter = function(data) {\n                $('.source_footer').replaceWith(data.responseText);\n            };\n\n            $.ajax({\n                url:\"/assets/templates/\"+footerFile,\n                async:true,\n                complete:function (data, status) {\n                    if (status === 'success') {\n                        insertFooter(data);\n                    } else {\n                        $.ajax({\n                            url:\"/source/assets/templates/\"+footerFile,\n                            async:true,\n                            complete:function (data) {\n                                insertFooter(data);\n                            }\n                        });\n                    }\n                }\n            });\n        }\n    }\n\n    //click on header - go up\n    $header.on({\n        mouseover: function(e){\n            if(e.target === this){\n                $('.source_header').css('cursor', 'pointer');\n            }else {\n                $('.source_header').css('cursor', 'inherit');\n            }\n        },\n        click: function(e){\n            if(e.target === this){\n                window.scrollTo(0, 0);\n            }\n        },\n        mouseout : function(){\n            $('.source_header').css('cursor', 'inherit');\n        }\n    });\n\n});"
  },
  {
    "path": "assets/js/modules/htmlAPISync.js",
    "content": "'use strict';\n\ndefine([\n    \"jquery\",\n    \"sourceModules/module\",\n    \"sourceModules/utils\",\n    \"sourceModules/innerNavigation\",\n    \"sourceModules/ntf\",\n    \"sourceModules/sectionsParser\"\n], function($, module, utils, innerNavigation, ntf) {\n    function HtmlAPiSync() {\n        this.specID = utils.getPathToPage().substring(1);\n\n        innerNavigation.addMenuItemSimple('HTML API', [\n            {\n                name: 'Sync',\n                callback: this.syncHTML\n            },\n            {\n                name: 'Delete',\n                callback: this.deleteHTML\n            }\n        ], this);\n    }\n\n    HtmlAPiSync.prototype = module.createInstance();\n    HtmlAPiSync.prototype.constructor = HtmlAPiSync;\n\n    HtmlAPiSync.prototype.syncHTML = function(){\n        var parser = new SourceGetSections();\n\n        var specObj = {};\n        specObj[this.specID + '/specFile'] = parser.getSpecFull();\n\n        // Marking hand synced content\n        specObj[this.specID + '/specFile/forcedSave'] = true;\n\n        var dataToSend = {\n            unflatten: true,\n            data: specObj\n        };\n\n        $.ajax({\n            url: '/api/specs/html',\n            method: 'POST',\n            data: JSON.stringify(dataToSend),\n            contentType: \"application/json\",\n            dataType: 'json',\n            success: function(){\n                ntf.alert('HTML Sync done');\n            }\n        });\n    };\n\n    HtmlAPiSync.prototype.deleteHTML = function(){\n        var dataToSend = {\n            id: this.specID\n        };\n\n        $.ajax({\n            url: '/api/specs/html',\n            method: 'DELETE',\n            data: JSON.stringify(dataToSend),\n            contentType: \"application/json\",\n            dataType: 'json',\n            success: function(){\n                ntf.alert('HTML Delete done');\n            }\n        });\n    };\n\n    return new HtmlAPiSync();\n});"
  },
  {
    "path": "assets/js/modules/inlineOptions.js",
    "content": "define(function() {\n\n    'use strict';\n\n    // empty array for cases where `properties` is not defined in-page\n    return {};\n});\n"
  },
  {
    "path": "assets/js/modules/innerNavigation.js",
    "content": "'use strict';\n\ndefine([\n    \"jquery\",\n    \"sourceModules/module\",\n    \"sourceModules/utils\",\n    \"sourceModules/sections\",\n    \"sourceModules/headerFooter\",\n    \"text!sourceTemplates/nav.inc.html\",\n    \"text!sourceTemplates/navActionItem.inc.html\",\n    \"text!sourceTemplates/navActionTumbler.inc.html\"], function ($, module, utils, sections, headerFooter, navTemplate, menuItemTemplate, menuItemTumblerTemplate) {\n\n    function InnerNavigation() {\n        var _this = this;\n\n        this.options.modulesOptions.innerNavigation = $.extend({}, {\n            NAV_UL_CLASS: 'source_main_nav_ul',\n            NAV_UL_SECONDLEVEL_CLASS: 'source_main_nav_ul2',\n            NAV_LI_CLASS: 'source_main_nav_li',\n            NAV_LI_SECONDLEVEL_CLASS: 'source_main_nav_li2',\n            NAV_LINK_CLASS: 'source_main_nav_a',\n            MENU__I_CLASS: 'source_main_nav_i',\n            MENU_SCROLL_MOD_CLASS: '__menuScroll',\n            MAIN_NAV_AC: 'source_main_nav_ac',\n            MAIN_NAV_AC_TX: 'source_main_nav_ac_tx',\n            INJECT_AFTER: '.source_main h1',\n            RESERVED_HEIGHT: 250 // (185 + 15 + 50) px\n        }, this.options.modulesOptions.innerNavigation);\n        this.moduleOptions = this.options.modulesOptions.innerNavigation;\n\n        this.menuItemTemplate = $(menuItemTemplate);\n        this.menuItemTumblerTemplate = $(menuItemTumblerTemplate);\n        this.container = $(navTemplate);\n\n        var $injectAfter = $(this.moduleOptions.INJECT_AFTER).first();\n\n        // Checking if inject after element exists, and isn't used in source example sections\n        if (\n            $injectAfter.length !== 0 &&\n            $injectAfter.parents('.'+this.options.exampleSectionClass).length === 0 &&\n            $injectAfter.parents('.'+this.options.exampleCleanClass).length === 0\n        ) {\n            $injectAfter.after(this.container);\n        } else {\n            $('.'+this.options.mainClass).prepend(this.container);\n        }\n\n        $(function () {\n            _this.injectNavigation();\n            _this.calcMenuHeight();\n            _this.bindEvents();\n        });\n    }\n\n    InnerNavigation.prototype = module.createInstance();\n    InnerNavigation.prototype.constructor = InnerNavigation;\n\n    //className is optional\n    InnerNavigation.prototype.addMenuItem = function (text, onCallback, offCallback, className) {\n        var newItem = this.menuItemTumblerTemplate.clone();\n\n        if (typeof className === 'string' && className !== '') {\n            newItem.addClass(className);\n        }\n\n        newItem.find(\".source_slider_frame\").click(function (e) {\n            e.preventDefault();\n\n            var isEnabled = $(this).hasClass(\"source_slider_frame__on\");\n            isEnabled = !Boolean(isEnabled);\n\n            $(this).toggleClass(\"source_slider_frame__on\");\n\n            if (isEnabled) {\n                onCallback();\n            } else {\n                offCallback();\n            }\n        });\n\n        newItem.find('.' + this.moduleOptions.MAIN_NAV_AC_TX).text(text);\n        $('.' + this.moduleOptions.MAIN_NAV_AC).append(newItem);\n\n        // recalculate height after adding new action to menu\n        $(window).trigger('resize');\n    };\n\n    //className is optional\n    InnerNavigation.prototype.addMenuItemSimple = function (text, actionsArr, ctx, className) {\n        var newItem = this.menuItemTemplate.clone();\n\n        if (typeof className === 'string' && className !== '') {\n            newItem.addClass(className);\n        }\n\n        actionsArr.forEach(function(action, index){\n            var $link = $('<a class=\"source_main_nav_ac-simple\" href=\"#7\"></a>');\n\n            $link.text(action.name);\n\n            $link.on('click', function(e){\n                e.preventDefault();\n\n                if (ctx) {\n                    action.callback.apply(ctx);\n                } else {\n                    action.callback();\n                }\n            });\n\n            newItem.find('.source_main_nav_ac-list').append($link);\n\n            if (index !== actionsArr.length - 1){\n                newItem.find('.source_main_nav_ac-list').append(' / ');\n            }\n        });\n\n        newItem.find('.' + this.moduleOptions.MAIN_NAV_AC_TX).text(text);\n        $('.' + this.moduleOptions.MAIN_NAV_AC).prepend(newItem);\n\n        // recalculate height after adding new action to menu\n        $(window).trigger('resize');\n    };\n\n    InnerNavigation.prototype.toggleMenuItem = function (id) {\n        $('.'+id+' .source_slider_frame').toggleClass(\"source_slider_frame__on\");\n    };\n\n    InnerNavigation.prototype.bindEvents = function () {\n        var _this = this;\n\n        $(window).on('resize',function () {\n            _this.addMenuScrolling();\n        }).trigger('resize');\n    };\n\n    InnerNavigation.prototype.calcMenuHeight = function () {\n        var h = 0;\n\n        this.container.find('.' + this.moduleOptions.MENU__I_CLASS).each(function () {\n            h += $(this).height();\n        });\n\n        return h;\n    };\n\n    InnerNavigation.prototype.injectNavigation = function () {\n        var appendString = '';\n        for (var i = 0; i < sections.getQuantity() ; i++) {\n            var section = sections.getSections()[i];\n            var sectionID = i + 1;\n            var href = (section.id);\n\n            appendString += [\n                '<li class=\"' + this.moduleOptions.NAV_LI_CLASS + '\">',\n                    '<a href=\"#' + href + '\" class=\"' + this.moduleOptions.NAV_LINK_CLASS + '\">',\n                        section.num + '. ' + section.caption,\n                    '</a>'\n            ].join('');\n\n\t\t\tif ( section.subHeaderElements !== undefined ) {\n\t\t\t\tappendString += '<ul class=\"' + this.moduleOptions.NAV_UL_SECONDLEVEL_CLASS + '\">';\n\n\t\t\t\tfor (var j = 0; j < section.subHeaderElements.length; j++) {\n                    var seqNum = j+1;\n                    var subSection = section.subHeaderElements[j];\n                    var subSectionID = sectionID + '.' + seqNum;\n                    var subHref = subSection.attr('id') || subSectionID;\n\n\t\t\t\t\tappendString += [\n                        '<li class=\"' + this.moduleOptions.NAV_LI_SECONDLEVEL_CLASS + '\">',\n                            '<a class=\"source_main_nav_a\" href=\"#' + subHref + '\">',\n                                section.num + '.' + seqNum + '&nbsp;' + subSection.text(),\n                            '</a>',\n                        '</li>'\n                    ].join('');\n\t\t\t\t}\n\n                appendString += '</ul>';\n\t\t\t}\n\n            appendString += '</li>';\n        }\n\n        $('.' + this.moduleOptions.NAV_UL_CLASS).append(appendString);\n    };\n\n    //TODO: refactor menu scrolling add\n    InnerNavigation.prototype.addMenuScrolling = function () {\n        if (this.calcMenuHeight() + this.moduleOptions.RESERVED_HEIGHT > $(window).height()) {\n            this.container.addClass(this.moduleOptions.MENU_SCROLL_MOD_CLASS);\n        } else {\n            this.container.removeClass(this.moduleOptions.MENU_SCROLL_MOD_CLASS);\n        }\n    };\n\n    return new InnerNavigation();\n\n});"
  },
  {
    "path": "assets/js/modules/loadEvents.js",
    "content": "/**\n*\n* Register any plugins and emit their finish events\n*\n*/\n\ndefine([\"sourceModules/module\", \"sourceModules/utils\"], function(module, utils) {\n\n    'use strict';\n\n\tfunction LoadEvents() {}\n\n\tLoadEvents.prototype = module.createInstance();\n\tLoadEvents.prototype.constructor = LoadEvents;\n\n\tLoadEvents.prototype.init = function( callback ) {\n\n\t\tcallback = callback || function () {};\n\t\tvar evt;\n\t\tvar complete = false;\n\t\tvar debug = module.options.modulesEnabled.loadEvents && module.options.modulesOptions.loadEvents && module.options.modulesOptions.loadEvents.debug;\n\n\t\tif ( (!module.options.modulesEnabled.loadEvents) || (window.CustomEvent === undefined && document.createEvent === undefined) ) {\n\t\t\tif (debug && utils.isDevelopmentMode()) {\n\t\t\t\tconsole.log('LoadEvents Module disabled.');\n\t\t\t}\n\n\t\t\tcallback();\n\t\t\treturn;\n\t\t} else {\n\t\t\tif (debug && utils.isDevelopmentMode()) {\n\t\t\t\tconsole.log('LoadEvents Module enabled.');\n\t\t\t}\n\t\t}\n\n\t\tfunction checkPluginsDefinition() {\n\t\t\treturn (window.source !== undefined)\n\t\t\t\t&& (window.source.loadEvents !== undefined)\n\t\t\t\t&& (Object.keys(window.source.loadEvents).length);\n\t\t}\n\n        function phantomHook(event) {\n            console.log('PhantomJS hook: %s', event);\n\n            if (typeof window.callPhantom === 'function') {\n                window.callPhantom({message: event});\n            }\n        }\n\n\t\tfunction generateSuccessEvent(eventName) {\n\t\t\tif (debug && utils.isDevelopmentMode()) {\n\t\t\t\tconsole.log('event happens ' + eventName );\n\t\t\t}\n\n\t\t\tif (typeof window.CustomEvent === 'function') {\n\t\t\t\tevt = new CustomEvent(eventName);\n\t\t\t} else {\n\t\t\t\tevt = document.createEvent('CustomEvent');\n\t\t\t\tevt.initCustomEvent(eventName, false, false, {});\n\t\t\t}\n\n\t\t\tdocument.dispatchEvent(evt);\n\n\n\t\t\tif (!complete) {\n\t\t\t\tcomplete = true;\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\n\t\t(function checkPluginsState() {\n\n\t\t\t// If there's no any render plugin, just skip checking section\n\t\t\tif ( !checkPluginsDefinition() ) {\n\t\t\t\tgenerateSuccessEvent('allPluginsFinish');\n                phantomHook('allPluginsFinish');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar\tpluginsSection = window.source.loadEvents;\n\t\t\tvar defaultPluginTimeout = 700;\n\n\t\t\tfunction checkPlugins() {\n\t\t\t\tvar now = new Date().getTime();\n\t\t\t\tvar pluginFinish = 0;\n\n\t\t\t\tvar onFinishEvent = function() {\n\t\t\t\t\tif (debug && utils.isDevelopmentMode()) {\n\t\t\t\t\t\tconsole.log(plugin + ' drop finishEvent' );\n\t\t\t\t\t}\n\n\t\t\t\t\tpluginsSection[plugin].finish = true;\n\t\t\t\t\tpluginsSection[plugin].timeExpected = now-1;\n\t\t\t\t};\n\n\t\t\t\tvar onUpdateEvent = function() {\n\t\t\t\t\tvar tmpExpected = now + parseInt(pluginsSection[plugin].timeout || defaultPluginTimeout, 10);\n\n\t\t\t\t\tif (tmpExpected > pluginsSection[plugin].timeExpected) {\n\t\t\t\t\t\tpluginsSection[plugin].timeExpected = tmpExpected;\n\t\t\t\t\t\tif (debug && utils.isDevelopmentMode()) {\n\t\t\t\t\t\t\tconsole.log(plugin + ' drop updateEvent and increase timeout to ' + pluginsSection[plugin].timeExpected );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t/*jshint forin: false */\n\t\t\t\tfor (var plugin in pluginsSection) {\n\t\t\t\t\tif (!pluginsSection.hasOwnProperty(plugin)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (debug && utils.isDevelopmentMode()) {\n\t\t\t\t\t\tconsole.log(plugin + ' checking... ');\n\t\t\t\t\t}\n\n\t\t\t\t\tif (pluginsSection[plugin].finish) {\n\t\t\t\t\t\tpluginsSection[plugin].timeExpected = now-1;\n\t\t\t\t\t\tif (debug && utils.isDevelopmentMode()) {\n\t\t\t\t\t\t\tconsole.log(plugin + ' marked as finished');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !Array.isArray( pluginsSection[plugin]) ) {\n\t\t\t\t\t\t// first time\n\n\t\t\t\t\t\tif (pluginsSection[plugin].timeExpected === undefined) {\n\n\t\t\t\t\t\t\tpluginsSection[plugin].timeExpected = now + parseInt(pluginsSection[plugin].timeout || defaultPluginTimeout, 10);\n\t\t\t\t\t\t\tif (debug && utils.isDevelopmentMode()) {\n\t\t\t\t\t\t\t\tconsole.log(plugin + ' was registred and set timeout ' +  pluginsSection[plugin].timeExpected);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// When plugin finish his work, it send \"finishEvent\", which differs for each plugin\n\t\t\t\t\t\t\tpluginsSection[plugin].finishEvent && document.addEventListener(pluginsSection[plugin].finishEvent, onFinishEvent);\n\n\t\t\t\t\t\t\t// When plugin need to update work's timeout, it generate \"updateEvent\"\n\t\t\t\t\t\t\tpluginsSection[plugin].updateEvent && document.addEventListener(pluginsSection[plugin].updateEvent, onUpdateEvent);\n\n\t\t\t\t\t\t// Plugin already was initialized\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// If timeout come, increase counter\n\t\t\t\t\t\t\tif ( pluginsSection[plugin].timeExpected < now ) {\n\t\t\t\t\t\t\t\tif (!pluginsSection[plugin].finish) {\n\t\t\t\t\t\t\t\t\tgenerateSuccessEvent(plugin + ' timeout, ' + new Date().getTime());\n\t\t\t\t\t\t\t\t\tpluginsSection[plugin].finish = true;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tpluginFinish++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar subPluginFinish = 0;\n\t\t\t\t\t\tpluginFinish++;\n\n\t\t\t\t\t\tif ( (pluginsSection[plugin].length) && (!pluginsSection[plugin].finish) ) {\n\n\t\t\t\t\t\t\tfor (var i = 0; i < pluginsSection[plugin].length; i++ ) {\n\t\t\t\t\t\t\t\tvar subPlugin = pluginsSection[plugin][i];\n\n\t\t\t\t\t\t\t\tif ( (pluginsSection[subPlugin] !== undefined) && (pluginsSection[subPlugin].timeExpected < now) ) {\n\t\t\t\t\t\t\t\t\tsubPluginFinish++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( pluginsSection[plugin].length === subPluginFinish) {\n\t\t\t\t\t\t\t\tpluginsSection[plugin].finish = true;\n\t\t\t\t\t\t\t\tgenerateSuccessEvent(plugin + ' GroupFinish');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// if there's more than 0 plugins and all of them get timeout, continue,\n\t\t\t\t// otherwise make recursive call\n\t\t\t\tif ( Object.keys(pluginsSection).length !== pluginFinish ) {\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tcheckPlugins();\n\t\t\t\t\t}, 100);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tgenerateSuccessEvent('allPluginsFinish');\n                    phantomHook('allPluginsFinish');\n\n\t\t\t\t}, defaultPluginTimeout);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcheckPlugins();\n\t\t})();\n\t};\n\n\treturn new LoadEvents();\n});"
  },
  {
    "path": "assets/js/modules/module.js",
    "content": "define([\"source/load-options\"], function (options) {\n\n    'use strict';\n\n    function Module() {\n        this.options = {};\n        this.setOptions(this.loadOptions());\n    }\n\n    Module.prototype.loadOptions = function () {\n        return options;\n    };\n\n    Module.prototype.setOptions = function (opts) {\n        this.options = opts;\n        return this.options;\n    };\n\n    Module.prototype.getOptions = function () {\n        return this.options;\n    };\n\n    Module.prototype.getClass = function () {\n        return this.constructor.name;\n    };\n\n    Module.prototype.createInstance = function () {\n        return new this.constructor();\n    };\n\n    return new Module();\n\n});"
  },
  {
    "path": "assets/js/modules/moduleLoader.js",
    "content": "define([\n\t'sourceModules/module'\n\t], function (module) {\n\n    'use strict';\n\n    function ModuleLoader() {\n        this.loadModules('modules');\n        this.loadModules('plugins');\n        this.loadModules('npmPlugins');\n    }\n\n    /* наследуем от Module */\n    ModuleLoader.prototype = module.createInstance();\n    ModuleLoader.prototype.constructor = ModuleLoader;\n\n    ModuleLoader.prototype.loadModules = function(type){\n        var path;\n        var typeEnabled;\n        var optionsBase = this.options;\n\n        // Override options with exceptions\n        var isNav = $('meta[name=source-page-role]').attr('content') === 'navigation';\n        if (isNav) {\n            optionsBase = this.options.navPageModulesBuild;\n        }\n\n        if (type === 'modules') {\n            typeEnabled = 'modulesEnabled';\n            path = 'sourceModules/';\n        } else if (type === 'plugins') {\n            typeEnabled = 'pluginsEnabled';\n            path = 'plugins/';\n        } else if (type === 'npmPlugins') {\n            typeEnabled = 'npmPluginsEnabled';\n            path = '';\n        } else {\n            console.log('Invalid loadModules argument');\n\n            return;\n        }\n\n        if (typeof optionsBase[typeEnabled] !== 'undefined'){\n            for(var item in optionsBase[typeEnabled]) {\n                if (optionsBase[typeEnabled].hasOwnProperty(item)) {\n                    var targetObj = optionsBase[typeEnabled][item];\n\n                    if (targetObj){\n                        require([path + item]);\n                    }\n                }\n            }\n        }\n    };\n\n    return new ModuleLoader();\n});"
  },
  {
    "path": "assets/js/modules/navHighlight.js",
    "content": "/*\n*\n* Navigation scroll highlighter\n*\n* @author Ivan Metelev (http://welovehtml.ru)\n*\n* */\n\n\"use strict\";\n\ndefine([\n    'sourceModules/module'\n    ], function (module) {\n\n\tfunction NavHighlight() {\n\t\tvar defaults = {\n\t\t\tupdateHash: true\n\t\t};\n\n\t\tthis.options.modulesOptions.navHighlight = $.extend(true, defaults, this.options.modulesOptions.navHighlight);\n\t\tthis.conf = this.options.modulesOptions.navHighlight;\n\n\t\tthis.init();\n\t}\n\n\tNavHighlight.prototype = module.createInstance();\n\tNavHighlight.prototype.constructor = NavHighlight;\n\n\tNavHighlight.prototype.init = function(){\n\t\tvar _this = this;\n\n\t\t// basic utils\n\t\tvar utils = (function() {\n\n\t\t\treturn {\n\t\t\t\toffsetTop: function(elem) {\n\t\t\t\t\tvar box = elem.getBoundingClientRect();\n\t\t\t\t\tvar clientTop = document.body.clientTop || 0;\n\t\t\t\t\tvar top = box.top +  window.pageYOffset - clientTop;\n\n\t\t\t\t\treturn Math.round(top);\n\t\t\t\t},\n\t\t\t\thasClass: function(elem, cls) {\n\t\t\t\t\tif (elem !== null) {\n\t\t\t\t\t\treturn elem.className.match(new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\taddClass: function(elem, cls) {\n\t\t\t\t\tif (!this.hasClass(elem,cls)) {\n\t\t\t\t\t\telem.className += \" \"+cls;\n\t\t\t\t\t\telem.className.replace(/ +/g,' ');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tremoveClass: function(elem, cls) {\n\t\t\t\t\tif (this.hasClass(elem,cls)) {\n\t\t\t\t\t\tvar reg = new RegExp('(\\\\s|^)'+cls+'(\\\\s|$)');\n\t\t\t\t\t\telem.className=elem.className.replace(reg,'');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tclosest: function(elem, cls) { //console.log(elem, cls);\n\t\t\t\t\tif (elem.tagName === 'html') return false;\n\n\t\t\t\t\tvar elemParent = elem.parentNode;\n\t\t\t\t\tif (!utils.hasClass(elem, cls)) {\n\t\t\t\t\t\treturn utils.closest(elemParent, cls);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn elem;\n\t\t\t\t}\n\t\t\t};\n\n\t\t})();\n\n\t\tvar sourceHeaders = [];\n\t\tvar navHeaders;\n\t\tvar currentHeader = -1;\n\t\tvar filename = '';\n\t\tvar extension = '';\n\t\tvar hashThreshold = 100;\n\n\t\tvar fullFilename = window.location.href.split(\"#\")[0].split('/').pop().split('.');\n\n\t\t//update extension and filename only if there is one in URL\n\t\tif(fullFilename.length !== 1) {\n\t\t\textension = /\\w+/.exec(fullFilename[1]);\n\t\t\tfilename = fullFilename[0];\n\t\t}\n\n\t\t// watch headers position\n\t\tvar watchSectionTop = function () {\n\n\t\t\tvar headersLength = sourceHeaders.length;\n\t\t\tvar minDistance = Number.MAX_VALUE;\n\t\t\tvar closestHeader = -1;\n\t\t\tvar fileNameInUrl = filename === '' ? '' : filename + '.' +  extension;\n\n\t\t\tif ((document.body.scrollTop || document.documentElement.scrollTop) < hashThreshold) {\n\n\t\t\t\tif (!!window.location.hash)\t{\n\t\t\t\t\tcurrentHeader = -1;\n\t\t\t\t\tif (!!(window.history && history.pushState)) {\n\t\t\t\t\t\twindow.history.replaceState({anchor: 0}, document.title, window.location.pathname);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// catch section which is closed for top window border\n\t\t\tfor (var i=0; i < headersLength; i++) {\n\n\t\t\t\tif ((sourceHeaders[i].tagName === 'H3') && (!utils.hasClass(utils.closest(sourceHeaders[i], 'source_section'), 'source_section__open')) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar currentDist = Math.abs( utils.offsetTop(sourceHeaders[i]) - 60 - window.pageYOffset ); //60 = Header heights\n\t\t\t\tif (currentDist < minDistance) {\n\t\t\t\t\tclosestHeader = i;\n\t\t\t\t\tminDistance = currentDist;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (closestHeader !== currentHeader) {\n\t\t\t\tutils.removeClass( document.querySelector('.source_main_nav_li.__active'), '__active');\n\t\t\t\tutils.removeClass( document.querySelector('.source_main_nav_a.__active'), '__active');\n\n\t\t\t\tutils.addClass(navHeaders[closestHeader], '__active');\n\n\t\t\t\tvar parent = utils.closest(navHeaders[closestHeader], 'source_main_nav_li');\n\t\t\t\tvar hashFromLink = navHeaders[closestHeader].getAttribute('href');\n\n\t\t\t\tif (!!parent && parent) {\n\t\t\t\t\tutils.addClass(parent, '__active');\n\t\t\t\t}\n\n\t\t\t\tif (_this.conf.updateHash) {\n\t\t\t\t\t// TODO: pause hash change when scrolling - append it only on stand-still\n\n\t\t\t\t\t// Modern browsers uses history API for correct back-button-browser functionality\n\t\t\t\t\tif (!!(window.history && history.pushState)) {\n\t\t\t\t\t\twindow.history.replaceState({anchor: closestHeader+1}, document.title, fileNameInUrl + hashFromLink);\n\t\t\t\t\t} else { // ie9 fallback\n\t\t\t\t\t\t window.location.hash = hashFromLink;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcurrentHeader = closestHeader;\n\t\t\t}\n\t\t};\n\n\t\t// watch navmenu render\n\t\tvar checkNavInterval;\n\t\tvar h2Nodes;\n\t\tvar bodyNode = document.querySelector('body');\n\t\tvar checkOnNav = function checkOnNav() {\n\n\t\t\tif ((document.querySelector('.source_section') !== null) &&\n\t\t\t\t(document.querySelector('.source_main_nav_a') !== null)) {\n\n\t\t\t\tclearInterval(checkNavInterval);\n\n\t\t\t\tnavHeaders = document.querySelectorAll('.source_main_nav_a');\n\t\t\t\th2Nodes = document.querySelectorAll('.source_section');\n\n\t\t\t\tvar getH3Nodes = function(childerArray){\n\t\t\t\t\tvar h3Nodes = [];\n\n\t\t\t\t\tchilderArray.forEach(function (item) {\n\t\t\t\t\t\tif (item.tagName === 'H3') h3Nodes.push(item);\n\t\t\t\t\t});\n\n\t\t\t\t\treturn h3Nodes;\n\t\t\t\t};\n\n\t\t\t\tfor (var h2 = 0; h2 < h2Nodes.length; h2++) {\n\t\t\t\t\tvar childerArray = [].slice.call(h2Nodes[h2].children);\n\n\t\t\t\t\tvar h3Nodes = getH3Nodes(childerArray);\n\n\t\t\t\t\tsourceHeaders.push( h2Nodes[h2].querySelector('h2') );\n\t\t\t\t\tfor (var h3 = 0; h3 < h3Nodes.length; h3++) {\n\t\t\t\t\t\tsourceHeaders.push( h3Nodes[h3] );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif (utils.hasClass(bodyNode, 'source__scrolled-down')) {\n\t\t\t\t\twatchSectionTop();\n\t\t\t\t}\n\n\t\t\t\twindow.onscroll = function() {\n\t\t\t\t\twatchSectionTop();\n\t\t\t\t};\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t};\n\n\t\tcheckNavInterval = setInterval(checkOnNav, 1000);\n\t};\n\n\treturn new NavHighlight();\n});"
  },
  {
    "path": "assets/js/modules/ntf.js",
    "content": "'use strict';\n\ndefine([\n    'jquery',\n    'sourceModules/module'\n], function($, module) {\n\n    function Notification() {\n        if ($('.source_ntf').length === 0) {\n            $('.source_container').append('<div class=\"source_ntf\"></div>');\n\n            this.$el = $('.source_ntf');\n        }\n    }\n\n    Notification.prototype = module.createInstance();\n    Notification.prototype.constructor = Notification;\n\n    Notification.prototype.alert = function(msg){\n        var _this = this;\n\n        clearTimeout(this.clearNotif);\n\n        this.$el.text(msg).addClass('__active');\n\n        this.clearNotif = setTimeout(function(){\n            _this.$el.text('');\n            _this.$el.removeClass('__active');\n        }, 1000);\n    };\n\n    return new Notification();\n});"
  },
  {
    "path": "assets/js/modules/parseFileTree.js",
    "content": "/*\n*\n* Module for parsing Source file tree data\n*\n* @author Robert Haritonov (http://rhr.me)\n* @author Ivan Metelev\n*\n* */\n\n'use strict';\n\ndefine([\n    'jquery',\n    'sourceModules/module',\n    'text!/api/specs/raw',\n    'text!/api/specs?cats=true'\n    ], function ($, module, data, allSpecs) {\n\n    function ParseFileTree() {\n        this.json = JSON.parse(data);\n    }\n\n    ParseFileTree.prototype = module.createInstance();\n    ParseFileTree.prototype.constructor = ParseFileTree;\n\n    //getSpecificCat = a || [a,b] - Get only listed category, categories\n    //getCatInfo = bool - Turn on cat info parsing\n    /**\n     * Abstract pages tree parser\n     *\n     * @params {String} getSpecificCat - Category name\n     * @params {Boolean} getCatInfo - Get category info or not\n     * @returns {Object} Return data object with specs\n     *\n     * @deprecated since version 0.4, use REST API instead\n     */\n    ParseFileTree.prototype.parsePages = function (getSpecificCat, getCatInfo) {\n        var _this = this;\n        var json = _this.json;\n        var fileTree = {};\n        var totalTree = {};\n\n        var searchCat = function(currentCatObj, currentCat, toCheckCat) {\n\n            var returnObject = function(returnedTreeObj, excludeRootDocument) {\n                var isSingle = false;\n                if (getSpecificCat.indexOf('specFile') === -1) {\n                    for (var innerCat in returnedTreeObj) {\n                        if ( _this.checkCatInfo(returnedTreeObj[innerCat], innerCat, getCatInfo) ) {\n                            if (innerCat === 'specFile' && (!excludeRootDocument)) {\n                                fileTree[innerCat] = {};\n                                fileTree[innerCat]['specFile'] = returnedTreeObj[innerCat];\n                            } else {\n                                fileTree[innerCat] = returnedTreeObj[innerCat];\n                            }\n                        }\n                    }\n                } else {\n                    fileTree['specFile'] = {};\n                    fileTree['specFile']['specFile'] = returnedTreeObj;\n                    isSingle = true;\n                }\n                return isSingle;\n            };\n\n            /*jshint forin: false */\n            for (var currentSubCat in currentCatObj) {\n                if (!currentCatObj.hasOwnProperty(currentSubCat)) {\n                    continue;\n                }\n                var targetSubCatObj = currentCatObj[currentSubCat];\n\n                if (typeof targetSubCatObj === 'object') {\n\n                    //Need to collect only spec pages objects\n                    if ( _this.checkCatInfo(targetSubCatObj, currentSubCat, getCatInfo) && _this.checkCat(currentCat, getSpecificCat, toCheckCat) ) {\n                        //Checking if object is already there\n                        if (typeof fileTree[currentSubCat] !== 'object') {\n                            fileTree[currentCat + '/' + currentSubCat] = targetSubCatObj;\n                        }\n\n                    } else {\n                        //Going deeper\n\n                        if (getSpecificCat) { getSpecificCat = getSpecificCat.replace(/index.html/i, 'specFile'); }\n\n                        var returnedTreeObj;\n                        // complex/paths/handles/here\n                        if ( (getSpecificCat !== undefined) && (getSpecificCat.indexOf('/') !== -1) ) {\n                                var getSpecificCatArr = getSpecificCat.split('/');\n                                var success = true;\n\n                                if (getSpecificCatArr[ getSpecificCatArr.length-1 ] === '') {\n                                    getSpecificCatArr.pop();\n                                }\n\n                                // absolute path\n                                if (getSpecificCat.indexOf('/') === 0) {\n                                    returnedTreeObj = _this.json;\n\n                                    for (var i = 1; i < getSpecificCatArr.length; i++) {\n                                        if (!returnedTreeObj) return;\n\n                                        returnedTreeObj = returnedTreeObj[ getSpecificCatArr[i] ];\n                                    }\n\n                                    if (returnObject(returnedTreeObj, true)) return;\n\n                                } else {\n                                    //relative path\n\n                                    var currentCheckCat = currentSubCat;\n                                    returnedTreeObj = currentCatObj;\n\n                                    for (var j = 0; j < getSpecificCatArr.length; j++) {\n                                        if (_this.checkCat(currentCheckCat, getSpecificCatArr[j])) {\n                                            currentCheckCat = getSpecificCatArr[j + 1];\n                                        } else {\n                                            success = false;\n                                            break;\n                                        }\n\n                                        returnedTreeObj = returnedTreeObj[ getSpecificCatArr[j] ];\n                                    }\n\n                                    if (success) {\n                                        if (returnObject(returnedTreeObj)) return;\n                                    }\n                                }\n\n                        } else if (_this.checkCat(currentCat, getSpecificCat, toCheckCat)) {\n                            //Turn off cat checking in this process, to get all inner folders\n\n                            //Except other cats in specific cat search mode\n                            if (typeof getCatInfo !== 'undefined') {\n\n                                // Checking navigation page info\n                                if (typeof targetSubCatObj['specFile'] !== 'object' ) {\n                                    searchCat(targetSubCatObj, currentSubCat, true);\n                                }\n\n                            } else {\n                                searchCat(targetSubCatObj, currentSubCat, true);\n                            }\n\n                        } else {\n                            searchCat(targetSubCatObj, currentSubCat);\n                        }\n\n                    }\n                }\n            }\n        };\n\n        //Parse first level folders\n        for (var currentCat in json) {\n            if (json.hasOwnProperty(currentCat)) {\n                var currentCatObj = json[currentCat];\n                //Go inside first level folders\n                searchCat(currentCatObj, currentCat);\n                totalTree = $.extend(totalTree, fileTree);\n            }\n        }\n\n        if (Object.getOwnPropertyNames(fileTree).length > 0) {\n            return totalTree;\n        }\n\n    };\n\n    ParseFileTree.prototype.checkCatInfo = function (targetSubCatObj, currentSubCat, getCatInfo) {\n        if (targetSubCatObj) {\n\n            //If cat info needed\n            if (getCatInfo) {\n                return typeof targetSubCatObj['specFile'] === 'object' || currentSubCat === 'specFile';\n            } else {\n                return typeof targetSubCatObj['specFile'] === 'object';\n            }\n\n        }\n    };\n\n    ParseFileTree.prototype.checkCat = function (currentCat, getSpecificCat, toCheckCat) {\n        var checkCat = function() {\n\n            //Multiple check cat support\n            if (typeof getSpecificCat === 'string') {\n\n                return getSpecificCat === currentCat;\n\n            } else if (typeof getSpecificCat === 'object') { //If array\n\n                var something = false;\n\n                for (var i = 0; i < getSpecificCat.length; i++) {\n\n                    if (getSpecificCat[i] === currentCat) {\n                        something = true;\n\n                        break;\n                    }\n                }\n\n                return something;\n\n            } else {\n                return false;\n            }\n        };\n\n        //Turn off cat checking in specific process\n        if (toCheckCat === true) {\n            return true;\n        } else {\n            //Check if cat checking is set\n            if (typeof getSpecificCat !== 'undefined') {\n                return checkCat();\n            } else {\n                return true;\n            }\n        }\n    };\n\n    /**\n     * Get specific cat pages without category info\n     *\n     * @params {String} getSpecificCat - Category name\n     * @returns {Object} Return data object with specs\n     *\n     * @deprecated since version 0.4, use REST API instead\n     */\n    ParseFileTree.prototype.getCatPages = function (getSpecificCat) {\n        //Get cat pages\n        return this.parsePages(getSpecificCat);\n    };\n\n    /**\n     * Get specific cat pages with category\n     *\n     * @params {String} getSpecificCat - Category name\n     * @returns {Object} Return data object with specs\n     *\n     * @deprecated since version 0.4, use REST API instead\n     */\n    ParseFileTree.prototype.getCatAll = function (getSpecificCat) {\n        //Get cat pages with cat info\n        return this.parsePages(getSpecificCat, true);\n    };\n\n    var getCurrCatalogSpec = function(navListDir, targetCatalog) {\n        var catObj;\n        if (!!targetCatalog[navListDir + '/specFile']) {\n            catObj = targetCatalog[navListDir + '/specFile'];\n        } else if (!!targetCatalog[ 'specFile' ]) {\n            catObj = targetCatalog['specFile']['specFile']\n                ? targetCatalog['specFile']['specFile']\n                : targetCatalog['specFile'];\n        }\n        return catObj;\n    };\n\n    ParseFileTree.prototype.getCurrentCatalogSpec = function(catalogName) {\n        if (!catalogName) return;\n\n        var specsHash = this.parsePages(catalogName, true);\n\n        if (!specsHash) return;\n\n        return getCurrCatalogSpec(catalogName, specsHash);\n    };\n\n    ParseFileTree.prototype.getSortedCatalogsArray = function(catalogName, sortingCallback) {\n        if (catalogName === undefined) return;\n\n        var specsHash;\n        var newStructure = true;\n\n        if (catalogName.length) {\n            newStructure = false;\n            specsHash = this.parsePages(catalogName, true);\n        } else {\n            specsHash = JSON.parse(allSpecs);\n        }\n\n        if (!specsHash) return;\n\n        var result = [];\n\n        for (var key in specsHash) {\n            if (specsHash.hasOwnProperty(key)) {\n                var value = newStructure ? specsHash[key] : specsHash[key]['specFile'];\n\n                if (!value) continue;\n\n                result.push({\n                    name: value.url,\n                    specFile: value\n                });\n            }\n        }\n\n        return result.sort(sortingCallback);\n    };\n\n    return new ParseFileTree();\n});"
  },
  {
    "path": "assets/js/modules/scrollToHash.js",
    "content": "//In separate module, to trace script ready state\ndefine([\n    \"jquery\",\n    \"sourceModules/utils\",\n    \"sourceModules/loadEvents\",\n    \"sourceModules/sectionFolding\"\n    ], function($, utils, loadEvents) {\n\n    'use strict';\n\n    $(function(){\n        var navHash = utils.parseNavHash();\n        var $sections = $('.source_section');\n        var $navigation = $('.source_nav');\n        var $mainContainer = $('.source_main');\n        var $body = $('body');\n\n        // Show hidden sections and navigation\n        function showSections() {\n            $sections.addClass('__loaded');\n            $navigation.addClass('__loaded');\n            $mainContainer.removeClass('__loading');\n            $body.removeClass('__loading');\n        }\n\n        $mainContainer.addClass('__loading');\n        $body.addClass('__loading');\n\n        loadEvents.init(function() {\n            showSections();\n\n            // FF scroll bug, related native to scroll to hash conflicts\n            if ($('html').hasClass('mozilla')) {\n                var triesCount = 0;\n\n                var t = setInterval(function() {\n                    var scrollTopCord = utils.scrollToSection(navHash);\n\n                    if (window.pageYOffset === scrollTopCord || triesCount < 4) {\n                        clearInterval(t);\n                    } else {\n                        triesCount++;\n                    }\n                }, 300);\n            } else {\n                utils.scrollToSection(navHash);\n            }\n        });\n    });\n});"
  },
  {
    "path": "assets/js/modules/search.js",
    "content": "/*\n*\n* @author Ilya Mikhailov\n*\n* */\n\ndefine([\n    'jquery',\n    'sourceModules/module',\n    'sourceLib/autocomplete',\n    'sourceLib/modalbox',\n    'sourceModules/parseFileTree',\n    'sourceModules/globalNav',\n    'sourceModules/headerFooter'\n], function ($, module, autocomplete, ModalBox, parseFileTree, globalNav) {\n\n'use strict';\n\nvar Search = function() {\n    this.data = [];\n    this.options.modulesOptions.search = $.extend (true, {\n        classes: {\n            searchResult: \"__search-res\",\n            headerFocus: \"source_header__focus\"\n        },\n        labels: {\n            searchResults: \"Search results:\",\n            showAllButtonText: \"Show all search results\"\n        },\n        suggestionsLimit: 4,\n        activateOnLoad: true\n    }, this.options.modulesOptions.search);\n\n    this.init();\n    return this;\n};\n\nSearch.prototype.constructor = Search;\nSearch.prototype = module.createInstance();\n\nSearch.prototype.init = function() {\n    var _this = this;\n\n    this.activated = false;\n    this.targetField = $('#livesearch');\n    this.header = $('.source_header');\n\n    this.prepareAutoCompleteData();\n    this.initSearchField();\n\n    setTimeout(function() {\n        _this.targetField.attr('data-initialized', 'true');\n    }, 1);\n};\n\nSearch.prototype.prepareAutoCompleteData = function() {\n    this.data = this.data || [];\n    if (this.data.length) return;\n\n    var AutocomleteDataItem = function (value, data) {\n        this.value = value;\n        this.data = data;\n    };\n\n    var sort = JSON.parse(localStorage.getItem(\"source_enabledFilter\")) || {\"sortDirection\": \"forward\", \"sortType\": \"sortByAlph\"};\n    var pagesData = parseFileTree.getSortedCatalogsArray(\"\", globalNav.getSortCondition(sort.sortType, sort.sortDirection));\n\n    for (var page in pagesData) {\n        if (pagesData.hasOwnProperty(page)) {\n            var targetPage = pagesData[page]['specFile'];\n\n            // Skip hidden specs\n            if (targetPage.tag && targetPage.tag.indexOf('hidden') > -1) continue;\n\n            var keywords = targetPage.keywords;\n            var keywordsPageName = pagesData[page] && pagesData[page]['name']\n                ? pagesData[page]['name']\n                : \"\"; //get cat name\n            var prepareKeywords = '';\n            var autocompleteValue = targetPage.title;\n\n            if (keywords && keywords !== '') {\n                prepareKeywords += ', ' + keywords;\n            }\n\n            autocompleteValue += ' (' + keywordsPageName + prepareKeywords + ')';\n            this.data[this.data.length] = new AutocomleteDataItem(autocompleteValue, targetPage.url);\n        }\n    }\n};\n\nSearch.prototype.wrapSearchResults = function(results) {\n    var modulesOptions = this.options.modulesOptions;\n    var classes = [\n        modulesOptions.globalNav.classes.catalogList,\n        modulesOptions.search.classes.searchResult,\n        modulesOptions.globalNav.classes.catalog\n    ];\n    if (modulesOptions.globalNav.showPreviews) {\n        classes.push(\"__show-preview\");\n    }\n    var list = $('<ul class=\"' + classes.join(' ') + '\">');\n    $.map(results, function(item) {\n        var specItem = parseFileTree.getCatAll(item.data).specFile;\n        specItem.title = item.value;\n        list.append(globalNav.renderNavTreeItem(specItem));\n    });\n    return list;\n};\n\nSearch.prototype.activateAutocomplete = function() {\n    var _this = this;\n    var searchOptions = this.options.modulesOptions.search;\n\n    this.targetField.autocomplete({\n        \"lookup\": _this.data,\n        \"autoSelectFirst\": true,\n        \"suggestionsLimit\": searchOptions.suggestionsLimit,\n        \"labels\": {\n            \"showAllButtonText\": searchOptions.labels.showAllButtonText\n        },\n        \"showAll\": function (suggestions) {\n            (new ModalBox({\n                \"appendTo\": \".source_main\"\n            }, {\n                \"title\": searchOptions.labels.searchResults,\n                \"body\": _this.wrapSearchResults(suggestions)\n            })).show();\n        }\n    });\n    this.activated = true;\n};\n\nfunction getActivationHandler(ctx) {\n    return function() {\n        ctx.header.addClass(ctx.activeClass);\n        if (!ctx.isActive) {\n            ctx.callback();\n        }\n    };\n}\n\nSearch.prototype.initSearchField = function() {\n    var isNavigation = $('meta[name=source-page-role]').attr('content') === 'navigation';\n    var searchOptions = this.options.modulesOptions.search;\n    var _this = this;\n\n    if (searchOptions.activateOnLoad) {\n        this.activateAutocomplete();\n    }\n\n    var autofocusOnNavEnabled = isNavigation && searchOptions.autofocusOnNavigationPage;\n    var autofocusOnSpecEnabled = !isNavigation && searchOptions.autofocusOnSpecPage;\n    if (autofocusOnNavEnabled || autofocusOnSpecEnabled) {\n        setTimeout(function() { //First focus fix\n            _this.targetField.focus();\n        }, 1);\n    }\n\n    var eventContext = {\n        header: _this.header,\n        activeClass: searchOptions.classes.headerFocus,\n        isActive: _this.activated,\n        callback: function() {\n            return _this.activateAutocomplete();\n        }\n    };\n\n    //Unblur header on focus\n    this.targetField.on({\n        'focus': getActivationHandler(eventContext),\n        'blur':function () {\n            _this.header.removeClass(searchOptions.classes.headerFocus);\n        }\n    });\n    this.targetField.one('keyup', getActivationHandler(eventContext));\n};\n\nreturn new Search();\n});\n"
  },
  {
    "path": "assets/js/modules/sectionFolding.js",
    "content": "/*\n*\n* Fold sections to optimize page load\n*\n* @author Robert Haritonov (http://rhr.me)\n*\n* */\n\ndefine([\n    \"jquery\",\n    \"source/load-options\",\n    \"sourceModules/utils\",\n    \"sourceModules/browser\",\n    \"sourceModules/sections\",\n    \"sourceModules/innerNavigation\"\n    ], function($, options, utils, browser, sections, innerNavigation) {\n\n    'use strict';\n\n    $(function(){\n\n        //TODO: move to utils\n            // Bulletproof localStorage check\n            var storage;\n            var fail;\n            var uid;\n            try {\n                uid = new Date();\n                (storage = window.localStorage).setItem(uid, uid);\n                fail = storage.getItem(uid) !== uid.toString();\n                storage.removeItem(uid);\n                fail && (storage = false);\n            } catch (e) {\n            }\n            //TODO: /move to utils\n            var SECTION_CLASS = options.SECTION_CLASS;\n            var L_SECTION_CLASS = $('.'+SECTION_CLASS);\n            var OPEN_SECTION_CLASS = 'source_section__open';\n            var sectionsOnPage = L_SECTION_CLASS;\n            var specName = utils.getSpecName(); //Определяем название спеки\n            var clientConfig = {};\n            var RES_HIDE_SECTIONS = 'Hide all sections';\n\n        if (storage) {\n            //Check if localstorage has required data\n            if (typeof localStorage.getItem('LsClientConfig') === 'string') { //LocalStorage can store only strings\n\n                //Using JSON for passing array through localStorage\n                clientConfig = $.parseJSON(localStorage.getItem('LsClientConfig'));\n\n            } else {\n                try {\n                    localStorage.setItem('LsClientConfig', JSON.stringify(clientConfig));\n                } catch (e) {\n                }\n            }\n        }\n\n        //Preparing config\n        if (typeof clientConfig[specName] !== 'object') {\n            clientConfig[specName] = {};\n            clientConfig[specName].closedSections = {};\n        } else if (typeof clientConfig[specName].closedSections !== 'object') {\n            clientConfig[specName].closedSections = {};\n        }\n\n        /*\n\n        Config must look like:\n        clientConfig = {\n            covers: {\n                closedSections: {\n                    section1: true,\n                    section2: true\n                }\n            }\n        }\n\n        */\n\n        var closedSections = clientConfig[specName].closedSections;\n\n        var updateConfig = function () {\n            try {\n                localStorage.setItem('LsClientConfig', JSON.stringify(clientConfig));\n            } catch (e) {\n            }\n        };\n\n        var openSpoiler = function ($target, config) {\n            if ($target.is('h3')) {\n                $target = $target.closest('.source_section');\n            }\n            $target.addClass(OPEN_SECTION_CLASS);\n\n            var sectionID = $target.attr('id');\n            var isRendered = false;\n\n            closedSections[\"section\" + sectionID] = false;\n\n            if (config) { //Remember options in localStorage\n                updateConfig();\n            }\n\n            // TODO: remove mustache check from core\n            if (options.pluginsOptions && options.pluginsOptions.mustache) {\n                // Need to use absolute path to get same scope with requires from inline scripts\n                require(['/plugins/mustache/js/mustache.js'], function(templater){\n                    if (typeof templater.PostponedTemplates !== 'undefined') {\n\n                        if ($target.attr('data-rendered') === 'true') {\n                            isRendered = true;\n                        }\n\n                        if (!isRendered) {\n\n                            for (var arr in templater.PostponedTemplates[sectionID]) {\n                                if (templater.PostponedTemplates[sectionID].hasOwnProperty(arr)) {\n                                    var values = templater.PostponedTemplates[sectionID][arr];\n                                    templater.insertTemplate(values[0], values[1], values[2]);\n                                }\n                            }\n\n                            $target.attr('data-rendered', 'true');\n                        }\n\n                    }\n                });\n            }\n\n        };\n\n        var closeSpoiler = function (t, config) {\n            t.removeClass(OPEN_SECTION_CLASS);\n\n            var tID = t.attr('id');\n\n            closedSections[\"section\" + tID] = true;\n\n            if (config) {\n                updateConfig();\n            }\n        };\n\n\n        var navHash = utils.parseNavHash();\n\n        var sectionsCount = sectionsOnPage.length;\n\n        for (var i = 0; i < sectionsCount; i++) {\n            var $this = $(sectionsOnPage[i]);\n            var tID = $this.attr('id');\n\n            //Check from local storage config\n            if (closedSections[\"section\" + tID]) {\n                $this.attr('data-def-stat', 'closed');\n            }\n\n            //Open all unclosed by confing spoilers and scroll to hash targeted section\n            //For ie < 8 all sections closed by default\n            if ($this.attr('data-def-stat') !== 'closed' && !(browser.msie && parseInt(browser.version, 10) < 8)) {\n               openSpoiler($this);\n            }\n        }\n\n        if (navHash !== '') {\n            openSpoiler($(navHash));\n        }\n\n        //To open sections on from inner navigation\n        var openOnNavigation = function() {\n            var navHash = utils.parseNavHash();\n\n            openSpoiler($(navHash));\n\n            //Close other closed by default sections\n            for (var i = 0; i < sectionsOnPage.length; i++) {\n                var t = $(sectionsOnPage[i]);\n                var tID = t.attr('id');\n\n                if (t.attr('data-def-stat') === 'closed' && navHash !== '#' + tID) {\n                    closeSpoiler(t);\n                }\n            }\n\n            if (navHash !== '') {\n                utils.scrollToSection(navHash);\n            }\n        };\n\n        //If supports history API\n        if (window.history && history.pushState && !browser.msie)  {\n            window.addEventListener('popstate', function (event) {\n                openOnNavigation();\n            });\n        } else {\n            $('.source_main_nav_a').on({\n                click: function(e) {\n                    e.preventDefault();\n\n                    //Imitate hash change on click\n                    var href = $(this).attr('href');\n\n                    href = href.split('#');\n                    href = href[href.length - 1];\n\n                    window.location.hash = href;\n\n                    openOnNavigation();\n\n                }\n            });\n        }\n\n        var toggleSpoiler = function (t) {\n            if (t.hasClass(OPEN_SECTION_CLASS)) {\n                closeSpoiler(t, true);\n            } else {\n                openSpoiler(t, true);\n            }\n        };\n\n        for(var j = 0; j < sections.getQuantity(); j++) {\n            sections.getSections()[j].headerElement\n                    .addClass(\"source_section_h\")\n                    .append('<a href=\"#\" onclick=\"return false\" class=\"source_section_h_expand\"></a>');\n        }\n\n        $('.source_section_h_expand').on({\n            click:function () {\n                $this = $(this).closest('.source_section');\n                toggleSpoiler($this);\n            }\n        });\n\n        innerNavigation.addMenuItem(RES_HIDE_SECTIONS, function(){\n            for (var i = 0; i < sectionsOnPage.length; i++) {\n                closeSpoiler($(sectionsOnPage[i]), true);\n            }\n        }, function(){\n            for (var i = 0; i < sectionsOnPage.length; i++) {\n                openSpoiler($(sectionsOnPage[i]), true);\n            }\n        });\n\n    });\n\n});"
  },
  {
    "path": "assets/js/modules/sections.js",
    "content": "/*\n *\n * Sections modules\n *\n * @author Alexey Ostrovsky\n *\n * */\n\ndefine([\n    \"jquery\",\n    \"sourceModules/module\"\n    ], function ($, module) {\n\n    'use strict';\n\n    function Sections() {\n        var _this = this;\n\n        this.sections = [];\n\n        $(function(){\n            _this.scanDOM();\n        });\n    }\n\n    Sections.prototype = module.createInstance();\n    Sections.prototype.constructor = Sections;\n\n    Sections.prototype.scanDOM = function () {\n        var _this = this;\n        $(\".\" + this.getOptions().SECTION_CLASS).each(function (index, elem) {\n            var section = $(elem);\n            var headerElement = section.find(\"h2:first\");\n\n            var subHeaders = section.children(\"h3\");\n            var subHeaderElements = [];\n\n            for (var i=0; i < subHeaders.length; i++) {\n                var targetSubHeader = subHeaders[i];\n\n                subHeaderElements[subHeaderElements.length] = $(targetSubHeader);\n            }\n\n            var sect = {\n                num: index + 1,\n                id: _this.setSectionId(section, index + 1),\n                caption: headerElement.text(),\n                sectionElement: section,\n                headerElement: headerElement,\n                subHeaderElements: subHeaderElements\n            };\n\n            _this.addSection(sect);\n        });\n\n        return this.getSections();\n    };\n\n    Sections.prototype.getSections = function () {\n        return this.sections;\n    };\n\n    Sections.prototype.addSection = function (sec) {\n        return this.sections.push(sec);\n    };\n\n    Sections.prototype.getQuantity = function () {\n        return this.getSections().length;\n    };\n\n    // Adding unique ID to section, if it's present\n    Sections.prototype.setSectionId = function (section, id) {\n        var _id = id;\n        var custom;\n\n        if (section.attr('id') !== undefined) {\n            custom = section.attr('id');\n        } else {\n            section.attr('id', _id);\n        }\n\n        section.children('h3').each(function(index) {\n            if ($(this).attr('id') === undefined) {\n                $(this).attr('id', _id + '.' + (index+1));\n            }\n        });\n\n        return custom || _id;\n    };\n\n    return new Sections();\n});"
  },
  {
    "path": "assets/js/modules/sectionsParser.js",
    "content": "/*\n *\n * Spec HTML parser for API\n *\n * @author Dmitry Lapynow\n *\n * */\n\n// TODO: wrap as requirejs module, and combine with phantomRunner.js\n\nfunction SourceGetSections() {\n    // Defining strict inside func, because PhantomJS stops evaluating this script if it's on top\n    'use strict';\n\n    var config = {\n        // include params from opt@argument first\n        code: 'source_example',\n        sectionHeader: '.source_section > h2:first-child',\n        h3: 'H3',\n        h4: 'H4',\n        timeout: 3000\n    };\n\n    var _h2 = 0, _h3 = 0, _h4 = 0;\n    var elem;\n    var prevFlag;\n    var root = false;\n\n    function getSections() {\n        var specData = [];\n        var sections = [].slice.call(document.querySelectorAll(config.sectionHeader));\n\n        if (sections[0]) {\n            for (var i = 0, l = sections.length; i < l; i++) {\n                var section = sections[i];\n                elem = section;\n\n                specData.push(parse(section));\n            }\n\n            return specData;\n        } else {\n            return undefined;\n        }\n    }\n\n    function parse(section) {\n        _h2++;\n        _h3 = 0;\n        _h4 = 0;\n\n        return new Spec(section);\n    }\n\n    function Spec(section) {\n        if (section.next){\n            elem = (elem) ? getNextSibling(elem) : null;\n        }\n\n        this.id = returnId(section);\n        this.visualID = visualID();\n        this.header = section.header || getHeader(elem);\n        this.nested = [];\n        this.html = [];\n\n        while (elem) {\n            if (root) {\n                elem = getPreviousSibling(elem);\n                root = false;\n                break;\n            }\n\n            var\n                tag = elem.tagName,\n                cls = elem.className,\n                flag = checkElem(tag, cls)\n                ;\n\n            if (flag === 'H2') {\n                this.header = getHeader(elem);\n                prevFlag = flag;\n            }\n            else if (flag === 'CODE') {\n                this.html.push(getHTML(elem));\n            }\n            else if (flag === 'H3') {\n                if (prevFlag === 'H4') {\n                    root = true;\n                }\n\n                if (prevFlag === 'H3' || prevFlag === 'H4') {\n                    prevFlag = null;\n                    elem = getPreviousSibling(elem);\n\n                    break;\n                }\n                _h3++;\n                _h4 = 0;\n                prevFlag = flag;\n                this.nested.push(new Spec({header: getHeader(elem), next: true, headerElem: elem}));\n            }\n            else if (flag === 'H4') {\n                if (prevFlag === flag) {\n                    prevFlag = null;\n                    elem = getPreviousSibling(elem);\n                    break;\n                }\n                _h4++;\n                prevFlag = flag;\n                this.nested.push(new Spec({header: getHeader(elem), next: true, headerElem: elem}));\n            }\n\n            if (elem) {\n                elem = getNextSibling(elem);\n            }\n        }\n    }\n\n    // HELPERS\n    function getNextSibling(elem) {\n        // JSdom doesn't support nextElementSibling\n        var nextSibling = elem.nextSibling;\n\n        // Checking if next sibling is an element, not whitespace\n        while(nextSibling && nextSibling.nodeType !== 1) {\n            nextSibling = nextSibling.nextSibling;\n        }\n\n        return nextSibling;\n    }\n\n    function getPreviousSibling(elem) {\n        // JSdom doesn't support previousElementSibling\n        var previousSibling = elem.previousSibling;\n\n        // Checking if prev sibling is an element, not whitespace\n        while(previousSibling && previousSibling.nodeType !== 1) {\n            previousSibling = previousSibling.previousSibling;\n        }\n\n        return previousSibling;\n    }\n\n    function returnId(section) {\n        var hasClass = function(el, className) {\n            if (el.classList) {\n                return el.classList.contains(className);\n            } else {\n                return new RegExp('(^| )' + className + '( |$)', 'gi').test(el.className);\n            }\n        };\n\n        var checkCustomID = function (){\n            var parent = section.parentNode;\n\n            if (parent && hasClass(parent, 'source_section') && parent.id) return parent.id;\n            if (section.id) return section.id;\n            if (section.headerElem && section.headerElem.id) return section.headerElem.id;\n\n            return undefined;\n        };\n\n        if (checkCustomID()) {\n            return checkCustomID();\n        } else {\n            return visualID();\n        }\n    }\n\n    function visualID() {\n        var idArr = [_h2];\n\n        if (_h3 > 0) idArr.push(_h3);\n        if (_h4 > 0) idArr.push(_h4);\n\n        return idArr.join('.');\n    }\n\n    function getHeader(elem) {\n        return elem.textContent || 'API: cannot get header.';\n    }\n\n    function getHTML(elem) {\n        return elem.innerHTML;\n    }\n\n    function checkElem(tag, cls) {\n        return isH2(tag, cls) || isH3(tag, cls) || isH4(tag, cls) || isCode(tag, cls);\n    }\n\n    function isH2(tag) {\n        return (tag === 'H2') ? 'H2' : false;\n    }\n\n    function isH3(tag) {\n        return (tag === 'H3')? 'H3' : false;\n    }\n\n    function isH4(tag) {\n        return (tag === 'H4')? 'H4': false;\n    }\n\n    function isCode(tag, cls) {\n        return ( (tag === 'SECTION' || tag === 'DIV') && cls.match(new RegExp('\\\\b'+ config.code + '\\\\b')) ) ? 'CODE' : false;\n    }\n\n    /* Start parser */\n    this.specHTMLContents = getSections();\n}\n\n/**\n * Filter list of HTML nodes\n *\n * @param {Array} elementsArr - nodelist to filter\n * @param {Function} [customElFilter] - Additional filter for element\n * @param {Boolean} [skipAttrFilters] - Set to true, if expect not filtered list of resources\n *\n * @returns {Array} Returns array with HTML of Style containers OR undefined\n */\nSourceGetSections.prototype.filterResourceElements = function(elementsArr, customElFilter, skipAttrFilters){\n    'use strict';\n\n    var filteredArr = [];\n    var defaultFilter = function(){ return true; };\n    var _customElFilter = typeof customElFilter === 'function' ? customElFilter : defaultFilter;\n\n    // Checking some exceptions\n    var checkDataSet = function(el){\n        if (skipAttrFilters) {\n            return true;\n        } else {\n            return !(\n                el.getAttribute('data-nonclarify') ||\n                el.getAttribute('data-requiremodule') ||\n                el.getAttribute('data-source') === 'core' ||\n                el.getAttribute('data-source') === 'plugin'\n            );\n        }\n    };\n\n    if (elementsArr && elementsArr.length > 0) {\n        var i = 0;\n        var el;\n        while(i < elementsArr.length) {\n            el = elementsArr[i];\n\n            if (_customElFilter(el) && checkDataSet(el)) {\n                // If not need to filter out, then push to output\n                filteredArr.push(el.outerHTML);\n            }\n            ++i;\n        }\n\n        return filteredArr.length > 0 ? filteredArr : undefined;\n    } else {\n        return undefined;\n    }\n};\n\n/**\n * Parse CSS links from Spec\n *\n * @param {Object} scope to search - document.head or document.body\n * @param {Boolean} [skipAttrFilters] - Set to true, if expect not filtered list of resources\n *\n * @returns {Array} Returns array with HTML of CSS links OR undefined\n */\nSourceGetSections.prototype.getCssLinksHTML = function(scope, skipAttrFilters) {\n    'use strict';\n\n    var links = scope.getElementsByTagName('link');\n    var customFilter = function(el){\n        return el.rel === 'stylesheet' || el.type === 'text/css';\n    };\n\n    return this.filterResourceElements(links, customFilter, skipAttrFilters);\n};\n\n/**\n * Parse Scripts from Spec\n *\n * @param {Object} scope to search - document.head or document.body\n * @param {Boolean} [skipAttrFilters] - Set to true, if expect not filtered list of resources\n *\n * @returns {Array} Returns array with HTML of Scripts OR undefined\n */\nSourceGetSections.prototype.getScriptsHTML = function(scope, skipAttrFilters) {\n    'use strict';\n\n    var scripts = scope.getElementsByTagName('script');\n\n    return this.filterResourceElements(scripts, null, skipAttrFilters);\n};\n\n/**\n * Parse Style containers from Spec\n *\n * @param {Object} scope to search - document.head or document.body\n * @param {Boolean} [skipAttrFilters] - Set to true, if expect not filtered list of resources\n *\n * @returns {Array} Returns array with HTML of Style containers OR undefined\n */\nSourceGetSections.prototype.getStyleContainersHTML = function(scope, skipAttrFilters){\n    'use strict';\n\n    var styles = scope.getElementsByTagName('style');\n\n    return this.filterResourceElements(styles, null, skipAttrFilters);\n};\n\n/**\n * Flatten HTML contents\n *\n * @returns {Object} Updates global 'specHTMLContentsFlatObj' and return flat specHTMLContents\n */\nSourceGetSections.prototype.flattenHTMLContents = function(){\n    // TODO: Move to CommonJS module, and reuse API/parseData.js\n    'use strict';\n    var flatList = {};\n\n    var parseContents = function(contents){\n        if (contents) {\n            for (var i=0; contents.length > i ; i++) {\n                var current = contents[i];\n\n                flatList[current.id] = current;\n\n                if (current.nested.length > 0) {\n                    parseContents(current.nested);\n                }\n            }\n        }\n    };\n\n    parseContents(this.specHTMLContents);\n\n    this.specHTMLContentsFlatObj = flatList;\n    return flatList;\n};\n\n\n/**\n * Get specific sections of Spec\n *\n * @param {Array} sections - Array of sections to return\n *\n * @returns {Object} Return array sections HTML OR undefined\n */\nSourceGetSections.prototype.getContentsBySection = function(sections){\n    // TODO: Move to CommonJS module, and reuse API/parseData.js\n    'use strict';\n    var _this = this;\n\n    if (Array.isArray(sections) && sections.length > 0) {\n        // Check if flattened object is already prepared\n        if (!_this.specHTMLContentsFlatObj) {\n            _this.flattenHTMLContents();\n        }\n\n        var pickedSections = [];\n\n        sections.forEach(function(id){\n            var objectToAdd = _this.specHTMLContentsFlatObj[id];\n\n            if (objectToAdd) pickedSections.push(objectToAdd);\n        });\n\n        return pickedSections.length === 0 ? undefined : pickedSections;\n    } else {\n        return undefined;\n    }\n};\n\n/**\n * Getter for contents of the Spec\n *\n * @returns {Object} Returns object with spec HTML contents OR undefined\n */\nSourceGetSections.prototype.getContents = function(){\n    'use strict';\n\n    return this.specHTMLContents;\n};\n\n/**\n * Get full spec object\n *\n * @param {Array} [sections] - Array of sections to return\n *\n * @returns {Object} Returns object with spec HTML contents OR undefined\n */\nSourceGetSections.prototype.getSpecFull = function(sections){\n    'use strict';\n\n    var output = {};\n\n    output.headResources = this.getSpecResources() || {};\n    output.bodyResources = this.getSpecResources('body') || {};\n\n    if (sections) {\n        output.contents = this.getContentsBySection(sections);\n    } else {\n        output.contents = this.specHTMLContents;\n    }\n\n    return (output.contents || output.headResources || output.bodyResources) ? output : undefined;\n};\n\n\n/**\n * Getter for assets resources of the Spec\n *\n * @param {String} [scope] - \"head\" or \"body\", \"head\" is used by default\n *\n * @returns {Object} Returns object with HTML lists containing Spec assets resources OR undefined\n */\nSourceGetSections.prototype.getSpecResources = function(scope){\n    'use strict';\n\n    var _scope = scope === 'body' ? document.body : document.head;\n\n    var output = {};\n\n    output.cssLinks = this.getCssLinksHTML(_scope);\n    output.scripts = this.getScriptsHTML(_scope);\n    output.cssStyles = this.getStyleContainersHTML(_scope);\n\n    return (output.cssLinks || output.scripts || output.cssStyles) ? output : undefined;\n};"
  },
  {
    "path": "assets/js/modules/specDecorations.js",
    "content": "define([\n    \"jquery\",\n    \"source/load-options\",\n    \"sourceModules/browser\"\n    ], function($, options, browser) {\n\n    'use strict';\n\n    var SECTION_CLASS = options.SECTION_CLASS;\n    var L_SECTION_CLASS = $('.'+SECTION_CLASS);\n    var SCROLLED_DOWN_MOD_CLASS = 'source__scrolled-down';\n    //h3 decoration\n    L_SECTION_CLASS.find('>h3').wrapInner('<span class=\"source_subsection_h\"></span>');\n\n    //IE layout fix\n    if (browser.msie && parseInt(browser.version, 10) < 8) {\n        //After demo section clear\n        $('<div class=\"source_clear\"></div>').insertAfter('.source_section > .source_example');\n    }\n\n    //Fading header on scroll down\n    $(window).scroll(function () {\n        if ($(window).scrollTop() > 50) {\n            $('body').addClass(SCROLLED_DOWN_MOD_CLASS);\n        }\n        else {\n            $('body').removeClass(SCROLLED_DOWN_MOD_CLASS);\n        }\n    }).trigger('scroll');\n\n});"
  },
  {
    "path": "assets/js/modules/trimSpaces.js",
    "content": "/*\n*\n* Media-queries helper\n*\n* @author Evgeniy Khoroshilov\n*\n* */\n\ndefine([\n    \"source/load-options\",\n    \"sourceModules/codeSource\"\n    ], function(options) {\n\n    'use strict';\n\n    var EXAMPLE_CLASS = options.exampleSectionClass;\n    var L_EXAMPLE_CLASS = $('.'+EXAMPLE_CLASS);\n\n    //trim spaces between html tags in example sections\n    $.fn.trimSpaces = function () {\n        $(this).each(function () {\n            var elem = $(this);\n            var regex = new RegExp(\"\\xa0\");\n            if (elem.children().length) {\n                elem.contents()\n                        .filter(function () {\n                            return this.nodeType === 3 && !/\\S/.test(this.nodeValue);\n                        })\n                        .filter(function () {\n                            return !regex.test(this.nodeValue);\n                        }).remove().end()\n                        .filter(function () {\n                            return  regex.test(this.nodeValue);\n                        }).replaceWith('&nbsp;');\n                elem.children().trimSpaces();\n            }\n        });\n        return this;\n    };\n\n    L_EXAMPLE_CLASS.trimSpaces();\n\n});"
  },
  {
    "path": "assets/js/modules/utils.js",
    "content": "/*\n*\n* Utils core for all modules\n*\n* */\n\ndefine([\n    'jquery',\n    'sourceModules/module'\n    ], function ($, module) {\n\n    'use strict';\n\n    function Utils() {}\n\n    /* наследуем от Module */\n    Utils.prototype = module.createInstance();\n    Utils.prototype.constructor = Utils;\n\n    Utils.prototype.parseNavHash = function () {\n        var hash = window.location.hash.replace('#/','#');\n\n        // Cleaning \"!\" from the end of hash, left for legacy link support\n        if (hash.substring(hash.length-1) === \"!\") {\n            hash = hash.substring(0, hash.length-1);\n        }\n\n        return hash;\n    };\n\n    Utils.prototype.getUrlParameter = function (name) {\n        name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n        var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n        var results = regex.exec(location.search);\n\n        return results === null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n    };\n\n     //sectionID = '#id'\n    Utils.prototype.scrollToSection = function (sectionID) {\n        // Modifying ID, for custom selection because of ids named \"1.1\", \"2.2\" etc\n        var _sectionID = sectionID.replace('#','');\n\n        if (_sectionID === '') return;\n\n        var newPosition = $(document.getElementById(_sectionID)).offset();\n\n        if (!newPosition) return;\n\n        var newPositionPadding = $(\".source_header\").outerHeight() + 10; // Header height + padding\n        var scrollTopPosition = newPosition.top - newPositionPadding;\n\n        window.scrollTo(0, scrollTopPosition);\n\n        return scrollTopPosition;\n    };\n\n    Utils.prototype.getSpecName = function() {\n        var specName;\n        var pageUrl = window.location.pathname;\n\n        var pageUrlSplit = pageUrl.split(\"/\"); //Разбивает на массив\n        specName = pageUrlSplit[pageUrlSplit.length - 2]; //Берет последнюю часть урла\n\n        return specName;\n    };\n\n    Utils.prototype.getPathToPage = function(specUrlFromFileTree) {\n        var pathToSpec = (function(){\n            var path;\n\n            //specUrl is used from parseFileTree, and contains only path, without file like \"/docs/spec\"\n            if (typeof specUrlFromFileTree === 'undefined') {\n                path = window.location.pathname;\n\n                path = path.split(\"/\"); //Breaking url to array\n                path.splice(path.length - 1, 1); //Clear page.html from array\n                path = path.join(\"/\");\n            } else {\n                path = specUrlFromFileTree;\n            }\n\n            return path;\n        }());\n\n        return pathToSpec;\n    };\n\n    Utils.prototype.hasClasses = function(element, selectorsArr) {\n        for (var i in selectorsArr) {\n            if (element.hasClass(selectorsArr[i]))\n                return true;\n        }\n\n        return false;\n    };\n\n    Utils.prototype.getCookie = function(name) {\n\t\tvar matches = document.cookie.match(new RegExp(\"(?:^|; )\" + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + \"=([^;]*)\"));\n\t\treturn matches ? decodeURIComponent(matches[1]) : undefined;\n    };\n\n    Utils.prototype.isDevelopmentMode = function() {\n\t\treturn this.getCookie('source-mode') === 'development';\n    };\n\n\tUtils.prototype.isArray = function(arr) {\n\t\treturn Object.prototype.toString.call(arr) === '[object Array]';\n\t};\n\n    Utils.prototype.unifySpecPath = function(url) {\n        if (url.slice(-10) === \"index.html\") url = url.slice(0, -10);\n        if (url.slice(-9) === \"index.src\") url = url.slice(0, -9);\n        if (url.charAt(0) !== \"/\") url = \"/\" + url;\n        if (url.charAt(url.length - 1) === \"/\") url = url.slice(0, -1);\n\n        return url;\n    };\n\n    Utils.prototype.toggleBlock = function(elToClick, elToShow) {\n        var $elToClick = '.' + elToClick;\n\n        $(document).on('click', $elToClick, function() {\n            var $elToShow = $('.' + elToShow);\n\n            $(this).toggleClass('__open');\n            $elToShow.toggle();\n        });\n    };\n\n    return new Utils();\n});"
  },
  {
    "path": "assets/js/require-config.js",
    "content": "// Joined to require.bundle.js\n\nrequirejs.config({\n    paths: {\n        // /source/assets requests are routed to /assets\n        source: '/source/assets/js',\n        sourceModules: '/source/assets/js/modules',\n        sourceLib: '/source/assets/js/lib',\n        sourceTemplates: '/source/assets/templates',\n\n        // Require.js plugins\n        text: '/source/assets/js/lib/text',\n\n        // Relative to user root\n        js: '/assets/js',\n        plugins: '/plugins',\n        node_modules: '/node_modules'\n    }\n});"
  },
  {
    "path": "assets/templates/clarifyPanel.inc.html",
    "content": "<div class=\"source_clarify_panel\">\n    <div class=\"source_clarify_panel_i\">\n        <h2 class=\"source_clarify_panel_h2\">Select sections</h2>\n        <select class=\"source_clarify_panel_sections js-source_clarify_panel_sections\" multiple>\n            <% _.forEach(sectionsIDList, function(section) { %>\n            <option data-section=\"<%- section.id %>\"><%- section.visualID %>. <%- section.header %></option>\n            <% }); %>\n        </select>\n    </div>\n    <div class=\"source_clarify_panel_i\">\n        <h2 class=\"source_clarify_panel_h2\">Select template</h2>\n        <label>\n            <select class=\"source_clarify_panel_select js-source_clarify_panel_select-tpl\">\n                <% _.forEach(tplList, function(tpl) { %>\n                <option data-tpl-name=\"<%- tpl %>\"><%- tpl %></option>\n                <% }); %>\n            </select>\n        </label>\n    </div>\n    <div class=\"source_clarify_panel_i\">\n        <h2 class=\"source_clarify_panel_h2\">Options</h2>\n        <div class=\"source_clarify_panel_options\">\n            <ul class=\"source_clarify_panel_option-list\">\n                <% if (showApiTargetOption) { %>\n                    <li class=\"source_clarify_panel_option-item\">\n                        <label>\n                            <input type=\"checkbox\" class=\"source_clarify_panel_option-checkbox js-source_clarify_panel_option-checkbox\" name=\"fromApi\"> Get HTML From API\n                        </label>\n                    </li>\n                <% } %>\n                <% if (htmlParser) { %>\n                    <li class=\"source_clarify_panel_option-item\">\n                        <label>\n                            <input type=\"checkbox\" class=\"source_clarify_panel_option-checkbox js-source_clarify_panel_option-checkbox\" name=\"apiUpdate\"> Update Spec HTML API on each Clarify call\n                        </label>\n                    </li>\n                <% } %>\n                <li class=\"source_clarify_panel_option-item\">\n                    <label>\n                        <input type=\"checkbox\" class=\"source_clarify_panel_option-checkbox js-source_clarify_panel_option-checkbox\" name=\"nojs\"> Remove JS scripts\n                    </label>\n                </li>\n            </ul>\n        </div>\n    </div>\n    <div class=\"source_clarify_panel_i\">\n        <button class=\"source_clarify_panel_go js-source_clarify_panel_go\">Update view</button>\n        <a class=\"source_clarify_panel_return-link js-source_clarify_return-link\" href=\"<%- specUrl %>\">Return to Spec</a>\n    </div>\n</div>"
  },
  {
    "path": "assets/templates/footer.inc.html",
    "content": "<!-- Core footer, just for example, use /public/assets/templates/footer.inc.html -->\n\n<footer class=\"source_footer\">\n    <div class=\"source_col-main\">\n        <div class=\"source_col\">\n            <h2>Catalog</h2>\n            <ul class=\"source_ul\">\n\t            <li><a class=\"source_a_l\" href=\"#777\">Your link</a></li>\n            </ul>\n        </div>\n        <div class=\"source_footer_copy\">\n            Copyright © 2013-2015 <a href=\"http://sourcejs.com\" class=\"source_a_l\">Sourcejs.com</a> <span class=\"source_footer_version\">(v.<%- engineVersion %>)</span>\n        </div>\n    </div>\n</footer>"
  },
  {
    "path": "assets/templates/header.inc.html",
    "content": "<!-- Core header, just for example, use /public/assets/templates/header.inc.html -->\n\n<header class=\"source_header\">\n\n    <div class=\"source_col-main\">\n        <div class=\"source_col __14 __right\">\n            <div class=\"source_search\">\n                <input class=\"source_search_it\" id=\"livesearch\" type=\"text\" placeholder=\"Go to page\"/>\n            </div>\n        </div>\n\n        <div class=\"source_col source_col__23\">\n            <a class=\"source_logo\" href=\"/\">Source</a>\n\n            <nav class=\"source_header_nav\">\n                <ul class=\"source_header_nav_lst\">\n                    <li class=\"source_header_nav_i\"><a class=\"source_a_l\" href=\"#777\">Link</a></li>\n                </ul>\n            </nav>\n\n            <a class=\"js-hook source_login\"></a>\n        </div>\n    </div>\n</header>"
  },
  {
    "path": "assets/templates/nav.inc.html",
    "content": "<nav class=\"source_main_nav source_nav\">\n\t<div class=\"source_nav_c\">\n\t\t<div class=\"source_main_nav_i\">\n\t\t\t<h2>Table of content:</h2>\n\t\t\t<ul class=\"source_nav_ul source_main_nav_ul\">\n\t\t\t\t<!--Filled dynamically-->\n\t\t\t</ul>\n\t\t</div>\n\n\t\t<div class=\"source_main_nav_ac source_main_nav_i\">\n\t\t\t<!--Filled dynamically-->\n\t\t</div>\n\n\t</div>\n</nav>"
  },
  {
    "path": "assets/templates/navActionItem.inc.html",
    "content": "<div class=\"source_main_nav_ac_item __simple\">\n    <div class=\"source_main_nav_ac_tx\">Option</div>\n    <div class=\"source_main_nav_ac-list\">\n    </div>\n</div>"
  },
  {
    "path": "assets/templates/navActionTumbler.inc.html",
    "content": "<div class=\"source_main_nav_ac_item\">\n    <div class=\"source_main_nav_ac_tx\">Option</div>\n    <div class=\"source_slider_frame\">\n        <span class=\"source_slider_button\">\n            <span class=\"source_slider_text source_slider_text_on\">ON</span>\n            <span class=\"source_slider_text source_slider_text_off\">OFF</span>\n        </span>\n    </div>\n</div>"
  },
  {
    "path": "assets/test/index.html",
    "content": "﻿<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <title>Unit tests</title>\n\n    <link href=\"/source/assets/css/source.css\" rel=\"stylesheet\">\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"jasmine/jasmine.css\">\n\n    <!--[if lt IE 9]><script type=\"text/javascript\" src=\"/source/assets/js/lib/html5shiv.js\"></script><![endif]-->\n    <script src=\"/source/assets/js/require.bundle.js\"></script>\n    <script src=\"js/tests.js\"></script>\n\n</head>\n<body>\n\n<div id=\"sandbox\" style=\"overflow: hidden; height: 1px;\"></div>\n\n</body>\n</html>"
  },
  {
    "path": "assets/test/jasmine/MIT.LICENSE",
    "content": "Copyright (c) 2008-2011 Pivotal Labs\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "assets/test/jasmine/jasmine-html.js",
    "content": "jasmine.HtmlReporterHelpers = {};\n\njasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {\n  var el = document.createElement(type);\n\n  for (var i = 2; i < arguments.length; i++) {\n    var child = arguments[i];\n\n    if (typeof child === 'string') {\n      el.appendChild(document.createTextNode(child));\n    } else {\n      if (child) {\n        el.appendChild(child);\n      }\n    }\n  }\n\n  for (var attr in attrs) {\n    if (attr == \"className\") {\n      el[attr] = attrs[attr];\n    } else {\n      el.setAttribute(attr, attrs[attr]);\n    }\n  }\n\n  return el;\n};\n\njasmine.HtmlReporterHelpers.getSpecStatus = function(child) {\n  var results = child.results();\n  var status = results.passed() ? 'passed' : 'failed';\n  if (results.skipped) {\n    status = 'skipped';\n  }\n\n  return status;\n};\n\njasmine.HtmlReporterHelpers.appendToSummary = function(child, childElement) {\n  var parentDiv = this.dom.summary;\n  var parentSuite = (typeof child.parentSuite == 'undefined') ? 'suite' : 'parentSuite';\n  var parent = child[parentSuite];\n\n  if (parent) {\n    if (typeof this.views.suites[parent.id] == 'undefined') {\n      this.views.suites[parent.id] = new jasmine.HtmlReporter.SuiteView(parent, this.dom, this.views);\n    }\n    parentDiv = this.views.suites[parent.id].element;\n  }\n\n  parentDiv.appendChild(childElement);\n};\n\n\njasmine.HtmlReporterHelpers.addHelpers = function(ctor) {\n  for(var fn in jasmine.HtmlReporterHelpers) {\n    ctor.prototype[fn] = jasmine.HtmlReporterHelpers[fn];\n  }\n};\n\njasmine.HtmlReporter = function(_doc) {\n  var self = this;\n  var doc = _doc || window.document;\n\n  var reporterView;\n\n  var dom = {};\n\n  // Jasmine Reporter Public Interface\n  self.logRunningSpecs = false;\n\n  self.reportRunnerStarting = function(runner) {\n    var specs = runner.specs() || [];\n\n    if (specs.length == 0) {\n      return;\n    }\n\n    createReporterDom(runner.env.versionString());\n    doc.body.appendChild(dom.reporter);\n    setExceptionHandling();\n\n    reporterView = new jasmine.HtmlReporter.ReporterView(dom);\n    reporterView.addSpecs(specs, self.specFilter);\n  };\n\n  self.reportRunnerResults = function(runner) {\n    reporterView && reporterView.complete();\n  };\n\n  self.reportSuiteResults = function(suite) {\n    reporterView.suiteComplete(suite);\n  };\n\n  self.reportSpecStarting = function(spec) {\n    if (self.logRunningSpecs) {\n      self.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');\n    }\n  };\n\n  self.reportSpecResults = function(spec) {\n    reporterView.specComplete(spec);\n  };\n\n  self.log = function() {\n    var console = jasmine.getGlobal().console;\n    if (console && console.log) {\n      if (console.log.apply) {\n        console.log.apply(console, arguments);\n      } else {\n        console.log(arguments); // ie fix: console.log.apply doesn't exist on ie\n      }\n    }\n  };\n\n  self.specFilter = function(spec) {\n    if (!focusedSpecName()) {\n      return true;\n    }\n\n    return spec.getFullName().indexOf(focusedSpecName()) === 0;\n  };\n\n  return self;\n\n  function focusedSpecName() {\n    var specName;\n\n    (function memoizeFocusedSpec() {\n      if (specName) {\n        return;\n      }\n\n      var paramMap = [];\n      var params = jasmine.HtmlReporter.parameters(doc);\n\n      for (var i = 0; i < params.length; i++) {\n        var p = params[i].split('=');\n        paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);\n      }\n\n      specName = paramMap.spec;\n    })();\n\n    return specName;\n  }\n\n  function createReporterDom(version) {\n    dom.reporter = self.createDom('div', { id: 'HTMLReporter', className: 'jasmine_reporter' },\n      dom.banner = self.createDom('div', { className: 'banner' },\n        self.createDom('span', { className: 'title' }, \"Jasmine \"),\n        self.createDom('span', { className: 'version' }, version)),\n\n      dom.symbolSummary = self.createDom('ul', {className: 'symbolSummary'}),\n      dom.alert = self.createDom('div', {className: 'alert'},\n        self.createDom('span', { className: 'exceptions' },\n          self.createDom('label', { className: 'label', 'for': 'no_try_catch' }, 'No try/catch'),\n          self.createDom('input', { id: 'no_try_catch', type: 'checkbox' }))),\n      dom.results = self.createDom('div', {className: 'results'},\n        dom.summary = self.createDom('div', { className: 'summary' }),\n        dom.details = self.createDom('div', { id: 'details' }))\n    );\n  }\n\n  function noTryCatch() {\n    return window.location.search.match(/catch=false/);\n  }\n\n  function searchWithCatch() {\n    var params = jasmine.HtmlReporter.parameters(window.document);\n    var removed = false;\n    var i = 0;\n\n    while (!removed && i < params.length) {\n      if (params[i].match(/catch=/)) {\n        params.splice(i, 1);\n        removed = true;\n      }\n      i++;\n    }\n    if (jasmine.CATCH_EXCEPTIONS) {\n      params.push(\"catch=false\");\n    }\n\n    return params.join(\"&\");\n  }\n\n  function setExceptionHandling() {\n    var chxCatch = document.getElementById('no_try_catch');\n\n    if (noTryCatch()) {\n      chxCatch.setAttribute('checked', true);\n      jasmine.CATCH_EXCEPTIONS = false;\n    }\n    chxCatch.onclick = function() {\n      window.location.search = searchWithCatch();\n    };\n  }\n};\njasmine.HtmlReporter.parameters = function(doc) {\n  var paramStr = doc.location.search.substring(1);\n  var params = [];\n\n  if (paramStr.length > 0) {\n    params = paramStr.split('&');\n  }\n  return params;\n}\njasmine.HtmlReporter.sectionLink = function(sectionName) {\n  var link = '?';\n  var params = [];\n\n  if (sectionName) {\n    params.push('spec=' + encodeURIComponent(sectionName));\n  }\n  if (!jasmine.CATCH_EXCEPTIONS) {\n    params.push(\"catch=false\");\n  }\n  if (params.length > 0) {\n    link += params.join(\"&\");\n  }\n\n  return link;\n};\njasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter);\njasmine.HtmlReporter.ReporterView = function(dom) {\n  this.startedAt = new Date();\n  this.runningSpecCount = 0;\n  this.completeSpecCount = 0;\n  this.passedCount = 0;\n  this.failedCount = 0;\n  this.skippedCount = 0;\n\n  this.createResultsMenu = function() {\n    this.resultsMenu = this.createDom('span', {className: 'resultsMenu bar'},\n      this.summaryMenuItem = this.createDom('a', {className: 'summaryMenuItem', href: \"#\"}, '0 specs'),\n      ' | ',\n      this.detailsMenuItem = this.createDom('a', {className: 'detailsMenuItem', href: \"#\"}, '0 failing'));\n\n    this.summaryMenuItem.onclick = function() {\n      dom.reporter.className = dom.reporter.className.replace(/ showDetails/g, '');\n    };\n\n    this.detailsMenuItem.onclick = function() {\n      showDetails();\n    };\n  };\n\n  this.addSpecs = function(specs, specFilter) {\n    this.totalSpecCount = specs.length;\n\n    this.views = {\n      specs: {},\n      suites: {}\n    };\n\n    for (var i = 0; i < specs.length; i++) {\n      var spec = specs[i];\n      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom, this.views);\n      if (specFilter(spec)) {\n        this.runningSpecCount++;\n      }\n    }\n  };\n\n  this.specComplete = function(spec) {\n    this.completeSpecCount++;\n\n    if (isUndefined(this.views.specs[spec.id])) {\n      this.views.specs[spec.id] = new jasmine.HtmlReporter.SpecView(spec, dom);\n    }\n\n    var specView = this.views.specs[spec.id];\n\n    switch (specView.status()) {\n      case 'passed':\n        this.passedCount++;\n        break;\n\n      case 'failed':\n        this.failedCount++;\n        break;\n\n      case 'skipped':\n        this.skippedCount++;\n        break;\n    }\n\n    specView.refresh();\n    this.refresh();\n  };\n\n  this.suiteComplete = function(suite) {\n    var suiteView = this.views.suites[suite.id];\n    if (isUndefined(suiteView)) {\n      return;\n    }\n    suiteView.refresh();\n  };\n\n  this.refresh = function() {\n\n    if (isUndefined(this.resultsMenu)) {\n      this.createResultsMenu();\n    }\n\n    // currently running UI\n    if (isUndefined(this.runningAlert)) {\n      this.runningAlert = this.createDom('a', { href: jasmine.HtmlReporter.sectionLink(), className: \"runningAlert bar\" });\n      dom.alert.appendChild(this.runningAlert);\n    }\n    this.runningAlert.innerHTML = \"Running \" + this.completeSpecCount + \" of \" + specPluralizedFor(this.totalSpecCount);\n\n    // skipped specs UI\n    if (isUndefined(this.skippedAlert)) {\n      this.skippedAlert = this.createDom('a', { href: jasmine.HtmlReporter.sectionLink(), className: \"skippedAlert bar\" });\n    }\n\n    this.skippedAlert.innerHTML = \"Skipping \" + this.skippedCount + \" of \" + specPluralizedFor(this.totalSpecCount) + \" - run all\";\n\n    if (this.skippedCount === 1 && isDefined(dom.alert)) {\n      dom.alert.appendChild(this.skippedAlert);\n    }\n\n    // passing specs UI\n    if (isUndefined(this.passedAlert)) {\n      this.passedAlert = this.createDom('span', { href: jasmine.HtmlReporter.sectionLink(), className: \"passingAlert bar\" });\n    }\n    this.passedAlert.innerHTML = \"Passing \" + specPluralizedFor(this.passedCount);\n\n    // failing specs UI\n    if (isUndefined(this.failedAlert)) {\n      this.failedAlert = this.createDom('span', {href: \"?\", className: \"failingAlert bar\"});\n    }\n    this.failedAlert.innerHTML = \"Failing \" + specPluralizedFor(this.failedCount);\n\n    if (this.failedCount === 1 && isDefined(dom.alert)) {\n      dom.alert.appendChild(this.failedAlert);\n      dom.alert.appendChild(this.resultsMenu);\n    }\n\n    // summary info\n    this.summaryMenuItem.innerHTML = \"\" + specPluralizedFor(this.runningSpecCount);\n    this.detailsMenuItem.innerHTML = \"\" + this.failedCount + \" failing\";\n  };\n\n  this.complete = function() {\n    dom.alert.removeChild(this.runningAlert);\n\n    this.skippedAlert.innerHTML = \"Ran \" + this.runningSpecCount + \" of \" + specPluralizedFor(this.totalSpecCount) + \" - run all\";\n\n    if (this.failedCount === 0) {\n      dom.alert.appendChild(this.createDom('span', {className: 'passingAlert bar'}, \"Passing \" + specPluralizedFor(this.passedCount)));\n    } else {\n      showDetails();\n    }\n\n    dom.banner.appendChild(this.createDom('span', {className: 'duration'}, \"finished in \" + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + \"s\"));\n  };\n\n  return this;\n\n  function showDetails() {\n    if (dom.reporter.className.search(/showDetails/) === -1) {\n      dom.reporter.className += \" showDetails\";\n    }\n  }\n\n  function isUndefined(obj) {\n    return typeof obj === 'undefined';\n  }\n\n  function isDefined(obj) {\n    return !isUndefined(obj);\n  }\n\n  function specPluralizedFor(count) {\n    var str = count + \" spec\";\n    if (count > 1) {\n      str += \"s\"\n    }\n    return str;\n  }\n\n};\n\njasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.ReporterView);\n\n\njasmine.HtmlReporter.SpecView = function(spec, dom, views) {\n  this.spec = spec;\n  this.dom = dom;\n  this.views = views;\n\n  this.symbol = this.createDom('li', { className: 'pending' });\n  this.dom.symbolSummary.appendChild(this.symbol);\n\n  this.summary = this.createDom('div', { className: 'specSummary' },\n    this.createDom('a', {\n      className: 'description',\n      href: jasmine.HtmlReporter.sectionLink(this.spec.getFullName()),\n      title: this.spec.getFullName()\n    }, this.spec.description)\n  );\n\n  this.detail = this.createDom('div', { className: 'specDetail' },\n      this.createDom('a', {\n        className: 'description',\n        href: '?spec=' + encodeURIComponent(this.spec.getFullName()),\n        title: this.spec.getFullName()\n      }, this.spec.getFullName())\n  );\n};\n\njasmine.HtmlReporter.SpecView.prototype.status = function() {\n  return this.getSpecStatus(this.spec);\n};\n\njasmine.HtmlReporter.SpecView.prototype.refresh = function() {\n  this.symbol.className = this.status();\n\n  switch (this.status()) {\n    case 'skipped':\n      break;\n\n    case 'passed':\n      this.appendSummaryToSuiteDiv();\n      break;\n\n    case 'failed':\n      this.appendSummaryToSuiteDiv();\n      this.appendFailureDetail();\n      break;\n  }\n};\n\njasmine.HtmlReporter.SpecView.prototype.appendSummaryToSuiteDiv = function() {\n  this.summary.className += ' ' + this.status();\n  this.appendToSummary(this.spec, this.summary);\n};\n\njasmine.HtmlReporter.SpecView.prototype.appendFailureDetail = function() {\n  this.detail.className += ' ' + this.status();\n\n  var resultItems = this.spec.results().getItems();\n  var messagesDiv = this.createDom('div', { className: 'messages' });\n\n  for (var i = 0; i < resultItems.length; i++) {\n    var result = resultItems[i];\n\n    if (result.type == 'log') {\n      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));\n    } else if (result.type == 'expect' && result.passed && !result.passed()) {\n      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));\n\n      if (result.trace.stack) {\n        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));\n      }\n    }\n  }\n\n  if (messagesDiv.childNodes.length > 0) {\n    this.detail.appendChild(messagesDiv);\n    this.dom.details.appendChild(this.detail);\n  }\n};\n\njasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SpecView);jasmine.HtmlReporter.SuiteView = function(suite, dom, views) {\n  this.suite = suite;\n  this.dom = dom;\n  this.views = views;\n\n  this.element = this.createDom('div', { className: 'suite' },\n    this.createDom('a', { className: 'description', href: jasmine.HtmlReporter.sectionLink(this.suite.getFullName()) }, this.suite.description)\n  );\n\n  this.appendToSummary(this.suite, this.element);\n};\n\njasmine.HtmlReporter.SuiteView.prototype.status = function() {\n  return this.getSpecStatus(this.suite);\n};\n\njasmine.HtmlReporter.SuiteView.prototype.refresh = function() {\n  this.element.className += \" \" + this.status();\n};\n\njasmine.HtmlReporterHelpers.addHelpers(jasmine.HtmlReporter.SuiteView);\n\n/* @deprecated Use jasmine.HtmlReporter instead\n */\njasmine.TrivialReporter = function(doc) {\n  this.document = doc || document;\n  this.suiteDivs = {};\n  this.logRunningSpecs = false;\n};\n\njasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {\n  var el = document.createElement(type);\n\n  for (var i = 2; i < arguments.length; i++) {\n    var child = arguments[i];\n\n    if (typeof child === 'string') {\n      el.appendChild(document.createTextNode(child));\n    } else {\n      if (child) { el.appendChild(child); }\n    }\n  }\n\n  for (var attr in attrs) {\n    if (attr == \"className\") {\n      el[attr] = attrs[attr];\n    } else {\n      el.setAttribute(attr, attrs[attr]);\n    }\n  }\n\n  return el;\n};\n\njasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {\n  var showPassed, showSkipped;\n\n  this.outerDiv = this.createDom('div', { id: 'TrivialReporter', className: 'jasmine_reporter' },\n      this.createDom('div', { className: 'banner' },\n        this.createDom('div', { className: 'logo' },\n            this.createDom('span', { className: 'title' }, \"Jasmine\"),\n            this.createDom('span', { className: 'version' }, runner.env.versionString())),\n        this.createDom('div', { className: 'options' },\n            \"Show \",\n            showPassed = this.createDom('input', { id: \"__jasmine_TrivialReporter_showPassed__\", type: 'checkbox' }),\n            this.createDom('label', { \"for\": \"__jasmine_TrivialReporter_showPassed__\" }, \" passed \"),\n            showSkipped = this.createDom('input', { id: \"__jasmine_TrivialReporter_showSkipped__\", type: 'checkbox' }),\n            this.createDom('label', { \"for\": \"__jasmine_TrivialReporter_showSkipped__\" }, \" skipped\")\n            )\n          ),\n\n      this.runnerDiv = this.createDom('div', { className: 'runner running' },\n          this.createDom('a', { className: 'run_spec', href: '?' }, \"run all\"),\n          this.runnerMessageSpan = this.createDom('span', {}, \"Running...\"),\n          this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, \"\"))\n      );\n\n  this.document.body.appendChild(this.outerDiv);\n\n  var suites = runner.suites();\n  for (var i = 0; i < suites.length; i++) {\n    var suite = suites[i];\n    var suiteDiv = this.createDom('div', { className: 'suite' },\n        this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, \"run\"),\n        this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));\n    this.suiteDivs[suite.id] = suiteDiv;\n    var parentDiv = this.outerDiv;\n    if (suite.parentSuite) {\n      parentDiv = this.suiteDivs[suite.parentSuite.id];\n    }\n    parentDiv.appendChild(suiteDiv);\n  }\n\n  this.startedAt = new Date();\n\n  var self = this;\n  showPassed.onclick = function(evt) {\n    if (showPassed.checked) {\n      self.outerDiv.className += ' show-passed';\n    } else {\n      self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');\n    }\n  };\n\n  showSkipped.onclick = function(evt) {\n    if (showSkipped.checked) {\n      self.outerDiv.className += ' show-skipped';\n    } else {\n      self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');\n    }\n  };\n};\n\njasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {\n  var results = runner.results();\n  var className = (results.failedCount > 0) ? \"runner failed\" : \"runner passed\";\n  this.runnerDiv.setAttribute(\"class\", className);\n  //do it twice for IE\n  this.runnerDiv.setAttribute(\"className\", className);\n  var specs = runner.specs();\n  var specCount = 0;\n  for (var i = 0; i < specs.length; i++) {\n    if (this.specFilter(specs[i])) {\n      specCount++;\n    }\n  }\n  var message = \"\" + specCount + \" spec\" + (specCount == 1 ? \"\" : \"s\" ) + \", \" + results.failedCount + \" failure\" + ((results.failedCount == 1) ? \"\" : \"s\");\n  message += \" in \" + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + \"s\";\n  this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);\n\n  this.finishedAtSpan.appendChild(document.createTextNode(\"Finished at \" + new Date().toString()));\n};\n\njasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {\n  var results = suite.results();\n  var status = results.passed() ? 'passed' : 'failed';\n  if (results.totalCount === 0) { // todo: change this to check results.skipped\n    status = 'skipped';\n  }\n  this.suiteDivs[suite.id].className += \" \" + status;\n};\n\njasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {\n  if (this.logRunningSpecs) {\n    this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');\n  }\n};\n\njasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {\n  var results = spec.results();\n  var status = results.passed() ? 'passed' : 'failed';\n  if (results.skipped) {\n    status = 'skipped';\n  }\n  var specDiv = this.createDom('div', { className: 'spec '  + status },\n      this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, \"run\"),\n      this.createDom('a', {\n        className: 'description',\n        href: '?spec=' + encodeURIComponent(spec.getFullName()),\n        title: spec.getFullName()\n      }, spec.description));\n\n\n  var resultItems = results.getItems();\n  var messagesDiv = this.createDom('div', { className: 'messages' });\n  for (var i = 0; i < resultItems.length; i++) {\n    var result = resultItems[i];\n\n    if (result.type == 'log') {\n      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));\n    } else if (result.type == 'expect' && result.passed && !result.passed()) {\n      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));\n\n      if (result.trace.stack) {\n        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));\n      }\n    }\n  }\n\n  if (messagesDiv.childNodes.length > 0) {\n    specDiv.appendChild(messagesDiv);\n  }\n\n  this.suiteDivs[spec.suite.id].appendChild(specDiv);\n};\n\njasmine.TrivialReporter.prototype.log = function() {\n  var console = jasmine.getGlobal().console;\n  if (console && console.log) {\n    if (console.log.apply) {\n      console.log.apply(console, arguments);\n    } else {\n      console.log(arguments); // ie fix: console.log.apply doesn't exist on ie\n    }\n  }\n};\n\njasmine.TrivialReporter.prototype.getLocation = function() {\n  return this.document.location;\n};\n\njasmine.TrivialReporter.prototype.specFilter = function(spec) {\n  var paramMap = {};\n  var params = this.getLocation().search.substring(1).split('&');\n  for (var i = 0; i < params.length; i++) {\n    var p = params[i].split('=');\n    paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);\n  }\n\n  if (!paramMap.spec) {\n    return true;\n  }\n  return spec.getFullName().indexOf(paramMap.spec) === 0;\n};\n"
  },
  {
    "path": "assets/test/jasmine/jasmine.css",
    "content": "body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; }\n\n#HTMLReporter { font-size: 11px; font-family: Monaco, \"Lucida Console\", monospace; line-height: 14px; color: #333333; }\n#HTMLReporter a { text-decoration: none; }\n#HTMLReporter a:hover { text-decoration: underline; }\n#HTMLReporter p, #HTMLReporter h1, #HTMLReporter h2, #HTMLReporter h3, #HTMLReporter h4, #HTMLReporter h5, #HTMLReporter h6 { margin: 0; line-height: 14px; }\n#HTMLReporter .banner, #HTMLReporter .symbolSummary, #HTMLReporter .summary, #HTMLReporter .resultMessage, #HTMLReporter .specDetail .description, #HTMLReporter .alert .bar, #HTMLReporter .stackTrace { padding-left: 9px; padding-right: 9px; }\n#HTMLReporter #jasmine_content { position: fixed; right: 100%; }\n#HTMLReporter .version { color: #aaaaaa; }\n#HTMLReporter .banner { margin-top: 14px; }\n#HTMLReporter .duration { color: #aaaaaa; float: right; }\n#HTMLReporter .symbolSummary { overflow: hidden; *zoom: 1; margin: 14px 0; }\n#HTMLReporter .symbolSummary li { display: block; float: left; height: 7px; width: 14px; margin-bottom: 7px; font-size: 16px; }\n#HTMLReporter .symbolSummary li.passed { font-size: 14px; }\n#HTMLReporter .symbolSummary li.passed:before { color: #5e7d00; content: \"\\02022\"; }\n#HTMLReporter .symbolSummary li.failed { line-height: 9px; }\n#HTMLReporter .symbolSummary li.failed:before { color: #b03911; content: \"x\"; font-weight: bold; margin-left: -1px; }\n#HTMLReporter .symbolSummary li.skipped { font-size: 14px; }\n#HTMLReporter .symbolSummary li.skipped:before { color: #bababa; content: \"\\02022\"; }\n#HTMLReporter .symbolSummary li.pending { line-height: 11px; }\n#HTMLReporter .symbolSummary li.pending:before { color: #aaaaaa; content: \"-\"; }\n#HTMLReporter .exceptions { color: #fff; float: right; margin-top: 5px; margin-right: 5px; }\n#HTMLReporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; }\n#HTMLReporter .runningAlert { background-color: #666666; }\n#HTMLReporter .skippedAlert { background-color: #aaaaaa; }\n#HTMLReporter .skippedAlert:first-child { background-color: #333333; }\n#HTMLReporter .skippedAlert:hover { text-decoration: none; color: white; text-decoration: underline; }\n#HTMLReporter .passingAlert { background-color: #a6b779; }\n#HTMLReporter .passingAlert:first-child { background-color: #5e7d00; }\n#HTMLReporter .failingAlert { background-color: #cf867e; }\n#HTMLReporter .failingAlert:first-child { background-color: #b03911; }\n#HTMLReporter .results { margin-top: 14px; }\n#HTMLReporter #details { display: none; }\n#HTMLReporter .resultsMenu, #HTMLReporter .resultsMenu a { background-color: #fff; color: #333333; }\n#HTMLReporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; }\n#HTMLReporter.showDetails .summaryMenuItem:hover { text-decoration: underline; }\n#HTMLReporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; }\n#HTMLReporter.showDetails .summary { display: none; }\n#HTMLReporter.showDetails #details { display: block; }\n#HTMLReporter .summaryMenuItem { font-weight: bold; text-decoration: underline; }\n#HTMLReporter .summary { margin-top: 14px; }\n#HTMLReporter .summary .suite .suite, #HTMLReporter .summary .specSummary { margin-left: 14px; }\n#HTMLReporter .summary .specSummary.passed a { color: #5e7d00; }\n#HTMLReporter .summary .specSummary.failed a { color: #b03911; }\n#HTMLReporter .description + .suite { margin-top: 0; }\n#HTMLReporter .suite { margin-top: 14px; }\n#HTMLReporter .suite a { color: #333333; }\n#HTMLReporter #details .specDetail { margin-bottom: 28px; }\n#HTMLReporter #details .specDetail .description { display: block; color: white; background-color: #b03911; }\n#HTMLReporter .resultMessage { padding-top: 14px; color: #333333; }\n#HTMLReporter .resultMessage span.result { display: block; }\n#HTMLReporter .stackTrace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; }\n\n#TrivialReporter { padding: 8px 13px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow-y: scroll; background-color: white; font-family: \"Helvetica Neue Light\", \"Lucida Grande\", \"Calibri\", \"Arial\", sans-serif; /*.resultMessage {*/ /*white-space: pre;*/ /*}*/ }\n#TrivialReporter a:visited, #TrivialReporter a { color: #303; }\n#TrivialReporter a:hover, #TrivialReporter a:active { color: blue; }\n#TrivialReporter .run_spec { float: right; padding-right: 5px; font-size: .8em; text-decoration: none; }\n#TrivialReporter .banner { color: #303; background-color: #fef; padding: 5px; }\n#TrivialReporter .logo { float: left; font-size: 1.1em; padding-left: 5px; }\n#TrivialReporter .logo .version { font-size: .6em; padding-left: 1em; }\n#TrivialReporter .runner.running { background-color: yellow; }\n#TrivialReporter .options { text-align: right; font-size: .8em; }\n#TrivialReporter .suite { border: 1px outset gray; margin: 5px 0; padding-left: 1em; }\n#TrivialReporter .suite .suite { margin: 5px; }\n#TrivialReporter .suite.passed { background-color: #dfd; }\n#TrivialReporter .suite.failed { background-color: #fdd; }\n#TrivialReporter .spec { margin: 5px; padding-left: 1em; clear: both; }\n#TrivialReporter .spec.failed, #TrivialReporter .spec.passed, #TrivialReporter .spec.skipped { padding-bottom: 5px; border: 1px solid gray; }\n#TrivialReporter .spec.failed { background-color: #fbb; border-color: red; }\n#TrivialReporter .spec.passed { background-color: #bfb; border-color: green; }\n#TrivialReporter .spec.skipped { background-color: #bbb; }\n#TrivialReporter .messages { border-left: 1px dashed gray; padding-left: 1em; padding-right: 1em; }\n#TrivialReporter .passed { background-color: #cfc; display: none; }\n#TrivialReporter .failed { background-color: #fbb; }\n#TrivialReporter .skipped { color: #777; background-color: #eee; display: none; }\n#TrivialReporter .resultMessage span.result { display: block; line-height: 2em; color: black; }\n#TrivialReporter .resultMessage .mismatch { color: black; }\n#TrivialReporter .stackTrace { white-space: pre; font-size: .8em; margin-left: 10px; max-height: 5em; overflow: auto; border: 1px inset red; padding: 1em; background: #eef; }\n#TrivialReporter .finished-at { padding-left: 1em; font-size: .6em; }\n#TrivialReporter.show-passed .passed, #TrivialReporter.show-skipped .skipped { display: block; }\n#TrivialReporter #jasmine_content { position: fixed; right: 100%; }\n#TrivialReporter .runner { border: 1px solid gray; display: block; margin: 5px 0; padding: 2px 0 2px 10px; }\n"
  },
  {
    "path": "assets/test/jasmine/jasmine.js",
    "content": "var isCommonJS = typeof window == \"undefined\" && typeof exports == \"object\";\n\n/**\n * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.\n *\n * @namespace\n */\nvar jasmine = {};\nif (isCommonJS) exports.jasmine = jasmine;\n/**\n * @private\n */\njasmine.unimplementedMethod_ = function() {\n  throw new Error(\"unimplemented method\");\n};\n\n/**\n * Use <code>jasmine.undefined</code> instead of <code>undefined</code>, since <code>undefined</code> is just\n * a plain old variable and may be redefined by somebody else.\n *\n * @private\n */\njasmine.undefined = jasmine.___undefined___;\n\n/**\n * Show diagnostic messages in the console if set to true\n *\n */\njasmine.VERBOSE = false;\n\n/**\n * Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed.\n *\n */\njasmine.DEFAULT_UPDATE_INTERVAL = 250;\n\n/**\n * Maximum levels of nesting that will be included when an object is pretty-printed\n */\njasmine.MAX_PRETTY_PRINT_DEPTH = 40;\n\n/**\n * Default timeout interval in milliseconds for waitsFor() blocks.\n */\njasmine.DEFAULT_TIMEOUT_INTERVAL = 5000;\n\n/**\n * By default exceptions thrown in the context of a test are caught by jasmine so that it can run the remaining tests in the suite.\n * Set to false to let the exception bubble up in the browser.\n *\n */\njasmine.CATCH_EXCEPTIONS = true;\n\njasmine.getGlobal = function() {\n  function getGlobal() {\n    return this;\n  }\n\n  return getGlobal();\n};\n\n/**\n * Allows for bound functions to be compared.  Internal use only.\n *\n * @ignore\n * @private\n * @param base {Object} bound 'this' for the function\n * @param name {Function} function to find\n */\njasmine.bindOriginal_ = function(base, name) {\n  var original = base[name];\n  if (original.apply) {\n    return function() {\n      return original.apply(base, arguments);\n    };\n  } else {\n    // IE support\n    return jasmine.getGlobal()[name];\n  }\n};\n\njasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout');\njasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout');\njasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval');\njasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval');\n\njasmine.MessageResult = function(values) {\n  this.type = 'log';\n  this.values = values;\n  this.trace = new Error(); // todo: test better\n};\n\njasmine.MessageResult.prototype.toString = function() {\n  var text = \"\";\n  for (var i = 0; i < this.values.length; i++) {\n    if (i > 0) text += \" \";\n    if (jasmine.isString_(this.values[i])) {\n      text += this.values[i];\n    } else {\n      text += jasmine.pp(this.values[i]);\n    }\n  }\n  return text;\n};\n\njasmine.ExpectationResult = function(params) {\n  this.type = 'expect';\n  this.matcherName = params.matcherName;\n  this.passed_ = params.passed;\n  this.expected = params.expected;\n  this.actual = params.actual;\n  this.message = this.passed_ ? 'Passed.' : params.message;\n\n  var trace = (params.trace || new Error(this.message));\n  this.trace = this.passed_ ? '' : trace;\n};\n\njasmine.ExpectationResult.prototype.toString = function () {\n  return this.message;\n};\n\njasmine.ExpectationResult.prototype.passed = function () {\n  return this.passed_;\n};\n\n/**\n * Getter for the Jasmine environment. Ensures one gets created\n */\njasmine.getEnv = function() {\n  var env = jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env();\n  return env;\n};\n\n/**\n * @ignore\n * @private\n * @param value\n * @returns {Boolean}\n */\njasmine.isArray_ = function(value) {\n  return jasmine.isA_(\"Array\", value);\n};\n\n/**\n * @ignore\n * @private\n * @param value\n * @returns {Boolean}\n */\njasmine.isString_ = function(value) {\n  return jasmine.isA_(\"String\", value);\n};\n\n/**\n * @ignore\n * @private\n * @param value\n * @returns {Boolean}\n */\njasmine.isNumber_ = function(value) {\n  return jasmine.isA_(\"Number\", value);\n};\n\n/**\n * @ignore\n * @private\n * @param {String} typeName\n * @param value\n * @returns {Boolean}\n */\njasmine.isA_ = function(typeName, value) {\n  return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';\n};\n\n/**\n * Pretty printer for expecations.  Takes any object and turns it into a human-readable string.\n *\n * @param value {Object} an object to be outputted\n * @returns {String}\n */\njasmine.pp = function(value) {\n  var stringPrettyPrinter = new jasmine.StringPrettyPrinter();\n  stringPrettyPrinter.format(value);\n  return stringPrettyPrinter.string;\n};\n\n/**\n * Returns true if the object is a DOM Node.\n *\n * @param {Object} obj object to check\n * @returns {Boolean}\n */\njasmine.isDomNode = function(obj) {\n  return obj.nodeType > 0;\n};\n\n/**\n * Returns a matchable 'generic' object of the class type.  For use in expecations of type when values don't matter.\n *\n * @example\n * // don't care about which function is passed in, as long as it's a function\n * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function));\n *\n * @param {Class} clazz\n * @returns matchable object of the type clazz\n */\njasmine.any = function(clazz) {\n  return new jasmine.Matchers.Any(clazz);\n};\n\n/**\n * Returns a matchable subset of a JSON object. For use in expectations when you don't care about all of the\n * attributes on the object.\n *\n * @example\n * // don't care about any other attributes than foo.\n * expect(mySpy).toHaveBeenCalledWith(jasmine.objectContaining({foo: \"bar\"});\n *\n * @param sample {Object} sample\n * @returns matchable object for the sample\n */\njasmine.objectContaining = function (sample) {\n    return new jasmine.Matchers.ObjectContaining(sample);\n};\n\n/**\n * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.\n *\n * Spies should be created in test setup, before expectations.  They can then be checked, using the standard Jasmine\n * expectation syntax. Spies can be checked if they were called or not and what the calling params were.\n *\n * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs).\n *\n * Spies are torn down at the end of every spec.\n *\n * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.\n *\n * @example\n * // a stub\n * var myStub = jasmine.createSpy('myStub');  // can be used anywhere\n *\n * // spy example\n * var foo = {\n *   not: function(bool) { return !bool; }\n * }\n *\n * // actual foo.not will not be called, execution stops\n * spyOn(foo, 'not');\n\n // foo.not spied upon, execution will continue to implementation\n * spyOn(foo, 'not').andCallThrough();\n *\n * // fake example\n * var foo = {\n *   not: function(bool) { return !bool; }\n * }\n *\n * // foo.not(val) will return val\n * spyOn(foo, 'not').andCallFake(function(value) {return value;});\n *\n * // mock example\n * foo.not(7 == 7);\n * expect(foo.not).toHaveBeenCalled();\n * expect(foo.not).toHaveBeenCalledWith(true);\n *\n * @constructor\n * @see spyOn, jasmine.createSpy, jasmine.createSpyObj\n * @param {String} name\n */\njasmine.Spy = function(name) {\n  /**\n   * The name of the spy, if provided.\n   */\n  this.identity = name || 'unknown';\n  /**\n   *  Is this Object a spy?\n   */\n  this.isSpy = true;\n  /**\n   * The actual function this spy stubs.\n   */\n  this.plan = function() {\n  };\n  /**\n   * Tracking of the most recent call to the spy.\n   * @example\n   * var mySpy = jasmine.createSpy('foo');\n   * mySpy(1, 2);\n   * mySpy.mostRecentCall.args = [1, 2];\n   */\n  this.mostRecentCall = {};\n\n  /**\n   * Holds arguments for each call to the spy, indexed by call count\n   * @example\n   * var mySpy = jasmine.createSpy('foo');\n   * mySpy(1, 2);\n   * mySpy(7, 8);\n   * mySpy.mostRecentCall.args = [7, 8];\n   * mySpy.argsForCall[0] = [1, 2];\n   * mySpy.argsForCall[1] = [7, 8];\n   */\n  this.argsForCall = [];\n  this.calls = [];\n};\n\n/**\n * Tells a spy to call through to the actual implemenatation.\n *\n * @example\n * var foo = {\n *   bar: function() { // do some stuff }\n * }\n *\n * // defining a spy on an existing property: foo.bar\n * spyOn(foo, 'bar').andCallThrough();\n */\njasmine.Spy.prototype.andCallThrough = function() {\n  this.plan = this.originalValue;\n  return this;\n};\n\n/**\n * For setting the return value of a spy.\n *\n * @example\n * // defining a spy from scratch: foo() returns 'baz'\n * var foo = jasmine.createSpy('spy on foo').andReturn('baz');\n *\n * // defining a spy on an existing property: foo.bar() returns 'baz'\n * spyOn(foo, 'bar').andReturn('baz');\n *\n * @param {Object} value\n */\njasmine.Spy.prototype.andReturn = function(value) {\n  this.plan = function() {\n    return value;\n  };\n  return this;\n};\n\n/**\n * For throwing an exception when a spy is called.\n *\n * @example\n * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'\n * var foo = jasmine.createSpy('spy on foo').andThrow('baz');\n *\n * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'\n * spyOn(foo, 'bar').andThrow('baz');\n *\n * @param {String} exceptionMsg\n */\njasmine.Spy.prototype.andThrow = function(exceptionMsg) {\n  this.plan = function() {\n    throw exceptionMsg;\n  };\n  return this;\n};\n\n/**\n * Calls an alternate implementation when a spy is called.\n *\n * @example\n * var baz = function() {\n *   // do some stuff, return something\n * }\n * // defining a spy from scratch: foo() calls the function baz\n * var foo = jasmine.createSpy('spy on foo').andCall(baz);\n *\n * // defining a spy on an existing property: foo.bar() calls an anonymnous function\n * spyOn(foo, 'bar').andCall(function() { return 'baz';} );\n *\n * @param {Function} fakeFunc\n */\njasmine.Spy.prototype.andCallFake = function(fakeFunc) {\n  this.plan = fakeFunc;\n  return this;\n};\n\n/**\n * Resets all of a spy's the tracking variables so that it can be used again.\n *\n * @example\n * spyOn(foo, 'bar');\n *\n * foo.bar();\n *\n * expect(foo.bar.callCount).toEqual(1);\n *\n * foo.bar.reset();\n *\n * expect(foo.bar.callCount).toEqual(0);\n */\njasmine.Spy.prototype.reset = function() {\n  this.wasCalled = false;\n  this.callCount = 0;\n  this.argsForCall = [];\n  this.calls = [];\n  this.mostRecentCall = {};\n};\n\njasmine.createSpy = function(name) {\n\n  var spyObj = function() {\n    spyObj.wasCalled = true;\n    spyObj.callCount++;\n    var args = jasmine.util.argsToArray(arguments);\n    spyObj.mostRecentCall.object = this;\n    spyObj.mostRecentCall.args = args;\n    spyObj.argsForCall.push(args);\n    spyObj.calls.push({object: this, args: args});\n    return spyObj.plan.apply(this, arguments);\n  };\n\n  var spy = new jasmine.Spy(name);\n\n  for (var prop in spy) {\n    spyObj[prop] = spy[prop];\n  }\n\n  spyObj.reset();\n\n  return spyObj;\n};\n\n/**\n * Determines whether an object is a spy.\n *\n * @param {jasmine.Spy|Object} putativeSpy\n * @returns {Boolean}\n */\njasmine.isSpy = function(putativeSpy) {\n  return putativeSpy && putativeSpy.isSpy;\n};\n\n/**\n * Creates a more complicated spy: an Object that has every property a function that is a spy.  Used for stubbing something\n * large in one call.\n *\n * @param {String} baseName name of spy class\n * @param {Array} methodNames array of names of methods to make spies\n */\njasmine.createSpyObj = function(baseName, methodNames) {\n  if (!jasmine.isArray_(methodNames) || methodNames.length === 0) {\n    throw new Error('createSpyObj requires a non-empty array of method names to create spies for');\n  }\n  var obj = {};\n  for (var i = 0; i < methodNames.length; i++) {\n    obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]);\n  }\n  return obj;\n};\n\n/**\n * All parameters are pretty-printed and concatenated together, then written to the current spec's output.\n *\n * Be careful not to leave calls to <code>jasmine.log</code> in production code.\n */\njasmine.log = function() {\n  var spec = jasmine.getEnv().currentSpec;\n  spec.log.apply(spec, arguments);\n};\n\n/**\n * Function that installs a spy on an existing object's method name.  Used within a Spec to create a spy.\n *\n * @example\n * // spy example\n * var foo = {\n *   not: function(bool) { return !bool; }\n * }\n * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops\n *\n * @see jasmine.createSpy\n * @param obj\n * @param methodName\n * @return {jasmine.Spy} a Jasmine spy that can be chained with all spy methods\n */\nvar spyOn = function(obj, methodName) {\n  return jasmine.getEnv().currentSpec.spyOn(obj, methodName);\n};\nif (isCommonJS) exports.spyOn = spyOn;\n\n/**\n * Creates a Jasmine spec that will be added to the current suite.\n *\n * // TODO: pending tests\n *\n * @example\n * it('should be true', function() {\n *   expect(true).toEqual(true);\n * });\n *\n * @param {String} desc description of this specification\n * @param {Function} func defines the preconditions and expectations of the spec\n */\nvar it = function(desc, func) {\n  return jasmine.getEnv().it(desc, func);\n};\nif (isCommonJS) exports.it = it;\n\n/**\n * Creates a <em>disabled</em> Jasmine spec.\n *\n * A convenience method that allows existing specs to be disabled temporarily during development.\n *\n * @param {String} desc description of this specification\n * @param {Function} func defines the preconditions and expectations of the spec\n */\nvar xit = function(desc, func) {\n  return jasmine.getEnv().xit(desc, func);\n};\nif (isCommonJS) exports.xit = xit;\n\n/**\n * Starts a chain for a Jasmine expectation.\n *\n * It is passed an Object that is the actual value and should chain to one of the many\n * jasmine.Matchers functions.\n *\n * @param {Object} actual Actual value to test against and expected value\n * @return {jasmine.Matchers}\n */\nvar expect = function(actual) {\n  return jasmine.getEnv().currentSpec.expect(actual);\n};\nif (isCommonJS) exports.expect = expect;\n\n/**\n * Defines part of a jasmine spec.  Used in cominbination with waits or waitsFor in asynchrnous specs.\n *\n * @param {Function} func Function that defines part of a jasmine spec.\n */\nvar runs = function(func) {\n  jasmine.getEnv().currentSpec.runs(func);\n};\nif (isCommonJS) exports.runs = runs;\n\n/**\n * Waits a fixed time period before moving to the next block.\n *\n * @deprecated Use waitsFor() instead\n * @param {Number} timeout milliseconds to wait\n */\nvar waits = function(timeout) {\n  jasmine.getEnv().currentSpec.waits(timeout);\n};\nif (isCommonJS) exports.waits = waits;\n\n/**\n * Waits for the latchFunction to return true before proceeding to the next block.\n *\n * @param {Function} latchFunction\n * @param {String} optional_timeoutMessage\n * @param {Number} optional_timeout\n */\nvar waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {\n  jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments);\n};\nif (isCommonJS) exports.waitsFor = waitsFor;\n\n/**\n * A function that is called before each spec in a suite.\n *\n * Used for spec setup, including validating assumptions.\n *\n * @param {Function} beforeEachFunction\n */\nvar beforeEach = function(beforeEachFunction) {\n  jasmine.getEnv().beforeEach(beforeEachFunction);\n};\nif (isCommonJS) exports.beforeEach = beforeEach;\n\n/**\n * A function that is called after each spec in a suite.\n *\n * Used for restoring any state that is hijacked during spec execution.\n *\n * @param {Function} afterEachFunction\n */\nvar afterEach = function(afterEachFunction) {\n  jasmine.getEnv().afterEach(afterEachFunction);\n};\nif (isCommonJS) exports.afterEach = afterEach;\n\n/**\n * Defines a suite of specifications.\n *\n * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared\n * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization\n * of setup in some tests.\n *\n * @example\n * // TODO: a simple suite\n *\n * // TODO: a simple suite with a nested describe block\n *\n * @param {String} description A string, usually the class under test.\n * @param {Function} specDefinitions function that defines several specs.\n */\nvar describe = function(description, specDefinitions) {\n  return jasmine.getEnv().describe(description, specDefinitions);\n};\nif (isCommonJS) exports.describe = describe;\n\n/**\n * Disables a suite of specifications.  Used to disable some suites in a file, or files, temporarily during development.\n *\n * @param {String} description A string, usually the class under test.\n * @param {Function} specDefinitions function that defines several specs.\n */\nvar xdescribe = function(description, specDefinitions) {\n  return jasmine.getEnv().xdescribe(description, specDefinitions);\n};\nif (isCommonJS) exports.xdescribe = xdescribe;\n\n\n// Provide the XMLHttpRequest class for IE 5.x-6.x:\njasmine.XmlHttpRequest = (typeof XMLHttpRequest == \"undefined\") ? function() {\n  function tryIt(f) {\n    try {\n      return f();\n    } catch(e) {\n    }\n    return null;\n  }\n\n  var xhr = tryIt(function() {\n    return new ActiveXObject(\"Msxml2.XMLHTTP.6.0\");\n  }) ||\n    tryIt(function() {\n      return new ActiveXObject(\"Msxml2.XMLHTTP.3.0\");\n    }) ||\n    tryIt(function() {\n      return new ActiveXObject(\"Msxml2.XMLHTTP\");\n    }) ||\n    tryIt(function() {\n      return new ActiveXObject(\"Microsoft.XMLHTTP\");\n    });\n\n  if (!xhr) throw new Error(\"This browser does not support XMLHttpRequest.\");\n\n  return xhr;\n} : XMLHttpRequest;\n/**\n * @namespace\n */\njasmine.util = {};\n\n/**\n * Declare that a child class inherit it's prototype from the parent class.\n *\n * @private\n * @param {Function} childClass\n * @param {Function} parentClass\n */\njasmine.util.inherit = function(childClass, parentClass) {\n  /**\n   * @private\n   */\n  var subclass = function() {\n  };\n  subclass.prototype = parentClass.prototype;\n  childClass.prototype = new subclass();\n};\n\njasmine.util.formatException = function(e) {\n  var lineNumber;\n  if (e.line) {\n    lineNumber = e.line;\n  }\n  else if (e.lineNumber) {\n    lineNumber = e.lineNumber;\n  }\n\n  var file;\n\n  if (e.sourceURL) {\n    file = e.sourceURL;\n  }\n  else if (e.fileName) {\n    file = e.fileName;\n  }\n\n  var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();\n\n  if (file && lineNumber) {\n    message += ' in ' + file + ' (line ' + lineNumber + ')';\n  }\n\n  return message;\n};\n\njasmine.util.htmlEscape = function(str) {\n  if (!str) return str;\n  return str.replace(/&/g, '&amp;')\n    .replace(/</g, '&lt;')\n    .replace(/>/g, '&gt;');\n};\n\njasmine.util.argsToArray = function(args) {\n  var arrayOfArgs = [];\n  for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);\n  return arrayOfArgs;\n};\n\njasmine.util.extend = function(destination, source) {\n  for (var property in source) destination[property] = source[property];\n  return destination;\n};\n\n/**\n * Environment for Jasmine\n *\n * @constructor\n */\njasmine.Env = function() {\n  this.currentSpec = null;\n  this.currentSuite = null;\n  this.currentRunner_ = new jasmine.Runner(this);\n\n  this.reporter = new jasmine.MultiReporter();\n\n  this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL;\n  this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL;\n  this.lastUpdate = 0;\n  this.specFilter = function() {\n    return true;\n  };\n\n  this.nextSpecId_ = 0;\n  this.nextSuiteId_ = 0;\n  this.equalityTesters_ = [];\n\n  // wrap matchers\n  this.matchersClass = function() {\n    jasmine.Matchers.apply(this, arguments);\n  };\n  jasmine.util.inherit(this.matchersClass, jasmine.Matchers);\n\n  jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass);\n};\n\n\njasmine.Env.prototype.setTimeout = jasmine.setTimeout;\njasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;\njasmine.Env.prototype.setInterval = jasmine.setInterval;\njasmine.Env.prototype.clearInterval = jasmine.clearInterval;\n\n/**\n * @returns an object containing jasmine version build info, if set.\n */\njasmine.Env.prototype.version = function () {\n  if (jasmine.version_) {\n    return jasmine.version_;\n  } else {\n    throw new Error('Version not set');\n  }\n};\n\n/**\n * @returns string containing jasmine version build info, if set.\n */\njasmine.Env.prototype.versionString = function() {\n  if (!jasmine.version_) {\n    return \"version unknown\";\n  }\n\n  var version = this.version();\n  var versionString = version.major + \".\" + version.minor + \".\" + version.build;\n  if (version.release_candidate) {\n    versionString += \".rc\" + version.release_candidate;\n  }\n  versionString += \" revision \" + version.revision;\n  return versionString;\n};\n\n/**\n * @returns a sequential integer starting at 0\n */\njasmine.Env.prototype.nextSpecId = function () {\n  return this.nextSpecId_++;\n};\n\n/**\n * @returns a sequential integer starting at 0\n */\njasmine.Env.prototype.nextSuiteId = function () {\n  return this.nextSuiteId_++;\n};\n\n/**\n * Register a reporter to receive status updates from Jasmine.\n * @param {jasmine.Reporter} reporter An object which will receive status updates.\n */\njasmine.Env.prototype.addReporter = function(reporter) {\n  this.reporter.addReporter(reporter);\n};\n\njasmine.Env.prototype.execute = function() {\n  this.currentRunner_.execute();\n};\n\njasmine.Env.prototype.describe = function(description, specDefinitions) {\n  var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite);\n\n  var parentSuite = this.currentSuite;\n  if (parentSuite) {\n    parentSuite.add(suite);\n  } else {\n    this.currentRunner_.add(suite);\n  }\n\n  this.currentSuite = suite;\n\n  var declarationError = null;\n  try {\n    specDefinitions.call(suite);\n  } catch(e) {\n    declarationError = e;\n  }\n\n  if (declarationError) {\n    this.it(\"encountered a declaration exception\", function() {\n      throw declarationError;\n    });\n  }\n\n  this.currentSuite = parentSuite;\n\n  return suite;\n};\n\njasmine.Env.prototype.beforeEach = function(beforeEachFunction) {\n  if (this.currentSuite) {\n    this.currentSuite.beforeEach(beforeEachFunction);\n  } else {\n    this.currentRunner_.beforeEach(beforeEachFunction);\n  }\n};\n\njasmine.Env.prototype.currentRunner = function () {\n  return this.currentRunner_;\n};\n\njasmine.Env.prototype.afterEach = function(afterEachFunction) {\n  if (this.currentSuite) {\n    this.currentSuite.afterEach(afterEachFunction);\n  } else {\n    this.currentRunner_.afterEach(afterEachFunction);\n  }\n\n};\n\njasmine.Env.prototype.xdescribe = function(desc, specDefinitions) {\n  return {\n    execute: function() {\n    }\n  };\n};\n\njasmine.Env.prototype.it = function(description, func) {\n  var spec = new jasmine.Spec(this, this.currentSuite, description);\n  this.currentSuite.add(spec);\n  this.currentSpec = spec;\n\n  if (func) {\n    spec.runs(func);\n  }\n\n  return spec;\n};\n\njasmine.Env.prototype.xit = function(desc, func) {\n  return {\n    id: this.nextSpecId(),\n    runs: function() {\n    }\n  };\n};\n\njasmine.Env.prototype.compareRegExps_ = function(a, b, mismatchKeys, mismatchValues) {\n  if (a.source != b.source)\n    mismatchValues.push(\"expected pattern /\" + b.source + \"/ is not equal to the pattern /\" + a.source + \"/\");\n\n  if (a.ignoreCase != b.ignoreCase)\n    mismatchValues.push(\"expected modifier i was\" + (b.ignoreCase ? \" \" : \" not \") + \"set and does not equal the origin modifier\");\n\n  if (a.global != b.global)\n    mismatchValues.push(\"expected modifier g was\" + (b.global ? \" \" : \" not \") + \"set and does not equal the origin modifier\");\n\n  if (a.multiline != b.multiline)\n    mismatchValues.push(\"expected modifier m was\" + (b.multiline ? \" \" : \" not \") + \"set and does not equal the origin modifier\");\n\n  if (a.sticky != b.sticky)\n    mismatchValues.push(\"expected modifier y was\" + (b.sticky ? \" \" : \" not \") + \"set and does not equal the origin modifier\");\n\n  return (mismatchValues.length === 0);\n};\n\njasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {\n  if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {\n    return true;\n  }\n\n  a.__Jasmine_been_here_before__ = b;\n  b.__Jasmine_been_here_before__ = a;\n\n  var hasKey = function(obj, keyName) {\n    return obj !== null && obj[keyName] !== jasmine.undefined;\n  };\n\n  for (var property in b) {\n    if (!hasKey(a, property) && hasKey(b, property)) {\n      mismatchKeys.push(\"expected has key '\" + property + \"', but missing from actual.\");\n    }\n  }\n  for (property in a) {\n    if (!hasKey(b, property) && hasKey(a, property)) {\n      mismatchKeys.push(\"expected missing key '\" + property + \"', but present in actual.\");\n    }\n  }\n  for (property in b) {\n    if (property == '__Jasmine_been_here_before__') continue;\n    if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) {\n      mismatchValues.push(\"'\" + property + \"' was '\" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + \"' in expected, but was '\" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + \"' in actual.\");\n    }\n  }\n\n  if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) {\n    mismatchValues.push(\"arrays were not the same length\");\n  }\n\n  delete a.__Jasmine_been_here_before__;\n  delete b.__Jasmine_been_here_before__;\n  return (mismatchKeys.length === 0 && mismatchValues.length === 0);\n};\n\njasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {\n  mismatchKeys = mismatchKeys || [];\n  mismatchValues = mismatchValues || [];\n\n  for (var i = 0; i < this.equalityTesters_.length; i++) {\n    var equalityTester = this.equalityTesters_[i];\n    var result = equalityTester(a, b, this, mismatchKeys, mismatchValues);\n    if (result !== jasmine.undefined) return result;\n  }\n\n  if (a === b) return true;\n\n  if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) {\n    return (a == jasmine.undefined && b == jasmine.undefined);\n  }\n\n  if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) {\n    return a === b;\n  }\n\n  if (a instanceof Date && b instanceof Date) {\n    return a.getTime() == b.getTime();\n  }\n\n  if (a.jasmineMatches) {\n    return a.jasmineMatches(b);\n  }\n\n  if (b.jasmineMatches) {\n    return b.jasmineMatches(a);\n  }\n\n  if (a instanceof jasmine.Matchers.ObjectContaining) {\n    return a.matches(b);\n  }\n\n  if (b instanceof jasmine.Matchers.ObjectContaining) {\n    return b.matches(a);\n  }\n\n  if (jasmine.isString_(a) && jasmine.isString_(b)) {\n    return (a == b);\n  }\n\n  if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) {\n    return (a == b);\n  }\n\n  if (a instanceof RegExp && b instanceof RegExp) {\n    return this.compareRegExps_(a, b, mismatchKeys, mismatchValues);\n  }\n\n  if (typeof a === \"object\" && typeof b === \"object\") {\n    return this.compareObjects_(a, b, mismatchKeys, mismatchValues);\n  }\n\n  //Straight check\n  return (a === b);\n};\n\njasmine.Env.prototype.contains_ = function(haystack, needle) {\n  if (jasmine.isArray_(haystack)) {\n    for (var i = 0; i < haystack.length; i++) {\n      if (this.equals_(haystack[i], needle)) return true;\n    }\n    return false;\n  }\n  return haystack.indexOf(needle) >= 0;\n};\n\njasmine.Env.prototype.addEqualityTester = function(equalityTester) {\n  this.equalityTesters_.push(equalityTester);\n};\n/** No-op base class for Jasmine reporters.\n *\n * @constructor\n */\njasmine.Reporter = function() {\n};\n\n//noinspection JSUnusedLocalSymbols\njasmine.Reporter.prototype.reportRunnerStarting = function(runner) {\n};\n\n//noinspection JSUnusedLocalSymbols\njasmine.Reporter.prototype.reportRunnerResults = function(runner) {\n};\n\n//noinspection JSUnusedLocalSymbols\njasmine.Reporter.prototype.reportSuiteResults = function(suite) {\n};\n\n//noinspection JSUnusedLocalSymbols\njasmine.Reporter.prototype.reportSpecStarting = function(spec) {\n};\n\n//noinspection JSUnusedLocalSymbols\njasmine.Reporter.prototype.reportSpecResults = function(spec) {\n};\n\n//noinspection JSUnusedLocalSymbols\njasmine.Reporter.prototype.log = function(str) {\n};\n\n/**\n * Blocks are functions with executable code that make up a spec.\n *\n * @constructor\n * @param {jasmine.Env} env\n * @param {Function} func\n * @param {jasmine.Spec} spec\n */\njasmine.Block = function(env, func, spec) {\n  this.env = env;\n  this.func = func;\n  this.spec = spec;\n};\n\njasmine.Block.prototype.execute = function(onComplete) {\n  if (!jasmine.CATCH_EXCEPTIONS) {\n    this.func.apply(this.spec);\n  }\n  else {\n    try {\n      this.func.apply(this.spec);\n    } catch (e) {\n      this.spec.fail(e);\n    }\n  }\n  onComplete();\n};\n/** JavaScript API reporter.\n *\n * @constructor\n */\njasmine.JsApiReporter = function() {\n  this.started = false;\n  this.finished = false;\n  this.suites_ = [];\n  this.results_ = {};\n};\n\njasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) {\n  this.started = true;\n  var suites = runner.topLevelSuites();\n  for (var i = 0; i < suites.length; i++) {\n    var suite = suites[i];\n    this.suites_.push(this.summarize_(suite));\n  }\n};\n\njasmine.JsApiReporter.prototype.suites = function() {\n  return this.suites_;\n};\n\njasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {\n  var isSuite = suiteOrSpec instanceof jasmine.Suite;\n  var summary = {\n    id: suiteOrSpec.id,\n    name: suiteOrSpec.description,\n    type: isSuite ? 'suite' : 'spec',\n    children: []\n  };\n  \n  if (isSuite) {\n    var children = suiteOrSpec.children();\n    for (var i = 0; i < children.length; i++) {\n      summary.children.push(this.summarize_(children[i]));\n    }\n  }\n  return summary;\n};\n\njasmine.JsApiReporter.prototype.results = function() {\n  return this.results_;\n};\n\njasmine.JsApiReporter.prototype.resultsForSpec = function(specId) {\n  return this.results_[specId];\n};\n\n//noinspection JSUnusedLocalSymbols\njasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) {\n  this.finished = true;\n};\n\n//noinspection JSUnusedLocalSymbols\njasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) {\n};\n\n//noinspection JSUnusedLocalSymbols\njasmine.JsApiReporter.prototype.reportSpecResults = function(spec) {\n  this.results_[spec.id] = {\n    messages: spec.results().getItems(),\n    result: spec.results().failedCount > 0 ? \"failed\" : \"passed\"\n  };\n};\n\n//noinspection JSUnusedLocalSymbols\njasmine.JsApiReporter.prototype.log = function(str) {\n};\n\njasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){\n  var results = {};\n  for (var i = 0; i < specIds.length; i++) {\n    var specId = specIds[i];\n    results[specId] = this.summarizeResult_(this.results_[specId]);\n  }\n  return results;\n};\n\njasmine.JsApiReporter.prototype.summarizeResult_ = function(result){\n  var summaryMessages = [];\n  var messagesLength = result.messages.length;\n  for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) {\n    var resultMessage = result.messages[messageIndex];\n    summaryMessages.push({\n      text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined,\n      passed: resultMessage.passed ? resultMessage.passed() : true,\n      type: resultMessage.type,\n      message: resultMessage.message,\n      trace: {\n        stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined\n      }\n    });\n  }\n\n  return {\n    result : result.result,\n    messages : summaryMessages\n  };\n};\n\n/**\n * @constructor\n * @param {jasmine.Env} env\n * @param actual\n * @param {jasmine.Spec} spec\n */\njasmine.Matchers = function(env, actual, spec, opt_isNot) {\n  this.env = env;\n  this.actual = actual;\n  this.spec = spec;\n  this.isNot = opt_isNot || false;\n  this.reportWasCalled_ = false;\n};\n\n// todo: @deprecated as of Jasmine 0.11, remove soon [xw]\njasmine.Matchers.pp = function(str) {\n  throw new Error(\"jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!\");\n};\n\n// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw]\njasmine.Matchers.prototype.report = function(result, failing_message, details) {\n  throw new Error(\"As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs\");\n};\n\njasmine.Matchers.wrapInto_ = function(prototype, matchersClass) {\n  for (var methodName in prototype) {\n    if (methodName == 'report') continue;\n    var orig = prototype[methodName];\n    matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig);\n  }\n};\n\njasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {\n  return function() {\n    var matcherArgs = jasmine.util.argsToArray(arguments);\n    var result = matcherFunction.apply(this, arguments);\n\n    if (this.isNot) {\n      result = !result;\n    }\n\n    if (this.reportWasCalled_) return result;\n\n    var message;\n    if (!result) {\n      if (this.message) {\n        message = this.message.apply(this, arguments);\n        if (jasmine.isArray_(message)) {\n          message = message[this.isNot ? 1 : 0];\n        }\n      } else {\n        var englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); });\n        message = \"Expected \" + jasmine.pp(this.actual) + (this.isNot ? \" not \" : \" \") + englishyPredicate;\n        if (matcherArgs.length > 0) {\n          for (var i = 0; i < matcherArgs.length; i++) {\n            if (i > 0) message += \",\";\n            message += \" \" + jasmine.pp(matcherArgs[i]);\n          }\n        }\n        message += \".\";\n      }\n    }\n    var expectationResult = new jasmine.ExpectationResult({\n      matcherName: matcherName,\n      passed: result,\n      expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0],\n      actual: this.actual,\n      message: message\n    });\n    this.spec.addMatcherResult(expectationResult);\n    return jasmine.undefined;\n  };\n};\n\n\n\n\n/**\n * toBe: compares the actual to the expected using ===\n * @param expected\n */\njasmine.Matchers.prototype.toBe = function(expected) {\n  return this.actual === expected;\n};\n\n/**\n * toNotBe: compares the actual to the expected using !==\n * @param expected\n * @deprecated as of 1.0. Use not.toBe() instead.\n */\njasmine.Matchers.prototype.toNotBe = function(expected) {\n  return this.actual !== expected;\n};\n\n/**\n * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.\n *\n * @param expected\n */\njasmine.Matchers.prototype.toEqual = function(expected) {\n  return this.env.equals_(this.actual, expected);\n};\n\n/**\n * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual\n * @param expected\n * @deprecated as of 1.0. Use not.toEqual() instead.\n */\njasmine.Matchers.prototype.toNotEqual = function(expected) {\n  return !this.env.equals_(this.actual, expected);\n};\n\n/**\n * Matcher that compares the actual to the expected using a regular expression.  Constructs a RegExp, so takes\n * a pattern or a String.\n *\n * @param expected\n */\njasmine.Matchers.prototype.toMatch = function(expected) {\n  return new RegExp(expected).test(this.actual);\n};\n\n/**\n * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch\n * @param expected\n * @deprecated as of 1.0. Use not.toMatch() instead.\n */\njasmine.Matchers.prototype.toNotMatch = function(expected) {\n  return !(new RegExp(expected).test(this.actual));\n};\n\n/**\n * Matcher that compares the actual to jasmine.undefined.\n */\njasmine.Matchers.prototype.toBeDefined = function() {\n  return (this.actual !== jasmine.undefined);\n};\n\n/**\n * Matcher that compares the actual to jasmine.undefined.\n */\njasmine.Matchers.prototype.toBeUndefined = function() {\n  return (this.actual === jasmine.undefined);\n};\n\n/**\n * Matcher that compares the actual to null.\n */\njasmine.Matchers.prototype.toBeNull = function() {\n  return (this.actual === null);\n};\n\n/**\n * Matcher that compares the actual to NaN.\n */\njasmine.Matchers.prototype.toBeNaN = function() {\n\tthis.message = function() {\n\t\treturn [ \"Expected \" + jasmine.pp(this.actual) + \" to be NaN.\" ];\n\t};\n\n\treturn (this.actual !== this.actual);\n};\n\n/**\n * Matcher that boolean not-nots the actual.\n */\njasmine.Matchers.prototype.toBeTruthy = function() {\n  return !!this.actual;\n};\n\n\n/**\n * Matcher that boolean nots the actual.\n */\njasmine.Matchers.prototype.toBeFalsy = function() {\n  return !this.actual;\n};\n\n\n/**\n * Matcher that checks to see if the actual, a Jasmine spy, was called.\n */\njasmine.Matchers.prototype.toHaveBeenCalled = function() {\n  if (arguments.length > 0) {\n    throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith');\n  }\n\n  if (!jasmine.isSpy(this.actual)) {\n    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');\n  }\n\n  this.message = function() {\n    return [\n      \"Expected spy \" + this.actual.identity + \" to have been called.\",\n      \"Expected spy \" + this.actual.identity + \" not to have been called.\"\n    ];\n  };\n\n  return this.actual.wasCalled;\n};\n\n/** @deprecated Use expect(xxx).toHaveBeenCalled() instead */\njasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled;\n\n/**\n * Matcher that checks to see if the actual, a Jasmine spy, was not called.\n *\n * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead\n */\njasmine.Matchers.prototype.wasNotCalled = function() {\n  if (arguments.length > 0) {\n    throw new Error('wasNotCalled does not take arguments');\n  }\n\n  if (!jasmine.isSpy(this.actual)) {\n    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');\n  }\n\n  this.message = function() {\n    return [\n      \"Expected spy \" + this.actual.identity + \" to not have been called.\",\n      \"Expected spy \" + this.actual.identity + \" to have been called.\"\n    ];\n  };\n\n  return !this.actual.wasCalled;\n};\n\n/**\n * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.\n *\n * @example\n *\n */\njasmine.Matchers.prototype.toHaveBeenCalledWith = function() {\n  var expectedArgs = jasmine.util.argsToArray(arguments);\n  if (!jasmine.isSpy(this.actual)) {\n    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');\n  }\n  this.message = function() {\n    var invertedMessage = \"Expected spy \" + this.actual.identity + \" not to have been called with \" + jasmine.pp(expectedArgs) + \" but it was.\";\n    var positiveMessage = \"\";\n    if (this.actual.callCount === 0) {\n      positiveMessage = \"Expected spy \" + this.actual.identity + \" to have been called with \" + jasmine.pp(expectedArgs) + \" but it was never called.\";\n    } else {\n      positiveMessage = \"Expected spy \" + this.actual.identity + \" to have been called with \" + jasmine.pp(expectedArgs) + \" but actual calls were \" + jasmine.pp(this.actual.argsForCall).replace(/^\\[ | \\]$/g, '')\n    }\n    return [positiveMessage, invertedMessage];\n  };\n\n  return this.env.contains_(this.actual.argsForCall, expectedArgs);\n};\n\n/** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */\njasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith;\n\n/** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */\njasmine.Matchers.prototype.wasNotCalledWith = function() {\n  var expectedArgs = jasmine.util.argsToArray(arguments);\n  if (!jasmine.isSpy(this.actual)) {\n    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');\n  }\n\n  this.message = function() {\n    return [\n      \"Expected spy not to have been called with \" + jasmine.pp(expectedArgs) + \" but it was\",\n      \"Expected spy to have been called with \" + jasmine.pp(expectedArgs) + \" but it was\"\n    ];\n  };\n\n  return !this.env.contains_(this.actual.argsForCall, expectedArgs);\n};\n\n/**\n * Matcher that checks that the expected item is an element in the actual Array.\n *\n * @param {Object} expected\n */\njasmine.Matchers.prototype.toContain = function(expected) {\n  return this.env.contains_(this.actual, expected);\n};\n\n/**\n * Matcher that checks that the expected item is NOT an element in the actual Array.\n *\n * @param {Object} expected\n * @deprecated as of 1.0. Use not.toContain() instead.\n */\njasmine.Matchers.prototype.toNotContain = function(expected) {\n  return !this.env.contains_(this.actual, expected);\n};\n\njasmine.Matchers.prototype.toBeLessThan = function(expected) {\n  return this.actual < expected;\n};\n\njasmine.Matchers.prototype.toBeGreaterThan = function(expected) {\n  return this.actual > expected;\n};\n\n/**\n * Matcher that checks that the expected item is equal to the actual item\n * up to a given level of decimal precision (default 2).\n *\n * @param {Number} expected\n * @param {Number} precision, as number of decimal places\n */\njasmine.Matchers.prototype.toBeCloseTo = function(expected, precision) {\n  if (!(precision === 0)) {\n    precision = precision || 2;\n  }\n  return Math.abs(expected - this.actual) < (Math.pow(10, -precision) / 2);\n};\n\n/**\n * Matcher that checks that the expected exception was thrown by the actual.\n *\n * @param {String} [expected]\n */\njasmine.Matchers.prototype.toThrow = function(expected) {\n  var result = false;\n  var exception;\n  if (typeof this.actual != 'function') {\n    throw new Error('Actual is not a function');\n  }\n  try {\n    this.actual();\n  } catch (e) {\n    exception = e;\n  }\n  if (exception) {\n    result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected));\n  }\n\n  var not = this.isNot ? \"not \" : \"\";\n\n  this.message = function() {\n    if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) {\n      return [\"Expected function \" + not + \"to throw\", expected ? expected.message || expected : \"an exception\", \", but it threw\", exception.message || exception].join(' ');\n    } else {\n      return \"Expected function to throw an exception.\";\n    }\n  };\n\n  return result;\n};\n\njasmine.Matchers.Any = function(expectedClass) {\n  this.expectedClass = expectedClass;\n};\n\njasmine.Matchers.Any.prototype.jasmineMatches = function(other) {\n  if (this.expectedClass == String) {\n    return typeof other == 'string' || other instanceof String;\n  }\n\n  if (this.expectedClass == Number) {\n    return typeof other == 'number' || other instanceof Number;\n  }\n\n  if (this.expectedClass == Function) {\n    return typeof other == 'function' || other instanceof Function;\n  }\n\n  if (this.expectedClass == Object) {\n    return typeof other == 'object';\n  }\n\n  return other instanceof this.expectedClass;\n};\n\njasmine.Matchers.Any.prototype.jasmineToString = function() {\n  return '<jasmine.any(' + this.expectedClass + ')>';\n};\n\njasmine.Matchers.ObjectContaining = function (sample) {\n  this.sample = sample;\n};\n\njasmine.Matchers.ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) {\n  mismatchKeys = mismatchKeys || [];\n  mismatchValues = mismatchValues || [];\n\n  var env = jasmine.getEnv();\n\n  var hasKey = function(obj, keyName) {\n    return obj != null && obj[keyName] !== jasmine.undefined;\n  };\n\n  for (var property in this.sample) {\n    if (!hasKey(other, property) && hasKey(this.sample, property)) {\n      mismatchKeys.push(\"expected has key '\" + property + \"', but missing from actual.\");\n    }\n    else if (!env.equals_(this.sample[property], other[property], mismatchKeys, mismatchValues)) {\n      mismatchValues.push(\"'\" + property + \"' was '\" + (other[property] ? jasmine.util.htmlEscape(other[property].toString()) : other[property]) + \"' in expected, but was '\" + (this.sample[property] ? jasmine.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + \"' in actual.\");\n    }\n  }\n\n  return (mismatchKeys.length === 0 && mismatchValues.length === 0);\n};\n\njasmine.Matchers.ObjectContaining.prototype.jasmineToString = function () {\n  return \"<jasmine.objectContaining(\" + jasmine.pp(this.sample) + \")>\";\n};\n// Mock setTimeout, clearTimeout\n// Contributed by Pivotal Computer Systems, www.pivotalsf.com\n\njasmine.FakeTimer = function() {\n  this.reset();\n\n  var self = this;\n  self.setTimeout = function(funcToCall, millis) {\n    self.timeoutsMade++;\n    self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false);\n    return self.timeoutsMade;\n  };\n\n  self.setInterval = function(funcToCall, millis) {\n    self.timeoutsMade++;\n    self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true);\n    return self.timeoutsMade;\n  };\n\n  self.clearTimeout = function(timeoutKey) {\n    self.scheduledFunctions[timeoutKey] = jasmine.undefined;\n  };\n\n  self.clearInterval = function(timeoutKey) {\n    self.scheduledFunctions[timeoutKey] = jasmine.undefined;\n  };\n\n};\n\njasmine.FakeTimer.prototype.reset = function() {\n  this.timeoutsMade = 0;\n  this.scheduledFunctions = {};\n  this.nowMillis = 0;\n};\n\njasmine.FakeTimer.prototype.tick = function(millis) {\n  var oldMillis = this.nowMillis;\n  var newMillis = oldMillis + millis;\n  this.runFunctionsWithinRange(oldMillis, newMillis);\n  this.nowMillis = newMillis;\n};\n\njasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {\n  var scheduledFunc;\n  var funcsToRun = [];\n  for (var timeoutKey in this.scheduledFunctions) {\n    scheduledFunc = this.scheduledFunctions[timeoutKey];\n    if (scheduledFunc != jasmine.undefined &&\n        scheduledFunc.runAtMillis >= oldMillis &&\n        scheduledFunc.runAtMillis <= nowMillis) {\n      funcsToRun.push(scheduledFunc);\n      this.scheduledFunctions[timeoutKey] = jasmine.undefined;\n    }\n  }\n\n  if (funcsToRun.length > 0) {\n    funcsToRun.sort(function(a, b) {\n      return a.runAtMillis - b.runAtMillis;\n    });\n    for (var i = 0; i < funcsToRun.length; ++i) {\n      try {\n        var funcToRun = funcsToRun[i];\n        this.nowMillis = funcToRun.runAtMillis;\n        funcToRun.funcToCall();\n        if (funcToRun.recurring) {\n          this.scheduleFunction(funcToRun.timeoutKey,\n              funcToRun.funcToCall,\n              funcToRun.millis,\n              true);\n        }\n      } catch(e) {\n      }\n    }\n    this.runFunctionsWithinRange(oldMillis, nowMillis);\n  }\n};\n\njasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) {\n  this.scheduledFunctions[timeoutKey] = {\n    runAtMillis: this.nowMillis + millis,\n    funcToCall: funcToCall,\n    recurring: recurring,\n    timeoutKey: timeoutKey,\n    millis: millis\n  };\n};\n\n/**\n * @namespace\n */\njasmine.Clock = {\n  defaultFakeTimer: new jasmine.FakeTimer(),\n\n  reset: function() {\n    jasmine.Clock.assertInstalled();\n    jasmine.Clock.defaultFakeTimer.reset();\n  },\n\n  tick: function(millis) {\n    jasmine.Clock.assertInstalled();\n    jasmine.Clock.defaultFakeTimer.tick(millis);\n  },\n\n  runFunctionsWithinRange: function(oldMillis, nowMillis) {\n    jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis);\n  },\n\n  scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) {\n    jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring);\n  },\n\n  useMock: function() {\n    if (!jasmine.Clock.isInstalled()) {\n      var spec = jasmine.getEnv().currentSpec;\n      spec.after(jasmine.Clock.uninstallMock);\n\n      jasmine.Clock.installMock();\n    }\n  },\n\n  installMock: function() {\n    jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer;\n  },\n\n  uninstallMock: function() {\n    jasmine.Clock.assertInstalled();\n    jasmine.Clock.installed = jasmine.Clock.real;\n  },\n\n  real: {\n    setTimeout: jasmine.getGlobal().setTimeout,\n    clearTimeout: jasmine.getGlobal().clearTimeout,\n    setInterval: jasmine.getGlobal().setInterval,\n    clearInterval: jasmine.getGlobal().clearInterval\n  },\n\n  assertInstalled: function() {\n    if (!jasmine.Clock.isInstalled()) {\n      throw new Error(\"Mock clock is not installed, use jasmine.Clock.useMock()\");\n    }\n  },\n\n  isInstalled: function() {\n    return jasmine.Clock.installed == jasmine.Clock.defaultFakeTimer;\n  },\n\n  installed: null\n};\njasmine.Clock.installed = jasmine.Clock.real;\n\n//else for IE support\njasmine.getGlobal().setTimeout = function(funcToCall, millis) {\n  if (jasmine.Clock.installed.setTimeout.apply) {\n    return jasmine.Clock.installed.setTimeout.apply(this, arguments);\n  } else {\n    return jasmine.Clock.installed.setTimeout(funcToCall, millis);\n  }\n};\n\njasmine.getGlobal().setInterval = function(funcToCall, millis) {\n  if (jasmine.Clock.installed.setInterval.apply) {\n    return jasmine.Clock.installed.setInterval.apply(this, arguments);\n  } else {\n    return jasmine.Clock.installed.setInterval(funcToCall, millis);\n  }\n};\n\njasmine.getGlobal().clearTimeout = function(timeoutKey) {\n  if (jasmine.Clock.installed.clearTimeout.apply) {\n    return jasmine.Clock.installed.clearTimeout.apply(this, arguments);\n  } else {\n    return jasmine.Clock.installed.clearTimeout(timeoutKey);\n  }\n};\n\njasmine.getGlobal().clearInterval = function(timeoutKey) {\n  if (jasmine.Clock.installed.clearTimeout.apply) {\n    return jasmine.Clock.installed.clearInterval.apply(this, arguments);\n  } else {\n    return jasmine.Clock.installed.clearInterval(timeoutKey);\n  }\n};\n\n/**\n * @constructor\n */\njasmine.MultiReporter = function() {\n  this.subReporters_ = [];\n};\njasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter);\n\njasmine.MultiReporter.prototype.addReporter = function(reporter) {\n  this.subReporters_.push(reporter);\n};\n\n(function() {\n  var functionNames = [\n    \"reportRunnerStarting\",\n    \"reportRunnerResults\",\n    \"reportSuiteResults\",\n    \"reportSpecStarting\",\n    \"reportSpecResults\",\n    \"log\"\n  ];\n  for (var i = 0; i < functionNames.length; i++) {\n    var functionName = functionNames[i];\n    jasmine.MultiReporter.prototype[functionName] = (function(functionName) {\n      return function() {\n        for (var j = 0; j < this.subReporters_.length; j++) {\n          var subReporter = this.subReporters_[j];\n          if (subReporter[functionName]) {\n            subReporter[functionName].apply(subReporter, arguments);\n          }\n        }\n      };\n    })(functionName);\n  }\n})();\n/**\n * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults\n *\n * @constructor\n */\njasmine.NestedResults = function() {\n  /**\n   * The total count of results\n   */\n  this.totalCount = 0;\n  /**\n   * Number of passed results\n   */\n  this.passedCount = 0;\n  /**\n   * Number of failed results\n   */\n  this.failedCount = 0;\n  /**\n   * Was this suite/spec skipped?\n   */\n  this.skipped = false;\n  /**\n   * @ignore\n   */\n  this.items_ = [];\n};\n\n/**\n * Roll up the result counts.\n *\n * @param result\n */\njasmine.NestedResults.prototype.rollupCounts = function(result) {\n  this.totalCount += result.totalCount;\n  this.passedCount += result.passedCount;\n  this.failedCount += result.failedCount;\n};\n\n/**\n * Adds a log message.\n * @param values Array of message parts which will be concatenated later.\n */\njasmine.NestedResults.prototype.log = function(values) {\n  this.items_.push(new jasmine.MessageResult(values));\n};\n\n/**\n * Getter for the results: message & results.\n */\njasmine.NestedResults.prototype.getItems = function() {\n  return this.items_;\n};\n\n/**\n * Adds a result, tracking counts (total, passed, & failed)\n * @param {jasmine.ExpectationResult|jasmine.NestedResults} result\n */\njasmine.NestedResults.prototype.addResult = function(result) {\n  if (result.type != 'log') {\n    if (result.items_) {\n      this.rollupCounts(result);\n    } else {\n      this.totalCount++;\n      if (result.passed()) {\n        this.passedCount++;\n      } else {\n        this.failedCount++;\n      }\n    }\n  }\n  this.items_.push(result);\n};\n\n/**\n * @returns {Boolean} True if <b>everything</b> below passed\n */\njasmine.NestedResults.prototype.passed = function() {\n  return this.passedCount === this.totalCount;\n};\n/**\n * Base class for pretty printing for expectation results.\n */\njasmine.PrettyPrinter = function() {\n  this.ppNestLevel_ = 0;\n};\n\n/**\n * Formats a value in a nice, human-readable string.\n *\n * @param value\n */\njasmine.PrettyPrinter.prototype.format = function(value) {\n  this.ppNestLevel_++;\n  try {\n    if (value === jasmine.undefined) {\n      this.emitScalar('undefined');\n    } else if (value === null) {\n      this.emitScalar('null');\n    } else if (value === jasmine.getGlobal()) {\n      this.emitScalar('<global>');\n    } else if (value.jasmineToString) {\n      this.emitScalar(value.jasmineToString());\n    } else if (typeof value === 'string') {\n      this.emitString(value);\n    } else if (jasmine.isSpy(value)) {\n      this.emitScalar(\"spy on \" + value.identity);\n    } else if (value instanceof RegExp) {\n      this.emitScalar(value.toString());\n    } else if (typeof value === 'function') {\n      this.emitScalar('Function');\n    } else if (typeof value.nodeType === 'number') {\n      this.emitScalar('HTMLNode');\n    } else if (value instanceof Date) {\n      this.emitScalar('Date(' + value + ')');\n    } else if (value.__Jasmine_been_here_before__) {\n      this.emitScalar('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>');\n    } else if (jasmine.isArray_(value) || typeof value == 'object') {\n      value.__Jasmine_been_here_before__ = true;\n      if (jasmine.isArray_(value)) {\n        this.emitArray(value);\n      } else {\n        this.emitObject(value);\n      }\n      delete value.__Jasmine_been_here_before__;\n    } else {\n      this.emitScalar(value.toString());\n    }\n  } finally {\n    this.ppNestLevel_--;\n  }\n};\n\njasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {\n  for (var property in obj) {\n    if (!obj.hasOwnProperty(property)) continue;\n    if (property == '__Jasmine_been_here_before__') continue;\n    fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && \n                                         obj.__lookupGetter__(property) !== null) : false);\n  }\n};\n\njasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_;\njasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_;\njasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_;\njasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_;\n\njasmine.StringPrettyPrinter = function() {\n  jasmine.PrettyPrinter.call(this);\n\n  this.string = '';\n};\njasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter);\n\njasmine.StringPrettyPrinter.prototype.emitScalar = function(value) {\n  this.append(value);\n};\n\njasmine.StringPrettyPrinter.prototype.emitString = function(value) {\n  this.append(\"'\" + value + \"'\");\n};\n\njasmine.StringPrettyPrinter.prototype.emitArray = function(array) {\n  if (this.ppNestLevel_ > jasmine.MAX_PRETTY_PRINT_DEPTH) {\n    this.append(\"Array\");\n    return;\n  }\n\n  this.append('[ ');\n  for (var i = 0; i < array.length; i++) {\n    if (i > 0) {\n      this.append(', ');\n    }\n    this.format(array[i]);\n  }\n  this.append(' ]');\n};\n\njasmine.StringPrettyPrinter.prototype.emitObject = function(obj) {\n  if (this.ppNestLevel_ > jasmine.MAX_PRETTY_PRINT_DEPTH) {\n    this.append(\"Object\");\n    return;\n  }\n\n  var self = this;\n  this.append('{ ');\n  var first = true;\n\n  this.iterateObject(obj, function(property, isGetter) {\n    if (first) {\n      first = false;\n    } else {\n      self.append(', ');\n    }\n\n    self.append(property);\n    self.append(' : ');\n    if (isGetter) {\n      self.append('<getter>');\n    } else {\n      self.format(obj[property]);\n    }\n  });\n\n  this.append(' }');\n};\n\njasmine.StringPrettyPrinter.prototype.append = function(value) {\n  this.string += value;\n};\njasmine.Queue = function(env) {\n  this.env = env;\n\n  // parallel to blocks. each true value in this array means the block will\n  // get executed even if we abort\n  this.ensured = [];\n  this.blocks = [];\n  this.running = false;\n  this.index = 0;\n  this.offset = 0;\n  this.abort = false;\n};\n\njasmine.Queue.prototype.addBefore = function(block, ensure) {\n  if (ensure === jasmine.undefined) {\n    ensure = false;\n  }\n\n  this.blocks.unshift(block);\n  this.ensured.unshift(ensure);\n};\n\njasmine.Queue.prototype.add = function(block, ensure) {\n  if (ensure === jasmine.undefined) {\n    ensure = false;\n  }\n\n  this.blocks.push(block);\n  this.ensured.push(ensure);\n};\n\njasmine.Queue.prototype.insertNext = function(block, ensure) {\n  if (ensure === jasmine.undefined) {\n    ensure = false;\n  }\n\n  this.ensured.splice((this.index + this.offset + 1), 0, ensure);\n  this.blocks.splice((this.index + this.offset + 1), 0, block);\n  this.offset++;\n};\n\njasmine.Queue.prototype.start = function(onComplete) {\n  this.running = true;\n  this.onComplete = onComplete;\n  this.next_();\n};\n\njasmine.Queue.prototype.isRunning = function() {\n  return this.running;\n};\n\njasmine.Queue.LOOP_DONT_RECURSE = true;\n\njasmine.Queue.prototype.next_ = function() {\n  var self = this;\n  var goAgain = true;\n\n  while (goAgain) {\n    goAgain = false;\n    \n    if (self.index < self.blocks.length && !(this.abort && !this.ensured[self.index])) {\n      var calledSynchronously = true;\n      var completedSynchronously = false;\n\n      var onComplete = function () {\n        if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {\n          completedSynchronously = true;\n          return;\n        }\n\n        if (self.blocks[self.index].abort) {\n          self.abort = true;\n        }\n\n        self.offset = 0;\n        self.index++;\n\n        var now = new Date().getTime();\n        if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {\n          self.env.lastUpdate = now;\n          self.env.setTimeout(function() {\n            self.next_();\n          }, 0);\n        } else {\n          if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {\n            goAgain = true;\n          } else {\n            self.next_();\n          }\n        }\n      };\n      self.blocks[self.index].execute(onComplete);\n\n      calledSynchronously = false;\n      if (completedSynchronously) {\n        onComplete();\n      }\n      \n    } else {\n      self.running = false;\n      if (self.onComplete) {\n        self.onComplete();\n      }\n    }\n  }\n};\n\njasmine.Queue.prototype.results = function() {\n  var results = new jasmine.NestedResults();\n  for (var i = 0; i < this.blocks.length; i++) {\n    if (this.blocks[i].results) {\n      results.addResult(this.blocks[i].results());\n    }\n  }\n  return results;\n};\n\n\n/**\n * Runner\n *\n * @constructor\n * @param {jasmine.Env} env\n */\njasmine.Runner = function(env) {\n  var self = this;\n  self.env = env;\n  self.queue = new jasmine.Queue(env);\n  self.before_ = [];\n  self.after_ = [];\n  self.suites_ = [];\n};\n\njasmine.Runner.prototype.execute = function() {\n  var self = this;\n  if (self.env.reporter.reportRunnerStarting) {\n    self.env.reporter.reportRunnerStarting(this);\n  }\n  self.queue.start(function () {\n    self.finishCallback();\n  });\n};\n\njasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {\n  beforeEachFunction.typeName = 'beforeEach';\n  this.before_.splice(0,0,beforeEachFunction);\n};\n\njasmine.Runner.prototype.afterEach = function(afterEachFunction) {\n  afterEachFunction.typeName = 'afterEach';\n  this.after_.splice(0,0,afterEachFunction);\n};\n\n\njasmine.Runner.prototype.finishCallback = function() {\n  this.env.reporter.reportRunnerResults(this);\n};\n\njasmine.Runner.prototype.addSuite = function(suite) {\n  this.suites_.push(suite);\n};\n\njasmine.Runner.prototype.add = function(block) {\n  if (block instanceof jasmine.Suite) {\n    this.addSuite(block);\n  }\n  this.queue.add(block);\n};\n\njasmine.Runner.prototype.specs = function () {\n  var suites = this.suites();\n  var specs = [];\n  for (var i = 0; i < suites.length; i++) {\n    specs = specs.concat(suites[i].specs());\n  }\n  return specs;\n};\n\njasmine.Runner.prototype.suites = function() {\n  return this.suites_;\n};\n\njasmine.Runner.prototype.topLevelSuites = function() {\n  var topLevelSuites = [];\n  for (var i = 0; i < this.suites_.length; i++) {\n    if (!this.suites_[i].parentSuite) {\n      topLevelSuites.push(this.suites_[i]);\n    }\n  }\n  return topLevelSuites;\n};\n\njasmine.Runner.prototype.results = function() {\n  return this.queue.results();\n};\n/**\n * Internal representation of a Jasmine specification, or test.\n *\n * @constructor\n * @param {jasmine.Env} env\n * @param {jasmine.Suite} suite\n * @param {String} description\n */\njasmine.Spec = function(env, suite, description) {\n  if (!env) {\n    throw new Error('jasmine.Env() required');\n  }\n  if (!suite) {\n    throw new Error('jasmine.Suite() required');\n  }\n  var spec = this;\n  spec.id = env.nextSpecId ? env.nextSpecId() : null;\n  spec.env = env;\n  spec.suite = suite;\n  spec.description = description;\n  spec.queue = new jasmine.Queue(env);\n\n  spec.afterCallbacks = [];\n  spec.spies_ = [];\n\n  spec.results_ = new jasmine.NestedResults();\n  spec.results_.description = description;\n  spec.matchersClass = null;\n};\n\njasmine.Spec.prototype.getFullName = function() {\n  return this.suite.getFullName() + ' ' + this.description + '.';\n};\n\n\njasmine.Spec.prototype.results = function() {\n  return this.results_;\n};\n\n/**\n * All parameters are pretty-printed and concatenated together, then written to the spec's output.\n *\n * Be careful not to leave calls to <code>jasmine.log</code> in production code.\n */\njasmine.Spec.prototype.log = function() {\n  return this.results_.log(arguments);\n};\n\njasmine.Spec.prototype.runs = function (func) {\n  var block = new jasmine.Block(this.env, func, this);\n  this.addToQueue(block);\n  return this;\n};\n\njasmine.Spec.prototype.addToQueue = function (block) {\n  if (this.queue.isRunning()) {\n    this.queue.insertNext(block);\n  } else {\n    this.queue.add(block);\n  }\n};\n\n/**\n * @param {jasmine.ExpectationResult} result\n */\njasmine.Spec.prototype.addMatcherResult = function(result) {\n  this.results_.addResult(result);\n};\n\njasmine.Spec.prototype.expect = function(actual) {\n  var positive = new (this.getMatchersClass_())(this.env, actual, this);\n  positive.not = new (this.getMatchersClass_())(this.env, actual, this, true);\n  return positive;\n};\n\n/**\n * Waits a fixed time period before moving to the next block.\n *\n * @deprecated Use waitsFor() instead\n * @param {Number} timeout milliseconds to wait\n */\njasmine.Spec.prototype.waits = function(timeout) {\n  var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this);\n  this.addToQueue(waitsFunc);\n  return this;\n};\n\n/**\n * Waits for the latchFunction to return true before proceeding to the next block.\n *\n * @param {Function} latchFunction\n * @param {String} optional_timeoutMessage\n * @param {Number} optional_timeout\n */\njasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {\n  var latchFunction_ = null;\n  var optional_timeoutMessage_ = null;\n  var optional_timeout_ = null;\n\n  for (var i = 0; i < arguments.length; i++) {\n    var arg = arguments[i];\n    switch (typeof arg) {\n      case 'function':\n        latchFunction_ = arg;\n        break;\n      case 'string':\n        optional_timeoutMessage_ = arg;\n        break;\n      case 'number':\n        optional_timeout_ = arg;\n        break;\n    }\n  }\n\n  var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this);\n  this.addToQueue(waitsForFunc);\n  return this;\n};\n\njasmine.Spec.prototype.fail = function (e) {\n  var expectationResult = new jasmine.ExpectationResult({\n    passed: false,\n    message: e ? jasmine.util.formatException(e) : 'Exception',\n    trace: { stack: e.stack }\n  });\n  this.results_.addResult(expectationResult);\n};\n\njasmine.Spec.prototype.getMatchersClass_ = function() {\n  return this.matchersClass || this.env.matchersClass;\n};\n\njasmine.Spec.prototype.addMatchers = function(matchersPrototype) {\n  var parent = this.getMatchersClass_();\n  var newMatchersClass = function() {\n    parent.apply(this, arguments);\n  };\n  jasmine.util.inherit(newMatchersClass, parent);\n  jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass);\n  this.matchersClass = newMatchersClass;\n};\n\njasmine.Spec.prototype.finishCallback = function() {\n  this.env.reporter.reportSpecResults(this);\n};\n\njasmine.Spec.prototype.finish = function(onComplete) {\n  this.removeAllSpies();\n  this.finishCallback();\n  if (onComplete) {\n    onComplete();\n  }\n};\n\njasmine.Spec.prototype.after = function(doAfter) {\n  if (this.queue.isRunning()) {\n    this.queue.add(new jasmine.Block(this.env, doAfter, this), true);\n  } else {\n    this.afterCallbacks.unshift(doAfter);\n  }\n};\n\njasmine.Spec.prototype.execute = function(onComplete) {\n  var spec = this;\n  if (!spec.env.specFilter(spec)) {\n    spec.results_.skipped = true;\n    spec.finish(onComplete);\n    return;\n  }\n\n  this.env.reporter.reportSpecStarting(this);\n\n  spec.env.currentSpec = spec;\n\n  spec.addBeforesAndAftersToQueue();\n\n  spec.queue.start(function () {\n    spec.finish(onComplete);\n  });\n};\n\njasmine.Spec.prototype.addBeforesAndAftersToQueue = function() {\n  var runner = this.env.currentRunner();\n  var i;\n\n  for (var suite = this.suite; suite; suite = suite.parentSuite) {\n    for (i = 0; i < suite.before_.length; i++) {\n      this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this));\n    }\n  }\n  for (i = 0; i < runner.before_.length; i++) {\n    this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this));\n  }\n  for (i = 0; i < this.afterCallbacks.length; i++) {\n    this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this), true);\n  }\n  for (suite = this.suite; suite; suite = suite.parentSuite) {\n    for (i = 0; i < suite.after_.length; i++) {\n      this.queue.add(new jasmine.Block(this.env, suite.after_[i], this), true);\n    }\n  }\n  for (i = 0; i < runner.after_.length; i++) {\n    this.queue.add(new jasmine.Block(this.env, runner.after_[i], this), true);\n  }\n};\n\njasmine.Spec.prototype.explodes = function() {\n  throw 'explodes function should not have been called';\n};\n\njasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) {\n  if (obj == jasmine.undefined) {\n    throw \"spyOn could not find an object to spy upon for \" + methodName + \"()\";\n  }\n\n  if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) {\n    throw methodName + '() method does not exist';\n  }\n\n  if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) {\n    throw new Error(methodName + ' has already been spied upon');\n  }\n\n  var spyObj = jasmine.createSpy(methodName);\n\n  this.spies_.push(spyObj);\n  spyObj.baseObj = obj;\n  spyObj.methodName = methodName;\n  spyObj.originalValue = obj[methodName];\n\n  obj[methodName] = spyObj;\n\n  return spyObj;\n};\n\njasmine.Spec.prototype.removeAllSpies = function() {\n  for (var i = 0; i < this.spies_.length; i++) {\n    var spy = this.spies_[i];\n    spy.baseObj[spy.methodName] = spy.originalValue;\n  }\n  this.spies_ = [];\n};\n\n/**\n * Internal representation of a Jasmine suite.\n *\n * @constructor\n * @param {jasmine.Env} env\n * @param {String} description\n * @param {Function} specDefinitions\n * @param {jasmine.Suite} parentSuite\n */\njasmine.Suite = function(env, description, specDefinitions, parentSuite) {\n  var self = this;\n  self.id = env.nextSuiteId ? env.nextSuiteId() : null;\n  self.description = description;\n  self.queue = new jasmine.Queue(env);\n  self.parentSuite = parentSuite;\n  self.env = env;\n  self.before_ = [];\n  self.after_ = [];\n  self.children_ = [];\n  self.suites_ = [];\n  self.specs_ = [];\n};\n\njasmine.Suite.prototype.getFullName = function() {\n  var fullName = this.description;\n  for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {\n    fullName = parentSuite.description + ' ' + fullName;\n  }\n  return fullName;\n};\n\njasmine.Suite.prototype.finish = function(onComplete) {\n  this.env.reporter.reportSuiteResults(this);\n  this.finished = true;\n  if (typeof(onComplete) == 'function') {\n    onComplete();\n  }\n};\n\njasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {\n  beforeEachFunction.typeName = 'beforeEach';\n  this.before_.unshift(beforeEachFunction);\n};\n\njasmine.Suite.prototype.afterEach = function(afterEachFunction) {\n  afterEachFunction.typeName = 'afterEach';\n  this.after_.unshift(afterEachFunction);\n};\n\njasmine.Suite.prototype.results = function() {\n  return this.queue.results();\n};\n\njasmine.Suite.prototype.add = function(suiteOrSpec) {\n  this.children_.push(suiteOrSpec);\n  if (suiteOrSpec instanceof jasmine.Suite) {\n    this.suites_.push(suiteOrSpec);\n    this.env.currentRunner().addSuite(suiteOrSpec);\n  } else {\n    this.specs_.push(suiteOrSpec);\n  }\n  this.queue.add(suiteOrSpec);\n};\n\njasmine.Suite.prototype.specs = function() {\n  return this.specs_;\n};\n\njasmine.Suite.prototype.suites = function() {\n  return this.suites_;\n};\n\njasmine.Suite.prototype.children = function() {\n  return this.children_;\n};\n\njasmine.Suite.prototype.execute = function(onComplete) {\n  var self = this;\n  this.queue.start(function () {\n    self.finish(onComplete);\n  });\n};\njasmine.WaitsBlock = function(env, timeout, spec) {\n  this.timeout = timeout;\n  jasmine.Block.call(this, env, null, spec);\n};\n\njasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);\n\njasmine.WaitsBlock.prototype.execute = function (onComplete) {\n  if (jasmine.VERBOSE) {\n    this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');\n  }\n  this.env.setTimeout(function () {\n    onComplete();\n  }, this.timeout);\n};\n/**\n * A block which waits for some condition to become true, with timeout.\n *\n * @constructor\n * @extends jasmine.Block\n * @param {jasmine.Env} env The Jasmine environment.\n * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true.\n * @param {Function} latchFunction A function which returns true when the desired condition has been met.\n * @param {String} message The message to display if the desired condition hasn't been met within the given time period.\n * @param {jasmine.Spec} spec The Jasmine spec.\n */\njasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {\n  this.timeout = timeout || env.defaultTimeoutInterval;\n  this.latchFunction = latchFunction;\n  this.message = message;\n  this.totalTimeSpentWaitingForLatch = 0;\n  jasmine.Block.call(this, env, null, spec);\n};\njasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);\n\njasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10;\n\njasmine.WaitsForBlock.prototype.execute = function(onComplete) {\n  if (jasmine.VERBOSE) {\n    this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen'));\n  }\n  var latchFunctionResult;\n  try {\n    latchFunctionResult = this.latchFunction.apply(this.spec);\n  } catch (e) {\n    this.spec.fail(e);\n    onComplete();\n    return;\n  }\n\n  if (latchFunctionResult) {\n    onComplete();\n  } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) {\n    var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen');\n    this.spec.fail({\n      name: 'timeout',\n      message: message\n    });\n\n    this.abort = true;\n    onComplete();\n  } else {\n    this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;\n    var self = this;\n    this.env.setTimeout(function() {\n      self.execute(onComplete);\n    }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);\n  }\n};\n\njasmine.version_= {\n  \"major\": 1,\n  \"minor\": 3,\n  \"build\": 1,\n  \"revision\": 1354556913\n};\n"
  },
  {
    "path": "assets/test/js/tests.js",
    "content": "/*!\n * SourceJS - Living Style Guides Engine and Integrated Maintenance Environment for Front-end Components\n * @copyright 2013-2015 Sourcejs.com\n * @license MIT license: http://github.com/sourcejs/source/wiki/MIT-License\n * */\n\nrequirejs.config({\n    urlArgs: 'cb=' + Math.random(), /* to avoid caching */\n\n    paths: {\n        test: '/test',\n        jasmine: '/test/jasmine/jasmine',\n        'jasmine-html': '/test/jasmine/jasmine-html'\n    },\n\n    shim: {\n        'jasmine': {\n            exports: 'jasmine'\n        },\n        'jasmine-html': {\n            deps: ['jasmine'],\n            exports: 'jasmine'\n        }\n    }\n});\n\nrequire(['jquery', 'jasmine-html'], function($, jasmine){\n\n    var jasmineEnv = jasmine.getEnv();\n    jasmineEnv.updateInterval = 1000;\n\n    var htmlReporter = new jasmine.HtmlReporter();\n\n    jasmineEnv.addReporter(htmlReporter);\n\n    jasmineEnv.specFilter = function(spec) {\n        return htmlReporter.specFilter(spec);\n    };\n\n    var specs = [];\n\n    specs.push('test/spec/moduleSpec');\n    specs.push('test/spec/sectionsSpec');\n    specs.push('test/spec/innerNavigationSpec');\n\n    $(function(){\n        require(specs, function(){\n            jasmineEnv.execute();\n        });\n    });\n\n});"
  },
  {
    "path": "assets/test/spec/innerNavigationSpec.js",
    "content": "/**\n * Created by Alexey Ostrovsky.\n * Date: 04.04.13\n * Time: 14:33\n */\n\ndefine(['sourceModules/innerNavigation'], function (innerNavigation) {\n\n    return describe('Inner Navigation module - innerNavigation.js', function () {\n\n        var iNav;\n        var TEST_SECTION =\n                '<section class=\"source_section\">' +\n                        '<h2>Первый блок</h2>' +\n                        '<section class=\"source_example\" style=\"background-color:#F2F4F6\">' +\n                        '<div class=\"insert-ucard_avatar\"></div>' +\n                        '</section>' +\n                        '</section>';\n\n\n        beforeEach(function () {\n\n            $('#sandbox').html('<div class=\"source_main\"><h1>Test heading</h1></div>');\n\n            iNav = innerNavigation.createInstance();\n        });\n\n        afterEach(function () {\n            $('#sandbox').html('');\n        });\n\n        it('injects only navigation menu in DOM after .source_header element', function () {\n            expect($('.source_main_nav').length).toEqual(1);\n        });\n\n    });\n\n});"
  },
  {
    "path": "assets/test/spec/moduleSpec.js",
    "content": "/**\n * Created by Alexey Ostrovsky.\n * Date: 04.04.13\n * Time: 14:33\n */\n\ndefine(['sourceModules/module', 'source/load-options'], function (module, options) {\n\n    return describe('Base module - module.js', function () {\n        var m;\n\n        beforeEach(function () {\n            $('#sandbox').html();\n            m = module.createInstance();\n        });\n\n\n        it('returns object', function () {\n            expect(Object.prototype.toString.call(m)).toEqual('[object Object]');\n        });\n\n        it('loadOptions method returns opctions from options.js', function () {\n            expect(m.loadOptions()).toEqual(options);\n        });\n\n        it('getOptions method returns options filed value', function () {\n            var opts = {test:'get'};\n            m.options = opts;\n\n            expect(m.getOptions()).toEqual(opts);\n        });\n\n        it('setOptions method sets argument in options', function () {\n            var opts = {test:'set'};\n            m.setOptions(opts);\n\n            expect(m.options).toEqual(opts);\n        });\n\n//        After module.js minification class is renamed to shorter value\n//        it('getClass method returns right object class', function () {\n//            expect(m.getClass()).toEqual('Module');\n//        });\n\n        it('getClass method returns right class from inherited object', function () {\n            var obj = m.createInstance();\n\n            function NewObject(){\n                this.constructor = arguments.callee; // set constructor\n            }\n            NewObject.prototype = obj;\n\n            var newObject = new NewObject();\n\n            expect(newObject.getClass()).toEqual('NewObject');\n        });\n\n\n        it('createInstance method creates the same class instance as object', function () {\n            var obj = m.createInstance();\n\n            expect(obj.getClass()).toEqual(m.getClass());\n        });\n\n        it('createInstance method creates the same class instance as object inherited from other object ', function () {\n            var obj = m.createInstance();\n\n            function NewObject(){}\n            NewObject.prototype = obj.createInstance();\n            NewObject.prototype.constructor = NewObject;\n\n            var newObject = new NewObject();\n\n            expect(newObject instanceof NewObject).toEqual(true);\n            expect(newObject.constructor.name).toEqual('NewObject');\n        });\n\n    });\n\n});"
  },
  {
    "path": "assets/test/spec/sectionsSpec.js",
    "content": "/**\n * Created by Alexey Ostrovsky.\n * Date: 04.04.13\n * Time: 14:33\n */\n\ndefine(['sourceModules/sections'], function (sections) {\n\n    return describe('Sections count module - sections.js', function () {\n\n        var TEST_SECTION =\n                '<section class=\"source_section\">' +\n                        '<h2>Первый блок</h2>' +\n                        '<section class=\"source_example\" style=\"background-color:#F2F4F6\">' +\n                        '<div class=\"insert-ucard_avatar\"></div>' +\n                        '</section>' +\n                        '</section>';\n\n        var MIN = 0;\n        var MAX = 100;\n        var rand = Math.floor(Math.random() * (MAX - MIN + 1)) + MIN;\n        var str = '';\n        var s = {};\n\n        for (var i = 0; i < rand; i++) {\n            str += TEST_SECTION;\n        }\n\n        beforeEach(function () {\n\n            $('#sandbox').html(str);\n\n            s = sections.createInstance();\n        });\n\n        afterEach(function () {\n            s = sections.createInstance();\n        });\n\n        it('returns array', function () {\n            expect(Object.prototype.toString.call(s.getSections())).toEqual('[object Array]');\n        });\n\n        it('getSections method returns sections field', function () {\n            var arr = [1, 2, 3];\n            s.sections = arr;\n\n            expect(s.getSections()).toEqual(arr);\n        });\n\n        it('addSections method adds element to sections field', function () {\n            arr = [1, 2, 3];\n            s.sections = arr;\n            s.addSection(4);\n\n            expect(s.getSections()).toEqual([1, 2, 3, 4]);\n        });\n\n        it('getQuantity method returns sections field size', function () {\n            expect(s.getQuantity()).toEqual(s.sections.length);\n        });\n\n        it('scanDOM method fills sections array field with seactions from DOM tree', function () {\n            expect(s.getQuantity()).toEqual(rand);\n        });\n\n\n    });\n\n});"
  },
  {
    "path": "core/api/index.js",
    "content": "'use strict';\n\nvar express = require('express');\nvar path = require('path');\nvar parseData = require(path.join(global.pathToApp, 'core/lib/parseData'));\nvar utils = require(path.join(global.pathToApp, 'core/lib/utils'));\nvar pathToApp = path.dirname(require.main.filename);\nvar htmlTree = require(path.join(global.pathToApp, 'core/html-tree'));\nvar unflatten = require(path.join(global.pathToApp,'core/unflat'));\n\nvar config = {\n    statusCodes: {\n        OK: 200,\n        notFound: 404,\n        error: 500\n    }\n};\n// Overwriting base options\nutils.extendOptions(config, global.opts.core.api);\n\nvar specsDataPath = path.join(pathToApp, config.specsData);\nvar htmlDataPath = path.join(pathToApp, config.htmlData);\n\n/**\n * getSpecs REST api processor\n *\n * @param {Object} req - express request\n * @param {Object} res - express response\n * @param {Object} parseObj - initiated parseData instance\n *\n * Writes result to res object\n */\nvar getSpecs = function (req, res, parseObj) {\n    var data = {};\n    var body = req.body;\n    var reqID = body.id || req.query.id;\n    var cats = body.cats || req.query.cats;\n    var reqFilter = body.filter || req.query.filter;\n    var reqFilterOut = body.filterOut || req.query.filterOut;\n    var parsedData = parseObj;\n\n    var msgDataNotFound = 'API: Specs data not found, please restart the app.';\n\n    if (reqID) {\n        var dataByID = parsedData.getByID(reqID);\n\n        if (dataByID && typeof dataByID === 'object') {\n            res.status(config.statusCodes.OK).json(dataByID);\n        } else {\n            if (typeof dataByID === 'undefined') console.warn(msgDataNotFound);\n\n            res.status(config.statusCodes.notFound).json({\n                message: \"id not found\"\n            });\n        }\n\n    } else if (reqFilter || reqFilterOut) {\n        var dataFiltered = parsedData.getFilteredData({\n            filter: reqFilter,\n            filterOut: reqFilterOut\n        });\n\n        if (dataFiltered && typeof dataFiltered === 'object') {\n            res.status(config.statusCodes.OK).json(dataFiltered);\n        } else {\n            console.warn(msgDataNotFound);\n\n            res.status(config.statusCodes.notFound).json({\n                message: \"data not found\"\n            });\n        }\n    } else {\n        data = parsedData.getAll(cats);\n\n        if (data) {\n            res.status(config.statusCodes.OK).json(data);\n        } else {\n            console.warn(msgDataNotFound);\n\n            res.status(config.statusCodes.notFound).json({\n                message: \"data not found\"\n            });\n        }\n    }\n};\n\n/**\n * getHTML REST api processor\n *\n * @param {Object} req - express request\n * @param {Object} res - express response\n * @param {Object} parseObj - initiated parseData instance\n *\n * Writes result to res object\n */\nvar getHTML = function (req, res, parseObj) {\n    var data = {};\n    var body = req.body;\n    var reqID = body.id || req.query.id;\n    var reqSections = body.sections || req.query.sections;\n    var sections = reqSections ? reqSections.split(',') : undefined;\n    var parsedData = parseObj;\n\n    var msgDataNotFound = 'API: HTML data not found, please sync API or run PhantomJS parser.';\n\n    if (reqID) {\n        var responseData = '';\n\n        if (reqSections) {\n            responseData = parsedData.getBySection(reqID, sections);\n        } else {\n            responseData = parsedData.getByID(reqID);\n        }\n\n        if (responseData && typeof responseData === 'object') {\n            res.status(config.statusCodes.OK).json(responseData);\n        } else {\n            if (typeof responseData === 'undefined') console.warn(msgDataNotFound);\n\n            res.status(config.statusCodes.notFound).json({\n                message: \"id and requested sections not found\"\n            });\n        }\n    } else {\n        data = parsedData.getAll();\n\n        if (data) {\n            res.status(config.statusCodes.OK).json(data);\n        } else {\n            console.warn(msgDataNotFound);\n\n            res.status(config.statusCodes.notFound).json({\n                message: \"data not found\"\n            });\n        }\n    }\n};\n\n/**\n * postHTML REST api processor\n *\n * @param {Object} req - express request\n * @param {Object} req.body.data - data to write\n * @param {Boolean} req.body.unflatten - set true, to unflat tree from 'base/spec'\n *\n * @param {Object} res - express response\n * @param {String} dataPath - custom data storage path\n *\n * Writes result to res object\n */\nvar postHTML = function (req, res, dataPath) {\n    var body = req.body;\n    var data = body.data;\n    var dataUnflatten = body.unflatten;\n\n    if (dataUnflatten) {\n        data = unflatten(data, { delimiter: '/', overwrite: 'root' });\n    }\n\n    htmlTree.writeDataFile(data, true, dataPath, function(err, finalData){\n        if (err || !finalData) {\n            res.status(config.statusCodes.error).json({\n                message: err\n            });\n        } else {\n            res.status(config.statusCodes.OK).json(finalData);\n        }\n    });\n};\n\n/**\n * postHTML DELETE api processor\n *\n * @param {Object} req - express request\n * @param {Object} req.body.path - data path for deletion\n *\n * @param {Object} res - express response\n * @param {String} dataPath - custom data storage path\n *\n * Writes result to res object\n */\nvar deleteHTML = function (req, res, dataPath) {\n    var body = req.body;\n    var reqID = body.id || req.query.id;\n\n    htmlTree.deleteFromDataFile(dataPath, reqID, function(err, finalData){\n        if (err || !finalData) {\n            res.status(config.statusCodes.error).json({\n                message: err\n            });\n        } else {\n            res.status(config.statusCodes.OK).json(finalData);\n        }\n    });\n};\n\n/**\n * If app is running in presentation mode, handle response with stub\n *\n * @param {Object} req - express request\n * @param {Object} res - express response\n *\n * Writes result to res object\n */\nvar presentationHandler = function (req, res) {\n    res.json({ message: 'API is running in presentation mode, no write operations permited.' });\n};\n\n/* Main API router */\nvar apiRouter = express.Router();\n\nvar parseHTMLData = new parseData({\n    scope: 'html',\n    path: htmlDataPath\n});\n\nvar parseSpecs = new parseData({\n    scope: 'specs',\n    path: specsDataPath\n});\n\napiRouter.use(function(req, res, next) {\n    res.header(\"Access-Control-Allow-Origin\", \"*\");\n    res.header(\"Access-Control-Allow-Methods\", \"GET\");\n    res.header(\"Access-Control-Allow-Headers\", \"Content-Type\");\n    next();\n});\n\napiRouter.get('/', function(req, res) {\n\tres.json({ message: 'Hello API' });\n});\n\napiRouter.route('/specs/raw')\n    .get(function (req, res) {\n        var data = parseSpecs.getRaw();\n\n        if (data) {\n            res.status(config.statusCodes.OK).json(data);\n        } else {\n            res.status(config.statusCodes.notFound).json({\n                message: \"data not found\"\n            });\n        }\n    });\n\napiRouter.route('/specs')\n    .get(function (req, res) {\n        getSpecs(req, res, parseSpecs);\n    });\n\napiRouter.route('/specs/html')\n    .get(function (req, res) {\n        getHTML(req, res, parseHTMLData);\n    })\n    .post(function (req, res) {\n        if (global.MODE === 'presentation') {\n            presentationHandler(req, res);\n        } else {\n            postHTML(req, res, htmlDataPath);\n        }\n    })\n    /* jshint es5:false */\n    .delete(function (req, res) {\n        if (global.MODE === 'presentation') {\n            presentationHandler(req, res);\n        } else {\n            deleteHTML(req, res, htmlDataPath);\n        }\n    });\n\n// Activating router\nglobal.app.use('/api', apiRouter);\n/* Main API router */\n\n\n\n/* Test API router */\n// TODO: find alternative way for testing API, without custom route\n\nvar apiTestRouter = express.Router();\nvar specsDataTestPath = path.join(pathToApp, config.specsTestData);\nvar htmlDataTestPath = path.join(pathToApp, config.htmlTestData);\n\nvar parseSpecsTest = new parseData({\n    scope: 'specs',\n    path: specsDataTestPath\n});\n\nvar parseHTMLDataTest = new parseData({\n    scope: 'html',\n    path: htmlDataTestPath\n});\n\napiTestRouter.use(function(req, res, next) {\n    res.header(\"Access-Control-Allow-Origin\", \"*\");\n    res.header(\"Access-Control-Allow-Methods\", \"GET\");\n    res.header(\"Access-Control-Allow-Headers\", \"Content-Type\");\n    next();\n});\n\napiTestRouter.get('/', function(req, res) {\n\tres.json({ message: 'API Testig env' });\n});\n\napiTestRouter.route('/specs')\n    .get(function (req, res) {\n        getSpecs(req, res, parseSpecsTest);\n    });\n\napiTestRouter.route('/specs/html')\n    .get(function (req, res) {\n        getHTML(req, res, parseHTMLDataTest);\n    })\n    .post(function (req, res) {\n        if (global.MODE === 'presentation') {\n            presentationHandler(req, res);\n        } else {\n            postHTML(req, res, htmlDataTestPath);\n        }\n    })\n    .delete(function (req, res) {\n        if (global.MODE === 'presentation') {\n            presentationHandler(req, res);\n        } else {\n            deleteHTML(req, res, htmlDataTestPath);\n        }\n    });\n\n// Activating router\nglobal.app.use('/api-test', apiTestRouter);\n/* /Test API router */"
  },
  {
    "path": "core/api/optionsApi.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar configUtils = require(path.join(global.pathToApp,'core/lib/configUtils'));\nvar loadOptions = require(path.join(global.pathToApp,'core/loadOptions'));\n\nglobal.app.use('/api/options', function(req, res){\n    var contextOptions = loadOptions();\n    var ref = req.headers.referer || '';\n\n    if (ref) {\n        contextOptions = configUtils.getContextOptions(ref, contextOptions);\n    }\n\n    // Legacy options root structure\n    var assetsOptions = contextOptions.assets;\n\n    // TODO: https://github.com/sourcejs/Source/issues/142\n    assetsOptions.plugins = contextOptions.plugins;\n    assetsOptions.rendering = contextOptions.rendering;\n    assetsOptions.specInfo = contextOptions.specInfo;\n\n    res.jsonp(assetsOptions);\n});"
  },
  {
    "path": "core/auth.js",
    "content": "var everyauth = require('everyauth');\nvar fs = require('fs');\nvar ejs = require('./ejsWithHelpers.js');\nvar path = require('path');\n\nmodule.exports = function(app) {\n\t\"use strict\";\n\n\tapp.states = app.states || {};\n\tapp.states.users = app.states.users || {};\n\n\tvar currentUserId = \"\";\n\n\t// users data processing\n\t/**\n\t * @method getUser - user getter\n\t *\n\t * @param {String} id - github user id\n\t *\n\t * @returns {Object} - user - github user entity or empty object, if user is undefined\n\t */\n\tvar getUser = function(id) {\n\t\treturn app.states.users[id] || {};\n\t};\n\n\t/**\n\t * @method setUser - user setter\n\t *\n\t * @param {Object} user - github user entity\n\t *\n\t * @param {String} user.id - required user field, which is used as user templral storage key.\n\t *\n\t * @returns {Object} user - returns user parameter\n\t */\n\tvar setUser = function(user) {\n\t\tif (typeof user !== \"object\" || !user.id) return;\n\t\tapp.states.users[user.id] = user;\n\t\treturn user;\n\t};\n\n\teveryauth.everymodule.findUserById(function(id, callback) {\n\t\tcallback(null, getUser(id));\n\t});\n\n\t// TODO: separated id & secret for dev mode\n\teveryauth.github\n\t\t.appId(global.opts.github.appId)\n\t\t.appSecret(global.opts.github.appSecret)\n\t\t.findOrCreateUser(function(sess, accessToken, accessTokenExtra, ghUser) {\n\t\t\tsetUser(ghUser);\n\t\t\tcurrentUserId = ghUser.id;\n\t\t\treturn ghUser;\n\t\t})\n\t\t.redirectPath('/auth/done');\n\n\n\teveryauth.everymodule.handleLogout( function (req, res) {\n\t\tdelete req.session.authCache;\n\t\treq.logout();\n\t\tthis.redirect(res, this.logoutRedirectPath());\n\t});\n\n\t// application routes\n\tvar authTemplate = fs.readFileSync(path.join(global.pathToApp, '/core/views/auth-done.ejs'), \"utf8\");\n\tapp.get('/auth/stub', function (req, res) {\n\t\tres.send(ejs.render(authTemplate, {\n\t\t\tuser: JSON.stringify({})\n\t\t}));\n\t});\n\n\tapp.get('/auth/done', function (req, res) {\n\t\treq.session.authCache = req.session.auth;\n\n\t\tres.send(ejs.render(authTemplate, {\n\t\t\tuser: JSON.stringify(getUser(currentUserId))\n\t\t}));\n\t});\n\n\treturn {\n\t\tgetUser: getUser,\n\t\tsetUser: setUser,\n\t\teveryauth: everyauth\n\t};\n\n};"
  },
  {
    "path": "core/ejsWithHelpers.js",
    "content": "'use strict';\n\nvar ejs = require('ejs');\nvar fs = require('fs');\nvar glob = require('glob');\nvar path = require('path');\nvar _ = require('lodash');\nvar processMd = require(path.join(global.pathToApp,'core/lib/processMd'));\n\nvar originalRenderer = ejs.render;\n\nvar EJS_OPTS = ['cache', 'filename', 'sandbox', 'delimiter', 'scope', 'context', 'debug', 'compileDebug', 'client', '_with', 'rmWhitespace'\n];\n\n/**\n * Copy properties in data object that are recognized as options to an\n * options object.\n *\n * This is used for compatibility with earlier versions of EJS and Express.js.\n *\n * @memberof module:ejs-internal\n * @param {Object}  data data object\n * @param {Options} opts options object\n * @static\n */\n\nvar cpOptsInData = function (data, opts) {\n    EJS_OPTS.forEach(function (p) {\n        if (typeof data[p] !== 'undefined') {\n            opts[p] = data[p];\n        }\n    });\n};\n\nvar readFile = function (filePath, options) {\n    if (options.sandbox && path.relative(options.sandbox, filePath).substring(0, 2) === '..') {\n        throw new Error('reading files beyond sandbox is restricted, limit set to ' + options.sandbox);\n    }\n\n    return fs.readFileSync(filePath, 'utf-8');\n};\n\nvar includeMD = function(data, options){\n    return function(mdPath){\n        if (!mdPath) return '';\n\n        var origionalFilename = options.filename;\n\n        if (!origionalFilename) throw new Error('`includeMD` requires the \\'filename\\' option.');\n\n        var fileToInclude = path.extname(mdPath) === '.md' ? mdPath : mdPath + '.md';\n        var filePath = path.join(path.dirname(origionalFilename), fileToInclude);\n        var fileContents = readFile(filePath, options);\n\n        options.filename = filePath;\n\n        var processedContents = ejs.render(fileContents, data, options);\n        var html = processMd(processedContents);\n\n        // Reset filename options on return\n        options.filename = origionalFilename;\n\n        return ejs.render(html, data, options);\n    };\n};\n\nvar includeFiles = function(data, options){\n    return function(pattern){\n        if (!pattern) return '';\n\n        var filename = options.filename;\n        var output = '';\n\n        if (!filename) throw new Error('`includeFiles` requires the \\'filename\\' option.');\n\n        var filesToInclude = glob.sync(pattern, {\n            cwd: path.dirname(filename),\n            root: global.pathToApp,\n            realpath: true\n        });\n\n        filesToInclude.forEach(function(filePath){\n            _.assign(options, {\n                filename: filePath\n            });\n\n            output += ejs.render(readFile(filePath, options), data, options);\n        });\n\n        // Reset filename options on return\n        _.assign(options, {\n            filename: filename\n        });\n\n        return output;\n    };\n};\n\nejs.render = function(template, data, options){\n    data = data || {};\n    options = options || {};\n\n    // No options object -- if there are optiony names\n    // in the data, copy them to options\n    if (arguments.length === 2) {\n        cpOptsInData(data, options);\n    }\n\n    _.assign(data, {\n        includeMD: includeMD(data, options),\n        includeFiles: includeFiles(data, options)\n    });\n\n    if (global.opts.core.sandboxIncludes) {\n        _.assign(options, {\n            sandbox: global.pathToApp\n        });\n    }\n\n    return originalRenderer(template, data, options);\n};\n\n// Export modified EJS\nmodule.exports = ejs;"
  },
  {
    "path": "core/file-tree/index.js",
    "content": "'use strict';\n\nvar fs = require('fs-extra');\nvar extend = require('extend');\nvar deepExtend = require('deep-extend');\nvar path = require('path');\nvar extendTillSpec = require(path.join(global.pathToApp,'core/lib/extendTillSpec'));\nvar unflatten = require(path.join(global.pathToApp,'core/unflat'));\nvar specUtils = require(path.join(global.pathToApp,'core/lib/specUtils'));\nvar utils = require(path.join(global.pathToApp,'core/lib/utils'));\nvar coreOpts = global.opts.core;\nvar prettyHrtime = require('pretty-hrtime');\n\nvar busy = false;\n\nvar config = {\n    includedDirs: coreOpts.common.includedDirs,\n    excludedDirs: [],\n\n    // TODO: merge with `excludedDirs` in next major release.\n    excludedDirsGlobal: [],\n    cron: false,\n    cronProd: true,\n    cronRepeatTime: 60000,\n    outputFile: path.join(global.pathToApp, 'core/api/data/pages-tree.json'),\n    specsRoot: path.join(global.pathToApp, coreOpts.common.pathToUser).replace(/\\\\/g, '/'),\n    busyTimeout: 300,\n    thumbnail: 'thumbnail.png'\n};\n\n// Overwriting base options\nutils.extendOptions(config, coreOpts.fileTree);\n\nvar normalizedPathToApp = global.pathToApp.replace(/\\\\/g, '/');\n\nvar prepareExcludesRegex = function(){\n    var dirsForRegExp = '';\n    var i = 1;\n    config.excludedDirs.forEach(function (exlDir) {\n        if (i < config.excludedDirs.length) {\n            dirsForRegExp = dirsForRegExp + '^' + config.specsRoot + '\\/' + exlDir + '|';\n        } else {\n            dirsForRegExp = dirsForRegExp + '^' + config.specsRoot + '\\/' + exlDir;\n        }\n        i++;\n    });\n    return new RegExp(dirsForRegExp);\n};\n\n\n/**\n * Prepare relative path for web usage (like `/docs/spec`, `/specs/btn`) out of absolute path\n *\n * @param {String} path - absolute path to Spec directory or Spec file\n *\n * @returns {String} Return Spec file meta info (used in file-tree.json and in other places)\n */\nvar getRelativeSpecPath = module.exports.getRelativeSpecPath = function(absolutePath){\n    var relativeSpecPath;\n\n    if (absolutePath.lastIndexOf(config.specsRoot, 0) === 0) {\n        // If starts with root (specs)\n\n        // Cleaning path to specs root folder\n        relativeSpecPath = absolutePath.replace(config.specsRoot, '');\n    } else {\n        // Cleaning path for included folders\n\n        relativeSpecPath = absolutePath.replace(normalizedPathToApp, '');\n    }\n\n    return relativeSpecPath;\n};\n\nvar getSpecLocation = function(specDirOrPath){\n    // Normalize windows URL and remove trailing slash\n    var _specDirOrPath = specDirOrPath.replace(/\\\\/g, '/').replace(/\\/$/, '');\n    var isSpecPath = path.extname(_specDirOrPath) !== '';\n    var specDir;\n    var specPath;\n    var relativeSpecPath = getRelativeSpecPath(_specDirOrPath);\n\n    if (isSpecPath) {\n        relativeSpecPath = path.dirname(relativeSpecPath);\n    }\n\n    // Try to get specPath\n    if (isSpecPath) {\n        specDir = path.dirname(_specDirOrPath);\n        specPath = _specDirOrPath;\n    } else {\n        specDir = _specDirOrPath;\n        specPath = specUtils.getSpecFromDir(_specDirOrPath);\n    }\n\n    return {\n        relativeSpecPath: relativeSpecPath,\n        isSpecPath: isSpecPath,\n        specDir: specDir,\n        specPath: specPath\n    };\n};\n\n/**\n * Get spec thumbnail image path\n *\n * @param {String} specDir - absolute path to spec dir\n * @param {String} [customThumbnailPath] - override default relative thumbnail path\n *\n * @returns {String} Return web url to spec thumbnail or undefined\n */\nvar getThumbnailPath = module.exports.getThumbnailPath = function(specDir, customThumbnailPath){\n    if (!specDir) return;\n\n    var thumbnail;\n    var thumbnailPathFromSpecDir = customThumbnailPath || config.thumbnail;\n\n    var absoluteThumbNailPath = path.join(specDir, thumbnailPathFromSpecDir).replace(/\\\\/g, '/');\n    if (fs.existsSync(absoluteThumbNailPath)) {\n        thumbnail = path.join(getRelativeSpecPath(specDir), thumbnailPathFromSpecDir);\n    }\n\n    return thumbnail;\n};\n\n/**\n * Get contents of spec info file\n *\n * @param {String} specDir - absolute path to spec dir\n *\n * @returns {Object} Return spec info file object\n */\nvar getSpecInfoFile = module.exports.getSpecInfoFile = function(specDir){\n    var infoFileName = coreOpts.common.infoFile;\n    var infoJsonPath = path.join(specDir, infoFileName);\n    var infoContents = {};\n\n    if (!fs.existsSync(infoJsonPath)) return infoContents;\n\n    try {\n        infoContents = JSON.parse(fs.readFileSync(infoJsonPath, 'utf8'));\n    } catch (e) {\n        global.console.warn('Error reading ' + infoFileName + ': ' + infoJsonPath);\n\n        infoContents = {\n            error: 'Cannot parse the file',\n            path: infoJsonPath\n        };\n    }\n\n    return infoContents;\n};\n\n/**\n * Prepares Spec meta object from specs directory or Spec file path\n *\n * @param {String} specDirOrPath - path to Spec directory or Spec file\n *\n * @returns {Object} Return Spec file meta info (used in file-tree.json and in other places)\n */\nvar getSpecMeta = module.exports.getSpecMeta = function(specDirOrPath){\n    var page = {};\n\n    // Check if arg is provided and path exists\n    if ( !(specDirOrPath && fs.existsSync(specDirOrPath))) return page;\n\n    var specLocation = getSpecLocation(specDirOrPath);\n    var specPath = specLocation.specPath;\n    var specDir = specLocation.specDir;\n    var relativeSpecPath = specLocation.relativeSpecPath;\n\n    // Remove first slash for ID\n    page.id = relativeSpecPath.substring(1);\n    page.url = relativeSpecPath;\n\n    // If we have Spec, get additional meta\n    if (specPath) {\n        var fileStats = fs.statSync(specPath);\n        var targetFile = path.basename(specPath);\n        var d = new Date(fileStats.mtime);\n\n        page.lastmod = [d.getDate(), d.getMonth() + 1, d.getFullYear()].join('.') || '';\n        page.lastmodSec = Date.parse(fileStats.mtime) || '';\n        page.fileName = targetFile || '';\n    }\n\n    var specInfo = getSpecInfoFile(specDir);\n    page.thumbnail = getThumbnailPath(specDir, specInfo.thumbnailPath) || false;\n\n    // Apply info file contents on top\n    deepExtend(page, specInfo);\n\n    return page;\n};\n\nvar fileTree = function (workingDir) {\n    var processingDir = workingDir;\n    var outputJSON = {};\n\n    // Allow to run app without existing specsRoot\n    if (!fs.existsSync(workingDir) && workingDir === config.specsRoot) {\n        global.log.warn('Running SourceJS without user dir. This set-up should be used only for running tests.');\n        processingDir = global.pathToApp;\n    }\n\n    var dirContent = fs.readdirSync(processingDir);\n    var excludes = prepareExcludesRegex();\n\n    // Adding paths to files in array\n    for (var i = 0; dirContent.length > i; i++) {\n        dirContent[i] = path.join(processingDir, dirContent[i].replace(/\\\\/g, '/'));\n    }\n\n    //on first call we add includedDirs\n    if (processingDir === config.specsRoot) {\n        config.includedDirs.map(function (includedDir) {\n            dirContent.push(path.join(normalizedPathToApp, includedDir));\n        });\n    }\n\n    dirContent.forEach(function(pathToFile) {\n        // Path is excluded\n        if (excludes.test(processingDir)) return;\n\n        var infoFileName = coreOpts.common.infoFile;\n        var targetFile = path.basename(pathToFile);\n\n        // Normalizing path for windows\n        pathToFile = path.normalize(pathToFile).replace(/\\\\/g, '/');\n\n        var fileStats = fs.statSync(pathToFile);\n\n        if (fileStats.isDirectory()) {\n            if (config.excludedDirsGlobal.indexOf(targetFile) > -1) return;\n\n            // Going deeper\n            var childObj = fileTree(pathToFile);\n            if (Object.getOwnPropertyNames(childObj).length !== 0) {\n                outputJSON[targetFile] = extend(outputJSON[targetFile], childObj);\n            }\n\n        } else if (targetFile.toLowerCase() === infoFileName.toLowerCase()) {\n            outputJSON['specFile'] = getSpecMeta(processingDir);\n        }\n    });\n\n    return outputJSON;\n};\n\n// function for write file tree json\nvar writeDataFile = function (data, callback) {\n    var outputFile = config.outputFile;\n    callback = typeof callback === 'function' ? callback : function(){};\n\n    fs.outputFile(outputFile, JSON.stringify(data, null, 4), function (err) {\n        if (err) {\n            global.console.warn('Error writing file tree: ', err);\n            callback(err);\n            return;\n        }\n\n        global.log.trace('Pages tree JSON saved to ' + outputFile);\n\n        callback();\n    });\n};\n\n// function for updating file tree\nvar updateFileTree = module.exports.updateFileTree = function (data, unflattenData, callback) {\n    if (busy) {\n        setTimeout(function(){\n            updateFileTree(data, unflattenData, callback);\n        }, config.busyTimeout);\n    } else {\n        busy = true;\n\n        var prevData = {};\n        var dataStoragePath = path.join(global.pathToApp, coreOpts.api.specsData);\n        callback = typeof callback === 'function' ? callback : function(){};\n\n        if (unflattenData) {\n            data = unflatten(data, { delimiter: '/', overwrite: 'root' });\n        }\n\n        try {\n            prevData = fs.readJsonFileSync(dataStoragePath);\n        } catch (e) {\n            global.log.trace('Reading initial data error: ', e);\n            global.log.debug('Extending from empty object, as we do not have initial data');\n        }\n\n        var dataToWrite = extendTillSpec(prevData, data);\n\n        writeDataFile(dataToWrite, function(){\n            callback();\n\n            setTimeout(function(){\n                busy = false;\n            }, config.busyTimeout);\n        });\n    }\n};\n\n// function for deleting object from file tree\nvar deleteFromFileTree = module.exports.deleteFromFileTree = function (specID) {\n    if (busy) {\n        setTimeout(function(){\n            deleteFromFileTree(specID);\n        }, config.busyTimeout);\n    } else {\n        fs.readJSON(config.outputFile, function (err, data) {\n            if (err) return;\n            busy = true;\n\n            var pathSplit = specID.split('/');\n\n            var processPath = function (pathArr, obj) {\n                var pathArrQueue = pathArr.slice(0); // Arr copy\n                var currentItem = pathArrQueue.shift();\n\n                if (currentItem !== '' && obj[currentItem]) {\n                    if (pathArrQueue.length === 0) {\n                        delete obj[currentItem];\n                    }\n\n                    if (pathArrQueue.length !== 0 && obj[currentItem].toString() === '[object Object]') {\n                        obj[currentItem] = processPath(pathArrQueue, obj[currentItem]);\n                    }\n                }\n\n                return obj;\n            };\n\n            var processedData = processPath(pathSplit, data);\n\n            writeDataFile(processedData, function () {\n                global.log.trace('Deleted object from file tree: ', specID);\n\n                setTimeout(function(){\n                    busy = false;\n                }, config.busyTimeout);\n            });\n        });\n    }\n};\n\n// function for update file tree json\nvar scan = module.exports.scan = function (callback) {\n    if (busy) {\n        setTimeout(function(){\n            scan(callback);\n        }, config.busyTimeout);\n    } else {\n        var start = process.hrtime();\n\n        callback = typeof callback === 'function' ? callback : function () {};\n\n        writeDataFile(fileTree(config.specsRoot), function(){\n            callback();\n\n            var end = process.hrtime(start);\n            global.log.debug('Full file-tree scan took: ', prettyHrtime(end));\n\n            setTimeout(function(){\n                busy = false;\n            }, config.busyTimeout);\n        });\n    }\n};\n\n// Running writeDataFile by cron\nif (config.cron || (global.MODE === 'production' && config.cronProd)) {\n    setInterval(function () {\n        scan();\n    }, config.cronRepeatTime);\n}"
  },
  {
    "path": "core/headerFooter.js",
    "content": "'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\n\nexports.getHeaderAndFooter = function () {\n    var defaultTemplatePath = path.join(global.pathToApp, 'assets/templates');\n    var userTemplatePath = path.join(global.app.get('user'), 'assets/templates');\n    var headerFile = 'header.inc.html';\n    var footerFile = 'footer.inc.html';\n\n    var output = {};\n\n    var userHeaderTplPath = path.join(userTemplatePath, headerFile);\n    output.headerPath = fs.existsSync(userHeaderTplPath) ? userHeaderTplPath : path.join(defaultTemplatePath, headerFile);\n\n    var userFooterTplPath = path.join(userTemplatePath, footerFile);\n    output.footerPath = fs.existsSync(userFooterTplPath) ? userFooterTplPath : path.join(defaultTemplatePath, footerFile);\n\n    output.header = fs.readFileSync(output.headerPath, 'utf-8');\n    output.footer = fs.readFileSync(output.footerPath, 'utf-8');\n\n    return output;\n};"
  },
  {
    "path": "core/html-tree/html-parser/index.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar async = require('async');\nvar ParseData = require(path.join(global.pathToApp,'core/lib/parseData'));\nvar phantom = require('phantomjs');\nvar unflatten = require(path.join(global.pathToApp,'core/unflat'));\nvar childProcess = require('child_process');\nvar htmlTree = require(path.join(global.pathToApp,'core/html-tree'));\nvar utils = require(path.join(global.pathToApp,'core/lib/utils'));\n\nvar processFlagNotExec = true;\n\nvar config = {\n    enabled: true,\n\n    // Run HTML parser on app start\n    onStart: false,\n    cron: false,\n    cronProd: true,\n    cronRepeatTime: 600000,\n\n    // PhantomJS retry limit\n    errorLimit: 2,\n    asyncPhantomCallLimit: 5,\n\n    specsFilter: {\n        filterOut: {\n            cats: ['docs'],\n            tags: ['parse-problems']\n        }\n    },\n\n    // Path to HTML data otput\n    pathToSpecs: path.join(global.pathToApp, global.opts.core.api.specsData)\n};\n\n// Overwriting base options\nif (global.opts.core.parseHTML) utils.extendOptions(config, global.opts.core.parseHTML); // Legacy support\nif (global.opts.plugins && global.opts.plugins.htmlParser) utils.extendOptions(config, global.opts.plugins.htmlParser);\n\n/**\n * Get list of specs for parsing with PhantomJS\n *\n * @returns {Array} Returns array with spec URLs\n */\nvar getSpecsList = function() {\n    var parseSpecs = new ParseData({\n        scope: 'specs',\n        path: require.resolve(config.pathToSpecs)\n    });\n\n    var specs = parseSpecs.getFilteredData(config.specsFilter, true);\n\n    // Preparing data for specs iteration\n    specs = specs.map(function(item){\n        return item.url.substring(1);\n    });\n\n    return specs;\n};\n\n/**\n * PhantomJS async runner, calls writeDataFile on finish\n *\n * @param {Array} specs - array with URL list, that will be passed to PhantomJS\n *\n * @param {Function} [callback] - callback function\n * @param {Object} callback.err - Error object\n * @param {Object} callback.outputData - Passes output data to callback\n */\nvar processSpecs = module.exports.processSpecs = function(specs, callback){\n    callback = typeof callback === 'function' ? callback : function(){};\n\n    if (!config.enabled) {\n        callback('HTML parser disabled.');\n\n        return;\n    }\n\n    if (processFlagNotExec) {\n        global.log.info('HTML API update started');\n\n        var _specs = specs || getSpecsList();\n        var specsLeft = _specs.slice(0);\n        var PhantomPath = phantom.path;\n        var outputHTML = {};\n        var errorCounter = {};\n        var specLength = _specs.length;\n        var doneCounter = 0;\n        var phExecCommand = PhantomPath + \" \" + path.join(global.pathToApp, 'core/html-tree/html-parser/phantomRunner.js');\n\n        processFlagNotExec = false;\n\n        global.log.trace('Processing ' + specLength + ' specs.');\n\n        async.mapLimit(_specs, config.asyncPhantomCallLimit, function (spec, next) {\n            var n = _specs.indexOf(spec) + 1;\n\n            global.log.trace('Starts...' + n, spec);\n\n            childProcess.exec(phExecCommand + \" \" + spec + \" \" + global.opts.core.server.port, function (error, stdout, stderr) {\n                handler(error, stdout, stderr, spec);\n                next();\n            });\n        });\n\n        var handler = function(error, stdout, stderr, spec) {\n            if (error) {\n                if (typeof errorCounter[spec] !== 'number') {\n                     errorCounter[spec] = 0;\n                }\n\n                errorCounter[spec]++;\n\n                // If limit is not reached, try again\n                if (errorCounter[spec] <= config.errorLimit) {\n                    global.log.debug('Rerun', spec);\n\n                    childProcess.exec(phExecCommand + \" \" + spec, function (error, stdout, stderr) {\n                        handler(error, stdout, stderr, spec, writeCallback);\n                    });\n                    return;\n                }\n\n                global.log.error('Exec error on spec ' + spec + ': '+ error);\n                global.log.debug('Error info: ', JSON.stringify({\n                    spec: spec,\n                    error: error,\n                    stdount: stdout,\n                    stderr: stderr\n                }));\n            } else {\n                var parsedStdout = [];\n\n                try {\n                    parsedStdout = JSON.parse(stdout);\n                } catch(e) {\n                    global.log.debug('HTML Parser stdout parse error: ', e, stdout);\n                    global.log.debug('Error from Phantom parser: ', stdout);\n                    parsedStdout = {\n                        message: \"Stdout parse error\"\n                    };\n                }\n\n                global.log.debug('Spec done: ', JSON.stringify({\n                    spec: spec,\n                    error: error,\n                    stderr: stderr\n                }));\n\n                // Writing contents to common obj\n                outputHTML[spec+'/specFile/contents'] = parsedStdout.contents;\n                outputHTML[spec+'/specFile/headResources'] = parsedStdout.headResources;\n                outputHTML[spec+'/specFile/bodyResources'] = parsedStdout.bodyResources;\n            }\n\n            global.log.debug((doneCounter/specLength*100).toFixed(2),'%...Done', spec);\n\n            // Logging specs queen\n            specsLeft.splice(specsLeft.indexOf(spec), 1);\n            if (specsLeft.length < 5 && specsLeft.length !== 0) {\n                global.log.trace('Specs queen', specsLeft);\n            }\n\n            doneCounter++;\n\n            // We handled all requested specs\n            if (doneCounter === specLength) {\n                var outputData = unflatten(outputHTML, { delimiter: '/', overwrite: 'root' });\n\n                // Callback is passed to writeDataFile\n                var writeCallback = function() {\n                    global.log.info('HTML API successfully updated');\n                    processFlagNotExec = true;\n\n                    callback(null, outputData);\n                };\n\n                htmlTree.writeDataFile(outputData, true, false, writeCallback);\n            }\n        };\n    }\n};\n\nif (config.enabled) {\n    // Running processSpecs by cron\n    if (config.cron || (global.MODE === 'production' && config.cronProd)) {\n        setInterval(function () {\n            processSpecs();\n        }, config.cronRepeatTime);\n    }\n\n    if (config.onStart) {\n        setTimeout(processSpecs, 100);\n    }\n}"
  },
  {
    "path": "core/html-tree/html-parser/phantomRunner.js",
    "content": "/*\n *\n * This script is executed in separate process from main app and runs in PhantomJS context\n *\n * */\n\n'use strict';\n\n/* global phantom: true */\nvar page = require('webpage').create();\nvar system = require('system');\n\n// arguments from node query\nvar url = system.args[1];\nvar port = system.args[2];\n\npage.onResourceReceived = function(response) {\n    if (response.id === 1 && response.status === 404 || response.status === 500) {\n        console.log(JSON.stringify({\n                \"error\": \"Network error status \"+ response.status,\n                \"url\": url\n            })\n        );\n        phantom.exit();\n    }\n};\n\npage.onConsoleMessage = function(msg) {\n    //console.log('-- webkit console: ' + msg);\n};\n\npage.open('http://127.0.0.1:' + port + '/' + url, function (status) {\n    if (status !== 'success') {\n        console.log(JSON.stringify({\n                \"error\": \"Error loading page.\",\n                \"url\": url\n            })\n        );\n\n        phantom.exit();\n    }\n\n    setTimeout(function () {\n        console.log(JSON.stringify([{\n                \"error\": \"Too long execution time.\",\n                \"url\": url\n            }])\n        );\n        phantom.exit();\n    }, 5000);\n});\n\npage.onCallback = function (data) {\n    if (data.message) {\n        var code = page.evaluate(function (url) {\n            var output = {};\n\n            $.ajax({\n                url: '/source/assets/js/modules/sectionsParser.js',\n                dataType: \"script\",\n                async: false,\n                success: function(){\n                    var parser = new SourceGetSections();\n\n                    output = parser.getSpecFull();\n                }\n            });\n\n            return output;\n        }, url);\n\n        // TODO: make reponse in {{ ... }} to parse only relevant part\n        // Returns stdout, that is then parsed from main app\n        console.log(JSON.stringify(code));\n        phantom.exit();\n\n    } else {\n        console.log(\"No callback received\", JSON.stringify({\n                \"url\": url\n            })\n        );\n        phantom.exit();\n    }\n};\n\npage.onError = function(msg, trace) {\n    var log = {\n        \"error\": \"Error onpage\",\n        \"message\": msg,\n        \"file\": trace[0],\n        \"line\": trace[0].line,\n        \"function\": trace[0].function\n    };\n\n    console.log('Phantom-runner error: ', JSON.stringify(log, null, 4));\n};"
  },
  {
    "path": "core/html-tree/index.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar fs = require('fs-extra');\n\nvar extendTillSpec = require(path.join(global.pathToApp,'core/lib/extendTillSpec'));\nvar logger = require(path.join(global.pathToApp,'core/logger'));\nvar utils = require(path.join(global.pathToApp,'core/lib/utils'));\nvar flattenTillSpec = require(path.join(global.pathToApp,'core/lib/flattenTillSpec'));\n\nvar config = {};\n\n// Overwriting base options\nif (global.opts.core.htmlTree) utils.extendOptions(config, global.opts.core.htmlTree);\n\n// Custom API logging config\nvar apiLog = (function(){\n    logger.prepareLogDir('log/api');\n    logger.addAppenders([\n        {\n            \"type\": \"clustered\",\n            \"appenders\": [\n                {\n                    \"type\": \"file\",\n                    \"filename\": path.join(global.pathToApp, 'log/api/api.log')\n                },\n                {\n                    \"type\": \"logLevelFilter\",\n                    \"level\": \"ERROR\",\n                    \"appender\": {\n                        \"type\": \"file\",\n                        \"filename\": path.join(global.pathToApp, 'log/api/errors.log')\n                    }\n                },\n                {\n                    \"type\": \"logLevelFilter\",\n                    \"level\": \"DEBUG\",\n                    \"appender\": {\n                        \"type\": \"file\",\n                        \"filename\": path.join(global.pathToApp, 'log/api/debug.log')\n                    }\n                }\n            ],\n            category: 'api'\n        }\n    ]);\n\n    return logger.log4js.getLogger('api');\n})();\n\n/**\n * Remove all objects from data, that has lower priority (doesn't have forcedSave flag)\n *\n * @param {Object} prevData - data to check more priority specs from\n * @param {Object} data - data that will be merged onto prevData and will be processed with this func\n *\n * @returns {Object} Returns processed data, with removed low-priority specs\n */\nvar excludeLowOverridings = function(prevData, data) {\n    var checkObj = flattenTillSpec(prevData);\n\n    var processData = function(obj, currentNesting){\n        Object.keys(obj).forEach(function(key){\n            var nesting = currentNesting ? currentNesting + '/' + key : key;\n\n            if (obj[key].toString() === '[object Object]') {\n\n                if (!obj[key].specFile) {\n                    // Go deeper\n                    obj[key] = processData(obj[key], nesting);\n                } else {\n                    // Check prevData on force flag\n                    var checkHigherPrioritySpec = !!(checkObj[nesting] && checkObj[nesting].forcedSave);\n\n                    if (checkHigherPrioritySpec && !obj[key].specFile.forcedSave) {\n                        // Delete low priority override\n                        delete obj[key];\n                    }\n                }\n            }\n        });\n\n        return obj;\n    };\n\n    return processData(data);\n};\n\n/**\n * Write gathered HTML data to file system\n *\n * @param {Object} data - data object with specs list, that will be stringified and written to FS\n * @param {Boolean} [extend] - set true, to merge incoming data object with last written data\n * @param {String} [dataPath] - custom data storage path\n *\n * @param {Function} [callback] - callback function on file write\n * @param {Object} callback.err - Passes error if it exists\n * @param {Object} callback.outputData - Passes output data to callback\n */\nvar writeDataFile = module.exports.writeDataFile = function(data, extend, dataPath, callback) {\n    if (data) {\n        var dataStoragePath = dataPath || path.join(global.pathToApp, global.opts.core.api.htmlData);\n\n        var JSONformat = null;\n\n        if (global.MODE === 'development') JSONformat = 4;\n\n        if (extend) {\n            //TODO: add queen, for waiting till previous processing stops working before we update with extend\n\n            var prevData = {};\n\n            try {\n                prevData = fs.readJsonFileSync(dataStoragePath);\n            } catch (e) {\n                apiLog.trace('Reading initial data error: ', e);\n                apiLog.debug('Extending from empty object, as we do not have initial data');\n            }\n\n            // Exclude from data all low-priority overridings\n            data = excludeLowOverridings(prevData, data);\n\n            // Extend final data\n            data = extendTillSpec(prevData, data);\n        }\n\n        // Preparing path for data write\n        try {\n            fs.mkdirpSync(path.dirname(dataStoragePath));\n        } catch (e) {\n            if (e.code !== 'EEXIST') {\n                apiLog.warn(\"Could not set up HTML data directory, error: \", e);\n\n                if (typeof callback === 'function') callback('ERROR: error creating data directory', null);\n            }\n        }\n\n        fs.writeFile(dataStoragePath, JSON.stringify(data, null, JSONformat), function (err) {\n            if (err) {\n                var message = 'ERROR: updated file write error';\n\n                apiLog.warn('HTML data write fail, write file error', err);\n\n                if (global.MODE === 'development') message = message + ': ' + err;\n\n                if (typeof callback === 'function') callback(message, null);\n            } else {\n                apiLog.debug('parseHTML data been written.');\n\n                // After all specs were both written in file and saved in memory.\n                if (typeof callback === 'function') callback(null, data);\n            }\n        });\n    } else {\n        apiLog.warn('HTML data write fail, no data provided for writeDataFile');\n        if (typeof callback === 'function') callback('ERROR: no data provided', null);\n    }\n};\n\n/**\n * Delete object from HTML data storage\n *\n * @param {String} dataPath - path to data object\n * @param {String} removeID - object ID for removal\n * @param {Function} [callback] - callback function on file write\n */\nmodule.exports.deleteFromDataFile = function(dataPath, removeID, callback) {\n    if (removeID) {\n        var data;\n        var pathSplit = removeID.split('/');\n\n        try {\n            data = fs.readJsonFileSync(dataPath);\n        } catch (e) {}\n\n        if (data) {\n            var processPath = function(pathArr, obj){\n                var pathArrQueue = pathArr.slice(0); // Arr copy\n                var currentItem = pathArrQueue.shift();\n\n                if (currentItem !== '' && obj[currentItem]) {\n                    if (pathArrQueue.length === 0) {\n                        delete obj[currentItem];\n                    }\n\n                    if (pathArrQueue.length !== 0 && obj[currentItem].toString() === '[object Object]') {\n                        obj[currentItem] = processPath(pathArrQueue, obj[currentItem]);\n                    }\n                }\n\n                return obj;\n            };\n\n            var processedData = processPath(pathSplit, data);\n\n            writeDataFile(processedData, false, dataPath, function(err, finalData){\n                if (err || !finalData) {\n                    if (typeof callback === 'function') callback(err, null);\n                } else {\n                    if (typeof callback === 'function') callback(null, finalData);\n                }\n            });\n        } else {\n            var errorMsg = 'No initial HTML data to delete from';\n\n            apiLog.warn(errorMsg);\n            if (typeof callback === 'function') callback(errorMsg, null);\n        }\n    } else {\n        if (typeof callback === 'function') callback('No ID provided', null);\n    }\n};"
  },
  {
    "path": "core/lib/configUtils.js",
    "content": "'use strict';\n\nvar fs = require('fs-extra');\nvar path = require('path');\nvar finder = require('fs-finder');\nvar nodeUtils = require('util');\nvar url = require('url');\nvar utils = require(path.join(global.pathToApp, 'core/lib/utils'));\nvar pathResolver = require(path.join(global.pathToApp, 'core/lib/pathResolver'));\nvar specUtils = require(path.join(global.pathToApp, 'core/lib/specUtils'));\n\nvar coreOptionsInContextWarnOnce = [];\n\n/**\n * Searches sourcejs-plugins in node_modules of specified folder\n *\n * @param {String} pathToUser - path to user folder, where to check node_modules\n *\n * @returns {Object} Returns configuration object with listed sourcejs-plugins\n */\nmodule.exports.prepareClientNpmPlugins = function(pathToUser) {\n    var pathToModules = path.join(pathToUser, 'node_modules');\n    var clientNpmPlugins = {};\n    clientNpmPlugins.assets = {};\n    clientNpmPlugins.assets.npmPluginsEnabled = {};\n\n    if (fs.existsSync(pathToModules)) {\n        var allModules = fs.readdirSync(pathToModules);\n        allModules.map(function (module) {\n            // Check if module has right namespace AND assets/index.js file\n            if (module.lastIndexOf('sourcejs-', 0) === 0 && fs.existsSync(path.join(pathToModules, module, 'assets/index.js'))) {\n                clientNpmPlugins.assets.npmPluginsEnabled[module] = true;\n            }\n        });\n    }\n\n    return clientNpmPlugins;\n};\n\n/**\n * Search up the tree for context options paths\n *\n * @param {String} startPath - path to dir from where to start searching\n *\n * @returns {Array} Returns list of paths with found options files\n */\nvar getContextOptionsList = module.exports.getContextOptionsList = function(startPath) {\n    var checkPath = fs.existsSync(startPath);\n    if (!checkPath) return [];\n\n    var searchStopPath = global.app.get('user');\n    var fileToFind = path.sep + global.opts.core.common.contextOptionsFile;\n\n    // Skip if start path is behind stop path\n    if ((new RegExp(/^..\\//)).test(path.relative(searchStopPath, startPath).replace(/\\\\/g, '/'))) return [];\n\n    return finder.in(startPath).lookUp(searchStopPath).findFiles(fileToFind);\n};\n\n/**\n * Process options view path\n *\n * @param {Object} options - options object to process\n * @param {String} [context] - path to context folder for resolving $(context)\n *\n * @returns {Object} Returns processed options object or undefined\n */\nvar processOptionsViewPaths = module.exports.processOptionsViewPaths = function(options, context) {\n    if (!options) return;\n\n    var updateArr = function(optItem){\n        return optItem.map(function (item) {\n            return pathResolver.resolve(item, context);\n        });\n    };\n\n    for (var opt in options.rendering.views) {\n        if (options.rendering.views.hasOwnProperty(opt)) {\n            var optItem = options.rendering.views[opt];\n\n            if (nodeUtils.isArray(optItem)) {\n                options.rendering.views[opt] = updateArr(optItem);\n            }\n        }\n    }\n\n    return options;\n};\n\n/**\n * Process options object\n *\n * @param {String} optionsPath - path to options file\n * @param {Object} [optionsObj] - options file content\n *\n * @returns {Object} Returns processed options object\n */\nvar processOptions = module.exports.processOptions = function(optionsPath, optionsObj) {\n    var optionsDir = path.dirname(optionsPath);\n    var options = optionsObj || utils.requireUncached(optionsPath);\n\n    if (options.rendering && options.rendering.views) processOptionsViewPaths(options, optionsDir);\n\n    return options;\n};\n\nvar extendContextOptions = module.exports.extendContextOptions = function(defaultOptions, newOptionsPath, newOptionsObj) {\n    var output = defaultOptions || {};\n\n    var contextOptionsItem = processOptions(newOptionsPath, newOptionsObj);\n\n    if (contextOptionsItem.core && coreOptionsInContextWarnOnce.indexOf(newOptionsPath) === -1) {\n        global.log.warn('Core options could not be overridden from context options, check ' + newOptionsPath);\n\n        coreOptionsInContextWarnOnce.push(newOptionsPath);\n    }\n\n    // Override default options with context options items\n    if (output.assets) utils.extendOptions(output.assets, contextOptionsItem.assets);\n    if (output.rendering) utils.extendOptions(output.rendering, contextOptionsItem.rendering);\n    if (output.plugins) utils.extendOptions(output.plugins, contextOptionsItem.plugins);\n\n    return output;\n};\n\n/**\n * Get merged options object, with merged context level options\n *\n * @param {String} startPath - path from where to start searching for context options (ends at user path)\n * @param {Object} [defaultOptions] - SourceJS options object (global.opts)\n *\n * @returns {Object} Returns a merged options object\n */\nvar getMergedOptions = module.exports.getMergedOptions = function(startPath, defaultOptions) {\n    var _defaultOptions = defaultOptions || {};\n    var output = utils.extendOptions({}, _defaultOptions);\n    var optionsArr = getContextOptionsList(startPath);\n\n    // Normalize  windows paths\n    optionsArr = optionsArr.map(function(item){\n        return item.replace(/\\\\/g, '/');\n    });\n\n    optionsArr = optionsArr.sort(function (a, b) {\n        var al = a.split('/').length;\n        var bl = b.split('/').length;\n\n        if (al > bl) return 1;\n        if (al < bl) return -1;\n\n        return 0;\n    });\n\n    optionsArr.forEach(function(newOptionsPath){\n        extendContextOptions(output, newOptionsPath);\n    });\n\n    return output;\n};\n\n/**\n * Get context options using ref URL\n *\n * @param {String} refUrl - referer URL\n * @param {Object} [defaultOpts] - default options object to merge in\n *\n * @returns {Object} Returns a context options object\n */\nmodule.exports.getContextOptions = function(refUrl, defaultOpts) {\n    var _defaultOpts = defaultOpts || global.opts;\n    var contextOptionsEnabled = global.opts.core.common.contextOptions;\n\n    var parsedRefUrl = url.parse(refUrl);\n    var refUrlPath = parsedRefUrl.pathname;\n    var specDir = specUtils.getFullPathToSpec(refUrlPath);\n\n    var contextOptions = contextOptionsEnabled ? getMergedOptions(specDir, _defaultOpts) : _defaultOpts;\n\n    var infoFilePath = path.join(specDir, global.opts.core.common.infoFile);\n    var infoOptionsKey = global.opts.core.common.infoFileOptions;\n\n    // Extent context options object with info.json contents\n    contextOptions.specInfo = fs.readJsonFileSync(infoFilePath, {throws: false});\n\n    // Override local options\n    if (contextOptionsEnabled && contextOptions.specInfo && contextOptions.specInfo[infoOptionsKey]) {\n        extendContextOptions(contextOptions, infoFilePath, contextOptions.specInfo[infoOptionsKey]);\n    }\n\n    return contextOptions;\n};"
  },
  {
    "path": "core/lib/createLink.js",
    "content": "// Modified lib from Bower\n\n'use strict';\n\nvar fs = require('fs-extra');\nvar path = require('path');\nvar Q = require('q');\n\nvar isWin = process.platform === 'win32';\n\nfunction createLink(src, dst, type) {\n    var dstDir = path.dirname(dst);\n\n    // Create directory\n    return Q.nfcall(fs.mkdirp, dstDir)\n    // Check if source exists\n    .then(function () {\n        return Q.nfcall(fs.stat, src)\n        .fail(function (error) {\n            if (error.code === 'ENOENT') {\n                console.log('Failed to create link to ' + path.basename(src), 'ENOENT', {\n                    details: src + ' does not exist or points to a non-existent file'\n                });\n            }\n\n            throw error;\n        });\n    })\n    // Create symlink\n    .then(function (stat) {\n        type = type || (stat.isDirectory() ? 'dir' : 'file');\n\n        return Q.nfcall(fs.symlink, src, dst, type)\n        .fail(function (err) {\n            if (!isWin || err.code !== 'EPERM') {\n                throw err;\n            }\n\n            // Try with type \"junction\" on Windows\n            // Junctions behave equally to true symlinks and can be created in\n            // non elevated terminal (well, not always..)\n            return Q.nfcall(fs.symlink, src, dst, 'junction')\n            .fail(function (err) {\n                console.log('Unable to create link to ' + path.basename(src), err.code, {\n                    details: err.message.trim() + '\\n\\nTry running this command in an elevated terminal (run as root/administrator).'\n                });\n            });\n        });\n    });\n}\n\nmodule.exports = createLink;"
  },
  {
    "path": "core/lib/extendTillSpec.js",
    "content": "'use strict';\n\n/**\n * Extend object till \"specFile\" key\n *\n * @param {Object} target - Target data that will be extended\n * @param {Object} source - Source data to extend with\n *\n * @returns {Object} Return extended data\n */\nvar extendTillSpec = module.exports = function(target, extender) {\n    for (var key in extender) {\n        if (extender.hasOwnProperty(key)) {\n\n            if (!(key in extender)) continue;\n\n            var src = target[key];\n            var val = extender[key];\n\n            if (val === target) continue;\n\n            if (typeof val !== 'object' || key === \"specFile\" || val === null) {\n                target[key] = val;\n                continue;\n            }\n\n            if (typeof src !== 'object' || src === null) {\n                target[key] = extendTillSpec({}, val);\n                continue;\n            }\n\n            target[key] = extendTillSpec(src, val);\n        }\n    }\n\n    return target;\n};"
  },
  {
    "path": "core/lib/flattenTillSpec.js",
    "content": "'use strict';\n\n/**\n * Flatten given data\n *\n * @param {Object} [data] - Data object wil all specs/html\n *\n * @returns {Object} Return flattened data\n */\nmodule.exports = function(data) {\n    var delimiter = '/';\n    var output = {};\n    var _data = data;\n\n    var step = function(object, prev) {\n        Object.keys(object).forEach(function (key) {\n            var value = object[key];\n\n            var isSpecFile = key === 'specFile';\n\n            var keyAppend = isSpecFile ? '' : delimiter + key;\n            var newKey = prev ? prev + keyAppend : key;\n\n            if (typeof value === 'object' && !isSpecFile) {\n                return step(value, newKey);\n            }\n\n            output[newKey] = value;\n        });\n    };\n    step(_data);\n\n    return output;\n};"
  },
  {
    "path": "core/lib/parseData.js",
    "content": "'use strict';\n\nvar fs = require('fs');\nvar util = require('util');\nvar path = require('path');\nvar flattenTillSpec = require(path.join(global.pathToApp, 'core/lib/flattenTillSpec'));\n\n/**\n * ParseData Constructor for working with Specs File tree and HTML tree\n *\n * @class ParseData\n * @constructor\n * @param {Object} config\n * @param {String} config.scope - data scope (specs/html)\n * @param {String} config.path - path do data\n */\nfunction ParseData(config) {\n    this.data = {};\n    this.scope = config.scope;\n    this.dataPath = config.path;\n}\n\n/**\n * Update data and return data status\n *\n * @param {Boolean} [withCategories] - get categories info either\n *\n * @returns {Boolean} Return data status\n */\nParseData.prototype.updateData = function(withCategories) {\n    try {\n        this.data = JSON.parse(fs.readFileSync(this.dataPath, 'utf8'));\n    } catch(e) {\n        return false;\n    }\n\n    this.data = flattenTillSpec(this.data);\n\n    if (this.scope === 'specs' && !withCategories) {\n        this.removeCatalogueDescription();\n    }\n\n    return true;\n};\n\n/**\n * Removing catalogue description objects\n *\n * @param {Object} [data] - Data object wil all specs/html\n *\n * @returns {Object} Return data without catalogue description\n */\nParseData.prototype.removeCatalogueDescription = function(data) {\n    var output = {};\n    var _data = data || this.data;\n\n    Object.keys(_data).forEach(function (key) {\n        var value = _data[key];\n\n        if (value['role'] === 'navigation') return;\n\n        output[key] = value;\n    });\n\n    this.data = output;\n    return output;\n};\n\n/**\n * Get all data\n *\n * @param {Boolean} [withCategories] - get categories info either\n *\n * @returns {Object} Return flat all data object with all items\n */\nParseData.prototype.getAll = function(withCategories) {\n    return this.updateData(withCategories) ? this.data : undefined;\n};\n\n/**\n * Get raw\n *\n * @returns {Object} Return nested, raw data object with all items\n */\nParseData.prototype.getRaw = function() {\n    try {\n        return JSON.parse(fs.readFileSync(this.dataPath, 'utf8'));\n    } catch(e) {\n        console.warn('Parse Data: Api data of ' + this.scope + ' does not exist, please update HTML API data.');\n        console.warn('Error: ', e);\n        return undefined;\n    }\n};\n\n/**\n * Filter placeholder function\n *\n * @param {Array} filterArr - Array with filtering params\n * @param {Function} filterFunc - callback function\n *      example: filterFunc(filterItem) — accepts data item key for param\n *\n * @returns {Boolean} Return boolean with filter result\n */\nParseData.prototype._filter = function(filterArr, filterFunc){\n    var passesFilter = true;\n\n    if (util.isArray(filterArr)) {\n        filterArr.map(function(filterItem) {\n\n            if (!filterFunc(filterItem)) passesFilter = false;\n\n        });\n    }\n\n    return passesFilter;\n};\n\n/**\n * Filtering by fields\n *\n * @param {Object} value - One item data, simple object without nesting\n * @param {Boolean} inOut - for filtering and filteringOut\n * @param {Array} filterArr - Array with filtering params\n *\n * @returns {Boolean} Return boolean with final filter result\n */\nParseData.prototype.filterFields = function(value, inOut, filterArr) {\n    return this._filter(filterArr, function(filterItem) {\n        return Boolean(value[filterItem]) === inOut;\n    });\n};\n\n/**\n * Filtering by tags\n *\n * @param {Object} value - One item data, simple object without nesting\n * @param {Boolean} inOut - for filtering and filteringOut\n * @param {Array} filterArr - Array with filtering params\n *\n * @returns {Boolean} Return boolean with final filter result\n */\nParseData.prototype.filterTags = function(value, inOut, filterArr) {\n    return this._filter(filterArr, function(filterItem) {\n        if(!util.isArray(value.tag)) {\n            return false === inOut;\n        } else {\n            return (value.tag.indexOf(filterItem) > -1) === inOut;\n        }\n    });\n};\n\n/**\n * Filtering by category\n *\n * @param {Object} value - One item data, simple object without nesting\n * @param {String} key - Current key of looped object\n * @param {Boolean} inOut - for filtering and filteringOut\n * @param {Array} filterArr - Array with filtering params\n *\n * @returns {Boolean} Return boolean with final filter result\n */\nParseData.prototype.filterCats = function(value, key, inOut, filterArr) {\n    return this._filter(filterArr, function(filterItem) {\n        return Boolean(key.lastIndexOf(filterItem, 0)) !== inOut;\n    });\n};\n\n/**\n * Filters given data by provided conf\n *\n * @param {Object} filterConf - Filter configuration\n *\n * @param {Object} filterConf.filter - Check if exists\n *      @param {Array} filterConf.filter.fields - Array with fields to filter\n *      @param {Array} filterConf.filter.cats - Array with cats to filter\n *      @param {Array} filterConf.filter.tags - Array with tags to filter\n *\n * @param {Object} filterConf.filterOut - Check if not exists\n *      @param {Array} filterConf.filterOut.fields - Array with fields to filter\n *      @param {Array} filterConf.filterOut.cats - Array with cats to filter\n *      @param {Array} filterConf.filterOut.tags - Array with tags to filter\n *\n * @param {Boolean} [array] - Set true, if you want to get array as resposne\n * @param {Object} [data] - Data to filter\n *\n * @returns {Object} Returns object or array with filtered data or undefined\n */\nParseData.prototype.getFilteredData = function(filterConf, array, data) {\n    var _this = this;\n    var _data = {};\n    var dataExists = true;\n    var output = {};\n\n    if (array) {\n        output = [];\n    }\n\n    if (data) {\n        _data = data;\n    } else {\n        dataExists = this.updateData();\n        _data = this.data;\n    }\n\n    if (dataExists) {\n        Object.keys(_data).forEach(function (key) {\n            var value = _data[key];\n            var filterObj = filterConf.filter;\n            var filterOutObj = filterConf.filterOut;\n\n            // Filtering categories out\n            if (filterObj && filterObj.cats && !_this.filterCats(value, key, true, filterObj.cats)) return;\n            if (filterOutObj && filterOutObj.cats && !_this.filterCats(value, key, false, filterOutObj.cats)) return;\n\n            // Filtering by existing and not empty fields\n            if (filterObj && filterObj.fields && !_this.filterFields(value, true, filterObj.fields)) return;\n            if (filterOutObj && filterOutObj.fields && !_this.filterFields(value, false, filterOutObj.fields)) return;\n\n            // Filtering by tags\n            if (filterObj && filterObj.tags && !_this.filterTags(value, true, filterObj.tags)) return;\n            if (filterOutObj && filterOutObj.tags && !_this.filterTags(value, false, filterOutObj.tags)) {\n                if ( !(filterObj && filterObj.forceTags && _this.filterTags(value, true, filterObj.forceTags)) )  {\n                    return;\n                }\n            }\n\n            if (array) {\n                output.push(value);\n            } else {\n                output[key] = value;\n            }\n        });\n\n        return output;\n    } else {\n        return undefined;\n    }\n};\n\n/**\n * Get item by ID\n *\n * @param {String} id - Request some item by id (for example \"base/btn\")\n *\n * @returns {Object} Return single object by requested ID, null (no id found) or undefined (no data found)\n */\nParseData.prototype.getByID = function(id) {\n    var dataExists = this.updateData();\n    var targetData = this.data[id];\n\n    if (!dataExists) return undefined;\n    if (!targetData) return null;\n\n    return targetData;\n};\n\n/**\n * Flatten contents of Spec HTML object\n *\n * @param {Object} contents - Nested Spec HTML contents object\n *\n * @returns {Object} Return flat object with contents, grouped by section ID\n */\nParseData.prototype.flattenHTMLcontents = function(contents) {\n    var flatList = {};\n\n    var parseContents = function(contents){\n        for (var i=0; contents.length > i ; i++) {\n            var current = contents[i];\n\n            flatList[current.id] = current;\n\n            if (current.nested.length > 0) {\n                parseContents(current.nested);\n            }\n        }\n    };\n\n    parseContents(contents);\n\n    return flatList;\n};\n\n/**\n * Get specific sections of defined Spec HTML\n *\n * @param {String} id - Request some item by id (for example \"base/btn\") and sections\n * @param {Array} sections - Array of sections to return\n *\n * @returns {Object} Return single object by requested ID, with specified sections HTML OR undefined\n */\nParseData.prototype.getBySection = function(id, sections) {\n    // Sections are defined only in html data storage\n    if (this.scope === 'html' && Array.isArray(sections) && sections.length > 0) {\n        var specData = this.getByID(id);\n\n        if (specData) {\n            var specSections = this.flattenHTMLcontents(specData.contents);\n\n            var pickedSections = [];\n\n            sections.forEach(function(id){\n                var objectToAdd = specSections[id];\n\n                if (objectToAdd) pickedSections.push(objectToAdd);\n            });\n\n            if (pickedSections.length !== 0) {\n                specData.contents = pickedSections;\n\n                return specData;\n            } else {\n                return undefined;\n            }\n        } else {\n            return undefined;\n        }\n    } else {\n        return undefined;\n    }\n};\n\nmodule.exports = ParseData;"
  },
  {
    "path": "core/lib/pathResolver.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar fs = require('fs');\nvar util = require('util');\n\n/**\n * Replace stubs in path ($(sourcejs), $(user), $(context) etc)\n *\n * @param {String} pathToResolve - path to modify\n * @param {String} [context] - folder dir, to define $(context) resolver\n *\n * @returns {String} Return resolved path\n */\nvar resolve = module.exports.resolve = function(pathToResolve, context){\n    if (!pathToResolve) return;\n\n    var map = {\n        sourcejs: global.pathToApp,\n        user: global.app.get('user'),\n        context: context || global.app.get('user')\n    };\n    var result = pathToResolve;\n\n    global.log.trace('Resolve path', result);\n\n    for (var tag in map) {\n        if (map.hasOwnProperty(tag)) {\n            var tagVal = map[tag];\n            var prepareRegExpString = '$('+tag+')';\n            prepareRegExpString = prepareRegExpString.replace(/[$-\\/?[-^{|}]/g, '\\\\$&');\n            var re = new RegExp(prepareRegExpString, 'g');\n\n            result = result.replace(re, tagVal);\n        }\n    }\n\n    global.log.trace('Resolve path returned', result);\n\n    return result;\n};\n\n/**\n * Check file or path existence following the array of options\n *\n * @param {Array} pathsArr - array of paths to check\n * @param {String} [filePath] - file path to append for each option\n * @param {String} [context] - folder dir, to define $(context) resolver\n *\n * @returns {String} Return first existing path or undefined\n */\nmodule.exports.checkExistence = function(pathsArr, filePath, context){\n    if (!pathsArr && !util.isArray(pathsArr)) return;\n\n    var fullPath;\n\n    global.log.trace('Check existence', pathsArr, filePath);\n\n    for(var i=0; i < pathsArr.length; i++) {\n        var checkPath = filePath ? path.join(pathsArr[i], filePath) : pathsArr[i];\n        checkPath = resolve(checkPath, context);\n\n        if (fs.existsSync(checkPath)) {\n            fullPath = checkPath;\n            break;\n        }\n    }\n\n    global.log.trace('Check existence returned', fullPath);\n\n    return fullPath;\n};"
  },
  {
    "path": "core/lib/processMd.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar marked = require('marked');\nvar cheerio = require('cheerio');\nvar deepExtend = require('deep-extend');\nvar translit = require(path.join(global.pathToApp,'core/lib/translit'));\nvar utils = require(path.join(global.pathToApp,'core/lib/utils'));\n\nvar renderer = new marked.Renderer();\n\n// Module configuration\nvar globalConfig = global.opts.core && global.opts.core.processMd ? global.opts.core.processMd : {};\nvar config = {\n    espaceCodeHTML: true,\n    languageRenderers: {\n        example: function (code) {\n            return '<div class=\"source_example\">' + code + '</div>';\n        }\n    },\n\n    // Define marked module options\n    marked: {}\n};\n// Overwriting base options\nutils.extendOptions(config, globalConfig);\n\n// Processing with native markdown renderer\nrenderer.code = function (code, language) {\n    if (config.languageRenderers.hasOwnProperty(language)) {\n        return config.languageRenderers[language](code);\n    } else {\n        if (config.espaceCodeHTML) code = code.replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\");\n\n        if (language && language !== '') {\n            return '<code class=\"src-' + language + ' source_visible\">' + code + '</code>';\n        } else {\n            return '<pre><code class=\"lang-source_wide-code\">' + code + '</code></pre>';\n        }\n    }\n};\n\nrenderer.heading = function (text, level) {\n    var escapedText = translit(text);\n\n    return '<h' + level + ' id=\"' + escapedText + '\">' + text + '</h' + level + '>';\n};\n\n// Extend re-defined renderer\nconfig.marked.renderer = deepExtend(renderer, config.marked.renderer);\n\nmarked.setOptions(config.marked);\n\nmodule.exports = function (markdown, options) {\n    var _options = options || {};\n    var $ = cheerio.load('<div id=\"content\">' + marked(markdown) + '</div>');\n    var $content = $('#content').first();\n\n    if (_options.wrapDescription) {\n        // Spec description\n        var $startElement;\n        var $H1 = $content.children('h1').first();\n\n        if ($H1.length > 0) {\n            $startElement = $H1;\n        } else {\n            $content.prepend('<div id=\"sourcejs-start-element\"></div>');\n            $startElement = $content.children('#sourcejs-start-element').first();\n        }\n\n        var $description = $startElement.nextUntil('h2');\n        $description.remove();\n        $startElement.after('<div class=\"source_info\">' + $description + '</div>');\n        $content.children('#sourcejs-start-element').first().remove();\n    }\n\n    // Spec sections\n    $content.children('h2').each(function () {\n        var $this = $(this);\n        var $filteredElems = $('');\n\n        var $sectionElems = $this.nextUntil('h2');\n        var id = $this.attr('id');\n        $this.removeAttr('id');\n\n        // Adding additional check, since cheerio .nextUntil is not stable\n        $sectionElems.each(function () {\n            if (this.tagName === 'h2') return false;\n\n            $filteredElems = $filteredElems.add(this);\n        });\n\n        $filteredElems.remove();\n\n        $(this).replaceWith([\n            '<div class=\"source_section\" id=\"' + id + '\">',\n            $this + $filteredElems,\n            '</div>'\n        ].join(''));\n    });\n\n    return $content.html();\n};"
  },
  {
    "path": "core/lib/specUtils.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar fs = require('fs-extra');\nvar parseData = require(path.join(global.pathToApp, 'core/lib/parseData'));\n\n\n/**\n * Parse clean path to spec from URL\n *\n * @param {String} urlPath - raw url (\"/base/spec/index.src.html\")\n *\n * @returns {Object} output\n * @returns {String} output.ext - file extension, if exists\n * @returns {String} output.pathToSpec - path to Spec\n */\nvar parseSpecUrlPath = module.exports.parseSpecUrlPath = function(urlPath){\n    // TODO: add any type of url parsing, including parameters\n\n    var output = {};\n    var splitExt = urlPath.split('.');\n    var hasExt = splitExt.length > 1;\n\n    if (hasExt) {\n        output.ext = splitExt[1];\n        output.pathToSpec = path.dirname(urlPath);\n    } else {\n        output.pathToSpec = urlPath;\n    }\n\n    return output;\n};\n\n/**\n * Parse spec ID from URL\n *\n * @param {String} urlToSpec - spec path or url (\"/base/btn/\")\n *\n * @returns {String} Return a parsed Spec ID\n */\nvar getSpecIDFromUrl = module.exports.getSpecIDFromUrl = function(urlToSpec){\n    urlToSpec = urlToSpec.replace(/^\\//, '').replace(/\\/+$/, '');\n\n    return urlToSpec;\n};\n\n/**\n * Get information about defined specSpec\n *\n * @param {String} urlSpecPath - spec path from url\n *\n * @returns {Object} Return single info object of the spec\n */\nmodule.exports.getSpecInfo = function(urlSpecPath) {\n    var specsDataPath = path.join(global.pathToApp, global.opts.core.api.specsData);\n    var parseSpecData = new parseData({\n        scope: 'specs',\n        path: specsDataPath\n    });\n    var specID = getSpecIDFromUrl(urlSpecPath);\n\n    return parseSpecData.getByID(specID);\n};\n\n/**\n * Get Spec name from defined directory\n *\n * @param {String} dirPath - Spec directory\n * @param {Array} [specFiles] - list of spec files to check\n *\n * @returns {String} Return first found Spec file path or undefined\n */\nmodule.exports.getSpecFromDir = function(dirPath, specFiles) {\n    var dirContent = fs.existsSync(dirPath) ? fs.readdirSync(dirPath) : undefined;\n\n    if (!dirContent) return;\n\n    var supportedSpecNames = specFiles || global.opts.rendering.specFiles;\n    var specPath;\n\n    for (var i=0; i < supportedSpecNames.length; i++) {\n        var item = supportedSpecNames[i];\n\n        // Support folders inside names, e.g. 'docs/index.html'\n        if (item.indexOf('/') !== -1) {\n            var filename = path.join(dirPath, item);\n            if (fs.existsSync(filename)) {\n                specPath = filename;\n                break;\n            }\n        } else {\n            if (dirContent.indexOf(item) > -1) {\n                specPath = path.join(dirPath, item);\n                break;\n            }\n        }\n    }\n\n    return specPath;\n};\n\n/**\n * Get absolute path to Spec dir\n *\n * @param {String} urlPath - relative URL (web) to spec\n *\n * @returns {String} Return absolute path to Spec dir\n */\nmodule.exports.getFullPathToSpec = function(urlPath){\n    var pathToSpec = parseSpecUrlPath(urlPath).pathToSpec;\n    var cleanPath = urlPath.replace(/\\/+$/, '').replace(/\\//, '');\n    var specPath = path.join(global.app.get('user'), pathToSpec).replace(/\\\\/g, '/');\n\n    // Including non-standard paths, outside default static route\n    global.opts.core.common.includedDirs.forEach(function(item){\n        if (cleanPath.split('/')[0] === item) {\n            specPath = specPath.replace('/' + global.opts.core.common.pathToUser + '/' + cleanPath, '/' + cleanPath);\n        }\n    });\n\n    // remove trailing slash\n    return specPath.replace(/\\/+$/, '');\n};\n"
  },
  {
    "path": "core/lib/translit.js",
    "content": "/* jshint -W089 */\n/* global XRegExp */\n\nvar char_map = {\n\t/* jshint ignore:start */\n\n\t// Latin\n\t'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE', 'Ç': 'C',\n\t'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I', 'Ï': 'I',\n\t'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ö': 'O', 'Ő': 'O',\n\t'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 'Ü': 'U', 'Ű': 'U', 'Ý': 'Y', 'Þ': 'TH',\n\t'ß': 'ss',\n\t'à': 'a', 'á': 'a', 'â': 'a', 'ã': 'a', 'ä': 'a', 'å': 'a', 'æ': 'ae', 'ç': 'c',\n\t'è': 'e', 'é': 'e', 'ê': 'e', 'ë': 'e', 'ì': 'i', 'í': 'i', 'î': 'i', 'ï': 'i',\n\t'ð': 'd', 'ñ': 'n', 'ò': 'o', 'ó': 'o', 'ô': 'o', 'õ': 'o', 'ö': 'o', 'ő': 'o',\n\t'ø': 'o', 'ù': 'u', 'ú': 'u', 'û': 'u', 'ü': 'u', 'ű': 'u', 'ý': 'y', 'þ': 'th',\n\t'ÿ': 'y',\n\n\t// Latin symbols\n\t'©': '(c)',\n\n\t// Greek\n\t'Α': 'A', 'Β': 'B', 'Γ': 'G', 'Δ': 'D', 'Ε': 'E', 'Ζ': 'Z', 'Η': 'H', 'Θ': '8',\n\t'Ι': 'I', 'Κ': 'K', 'Λ': 'L', 'Μ': 'M', 'Ν': 'N', 'Ξ': '3', 'Ο': 'O', 'Π': 'P',\n\t'Ρ': 'R', 'Σ': 'S', 'Τ': 'T', 'Υ': 'Y', 'Φ': 'F', 'Χ': 'X', 'Ψ': 'PS', 'Ω': 'W',\n\t'Ά': 'A', 'Έ': 'E', 'Ί': 'I', 'Ό': 'O', 'Ύ': 'Y', 'Ή': 'H', 'Ώ': 'W', 'Ϊ': 'I',\n\t'Ϋ': 'Y',\n\t'α': 'a', 'β': 'b', 'γ': 'g', 'δ': 'd', 'ε': 'e', 'ζ': 'z', 'η': 'h', 'θ': '8',\n\t'ι': 'i', 'κ': 'k', 'λ': 'l', 'μ': 'm', 'ν': 'n', 'ξ': '3', 'ο': 'o', 'π': 'p',\n\t'ρ': 'r', 'σ': 's', 'τ': 't', 'υ': 'y', 'φ': 'f', 'χ': 'x', 'ψ': 'ps', 'ω': 'w',\n\t'ά': 'a', 'έ': 'e', 'ί': 'i', 'ό': 'o', 'ύ': 'y', 'ή': 'h', 'ώ': 'w', 'ς': 's',\n\t'ϊ': 'i', 'ΰ': 'y', 'ϋ': 'y', 'ΐ': 'i',\n\n\t// Turkish\n\t'Ş': 'S', 'İ': 'I', 'Ç': 'C', 'Ü': 'U', 'Ö': 'O', 'Ğ': 'G',\n\t'ş': 's', 'ı': 'i', 'ç': 'c', 'ü': 'u', 'ö': 'o', 'ğ': 'g',\n\n\t// Russian\n\t'А': 'A', 'Б': 'B', 'В': 'V', 'Г': 'G', 'Д': 'D', 'Е': 'E', 'Ё': 'Yo', 'Ж': 'Zh',\n\t'З': 'Z', 'И': 'I', 'Й': 'J', 'К': 'K', 'Л': 'L', 'М': 'M', 'Н': 'N', 'О': 'O',\n\t'П': 'P', 'Р': 'R', 'С': 'S', 'Т': 'T', 'У': 'U', 'Ф': 'F', 'Х': 'H', 'Ц': 'C',\n\t'Ч': 'Ch', 'Ш': 'Sh', 'Щ': 'Sh', 'Ъ': '', 'Ы': 'Y', 'Ь': '', 'Э': 'E', 'Ю': 'Yu',\n\t'Я': 'Ya',\n\t'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd', 'е': 'e', 'ё': 'yo', 'ж': 'zh',\n\t'з': 'z', 'и': 'i', 'й': 'j', 'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', 'о': 'o',\n\t'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 'у': 'u', 'ф': 'f', 'х': 'h', 'ц': 'c',\n\t'ч': 'ch', 'ш': 'sh', 'щ': 'sh', 'ъ': '', 'ы': 'y', 'ь': '', 'э': 'e', 'ю': 'yu',\n\t'я': 'ya',\n\n\t// Ukrainian\n\t'Є': 'Ye', 'І': 'I', 'Ї': 'Yi', 'Ґ': 'G',\n\t'є': 'ye', 'і': 'i', 'ї': 'yi', 'ґ': 'g',\n\n\t// Czech\n\t'Č': 'C', 'Ď': 'D', 'Ě': 'E', 'Ň': 'N', 'Ř': 'R', 'Š': 'S', 'Ť': 'T', 'Ů': 'U',\n\t'Ž': 'Z',\n\t'č': 'c', 'ď': 'd', 'ě': 'e', 'ň': 'n', 'ř': 'r', 'š': 's', 'ť': 't', 'ů': 'u',\n\t'ž': 'z',\n\n\t// Polish\n\t'Ą': 'A', 'Ć': 'C', 'Ę': 'e', 'Ł': 'L', 'Ń': 'N', 'Ó': 'o', 'Ś': 'S', 'Ź': 'Z',\n\t'Ż': 'Z',\n\t'ą': 'a', 'ć': 'c', 'ę': 'e', 'ł': 'l', 'ń': 'n', 'ó': 'o', 'ś': 's', 'ź': 'z',\n\t'ż': 'z',\n\n\t// Latvian\n\t'Ā': 'A', 'Č': 'C', 'Ē': 'E', 'Ģ': 'G', 'Ī': 'i', 'Ķ': 'k', 'Ļ': 'L', 'Ņ': 'N',\n\t'Š': 'S', 'Ū': 'u', 'Ž': 'Z',\n\t'ā': 'a', 'č': 'c', 'ē': 'e', 'ģ': 'g', 'ī': 'i', 'ķ': 'k', 'ļ': 'l', 'ņ': 'n',\n\t'š': 's', 'ū': 'u', 'ž': 'z'\n\n\t/* jshint ignore:end */\n};\n\n/**\n * Create a web friendly URL slug from a string.\n *\n * Requires XRegExp (http://xregexp.com) with unicode add-ons for UTF-8 support.\n *\n * Although supported, transliteration is discouraged because\n *     1) most web browsers support UTF-8 characters in URLs\n *     2) transliteration causes a loss of information\n *\n * @author Sean Murphy <sean@iamseanmurphy.com>\n * @copyright Copyright 2012 Sean Murphy. All rights reserved.\n * @license http://creativecommons.org/publicdomain/zero/1.0/\n *\n * @param string s\n * @param object opt\n * @return string\n */\n\nmodule.exports = function(s, opt) {\n\t'use strict';\n\n\ts = String(s);\n\topt = Object(opt);\n\n\tvar defaults = {\n\t\t'delimiter': '-',\n\t\t'limit': undefined,\n\t\t'lowercase': true,\n\t\t'replacements': {},\n\t\t'transliterate': (typeof(XRegExp) === 'undefined') ? true : false\n\t};\n\n\t// Merge options\n\tfor (var k in defaults) {\n\t\tif (!opt.hasOwnProperty(k)) {\n\t\t\topt[k] = defaults[k];\n\t\t}\n\t}\n\n\t// Make custom replacements\n\tfor (var j in opt.replacements) {\n\t\ts = s.replace(new RegExp(j, 'g'), opt.replacements[j]);\n\t}\n\n\t// Transliterate characters to ASCII\n\tif (opt.transliterate) {\n\t\tfor (var i in char_map) {\n\t\t\ts = s.replace(new RegExp(i, 'g'), char_map[i]);\n\t\t}\n\t}\n\n\t// Replace non-alphanumeric characters with our delimiter\n\tvar alnum = (typeof(XRegExp) === 'undefined') ? new RegExp('[^a-z0-9]+', 'ig') : new XRegExp('[^\\\\p{L}\\\\p{N}]+', 'ig');\n\ts = s.replace(alnum, opt.delimiter);\n\n\t// Remove duplicate delimiters\n\ts = s.replace(new RegExp('[' + opt.delimiter + ']{2,}', 'g'), opt.delimiter);\n\n\t// Truncate slug to max. characters\n\ts = s.substring(0, opt.limit);\n\n\t// Remove delimiter from ends\n\ts = s.replace(new RegExp('(^' + opt.delimiter + '|' + opt.delimiter + '$)', 'g'), '');\n\n\treturn opt.lowercase ? s.toLowerCase() : s;\n};"
  },
  {
    "path": "core/lib/utils.js",
    "content": "'use strict';\n\nvar _ = require('lodash');\n\nmodule.exports.requireUncached = function (module) {\n    delete require.cache[require.resolve(module)];\n    return require(module);\n};\n\nmodule.exports.extendOptions = function () {\n    var args = Array.prototype.slice.call(arguments);\n    var cb = function (a, b) {\n        if (_.isArray(a)) {\n            return b;\n        }\n    };\n\n    args.push(cb);\n\n    // Don't merge arrays\n    return _.merge.apply(this, args);\n};"
  },
  {
    "path": "core/lib/viewResolver.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar pathResolver = require(path.join(global.pathToApp + '/core/lib/pathResolver.js'));\n\n/**\n * Get information about defined specSpec\n *\n * @param {String} typeOrPath - define type of view (spec/navigation), relative path to default views dir or absolute path\n * @param {Object} viewsOptions - view options (global.opts.rendering.views)\n * @param {String} [context] - folder dir, to define $(context) resolver\n *\n * @returns {String} Return full path to view template of undefined\n */\nmodule.exports = function(typeOrPath, viewsOptions, context){\n    if (!typeOrPath) return;\n\n    var type;\n\n    // check pre-defined types\n    if (viewsOptions) {\n        for (var typeOption in viewsOptions) {\n            if (typeOption === typeOrPath) {\n                type = typeOrPath;\n            }\n        }\n\n        // check short path definition\n        if (!type) {\n            var assumedPath = path.extname(typeOrPath) === '.ejs' ? typeOrPath : typeOrPath + '.ejs';\n            var assumedPathLocation = pathResolver.checkExistence(viewsOptions.defaultViewPaths, assumedPath, context);\n\n            if (!!assumedPathLocation) {\n                return assumedPathLocation;\n            }\n        } else if (viewsOptions[type] && viewsOptions[type].length > 0){\n            return pathResolver.checkExistence(viewsOptions[type], null, context);\n        }\n    }\n\n    return pathResolver.checkExistence([typeOrPath], null, context);\n};"
  },
  {
    "path": "core/loadOptions.js",
    "content": "'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\nvar configUtils = require('./lib/configUtils');\nvar utils = require('./lib/utils');\nvar colors = require('colors'); // jshint ignore:line\n\nvar silent;\n\nvar legacyOptionsWarn = function(oldStruct, newStruct, fileName){\n    var _fileName = fileName || 'options.js';\n\n    // Shout warn message only once\n    if (global.legacyOptionsWarnOnce && global.legacyOptionsWarnOnce.indexOf(oldStruct) > -1) return;\n\n    var msg = 'You are using an old options structure in `' + _fileName + '` conf file, please change ' + oldStruct.red + ' to ' + newStruct.green + '. Old options support will be deprecated in next major release.';\n\n    if (global.log) {\n        global.log.warn(msg);\n    } else {\n        global.logQueue = global.logQueue || [];\n\n        global.logQueue.push({\n            level: 'warn',\n            msg: msg\n        });\n    }\n\n    global.legacyOptionsWarnOnce = global.legacyOptionsWarnOnce || [];\n    global.legacyOptionsWarnOnce.push(oldStruct);\n};\n\nvar legacyOptionsChecker = function(options, fileName){\n    var haveCommon = options.core && options.core.common;\n\n    // Server options\n    options.core = options.core || {};\n    options.core.server = options.core.server || {};\n    if (haveCommon && options.core.common.port) {\n        if (!silent) legacyOptionsWarn('options.core.common.port', 'options.core.server.port', fileName);\n\n        options.core.server.port = options.core.server.port || options.core.common.port;\n\n        // Update old conf path with new (for legacy support)\n        options.core.common.port = options.core.server.port;\n    }\n\n    // Rendering options\n    options.rendering = options.rendering || {};\n    if (haveCommon && options.core.common.specFiles) {\n        if (!silent) legacyOptionsWarn('options.core.common.specFiles', 'options.rendering.specFiles', fileName);\n\n        options.rendering.specFiles = options.rendering.specFiles || options.core.common.specFiles;\n    }\n\n    // Add *.src.html if not defined\n    if (\n        options.rendering && options.rendering.specFiles &&\n        options.rendering.specFiles.indexOf('index.src') > -1 &&\n        options.rendering.specFiles.indexOf('index.src.html') === -1\n    ) {\n        for (var i=0; i < options.rendering.specFiles.length; i++) {\n            var currentItem = options.rendering.specFiles[i];\n\n            if (currentItem === 'index.src') {\n                options.rendering.specFiles.splice(i + 1, 0, 'index.src.html');\n                break;\n            }\n        }\n    }\n\n    return options;\n};\n\nmodule.exports = function(basePath, _silent){\n    silent = _silent;\n\n    var pathToApp = basePath || path.dirname(require.main.filename);\n\n    var mergedOptions = utils.requireUncached(path.join(pathToApp, 'options'));\n    var pathToUser = path.join(pathToApp, mergedOptions.core.common.pathToUser);\n\n    // Using specific path to specs parsing, because we don't have global.opts yet\n    var userSettingsFile = path.join(pathToUser, 'options.js');\n    var userLocalSettingsFile = path.join(pathToUser, 'local-options.js');\n\n    // Adding assets npm plugin list to options\n    utils.extendOptions(mergedOptions, configUtils.prepareClientNpmPlugins(pathToUser));\n\n    // If user settings file is present, override core settings\n    if(fs.existsSync(userSettingsFile)) {\n        utils.extendOptions(mergedOptions, legacyOptionsChecker(utils.requireUncached(userSettingsFile)), 'options.js');\n    }\n\n    // If local settings file is present, override core settings\n    if(fs.existsSync(userLocalSettingsFile)) {\n        utils.extendOptions(mergedOptions, legacyOptionsChecker(utils.requireUncached(userLocalSettingsFile)), 'local-options.js');\n    }\n\n    return mergedOptions;\n};"
  },
  {
    "path": "core/loadPlugins.js",
    "content": "'use strict';\n\n/*\n *\n * Loading SourceJS plugins\n *\n * */\n\nvar fs = require('fs');\nvar path = require('path');\nvar pathToModules = path.join(global.app.get('user'), 'node_modules');\n\n// Loading all sourcejs-*/core/index.js files from npm plugins section\nif (fs.existsSync(pathToModules)) {\n    var userModulesFiles = fs.readdirSync(pathToModules);\n\n    userModulesFiles.map(function(file){\n        if ((/^sourcejs-/).test(file)) {\n            var pluginIndexPath = path.join(pathToModules, file, 'core','index.js');\n\n            if(fs.existsSync(pluginIndexPath)) {\n                try {\n                    require(pluginIndexPath);\n                } catch (e) {\n                    console.log(\"User plugins require error: \", e, ' from:', pluginIndexPath);\n                }\n            }\n        }\n    });\n}"
  },
  {
    "path": "core/logger.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar log4js = require('log4js');\nvar utils = require('./lib/utils');\nvar fs = require('fs-extra');\n\nvar logRootDir = global.pathToApp || __dirname;\nvar customLogLevel = global.commander && global.commander.log ? global.commander.log : undefined;\nvar defaultLogLevel = global.MODE === 'production' ? global.opts.core.common.defaultProdLogLevel : global.opts.core.common.defaultLogLevel;\nvar logLevel = customLogLevel || defaultLogLevel;\n\nvar config =  {\n    prepareLogPath: 'log',\n    log4js: {\n        \"appenders\": [\n            {\n                \"type\": \"logLevelFilter\",\n                \"level\": logLevel,\n                \"appender\": {\n                    \"type\": \"console\",\n                    \"layout\": {\n                        \"type\": \"pattern\",\n                        \"pattern\": \"%[[%d{yyyy-MM-dd hh:mm:ss}] [%p] -%] %m\"\n                    }\n                }\n            },\n            {\n                \"type\": \"clustered\",\n                \"appenders\": [\n                    {\n                        \"type\": \"file\",\n                        \"filename\": path.join(logRootDir, 'log/app.log'),\n                        \"maxLogSize\": 10485760,\n                        \"numBackups\": 3\n                    },\n                    {\n                        \"type\": \"logLevelFilter\",\n                        \"level\": \"ERROR\",\n                        \"appender\": {\n                            \"type\": \"file\",\n                            \"filename\": path.join(logRootDir, 'log/errors.log')\n                        }\n                    },\n                    {\n                        \"type\": \"logLevelFilter\",\n                        \"level\": \"WARN\",\n                        \"appender\": {\n                            \"type\": \"file\",\n                            \"filename\": path.join(logRootDir, 'log/warnings.log')\n                        }\n                    }\n                ],\n                category: 'app'\n            }\n        ]\n    }\n};\n\nif (global.opts.core.logger) utils.extendOptions(config, global.opts.core.logger);\n\nvar reloadConf = function(currentConf){\n    log4js.configure(currentConf);\n    log4js.replaceConsole(log4js.getLogger('app'));\n};\n\nvar addAppenders = function(appendersArr){\n\n    appendersArr.forEach(function(item){\n        config.log4js.appenders.push(item);\n    });\n\n    reloadConf(config.log4js);\n};\n\nvar prepareLogDir = function(dir){\n    // Preparing log dir\n    try {\n        fs.mkdirpSync(path.join(logRootDir, dir));\n    } catch (e) {\n        if (e.code !== 'EEXIST') {\n            console.error(\"Could not set up log directory, error: \", e);\n        }\n    }\n};\n\n// Prepare dafault log path\nprepareLogDir(config.prepareLogPath);\n\n// Configuring log4js\nreloadConf(config.log4js);\n\nvar logger = log4js.getLogger('app');\n\n// Example\n// logger.trace('trace');\n// logger.debug('debug');\n// logger.info('info');\n// console.log('console log');\n// logger.warn('warn');\n// logger.error('error');\n// logger.fatal('fatal');\n\nif (global.logQueue) global.logQueue.forEach(function(item){\n    logger[item.level](item.msg);\n});\n\nmodule.exports = {\n    addAppenders: addAppenders,\n    prepareLogDir: prepareLogDir,\n\n    // Default logger\n    log: logger,\n\n    // Configured log4js\n    log4js: log4js\n};"
  },
  {
    "path": "core/middlewares/clarify.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar fs = require('fs-extra');\nvar url = require('url');\nvar Q = require('q');\nvar _ = require('lodash');\nvar jsdom = require('jsdom');\n\nvar ejs = require(path.join(global.pathToApp, 'core/ejsWithHelpers.js'));\nvar trackStats = require(path.join(global.pathToApp, 'core/trackStats'));\nvar pathToApp = path.dirname(require.main.filename);\nvar specUtils = require(path.join(pathToApp, 'core/lib/specUtils'));\nvar parseData = require(path.join(pathToApp, 'core/lib/parseData'));\nvar htmlParser = require(path.join(pathToApp, 'core/html-tree/html-parser'));\n\n\nvar htmlDataPath = path.join(pathToApp, global.opts.core.api.htmlData);\nvar parseHTMLData = new parseData({\n    scope: 'html',\n    path: htmlDataPath\n});\n\nvar htmlParserEnabled = global.opts.plugins && global.opts.plugins.htmlParser && global.opts.plugins.htmlParser.enabled;\n\n//TODO JSdoc\n\nvar getTpl = function(tpl) {\n    var deferred = Q.defer();\n\n    var templateName = tpl ? tpl : 'default';\n\n    // TODO: use view resolver\n    var pathToTemplate = path.join(pathToApp, 'core/views/clarify', templateName + '.ejs');\n    var userPathToTemplate = path.join(global.app.get('user'), 'core/views/clarify', templateName + '.ejs');\n\n    // First we check user tempalte, then core\n    fs.readFile(userPathToTemplate, 'utf-8', function(err, data){\n        if (err) {\n\n            fs.readFile(pathToTemplate, 'utf-8', function(err, data){\n                if (err) {\n                    deferred.reject(err);\n                    return;\n                }\n\n                deferred.resolve(data);\n            });\n            return;\n        }\n\n        deferred.resolve(data);\n    });\n\n    return deferred.promise;\n};\n\nvar getTplList = function(){\n    var deferred = Q.defer();\n\n    var pathToTemplates = path.join(pathToApp, 'core/views/clarify');\n    var userPathToTemplates = path.join(global.app.get('user'), 'core/views/clarify');\n\n    var templatesList = [];\n\n    fs.readdir(pathToTemplates, function(err, coreTemplates){\n        if (err) {\n            deferred.reject({\n                err: err,\n                msg: 'Could not read directory with Clarify templates'\n            });\n            return;\n        }\n\n        coreTemplates.forEach(function(item){\n            templatesList.push(path.basename(item, '.ejs'));\n        });\n\n        fs.readdir(userPathToTemplates, function(err, userTemplates){\n            if (err) {\n                if (err.code === 'ENOENT') {\n                    deferred.resolve(templatesList);\n                } else {\n                    deferred.reject({\n                        err: err,\n                        msg: 'Could not read user directory with Clarify templates'\n                    });\n                }\n            } else {\n                userTemplates.forEach(function(item){\n                    templatesList.push(path.basename(item, '.ejs'));\n                });\n\n                deferred.resolve(_.uniq(templatesList));\n            }\n        });\n    });\n\n    return deferred.promise;\n};\n\n// TODO: Move to standalone API, for fast JSDOM spec parsing\nvar parseSpec = function(sections, pathToSpec) {\n    var deferred = Q.defer();\n\n    // Parsing spec with JSdom\n    jsdom.env(\n        'http://127.0.0.1:' + global.opts.core.server.port + pathToSpec + '?internal=true',\n        ['http://127.0.0.1:' + global.opts.core.server.port + '/source/assets/js/modules/sectionsParser.js'],\n        function (err, window) {\n            if (err) {\n                deferred.reject({\n                    err: err,\n                    msg: 'JSDOM error'\n                });\n                return;\n            }\n\n            var output = {};\n\n            var SourceGetSections = window.SourceGetSections;\n\n            var parser = new SourceGetSections();\n            var allContents = parser.getSpecFull();\n\n            if (sections) {\n                output = parser.getSpecFull(sections);\n            } else {\n                output = allContents;\n            }\n\n            if (output) {\n                deferred.resolve({\n                    output: output,\n                    allContents: allContents\n                });\n            } else {\n                deferred.reject({\n                    msg: 'Requested sections HTML not found'\n                });\n            }\n        }\n    );\n\n    return deferred.promise;\n};\n\nvar updateApiData = function(specID) {\n    var deferred = Q.defer();\n    var specs = [specID];\n\n    htmlParser.processSpecs(specs, function(err){\n        if (err) {\n            deferred.reject(err);\n        } else {\n            deferred.resolve();\n        }\n    });\n\n    return deferred.promise;\n};\n\nvar getDataFromApi = function(sections, specID, apiUpdate) {\n    var deferred = Q.defer();\n    var output = {};\n    var errMsg = '';\n\n    var getSpecData = function(){\n        var allContents = parseHTMLData.getByID(specID);\n\n        if (sections) {\n            output = parseHTMLData.getBySection(specID, sections);\n            errMsg = 'Requested sections HTML not found, please define existing sections or update HTML API contects.';\n        } else {\n            output = allContents;\n            errMsg = 'Requested Spec not found';\n        }\n\n        if (output) {\n            deferred.resolve({\n                output: output,\n                allContents: allContents\n            });\n        } else {\n            deferred.reject({\n                msg: errMsg\n            });\n        }\n    };\n\n    if (apiUpdate) {\n        updateApiData(specID).then(function(){\n            getSpecData();\n        }).fail(function(err) {\n            var msg = 'Failed updating HTML Spec API. ';\n\n            deferred.reject({\n                err: err,\n                msg: msg\n            });\n        });\n    } else {\n        getSpecData();\n    }\n\n    return deferred.promise;\n};\n\nvar getSectionsIDList = function(sections) {\n    var output = [];\n\n    var parseContents = function(contents){\n        for (var i=0; contents.length > i ; i++) {\n            var current = contents[i];\n\n            output.push({\n                header: current.header,\n                id: current.id,\n                visualID: current.visualID\n            });\n\n            if (current.nested.length > 0) {\n                parseContents(current.nested);\n            }\n        }\n    };\n\n    parseContents(sections.contents);\n\n    return output;\n};\n\nmodule.exports.process = function(req, res, next) {\n\tvar parsedUrl = url.parse(req.url, true);\n\n    // Query params\n    var q = parsedUrl.query || {};\n    var clarifyFlag = q.clarify;\n\n    // Check if middleware needs to be activated\n\tif (clarifyFlag) {\n        var urlPath = parsedUrl.pathname;\n        var parsedPath = specUtils.parseSpecUrlPath(urlPath);\n\n        var tpl = q.tpl;\n        var fromApi = q.fromApi || false;\n        var apiUpdate = q.apiUpdate || false;\n        var turnOffJS = q.nojs || false;\n        var sections = q.sections ? q.sections.split(',') : undefined;\n\n        var specInfo = specUtils.getSpecInfo(parsedPath.pathToSpec);\n        var specID = specUtils.getSpecIDFromUrl(parsedPath.pathToSpec);\n        var specHasHTMLAPIData = !!parseHTMLData.getByID(specID);\n        var ua = req.headers && req.headers['user-agent'] ? req.headers['user-agent'] : undefined;\n\n        trackStats.page({\n            pageName: 'clarify',\n            sessionID: trackStats.getSessionID(req),\n            ua: ua\n        });\n\n        if (!specInfo) {\n            res.send('Clarify did not found any information about requested spec, please check URL or update file-tree restarting the app.');\n            return;\n        }\n\n        if (!specHasHTMLAPIData) apiUpdate = true;\n\n        var getSpecData = function(){\n            return fromApi ? getDataFromApi(sections, specID, apiUpdate) : parseSpec(sections, parsedPath.pathToSpec);\n        };\n\n        Q.all([\n            getSpecData(),\n            getTplList()\n        ]).spread(function(_specData, tplList) {\n            var specData = _specData.output;\n            var sections = specData.contents ? specData.contents : [];\n\n            if (sections.length > 0) {\n                var checkHeadResources = function(specData, target){\n                    return specData.headResources && specData.headResources[target];\n                };\n\n                var checkBodyResources = function(specData, target){\n                    return specData.bodyResources && specData.bodyResources[target];\n                };\n\n                var clarifyData = '<script>var sourceClarifyData = '+ JSON.stringify({\n                    showApiTargetOption: specHasHTMLAPIData || htmlParserEnabled,\n                    specUrl: specInfo.url,\n                    sectionsIDList: getSectionsIDList(_specData.allContents),\n                    tplList: tplList\n                })+'</script>';\n\n                var templateJSON = {\n                    nojs: turnOffJS,\n                    title: specInfo.title,\n                    sections: sections,\n                    headCssLinks: checkHeadResources(specData, 'cssLinks') ? specData.headResources.cssLinks.join('\\n') : '',\n                    headScripts: checkHeadResources(specData, 'scripts') ? specData.headResources.scripts.join('\\n'): '',\n                    headCssStyles: checkHeadResources(specData, 'cssStyles') ? specData.headResources.cssStyles.join('\\n') : '',\n\n                    bodyCssLinks: checkBodyResources(specData, 'cssLinks') ? specData.bodyResources.cssLinks.join('\\n') : '',\n                    bodyScripts: checkBodyResources(specData, 'scripts') ? specData.bodyResources.scripts.join('\\n'): '',\n                    bodyCssStyles: checkBodyResources(specData, 'cssStyles') ? specData.bodyResources.cssStyles.join('\\n') : '',\n\n                    clarifyData: clarifyData\n                };\n\n                getTpl(tpl).then(function(tpl){\n                    var html = '';\n\n                    try {\n                        html = ejs.render(tpl, templateJSON);\n                    } catch (err) {\n                        var msg = 'Clarify: ERROR with EJS rendering failed';\n\n                        if (global.MODE === 'development') global.log.error(msg + ': ', err);\n\n                        html = msg;\n                    }\n\n                    res.send(html);\n                }).fail(function(err) {\n                    var msg = 'ERROR: Could not find requested or default template for Clarify';\n\n                    if (global.MODE === 'development') global.log.warn('Clarify: ' + msg + ': ', err);\n\n                    res.status(500).send(msg);\n                });\n            } else {\n                res.send('Clarify did not found any of requested sections.');\n            }\n        }).fail(function(errData) {\n            global.log.warn('Clarify: ' + (errData.msg || 'Error in data preparation'), errData);\n\n            res.status(500).send(errData.msg);\n        });\n\t} else {\n        // redirect to next express middleware\n        next();\n    }\n};"
  },
  {
    "path": "core/middlewares/loader.js",
    "content": "'use strict';\n\nvar _ = require('lodash');\nvar fs = require('fs');\nvar path = require('path');\n\nvar appRoot = global.pathToApp;\nvar utils = require(path.join(appRoot, 'core/lib/utils'));\nvar log = require(path.join(appRoot, 'core/logger')).log;\n\nvar gatherMiddlewares = function(dest, filterRegExp, mainJS){\n    var output = {};\n\n    if (fs.existsSync(dest)) {\n        var userMiddlewareFiles = fs.readdirSync(dest);\n\n        userMiddlewareFiles.map(function (dir) {\n            if (!filterRegExp || filterRegExp.test(dir)) {\n                var middlewareName = dir;\n                var _mainJS = mainJS || 'index.js';\n\n                var pluginIndexPath = path.join(dest, dir, _mainJS);\n                if (fs.existsSync(pluginIndexPath)) {\n                    output[middlewareName] = {\n                        enabled: true,\n                        order: 0,\n                        group: 'default',\n                        indexPath: pluginIndexPath\n                    };\n\n                    // Load middleware options\n                    var configPath = path.join(dest, dir, 'options.js');\n                    if (fs.existsSync(configPath)) {\n                        var middlewareConfig = require(configPath);\n\n                        _.forOwn(output[middlewareName], function (value, key) {\n                            var overVal = middlewareConfig[key];\n\n                            if (overVal) {\n                                if (key === 'order') {\n                                    if (overVal >= 0) {\n                                        output[middlewareName][key] = overVal;\n                                    } else {\n                                        log.warn('Middlewares are restricted to define order with value lower than 0 (zero). Please modify '+ middlewareName+ ' middleware options.');\n                                    }\n                                } else {\n                                    output[middlewareName][key] = overVal;\n                                }\n                            }\n                        });\n                    }\n                }\n            }\n        });\n    }\n\n    return output;\n};\n\nvar sortMiddlewares = function(groupsOrder, list){\n    var output = [];\n\n    if (!(groupsOrder && _.isArray(groupsOrder) && list)) return output;\n\n    var groupedList = {};\n\n    // Sort by groups\n    _.forOwn(list, function (value, key) {\n        var group = value.group || 'default';\n        var middleware = value;\n\n        if (!middleware.enabled) return;\n\n        middleware.name = middleware.name || key;\n\n        groupedList[group] = groupedList[group] || [];\n        groupedList[group].push(value);\n    });\n\n    // Sort each group\n    _.forOwn(groupedList, function (value, key) {\n        groupedList[key] = _.sortByOrder(value, ['order'], ['asc']);\n    });\n\n    // Concat groups by order\n    groupsOrder.forEach(function(item){\n        if (groupedList[item]) output = output.concat(groupedList[item]);\n    });\n\n    return output;\n};\n\nvar loadMiddlewares = function(listArr, app){\n    if (!_.isArray(listArr) && !app) return;\n\n    listArr.forEach(function(item){\n        if (item && item.indexPath && fs.existsSync(item.indexPath)) {\n            log.debug('require middleware', item.indexPath);\n            app.use(require(item.indexPath).process);\n        }\n    });\n};\n\nmodule.exports.process = function(app, globalOptions){\n    var config = {\n        loadGroupsOrder: [\n            'request',\n            'pre-html',\n            'default',\n            'html',\n            'response'\n        ],\n        list: {\n            md: {\n                enabled: true,\n                order: -1,\n                group: 'pre-html',\n                indexPath: path.join(appRoot, 'core/middlewares/md.js')\n            },\n            mdTag: {\n                enabled: true,\n                order: 0,\n                group: 'html',\n                indexPath: path.join(appRoot, 'core/middlewares/mdTag.js')\n            },\n            clarify: {\n                enabled: true,\n                order: -2,\n                group: 'request',\n                indexPath: path.join(appRoot, 'core/middlewares/clarify.js')\n            },\n            read: {\n                enabled: true,\n                order: -1,\n                group: 'request',\n                indexPath: path.join(appRoot, 'core/middlewares/read.js')\n            },\n            send: {\n                enabled: true,\n                order: -1,\n                group: 'response',\n                indexPath: path.join(appRoot, 'core/middlewares/send.js')\n            },\n            wrap: {\n                enabled: true,\n                order: -1,\n                group: 'html',\n                indexPath: path.join(appRoot, 'core/middlewares/wrap.js')\n            }\n        }\n    };\n    utils.extendOptions(\n        config,\n        {\n            list: gatherMiddlewares(path.join(app.get('user'), 'node_modules'), new RegExp(/^sourcejs-/), 'core/middleware/index.js')\n        },\n        globalOptions.core.middlewares\n    );\n\n    loadMiddlewares(sortMiddlewares(config.loadGroupsOrder, config.list), app);\n};"
  },
  {
    "path": "core/middlewares/md.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar prettyHrtime = require('pretty-hrtime');\nvar processMd = require(path.join(global.pathToApp,'core/lib/processMd'));\n\n/*\n * Get file content from response and parse contained Markdown markup\n *\n * @param {object} req - Request object\n * @param {object} res - Response object\n * @param {function} next - The callback function\n * */\nexports.process = function (req, res, next) {\n    if (req.specData && req.specData.renderedHtml && req.specData.isMd) {\n        var start = process.hrtime();\n        var plainMarkdown = req.specData.renderedHtml;\n\n        req.specData.renderedHtml = processMd(plainMarkdown, {\n            wrapDescription: true\n        });\n\n        var end = process.hrtime(start);\n        global.log.debug('Markdown processing took: ', prettyHrtime(end));\n\n        req.specData.isMd = false;\n\n        next();\n    } else {\n        next();\n    }\n};"
  },
  {
    "path": "core/middlewares/mdTag.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar processMd = require(path.join(global.pathToApp,'core/lib/processMd'));\n\n/*\n * Get html from response and parse contained Markdown markup\n *\n * @param {object} req - Request object\n * @param {object} res - Response object\n * @param {function} next - The callback function\n * */\nexports.process = function (req, res, next) {\n    if (req.specData && req.specData.renderedHtml) {\n        var html = req.specData.renderedHtml;\n\n        /* find text wrapped with <markdown> */\n        html = html.replace(/<markdown>([\\s\\S]*?)<\\/markdown>/g, function(match) {\n            // strip tags\n            match = match.replace(/<markdown>|<\\/markdown>/g, '');\n\n            // Remove tabs and multiple spaces\n            match = match.replace(/\\t/g, '').replace(/ +(?= )/g, '');\n\n            // render markdown\n            return processMd(match);\n        });\n\n        req.specData.renderedHtml = html;\n    }\n\n    next();\n};"
  },
  {
    "path": "core/middlewares/read.js",
    "content": "'use strict';\n\nvar fs = require('fs-extra');\nvar path = require('path');\n\nvar ejs = require(path.join(global.pathToApp, 'core/ejsWithHelpers.js'));\nvar specUtils = require(path.join(global.pathToApp,'core/lib/specUtils'));\nvar configUtils = require(path.join(global.pathToApp,'core/lib/configUtils'));\n\n//var config = {};\n\n/**\n * Checking if Spec is requested\n *\n * @param {object} req - Request object\n * @param {object} res - Response object\n * @param {function} next - The callback function\n * */\nexports.process = function(req, res, next) {\n    var reqExt = path.extname(req.path);\n\n    // Skip static resources, and dirs witout trailing slash\n    if (reqExt !== \"\" || (reqExt === \"\" && req.path.slice(-1) !== '/')) {\n        next();\n        return;\n    }\n\n    var apiRe = new RegExp('^/api/');\n    var sourceRe = new RegExp('^/sourcejs/');\n\n    // Check if folder is requested but not the reserved namespaces\n    if (!apiRe.test(req.path) && !sourceRe.test(req.path)) {\n        global.specLoadTime = process.hrtime();\n\n        var specPath = specUtils.getFullPathToSpec(req.path);\n        var contextOptions = configUtils.getContextOptions(req.path);\n\n        var specFiles = contextOptions.specInfo && contextOptions.specInfo.specFile ? [contextOptions.specInfo.specFile] : contextOptions.rendering.specFiles;\n\n        var physicalPath = specUtils.getSpecFromDir(specPath, specFiles);\n        var specFile = typeof physicalPath === 'string' ? path.basename(physicalPath) : undefined;\n\n        if (specFile === 'index.html' || !physicalPath) {\n            next();\n            return;\n        }\n\n        // Passing req params\n        var urlParams = req.url.split('?')[1];\n        var paramsString = urlParams ? '?' + urlParams : '';\n\n        // Modifying url and saving params string\n        // TODO: remove in next non-patch release https://github.com/sourcejs/Source/issues/147\n        req.originalUrl = req.url;\n        req.originalPath = req.path;\n        req.url = path.join(req.path, specFile) + paramsString;\n\n        fs.readFile(physicalPath, 'utf8', function (err, data) {\n            if (err) {\n                res.send(err);\n                return;\n            }\n\n            // Filled during middleware processing\n            req.specData = {};\n\n            var specInfo = contextOptions.specInfo || {\n                title: 'No '+ contextOptions.core.common.infoFile +' defined'\n            };\n\n            var capitalizedExtension;\n            if (/.src.html$/.test(physicalPath)) {\n                capitalizedExtension = 'Src';\n            } else {\n                var specFileExtension = path.extname(physicalPath).replace(\".\", \"\");\n                capitalizedExtension = specFileExtension.charAt(0).toUpperCase() + specFileExtension.slice(1);\n            }\n\n            data = data.replace(/^\\s+|\\s+$/g, '');\n\n            // Pre-render Spec contents with EJS\n            if (!specInfo.noEjs) {\n                try {\n                    data = ejs.render(data, {\n                        engineVersion: global.engineVersion,\n                        info: specInfo\n                    }, {\n                        filename: physicalPath\n                    });\n                } catch(err){\n                    global.log.warn('Could not pre-render spec with EJS: ' + req.path, err);\n                }\n            }\n\n            req.specData[\"is\" + capitalizedExtension] = true;\n            req.specData.info = specInfo; // add spec info object to request\n            req.specData.contextOptions = contextOptions; // add context options to request\n            req.specData.renderedHtml = data; // add spec content to request\n\n            next();\n        });\n    } else {\n        next();\n    }\n};"
  },
  {
    "path": "core/middlewares/send.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar prettyHrtime = require('pretty-hrtime');\nvar trackStats = require(path.join(global.pathToApp, 'core/trackStats'));\n\n/**\n * In case if request contains rendered html, then send it as response and stop spec content post-processing.\n *\n * @param {object} req - Request object\n * @param {object} res - Response object\n * @param {function} next - The callback function\n * */\nexports.process = function (req, res, next) {\n    if (req.specData && req.specData.renderedHtml) {\n        trackStats.specs(req);\n\n        global.log.trace('Spec loading time: ', prettyHrtime(process.hrtime(global.specLoadTime)));\n\n        res.send(req.specData.renderedHtml);\n    } else {\n        next();\n    }\n};"
  },
  {
    "path": "core/middlewares/wrap.js",
    "content": "'use strict';\n\nvar fs = require('fs-extra');\nvar path = require('path');\nvar cheerio = require('cheerio');\n\nvar ejs = require(path.join(global.pathToApp, 'core/ejsWithHelpers.js'));\nvar viewResolver = require(path.join(global.pathToApp + '/core/lib/viewResolver.js'));\nvar getHeaderAndFooter = require(global.pathToApp + '/core/headerFooter.js').getHeaderAndFooter;\nvar specUtils = require(path.join(global.pathToApp,'core/lib/specUtils'));\n\n/**\n * Wrap rendered html from request with spec wrapper (header, footer, etc.)\n *\n * @param {object} req - Request object\n * @param {object} res - Response object\n * @param {function} next - The callback function\n * */\nexports.process = function (req, res, next) {\n\n    // Check if we're working with processed file\n    if (req.specData && req.specData.renderedHtml) {\n        var specDir = specUtils.getFullPathToSpec(req.url);\n        var contextOptions = req.specData.contextOptions;\n\n        // get spec content\n        var data = req.specData.renderedHtml.replace(/^\\s+|\\s+$/g, '');\n\n        // get spec info\n        var info = req.specData.info;\n\n        // choose the proper template, depending on page type or defined path\n        var viewParam = 'spec';\n        var context;\n\n        if (info.template) {\n            viewParam = info.template;\n            context = specDir;\n        } else if (info.role === 'navigation') {\n            viewParam = 'navigation';\n        }\n\n        var templatePath = viewResolver(viewParam, contextOptions.rendering.views, context) || viewParam;\n\n        fs.readFile(templatePath, \"utf-8\", function(err, template){\n            if (err) {\n                res.send('EJS template \"' + templatePath + '\" not found. Please check view configuration.');\n\n                return;\n            }\n\n            var $ = cheerio.load(data, {decodeEntities: false});\n\n            var head = '';\n            var $headHook = $('head');\n\n            if ($headHook.length > 0) {\n                head = $headHook.html();\n\n                $('head').remove();\n            }\n\n            var content = '';\n            var $body = $('body');\n            var $html = $('html');\n\n            if ($body.length > 0) {\n                content = $body.html();\n            } else if ($html.length > 0) {\n                content = $html.html();\n            } else {\n                content = $.html();\n            }\n\n            var heagerFooter = getHeaderAndFooter();\n\n            // final data object for the template\n            var templateJSON = {\n                engineVersion: global.engineVersion,\n                content: content,\n                head: head,\n                info: info\n            };\n\n            try {\n                templateJSON.header = ejs.render(heagerFooter.header, templateJSON);\n            } catch(err){\n                var headerMsg = 'Error: EJS could render header template: ' + heagerFooter.headerPath;\n                templateJSON.header = headerMsg;\n                global.log.warn(headerMsg, err.stack);\n            }\n\n            try {\n                templateJSON.footer = ejs.render(heagerFooter.footer, templateJSON, {\n                    filename: heagerFooter.footerPath\n                });\n            } catch(err){\n                var footerMsg = 'Error: EJS could render footer template: ' + heagerFooter.footerPath;\n                templateJSON.footer = footerMsg;\n                global.log.warn(footerMsg, err.stack);\n            }\n\n            // render page and send it as response\n            try {\n                req.specData.renderedHtml = ejs.render(template, templateJSON, {\n                    filename: templatePath\n                });\n            } catch(err){\n                req.specData.renderedHtml = 'Error rendering Spec with EJS: ' + template;\n            }\n\n\n            req.specData.renderedHtml += '\\n<!-- SourceJS version: ' + global.engineVersion + ' -->';\n\n            next();\n        });\n    } else {\n        // proceed to next middleware\n        next();\n    }\n};"
  },
  {
    "path": "core/postInstall.js",
    "content": "'use strict';\n\nvar path = require('path');\nvar fs = require('fs');\nvar link = require('./lib/createLink');\n\nvar pathToApp = __dirname.replace(/^\\w:\\\\/, function (match) {\n    return match.toLowerCase();\n});\n\nvar enginePath = path.join(pathToApp, '../');\nvar userPath = path.join(enginePath, '../../');\nvar internalUserPath = path.join(enginePath, 'user');\nvar parentNodeModules = path.join(enginePath, '../');\n\n// check if sourcejs is installed as a node_package\nif (\n    path.relative(parentNodeModules, enginePath) === 'sourcejs' &&\n    fs.existsSync(path.join(userPath, 'options.js'))\n) {\n    link(userPath, internalUserPath, 'dir');\n    console.log('SourceJS User folder symlink created.');\n}"
  },
  {
    "path": "core/routes/index.js",
    "content": "'use strict';\n\n// Core routes\nrequire(\"./redirects.js\");\n\n// User custom routes\ntry {\n    require(global.app.get('user') + \"/core/routes\");\n} catch(e){}"
  },
  {
    "path": "core/routes/redirects.js",
    "content": "'use strict';\n\n/*\n*\n* This file contains default redirects, to add custom redirects user /user/core/routes/index.js\n*\n* */\n\nvar path = require('path');\nvar express = require('express');\nvar pathToApp = path.dirname(require.main.filename);\n\n\n/*\n*\n* Static routing for SourceJS assets include custom config and follow this priority queue:\n* 1. First check if we have overridden assets from `sourcejs/user/source/assets`\n* 2. Then check if we have minified version of assets in `sourcejs/build/assets`\n* 3. And if nothing found before, app send original assets from `source/assets` folder\n*\n* Engine main build script also minifies CSS and HTML from `sourcejs/user/assets` and puts it in `sourcejs/build/user/assets`\n*\n* */\n\n// Check overrides from user folder\nglobal.app.use('/source/assets', express.static(path.join(pathToApp, global.opts.core.common.pathToUser, 'source/assets')));\n\n// Check if there's minified assets\nglobal.app.use('/source/assets', express.static(path.join(pathToApp,'build/assets')));\nglobal.app.use('/assets', express.static(path.join(pathToApp, 'build', global.opts.core.common.pathToUser, 'assets')));\n\n// Redirecting core client-side file requests to app root paths\nglobal.app.use('/source/assets', express.static(path.join(pathToApp, 'assets')));\n\n\n// Custom routes\nglobal.app.use('/docs', express.static(path.join(pathToApp, '/docs')));\nglobal.app.use('/jsdoc', express.static(path.join(pathToApp, '/jsdoc')));\nglobal.app.use('/test', express.static(path.join(pathToApp, '/assets/test')));"
  },
  {
    "path": "core/trackInstall.js",
    "content": "'use strict';\n\nvar path = require('path');\n\nvar rootPath = __dirname.replace(/^\\w:\\\\/, function (match) {\n    return match.toLowerCase();\n});\nvar enginePath = global.pathToApp = path.join(rootPath, '../');\n\nvar loadOptions = require('./loadOptions');\nvar options = global.opts = loadOptions(enginePath);\n\nvar trackStats = require(path.join(global.pathToApp, 'core/trackStats'));\n\nif (process.env.CI) {\n    options.core.tracking.enabled = false;\n}\n\nif (options && options.core && options.core.tracking && options.core.tracking.enabled) {\n    trackStats.event({\n        group: 'install',\n        event: 'default'\n    });\n\n    console.log('[SOURCEJS] Note: engine tracks anonymous usage statistics. To disable it, edit `core.tracking` configuration.');\n} else {\n    trackStats.event({\n        group: 'install',\n        event: 'disabled tracking'\n    }, true);\n}"
  },
  {
    "path": "core/trackStats.js",
    "content": "'use strict';\n\nvar url = require('url');\nvar _ = require('lodash');\nvar path = require('path');\nvar device = require('device');\nvar macaddress = require('macaddress');\nvar ua = require('universal-analytics');\nvar log = require(path.join(global.pathToApp, 'core/logger')).log;\nvar utils = require(path.join(global.pathToApp, 'core/lib/utils'));\nvar crypto = require('crypto');\n\nvar config = {\n    enabled: true,\n    trackingId: 'UA-66924051-2'\n};\n\nutils.extendOptions(\n    config,\n    global.opts.core.tracking\n);\n\nif (process.env.CI || (global.commander && global.commander.test)) {\n    config.enabled = false;\n}\n\nvar generateMachineID = function(){\n    var macNums = macaddress.networkInterfaces();\n    var unique = '';\n\n    _.forOwn(macNums, function(val){\n        if (val.mac) {\n            unique += val.mac;\n        } else if (val.ipv4) {\n            unique += val.ipv4;\n        }\n    });\n\n    return 'host-' + crypto.createHash('md5').update(unique).digest('hex').slice(0, 5);\n};\n\nvar machineID = generateMachineID();\nvar hostVisitor = ua(config.trackingId, machineID, {strictCidFormat: false});\n\nvar _trackPage = function(opts){\n    if (\n        !config.enabled ||\n        !opts.pageName ||\n        (opts.ua && device(opts.ua).is('bot'))\n    ) return;\n\n    var visitor = hostVisitor;\n    var uid = machineID;\n\n    if (opts.sessionID) {\n        uid = opts.sessionID;\n        visitor = ua(config.trackingId, uid, {strictCidFormat: false});\n    }\n\n    var payload = {\n        dp: opts.pageName,\n        ds: machineID,\n        cs: machineID,\n        cid: uid,\n        uid: uid\n    };\n\n    log.trace('track page', opts.pageName);\n    log.trace('as a visitor', visitor);\n\n    if (opts.ua) payload.ua = opts.ua;\n\n    visitor.pageview(payload).send();\n};\n\n// Track host-initiated events (by unique machine id)\nvar _trackEvent = function(opts, force){\n    force = process.env.CI ? false : force;\n\n    if (!force && !config.enabled || !opts.event) return;\n\n    var visitor = hostVisitor;\n    var uid = machineID;\n    var group = opts.group || 'default';\n\n    if (opts.sessionID) {\n        uid = opts.sessionID;\n        visitor = ua(config.trackingId, uid, {strictCidFormat: false});\n    }\n\n    log.trace('track event', group + ':' + opts.event);\n    log.trace('as a visitor', visitor);\n\n    visitor.event({\n        ec: group,\n        ea: opts.event,\n        ds: machineID,\n        cs: machineID,\n        cid: uid,\n        uid: uid\n    }).send();\n};\n\nvar getSessionID = module.exports.getSessionID = function(req) {\n    var sessionID = req.sessionID;\n    var host = req.headers && req.headers.host ? req.headers.host : undefined;\n\n    if (host && (/^localhost/.test(host) || /^127.0.0.1/.test(host))) {\n        sessionID = machineID;\n    } else if (req.cookies && req.cookies['source-track']) {\n        sessionID = req.cookies['source-track'];\n    }\n\n    return sessionID;\n};\n\n// Track specs\nmodule.exports.specs = function(req) {\n    var pageName = 'spec';\n\n    var parsedUrl = url.parse(req.url, true);\n    var q = parsedUrl.query || {};\n    var ua = req.headers && req.headers['user-agent'] ? req.headers['user-agent'] : undefined;\n\n    if (q.internal) return;\n\n    if (req.originalPath === '/') {\n        pageName = '/';\n    } else if (req.specData && req.specData.info && req.specData.info.role === 'navigation') {\n        pageName = 'navigation';\n    }\n\n    _trackPage({\n        sessionID: getSessionID(req),\n        pageName: pageName,\n        ua: ua\n    });\n};\n\nmodule.exports.page = _trackPage;\nmodule.exports.event = _trackEvent;"
  },
  {
    "path": "core/unflat.js",
    "content": "'use strict';\n\nfunction unflatten(target, opts) {\n    opts = opts || {};\n\n    var delimiter = opts.delimiter || '.',\n        result = {};\n\n    if (Object.prototype.toString.call(target) !== '[object Object]') {\n        return target;\n    }\n\n    // safely ensure that the key is\n    // an integer.\n    function getkey(key) {\n        var parsedKey = Number(key);\n\n        return (isNaN(parsedKey) || key.indexOf('.') !== -1)? key : parsedKey;\n    }\n\n    Object.keys(target).forEach(function(key) {\n        var split = key.split(delimiter),\n            key1 = getkey(split.shift()),\n            key2 = getkey(split[0]),\n            recipient = result;\n\n        while (key2 !== undefined) {\n            if (recipient[key1] === undefined) {\n                recipient[key1] = ( (typeof key2 === 'number' && !opts.object)? [] : {});\n            }\n\n            recipient = recipient[key1];\n            if (split.length > 0) {\n                key1 = getkey(split.shift());\n                key2 = getkey(split[0]);\n            }\n        }\n\n        // unflatten again for 'messy objects'\n        if (recipient[key1] === undefined) recipient[key1] = unflatten(target[key], opts);\n        // if there is already exist field that may\n        // be overwritten with low-level structure\n        else if (opts.overwrite) recipient[key1][opts.overwrite] = unflatten(target[key], opts);\n    });\n\n    return result;\n}\n\nmodule.exports = unflatten;"
  },
  {
    "path": "core/views/404.ejs",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"source-page-role\" content=\"navigation\">\n    <title>404</title>\n\n    <!-- Source default resources -->\n        <link href=\"/source/assets/css/source.css\" rel=\"stylesheet\" data-source=\"core\">\n        <script src=\"/source/assets/js/require.bundle.js\" data-source=\"core\"></script>\n        <script src=\"/source/assets/js/enter-the-source.js\" data-source=\"core\"></script>\n    <!-- /Source default resources -->\n</head>\n<body>\n    <div class=\"source_container\">\n        <%- header %>\n        <div class=\"source_main source_col-main\" role=\"main\">\n\n            <div class=\"source_catalog\">\n                <h2 class=\"source_catalog_title\">404</h2>\n                <div class=\"source_catalog_tx\">Page not found</div>\n            </div>\n\n        </div>\n        <%- footer %>\n    </div>\n</body>\n</html>"
  },
  {
    "path": "core/views/auth-done.ejs",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <title>Github OAuth</title>\n    <style type=\"text/css\">\n        body { overflow: hidden; margin: 0; text-align: center; }\n    </style>\n</head>\n<body>\n    <img src=\"/source/assets/i/github-loagind.gif\" width=\"500\" alt=\"Loading\">\n    <script type=\"text/javascript\">\n        window.addEventListener('load', function() {\n            var data;\n            try {\n               data = JSON.parse(\"<%= user %>\".split(\"&quot;\").join('\"'));\n            } catch(e) {\n                console.log('incorrect user data', e);\n            }\n            if (!data instanceof Object || !data.id) {\n                window.location = \"/auth/github\";\n            } else {\n                opener.sourcejs.__auth.done(data);\n            }\n        });\n    </script>\n</body>\n</html>\n"
  },
  {
    "path": "core/views/clarify/clear.ejs",
    "content": "<!DOCTYPE html>\n<!--[if IE 7]>         <html class=\"ie7\"> <![endif]-->\n<!--[if IE 8]>         <html class=\"ie8\"> <![endif]-->\n<!--[if IE 9]>         <html class=\"ie9\"> <![endif]-->\n<!--[if gt IE 9]><!--> <html> <!--<![endif]-->\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <title><%= title %></title>\n\n    <script src=\"/source/assets/js/require.bundle.js\" data-source=\"core\"></script>\n\n    <%- headCssLinks %>\n    <%- headCssStyles %>\n\n    <% if(!nojs) { %>\n        <%- headScripts %>\n    <% } %>\n</head>\n<body class=\"source_clarify __clear\">\n    <div class=\"source_clarify_content\">\n        <% for(var i = 0; i < sections.length; i++) { %>\n            <% for(var j = 0; j < sections[i].html.length; j++) { %>\n                <%- sections[i].html[j] %>\n            <% } %>\n        <% } %>\n    </div>\n\n    <%- bodyCssLinks %>\n    <%- bodyCssStyles %>\n\n    <% if(!nojs) { %>\n        <%- bodyScripts %>\n    <% } %>\n</body>\n</html>"
  },
  {
    "path": "core/views/clarify/default.ejs",
    "content": "<!DOCTYPE html>\n<!--[if IE 7]>         <html class=\"ie7\"> <![endif]-->\n<!--[if IE 8]>         <html class=\"ie8\"> <![endif]-->\n<!--[if IE 9]>         <html class=\"ie9\"> <![endif]-->\n<!--[if gt IE 9]><!--> <html> <!--<![endif]-->\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <title><%= title %></title>\n\n    <link href=\"/source/assets/css/source.css\" rel=\"stylesheet\" data-source=\"core\">\n    <script src=\"/source/assets/js/require.bundle.js\" data-source=\"core\"></script>\n    <script src=\"/source/assets/js/clarify.js\" data-source=\"core\"></script>\n\n    <%- headCssLinks %>\n    <%- headCssStyles %>\n\n    <% if(!nojs) { %>\n        <%- headScripts %>\n    <% } %>\n\n    <link href=\"/source/assets/css/clarify.bundle.css\" rel=\"stylesheet\">\n</head>\n<body class=\"source_clarify\">\n    <div class=\"source_clarify_content\">\n        <% for(var i = 0; i < sections.length; i++) { %>\n            <h2 class=\"source_section_h\"><%- sections[i].visualID %>. <%- sections[i].header %></h2>\n\n            <% for(var j = 0; j < sections[i].html.length; j++) { %>\n                <div class=\"source_example\">\n                    <%- sections[i].html[j] %>\n                </div>\n            <% } %>\n        <% } %>\n    </div>\n    <div class=\"js-source_clarify_panel\"></div>\n\n    <%- bodyCssLinks %>\n    <%- bodyCssStyles %>\n\n    <% if(!nojs) { %>\n        <%- bodyScripts %>\n    <% } %>\n\n    <!-- Important data for clarify panel -->\n    <%- clarifyData %>\n</body>\n</html>"
  },
  {
    "path": "core/views/clean-spec.ejs",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <title><%= info.title %></title>\n    <meta name=\"author\" content=\"<%= info.author %>\">\n    <% if (info.keywords !== '') {%>\n    <meta name=\"keywords\" content=\"<%= info.keywords %>\">\n    <% } %>\n\n    <!-- Source default resources -->\n        <link href=\"/source/assets/css/source.css\" rel=\"stylesheet\" data-source=\"core\">\n        <script src=\"/source/assets/js/require.bundle.js\" data-source=\"core\"></script>\n        <script src=\"/source/assets/js/enter-the-source.js\" data-source=\"core\"></script>\n    <!-- /Source default resources -->\n\n    <%- head %>\n</head>\n<body class=\"source_page __spec\">\n    <div class=\"source_container\">\n        <%- header %>\n        <div class=\"source_main source_col-main\" role=\"main\"><%- content %></div>\n        <%- footer %>\n    </div>\n</body>\n</html>"
  },
  {
    "path": "core/views/doc.ejs",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <title><%= info.title %></title>\n    <meta name=\"author\" content=\"<%= info.author %>\">\n    <% if (info.keywords !== '') {%>\n    <meta name=\"keywords\" content=\"<%= info.keywords %>\">\n    <% } %>\n\n    <!-- Your master-app styles -->\n        <link href=\"/docs/data/bootstrap.css\" rel=\"stylesheet\">\n    <!-- /Your master-app styles -->\n\n    <!-- Source default resources -->\n        <link href=\"/source/assets/css/source.css\" rel=\"stylesheet\" data-source=\"core\">\n        <script src=\"/source/assets/js/require.bundle.js\" data-source=\"core\"></script>\n        <script src=\"/source/assets/js/enter-the-source.js\" data-source=\"core\"></script>\n    <!-- /Source default resources -->\n\n    <%- head %>\n</head>\n<body class=\"source_page __spec\">\n    <div class=\"source_container\">\n        <%- header %>\n        <div class=\"source_main source_col-main\" role=\"main\">\n            <h1><%= info.title %></h1>\n            <div class=\"source_header-meta\">v.<%- engineVersion %></div>\n            <%- content %>\n        </div>\n        <%- footer %>\n    </div>\n</body>\n</html>"
  },
  {
    "path": "core/views/navigation.ejs",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"source-page-role\" content=\"navigation\">\n    <title><%= info.title %></title>\n\n    <!-- Source default resources -->\n        <link href=\"/source/assets/css/source.css\" rel=\"stylesheet\" data-source=\"core\">\n        <script src=\"/source/assets/js/require.bundle.js\" data-source=\"core\"></script>\n        <script src=\"/source/assets/js/enter-the-source.js\" data-source=\"core\"></script>\n    <!-- /Source default resources -->\n\n    <%- head %>\n</head>\n<body class=\"source_page __navigation\">\n    <div class=\"source_container\">\n        <%- header %>\n        <div class=\"source_main source_col-main\" role=\"main\">\n            <%- content %>\n        </div>\n        <%- footer %>\n    </div>\n</body>\n</html>"
  },
  {
    "path": "core/views/spec.ejs",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <title><%= info.title %></title>\n    <meta name=\"author\" content=\"<%= info.author %>\">\n    <% if (info.keywords !== '') {%>\n    <meta name=\"keywords\" content=\"<%= info.keywords %>\">\n    <% } %>\n\n    <!-- Your master-app styles -->\n        <!--<link href=\"/data/res/css/portal.css\" rel=\"stylesheet\">-->\n    <!-- /Your master-app styles -->\n\n    <!-- Source default resources -->\n        <link href=\"/source/assets/css/source.css\" rel=\"stylesheet\" data-source=\"core\">\n        <script src=\"/source/assets/js/require.bundle.js\" data-source=\"core\"></script>\n        <script src=\"/source/assets/js/enter-the-source.js\" data-source=\"core\"></script>\n    <!-- /Source default resources -->\n\n    <%- head %>\n</head>\n<body class=\"source_page __spec\">\n    <div class=\"source_container\">\n        <%- header %>\n        <div class=\"source_main source_col-main\" role=\"main\"><%- content %></div>\n        <%- footer %>\n    </div>\n</body>\n</html>"
  },
  {
    "path": "core/watch/childWatch.js",
    "content": "// Runs as a child process through forever-monitor\n\n'use strict';\n\nvar path = require('path');\nvar watch = require('gulp-watch');\nvar deepExtend = require('deep-extend');\nvar commander = require('commander');\n\n// Parse arguments\ncommander\n    .option('-r, --root [string]', 'Root path of the SourceJS app', '../../')\n    .option('-l, --log [string]', 'Log level', 'info')\n    .parse(process.argv);\n\nglobal.commander = global.commander || commander;\n\n// Normalized path to master app\nglobal.pathToApp = global.pathToApp || path.join(__dirname, commander.root).replace(/\\\\/g, '/').replace(/\\/$/, '');\n\nvar loadOptions = require(path.join(global.pathToApp, 'core/loadOptions'));\nglobal.opts = global.opts || loadOptions(path.resolve(global.pathToApp), true);\n\nvar logger = require(path.join(global.pathToApp, 'core/logger'));\nvar log = logger.log;\nglobal.log = log;\n\nvar utils = require(path.join(global.pathToApp, 'core/lib/utils'));\nvar fileTree = require(path.join(global.pathToApp, 'core/file-tree'));\n\nvar config = {\n    enabled: true,\n    verbose: false,\n    glob: [\n        '!' + global.pathToApp + '/**/.*/**',\n        '!' + global.pathToApp + '/**/bower_components/**',\n        '!' + global.pathToApp + '/**/node_modules/**',\n\n        global.pathToApp + '/**/' + global.opts.core.common.infoFile,\n        global.pathToApp + '/' + global.opts.core.common.pathToUser + '/**/' + global.opts.core.common.infoFile\n    ],\n    ignoreHiddenFiles: true\n};\n// Overwriting base options\nutils.extendOptions(config, global.opts.core.watch);\n\nvar prepareData = function(data, targetFile){\n    var dir = path.dirname(targetFile);\n\n    return deepExtend(fileTree.getSpecMeta(dir), data);\n};\n\nif (config.enabled){\n    if (!global.opts.core.watch.foreverWatchEnabled) {\n        global.log.debug('Specs watcher process started.');\n    }\n\n    watch(config.glob, {\n        verbose: config.verbose\n    }, function(vinyl){\n        var filePath = vinyl.path.replace(/\\\\/g, '/');\n        var event = vinyl.event;\n        var cleanPath = filePath.replace(global.pathToApp + '/', '').replace(global.opts.core.common.pathToUser +'/', '');\n        var specID = path.dirname(cleanPath);\n        var rawContents;\n\n        global.log.debug('event', event);\n        global.log.debug('changed file', filePath);\n\n        try {\n            rawContents = JSON.parse(String(vinyl.contents));\n        } catch(e) {}\n\n        // TODO: run full re-index on huge changes (like git update)\n\n        if (rawContents && (event === 'change' || event === 'add')) {\n            var dataToSend = {};\n            dataToSend[specID + '/specFile'] = prepareData(rawContents, filePath);\n\n            fileTree.updateFileTree(dataToSend, true);\n        }\n\n        if (typeof rawContents === 'undefined' || event === 'unlink') {\n            fileTree.deleteFromFileTree(specID);\n        }\n    });\n}"
  },
  {
    "path": "core/watch/index.js",
    "content": "'use strict';\n\nvar forever = require('tinyforever');\nvar path = require('path');\nvar utils = require(path.join(global.pathToApp, 'core/lib/utils'));\n\nvar config = {\n    enabled: true,\n    forever: {\n        silent: false,\n        max: 10,\n        minUptime: 1000,\n        args: ['--log='+global.commander.log, '--root=../../']\n    }\n};\n// Overwriting base options\nutils.extendOptions(config, global.opts.core.watch);\n\nif (config.enabled) {\n    var child = new (forever.Monitor)(path.join(global.pathToApp, 'core/watch/childWatch.js'), config.forever);\n\n    child.on('start', function() {\n        global.log.debug('Specs watcher process started with forever.');\n    });\n\n    child.on('stderr', function() {\n        global.log.warn('Specs watcher error:');\n    });\n\n    child.on('restart', function() {\n        global.log.debug('Restarting the Specs watcher process...');\n    });\n\n    child.on('exit', function () {\n        global.log.error('Specs watcher stopped. Re-run app to activate navigation watcher.');\n    });\n\n    child.start();\n\n    process.on('exit', function () {\n        child.stop();\n    });\n}"
  },
  {
    "path": "docs/README.md",
    "content": "Engine documentation comes packed to every SourceJS instance, run `/docs` section locally or visit http://sourcejs.com/docs."
  },
  {
    "path": "docs/api/index.src.html",
    "content": "<div class=\"source_subhead\">\n    <h1>API documentation</h1>\n</div>\n\n<div class=\"source_catalog\" data-nav=\"/docs/api\" data-tag=\"without-tag\"></div>\n\n<a href=\"/docs\" class=\"source_a_hl\">Go to engine documentation</a>"
  },
  {
    "path": "docs/api/info.json",
    "content": "{\n    \"title\": \"API documentation\",\n    \"role\": \"navigation\"\n}"
  },
  {
    "path": "docs/api/load-events/info.json",
    "content": "{\n    \"keywords\": \"events, spec loaded\",\n    \"title\": \"Spec Load Event\",\n    \"template\": \"doc\"\n}\n"
  },
  {
    "path": "docs/api/load-events/readme.md",
    "content": "﻿Spec load event API helps to organize Spec loading flow, and define the final load event of all content, modules and plugins.\n\n## The Problem\n\nAs SourceJS is modular engine, any Spec page could be featured with many client-side plugins, which will operate with DOM during the page load. To resolve those cases, when modules or plugins need to interact with each other, or wait till all DOM operations are done, we made Spec Load Event.\n\nLoad event is recommended to use in any SourceJS plugins that make changes to DOM during Spec load. Currently used by HTML API for PhantomJS, and various client-side plugins.\n\nExample use cases:\n* When Specs page is loaded through PhantomJS, we must know when page is done building, considering all DOM interactions from plugins\n* When we open Spec page with link to section, we must be sure, that page scroll will remain in the right position after load\n\n## Basics\n\nEach plugin that interacts with DOM must be registered at Load Event API global object `window.source.loadEvents`.\n\nRecommended plugin definition:\n\n```js\nwindow.source = window.source || {};\nwindow.source.loadEvents = window.source.loadEvents || {};\nwindow.source.loadEvents.moduleName = window.source.loadEvents.moduleName || {\n\ttimeout: '300',\n\tfinishEvent: 'moduleNameFinished',\n\tupdateEvent: 'moduleNameFinishedUpdated'\n};\n```\n\nAs module load sequence could be random, first we init main data object `window.source.loadEvent`, then define options for our module.\n\nNote: if you are using RequireJS, then be sure that module is registered before any `define`/`require` call.\n\n```js\nwindow.source = window.source || {};\n...\ndefine([], function(){ ... });\n```\n\n\n## Options\n\nRegistering new module to Load Event API we pass these options:\n\n| Key | Type | Description |\n|---|---|---|\n| finishEvent | String | Name of the Finish event, that registered module will emit, when finishes it's work with DOM. |\n| updateEvent | String | Name of the Update event, that module will emit to postpone ready state and reset timeout counter. |\n| [timeout] | Number | Timeout (optional, by default is set to `1000`) is used to define approximate eval time. |\n\nEmit `finishEvent`, when you know that your module done working with the DOM, if it won't be called, API will rely on timeout. The default timeout is always used for any registered module, when it's passed, we consider that module is done his job.\n\nIf the module is working with DOM quite actively with few iterations, it's recommended to emit `updateEvent`, to reset timeout counter on each iteration.\n\n\n## Emitting Events\n\nRecommended way of emitting `finishEvent` or `updateEvent` is:\n\n```js\nif (window.CustomEvent) {\n\tnew CustomEvent('moduleNameFinished');\n} else {\n\tvar event = document.createEvent('CustomEvent');\n\tevent.initCustomEvent('moduleNameFinished', true, true);\n}\n```\n\nWhere event name `moduleNameFinished` is the same as we defined during module registration.\n\n## Global Finish Event\n\nWhen all registered modules to Load Event API are loaded, or timeout is passed, API emits event named `allPluginsFinish`.\n\n### Check plugin status without event\n\nIf event was shouted before you subscribe, you can check global storage object for any status of registered plugins.\n\n```js\nwindow.source.loadEvents.moduleName.finish\nwindow.source.loadEvents.pluginName.finish\n```\n\n## Grouping modules\n\nTo define module bundles, and control their load state, you can also define a group with array of module names:\n\n```js\nwindow.source = window.source || {};\nwindow.source.loadEvents = window.source.loadEvents || {};\nwindow.source.loadEvents.groupName1 = ['moduleName1', 'pluginName2'];\n```\n\nWhen all modules and plugins in group are done their job, we emit `groupName1GroupFinish` event, where `groupName1` is your defined name."
  },
  {
    "path": "docs/api/plugins/info.json",
    "content": "{\n    \"keywords\": \"plugins, middlewares\",\n    \"title\": \"Writing SourceJS Plugins and Middlewares\",\n    \"template\": \"doc\"\n}"
  },
  {
    "path": "docs/api/plugins/readme.md",
    "content": "SourceJS core contains only default APIs for most common use cases, all specific features we move to plugins, that could contain back-end and client-side improvements.\n\n## Starting Templates\n\nTo easily bootstrap new SourceJS items, we extended our official [SourceJS Generator](https://github.com/sourcejs/generator-sourcejs) with default templates for all types of engine components:\n\n```html\n$ yo sourcejs:plugin\n$ yo sourcejs:middleware\n```\n\nBesides generators, we also have abstract plugin demos, which will be always updated to current engine APIs:\n\n* [sourcejs-tpl-plugin](https://github.com/sourcejs/sourcejs-tpl-plugin)\n* [sourcejs-tpl-middleware](https://github.com/sourcejs/sourcejs-tpl-middleware)\n\nWe are continuously improving mentioned demos, adding new best practices and API usage examples.\n\n## SourceJS Plugins and Middleware Structure\n\nThe recommended way of structuring SourceJS plugins is to define them as [NPM packages](https://docs.npmjs.com/misc/developers). All public plugins must be named by corresponding prefix `sourcejs-*`, so they could be easily searchable through global repository.\n\nAll plugins must be installed in `sourcejs/user` directory:\n\n```html\n/source\n  user\n    package.json\n    node_modules\n      sourcejs-plugin1\n      sourcejs-plugin2\n```\n\n### Internal plugins\n\nSourceJS is an open source project, and we expect our community to be open as we do, sharing their features and engine extends to public. But in case you prefer to have private plugins, there are few ways solving this case:\n\n* Create private NPM plugins, installing them from your closed repositories\n* Commit `sourcejs/user/node_modules` contents to your common repository\n* Using `sourcejs/user/plugins` folder for your custom client-side dependencies and `sourcejs/user/app.js` to extend SourceJS back-end\n\nLast mentioned option is deprecated, and not recommended to use, yet you can still find some mentions of this approach in `options.js` and `moduleLoader.js`.\n\n## Plugins\n\n### Client-side\n\nThe entry point of plugins client-side is `assets/index.js` file in root of plugin folder.\n\nEach plugin works the same as any internal JavaScript module and is loaded through [RequireJS](http://requirejs.org/) using `moduleLoader.js`. With only one difference - internal modules must be enabled in `options.js` (`assets.modulesEnabled`) but plugin JavaScript modules are enabled by default.\n\nFrom your plugin, you can call any libraries and internal APIs, defining your dependencies in AMD module:\n\n```js\ndefine([\n    'jquery',\n    'sourceModules/module',\n    'sourceModules/css'\n], function ($, module, css) {});\n```\n\nTo access other plugin assets, you can use direct path to your component:\n\n```js\ndefine([\n    'node_modules/sourcejs-plugin/assets/js/innerDep',\n    'text!node_modules/sourcejs-plugin/assets/templates/tpl.html'\n], function (innerDep, tpl) {});\n```\n\n#### Connecting Plugin JS Modules\n\nAs we mentioned above, when SourceJS plugin is installed through NPM, main client-side module of your plugin (`index.js`) is connected by default.\n\nTo achieve this, we generate custom RequireJS configuration through default build task and dynamically extend `options.js`, filling installed modules to `assets.npmPluginsEnabled` with `true`.\n\nTo disable client-side module of any installed npm Plugins, you can edit the module definition in `user/options.js`:\n\n```js\n{\n  core: {},\n  assets: {\n    npmPluginsEnabled: {\n      'sourcejs-plugin': false\n    }\n  }\n}\n```\n\n### Back-end\n\nPlugins back-end is exposed in `core/index.js` and is automatically loaded during SourceJS app initialization, before importing `user/app.js` extender. It's a simple Node.js module, from which you can use any existing dependencies in SourceJS or define your own.\n\nAs SourceJS back-end uses [ExpressJS](http://expressjs.com), it's recommended to use this framework for creating APIs and custom routers.\n\n### Examples\n\n* [sourcejs-react](https://www.npmjs.com/package/sourcejs-react) - rendering React components in specs\n* [sourcejs-bubble](https://github.com/sourcejs/sourcejs-bubble) - comments for examples (have client-side and back-end features)\n* [sourcejs-spec-dependencies](https://github.com/sourcejs/sourcejs-spec-dependencies) - exposing Spec Dependencies (have client-side and back-end features)\n* [sourcejs-spec-status](https://github.com/sourcejs/sourcejs-spec-status)\n* [sourcejs-specs-linting](https://github.com/sourcejs/sourcejs-specs-linting)\n\n## Middlewares\n\nSourceJS Middleware is basically the same as Plugin item, but it has only back-end part and its entry point must be defined in `core/middleware/index.js` path.\n\nAs SourceJS uses [ExpressJS](http://expressjs.com), middleware development constraints are bound to this framework.\n\nMost common use cases of middleware in SourceJS in modification of Spec file contents during the request.\n\n### Connecting The Middleware\n\nMiddlewares are automatically loaded after installation, and are evaluated on each request before `sourcejs/core/middleware/wrap.js` and `sourcejs/core/middleware/send.js`.\n\n`wrap.js` is wrapping spec page (`index.src.html`, `index.md` and etc) contents in a pre-defined a view template from `sourcejs/core/views` or user custom path `sourcejs/user/core/views` using [EJS](http://www.embeddedjs.com/).\n\n`send.js` is used in case when we modify Spec contents, as we do with `*.src.html` and all other middlewares. Modified Spec content is passed through `req.specData.renderedHtml` object, which each middleware can modify during the request handling process and which then is sent to the client's browser.\n\n### Modifying Spec contents\n\nWe alredy mentioned before that Middlewares use `req.specData.renderedHtml` object to get processed Spec contents and modify them.\n\nAs any other basic ExpressJS middleware, at the processing start, we get `req` object on input and pass it to the next handler on each request. This architecture allows us to modify `req` contents on each step.\n\nIn 0.4.0 middlewares from plugins are connected one by one, sorted by alphabet. In nearest releases we will add a feature for controlling the queue.\n\n### Examples\n\n* [sourcejs-jade](https://github.com/sourcejs/sourcejs-jade)\n* [sourcejs-smiles](https://github.com/sourcejs/sourcejs-smiles)"
  },
  {
    "path": "docs/api/readme.md",
    "content": "Internal API documentation."
  },
  {
    "path": "docs/api/rest-api/info.json",
    "content": "{\n    \"keywords\": \"api, rest\",\n    \"title\": \"REST API\",\n    \"template\": \"doc\"\n}\n"
  },
  {
    "path": "docs/api/rest-api/readme.md",
    "content": "﻿From 0.4.0 version, SourceJS started to grow own REST API for flexible plugins development and easy side services integration. API provides full access to Spec contents, navigation tree and other useful features.\n\n## GET Specs\n\n[Get](/api/specs) access to Specs navigation tree with filtering by various options. This Navigation tree is used to build search, catalog pages and digests, here you can also read all `info.json` configuration of each Spec.\n\n```\nGET http://localhost:8080/api/specs\n```\n\n### Parameters\n\nAll parameters must be passed as JSON with request, except `id` that accepts regular param as well. List of available params:\n\n| Param | Value | Description |\n|---|---|---|\n| id | String | Get specific Spec information by ID - `base/btn`, `docs/spec` ([example](/api/specs?id=docs/spec)). |\n| cats | Boolean | Set to true, if you want to get categories info either. |\n| filter | Object | Return list of items by filter (filter something that we want to see). |\n| filterOut | Object | Return list of items by filter (filter something that we DON'T want to see). |\n\nPossible combinations:\n\n```\n[cats], [id|filter|filterOut], [filter|filterOut]\n```\n\n### Filters\n\nThese parameters are equal for `filter` and `filterOut` objects:\n\n| Param | Value | Description |\n|---|---|---|\n| filter.cats, filterOut.cats | Array with strings | Filter by Spec categories. |\n| filter.fields, filterOut.fields | Array with strings | Filter by existing files in `info.json`. |\n| filter.tags, filterOut.tags | Array with strings | Filter by specified tags in `info.json`. |\n\nAnd another custom param for filter:\n\n| Param | Value | Description |\n|---|---|---|\n| filter.forceTags | Array with strings | Filter by specified tags in `info.json`. |\n\n`filter.forceTags` has priority over `filterOut.tags`, if you want to force get all specs having specific tags.\n\n### Raw\n\nGet raw, nested Navigation tree:\n\n```\nGET http://localhost:8080/api/specs/raw\n```\n\n### Examples\n\nReturn all specs that has info field:\n\n```\n$ curl -H \"Content-Type: application/json\" -X GET -d '{\"filter\":{\"fields\":[\"info\"]}}' http://localhost:8080/api/specs\n```\n\nReturn all specs except those, which have info field:\n\n```\n$ curl -H \"Content-Type: application/json\" -X GET -d '{\"filterOut\":{\"fields\":[\"info\"]}}' http://localhost:8080/api/specs\n```\n\n## GET HTML\n\n[Get](/api/specs/html) access to Spec examples HTML content.\n\n```\nGET http://localhost:8080/api/specs/html\n```\n\n### Parameters\n\n| Param | Value | Description |\n|---|---|---|\n| id | String | Get specific Spec examples HTML information by ID - `base/btn`, `docs/spec` ([example](/api/specs/html?id=docs/spec)). |\n\n## POST HTML\n\n```\nPOST http://localhost:8080/api/specs/html\n```\n\n### Parameters\n\nParams must be passed as JSON. List of possible params:\n\n| Param | Value | Description |\n|---|---|---|\n| data | Object | Data to post, will be extended on existing data. |\n| unflatten | Boolean | Set true, to unflatten object from `some/spec` before extending on current data. |\n\n#### Data example\n\nData object must contain spec ID and `specFile` pointer, to follow current API storage structure.\n\nBy default API expects to get nested object `docs.api.rest-api.specFile`, but you can also define a flat ID `docs/api/rest-api/specFile`, passing `unflatten:true` together with post request.\n\n```js\n{\n    \"docs/api/rest-api/specFile\": {\n        \"headResources\": {},\n        \"bodyResources\": {},\n        \"contents\": []\n    }\n}\n```\n\n## DELETE HTML\n\n```\nDELETE http://localhost:8080/api/specs/html\n```\n\n### Parameters\n\n| Param | Value | Description |\n|---|---|---|\n| id | String | Spec ID (`some/spec`), that will be deleted from current data.|"
  },
  {
    "path": "docs/auth/info.json",
    "content": "{\n    \"keywords\": \"auth, github\",\n    \"title\": \"Using Github Auth\",\n    \"template\": \"doc\"\n}\n"
  },
  {
    "path": "docs/auth/readme.md",
    "content": "## Quick Start\n\nBefore you start, please make sure that you have referenced GitHub App registered. Please visit [this link](https://developer.github.com/guides/basics-of-authentication/#registering-your-app) to get more information.\n\nIf you allready have registered app replace existed github api key and secret into your local options file, as mentioned [here](/docs/base/#5!).\n\nValues, given below, are created as a demo. They are usable for [local instance](http://127.0.0.1:8080) at `127.0.0.1:8080`\n\n```js\ngithub: {\n    appId: \"cf00a9e7ee5d9d6af36f\",\n    appSecret: \"aebe08e0aa66f6911e4f54df81ce64c9d6e0003b\"\n}\n```\n\nPlease take into account, that auth feature is turned off by default and you have to set related option: `options.modulesEnabled.auth` to `true` in your config.\n\nAfter that, auth feature is able to use.\n\n### Client-side auth control\n\nGitHub login module should be embedded into your `header.inc.html` or any other place you want.\n\nHere is the example:\n\n```html\n<!-- header.inc.html content-->\n      <a class=\"js-hook source_login\"></a>\n<!-- header.inc.html content-->\n```\n\nAuth uses `js-hook` and `source_login` classes for targeting. This hook is defined into `/assets/js/enter-the-source.js` file.\n\n## Auth configuration\n\nAuth configuration is available from your instance [options](/docs/base/#configuration), as it was mentioned above. Here's few of available options:\n\n```js\n// localStorage key for client-side user object\n'storageKey': 'sourcejsUser',\n\n// avatar stub URL\n'defaultAvatarURL': '/source/assets/i/unknown.gif',\n\n// set of client-side control classes\n'classes': {\n    'controlsWrapper': 'source_login',\n    'loginButton': 'source_login-button',\n    'avatar': 'source_login-avatar',\n    'anonymous': 'anonymous',\n    'hook': 'js-hook'\n},\n\n// login/logout button labels\n'labels': {\n    'login': 'Login',\n    'logout': 'Logout'\n}\n```\n\nView the full list in `/assets/js/modules/auth.js` file.\n\n## Auth modules usage\n\nBoth server-side and client-side auth parts are able to use from other modules.\n\nServer-side part provides [The everyauth](https://github.com/bnoguchi/everyauth) API whitch it is based on. Also there are methods either to get or to set GitHub user into temporary users storage.\n\nClient-side part allows to login/logout using Github, to check if user is logined and to get user data."
  },
  {
    "path": "docs/base/info.json",
    "content": "{\n    \"title\": \"Main Engine Documentation\",\n    \"template\": \"doc\"\n}\n"
  },
  {
    "path": "docs/base/readme.md",
    "content": "This page contains main information about SourceJS engine and it's set-up.\n\nSourceJS documentation is rendered by the engine itself and is shipped together with each instance.\n\n## Install\n\nBefore you start, please make sure that [Git](http://git-scm.com/downloads) and [Node.js](http://nodejs.org/download/) are already installed on your system. Then install these NMP packages:\n\n```html\nnpm install -g yo generator-sourcejs\n```\n\nHaving all dependencies in-place you will get a special `yo sourcejs` generator available for new instance initialization:\n\n```html\nmkdir sourcejs && cd sourcejs\nyo sourcejs\n```\n\nTo set-up a new engine instance chose the first option `Init SourceJS in this folder`. Generator also helps to bootstrap new Spec pages or plugins.\n\n### From NPM\n\n[![npm version](https://badge.fury.io/js/sourcejs.svg)](http://badge.fury.io/js/sourcejs)\n\nTo install SourceJS as a NPM package, first clone clean `user` configuration folder and then execute `npm install`.\n\n```html\ngit clone https://github.com/sourcejs/init.git -b npm my-sourcejs && cd my-sourcejs\nnpm install sourcejs --save\nnpm start\n```\n\nStarting from 0.6.0 we're planning to change official install path to one with NPM packages. Yeoman generator will be also replaced by [sourcejs-cli](https://github.com/sourcejs/sourcejs-cli) with commands like `run`, `install` (plugin), `init`, `create`.\n\n### Installing On Windows\n\nIf you're running Windows and have some issues with [JSDom](https://github.com/tmpvar/jsdom) dependencies compilation, please check this [topic](https://github.com/sourcejs/Source/issues/23).\n\nAlternatively with 0.5.6 we prepared a special build without JSDom, until it's full removal from core at 0.6.0.\n\n```html\nnpm install -g yo generator-sourcejs\nmkdir sourcejs && cd sourcejs\nyo sourcejs --branch 0.5.6-no-jsdom\n```\n\nPlease note that Clarify feature is not available in `no-jsdom` version. If you had generator installed before, run `npm update -g generator-sourcejs` (v.0.4.2+ required).\n\nAnd installing same build from NPM:\n\n```html\ngit clone https://github.com/sourcejs/init.git -b npm my-sourcejs && cd my-sourcejs\nnpm install sourcejs@0.5.6-no-jsdom --save\nnpm start\n```\n\n## Commands\n\n### Run\n\nInstallation wizard will offer to start SourceJS right after initialization. To run it manually, trigger this command in newly created folder with SourceJS app:\n\n```html\nnpm start\n```\n\nTo set an alternative server port, pass `-- -p 8081` option.\n\nOther configuration arguments are described in the help section:\n\n```html\nnpm start -- -h\n```\n\n### Build\n\nDuring the initial set-up, generator will build everything for you. To re-build the engine, run this command:\n\n```html\nnpm run build\n```\n\nIt will trigger `npm i` and default build task for updating dependencies and building SourceJS assets. See the full list of [all build tasks available](/docs/build-tasks).\n\n### Update\n\nFor updating SourceJS to a newer version, just pull the latest changes and trigger build:\n\n```html\ngit pull && npm run build\n```\n\n## Creating First Spec\n\nSpecs are the main content files in SourceJS engine, in them you define all your component description and UI code for rendered examples. Originally we use `*.src.html` and `*.md` file templates with custom flavoured syntax. It is also possible to configure other technologies for writing Specs using plugins like [Jade](https://github.com/sourcejs/sourcejs-jade).\n\nWe treat Spec files as an interface, you can construct Spec page in many ways following only few simple rules. Each Spec folder must contain `info.json` with it's meta information and SourceJS compliant markup file. As an essential markup, engine requires only few hooks like `.source_section`, `.source_example` to define content sections and the rest is plain semantic HTML.\n\n### Spec Starting Template\n\n<div class=\"source_note\">\n    After initialization, you get `sourcejs/user` folder, which is the place for all your custom content. All new Specs and configuration of main engine must be done there.\n</div>\n\nThe starting template for new Spec pages can be found in `sourcejs/docs/starting` folder. Copy the contents to a new folder in `source/user/specs` and you'll be ready to write a new spec.\n\n<a href=\"/docs/spec\" class=\"source_a_hl\">Check the SourceJS Spec page documentation.</a>\n\n### Server-side Templating Engines\n\nAs we mentioned before, it's easy to use other server-side templating engines like Jade, you only need to create a simple SourceJS middleware ([example](https://github.com/sourcejs/sourcejs-jade)) or process your sources with Grunt/Gulp.\n\nBy default all files are pre-processed with [EJS](http://ejs.co/), so you're free to use custom EJS features in any spec page - like includes or even plain JavaScript:\n\n```html\n&lt;%- include('filename.html') %&gt;\n&lt;% if (info.title === 'Title') {% &gt; Action! &lt;% } %&gt;\n```\n\n<a href=\"/docs/spec-helpers\" class=\"source_a_hl\">Read more about Spec page generation helpers.</a>\n\n### Client-side Templating Engines\n\nFor client-side templating you don't need any magic, just link Mustache or any other JS library to your page and use it whenever you want.\n\nRemember, SourceJS Specs are a simple static pages, that are then enchanted with client-side scripts and internal APIs.\n\n## Examples\n\nMain [project website](http://sourcejs.com) is based on SourceJS platform, as well as all documentation that you're surfing right now. Engine docs are both viewable on [GitHub](https://github.com/sourcejs/Source/tree/master/docs) and in SourceJS environment.\n\nInspect [Sourcejs.com source code](https://github.com/sourcejs/Sourcejs.com) to get better understanding of the basic `source/user` folder contents with engine configuration.\n\n### Bootstrap Bundle\n\nTo show you how SourceJS based documentation pages could be configured, we prepared a [Bootstrap demo bundle](https://github.com/sourcejs/example-bootstrap-bundle). It represents a recommended way of structuring UI components, keeping all module related technologies in one place.\n\nWe highly encourage you setting up Bootstrap bundle on your SourceJS instance, and use it for experimenting and demoing documentation pages. Pull Requests are very welcome, adding more examples to this bundle, you will help yourself and other users getting more insights on how SourceJS specs could be organized.\n\nRead our how-to articles, to get more information about the [SourceJS catalog set-up](https://github.com/sourcejs/blog-howto/tree/master/catalog-setup).\n\n### Specs Showcase\n\nHighlighting the variety of different ways for organizing Spec pages we gathered another special bundle. View it's source code at [showcase repo](https://github.com/sourcejs/example-specs-showcase) and compare with [rendered result](http://sourcejs.com/specs/example-specs-showcase/).\n\nShowcase includes both native Specs examples, and ones that are rendered with plugins like [sourcejs-contrib-dss](http://github.com/sourcejs/sourcejs-contrib-dss) and [sourcejs-jade](http://github.com/sourcejs/sourcejs-jade).\n\n<a href=\"/docs/spec\" class=\"source_a_hl\">Also check the SourceJS Spec page documentation.</a>\n\n### Style Guide Driven Development\n\nTo get more insights about recommended workflow within Style Guide platform check [this example bundle](https://www.youtube.com/watch?v=KeR8Qhgyb6M) together with short screencast.\n\n<div style=\"max-width: 600px;\"><div style=\"position: relative; padding-bottom: 56.25%;\">\n<iframe width=\"100%\" height=\"100%\" style=\"position: absolute;\" src=\"https://www.youtube.com/embed/KeR8Qhgyb6M\" frameborder=\"0\" allowfullscreen></iframe>\n</div></div>\n\n\n## Configuration\n\nSourceJS engine is highly configurable and allows to override almost any options from your instance set-up using personal configuration file `sourcejs/user/options.js`. All default, and safe to change options are described in base configuration file `sourcejs/options.js`.\n\nWith version 0.5.3 we also introduced context level options `sourcejs-options.js`, which allows to configure any catalog specifically for your needs. Read more about it, and other configuration capabilities in [Engine Configuration](/docs/configuration) doc.\n\n## Plugins\n\nAs a Style Guide Platform we focus on flexibility and ease of integration. All SourceJS core modules are easy to configure and replace with your customized version.\n\nPlugins are working in the same way as core modules, but are kept outside the main platform, allowing to separate specific features.\n\nHere is a list of available plugins:\n\n* [sourcejs-slm](https://github.com/venticco/sourcejs-slm) (new)\n* [sourcejs-md-react](https://github.com/mik01aj/sourcejs-md-react) (new)\n* [sourcejs-contrib-browser-sync](https://github.com/sourcejs/sourcejs-contrib-browser-sync) (new)\n* [sourcejs-react](https://github.com/szarouski/sourcejs-react) (new)\n* [sourcejs-contrib-dss](http://github.com/sourcejs/sourcejs-contrib-dss) (new)\n* [sourcejs-spec-status](https://github.com/sourcejs/sourcejs-spec-status)\n* [sourcejs-crowd-voice](https://github.com/sourcejs/sourcejs-crowd-voice)\n* [sourcejs-jade](https://github.com/sourcejs/sourcejs-jade)\n* [sourcejs-comments](https://github.com/sourcejs/sourcejs-comments)\n* [sourcejs-specs-linting](https://github.com/sourcejs/sourcejs-specs-linting)\n* [sourcejs-spec-dependencies](https://github.com/sourcejs/sourcejs-spec-dependencies)\n* [sourcejs-smiles](https://github.com/sourcejs/sourcejs-smiles)\n\nThese modules are able to extend both front-end and back-end part of the engine. To install any of official plugin, just use `npm install` in your `sourcejs/user` folder (note that some of them needs additional dependencies like [MongoDB](http://www.mongodb.org/) or [CouchDB](http://couchdb.apache.org/)).\n\nFollow [this guide](/docs/api/plugins) to learn how to develop own plugins for SourceJS Platform.\n"
  },
  {
    "path": "docs/build-tasks/info.json",
    "content": "{\n    \"title\": \"Build Tasks\",\n    \"template\": \"doc\"\n}\n"
  },
  {
    "path": "docs/build-tasks/readme.md",
    "content": "Note that these commands are related only to SourceJS engine build and development cycle.\n\nFor building specs and other project related content use own build tasks from `sourcejs/user` folder.\n\n## Scripts\n\nAll automation tasks are triggered through NPM scripts listed in `package.json`.\n\nHere's a list of most common commands:\n\n```js\n$ npm run build\n$ npm start\n\n$ npm run watch\n$ npm run watch:css\n\n$ npm run lint\n\n$ npm test\n$ npm run test:unit\n$ npm run test:func\n```\n\n* `npm run build` - default build command for preparing SourceJS assets, used as a post-install hook and after plugin installation\n* `npm start` - runs the engine\n* `npm run watch` - runs engine sources watcher, used in core client-side modules development"
  },
  {
    "path": "docs/clarify/info.json",
    "content": "{\n    \"title\": \"Clarify - Spec Section Testing Environment\",\n    \"template\": \"doc\"\n}"
  },
  {
    "path": "docs/clarify/readme.md",
    "content": "SourceJS middleware, that allows to open separate documentation examples in custom or clean environment for component testing and development.\n\n## General information\n\nClarify is an [expressJS](http://expressjs.com/) middleware built into SourceJS engine. Easy configurable through URL parameters in Spec pages:\n\n```html\nhttp://localhost:8080/docs/spec/?clarify=true&sections=1.1\n```\n\nWhen enabled, Clarify uses [JSdom](https://github.com/tmpvar/jsdom) for getting specified sections and wrap them in pre-defined or user templates. If you're using SourceJS HTML API, Clarify can be configured to take data directly from API storage as well.\n\nClarify page is enhanced with helper panel, where you can chose any option available:\n\n[<img src=\"i/clarify.png\" alt=\"image\" style=\"margin-left: -57px;\">](/docs/spec/?clarify=true&sections=1.1)\n\n## List of parameters\n\n| Param | Value | Default setting | Description |\n|---|---|---|\n| clarify | Boolean | false | Turn on clarify middleware. |\n| sections | 1, 1.1, 3 | empty | List of sections to show. If empty, lists all high level section examples. |\n| fromApi | Boolean | false | Set to `true`, if want to get rendered HTML from API in response. |\n| apiUpdate | Boolean | false | Set to `true`, if want to run HTML API update on spec, before getting results. Used only in combination with `fromApi` |\n| nojs | Boolean | false | Turn on and off JS injection from the Spec. |\n| tpl | template-name | default | Define EJS template name to render sections. Templates are defined in `core/views/clarify/` and `user/core/views/clarify/`, user templates overrides core. |\n\nTo play around with available URL params, open [Clarify page](/docs/spec/?clarify=true&sections=1.1) and fill the helpers form below.\n\n## Use cases\n\nClarify is covering wide range of use cases:\n\n* Testing in old desktop browsers, which are not supported in SourceJS Specs\n* Testing on mobile, for faster Spec page loading\n* Focusing on single example during development\n* Isoleted page for automated testing\n* Responsive design testing\n* Fast transfer of code examples to templates"
  },
  {
    "path": "docs/configuration/info.json",
    "content": "{\n    \"title\": \"Engine Configuration\",\n    \"keywords\": \"options, options.js, sourcejs-options, context\",\n    \"template\": \"doc\"\n}\n"
  },
  {
    "path": "docs/configuration/readme.md",
    "content": "SourceJS engine is highly configurable and allows to override almost any options for your special needs.\n\n## Configuration Hierarchy\n\nStarting from default configuration to spec page overrides, it's possible to re-define options on any level, before it reaches execution phase. This is the priority list of all available configuration levels (starting from default):\n\n* `sourcejs/options.js` - default engine configuration file with examples and documented fields, located next to engine sources\n* `sourcejs/user/options.js` - user level settings, as well as other configuration layers, it follows the same structure as default engine options\n* `sourcejs/user/**/sourcejs-options.js` - context level settings allows to specify custom configuration per catalogue (have some limitations), supports inheritance for child specs and catalogs\n* `info.json` `sourcejs` field - spec context level options, similar to `sourcejs-options.js` but affects only current spec page\n\nEach configuration layer has the same options structure as default reference `sourcejs/options.js`.\n\n### Context Options\n\nFollowing the options priority hierarchy, context options allows to define highest priority configuration per catalog and spec.\n\n`sourcejs-option.js` file could be placed into any catalog in `sourcejs/user` folder and will affect all nested items. In this example, `catalog1/sourcejs-options.js` will affect both `catalog1/component1`, `catalog1/component2` specs and it's children:\n\n```html\n/user\n    catalog1\n        component1\n        component2\n        sourcejs-options.js\n\n    catalog2\n```\n\nOn each spec page call, engine gathers all the context configuration files up the tree and merges it on top of each other. The same process will happen with spec context level options in `info.json`, with only difference that it won't be shared with child items.\n\nHere's an example of local `info.json` configuration:\n\n```js\n{\n    \"title\": \"Spec Title\",\n    \"sourcejs\": {\n        \"plugins\": {\n            \"plugins\": \"options\"\n        }\n    }\n}\n```\n\nSince not all the configuration is dynamic, comparing to user level options, context options allows to change only these groups:\n\n* `assets`\n* `plugins`\n* `rendering`\n\nNote that context options does not allow changing `core` setting, to override them use `sourcejs/user/options.js` level instead. This limitation is defined by the fact, that only user level options are activated during the application start.\n\n## Patching core assets\n\n<div class=\"source_warn\">\n    Patching is not recommended approach, it's supposed to be used only for edge cases, before your changes will be merged in SourceJS core.\n</div>\n\nTo extend core Front-end assets, that are stored in `sourcejs/assets` we provide a patching feature.\n\nTo use your own version of any core assets, all you need is to place your new files to `sourcejs/user/core/assets` folder. Custom routing will handle the rest:\n\n```html\nsourcejs/assets/js/modules/ntf.js < sourcejs/user/source/assets/js/modules/ntf.js\nsourcejs/assets/js/modules/css.js < sourcejs/user/source/assets/js/modules/css.js\n```\n\nIn this example, on request for `localhost:8080/source/assets/js/modules/ntf.js` engine will provide version from `sourcejs/user/source/assets` folder, instead of version from core `sourcejs/assets`."
  },
  {
    "path": "docs/data/bootstrap.css",
    "content": "/*!\n * Bootstrap v3.3.4 (http://getbootstrap.com)\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\nhtml {\n  font-family: sans-serif;\n  -webkit-text-size-adjust: 100%;\n      -ms-text-size-adjust: 100%;\n}\nbody {\n  margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n  display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n  display: inline-block;\n  vertical-align: baseline;\n}\naudio:not([controls]) {\n  display: none;\n  height: 0;\n}\n[hidden],\ntemplate {\n  display: none;\n}\na {\n  background-color: transparent;\n}\na:active,\na:hover {\n  outline: 0;\n}\nabbr[title] {\n  border-bottom: 1px dotted;\n}\nb,\nstrong {\n  font-weight: bold;\n}\ndfn {\n  font-style: italic;\n}\nh1 {\n  margin: .67em 0;\n  font-size: 2em;\n}\nmark {\n  color: #000;\n  background: #ff0;\n}\nsmall {\n  font-size: 80%;\n}\nsub,\nsup {\n  position: relative;\n  font-size: 75%;\n  line-height: 0;\n  vertical-align: baseline;\n}\nsup {\n  top: -.5em;\n}\nsub {\n  bottom: -.25em;\n}\nimg {\n  border: 0;\n}\nsvg:not(:root) {\n  overflow: hidden;\n}\nfigure {\n  margin: 1em 40px;\n}\nhr {\n  height: 0;\n  -webkit-box-sizing: content-box;\n     -moz-box-sizing: content-box;\n          box-sizing: content-box;\n}\npre {\n  overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: monospace, monospace;\n  font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n  margin: 0;\n  font: inherit;\n  color: inherit;\n}\nbutton {\n  overflow: visible;\n}\nbutton,\nselect {\n  text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n  -webkit-appearance: button;\n  cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n  cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n  padding: 0;\n  border: 0;\n}\ninput {\n  line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n  padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: content-box;\n     -moz-box-sizing: content-box;\n          box-sizing: content-box;\n  -webkit-appearance: textfield;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n  -webkit-appearance: none;\n}\nfieldset {\n  padding: .35em .625em .75em;\n  margin: 0 2px;\n  border: 1px solid #c0c0c0;\n}\nlegend {\n  padding: 0;\n  border: 0;\n}\ntextarea {\n  overflow: auto;\n}\noptgroup {\n  font-weight: bold;\n}\ntable {\n  border-spacing: 0;\n  border-collapse: collapse;\n}\ntd,\nth {\n  padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n  *,\n  *:before,\n  *:after {\n    color: #000 !important;\n    text-shadow: none !important;\n    background: transparent !important;\n    -webkit-box-shadow: none !important;\n            box-shadow: none !important;\n  }\n  a,\n  a:visited {\n    text-decoration: underline;\n  }\n  a[href]:after {\n    content: \" (\" attr(href) \")\";\n  }\n  abbr[title]:after {\n    content: \" (\" attr(title) \")\";\n  }\n  a[href^=\"#\"]:after,\n  a[href^=\"javascript:\"]:after {\n    content: \"\";\n  }\n  pre,\n  blockquote {\n    border: 1px solid #999;\n\n    page-break-inside: avoid;\n  }\n  thead {\n    display: table-header-group;\n  }\n  tr,\n  img {\n    page-break-inside: avoid;\n  }\n  img {\n    max-width: 100% !important;\n  }\n  p,\n  h2,\n  h3 {\n    orphans: 3;\n    widows: 3;\n  }\n  h2,\n  h3 {\n    page-break-after: avoid;\n  }\n  select {\n    background: #fff !important;\n  }\n  .navbar {\n    display: none;\n  }\n  .btn > .caret,\n  .dropup > .btn > .caret {\n    border-top-color: #000 !important;\n  }\n  .label {\n    border: 1px solid #000;\n  }\n  .table {\n    border-collapse: collapse !important;\n  }\n  .table td,\n  .table th {\n    background-color: #fff !important;\n  }\n  .table-bordered th,\n  .table-bordered td {\n    border: 1px solid #ddd !important;\n  }\n}\n@font-face {\n  font-family: 'Glyphicons Halflings';\n\n  src: url('../fonts/glyphicons-halflings-regular.eot');\n  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n  position: relative;\n  top: 1px;\n  display: inline-block;\n  font-family: 'Glyphicons Halflings';\n  font-style: normal;\n  font-weight: normal;\n  line-height: 1;\n\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n  content: \"\\2a\";\n}\n.glyphicon-plus:before {\n  content: \"\\2b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n  content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n  content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n  content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n  content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n  content: \"\\270f\";\n}\n.glyphicon-glass:before {\n  content: \"\\e001\";\n}\n.glyphicon-music:before {\n  content: \"\\e002\";\n}\n.glyphicon-search:before {\n  content: \"\\e003\";\n}\n.glyphicon-heart:before {\n  content: \"\\e005\";\n}\n.glyphicon-star:before {\n  content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n  content: \"\\e007\";\n}\n.glyphicon-user:before {\n  content: \"\\e008\";\n}\n.glyphicon-film:before {\n  content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n  content: \"\\e010\";\n}\n.glyphicon-th:before {\n  content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n  content: \"\\e012\";\n}\n.glyphicon-ok:before {\n  content: \"\\e013\";\n}\n.glyphicon-remove:before {\n  content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n  content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n  content: \"\\e016\";\n}\n.glyphicon-off:before {\n  content: \"\\e017\";\n}\n.glyphicon-signal:before {\n  content: \"\\e018\";\n}\n.glyphicon-cog:before {\n  content: \"\\e019\";\n}\n.glyphicon-trash:before {\n  content: \"\\e020\";\n}\n.glyphicon-home:before {\n  content: \"\\e021\";\n}\n.glyphicon-file:before {\n  content: \"\\e022\";\n}\n.glyphicon-time:before {\n  content: \"\\e023\";\n}\n.glyphicon-road:before {\n  content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n  content: \"\\e025\";\n}\n.glyphicon-download:before {\n  content: \"\\e026\";\n}\n.glyphicon-upload:before {\n  content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n  content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n  content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n  content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n  content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n  content: \"\\e032\";\n}\n.glyphicon-lock:before {\n  content: \"\\e033\";\n}\n.glyphicon-flag:before {\n  content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n  content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n  content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n  content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n  content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n  content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n  content: \"\\e040\";\n}\n.glyphicon-tag:before {\n  content: \"\\e041\";\n}\n.glyphicon-tags:before {\n  content: \"\\e042\";\n}\n.glyphicon-book:before {\n  content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n  content: \"\\e044\";\n}\n.glyphicon-print:before {\n  content: \"\\e045\";\n}\n.glyphicon-camera:before {\n  content: \"\\e046\";\n}\n.glyphicon-font:before {\n  content: \"\\e047\";\n}\n.glyphicon-bold:before {\n  content: \"\\e048\";\n}\n.glyphicon-italic:before {\n  content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n  content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n  content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n  content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n  content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n  content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n  content: \"\\e055\";\n}\n.glyphicon-list:before {\n  content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n  content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n  content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n  content: \"\\e059\";\n}\n.glyphicon-picture:before {\n  content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n  content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n  content: \"\\e063\";\n}\n.glyphicon-tint:before {\n  content: \"\\e064\";\n}\n.glyphicon-edit:before {\n  content: \"\\e065\";\n}\n.glyphicon-share:before {\n  content: \"\\e066\";\n}\n.glyphicon-check:before {\n  content: \"\\e067\";\n}\n.glyphicon-move:before {\n  content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n  content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n  content: \"\\e070\";\n}\n.glyphicon-backward:before {\n  content: \"\\e071\";\n}\n.glyphicon-play:before {\n  content: \"\\e072\";\n}\n.glyphicon-pause:before {\n  content: \"\\e073\";\n}\n.glyphicon-stop:before {\n  content: \"\\e074\";\n}\n.glyphicon-forward:before {\n  content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n  content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n  content: \"\\e077\";\n}\n.glyphicon-eject:before {\n  content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n  content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n  content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n  content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n  content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n  content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n  content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n  content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n  content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n  content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n  content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n  content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n  content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n  content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n  content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n  content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n  content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n  content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n  content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n  content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n  content: \"\\e101\";\n}\n.glyphicon-gift:before {\n  content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n  content: \"\\e103\";\n}\n.glyphicon-fire:before {\n  content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n  content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n  content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n  content: \"\\e107\";\n}\n.glyphicon-plane:before {\n  content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n  content: \"\\e109\";\n}\n.glyphicon-random:before {\n  content: \"\\e110\";\n}\n.glyphicon-comment:before {\n  content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n  content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n  content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n  content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n  content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n  content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n  content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n  content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n  content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n  content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n  content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n  content: \"\\e122\";\n}\n.glyphicon-bell:before {\n  content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n  content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n  content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n  content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n  content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n  content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n  content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n  content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n  content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n  content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n  content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n  content: \"\\e134\";\n}\n.glyphicon-globe:before {\n  content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n  content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n  content: \"\\e137\";\n}\n.glyphicon-filter:before {\n  content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n  content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n  content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n  content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n  content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n  content: \"\\e143\";\n}\n.glyphicon-link:before {\n  content: \"\\e144\";\n}\n.glyphicon-phone:before {\n  content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n  content: \"\\e146\";\n}\n.glyphicon-usd:before {\n  content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n  content: \"\\e149\";\n}\n.glyphicon-sort:before {\n  content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n  content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n  content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n  content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n  content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n  content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n  content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n  content: \"\\e157\";\n}\n.glyphicon-expand:before {\n  content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n  content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n  content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n  content: \"\\e161\";\n}\n.glyphicon-flash:before {\n  content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n  content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n  content: \"\\e164\";\n}\n.glyphicon-record:before {\n  content: \"\\e165\";\n}\n.glyphicon-save:before {\n  content: \"\\e166\";\n}\n.glyphicon-open:before {\n  content: \"\\e167\";\n}\n.glyphicon-saved:before {\n  content: \"\\e168\";\n}\n.glyphicon-import:before {\n  content: \"\\e169\";\n}\n.glyphicon-export:before {\n  content: \"\\e170\";\n}\n.glyphicon-send:before {\n  content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n  content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n  content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n  content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n  content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n  content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n  content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n  content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n  content: \"\\e179\";\n}\n.glyphicon-header:before {\n  content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n  content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n  content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n  content: \"\\e183\";\n}\n.glyphicon-tower:before {\n  content: \"\\e184\";\n}\n.glyphicon-stats:before {\n  content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n  content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n  content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n  content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n  content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n  content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n  content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n  content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n  content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n  content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n  content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n  content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n  content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n  content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n  content: \"\\e200\";\n}\n.glyphicon-cd:before {\n  content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n  content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n  content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n  content: \"\\e204\";\n}\n.glyphicon-copy:before {\n  content: \"\\e205\";\n}\n.glyphicon-paste:before {\n  content: \"\\e206\";\n}\n.glyphicon-alert:before {\n  content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n  content: \"\\e210\";\n}\n.glyphicon-king:before {\n  content: \"\\e211\";\n}\n.glyphicon-queen:before {\n  content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n  content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n  content: \"\\e214\";\n}\n.glyphicon-knight:before {\n  content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n  content: \"\\e216\";\n}\n.glyphicon-tent:before {\n  content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n  content: \"\\e218\";\n}\n.glyphicon-bed:before {\n  content: \"\\e219\";\n}\n.glyphicon-apple:before {\n  content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n  content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n  content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n  content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n  content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n  content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n  content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n  content: \"\\e227\";\n}\n.glyphicon-btc:before {\n  content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n  content: \"\\e227\";\n}\n.glyphicon-yen:before {\n  content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n  content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n  content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n  content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n  content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n  content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n  content: \"\\e232\";\n}\n.glyphicon-education:before {\n  content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n  content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n  content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n  content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n  content: \"\\e237\";\n}\n.glyphicon-oil:before {\n  content: \"\\e238\";\n}\n.glyphicon-grain:before {\n  content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n  content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n  content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n  content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n  content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n  content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n  content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n  content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n  content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n  content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n  content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n  content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n  content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n  content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n  content: \"\\e253\";\n}\n.glyphicon-console:before {\n  content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n  content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n  content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n  content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n  content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n  content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n  content: \"\\e260\";\n}\n* {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\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  font-size: 10px;\n\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #333;\n  background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n  font-family: inherit;\n  font-size: inherit;\n  line-height: inherit;\n}\na {\n  color: #337ab7;\n  text-decoration: none;\n}\na:hover,\na:focus {\n  color: #23527c;\n  text-decoration: underline;\n}\na:focus {\n  outline: thin dotted;\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\nfigure {\n  margin: 0;\n}\nimg {\n  vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  display: block;\n  max-width: 100%;\n  height: auto;\n}\n.img-rounded {\n  border-radius: 6px;\n}\n.img-thumbnail {\n  display: inline-block;\n  max-width: 100%;\n  height: auto;\n  padding: 4px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: all .2s ease-in-out;\n       -o-transition: all .2s ease-in-out;\n          transition: all .2s ease-in-out;\n}\n.img-circle {\n  border-radius: 50%;\n}\nhr {\n  margin-top: 20px;\n  margin-bottom: 20px;\n  border: 0;\n  border-top: 1px solid #eee;\n}\n.sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n  position: static;\n  width: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  clip: auto;\n}\n[role=\"button\"] {\n  cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n  font-family: inherit;\n  font-weight: 500;\n  line-height: 1.1;\n  color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n  font-weight: normal;\n  line-height: 1;\n  color: #777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n  margin-top: 20px;\n  margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n  font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n  font-size: 75%;\n}\nh1,\n.h1 {\n  font-size: 36px;\n}\nh2,\n.h2 {\n  font-size: 30px;\n}\nh3,\n.h3 {\n  font-size: 24px;\n}\nh4,\n.h4 {\n  font-size: 18px;\n}\nh5,\n.h5 {\n  font-size: 14px;\n}\nh6,\n.h6 {\n  font-size: 12px;\n}\np {\n  margin: 0 0 10px;\n}\n.lead {\n  margin-bottom: 20px;\n  font-size: 16px;\n  font-weight: 300;\n  line-height: 1.4;\n}\n@media (min-width: 768px) {\n  .lead {\n    font-size: 21px;\n  }\n}\nsmall,\n.small {\n  font-size: 85%;\n}\nmark,\n.mark {\n  padding: .2em;\n  background-color: #fcf8e3;\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}\n.text-justify {\n  text-align: justify;\n}\n.text-nowrap {\n  white-space: nowrap;\n}\n.text-lowercase {\n  text-transform: lowercase;\n}\n.text-uppercase {\n  text-transform: uppercase;\n}\n.text-capitalize {\n  text-transform: capitalize;\n}\n.text-muted {\n  color: #777;\n}\n.text-primary {\n  color: #337ab7;\n}\na.text-primary:hover {\n  color: #286090;\n}\n.text-success {\n  color: #3c763d;\n}\na.text-success:hover {\n  color: #2b542c;\n}\n.text-info {\n  color: #31708f;\n}\na.text-info:hover {\n  color: #245269;\n}\n.text-warning {\n  color: #8a6d3b;\n}\na.text-warning:hover {\n  color: #66512c;\n}\n.text-danger {\n  color: #a94442;\n}\na.text-danger:hover {\n  color: #843534;\n}\n.bg-primary {\n  color: #fff;\n  background-color: #337ab7;\n}\na.bg-primary:hover {\n  background-color: #286090;\n}\n.bg-success {\n  background-color: #dff0d8;\n}\na.bg-success:hover {\n  background-color: #c1e2b3;\n}\n.bg-info {\n  background-color: #d9edf7;\n}\na.bg-info:hover {\n  background-color: #afd9ee;\n}\n.bg-warning {\n  background-color: #fcf8e3;\n}\na.bg-warning:hover {\n  background-color: #f7ecb5;\n}\n.bg-danger {\n  background-color: #f2dede;\n}\na.bg-danger:hover {\n  background-color: #e4b9b9;\n}\n.page-header {\n  padding-bottom: 9px;\n  margin: 40px 0 20px;\n  border-bottom: 1px solid #eee;\n}\nul,\nol {\n  margin-top: 0;\n  margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n  margin-bottom: 0;\n}\n.list-unstyled {\n  padding-left: 0;\n  list-style: none;\n}\n.list-inline {\n  padding-left: 0;\n  margin-left: -5px;\n  list-style: none;\n}\n.list-inline > li {\n  display: inline-block;\n  padding-right: 5px;\n  padding-left: 5px;\n}\ndl {\n  margin-top: 0;\n  margin-bottom: 20px;\n}\ndt,\ndd {\n  line-height: 1.42857143;\n}\ndt {\n  font-weight: bold;\n}\ndd {\n  margin-left: 0;\n}\n@media (min-width: 768px) {\n  .dl-horizontal dt {\n    float: left;\n    width: 160px;\n    overflow: hidden;\n    clear: left;\n    text-align: right;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n  .dl-horizontal dd {\n    margin-left: 180px;\n  }\n}\nabbr[title],\nabbr[data-original-title] {\n  cursor: help;\n  border-bottom: 1px dotted #777;\n}\n.initialism {\n  font-size: 90%;\n  text-transform: uppercase;\n}\nblockquote {\n  padding: 10px 20px;\n  margin: 0 0 20px;\n  font-size: 17.5px;\n  border-left: 5px solid #eee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n  margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n  display: block;\n  font-size: 80%;\n  line-height: 1.42857143;\n  color: #777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n  content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n  padding-right: 15px;\n  padding-left: 0;\n  text-align: right;\n  border-right: 5px solid #eee;\n  border-left: 0;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n  content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n  content: '\\00A0 \\2014';\n}\naddress {\n  margin-bottom: 20px;\n  font-style: normal;\n  line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n  font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #c7254e;\n  background-color: #f9f2f4;\n  border-radius: 4px;\n}\nkbd {\n  padding: 2px 4px;\n  font-size: 90%;\n  color: #fff;\n  background-color: #333;\n  border-radius: 3px;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n}\nkbd kbd {\n  padding: 0;\n  font-size: 100%;\n  font-weight: bold;\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\npre {\n  display: block;\n  padding: 9.5px;\n  margin: 0 0 10px;\n  font-size: 13px;\n  line-height: 1.42857143;\n  color: #333;\n  word-break: break-all;\n  word-wrap: break-word;\n  background-color: #f5f5f5;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\npre code {\n  padding: 0;\n  font-size: inherit;\n  color: inherit;\n  white-space: pre-wrap;\n  background-color: transparent;\n  border-radius: 0;\n}\n.pre-scrollable {\n  max-height: 340px;\n  overflow-y: scroll;\n}\n.container {\n  padding-right: 15px;\n  padding-left: 15px;\n  margin-right: auto;\n  margin-left: auto;\n}\n@media (min-width: 768px) {\n  .container {\n    width: 750px;\n  }\n}\n@media (min-width: 992px) {\n  .container {\n    width: 970px;\n  }\n}\n@media (min-width: 1200px) {\n  .container {\n    width: 1170px;\n  }\n}\n.container-fluid {\n  padding-right: 15px;\n  padding-left: 15px;\n  margin-right: auto;\n  margin-left: auto;\n}\n.row {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n  position: relative;\n  min-height: 1px;\n  padding-right: 15px;\n  padding-left: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n  float: left;\n}\n.col-xs-12 {\n  width: 100%;\n}\n.col-xs-11 {\n  width: 91.66666667%;\n}\n.col-xs-10 {\n  width: 83.33333333%;\n}\n.col-xs-9 {\n  width: 75%;\n}\n.col-xs-8 {\n  width: 66.66666667%;\n}\n.col-xs-7 {\n  width: 58.33333333%;\n}\n.col-xs-6 {\n  width: 50%;\n}\n.col-xs-5 {\n  width: 41.66666667%;\n}\n.col-xs-4 {\n  width: 33.33333333%;\n}\n.col-xs-3 {\n  width: 25%;\n}\n.col-xs-2 {\n  width: 16.66666667%;\n}\n.col-xs-1 {\n  width: 8.33333333%;\n}\n.col-xs-pull-12 {\n  right: 100%;\n}\n.col-xs-pull-11 {\n  right: 91.66666667%;\n}\n.col-xs-pull-10 {\n  right: 83.33333333%;\n}\n.col-xs-pull-9 {\n  right: 75%;\n}\n.col-xs-pull-8 {\n  right: 66.66666667%;\n}\n.col-xs-pull-7 {\n  right: 58.33333333%;\n}\n.col-xs-pull-6 {\n  right: 50%;\n}\n.col-xs-pull-5 {\n  right: 41.66666667%;\n}\n.col-xs-pull-4 {\n  right: 33.33333333%;\n}\n.col-xs-pull-3 {\n  right: 25%;\n}\n.col-xs-pull-2 {\n  right: 16.66666667%;\n}\n.col-xs-pull-1 {\n  right: 8.33333333%;\n}\n.col-xs-pull-0 {\n  right: auto;\n}\n.col-xs-push-12 {\n  left: 100%;\n}\n.col-xs-push-11 {\n  left: 91.66666667%;\n}\n.col-xs-push-10 {\n  left: 83.33333333%;\n}\n.col-xs-push-9 {\n  left: 75%;\n}\n.col-xs-push-8 {\n  left: 66.66666667%;\n}\n.col-xs-push-7 {\n  left: 58.33333333%;\n}\n.col-xs-push-6 {\n  left: 50%;\n}\n.col-xs-push-5 {\n  left: 41.66666667%;\n}\n.col-xs-push-4 {\n  left: 33.33333333%;\n}\n.col-xs-push-3 {\n  left: 25%;\n}\n.col-xs-push-2 {\n  left: 16.66666667%;\n}\n.col-xs-push-1 {\n  left: 8.33333333%;\n}\n.col-xs-push-0 {\n  left: auto;\n}\n.col-xs-offset-12 {\n  margin-left: 100%;\n}\n.col-xs-offset-11 {\n  margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n  margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n  margin-left: 75%;\n}\n.col-xs-offset-8 {\n  margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n  margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n  margin-left: 50%;\n}\n.col-xs-offset-5 {\n  margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n  margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n  margin-left: 25%;\n}\n.col-xs-offset-2 {\n  margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n  margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n  margin-left: 0;\n}\n@media (min-width: 768px) {\n  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n    float: left;\n  }\n  .col-sm-12 {\n    width: 100%;\n  }\n  .col-sm-11 {\n    width: 91.66666667%;\n  }\n  .col-sm-10 {\n    width: 83.33333333%;\n  }\n  .col-sm-9 {\n    width: 75%;\n  }\n  .col-sm-8 {\n    width: 66.66666667%;\n  }\n  .col-sm-7 {\n    width: 58.33333333%;\n  }\n  .col-sm-6 {\n    width: 50%;\n  }\n  .col-sm-5 {\n    width: 41.66666667%;\n  }\n  .col-sm-4 {\n    width: 33.33333333%;\n  }\n  .col-sm-3 {\n    width: 25%;\n  }\n  .col-sm-2 {\n    width: 16.66666667%;\n  }\n  .col-sm-1 {\n    width: 8.33333333%;\n  }\n  .col-sm-pull-12 {\n    right: 100%;\n  }\n  .col-sm-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-sm-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-sm-pull-9 {\n    right: 75%;\n  }\n  .col-sm-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-sm-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-sm-pull-6 {\n    right: 50%;\n  }\n  .col-sm-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-sm-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-sm-pull-3 {\n    right: 25%;\n  }\n  .col-sm-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-sm-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-sm-pull-0 {\n    right: auto;\n  }\n  .col-sm-push-12 {\n    left: 100%;\n  }\n  .col-sm-push-11 {\n    left: 91.66666667%;\n  }\n  .col-sm-push-10 {\n    left: 83.33333333%;\n  }\n  .col-sm-push-9 {\n    left: 75%;\n  }\n  .col-sm-push-8 {\n    left: 66.66666667%;\n  }\n  .col-sm-push-7 {\n    left: 58.33333333%;\n  }\n  .col-sm-push-6 {\n    left: 50%;\n  }\n  .col-sm-push-5 {\n    left: 41.66666667%;\n  }\n  .col-sm-push-4 {\n    left: 33.33333333%;\n  }\n  .col-sm-push-3 {\n    left: 25%;\n  }\n  .col-sm-push-2 {\n    left: 16.66666667%;\n  }\n  .col-sm-push-1 {\n    left: 8.33333333%;\n  }\n  .col-sm-push-0 {\n    left: auto;\n  }\n  .col-sm-offset-12 {\n    margin-left: 100%;\n  }\n  .col-sm-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-sm-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-sm-offset-9 {\n    margin-left: 75%;\n  }\n  .col-sm-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-sm-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-sm-offset-6 {\n    margin-left: 50%;\n  }\n  .col-sm-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-sm-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-sm-offset-3 {\n    margin-left: 25%;\n  }\n  .col-sm-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-sm-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-sm-offset-0 {\n    margin-left: 0;\n  }\n}\n@media (min-width: 992px) {\n  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n    float: left;\n  }\n  .col-md-12 {\n    width: 100%;\n  }\n  .col-md-11 {\n    width: 91.66666667%;\n  }\n  .col-md-10 {\n    width: 83.33333333%;\n  }\n  .col-md-9 {\n    width: 75%;\n  }\n  .col-md-8 {\n    width: 66.66666667%;\n  }\n  .col-md-7 {\n    width: 58.33333333%;\n  }\n  .col-md-6 {\n    width: 50%;\n  }\n  .col-md-5 {\n    width: 41.66666667%;\n  }\n  .col-md-4 {\n    width: 33.33333333%;\n  }\n  .col-md-3 {\n    width: 25%;\n  }\n  .col-md-2 {\n    width: 16.66666667%;\n  }\n  .col-md-1 {\n    width: 8.33333333%;\n  }\n  .col-md-pull-12 {\n    right: 100%;\n  }\n  .col-md-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-md-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-md-pull-9 {\n    right: 75%;\n  }\n  .col-md-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-md-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-md-pull-6 {\n    right: 50%;\n  }\n  .col-md-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-md-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-md-pull-3 {\n    right: 25%;\n  }\n  .col-md-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-md-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-md-pull-0 {\n    right: auto;\n  }\n  .col-md-push-12 {\n    left: 100%;\n  }\n  .col-md-push-11 {\n    left: 91.66666667%;\n  }\n  .col-md-push-10 {\n    left: 83.33333333%;\n  }\n  .col-md-push-9 {\n    left: 75%;\n  }\n  .col-md-push-8 {\n    left: 66.66666667%;\n  }\n  .col-md-push-7 {\n    left: 58.33333333%;\n  }\n  .col-md-push-6 {\n    left: 50%;\n  }\n  .col-md-push-5 {\n    left: 41.66666667%;\n  }\n  .col-md-push-4 {\n    left: 33.33333333%;\n  }\n  .col-md-push-3 {\n    left: 25%;\n  }\n  .col-md-push-2 {\n    left: 16.66666667%;\n  }\n  .col-md-push-1 {\n    left: 8.33333333%;\n  }\n  .col-md-push-0 {\n    left: auto;\n  }\n  .col-md-offset-12 {\n    margin-left: 100%;\n  }\n  .col-md-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-md-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-md-offset-9 {\n    margin-left: 75%;\n  }\n  .col-md-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-md-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-md-offset-6 {\n    margin-left: 50%;\n  }\n  .col-md-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-md-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-md-offset-3 {\n    margin-left: 25%;\n  }\n  .col-md-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-md-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-md-offset-0 {\n    margin-left: 0;\n  }\n}\n@media (min-width: 1200px) {\n  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n    float: left;\n  }\n  .col-lg-12 {\n    width: 100%;\n  }\n  .col-lg-11 {\n    width: 91.66666667%;\n  }\n  .col-lg-10 {\n    width: 83.33333333%;\n  }\n  .col-lg-9 {\n    width: 75%;\n  }\n  .col-lg-8 {\n    width: 66.66666667%;\n  }\n  .col-lg-7 {\n    width: 58.33333333%;\n  }\n  .col-lg-6 {\n    width: 50%;\n  }\n  .col-lg-5 {\n    width: 41.66666667%;\n  }\n  .col-lg-4 {\n    width: 33.33333333%;\n  }\n  .col-lg-3 {\n    width: 25%;\n  }\n  .col-lg-2 {\n    width: 16.66666667%;\n  }\n  .col-lg-1 {\n    width: 8.33333333%;\n  }\n  .col-lg-pull-12 {\n    right: 100%;\n  }\n  .col-lg-pull-11 {\n    right: 91.66666667%;\n  }\n  .col-lg-pull-10 {\n    right: 83.33333333%;\n  }\n  .col-lg-pull-9 {\n    right: 75%;\n  }\n  .col-lg-pull-8 {\n    right: 66.66666667%;\n  }\n  .col-lg-pull-7 {\n    right: 58.33333333%;\n  }\n  .col-lg-pull-6 {\n    right: 50%;\n  }\n  .col-lg-pull-5 {\n    right: 41.66666667%;\n  }\n  .col-lg-pull-4 {\n    right: 33.33333333%;\n  }\n  .col-lg-pull-3 {\n    right: 25%;\n  }\n  .col-lg-pull-2 {\n    right: 16.66666667%;\n  }\n  .col-lg-pull-1 {\n    right: 8.33333333%;\n  }\n  .col-lg-pull-0 {\n    right: auto;\n  }\n  .col-lg-push-12 {\n    left: 100%;\n  }\n  .col-lg-push-11 {\n    left: 91.66666667%;\n  }\n  .col-lg-push-10 {\n    left: 83.33333333%;\n  }\n  .col-lg-push-9 {\n    left: 75%;\n  }\n  .col-lg-push-8 {\n    left: 66.66666667%;\n  }\n  .col-lg-push-7 {\n    left: 58.33333333%;\n  }\n  .col-lg-push-6 {\n    left: 50%;\n  }\n  .col-lg-push-5 {\n    left: 41.66666667%;\n  }\n  .col-lg-push-4 {\n    left: 33.33333333%;\n  }\n  .col-lg-push-3 {\n    left: 25%;\n  }\n  .col-lg-push-2 {\n    left: 16.66666667%;\n  }\n  .col-lg-push-1 {\n    left: 8.33333333%;\n  }\n  .col-lg-push-0 {\n    left: auto;\n  }\n  .col-lg-offset-12 {\n    margin-left: 100%;\n  }\n  .col-lg-offset-11 {\n    margin-left: 91.66666667%;\n  }\n  .col-lg-offset-10 {\n    margin-left: 83.33333333%;\n  }\n  .col-lg-offset-9 {\n    margin-left: 75%;\n  }\n  .col-lg-offset-8 {\n    margin-left: 66.66666667%;\n  }\n  .col-lg-offset-7 {\n    margin-left: 58.33333333%;\n  }\n  .col-lg-offset-6 {\n    margin-left: 50%;\n  }\n  .col-lg-offset-5 {\n    margin-left: 41.66666667%;\n  }\n  .col-lg-offset-4 {\n    margin-left: 33.33333333%;\n  }\n  .col-lg-offset-3 {\n    margin-left: 25%;\n  }\n  .col-lg-offset-2 {\n    margin-left: 16.66666667%;\n  }\n  .col-lg-offset-1 {\n    margin-left: 8.33333333%;\n  }\n  .col-lg-offset-0 {\n    margin-left: 0;\n  }\n}\ntable {\n  background-color: transparent;\n}\ncaption {\n  padding-top: 8px;\n  padding-bottom: 8px;\n  color: #777;\n  text-align: left;\n}\nth {\n  text-align: left;\n}\n.table {\n  width: 100%;\n  max-width: 100%;\n  margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n  padding: 8px;\n  line-height: 1.42857143;\n  vertical-align: top;\n  border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n  vertical-align: bottom;\n  border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n  border-top: 0;\n}\n.table > tbody + tbody {\n  border-top: 2px solid #ddd;\n}\n.table .table {\n  background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n  padding: 5px;\n}\n.table-bordered {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n  border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n  border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n  background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n  background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n  position: static;\n  display: table-column;\n  float: none;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n  position: static;\n  display: table-cell;\n  float: none;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n  background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n  background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n  background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n  background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n  background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n  background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n  background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n  background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n  background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n  background-color: #ebcccc;\n}\n.table-responsive {\n  min-height: .01%;\n  overflow-x: auto;\n}\n@media screen and (max-width: 767px) {\n  .table-responsive {\n    width: 100%;\n    margin-bottom: 15px;\n    overflow-y: hidden;\n    -ms-overflow-style: -ms-autohiding-scrollbar;\n    border: 1px solid #ddd;\n  }\n  .table-responsive > .table {\n    margin-bottom: 0;\n  }\n  .table-responsive > .table > thead > tr > th,\n  .table-responsive > .table > tbody > tr > th,\n  .table-responsive > .table > tfoot > tr > th,\n  .table-responsive > .table > thead > tr > td,\n  .table-responsive > .table > tbody > tr > td,\n  .table-responsive > .table > tfoot > tr > td {\n    white-space: nowrap;\n  }\n  .table-responsive > .table-bordered {\n    border: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:first-child,\n  .table-responsive > .table-bordered > tbody > tr > th:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n  .table-responsive > .table-bordered > thead > tr > td:first-child,\n  .table-responsive > .table-bordered > tbody > tr > td:first-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n    border-left: 0;\n  }\n  .table-responsive > .table-bordered > thead > tr > th:last-child,\n  .table-responsive > .table-bordered > tbody > tr > th:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n  .table-responsive > .table-bordered > thead > tr > td:last-child,\n  .table-responsive > .table-bordered > tbody > tr > td:last-child,\n  .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n    border-right: 0;\n  }\n  .table-responsive > .table-bordered > tbody > tr:last-child > th,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n  .table-responsive > .table-bordered > tbody > tr:last-child > td,\n  .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n    border-bottom: 0;\n  }\n}\nfieldset {\n  min-width: 0;\n  padding: 0;\n  margin: 0;\n  border: 0;\n}\nlegend {\n  display: block;\n  width: 100%;\n  padding: 0;\n  margin-bottom: 20px;\n  font-size: 21px;\n  line-height: inherit;\n  color: #333;\n  border: 0;\n  border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n  display: inline-block;\n  max-width: 100%;\n  margin-bottom: 5px;\n  font-weight: bold;\n}\ninput[type=\"search\"] {\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n  margin: 4px 0 0;\n  margin-top: 1px \\9;\n  line-height: normal;\n}\ninput[type=\"file\"] {\n  display: block;\n}\ninput[type=\"range\"] {\n  display: block;\n  width: 100%;\n}\nselect[multiple],\nselect[size] {\n  height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n  outline: thin dotted;\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\noutput {\n  display: block;\n  padding-top: 7px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555;\n}\n.form-control {\n  display: block;\n  width: 100%;\n  height: 34px;\n  padding: 6px 12px;\n  font-size: 14px;\n  line-height: 1.42857143;\n  color: #555;\n  background-color: #fff;\n  background-image: none;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n  -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n       -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n          transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n  border-color: #66afe9;\n  outline: 0;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n          box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n}\n.form-control::-moz-placeholder {\n  color: #999;\n  opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n  color: #999;\n}\n.form-control::-webkit-input-placeholder {\n  color: #999;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n  background-color: #eee;\n  opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n  cursor: not-allowed;\n}\ntextarea.form-control {\n  height: auto;\n}\ninput[type=\"search\"] {\n  -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n  input[type=\"date\"],\n  input[type=\"time\"],\n  input[type=\"datetime-local\"],\n  input[type=\"month\"] {\n    line-height: 34px;\n  }\n  input[type=\"date\"].input-sm,\n  input[type=\"time\"].input-sm,\n  input[type=\"datetime-local\"].input-sm,\n  input[type=\"month\"].input-sm,\n  .input-group-sm input[type=\"date\"],\n  .input-group-sm input[type=\"time\"],\n  .input-group-sm input[type=\"datetime-local\"],\n  .input-group-sm input[type=\"month\"] {\n    line-height: 30px;\n  }\n  input[type=\"date\"].input-lg,\n  input[type=\"time\"].input-lg,\n  input[type=\"datetime-local\"].input-lg,\n  input[type=\"month\"].input-lg,\n  .input-group-lg input[type=\"date\"],\n  .input-group-lg input[type=\"time\"],\n  .input-group-lg input[type=\"datetime-local\"],\n  .input-group-lg input[type=\"month\"] {\n    line-height: 46px;\n  }\n}\n.form-group {\n  margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n  position: relative;\n  display: block;\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n  min-height: 20px;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n  position: absolute;\n  margin-top: 4px \\9;\n  margin-left: -20px;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n  margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n  position: relative;\n  display: inline-block;\n  padding-left: 20px;\n  margin-bottom: 0;\n  font-weight: normal;\n  vertical-align: middle;\n  cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n  margin-top: 0;\n  margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n  cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n  cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n  cursor: not-allowed;\n}\n.form-control-static {\n  min-height: 34px;\n  padding-top: 7px;\n  padding-bottom: 7px;\n  margin-bottom: 0;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n  padding-right: 0;\n  padding-left: 0;\n}\n.input-sm {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-sm {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n  height: auto;\n}\n.form-group-sm .form-control {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.form-group-sm .form-control {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.form-group-sm .form-control,\nselect[multiple].form-group-sm .form-control {\n  height: auto;\n}\n.form-group-sm .form-control-static {\n  height: 30px;\n  min-height: 32px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n}\n.input-lg {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-lg {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n  height: auto;\n}\n.form-group-lg .form-control {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.form-group-lg .form-control {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.form-group-lg .form-control,\nselect[multiple].form-group-lg .form-control {\n  height: auto;\n}\n.form-group-lg .form-control-static {\n  height: 46px;\n  min-height: 38px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n}\n.has-feedback {\n  position: relative;\n}\n.has-feedback .form-control {\n  padding-right: 42.5px;\n}\n.form-control-feedback {\n  position: absolute;\n  top: 0;\n  right: 0;\n  z-index: 2;\n  display: block;\n  width: 34px;\n  height: 34px;\n  line-height: 34px;\n  text-align: center;\n  pointer-events: none;\n}\n.input-lg + .form-control-feedback {\n  width: 46px;\n  height: 46px;\n  line-height: 46px;\n}\n.input-sm + .form-control-feedback {\n  width: 30px;\n  height: 30px;\n  line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n  color: #3c763d;\n}\n.has-success .form-control {\n  border-color: #3c763d;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-success .form-control:focus {\n  border-color: #2b542c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #3c763d;\n}\n.has-success .form-control-feedback {\n  color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n  color: #8a6d3b;\n}\n.has-warning .form-control {\n  border-color: #8a6d3b;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-warning .form-control:focus {\n  border-color: #66512c;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #8a6d3b;\n}\n.has-warning .form-control-feedback {\n  color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n  color: #a94442;\n}\n.has-error .form-control {\n  border-color: #a94442;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-error .form-control:focus {\n  border-color: #843534;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #a94442;\n}\n.has-error .form-control-feedback {\n  color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n  top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n  top: 0;\n}\n.help-block {\n  display: block;\n  margin-top: 5px;\n  margin-bottom: 10px;\n  color: #737373;\n}\n@media (min-width: 768px) {\n  .form-inline .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .form-inline .form-control-static {\n    display: inline-block;\n  }\n  .form-inline .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .form-inline .input-group .input-group-addon,\n  .form-inline .input-group .input-group-btn,\n  .form-inline .input-group .form-control {\n    width: auto;\n  }\n  .form-inline .input-group > .form-control {\n    width: 100%;\n  }\n  .form-inline .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio,\n  .form-inline .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .form-inline .radio label,\n  .form-inline .checkbox label {\n    padding-left: 0;\n  }\n  .form-inline .radio input[type=\"radio\"],\n  .form-inline .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .form-inline .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n  padding-top: 7px;\n  margin-top: 0;\n  margin-bottom: 0;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n  min-height: 27px;\n}\n.form-horizontal .form-group {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .control-label {\n    padding-top: 7px;\n    margin-bottom: 0;\n    text-align: right;\n  }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n  right: 15px;\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-lg .control-label {\n    padding-top: 14.333333px;\n  }\n}\n@media (min-width: 768px) {\n  .form-horizontal .form-group-sm .control-label {\n    padding-top: 6px;\n  }\n}\n.btn {\n  display: inline-block;\n  padding: 6px 12px;\n  margin-bottom: 0;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1.42857143;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: middle;\n  -ms-touch-action: manipulation;\n      touch-action: manipulation;\n  cursor: pointer;\n  -webkit-user-select: none;\n     -moz-user-select: none;\n      -ms-user-select: none;\n          user-select: none;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n  outline: thin dotted;\n  outline: 5px auto -webkit-focus-ring-color;\n  outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n  color: #333;\n  text-decoration: none;\n}\n.btn:active,\n.btn.active {\n  background-image: none;\n  outline: 0;\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n  pointer-events: none;\n  cursor: not-allowed;\n  filter: alpha(opacity=65);\n  -webkit-box-shadow: none;\n          box-shadow: none;\n  opacity: .65;\n}\n.btn-default {\n  color: #333;\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus,\n.btn-default.focus,\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  color: #333;\n  background-color: #e6e6e6;\n  border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n  background-image: none;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n  background-color: #fff;\n  border-color: #ccc;\n}\n.btn-default .badge {\n  color: #fff;\n  background-color: #333;\n}\n.btn-primary {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary:hover,\n.btn-primary:focus,\n.btn-primary.focus,\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  color: #fff;\n  background-color: #286090;\n  border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n  background-image: none;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n  background-color: #337ab7;\n  border-color: #2e6da4;\n}\n.btn-primary .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.btn-success {\n  color: #fff;\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success:hover,\n.btn-success:focus,\n.btn-success.focus,\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  color: #fff;\n  background-color: #449d44;\n  border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n  background-image: none;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n  background-color: #5cb85c;\n  border-color: #4cae4c;\n}\n.btn-success .badge {\n  color: #5cb85c;\n  background-color: #fff;\n}\n.btn-info {\n  color: #fff;\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info:hover,\n.btn-info:focus,\n.btn-info.focus,\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  color: #fff;\n  background-color: #31b0d5;\n  border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n  background-image: none;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n  background-color: #5bc0de;\n  border-color: #46b8da;\n}\n.btn-info .badge {\n  color: #5bc0de;\n  background-color: #fff;\n}\n.btn-warning {\n  color: #fff;\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning:hover,\n.btn-warning:focus,\n.btn-warning.focus,\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  color: #fff;\n  background-color: #ec971f;\n  border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n  background-image: none;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n  background-color: #f0ad4e;\n  border-color: #eea236;\n}\n.btn-warning .badge {\n  color: #f0ad4e;\n  background-color: #fff;\n}\n.btn-danger {\n  color: #fff;\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger:hover,\n.btn-danger:focus,\n.btn-danger.focus,\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  color: #fff;\n  background-color: #c9302c;\n  border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n  background-image: none;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n  background-color: #d9534f;\n  border-color: #d43f3a;\n}\n.btn-danger .badge {\n  color: #d9534f;\n  background-color: #fff;\n}\n.btn-link {\n  font-weight: normal;\n  color: #337ab7;\n  border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n  background-color: transparent;\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n  border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n  color: #23527c;\n  text-decoration: underline;\n  background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n  color: #777;\n  text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n  padding: 1px 5px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\n.btn-block {\n  display: block;\n  width: 100%;\n}\n.btn-block + .btn-block {\n  margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n  width: 100%;\n}\n.fade {\n  opacity: 0;\n  -webkit-transition: opacity .15s linear;\n       -o-transition: opacity .15s linear;\n          transition: opacity .15s linear;\n}\n.fade.in {\n  opacity: 1;\n}\n.collapse {\n  display: none;\n}\n.collapse.in {\n  display: block;\n}\ntr.collapse.in {\n  display: table-row;\n}\ntbody.collapse.in {\n  display: table-row-group;\n}\n.collapsing {\n  position: relative;\n  height: 0;\n  overflow: hidden;\n  -webkit-transition-timing-function: ease;\n       -o-transition-timing-function: ease;\n          transition-timing-function: ease;\n  -webkit-transition-duration: .35s;\n       -o-transition-duration: .35s;\n          transition-duration: .35s;\n  -webkit-transition-property: height, visibility;\n       -o-transition-property: height, visibility;\n          transition-property: height, visibility;\n}\n.caret {\n  display: inline-block;\n  width: 0;\n  height: 0;\n  margin-left: 2px;\n  vertical-align: middle;\n  border-top: 4px dashed;\n  border-right: 4px solid transparent;\n  border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n  position: relative;\n}\n.dropdown-toggle:focus {\n  outline: 0;\n}\n.dropdown-menu {\n  position: absolute;\n  top: 100%;\n  left: 0;\n  z-index: 1000;\n  display: none;\n  float: left;\n  min-width: 160px;\n  padding: 5px 0;\n  margin: 2px 0 0;\n  font-size: 14px;\n  text-align: left;\n  list-style: none;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, .15);\n  border-radius: 4px;\n  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n          box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n}\n.dropdown-menu.pull-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu .divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n  display: block;\n  padding: 3px 20px;\n  clear: both;\n  font-weight: normal;\n  line-height: 1.42857143;\n  color: #333;\n  white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n  color: #262626;\n  text-decoration: none;\n  background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n  color: #fff;\n  text-decoration: none;\n  background-color: #337ab7;\n  outline: 0;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  color: #777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n  text-decoration: none;\n  cursor: not-allowed;\n  background-color: transparent;\n  background-image: none;\n  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.open > .dropdown-menu {\n  display: block;\n}\n.open > a {\n  outline: 0;\n}\n.dropdown-menu-right {\n  right: 0;\n  left: auto;\n}\n.dropdown-menu-left {\n  right: auto;\n  left: 0;\n}\n.dropdown-header {\n  display: block;\n  padding: 3px 20px;\n  font-size: 12px;\n  line-height: 1.42857143;\n  color: #777;\n  white-space: nowrap;\n}\n.dropdown-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 990;\n}\n.pull-right > .dropdown-menu {\n  right: 0;\n  left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n  content: \"\";\n  border-top: 0;\n  border-bottom: 4px solid;\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n  top: auto;\n  bottom: 100%;\n  margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n  .navbar-right .dropdown-menu {\n    right: 0;\n    left: auto;\n  }\n  .navbar-right .dropdown-menu-left {\n    right: auto;\n    left: 0;\n  }\n}\n.btn-group,\n.btn-group-vertical {\n  position: relative;\n  display: inline-block;\n  vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n  position: relative;\n  float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n  z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n  margin-left: -1px;\n}\n.btn-toolbar {\n  margin-left: -5px;\n}\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n  float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n  margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n  border-radius: 0;\n}\n.btn-group > .btn:first-child {\n  margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group > .btn-group {\n  float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n  outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n  padding-right: 8px;\n  padding-left: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n  padding-right: 12px;\n  padding-left: 12px;\n}\n.btn-group.open .dropdown-toggle {\n  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n          box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n  -webkit-box-shadow: none;\n          box-shadow: none;\n}\n.btn .caret {\n  margin-left: 0;\n}\n.btn-lg .caret {\n  border-width: 5px 5px 0;\n  border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n  border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n  display: block;\n  float: none;\n  width: 100%;\n  max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n  float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n  margin-top: -1px;\n  margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n  border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n  border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.btn-group-justified {\n  display: table;\n  width: 100%;\n  table-layout: fixed;\n  border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n  display: table-cell;\n  float: none;\n  width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n  width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n  left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n  position: absolute;\n  clip: rect(0, 0, 0, 0);\n  pointer-events: none;\n}\n.input-group {\n  position: relative;\n  display: table;\n  border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n  float: none;\n  padding-right: 0;\n  padding-left: 0;\n}\n.input-group .form-control {\n  position: relative;\n  z-index: 2;\n  float: left;\n  width: 100%;\n  margin-bottom: 0;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  padding: 10px 16px;\n  font-size: 18px;\n  line-height: 1.3333333;\n  border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n  height: 46px;\n  line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  padding: 5px 10px;\n  font-size: 12px;\n  line-height: 1.5;\n  border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n  height: 30px;\n  line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n  height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n  display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n  border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n  width: 1%;\n  white-space: nowrap;\n  vertical-align: middle;\n}\n.input-group-addon {\n  padding: 6px 12px;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1;\n  color: #555;\n  text-align: center;\n  background-color: #eee;\n  border: 1px solid #ccc;\n  border-radius: 4px;\n}\n.input-group-addon.input-sm {\n  padding: 5px 10px;\n  font-size: 12px;\n  border-radius: 3px;\n}\n.input-group-addon.input-lg {\n  padding: 10px 16px;\n  font-size: 18px;\n  border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n  margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n.input-group-addon:first-child {\n  border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.input-group-addon:last-child {\n  border-left: 0;\n}\n.input-group-btn {\n  position: relative;\n  font-size: 0;\n  white-space: nowrap;\n}\n.input-group-btn > .btn {\n  position: relative;\n}\n.input-group-btn > .btn + .btn {\n  margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n  z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n  margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n  margin-left: -1px;\n}\n.nav {\n  padding-left: 0;\n  margin-bottom: 0;\n  list-style: none;\n}\n.nav > li {\n  position: relative;\n  display: block;\n}\n.nav > li > a {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n  text-decoration: none;\n  background-color: #eee;\n}\n.nav > li.disabled > a {\n  color: #777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n  color: #777;\n  text-decoration: none;\n  cursor: not-allowed;\n  background-color: transparent;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n  background-color: #eee;\n  border-color: #337ab7;\n}\n.nav .nav-divider {\n  height: 1px;\n  margin: 9px 0;\n  overflow: hidden;\n  background-color: #e5e5e5;\n}\n.nav > li > a > img {\n  max-width: none;\n}\n.nav-tabs {\n  border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n  float: left;\n  margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n  margin-right: 2px;\n  line-height: 1.42857143;\n  border: 1px solid transparent;\n  border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n  border-color: #eee #eee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n  color: #555;\n  cursor: default;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-bottom-color: transparent;\n}\n.nav-tabs.nav-justified {\n  width: 100%;\n  border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n  float: none;\n}\n.nav-tabs.nav-justified > li > a {\n  margin-bottom: 5px;\n  text-align: center;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-tabs.nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs.nav-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs.nav-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs.nav-justified > .active > a,\n  .nav-tabs.nav-justified > .active > a:hover,\n  .nav-tabs.nav-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.nav-pills > li {\n  float: left;\n}\n.nav-pills > li > a {\n  border-radius: 4px;\n}\n.nav-pills > li + li {\n  margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n  color: #fff;\n  background-color: #337ab7;\n}\n.nav-stacked > li {\n  float: none;\n}\n.nav-stacked > li + li {\n  margin-top: 2px;\n  margin-left: 0;\n}\n.nav-justified {\n  width: 100%;\n}\n.nav-justified > li {\n  float: none;\n}\n.nav-justified > li > a {\n  margin-bottom: 5px;\n  text-align: center;\n}\n.nav-justified > .dropdown .dropdown-menu {\n  top: auto;\n  left: auto;\n}\n@media (min-width: 768px) {\n  .nav-justified > li {\n    display: table-cell;\n    width: 1%;\n  }\n  .nav-justified > li > a {\n    margin-bottom: 0;\n  }\n}\n.nav-tabs-justified {\n  border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n  margin-right: 0;\n  border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n  border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n  .nav-tabs-justified > li > a {\n    border-bottom: 1px solid #ddd;\n    border-radius: 4px 4px 0 0;\n  }\n  .nav-tabs-justified > .active > a,\n  .nav-tabs-justified > .active > a:hover,\n  .nav-tabs-justified > .active > a:focus {\n    border-bottom-color: #fff;\n  }\n}\n.tab-content > .tab-pane {\n  display: none;\n}\n.tab-content > .active {\n  display: block;\n}\n.nav-tabs .dropdown-menu {\n  margin-top: -1px;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.navbar {\n  position: relative;\n  min-height: 50px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n  .navbar {\n    border-radius: 4px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-header {\n    float: left;\n  }\n}\n.navbar-collapse {\n  padding-right: 15px;\n  padding-left: 15px;\n  overflow-x: visible;\n  -webkit-overflow-scrolling: touch;\n  border-top: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n}\n.navbar-collapse.in {\n  overflow-y: auto;\n}\n@media (min-width: 768px) {\n  .navbar-collapse {\n    width: auto;\n    border-top: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n  .navbar-collapse.collapse {\n    display: block !important;\n    height: auto !important;\n    padding-bottom: 0;\n    overflow: visible !important;\n  }\n  .navbar-collapse.in {\n    overflow-y: visible;\n  }\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-static-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    padding-right: 0;\n    padding-left: 0;\n  }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n  max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n  .navbar-fixed-top .navbar-collapse,\n  .navbar-fixed-bottom .navbar-collapse {\n    max-height: 200px;\n  }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n  margin-right: -15px;\n  margin-left: -15px;\n}\n@media (min-width: 768px) {\n  .container > .navbar-header,\n  .container-fluid > .navbar-header,\n  .container > .navbar-collapse,\n  .container-fluid > .navbar-collapse {\n    margin-right: 0;\n    margin-left: 0;\n  }\n}\n.navbar-static-top {\n  z-index: 1000;\n  border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n  .navbar-static-top {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n  position: fixed;\n  right: 0;\n  left: 0;\n  z-index: 1030;\n}\n@media (min-width: 768px) {\n  .navbar-fixed-top,\n  .navbar-fixed-bottom {\n    border-radius: 0;\n  }\n}\n.navbar-fixed-top {\n  top: 0;\n  border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n  bottom: 0;\n  margin-bottom: 0;\n  border-width: 1px 0 0;\n}\n.navbar-brand {\n  float: left;\n  height: 50px;\n  padding: 15px 15px;\n  font-size: 18px;\n  line-height: 20px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n  text-decoration: none;\n}\n.navbar-brand > img {\n  display: block;\n}\n@media (min-width: 768px) {\n  .navbar > .container .navbar-brand,\n  .navbar > .container-fluid .navbar-brand {\n    margin-left: -15px;\n  }\n}\n.navbar-toggle {\n  position: relative;\n  float: right;\n  padding: 9px 10px;\n  margin-top: 8px;\n  margin-right: 15px;\n  margin-bottom: 8px;\n  background-color: transparent;\n  background-image: none;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.navbar-toggle:focus {\n  outline: 0;\n}\n.navbar-toggle .icon-bar {\n  display: block;\n  width: 22px;\n  height: 2px;\n  border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n  margin-top: 4px;\n}\n@media (min-width: 768px) {\n  .navbar-toggle {\n    display: none;\n  }\n}\n.navbar-nav {\n  margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n  padding-top: 10px;\n  padding-bottom: 10px;\n  line-height: 20px;\n}\n@media (max-width: 767px) {\n  .navbar-nav .open .dropdown-menu {\n    position: static;\n    float: none;\n    width: auto;\n    margin-top: 0;\n    background-color: transparent;\n    border: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n  .navbar-nav .open .dropdown-menu > li > a,\n  .navbar-nav .open .dropdown-menu .dropdown-header {\n    padding: 5px 15px 5px 25px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a {\n    line-height: 20px;\n  }\n  .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-nav .open .dropdown-menu > li > a:focus {\n    background-image: none;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-nav {\n    float: left;\n    margin: 0;\n  }\n  .navbar-nav > li {\n    float: left;\n  }\n  .navbar-nav > li > a {\n    padding-top: 15px;\n    padding-bottom: 15px;\n  }\n}\n.navbar-form {\n  padding: 10px 15px;\n  margin-top: 8px;\n  margin-right: -15px;\n  margin-bottom: 8px;\n  margin-left: -15px;\n  border-top: 1px solid transparent;\n  border-bottom: 1px solid transparent;\n  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n          box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n}\n@media (min-width: 768px) {\n  .navbar-form .form-group {\n    display: inline-block;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control {\n    display: inline-block;\n    width: auto;\n    vertical-align: middle;\n  }\n  .navbar-form .form-control-static {\n    display: inline-block;\n  }\n  .navbar-form .input-group {\n    display: inline-table;\n    vertical-align: middle;\n  }\n  .navbar-form .input-group .input-group-addon,\n  .navbar-form .input-group .input-group-btn,\n  .navbar-form .input-group .form-control {\n    width: auto;\n  }\n  .navbar-form .input-group > .form-control {\n    width: 100%;\n  }\n  .navbar-form .control-label {\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio,\n  .navbar-form .checkbox {\n    display: inline-block;\n    margin-top: 0;\n    margin-bottom: 0;\n    vertical-align: middle;\n  }\n  .navbar-form .radio label,\n  .navbar-form .checkbox label {\n    padding-left: 0;\n  }\n  .navbar-form .radio input[type=\"radio\"],\n  .navbar-form .checkbox input[type=\"checkbox\"] {\n    position: relative;\n    margin-left: 0;\n  }\n  .navbar-form .has-feedback .form-control-feedback {\n    top: 0;\n  }\n}\n@media (max-width: 767px) {\n  .navbar-form .form-group {\n    margin-bottom: 5px;\n  }\n  .navbar-form .form-group:last-child {\n    margin-bottom: 0;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-form {\n    width: auto;\n    padding-top: 0;\n    padding-bottom: 0;\n    margin-right: 0;\n    margin-left: 0;\n    border: 0;\n    -webkit-box-shadow: none;\n            box-shadow: none;\n  }\n}\n.navbar-nav > li > .dropdown-menu {\n  margin-top: 0;\n  border-top-left-radius: 0;\n  border-top-right-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n  margin-bottom: 0;\n  border-top-left-radius: 4px;\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 0;\n  border-bottom-left-radius: 0;\n}\n.navbar-btn {\n  margin-top: 8px;\n  margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n  margin-top: 10px;\n  margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n  margin-top: 14px;\n  margin-bottom: 14px;\n}\n.navbar-text {\n  margin-top: 15px;\n  margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n  .navbar-text {\n    float: left;\n    margin-right: 15px;\n    margin-left: 15px;\n  }\n}\n@media (min-width: 768px) {\n  .navbar-left {\n    float: left !important;\n  }\n  .navbar-right {\n    float: right !important;\n    margin-right: -15px;\n  }\n  .navbar-right ~ .navbar-right {\n    margin-right: 0;\n  }\n}\n.navbar-default {\n  background-color: #f8f8f8;\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n  color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n  color: #5e5e5e;\n  background-color: transparent;\n}\n.navbar-default .navbar-text {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n  color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n  color: #333;\n  background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n  color: #555;\n  background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n  color: #ccc;\n  background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n  border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n  background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n  background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n  border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n  color: #555;\n  background-color: #e7e7e7;\n}\n@media (max-width: 767px) {\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n    color: #777;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #333;\n    background-color: transparent;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #555;\n    background-color: #e7e7e7;\n  }\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #ccc;\n    background-color: transparent;\n  }\n}\n.navbar-default .navbar-link {\n  color: #777;\n}\n.navbar-default .navbar-link:hover {\n  color: #333;\n}\n.navbar-default .btn-link {\n  color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n  color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n  color: #ccc;\n}\n.navbar-inverse {\n  background-color: #222;\n  border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n  color: #fff;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n  color: #fff;\n  background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n  color: #444;\n  background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n  border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n  background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n  background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n  border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n  color: #fff;\n  background-color: #080808;\n}\n@media (max-width: 767px) {\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n    border-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n    color: #9d9d9d;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n    color: #fff;\n    background-color: transparent;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n    color: #fff;\n    background-color: #080808;\n  }\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n    color: #444;\n    background-color: transparent;\n  }\n}\n.navbar-inverse .navbar-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n  color: #fff;\n}\n.navbar-inverse .btn-link {\n  color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n  color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n  color: #444;\n}\n.breadcrumb {\n  padding: 8px 15px;\n  margin-bottom: 20px;\n  list-style: none;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n}\n.breadcrumb > li {\n  display: inline-block;\n}\n.breadcrumb > li + li:before {\n  padding: 0 5px;\n  color: #ccc;\n  content: \"/\\00a0\";\n}\n.breadcrumb > .active {\n  color: #777;\n}\n.pagination {\n  display: inline-block;\n  padding-left: 0;\n  margin: 20px 0;\n  border-radius: 4px;\n}\n.pagination > li {\n  display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n  position: relative;\n  float: left;\n  padding: 6px 12px;\n  margin-left: -1px;\n  line-height: 1.42857143;\n  color: #337ab7;\n  text-decoration: none;\n  background-color: #fff;\n  border: 1px solid #ddd;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n  margin-left: 0;\n  border-top-left-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n  color: #23527c;\n  background-color: #eee;\n  border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n  z-index: 2;\n  color: #fff;\n  cursor: default;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #fff;\n  border-color: #ddd;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n  padding: 10px 16px;\n  font-size: 18px;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n  border-top-left-radius: 6px;\n  border-bottom-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n  border-top-right-radius: 6px;\n  border-bottom-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n  padding: 5px 10px;\n  font-size: 12px;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n  border-top-left-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n  border-top-right-radius: 3px;\n  border-bottom-right-radius: 3px;\n}\n.pager {\n  padding-left: 0;\n  margin: 20px 0;\n  text-align: center;\n  list-style: none;\n}\n.pager li {\n  display: inline;\n}\n.pager li > a,\n.pager li > span {\n  display: inline-block;\n  padding: 5px 14px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n  text-decoration: none;\n  background-color: #eee;\n}\n.pager .next > a,\n.pager .next > span {\n  float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n  float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #fff;\n}\n.label {\n  display: inline;\n  padding: .2em .6em .3em;\n  font-size: 75%;\n  font-weight: bold;\n  line-height: 1;\n  color: #fff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.label:empty {\n  display: none;\n}\n.btn .label {\n  position: relative;\n  top: -1px;\n}\n.label-default {\n  background-color: #777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n  background-color: #5e5e5e;\n}\n.label-primary {\n  background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n  background-color: #286090;\n}\n.label-success {\n  background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n  background-color: #449d44;\n}\n.label-info {\n  background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n  background-color: #31b0d5;\n}\n.label-warning {\n  background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n  background-color: #ec971f;\n}\n.label-danger {\n  background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n  background-color: #c9302c;\n}\n.badge {\n  display: inline-block;\n  min-width: 10px;\n  padding: 3px 7px;\n  font-size: 12px;\n  font-weight: bold;\n  line-height: 1;\n  color: #fff;\n  text-align: center;\n  white-space: nowrap;\n  vertical-align: baseline;\n  background-color: #777;\n  border-radius: 10px;\n}\n.badge:empty {\n  display: none;\n}\n.btn .badge {\n  position: relative;\n  top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n  top: 0;\n  padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n  color: #fff;\n  text-decoration: none;\n  cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.list-group-item > .badge {\n  float: right;\n}\n.list-group-item > .badge + .badge {\n  margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n  margin-left: 3px;\n}\n.jumbotron {\n  padding: 30px 15px;\n  margin-bottom: 30px;\n  color: inherit;\n  background-color: #eee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n  color: inherit;\n}\n.jumbotron p {\n  margin-bottom: 15px;\n  font-size: 21px;\n  font-weight: 200;\n}\n.jumbotron > hr {\n  border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n  border-radius: 6px;\n}\n.jumbotron .container {\n  max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n  .jumbotron {\n    padding: 48px 0;\n  }\n  .container .jumbotron,\n  .container-fluid .jumbotron {\n    padding-right: 60px;\n    padding-left: 60px;\n  }\n  .jumbotron h1,\n  .jumbotron .h1 {\n    font-size: 63px;\n  }\n}\n.thumbnail {\n  display: block;\n  padding: 4px;\n  margin-bottom: 20px;\n  line-height: 1.42857143;\n  background-color: #fff;\n  border: 1px solid #ddd;\n  border-radius: 4px;\n  -webkit-transition: border .2s ease-in-out;\n       -o-transition: border .2s ease-in-out;\n          transition: border .2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n  margin-right: auto;\n  margin-left: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n  border-color: #337ab7;\n}\n.thumbnail .caption {\n  padding: 9px;\n  color: #333;\n}\n.alert {\n  padding: 15px;\n  margin-bottom: 20px;\n  border: 1px solid transparent;\n  border-radius: 4px;\n}\n.alert h4 {\n  margin-top: 0;\n  color: inherit;\n}\n.alert .alert-link {\n  font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n  margin-bottom: 0;\n}\n.alert > p + p {\n  margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n  padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n  position: relative;\n  top: -2px;\n  right: -21px;\n  color: inherit;\n}\n.alert-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n.alert-success hr {\n  border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n  color: #2b542c;\n}\n.alert-info {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n.alert-info hr {\n  border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n  color: #245269;\n}\n.alert-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n.alert-warning hr {\n  border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n  color: #66512c;\n}\n.alert-danger {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n.alert-danger hr {\n  border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n  color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n@-o-keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n@keyframes progress-bar-stripes {\n  from {\n    background-position: 40px 0;\n  }\n  to {\n    background-position: 0 0;\n  }\n}\n.progress {\n  height: 20px;\n  margin-bottom: 20px;\n  overflow: hidden;\n  background-color: #f5f5f5;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n          box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n}\n.progress-bar {\n  float: left;\n  width: 0;\n  height: 100%;\n  font-size: 12px;\n  line-height: 20px;\n  color: #fff;\n  text-align: center;\n  background-color: #337ab7;\n  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n          box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n  -webkit-transition: width .6s ease;\n       -o-transition: width .6s ease;\n          transition: width .6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  -webkit-background-size: 40px 40px;\n          background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n  -webkit-animation: progress-bar-stripes 2s linear infinite;\n       -o-animation: progress-bar-stripes 2s linear infinite;\n          animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n  background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n  background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n  background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n  background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:      -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n  background-image:         linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.media {\n  margin-top: 15px;\n}\n.media:first-child {\n  margin-top: 0;\n}\n.media,\n.media-body {\n  overflow: hidden;\n  zoom: 1;\n}\n.media-body {\n  width: 10000px;\n}\n.media-object {\n  display: block;\n}\n.media-right,\n.media > .pull-right {\n  padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n  padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n  display: table-cell;\n  vertical-align: top;\n}\n.media-middle {\n  vertical-align: middle;\n}\n.media-bottom {\n  vertical-align: bottom;\n}\n.media-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.media-list {\n  padding-left: 0;\n  list-style: none;\n}\n.list-group {\n  padding-left: 0;\n  margin-bottom: 20px;\n}\n.list-group-item {\n  position: relative;\n  display: block;\n  padding: 10px 15px;\n  margin-bottom: -1px;\n  background-color: #fff;\n  border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n  border-top-left-radius: 4px;\n  border-top-right-radius: 4px;\n}\n.list-group-item:last-child {\n  margin-bottom: 0;\n  border-bottom-right-radius: 4px;\n  border-bottom-left-radius: 4px;\n}\na.list-group-item {\n  color: #555;\n}\na.list-group-item .list-group-item-heading {\n  color: #333;\n}\na.list-group-item:hover,\na.list-group-item:focus {\n  color: #555;\n  text-decoration: none;\n  background-color: #f5f5f5;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n  color: #777;\n  cursor: not-allowed;\n  background-color: #eee;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n  color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n  color: #777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n  z-index: 2;\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n  color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n  color: #c7ddef;\n}\n.list-group-item-success {\n  color: #3c763d;\n  background-color: #dff0d8;\n}\na.list-group-item-success {\n  color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-success:hover,\na.list-group-item-success:focus {\n  color: #3c763d;\n  background-color: #d0e9c6;\n}\na.list-group-item-success.active,\na.list-group-item-success.active:hover,\na.list-group-item-success.active:focus {\n  color: #fff;\n  background-color: #3c763d;\n  border-color: #3c763d;\n}\n.list-group-item-info {\n  color: #31708f;\n  background-color: #d9edf7;\n}\na.list-group-item-info {\n  color: #31708f;\n}\na.list-group-item-info .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-info:hover,\na.list-group-item-info:focus {\n  color: #31708f;\n  background-color: #c4e3f3;\n}\na.list-group-item-info.active,\na.list-group-item-info.active:hover,\na.list-group-item-info.active:focus {\n  color: #fff;\n  background-color: #31708f;\n  border-color: #31708f;\n}\n.list-group-item-warning {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n}\na.list-group-item-warning {\n  color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-warning:hover,\na.list-group-item-warning:focus {\n  color: #8a6d3b;\n  background-color: #faf2cc;\n}\na.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus {\n  color: #fff;\n  background-color: #8a6d3b;\n  border-color: #8a6d3b;\n}\n.list-group-item-danger {\n  color: #a94442;\n  background-color: #f2dede;\n}\na.list-group-item-danger {\n  color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading {\n  color: inherit;\n}\na.list-group-item-danger:hover,\na.list-group-item-danger:focus {\n  color: #a94442;\n  background-color: #ebcccc;\n}\na.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus {\n  color: #fff;\n  background-color: #a94442;\n  border-color: #a94442;\n}\n.list-group-item-heading {\n  margin-top: 0;\n  margin-bottom: 5px;\n}\n.list-group-item-text {\n  margin-bottom: 0;\n  line-height: 1.3;\n}\n.panel {\n  margin-bottom: 20px;\n  background-color: #fff;\n  border: 1px solid transparent;\n  border-radius: 4px;\n  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n          box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n}\n.panel-body {\n  padding: 15px;\n}\n.panel-heading {\n  padding: 10px 15px;\n  border-bottom: 1px solid transparent;\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n  color: inherit;\n}\n.panel-title {\n  margin-top: 0;\n  margin-bottom: 0;\n  font-size: 16px;\n  color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n  color: inherit;\n}\n.panel-footer {\n  padding: 10px 15px;\n  background-color: #f5f5f5;\n  border-top: 1px solid #ddd;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n  margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n  border-width: 1px 0;\n  border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n  border-top: 0;\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n  border-bottom: 0;\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n  border-top-width: 0;\n}\n.list-group + .panel-footer {\n  border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n  margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n  padding-right: 15px;\n  padding-left: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n  border-top-left-radius: 3px;\n  border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n  border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n  border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n  border-bottom-right-radius: 3px;\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n  border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n  border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n  border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n  border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n  border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n  border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n  border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n  border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n  border-bottom: 0;\n}\n.panel > .table-responsive {\n  margin-bottom: 0;\n  border: 0;\n}\n.panel-group {\n  margin-bottom: 20px;\n}\n.panel-group .panel {\n  margin-bottom: 0;\n  border-radius: 4px;\n}\n.panel-group .panel + .panel {\n  margin-top: 5px;\n}\n.panel-group .panel-heading {\n  border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n  border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n  border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n  border-bottom: 1px solid #ddd;\n}\n.panel-default {\n  border-color: #ddd;\n}\n.panel-default > .panel-heading {\n  color: #333;\n  background-color: #f5f5f5;\n  border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n  color: #f5f5f5;\n  background-color: #333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ddd;\n}\n.panel-primary {\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n  color: #fff;\n  background-color: #337ab7;\n  border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n  color: #337ab7;\n  background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #337ab7;\n}\n.panel-success {\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n  color: #3c763d;\n  background-color: #dff0d8;\n  border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n  color: #dff0d8;\n  background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #d6e9c6;\n}\n.panel-info {\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n  color: #31708f;\n  background-color: #d9edf7;\n  border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n  color: #d9edf7;\n  background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #bce8f1;\n}\n.panel-warning {\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n  border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n  color: #fcf8e3;\n  background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #faebcc;\n}\n.panel-danger {\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n  color: #a94442;\n  background-color: #f2dede;\n  border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n  border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n  color: #f2dede;\n  background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n  border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n  position: relative;\n  display: block;\n  height: 0;\n  padding: 0;\n  overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  border: 0;\n}\n.embed-responsive-16by9 {\n  padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n  padding-bottom: 75%;\n}\n.well {\n  min-height: 20px;\n  padding: 19px;\n  margin-bottom: 20px;\n  background-color: #f5f5f5;\n  border: 1px solid #e3e3e3;\n  border-radius: 4px;\n  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n}\n.well blockquote {\n  border-color: #ddd;\n  border-color: rgba(0, 0, 0, .15);\n}\n.well-lg {\n  padding: 24px;\n  border-radius: 6px;\n}\n.well-sm {\n  padding: 9px;\n  border-radius: 3px;\n}\n.close {\n  float: right;\n  font-size: 21px;\n  font-weight: bold;\n  line-height: 1;\n  color: #000;\n  text-shadow: 0 1px 0 #fff;\n  filter: alpha(opacity=20);\n  opacity: .2;\n}\n.close:hover,\n.close:focus {\n  color: #000;\n  text-decoration: none;\n  cursor: pointer;\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\nbutton.close {\n  -webkit-appearance: none;\n  padding: 0;\n  cursor: pointer;\n  background: transparent;\n  border: 0;\n}\n.modal-open {\n  overflow: hidden;\n}\n.modal {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1050;\n  display: none;\n  overflow: hidden;\n  -webkit-overflow-scrolling: touch;\n  outline: 0;\n}\n.modal.fade .modal-dialog {\n  -webkit-transition: -webkit-transform .3s ease-out;\n       -o-transition:      -o-transform .3s ease-out;\n          transition:         transform .3s ease-out;\n  -webkit-transform: translate(0, -25%);\n      -ms-transform: translate(0, -25%);\n       -o-transform: translate(0, -25%);\n          transform: translate(0, -25%);\n}\n.modal.in .modal-dialog {\n  -webkit-transform: translate(0, 0);\n      -ms-transform: translate(0, 0);\n       -o-transform: translate(0, 0);\n          transform: translate(0, 0);\n}\n.modal-open .modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.modal-dialog {\n  position: relative;\n  width: auto;\n  margin: 10px;\n}\n.modal-content {\n  position: relative;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #999;\n  border: 1px solid rgba(0, 0, 0, .2);\n  border-radius: 6px;\n  outline: 0;\n  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n          box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n}\n.modal-backdrop {\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  z-index: 1040;\n  background-color: #000;\n}\n.modal-backdrop.fade {\n  filter: alpha(opacity=0);\n  opacity: 0;\n}\n.modal-backdrop.in {\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\n.modal-header {\n  min-height: 16.42857143px;\n  padding: 15px;\n  border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n  margin-top: -2px;\n}\n.modal-title {\n  margin: 0;\n  line-height: 1.42857143;\n}\n.modal-body {\n  position: relative;\n  padding: 15px;\n}\n.modal-footer {\n  padding: 15px;\n  text-align: right;\n  border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n  margin-bottom: 0;\n  margin-left: 5px;\n}\n.modal-footer .btn-group .btn + .btn {\n  margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n  margin-left: 0;\n}\n.modal-scrollbar-measure {\n  position: absolute;\n  top: -9999px;\n  width: 50px;\n  height: 50px;\n  overflow: scroll;\n}\n@media (min-width: 768px) {\n  .modal-dialog {\n    width: 600px;\n    margin: 30px auto;\n  }\n  .modal-content {\n    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n            box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n  }\n  .modal-sm {\n    width: 300px;\n  }\n}\n@media (min-width: 992px) {\n  .modal-lg {\n    width: 900px;\n  }\n}\n.tooltip {\n  position: absolute;\n  z-index: 1070;\n  display: block;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 12px;\n  font-weight: normal;\n  line-height: 1.4;\n  filter: alpha(opacity=0);\n  opacity: 0;\n}\n.tooltip.in {\n  filter: alpha(opacity=90);\n  opacity: .9;\n}\n.tooltip.top {\n  padding: 5px 0;\n  margin-top: -3px;\n}\n.tooltip.right {\n  padding: 0 5px;\n  margin-left: 3px;\n}\n.tooltip.bottom {\n  padding: 5px 0;\n  margin-top: 3px;\n}\n.tooltip.left {\n  padding: 0 5px;\n  margin-left: -3px;\n}\n.tooltip-inner {\n  max-width: 200px;\n  padding: 3px 8px;\n  color: #fff;\n  text-align: center;\n  text-decoration: none;\n  background-color: #000;\n  border-radius: 4px;\n}\n.tooltip-arrow {\n  position: absolute;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n  bottom: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n  right: 5px;\n  bottom: 0;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n  bottom: 0;\n  left: 5px;\n  margin-bottom: -5px;\n  border-width: 5px 5px 0;\n  border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n  top: 50%;\n  left: 0;\n  margin-top: -5px;\n  border-width: 5px 5px 5px 0;\n  border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n  top: 50%;\n  right: 0;\n  margin-top: -5px;\n  border-width: 5px 0 5px 5px;\n  border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n  top: 0;\n  left: 50%;\n  margin-left: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n  top: 0;\n  right: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n  top: 0;\n  left: 5px;\n  margin-top: -5px;\n  border-width: 0 5px 5px;\n  border-bottom-color: #000;\n}\n.popover {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 1060;\n  display: none;\n  max-width: 276px;\n  padding: 1px;\n  font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n  font-size: 14px;\n  font-weight: normal;\n  line-height: 1.42857143;\n  text-align: left;\n  white-space: normal;\n  background-color: #fff;\n  -webkit-background-clip: padding-box;\n          background-clip: padding-box;\n  border: 1px solid #ccc;\n  border: 1px solid rgba(0, 0, 0, .2);\n  border-radius: 6px;\n  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n          box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n}\n.popover.top {\n  margin-top: -10px;\n}\n.popover.right {\n  margin-left: 10px;\n}\n.popover.bottom {\n  margin-top: 10px;\n}\n.popover.left {\n  margin-left: -10px;\n}\n.popover-title {\n  padding: 8px 14px;\n  margin: 0;\n  font-size: 14px;\n  background-color: #f7f7f7;\n  border-bottom: 1px solid #ebebeb;\n  border-radius: 5px 5px 0 0;\n}\n.popover-content {\n  padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n  position: absolute;\n  display: block;\n  width: 0;\n  height: 0;\n  border-color: transparent;\n  border-style: solid;\n}\n.popover > .arrow {\n  border-width: 11px;\n}\n.popover > .arrow:after {\n  content: \"\";\n  border-width: 10px;\n}\n.popover.top > .arrow {\n  bottom: -11px;\n  left: 50%;\n  margin-left: -11px;\n  border-top-color: #999;\n  border-top-color: rgba(0, 0, 0, .25);\n  border-bottom-width: 0;\n}\n.popover.top > .arrow:after {\n  bottom: 1px;\n  margin-left: -10px;\n  content: \" \";\n  border-top-color: #fff;\n  border-bottom-width: 0;\n}\n.popover.right > .arrow {\n  top: 50%;\n  left: -11px;\n  margin-top: -11px;\n  border-right-color: #999;\n  border-right-color: rgba(0, 0, 0, .25);\n  border-left-width: 0;\n}\n.popover.right > .arrow:after {\n  bottom: -10px;\n  left: 1px;\n  content: \" \";\n  border-right-color: #fff;\n  border-left-width: 0;\n}\n.popover.bottom > .arrow {\n  top: -11px;\n  left: 50%;\n  margin-left: -11px;\n  border-top-width: 0;\n  border-bottom-color: #999;\n  border-bottom-color: rgba(0, 0, 0, .25);\n}\n.popover.bottom > .arrow:after {\n  top: 1px;\n  margin-left: -10px;\n  content: \" \";\n  border-top-width: 0;\n  border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n  top: 50%;\n  right: -11px;\n  margin-top: -11px;\n  border-right-width: 0;\n  border-left-color: #999;\n  border-left-color: rgba(0, 0, 0, .25);\n}\n.popover.left > .arrow:after {\n  right: 1px;\n  bottom: -10px;\n  content: \" \";\n  border-right-width: 0;\n  border-left-color: #fff;\n}\n.carousel {\n  position: relative;\n}\n.carousel-inner {\n  position: relative;\n  width: 100%;\n  overflow: hidden;\n}\n.carousel-inner > .item {\n  position: relative;\n  display: none;\n  -webkit-transition: .6s ease-in-out left;\n       -o-transition: .6s ease-in-out left;\n          transition: .6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n  line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n  .carousel-inner > .item {\n    -webkit-transition: -webkit-transform .6s ease-in-out;\n         -o-transition:      -o-transform .6s ease-in-out;\n            transition:         transform .6s ease-in-out;\n\n    -webkit-backface-visibility: hidden;\n            backface-visibility: hidden;\n    -webkit-perspective: 1000;\n            perspective: 1000;\n  }\n  .carousel-inner > .item.next,\n  .carousel-inner > .item.active.right {\n    left: 0;\n    -webkit-transform: translate3d(100%, 0, 0);\n            transform: translate3d(100%, 0, 0);\n  }\n  .carousel-inner > .item.prev,\n  .carousel-inner > .item.active.left {\n    left: 0;\n    -webkit-transform: translate3d(-100%, 0, 0);\n            transform: translate3d(-100%, 0, 0);\n  }\n  .carousel-inner > .item.next.left,\n  .carousel-inner > .item.prev.right,\n  .carousel-inner > .item.active {\n    left: 0;\n    -webkit-transform: translate3d(0, 0, 0);\n            transform: translate3d(0, 0, 0);\n  }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  display: block;\n}\n.carousel-inner > .active {\n  left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n  position: absolute;\n  top: 0;\n  width: 100%;\n}\n.carousel-inner > .next {\n  left: 100%;\n}\n.carousel-inner > .prev {\n  left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n  left: 0;\n}\n.carousel-inner > .active.left {\n  left: -100%;\n}\n.carousel-inner > .active.right {\n  left: 100%;\n}\n.carousel-control {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  width: 15%;\n  font-size: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n  filter: alpha(opacity=50);\n  opacity: .5;\n}\n.carousel-control.left {\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));\n  background-image:         linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n  background-repeat: repeat-x;\n}\n.carousel-control.right {\n  right: 0;\n  left: auto;\n  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  background-image:      -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));\n  background-image:         linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n  background-repeat: repeat-x;\n}\n.carousel-control:hover,\n.carousel-control:focus {\n  color: #fff;\n  text-decoration: none;\n  filter: alpha(opacity=90);\n  outline: 0;\n  opacity: .9;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n  position: absolute;\n  top: 50%;\n  z-index: 5;\n  display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n  left: 50%;\n  margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n  right: 50%;\n  margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n  width: 20px;\n  height: 20px;\n  margin-top: -10px;\n  font-family: serif;\n  line-height: 1;\n}\n.carousel-control .icon-prev:before {\n  content: '\\2039';\n}\n.carousel-control .icon-next:before {\n  content: '\\203a';\n}\n.carousel-indicators {\n  position: absolute;\n  bottom: 10px;\n  left: 50%;\n  z-index: 15;\n  width: 60%;\n  padding-left: 0;\n  margin-left: -30%;\n  text-align: center;\n  list-style: none;\n}\n.carousel-indicators li {\n  display: inline-block;\n  width: 10px;\n  height: 10px;\n  margin: 1px;\n  text-indent: -999px;\n  cursor: pointer;\n  background-color: #000 \\9;\n  background-color: rgba(0, 0, 0, 0);\n  border: 1px solid #fff;\n  border-radius: 10px;\n}\n.carousel-indicators .active {\n  width: 12px;\n  height: 12px;\n  margin: 0;\n  background-color: #fff;\n}\n.carousel-caption {\n  position: absolute;\n  right: 15%;\n  bottom: 20px;\n  left: 15%;\n  z-index: 10;\n  padding-top: 20px;\n  padding-bottom: 20px;\n  color: #fff;\n  text-align: center;\n  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n}\n.carousel-caption .btn {\n  text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-prev,\n  .carousel-control .icon-next {\n    width: 30px;\n    height: 30px;\n    margin-top: -15px;\n    font-size: 30px;\n  }\n  .carousel-control .glyphicon-chevron-left,\n  .carousel-control .icon-prev {\n    margin-left: -15px;\n  }\n  .carousel-control .glyphicon-chevron-right,\n  .carousel-control .icon-next {\n    margin-right: -15px;\n  }\n  .carousel-caption {\n    right: 20%;\n    left: 20%;\n    padding-bottom: 30px;\n  }\n  .carousel-indicators {\n    bottom: 20px;\n  }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-footer:before,\n.modal-footer:after {\n  display: table;\n  content: \" \";\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-footer:after {\n  clear: both;\n}\n.center-block {\n  display: block;\n  margin-right: auto;\n  margin-left: auto;\n}\n.pull-right {\n  float: right !important;\n}\n.pull-left {\n  float: left !important;\n}\n.hide {\n  display: none !important;\n}\n.show {\n  display: block !important;\n}\n.invisible {\n  visibility: hidden;\n}\n.text-hide {\n  font: 0/0 a;\n  color: transparent;\n  text-shadow: none;\n  background-color: transparent;\n  border: 0;\n}\n.hidden {\n  display: none !important;\n}\n.affix {\n  position: fixed;\n}\n@-ms-viewport {\n  width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n  display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n  display: none !important;\n}\n@media (max-width: 767px) {\n  .visible-xs {\n    display: block !important;\n  }\n  table.visible-xs {\n    display: table;\n  }\n  tr.visible-xs {\n    display: table-row !important;\n  }\n  th.visible-xs,\n  td.visible-xs {\n    display: table-cell !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-block {\n    display: block !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline {\n    display: inline !important;\n  }\n}\n@media (max-width: 767px) {\n  .visible-xs-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm {\n    display: block !important;\n  }\n  table.visible-sm {\n    display: table;\n  }\n  tr.visible-sm {\n    display: table-row !important;\n  }\n  th.visible-sm,\n  td.visible-sm {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-block {\n    display: block !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .visible-sm-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md {\n    display: block !important;\n  }\n  table.visible-md {\n    display: table;\n  }\n  tr.visible-md {\n    display: table-row !important;\n  }\n  th.visible-md,\n  td.visible-md {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-block {\n    display: block !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .visible-md-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg {\n    display: block !important;\n  }\n  table.visible-lg {\n    display: table;\n  }\n  tr.visible-lg {\n    display: table-row !important;\n  }\n  th.visible-lg,\n  td.visible-lg {\n    display: table-cell !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-block {\n    display: block !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline {\n    display: inline !important;\n  }\n}\n@media (min-width: 1200px) {\n  .visible-lg-inline-block {\n    display: inline-block !important;\n  }\n}\n@media (max-width: 767px) {\n  .hidden-xs {\n    display: none !important;\n  }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n  .hidden-sm {\n    display: none !important;\n  }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n  .hidden-md {\n    display: none !important;\n  }\n}\n@media (min-width: 1200px) {\n  .hidden-lg {\n    display: none !important;\n  }\n}\n.visible-print {\n  display: none !important;\n}\n@media print {\n  .visible-print {\n    display: block !important;\n  }\n  table.visible-print {\n    display: table;\n  }\n  tr.visible-print {\n    display: table-row !important;\n  }\n  th.visible-print,\n  td.visible-print {\n    display: table-cell !important;\n  }\n}\n.visible-print-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-block {\n    display: block !important;\n  }\n}\n.visible-print-inline {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline {\n    display: inline !important;\n  }\n}\n.visible-print-inline-block {\n  display: none !important;\n}\n@media print {\n  .visible-print-inline-block {\n    display: inline-block !important;\n  }\n}\n@media print {\n  .hidden-print {\n    display: none !important;\n  }\n}\n/*# sourceMappingURL=bootstrap.css.map */\n"
  },
  {
    "path": "docs/data-nav/example/info.json",
    "content": "{\n    \"title\": \"Example Title\",\n    \"info\": \"Example description text from `info.json` `info` field.\"\n}\n"
  },
  {
    "path": "docs/data-nav/example/readme.md",
    "content": "# Some page\n\nWith some text."
  },
  {
    "path": "docs/data-nav/info.json",
    "content": "{\n    \"title\": \"Auto-generated Navigation\",\n    \"template\": \"doc\"\n}\n"
  },
  {
    "path": "docs/data-nav/readme.md",
    "content": "Navigation blocks in SourceJS are automatically generated on client-side, replacing a defined HTML hook with hand-crafted configuration.\n\n## Embedding\n\nCopy and modify this HTML snippet to set-up your custom navigation.\n\n```html\n&lt;div class=\"source_catalog\" data-nav=\"/docs\">&lt;/div>\n```\n\n`data-nav` attribute defines the catalogue to be displayed. Inserting mentioned code in any SourceJS page a navigation like this will be generated:\n\n<div class=\"source_catalog\" data-nav=\"/docs\"></div>\n\n\n### Absolute paths\n\nWe recommend using absolute paths as most stable and predictable.\n\n```html\n&lt;div class=\"source_catalog\" data-nav=\"/docs/api\">&lt;/div>\n```\n\nRenders this navigation block:\n\n<div class=\"source_catalog\" data-nav=\"/docs/api\"></div>\n\n\n### Relative paths\n\nRelative paths are also supported. During hook initialization, engine will replace `./` with current navigation URL.\n\n```html\n&lt;div class=\"source_catalog\" data-nav=\"./api\">&lt;/div>\n```\n\nPutting this HTML snippet in `localhost:8080/docs` page, it will be resolved to `/docs/api/` catalog, same as with absolute path.\n\nThis feature is especially useful for nested catalogs and stand-alone collections like [example-specs-showcase](https://github.com/sourcejs/example-specs-showcase/blob/master/index.src.html).\n\n\n## Headings and description automatic output\n\nAuto-generated title and description in navigation block are taked directly from `info.json` meta file.\n\n```html\n&lt;div class=\"source_catalog\" data-nav=\"./example\">&lt;/div>\n```\n\n<div class=\"source_catalog\" data-nav=\"./example\"></div>\n\nIf there is no description, or you want to leave custom text, just use this extra markup:\n\n```html\n&lt;div class=\"source_catalog\" data-nav=\"./example\">\n    &lt;h2>Custom Title&lt;/h2>\n    &lt;p>Custom description for catalogue.&lt;p>\n&lt;/div>\n```\n\n<div class=\"source_catalog\" data-nav=\"./example\">\n    <h2>Custom Title</h2>\n    <p>Custom description for catalogue.</p>\n</div>\n\n## Filtering by tag\n\nAs it's possible to define different tags for specs in `info.json` [files](/docs/info-json/)), they can be used for filtering custom navigation collection.\n\n\n```html\n&lt;div class=\"source_catalog\" data-nav=\"/docs\" data-tag=\"templates\">&lt;/div>\n```\n\n<div class=\"source_catalog\" data-nav=\"/docs\" data-tag=\"templates\">\n    <h2>Specs with \"templates\" tag</h2>\n</div>\n\nTo call all specs without a tags, you can filter by `\"without-tag\"` string. Multiple tags filtering is also supported - `templates, navigation`.\n\n## Customizing Templates\n\nNavigation markup is created from templates. You can extend this templates using `options.js` and [Lodash](https://lodash.com) templates syntax:\n\n```js\nmodule.exports = {\n  core: { ... },\n  assets: {\n    ...\n    moduleOptions: {\n      globalNav: {\n        templates: {\n          catalogHeader: _.template('<h2 class=\"custom-class\">&lt;%= catalogMeta.title %&gt;</h2>'),\n        }\n      }\n    }\n  }\n}\n```"
  },
  {
    "path": "docs/index.src.html",
    "content": "<div class=\"source_subhead\">\n    <h1>Documentation and Examples</h1>\n</div>\n\n<div class=\"source_catalog\" data-nav=\"/docs\" data-tag=\"without-tag\"></div>\n\n<div class=\"source_catalog\" data-nav=\"/docs\" data-tag=\"templates\">\n    <h2>Templates</h2>\n</div>"
  },
  {
    "path": "docs/info-json/info.json",
    "content": "{\n    \"title\": \"Info.json - Spec Description\",\n    \"keywords\": \"spec meta, template, specFile\",\n    \"template\": \"doc\"\n}\n"
  },
  {
    "path": "docs/info-json/readme.md",
    "content": "`info.json` file in spec folder is used for defining page meta information and local options set-up. Use it for customizing global navigation or with your custom fields.\n\n## Used options\n\nList of used options in `info.json`:\n\n```js\n{\n    \"title\": \"Info.json - Spec Description\",\n    \"author\": \"Robert Haritonov\",\n    \"tag\": [\"tags, for, search\"],\n    \"info\": \"Spec description.\",\n    \"role\": \"navigation\",\n    \"template\": [\"custom\" | \"$(context)/template.ejs\"],\n    \"specFile\": \"index.custom.hmtl\",\n    \"thumbnailPath\": \"custom-thumbnail.png\"\n    \"sourcejs\": { \"assets\" :{} }\n}\n```\n\n* `title` - the only mandatory parameter, defines spec title in navigation\n* `author` - used in global navigation\n* `tag` - tags are used for search, filtering through [API](/docs/api) and [auto-generated navigation](/docs/data-nav)\n* `info` - spec description\n* `role` - set the page role (\"navigation\" or \"spec\"), used for setting different `*.src.html` files templates\n* `thumbnailPath` - custom relative path to spec page preview image\n\nFeel free to add any custom meta information to `info.json` file for your needs as well. This info will be then available from [Spec API](/docs/api), in middleware-plugins (`req.specData.info`) and for adding custom [ESJ templating](/docs/base/#server-side-templating-engines).\n\n### template\n\n`template` field allows defining custom parent template for rendering the spec page. Available values:\n\n* `tpl-name` - `*.ejs` template in `user/core/views` folder\n* `$(context)/tpl-name.ejs` - path to template relative to current `info.json` location, other available placeholders - `$(sourcejs)`, `$(user)`\n\n### specFile\n\n`specFile` - allows to define custom spec files source, overriding `options.rendering.specFiles` configuration.\n\n### sourcejs\n\n`sourcejs` - this field accepts a local configuration object for configuring spec level context options.\n\nRead more about engine configuration capabilities in [Engine Configuration](/docs/configuration) doc."
  },
  {
    "path": "docs/info.json",
    "content": "{\n    \"title\": \"Documentation and Examples\",\n    \"role\": \"navigation\",\n    \"info\": \"Every SourceJS instance is packed with own docs catalog.\"\n}\n"
  },
  {
    "path": "docs/markdown/info.json",
    "content": "{\n  \"title\": \"Markdown Support\",\n  \"template\": \"doc\"\n}"
  },
  {
    "path": "docs/markdown/readme.md",
    "content": "SourceJS supports markdown as pure `.md` files and renders it in any other extension files using `<markdown>` HTML tag.\n\n## Basics\n\nEngine treats `index.md` and `readme.md` as main Spec files. Readme file is taken with lowest priority after `index.src.html`, `index.md` and others.\n\nIn case if Spec folder contains `index.src.html` and `index.md`, first one will have higher priority.\n\n## Markup examples\n\n[Check out source code of this file](/docs/markdown/readme.md) and compare with this rendered Markdown page.\n\n* List 1\n* List 2\n\n\n1. Ordered list 1\n2. Ordered list 2\n\n| Table | Value |\n|---|---|\n| Td | value |\n\n```html\n&#96;``example\ncode example\n&#96;``\n```\n\n```example\nMark code with `example` keyword to define `.source_example` with your rendered component view.\n<br><br>\n<a class=\"btn btn-primary\" href=\"#777\">Example button</a>\n```\n\n## Code examples\n\nSourceJS code blocks are aligned with standard Markdown style. List of demo code examples:\n\n```\nSome random code\n.css {\n    color:red;\n}\n```\n\n```css\n.css {\n    color:red;\n}\n```\n\n```js\nvar test = function(){};\n```\n\n```html\n<div class=\"some-html\"></div>\n```\n\n```example\nrendered example\n```\n\n## h2\n\n```example\ncode example in h2\n```\n\n### h3\n\nText\n\n```example\ncode example in h3\n```\n\n* list\n* list\n\n#### h4\n\nText\n\n```example\ncode example in h4\n```\n"
  },
  {
    "path": "docs/migration/info.json",
    "content": "{\n    \"title\": \"Migration Notes\",\n    \"template\": \"doc\"\n}"
  },
  {
    "path": "docs/migration/readme.md",
    "content": "Here you will find migration instructions from different Source versions\n\n## From 0.4.0-beta to 0.4.0-rc\n\n* Update engine files, run `npm run build` in the root of engine\n* If you have custom `user/core/views`, then add `info.*` namespace to all data in template that is taken from `info.json` (`info.author`, `info.title`, `info.keywords`)\n* Set at your views and `*.html` spec files new path to main client-side file: `/source/assets/js/enter-the-source.js`"
  },
  {
    "path": "docs/spec/css/spec.css",
    "content": "/* Spec page block styles\n---------------------------------------------------------------------------------- */\n\n.some-code {\n\tfont-size: 13px;\n\t}\n\n/* /Spec page block styles\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "docs/spec/index.src.html",
    "content": "﻿<div class=\"source_info\">\n    <p>This page highlights the basic features of SourceJS documentation pages that we call Specs. To create your own Spec, follow this <a href=\"/docs/base/#creating-first-spec\">short guide</a>.</p>\n\n    <p>For text description, SourceJS uses basic HTML markup, and custom CSS class hooks. To render highlighted description block like this, add <code>.source_info</code> class to a any HTML element on page.</p>\n</div>\n\n<div class=\"source_warn\">\n    <p>Warning blocks can be added using <code>.source_warn</code>:</p>\n\n    <p>It is highly recommended that you read the HTML source of this document.</p>\n</div>\n\n<div class=\"source_doc\">\n    <p>Some related useful information you can wrap with <code>.source_doc</code></p>\n</div>\n\n<p><a class=\"source_a_d\" href=\"#777\">Links can be highlighted as link to design specification by adding <code>.source_a_d</code> as a class on the link</a></p>\n<p><a class=\"source_a_s\" href=\"#777\">Links can be highlighted as link to other specification by adding <code>.source_a_s</code> as a class on the link</a></p>\n\n<p>Highlighting can be achieved by either wrapping text in <code>&lt;code&gt;</code> tags, or by using the <span class=\"source_hl\">.source_hl class</span>.</p>\n\n<section class=\"source_section\">\n    <h2>Spec Section Heading</h2>\n\n    <a class=\"source_a_hl\" href=\"#777\">Links can be highlighted by adding <code>.source_a_hl</code> as a class on the link</a>\n\n    <p>Notes specific to particular interface elements can be documented here. Heading numbering is generated dynamically, and is supported up to 3 levels deep.</p>\n\n    <p>To render examples of interface elements, place them in a div with a class of <code>.source_example</code>:</p>\n\n    <section class=\"source_example\">\n        <div class=\"some-code\">\n            <div style=\"display: none;\">Hello world;</div>\n\n            <p>Rendered code examples - main documentation blocks.</p>\n\n            <p>Engine decorative styles do not affect this block. Link your <a href=\"#2!\">project files</a> and start prototyping.</p>\n\n            <p>This page has Twitter Bootstrap styles linked as Master App Styles.</p>\n\n            <a class=\"btn btn-primary\" href=\"#777\">Hey!</a>\n        </div>\n    </section>\n\n    <h3>Show source code</h3>\n\n    <!-- Inline JS -->\n    <!--\n    <script>\n        require(['jquery'], function($){\n            var makeSome;\n        });\n    </script>\n    -->\n    <!-- /Inline JS -->\n\n    <code class=\"src-html\">\n        You can fill custom source code blocks before \"source_example\".\n\n        If &lt;code class=\"src-html\"&gt; is not set, it will be created\n        and filled automatically from \"source_example\" contents.\n    </code>\n\n    <div class=\"source_example\">\n        <div class=\"some-code\">\n            <p>Click \"Show source\" in the inner navigation menu on the right to reveal the source for all examples.</p>\n\n            <div class=\"btn-group\">\n                <button type=\"button\" class=\"btn btn-default\">Left</button>\n                <button type=\"button\" class=\"btn btn-default\">Middle</button>\n                <button type=\"button\" class=\"btn btn-default\">Right</button>\n            </div>\n        </div>\n    </div>\n\n    <p>To render and highlight the source code, wrap it in <code>&lt;code class=\"src-html\"&gt;</code>, <code>&lt;code class=\"src-css\"&gt;</code><br> or <code>&lt;code class=\"src-js\"&gt;</code> tags, depending on the language you want to highlight, like this:</p>\n    <code class=\"src-html source_visible\">\n        &lt;code class=\"src-html\"&gt;\n            <div class=\"foo\">Bar</div>\n        &lt;/code&gt;\n    </code>\n    <code class=\"src-html source_visible\">\n        &lt;code class=\"src-css\"&gt;\n            &lt;style&gt;\n                .css_source {\n                    make-it: awesome;\n                }\n            &lt;/style&gt;\n        &lt;/code&gt;\n    </code>\n    <code class=\"src-html source_visible\">\n        &lt;code class=\"src-js\"&gt;\n            <script>\n                require(['jquery'], function($){\n                    var makeSome;\n                });\n            </script>\n        &lt;/code&gt;\n    </code>\n\n    <p>By default (before 0.6.0) all code blocks are hidden by default, and are shown after toggling \"Show source code\" in menu. To define block as visible by default, add <code>.source_visible</code> class next to <code>.src-*</code></p>\n\n</section>\n\n<section class=\"source_section\">\n    <h2>Linking Your Project's CSS</h2>\n\n    <p>Your project's CSS should be linked to each spec page to render your examples using <code>/user/core/views/spec.ejs</code>, or you can also add styles specific to a spec page:</p>\n\n    <code class=\"src-html source_visible\">\n    <!-- Your project styles -->\n        <!--Link all project styles at once-->\n            &lt;link href=\"/docs/data/bootstrap.css\" rel=\"stylesheet\"&gt;\n\n        <!--or add separate, spec specific CSS files-->\n            &lt;link href=\"css/spec.css\" rel=\"stylesheet\"&gt;\n    <!-- /Your project styles -->\n    </code>\n\n</section>\n\n<section class=\"source_section\">\n    <h2>Spec Page Markup</h2>\n\n    <p>SourceJS Specs support styling of these semantic HTML tags, that you could use to describe your sections:</p>\n\n    <ul>\n      <li><code>p</code></li>\n      <li><code>h1</code></li>\n      <li><code>h2</code></li>\n      <li><code>h3</code></li>\n      <li><code>h4</code></li>\n      <li><code>ol</code></li>\n      <li><code>ul</code></li>\n      <li><code>li</code></li>\n      <li><code>table</code></li>\n      <li><code>code</code></li>\n    </ul>\n\n    <p>This styling <strong>is not applied inside example blocks</strong>.</p>\n\n    <p>From 0.5.0 SourceJS fully supports Markdown based Specs as well. You can use <code>&lt;markdown&gt;</code> tag in any Spec templates including <code>index.src.html</code>, or just use <code>readme.md</code> templates instead.</p>\n\n    <p><a href=\"/docs/markdown\">Read more about markdown support</a></p>\n\n</section>\n\n<section class=\"source_section\">\n    <h2>Source code</h2>\n\n    <p>\n        This spec uses <code>index.src.html</code> template, view it's <a href=\"index.src.html\">source</a>.\n    </p>\n\n</section>\n\n<style>\n    .for-tests {}\n</style>\n<script>\n    var forTest = '';\n</script>"
  },
  {
    "path": "docs/spec/info.json",
    "content": "{\n    \"keywords\": \"create spec, spec markup\",\n    \"template\": \"doc\",\n    \"title\": \"Spec Page Documentation\"\n}"
  },
  {
    "path": "docs/spec-helpers/examples/buttons.html",
    "content": "<h2><%- info.title %></h2>\n\n<% var buttons = ['btn-group-lg', '', 'btn-group-sm', 'btn-group-xs'] %>\n\n<% buttons.forEach(function(modifier){ %>\n    <div class=\"btn-group <%= modifier %>\" role=\"group\" aria-label=\"Default button group\">\n      <button type=\"button\" class=\"btn btn-default\">Left</button>\n      <button type=\"button\" class=\"btn btn-default\">Middle</button>\n      <button type=\"button\" class=\"btn btn-default\">Right</button>\n    </div><br><br>\n<% }); %>"
  },
  {
    "path": "docs/spec-helpers/examples/include.html",
    "content": "Included file from `spec-helpers/examples/include.html`."
  },
  {
    "path": "docs/spec-helpers/examples/markdown-file.md",
    "content": "Processed **Markdown** file."
  },
  {
    "path": "docs/spec-helpers/examples/mask-one.html",
    "content": "one<br>"
  },
  {
    "path": "docs/spec-helpers/examples/mask-two.html",
    "content": "two<br>\n<%- includeFiles('three.html') %>"
  },
  {
    "path": "docs/spec-helpers/examples/three.html",
    "content": "three<br>"
  },
  {
    "path": "docs/spec-helpers/info.json",
    "content": "{\n    \"keywords\": \"ejs, include\",\n    \"title\": \"Spec Rendering Helpers\",\n    \"template\": \"doc\"\n}\n"
  },
  {
    "path": "docs/spec-helpers/readme.md",
    "content": "## Intro\n\nSpec pages in SourceJS engine are the main content units. They provide a proper sandbox for demoing rendered components, usage examples and module documentation. Therefore, it's really important to make Spec pages development process as easy as possible.\n\n Apart from plugins, that allow integrating different technologies for generating Specs pages, the engine provides a set of native helpers based on [EJS](http://ejs.co).\n\n Let's dive deeper into each of available Spec generation features.\n\n ## Plugins\n\n It's really important for us to make SourceJS easy adaptable to any project needs. Having a powerful, and easy-to-develop plugins system hugely improves developers user experience working with Living Style Guides.\n\n Here's a list of all Spec generation focused plugins:\n\n* [sourcejs-slm](https://github.com/venticco/sourcejs-slm) - [Slim](http://slim-lang.com/) templates support\n* [sourcejs-md-react](https://github.com/mik01aj/sourcejs-md-react) - Markdown helpers for rendering React components\n* [sourcejs-react](https://github.com/szarouski/sourcejs-react) - generate specs from JSX files\n* [sourcejs-contrib-dss](http://github.com/sourcejs/sourcejs-contrib-dss) - generating documentation out of CSS comments\n* [sourcejs-jade](https://github.com/sourcejs/sourcejs-jade) - [Jade](http://jade-lang.com/) syntax support\n\nMost of the plugins have [live examples](http://sourcejs.com/specs/example-specs-showcase/) on the project website.\n\n ## Native Templating\n\n SourceJS uses powerful [EJS](http://ejs.co/) templating engine for core UI generation and Specs content processing. This means that any Spec file can use the full power of EJS templating logic.\n\n ```html\n&lt;% if (info.title === 'Title') {% &gt; Action! &lt;% } %&gt;\n```\n\nUse plain JavaScript for managing conditions and generating demo content through data loops. All `info.json` file contents are by default available in each Spec scope. Apart from common [meta information](/docs/info-json) available in `info.json` files, it's possible to set any of your own custom data.\n\n```html\n&lt;h2&gt;&lt;%- info.title %&gt;&lt;/h2&gt;\n\n&lt;% var buttons = ['btn-group-lg', '', 'btn-group-sm', 'btn-group-xs'] %&gt;\n\n&lt;% buttons.forEach(function(modifier){ %&gt;\n    &lt;div class=\"btn-group &lt;%= modifier %&gt;\" role=\"group\" aria-label=\"Default button group\"&gt;\n      &lt;button type=\"button\" class=\"btn btn-default\"&gt;Left&lt;/button&gt;\n      &lt;button type=\"button\" class=\"btn btn-default\"&gt;Middle&lt;/button&gt;\n      &lt;button type=\"button\" class=\"btn btn-default\"&gt;Right&lt;/button&gt;\n    &lt;/div&gt;&lt;br&gt;&lt;br&gt;\n&lt;% }); %&gt;\n```\n\n```example\n<%- include('examples/buttons.html') %>\n```\n\n### Includes\n\nProviding a relative path to current Specs, it's easy to include any file.\n\n```html\n&lt;%- include('examples/include.html') %&gt;\n```\n\n```example\n<%- include('examples/include.html') %>\n```\n\nNote that by default, SourceJS restricts including files outside project directory for security reasons. To disable this restrictions, change `core.sandboxIncludes` configuration.\n\n<a href=\"https://github.com/sourcejs/Source/tree/master/docs/spec-helpers/examples\" class=\"source_a_hl\">View examples source code.</a>\n\n\n## EJS Custom Helpers\n\nStarting from v.0.5.6, SourceJS provides a set of custom EJS helpers:\n\n* `includeMD(path)` - include and process Markdown file\n* `includeFiles(glob)` - include a set of files by mask (uses [glob](https://github.com/isaacs/node-glob))\n\nFeel free to create Pull Requests with a wider set of helpers.\n\n### includeMD\n\n```html\n&lt;%- includeMD('examples/markdown-file') %&gt;\n```\n\n```example\n<%- includeMD('examples/markdown-file') %>\n```\n\n### includeFiles\n\n```html\n&lt;%- includeFiles('examples/mask-*.html') %&gt;\n```\n\n```example\n<%- includeFiles('examples/mask-*.html') %>\n```\n\n<a href=\"https://github.com/sourcejs/Source/tree/master/docs/spec-helpers/examples\" class=\"source_a_hl\">View examples source code.</a>\n\n## Extended features\n\nFor any other custom Spec content processing, we recommend building own SourceJS plugins. Follow our [instructions](/docs/api/plugins/) and example plugins for fast kick-off.\n\nIt's also possible to configure custom build task, that will generate compatible Spec pages via Grunt/Gulp or any other build tool."
  },
  {
    "path": "docs/starting/css/starting.css",
    "content": "/* Starting template\n---------------------------------------------------------------------------------- */\n\n\n\n/* /Starting template\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "docs/starting/index.src.html",
    "content": "﻿<link rel=\"stylesheet\" href=\"css/starting.css\">\n\n<h1>Starting Spec Page Template</h1>\n\n<div class=\"source_info\">\n    <p>\n        Developer: Name <br>\n        Designer: Name\n    </p>\n\n    <p>Useful information regarding this spec can be left for your team members here.</p>\n</div>\n\n<section class=\"source_section\">\n    <h2>Spec Section Heading</h2>\n\n    <a class=\"source_a_hl\" href=\"/docs/spec\">Spec Page Documentation</a>\n\n    <p>Useful notes.</p>\n\n    <div class=\"source_example\">\n        <p>Rendered code examples.</p>\n    </div>\n\n    <p>\n        This spec uses <code>index.src.html</code> template, view it's <a href=\"index.src.html\">source</a>.\n    </p>\n\n</section>"
  },
  {
    "path": "docs/starting/info.json",
    "content": "{\n    \"author\": \"Spec author\",\n    \"title\": \"Starting Spec Page Template\",\n    \"tag\": [\"templates\"]\n}"
  },
  {
    "path": "docs/starting-md/css/starting.css",
    "content": "/* Starting template\n---------------------------------------------------------------------------------- */\n\n\n\n/* /Starting template\n---------------------------------------------------------------------------------- */"
  },
  {
    "path": "docs/starting-md/info.json",
    "content": "{\n    \"author\": \"Spec author\",\n    \"title\": \"Markdown Spec Page Template\",\n    \"tag\": [\"templates\"]\n}"
  },
  {
    "path": "docs/starting-md/readme.md",
    "content": "﻿<link rel=\"stylesheet\" href=\"css/starting.css\">\n\n# Markdown Spec Page Template\n\nDeveloper: Name<br>\nDesigner: Name\n\nUseful information regarding this spec can be left for your team members here.\n\n## Spec Section Heading\n\n<a class=\"source_a_hl\" href=\"/docs/spec\">Spec Page Documentation</a>\n\nUseful notes.\n\n```example\n<p>Rendered code examples.</p>\n```\n\nThis spec uses <code>readme.md</code> template, view it's <a href=\"readme.md\">source</a>."
  },
  {
    "path": "docs/test-specs/styles/includes/all-tags.html",
    "content": "Some text <a href=\"/docs/base#creating-first-spec\">some link</a>. <strong>Strong</strong>, <b>b</b>, <em>em</em>, <i>i</i>, <s>s</s>.\n\n<p>In text in P tag <a href=\"/docs/base#creating-first-spec\">some link</a>. Some text <a href=\"/docs/base#creating-first-spec\">some link</a>. <strong>Strong</strong>, <b>b</b>, <em>em</em>, <i>i</i>, <s>s</s>.</p>\n\n<ul>\n    <li>List 1</li>\n    <li>List 2 <a href=\"/docs/base#creating-first-spec\">short guide</a></li>\n    <li>List 3 - Long text Lorem ipsum dolor sit amet, consectetur adipiscing elit. At tu eadem ista dic in iudicio aut, si coronam times, dic in senatu. Aliter enim explicari, quod quaeritur, non potest. Quid, quod res alia tota est?</li>\n    <li>List 4</li>\n</ul>\n\n<ol>\n    <li>List 1</li>\n    <li>List 2 <a href=\"/docs/base#creating-first-spec\">short guide</a></li>\n    <li>List 3 - Long text Lorem ipsum dolor sit amet, consectetur adipiscing elit. At tu eadem ista dic in iudicio aut, si coronam times, dic in senatu. Aliter enim explicari, quod quaeritur, non potest. Quid, quod res alia tota est?</li>\n    <li>List 4</li>\n</ol>\n\n<p>For text description, SourceJS uses basic HTML markup, and custom CSS class hooks. To render highlighted description block like this, add <code>.source_info</code> class to a any HTML element on page.</p>\n\n<table>\n    <thead>\n    <tr>\n        <th>name</th>\n        <th style=\"text-align:center\">version</th>\n        <th style=\"text-align:right\">bundle</th>\n    </tr>\n    </thead>\n    <tbody>\n    <tr>\n        <td>widget-estatement</td>\n        <td style=\"text-align:center\"><a href=\"/docs/base#creating-first-spec\">short guide</a></td>\n        <td style=\"text-align:right\">launchpad</td>\n    </tr>\n    </tbody>\n</table>\n\n<code>code full</code>\n\n<p>\n    <code>code in p</code>\n</p>\n\n<p>\n    <code>code in div</code>\n</p>"
  },
  {
    "path": "docs/test-specs/styles/index.src.html",
    "content": "﻿<div class=\"source_warn\">\n    <%- include('includes/all-tags.html') %>\n</div>\n\n<div class=\"source_doc\">\n    <%- include('includes/all-tags.html') %>\n</div>\n\n<div class=\"source_note\">\n    <%- include('includes/all-tags.html') %>\n</div>\n\n<p><a class=\"source_a_d\" href=\"#777\">Links can be highlighted as link to design specification by adding <code>.source_a_d</code> as a class on the link</a></p>\n<p><a class=\"source_a_s\" href=\"#777\">Links can be highlighted as link to other specification by adding <code>.source_a_s</code> as a class on the link</a></p>\n\n<a class=\"source_a_hl\" href=\"#777\">Links can be highlighted by adding <code>.source_a_hl</code> as a class on the link</a>\n\n<p>Highlighting can be achieved by either wrapping text in <code>&lt;code&gt;</code> tags, or by using the <span class=\"source_hl\">.source_hl class</span>.</p>\n\n<section class=\"source_section\">\n    <h2>Spec Section Heading</h2>\n\n    <a class=\"source_a_hl\" href=\"#777\">Links can be highlighted by adding <code>.source_a_hl</code> as a class on the link</a>\n\n    <p>Notes specific to particular interface elements can be documented here. Heading numbering is generated dynamically, and is supported up to 3 levels deep.</p>\n\n    <section class=\"source_example\">\n        <div class=\"some-code\">\n            <div style=\"display: none;\">Hello world;</div>\n\n            <p>Rendered code examples - main documentation blocks.</p>\n\n            <p>Engine decorative styles do not affect this block. Link your <a href=\"#2!\">project files</a> and start prototyping.</p>\n\n            <p>This page has Twitter Bootstrap styles linked as Master App Styles.</p>\n\n            <a class=\"btn btn-primary\" href=\"#777\">Hey!</a>\n        </div>\n    </section>\n\n    <code class=\"src-html\">\n        You can fill custom source code blocks before \"source_example\".\n\n        If &lt;code class=\"src-html\"&gt; is not set, it will be created\n        and filled automatically from \"source_example\" contents.\n    </code>\n\n    <div class=\"source_example\">\n        <div class=\"some-code\">\n            <p>Click \"Show source\" in the inner navigation menu on the right to reveal the source for all examples.</p>\n\n            <div class=\"btn-group\">\n                <button type=\"button\" class=\"btn btn-default\">Left</button>\n                <button type=\"button\" class=\"btn btn-default\">Middle</button>\n                <button type=\"button\" class=\"btn btn-default\">Right</button>\n            </div>\n        </div>\n    </div>\n\n    <p>To render and highlight the source code, wrap it in <code>&lt;code class=\"src-html\"&gt;</code>, <code>&lt;code class=\"src-css\"&gt;</code><br> or <code>&lt;code class=\"src-js\"&gt;</code> tags, depending on the language you want to highlight, like this:</p>\n\n    <code class=\"src-html source_visible\">\n        &lt;code class=\"src-html\"&gt;\n            <div class=\"foo\">Bar</div>\n        &lt;/code&gt;\n    </code>\n\n    <h3>h3</h3>\n\n    some\n\n    <h4>h4</h4>\n\n    some\n\n</section>\n\n<section class=\"source_section\">\n    <h2>Linking Your Project's CSS</h2>\n\n    <code class=\"src-html source_visible\">\n    <!-- Your project styles -->\n        <!--Link all project styles at once-->\n            &lt;link href=\"/docs/data/bootstrap.css\" rel=\"stylesheet\"&gt;\n\n        <!--or add separate, spec specific CSS files-->\n            &lt;link href=\"css/spec.css\" rel=\"stylesheet\"&gt;\n    <!-- /Your project styles -->\n    </code>\n\n</section>\n\n<section class=\"source_section\">\n    <h2>Spec Page Markup</h2>\n\n    <%- include('includes/all-tags.html') %>\n\n    <div class=\"source_info\">\n        <%- include('includes/all-tags.html') %>\n    </div>\n\n    <div class=\"source_warn\">\n        <%- include('includes/all-tags.html') %>\n    </div>\n\n    <div class=\"source_doc\">\n        <%- include('includes/all-tags.html') %>\n    </div>\n\n    <div class=\"source_note\">\n        <%- include('includes/all-tags.html') %>\n    </div>\n\n</section>\n\n<section class=\"source_section\">\n    <h2>Source code</h2>\n\n    <p>\n        This spec uses <code>index.src.html</code> template, view it's <a href=\"index.src.html\">source</a>.\n    </p>\n\n</section>"
  },
  {
    "path": "docs/test-specs/styles/info.json",
    "content": "{\n    \"template\": \"doc\",\n    \"title\": \"Spec Styles Test Page (кириллица)\",\n    \"tag\": [\"hidden\"]\n}"
  },
  {
    "path": "options.js",
    "content": "// Default SourceJS engine configuration\n\nmodule.exports = {\n\n    // Restart the app after changing core (back-end) options\n    // Core options could be only redefined from user/options.js, context options are not supported\n    core : {\n        common: {\n            defaultLogLevel: 'INFO',\n            defaultProdLogLevel: 'ERROR',\n            includedDirs: ['docs'],\n            specPaths: ['specs'],\n\n            // Turn on context level setting\n            contextOptions: true,\n\n            // Name of context level settings file\n            contextOptionsFile: 'sourcejs-options.js',\n\n            // Path to your SourceJS configuration folder\n            pathToUser: 'user',\n\n            // Name of spec meta info file\n            infoFile: 'info.json',\n\n            // Name of options field in info.json, used to override configuration per spec\n            infoFileOptions: 'sourcejs'\n        },\n\n        // Server options are passed to app.listen (https://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback)\n        server: {\n            port: 8080,\n            hostname: undefined\n        },\n\n        api: {\n            specsData: 'core/api/data/pages-tree.json',\n            htmlData: 'core/api/data/html.json',\n            specsTestData: 'test/data/api-test-specs.json',\n            htmlTestData: 'test/data/api-test-html.json'\n        },\n\n        // Spec catalogs navigation tree\n        fileTree: {\n            // Exclude files from file-tree indexing (first level, in user folder)\n            excludedDirs: ['node_modules', 'bower_components', 'data', 'plugins', '.git', '.idea'],\n\n            // Exclude files from file-tree indexing (on any level, by folder name)\n            excludedDirsGlobal: ['node_modules', '.git', '.idea'],\n\n            // Update navigation tree by cron task (setTimeout)\n            cron: false,\n\n            // Update navigation tree when somebody visits main page\n            mainPageTrigger: false,\n\n            // Default thumbnail file path (relative to each spec)\n            thumbnail: 'thumbnail.png'\n        },\n\n        watch: {\n            enabled: true,\n            foreverWatchEnabled: true\n        },\n\n        tracking: {\n            // Anonymous user statistics tracking.\n            // Used to get insights about the community and improve engine usage experience.\n            enabled: true\n        },\n\n        // Limits EJS includes, allowing only files in project root\n        sandboxIncludes: true\n    },\n\n    // Page rendering configuration (redefinable from context options)\n    rendering: {\n        // Define priority of spec file source\n        specFiles: [\n            'index.src',\n            'index.src.html',\n            'index.jade', // https://www.npmjs.com/package/sourcejs-jade\n            'index.jsx', // https://www.npmjs.com/package/sourcejs-react\n            'index.md',\n            'readme.md',\n            'README.md',\n            'index.html'\n        ],\n\n        // Define views for rendering SourceJS pages (array order define priority)\n        views: {\n            defaultViewPaths: [\n                '$(user)/core/views',\n                '$(sourcejs)/core/views'\n            ],\n            spec: [\n                '$(user)/core/views/spec.ejs',\n                '$(sourcejs)/core/views/spec.ejs'\n            ],\n            navigation: [\n                '$(user)/core/views/navigation.ejs',\n                '$(sourcejs)/core/views/navigation.ejs'\n            ]\n        }\n    },\n\n    // Client-side options (redefinable from context options)\n    assets: {\n        // Page classes\n        containerClass : 'source_container',\n        headerClass : 'source_header',\n        SECTION_CLASS : 'source_section',\n        exampleSectionClass : 'source_example',\n        exampleCleanClass : 'source_clean',\n        mainClass : 'source_main',\n        mainNav : 'source_main_nav',\n        colMain : 'source_col-main',\n\n        // Core modules\n        modulesEnabled : {\n            // Enable clarify helper links in spec\n            clarifyInSpec: true,\n            htmlAPISync: true,\n            headerFooter: true,\n            specDecorations: true,\n            codeSource: true,\n            sectionFolding: true,\n            innerNavigation: true,\n\n            // Trims paces in example sections to emulate HTML minify, off by default\n            trimSpaces: false,\n            scrollToHash: true,\n            sections: true,\n            globalNav: true,\n            search: true,\n            loadEvents: true,\n            navHighlight: true,\n\n            // Enable github auth toolbar links\n            auth: false\n        },\n\n        modulesOptions : {\n            navHighlight: {\n                // Page navigation hash update on scroll turned off because of performance issues\n                updateHash: false\n            },\n\n            search: {\n                autofocusOnNavigationPage: true,\n                autofocusOnSpecPage: false,\n                activateOnLoad: true\n            }\n        },\n\n        // Landing page options for moduleLoader (override without extend)\n        navPageModulesBuild: {\n            modulesEnabled : {\n                headerFooter: true,\n                specDecorations: true,\n                globalNav: true,\n                search: true\n            },\n            pluginsEnabled: {},\n            npmPluginsEnabled: {}\n        },\n\n        // Legacy options object support for some older plugins (todo:remove with next major release)\n        pluginsOptions: {}\n    },\n\n    // External plugins options (are also exposed to client-side\n    plugins: {\n        // PhantomJS HTML API parser will be moved to plugin at v.0.6\n        htmlParser: {\n            enabled: false\n        }\n    },\n\n    /*\n     * Please pay your attention. This is DEMO github applicatio key.\n     *\n     * To get your own one please use github applications service.\n     * Please visit this link to get more information:\n     * https://developer.github.com/guides/basics-of-authentication/#registering-your-app\n     * Current demo key is used in test mode for http://127.0.0.1:8080\n     */\n    github: {\n        appId: 'cf00a9e7ee5d9d6af36f',\n        appSecret: 'aebe08e0aa66f6911e4f54df81ce64c9d6e0003b'\n    }\n};\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"sourcejs\",\n  \"description\": \"Living Style Guide Engine for Managing and Developing Front-end Components.\",\n  \"author\": \"SourceJS\",\n  \"version\": \"0.5.6\",\n  \"license\": \"MIT\",\n  \"engines\": {\n    \"node\": \">=0.10.0 <4.0\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/sourcejs/Source.git\"\n  },\n  \"dependencies\": {\n    \"async\": \"~0.9.0\",\n    \"body-parser\": \"~1.6.4\",\n    \"cheerio\": \"^0.19.0\",\n    \"colors\": \"0.6.x\",\n    \"commander\": \"^2.8.1\",\n    \"compression\": \"~1.0.11\",\n    \"cookie-parser\": \"~1.3.2\",\n    \"deep-extend\": \"~0.2.11\",\n    \"device\": \"^0.3.2\",\n    \"ejs\": \"operatino/ejs#2.3.4-sandbox-option\",\n    \"everyauth\": \"^0.4.9\",\n    \"express\": \"~4.8.3\",\n    \"express-session\": \"^1.10.2\",\n    \"extend\": \"~1.2.1\",\n    \"flat\": \"^1.2.1\",\n    \"fs-extra\": \"~0.11.1\",\n    \"fs-finder\": \"operatino/node-fs-finder#fix-windows-find-up\",\n    \"glob\": \"^5.0.14\",\n    \"grunt\": \"~0.4.5\",\n    \"grunt-autoprefixer\": \"~1.0.0\",\n    \"grunt-cli\": \"^0.1.13\",\n    \"grunt-contrib-clean\": \"^0.6.0\",\n    \"grunt-contrib-copy\": \"~0.5.0\",\n    \"grunt-contrib-cssmin\": \"~0.6.2\",\n    \"grunt-contrib-htmlmin\": \"~0.3.0\",\n    \"grunt-contrib-jshint\": \"^0.11.2\",\n    \"grunt-contrib-less\": \"~0.11.0\",\n    \"grunt-contrib-uglify\": \"~0.2.7\",\n    \"grunt-contrib-watch\": \"~0.5.3\",\n    \"grunt-jsdoc\": \"^0.5.7\",\n    \"grunt-newer\": \"~0.6.1\",\n    \"gulp-watch\": \"operatino/gulp-watch#4.3.5-latest-fsevents\",\n    \"jsdom\": \"^1.2.1\",\n    \"load-grunt-parent-tasks\": \"^0.1.1\",\n    \"load-grunt-tasks\": \"~0.3.0\",\n    \"lodash\": \"^3.10.1\",\n    \"log4js\": \"~0.6.20\",\n    \"macaddress\": \"^0.2.8\",\n    \"marked\": \"^0.3.2\",\n    \"path\": \"^0.4.9\",\n    \"phantomjs\": \"1.9.7-15\",\n    \"pretty-hrtime\": \"^1.0.0\",\n    \"q\": \"^1.1.1\",\n    \"serve-favicon\": \"^2.2.0\",\n    \"shortid\": \"^2.2.2\",\n    \"time-grunt\": \"~0.2.10\",\n    \"tinyforever\": \"0.0.3\",\n    \"universal-analytics\": \"^0.3.9\"\n  },\n  \"scripts\": {\n    \"postinstall\": \"node ./core/postInstall && grunt update && node ./core/trackInstall\",\n    \"build\": \"npm i\",\n    \"lint\": \"grunt jshint\",\n    \"start\": \"node app\",\n    \"watch\": \"grunt watch-all\",\n    \"watch:css\": \"grunt watch-css\",\n    \"test\": \"grunt ci-pre-run && node app.js --test\",\n    \"test:unit\": \"grunt test\",\n    \"test:func\": \"grunt test-func\",\n    \"ci-test\": \"grunt ci-pre-run && node app.js --test --log trace\",\n    \"ci-test-win\": \"grunt ci-pre-run && node app.js --post-grunt ci-post-run-win --test --log trace --no-watch\"\n  },\n  \"devDependencies\": {\n    \"assert\": \"~1.1.1\",\n    \"chai\": \"^3.2.0\",\n    \"cross-spawn\": \"^0.4.0\",\n    \"grunt-casperjs\": \"^2.1.0\",\n    \"grunt-mocha-test\": \"^0.12.4\",\n    \"mocha\": \"^2.0.1\",\n    \"should\": \"~4.0.4\",\n    \"supertest\": \"~0.13.0\"\n  }\n}\n"
  },
  {
    "path": "source.sh",
    "content": "#!/bin/bash\n#\n# description: SourceJS service, for managing production server, using node-forever.\n# processname: node\n#\n# Based on https://gist.github.com/jinze/3748766\n#\n# To use it as service on Ubuntu:\n# sudo cp source.sh /etc/init.d/source\n# sudo chmod a+x /etc/init.d/source\n# sudo update-rc.d source defaults\n#\n# Then use commands:\n# sudo service source <command (start|stop|etc)>\n\nNAME=SourceJS                            # Unique name for the application\nUSER=user                                # User for process running\nHOME_DIR=/home/user                      # User home dir\nSOUREC_DIR=$HOME_DIR/Source              # Location of the application source\nCOMMAND=node                             # Command to run\nAPP_PATH=$SOUREC_DIR/app.js              # Application entry point script\nNODE_ENVIRONMENT=production              # Node environment\n\nFOREVER=forever\n\nstart() {\n    echo \"Starting $NAME node instance : \"\n\n    sudo -H -u $USER NODE_ENV=$NODE_ENVIRONMENT $FOREVER start -a -c $COMMAND $APP_PATH\n\n    RETVAL=$?\n}\n\nrestart() {\n    echo \"Restarting $NAME node instance : \"\n    sudo -H -u $USER $FOREVER restart $APP_PATH\n    RETVAL=$?\n}\n\nstatus() {\n    echo \"Status for $NAME : \"\n    sudo -H -u $USER $FOREVER list\n    RETVAL=$?\n}\n\nstop() {\n    echo \"Shutting down $NAME node instance.\"\n    sudo -H -u $USER $FOREVER stop $APP_PATH\n    RETVAL=$?\n}\n\ncase \"$1\" in\n    start)\n        start\n        ;;\n    stop)\n        stop\n        ;;\n    status)\n        status\n        ;;\n    restart)\n        restart\n        ;;\n    *)\n        echo \"Usage:  {start|stop|status|restart}\"\n        exit 1\n        ;;\nesac\nexit $RETVAL"
  },
  {
    "path": "test/data/api-test-html.json",
    "content": "{\n    \"base-test\": {\n        \"button\": {\n            \"specFile\": {\n                \"id\": \"base-test/button\",\n                \"css\": \"\",\n                \"js\": \"\",\n                \"contents\": [\n                    {\n                        \"id\": \"1\",\n                        \"class\": \"\",\n                        \"title\": \"\",\n                        \"html\": [\n                            \"<button type='button' class='btn btn-default'><span class='glyphicon glyphicon-align-right'></span></button>\"\n                        ],\n                        \"nested\": [\n                            {\n                                \"id\": \"1.1\",\n                                \"class\": \"\",\n                                \"title\": \"\",\n                                \"html\": [\n                                    \"<button type='button' class='btn btn-default btn-lg'><span class='glyphicon glyphicon-star'></span> Star</button>\"\n                                ],\n                                \"nested\": []\n                            }\n                        ]\n                    },\n                    {\n                        \"id\": \"2\",\n                        \"class\": \"\",\n                        \"title\": \"\",\n                        \"html\": [\n                            \"<button type='button' class='btn btn-default'><span class='glyphicon glyphicon-align-right'></span></button>\"\n                        ],\n                        \"nested\": []\n                    }\n                ]\n            }\n        },\n        \"nav-sm\": {\n            \"specFile\": {\n                \"id\": \"base-test/nav-sm\",\n                \"css\": \"\",\n                \"js\": \"\",\n                \"contents\": [\n                    {\n                        \"id\": \"1\",\n                        \"class\": \"\",\n                        \"title\": \"\",\n                        \"html\": [\n                            \"<div class='dropdown clearfix'><button class='btn btn-default dropdown-toggle' type='button' id='dropdownMenu1' data-toggle='dropdown'>Dropdown<span class='caret'></span></button><ul class='dropdown-menu' role='menu' aria-labelledby='dropdownMenu1'><li role='presentation'><a role='menuitem' tabindex='-1' href='#'>Action</a></li><li role='presentation'><a role='menuitem' tabindex='-1' href='#'>Another action</a></li><li role='presentation'><a role='menuitem' tabindex='-1' href='#'>Something else here</a></li><li role='presentation' class='divider'></li><li role='presentation'><a role='menuitem' tabindex='-1' href='#'>Separated </a></li></ul></div>\"\n                        ]\n                    },\n                    {\n                        \"id\": \"2\",\n                        \"class\": \"\",\n                        \"title\": \"\",\n                        \"html\": [\n                            \"<div class='dropdown clearfix'><button class='btn btn-default dropdown-toggle' type='button' id='dropdownMenu1' data-toggle='dropdown'>Dropdown<span class='caret'></span></button><ul class='dropdown-menu' role='menu' aria-labelledby='dropdownMenu1'><li role='presentation'><a role='menuitem' tabindex='-1' href='#'>Action</a></li><li role='presentation'><a role='menuitem' tabindex='-1' href='#'>Another action</a></li><li role='presentation'><a role='menuitem' tabindex='-1' href='#'>Something else here</a></li><li role='presentation' class='divider'></li><li role='presentation'><a role='menuitem' tabindex='-1' href='#'>Separated link123123123</a></li></ul></div>\"\n                        ]\n                    }\n                ]\n            }\n        }\n    }\n}"
  },
  {
    "path": "test/data/api-test-specs.json",
    "content": "{\n    \"base-test\": {\n        \"base\": {\n            \"specFile\": {\n                \"url\": \"/base/base\",\n                \"lastmod\": \"12.8.2014\",\n                \"lastmodSec\": 1407856231000,\n                \"fileName\": \"index.html\",\n                \"thumbnail\": false,\n                \"author\": \"Evgeny Khoroshilov\",\n                \"title\": \"Мелкие стандарты\",\n                \"tag\": [\n                    \"html\",\n                    \"tag\"\n                ],\n                \"info\": \"Страница с описанием небольших стартов, которые не доросли до своей спеки.\"\n            }\n        },\n        \"button\": {\n            \"specFile\": {\n                \"url\": \"/base/button\",\n                \"lastmod\": \"12.8.2014\",\n                \"lastmodSec\": 1407856231000,\n                \"fileName\": \"index.html\",\n                \"thumbnail\": true,\n                \"tag\": [\n                    \"some\"\n                ],\n                \"keywords\": \"base, standard\",\n                \"author\": \"Evgeny Khoroshilov\",\n                \"title\": \"Мелкие стандарты\"\n            }\n        }\n    },\n    \"project-test\": {\n        \"project-spec\": {\n            \"specFile\": {\n                \"url\": \"/project/project-spec\",\n                \"lastmod\": \"12.8.2014\",\n                \"lastmodSec\": 1407856231000,\n                \"fileName\": \"index.html\"\n            }\n        }\n    },\n    \"specFile\": {\n        \"url\": \"\",\n        \"lastmod\": \"31.7.2014\",\n        \"lastmodSec\": 1406793767000,\n        \"fileName\": \"index.src\",\n        \"thumbnail\": false,\n        \"title\": \"OK Prototype\",\n        \"role\": \"navigation\"\n    }\n}"
  },
  {
    "path": "test/functional/common.js",
    "content": "var appPort = casper.cli.get(\"app-port\") || 8080;\nvar url = 'http://127.0.0.1:' + appPort;\n\ncasper.options.viewportSize = {width: 1024, height: 768};\n\nvar urlsToCheck = [\n    url,\n    url + '/docs/spec/',\n    url + '/docs/'\n];\n\nvar error = {};\n\ncasper.on(\"page.error\", function(msg, trace) {\n    error.msg = msg;\n\n    this.echo(\"Error:    \" + msg, \"ERROR\");\n    this.echo(\"file:     \" + trace[0].file, \"WARNING\");\n    this.echo(\"line:     \" + trace[0].line, \"WARNING\");\n    this.echo(\"function: \" + trace[0][\"function\"], \"WARNING\");\n});\n\nurlsToCheck.forEach(function(item){\n    casper.test.begin('Check availability and JS errors on ' + item, 2, function(test) {\n        error = {};\n\n        casper.start(item).then(function(response) {\n\n            casper.wait(500, function(){\n                // Slow down a bit, because of strange API bug\n            });\n\n            if (response.status !== 200) {\n                test.fail(\"Page load error, expected status 200, got \" + response.status);\n            } else {\n                test.pass(\"Status 200 OK\");\n            }\n        }).then(function() {\n            if (typeof error.msg === 'string') {\n                test.fail(\"JS errors found: \"+ error.msg);\n            } else {\n                test.pass(\"No JS errors\");\n            }\n\n        }).run(function() { test.done() }).clear();\n    });\n});"
  },
  {
    "path": "test/functional/globalNav.js",
    "content": "var appPort = casper.cli.get('app-port') || 8080;\nvar url = 'http://127.0.0.1:' + appPort + '/docs/';\n\ncasper.options.viewportSize = {width: 1024, height: 768};\n\ncasper.test.begin('Check navigaton page', 3, function suite(test) {\n\tcasper.start(url).then(function() {\n        var _this = this;\n        var nav = '.source_catalog_list .source_catalog_list_i';\n\n        this.waitForSelector(nav,\n            function pass() {\n                test.assertEval(function (nav) {\n                    return document.querySelectorAll(nav).length > 5;\n                }, 'Should have more than 5 nav items', [nav]);\n\n                test.assertEval(function (nav) {\n                    return !!document.querySelector(nav + ' .source_catalog_a[href=\"/docs/base\"]') &&\n                        !!document.querySelector(nav + ' .source_catalog_a[href=\"/docs/clarify\"]') &&\n                        !!document.querySelector(nav + ' .source_catalog_a[href=\"/docs/starting\"]');\n                }, 'Right nav items in set', [nav]);\n            },\n            function fail() {\n                test.fail(nav);\n            }\n        );\n\n    }).then(function(){\n        this.click('.source_catalog_image-tumbler');\n        test.assertExists('.source_catalog.__show-preview', 'Show preview toggled');\n\n    }).run(function() { test.done() }).clear();\n});"
  },
  {
    "path": "test/functional/search.js",
    "content": "var appPort = casper.cli.get('app-port') || 8080;\nvar url = 'http://127.0.0.1:' + appPort;\n\ncasper.options.viewportSize = {width: 1024, height: 768};\n\ncasper.test.begin('Checking search', 3, function suite(test) {\n\tcasper.start(url).then(function() {\n        var _this = this;\n        var input = '.source_search .source_search_it';\n        var autoComplete = '.autocomplete-wrapper .autocomplete-suggestion:first-child a';\n        var searchField = '.source_search_it[data-initialized]';\n\n\t\ttest.assertExists(input, 'Search input exists');\n\n        this.waitForSelector(searchField,\n            function pass() {\n                casper.sendKeys(searchField, 'main', {keepFocus: true});\n\n                _this.waitForSelector(autoComplete,\n                    function pass() {\n                        this.click(autoComplete);\n                    },\n                    function fail() {\n                        test.fail(autoComplete);\n                    }\n                );\n            },\n            function fail() {\n                test.fail(searchField);\n            }\n        );\n\n    }).then(function() {\n\n        this.waitFor(\n            function check() {\n                return (this.getCurrentUrl() === url+'/docs/base/');\n            },\n            function then() { // step to execute when check() is ok\n                test.assertExists('.source_main > h1', 'Spec header exists');\n\n                test.assertEquals(this.getCurrentUrl(), url+'/docs/base/', 'New page URL is right')\n            },\n            function timeout() { // step to execute if check has failed\n                this.echo('Failed to navigate to search result');\n            }\n        );\n\n\t}).run(function() { test.done() }).clear();\n});"
  },
  {
    "path": "test/functional/snippets.md",
    "content": "# CasperJS code snippets\n\nTimeout\n\n```\ncasper.wait(1000, function () {\n});\n```\n\nScreenshot\n\n```\nthis.capture('test.png');\n\nthis.capture('test.png', {\n    top: 0,\n    left: 0,\n    width: 1024,\n    height: 768\n});\n```\n\nWait for\n\n```\n_this.waitForSelector(autoComplete,\n    function pass() {\n        this.click(autoComplete);\n    },\n    function fail() {\n        test.fail(autoComplete);\n    }\n);\n\nthis.waitFor(\n    function check() {\n        return (this.getCurrentUrl() === url+'/docs/base/');\n    },\n    function then() { // step to execute when check() is ok\n        test.assertExists('.source_main > h1', 'Spec header exists');\n\n        test.assertEquals(this.getCurrentUrl(), url+'/docs/base/', 'New page URL is right')\n    },\n    function timeout() { // step to execute if check has failed\n        this.echo('Failed to navigate to search result');\n    }\n);\n```\n\nEval\n\n```\nvar nav = 'some'\ntest.assertEval(function (nav) {\n    return document.querySelectorAll(nav).length > 5;\n}, 'Should have more than 5 nav items', [nav]);\n\nvar js = this.evaluate(function() {\n    return document;\n});\nthis.echo(js.all[0].outerHTML);\n```\n"
  },
  {
    "path": "test/functional/specpage.js",
    "content": "var appPort = casper.cli.get('app-port') || 8080;\nvar url = 'http://127.0.0.1:' + appPort + '/docs/spec/';\n\ncasper.options.viewportSize = {width: 1024, height: 768};\n\ncasper.test.begin('Checking inner navigation', 3, function suite(test) {\n\tcasper.start(url).then(function() {\n        var _this = this;\n        var menu = '.source_nav.__loaded';\n\n        this.waitForSelector(menu,\n            function pass() {\n                this.click('.source_nav .source_main_nav_li:nth-child(2) a');\n\n                test.assertEquals(this.getCurrentUrl(), url+'#2', 'URL with hash is right')\n            },\n            function fail() {\n                test.fail(menu);\n            }\n        );\n\n    }).then(function() {\n        var highlighted = '.source_nav .source_main_nav_li:nth-child(2).__active a.__active';\n\n        this.waitForSelector(highlighted,\n            function pass() {\n                test.assertEval(function () {\n                    return window.pageYOffset > 1000 && window.pageYOffset < 2500;\n                }, 'Page should be scrolled to section');\n\n                test.assertExists(highlighted, 'Menu item highlighted');\n            },\n            function fail() {\n                test.fail(highlighted);\n            }\n        );\n\n\t}).run(function() { test.done() }).clear();\n});\n\ncasper.test.begin('Code source', 2, function suite(test) {\n\tcasper.start(url).then(function() {\n        var _this = this;\n        var actionItem = '.source_main_nav_ac_item.source_source-code_action-item';\n\n        this.waitForSelector(actionItem,\n            function pass() {\n                this.click(actionItem + ' .source_slider_frame');\n                test.assertExists(actionItem + ' .source_slider_frame.source_slider_frame__on', 'Toggler is highlighted');\n            },\n            function fail() {\n                test.fail(actionItem);\n            }\n        );\n\n    }).then(function() {\n        var codeSource = '.source_source-code.source_source-code__show';\n\n        this.waitForSelector(codeSource,\n            function pass() {\n                test.assertExists(codeSource, 'Code source is shown');\n            },\n            function fail() {\n                test.fail(codeSource);\n            }\n        );\n\n\t}).run(function() { test.done() }).clear();\n});\n\ncasper.test.begin('Hash link openning', 2, function suite(test) {\n\tcasper.start(url + '#2').then(function() {\n        var highlighted = '.source_nav .source_main_nav_li:nth-child(2).__active a.__active';\n\n        this.waitForSelector(highlighted,\n            function pass() {\n                test.assertEval(function () {\n                    return window.pageYOffset > 1000 && window.pageYOffset < 2500;\n                }, 'Page should be scrolled to section');\n\n                test.assertExists(highlighted, 'Menu item highlighted');\n            },\n            function fail() {\n                test.fail(highlighted);\n            }\n        );\n    }).run(function() { test.done() }).clear();\n});"
  },
  {
    "path": "test/unit/api/html.js",
    "content": "var should = require('should');\nvar request = require('supertest');\n\ndescribe('API test /api/specs/html', function () {\n    var url = 'http://127.0.0.1:8080';\n\n    describe('GET /api/specs/html', function () {\n        it('should return list of html', function (done) {\n            var body = {\n            };\n            request(url)\n                .get('/api-test/specs/html')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('base-test/button');\n                    done();\n                });\n        });\n        it('should return HTML by ID', function (done) {\n            var body = {\n                id: 'base-test/button'\n            };\n            request(url)\n                .get('/api-test/specs/html')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('contents');\n                    done();\n                });\n        });\n        it('should return HTML by ID and by section', function (done) {\n            var body = {\n                id: 'base-test/button',\n                sections: '1'\n            };\n            request(url)\n                .get('/api-test/specs/html')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n\n                    var section1 = res.body.contents.length === 1;\n\n                    section1.should.be.ok;\n                    done();\n                });\n        });\n        it('should NOT return HTML of non existent section', function (done) {\n            var body = {\n                id: 'base-test/button',\n                sections: '11'\n            };\n            request(url)\n                .get('/api-test/specs/html')\n                .expect(404)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n\n                    var section = !!(res.body.contents && res.body.contents.length === 1);\n\n                    section.should.not.be.ok;\n                    done();\n                });\n        });\n    });\n\n    describe('POST /api/specs/html', function () {\n        it('it should POST new spec and return updated object', function (done) {\n            var body = {\n                data: {\n                    \"base-test\": {\n                        \"posted\": {\n                            \"specFile\": {\n                                \"description\": \"This spec was posted through API\",\n                                \"id\": \"base-test/posted\",\n                                \"contents\": [\n                                    {\n                                        \"id\": \"1\",\n                                        \"class\": \"\",\n                                        \"title\": \"\",\n                                        \"html\": [\n                                            \"<button type='button' class='btn-posted'>Button</button>\"\n                                        ],\n                                        \"nested\": []\n                                    }\n                                ]\n                            }\n                        }\n                    }\n                }\n            };\n            request(url)\n                .post('/api-test/specs/html')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body['base-test'].should.have.property('posted');\n                    done();\n                });\n        });\n    });\n\n    describe('DELETE /api/specs/html', function () {\n        it('it should return object without \"base-test/posted\"', function (done) {\n            var body = {\n                id: 'base-test/posted'\n            };\n            request(url)\n                .delete('/api-test/specs/html')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.body['base-test'].should.not.have.property('posted');\n                    done();\n                });\n        });\n    });\n});"
  },
  {
    "path": "test/unit/api/specs.js",
    "content": "var should = require('should');\nvar assert = require('assert');\nvar request = require('supertest');\nvar path = require('path');\n\nvar pathToMasterApp = path.resolve('./');\nglobal.pathToApp = pathToMasterApp;\n\nvar parseData = require(path.join(pathToMasterApp, 'core/lib/parseData'));\nvar loadOptions = require(path.join(pathToMasterApp, 'core/loadOptions'));\nglobal.opts = loadOptions(path.resolve(pathToMasterApp));\n\nvar parseSpecs = new parseData({\n    scope: 'specs',\n    path: global.opts.core.api.specsData\n});\n\ndescribe('Internal API tests', function () {\n    describe('Check parseData:specs', function () {\n        it('should return list of specs', function (done) {\n            var data = parseSpecs.getAll();\n\n            data.should.have.property('docs/base');\n            done();\n        });\n\n        it('should return spec by ID', function (done) {\n            var data = parseSpecs.getByID('docs/base');\n\n            data.should.have.property('url');\n            done();\n        });\n    });\n});\n\n\ndescribe('API test /api/specs', function () {\n    var url = 'http://127.0.0.1:8080';\n\n    describe('Check real API data available', function () {\n        it('should return list of specs', function (done) {\n            var body = {\n            };\n            request(url)\n                .get('/api/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('docs/base');\n                    done();\n                });\n        });\n    });\n\n    describe('GET /api/specs', function () {\n        it('should return list of specs', function (done) {\n            var body = {\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('base-test/base');\n                    done();\n                });\n        });\n        it('should return spec by ID', function (done) {\n            var body = {\n                id: 'base-test/base'\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('url');\n                    res.body.should.have.property('lastmod');\n                    done();\n                });\n        });\n        it('should not have cat info', function (done) {\n            var body = {\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.not.have.property('specFile');\n                    done();\n                });\n        });\n    });\n\n    describe('GET /api/specs with fields filter', function () {\n        it('should return only specs WITH info field', function (done) {\n            var body = {\n                filter: {\n                    fields:[\"info\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('base-test/base');\n                    res.body.should.not.have.property('base-test/button');\n                    done();\n                });\n        });\n        it('should return only specs WITH keywords, info, and title field', function (done) {\n            var body = {\n\n                filter: {\n                    fields:[\"keywords\",\"info\",\"title\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.not.have.property('base-test/base');\n                    res.body.should.not.have.property('base-test/button');\n                    done();\n                });\n        });\n        it('should return only specs WITHOUT info', function (done) {\n            var body = {\n\n                filterOut: {\n                    fields:[\"info\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('base-test/button');\n                    res.body.should.not.have.property('base-test/base');\n                    done();\n                });\n        });\n        it('should return only specs WITHOUT url, info and cat', function (done) {\n            var body = {\n\n                filterOut: {\n                    fields:[\"url\",\"info\",\"cat\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.not.have.property('base-test/button');\n                    res.body.should.not.have.property('base-test/base');\n                    done();\n                });\n        });\n        it('should return only specs WITH info and WITHOUT keywords', function (done) {\n            var body = {\n\n                filter: {\n                    fields:[\"info\"]\n                },\n                filterOut: {\n                    fields:[\"keywords\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('base-test/base');\n                    res.body.should.not.have.property('base-test/button');\n                    done();\n                });\n        });\n        it('should return only specs WITH info and cat but WITHOUT keywords and thumbnail', function (done) {\n            var body = {\n                filter: {\n                    fields:[\"info\",\"tag\"]\n                },\n                filterOut: {\n                    fields:[\"keywords\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('base-test/base');\n                    res.body.should.not.have.property('base-test/button');\n                    done();\n                });\n        });\n    });\n\n    describe('GET /api/specs with tag filter', function () {\n        it('should return only specs WITH \"html\" tag', function (done) {\n            var body = {\n                filter: {\n                    tags:[\"html\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('base-test/base');\n                    res.body.should.not.have.property('base-test/button');\n                    done();\n                });\n        });\n\n        it('should return only specs WITH \"html\" and \"tag\" tags', function (done) {\n            var body = {\n\n                filter: {\n                    tags:[\"html\",\"tag\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('base-test/base');\n                    res.body.should.not.have.property('base-test/button');\n                    done();\n                });\n        });\n\n        it('should return only specs WITHOUT \"html\" and \"tag\" tags', function (done) {\n            var body = {\n\n                filterOut: {\n                    tags:[\"html\",\"tag\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.not.have.property('base-test/base');\n                    res.body.should.have.property('base-test/button');\n                    done();\n                });\n        });\n\n        it('should return only specs WITH \"html\" and WITHOUT \"some\" tags', function (done) {\n            var body = {\n\n                filter: {\n                    tags:[\"html\"]\n                },\n                filterOut: {\n                    tags:[\"some\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('base-test/base');\n                    res.body.should.not.have.property('base-test/button');\n                    done();\n                });\n        });\n    });\n\n    describe('GET /api/specs with cats filter', function () {\n        it('should return only project cat specs', function (done) {\n            var body = {\n\n                filter: {\n                    cats:[\"project-test\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.have.property('project-test/project-spec');\n                    res.body.should.not.have.property('base-test/button');\n                    done();\n                });\n        });\n\n        it('should return only base cat specs', function (done) {\n            var body = {\n\n                filter: {\n                    cats:[\"base\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.not.have.property('project-test/project-spec');\n                    res.body.should.have.property('base-test/button');\n                    done();\n                });\n        });\n\n        it('should return all except project specs', function (done) {\n            var body = {\n\n                filterOut: {\n                    cats:[\"project-test\"]\n                }\n            };\n            request(url)\n                .get('/api-test/specs')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    res.should.be.json;\n                    res.body.should.not.have.property('project-test/project-spec');\n                    res.body.should.have.property('base-test/button');\n                    done();\n                });\n        });\n    });\n});"
  },
  {
    "path": "test/unit/ejsHelpersSpec.js",
    "content": "var path = require('path');\nvar expect = require('chai').expect;\n\nvar pathToMasterApp = path.resolve('./');\n\nvar ejs = require(path.join(pathToMasterApp, 'core/ejsWithHelpers.js'));\nvar loadOptions = require(path.join(pathToMasterApp, 'core/loadOptions'));\nglobal.opts = loadOptions(path.resolve(pathToMasterApp));\n\ndescribe('includeMD', function () {\n    it('should properly include Markdown file', function (done) {\n        var result = ejs.render('<%- includeMD(\"partials/markdown\") %>', {\n            filename: __filename\n        });\n\n        expect(result).to.equal('<p>Hello <strong>world</strong>!</p>\\n');\n\n        done();\n    });\n\n    it('should properly include Markdown file with EJS includes', function (done) {\n        var result = ejs.render('<%- includeMD(\"partials/markdown-ejs\") %>', {\n          world: 'world'\n        }, {\n            filename: __filename\n        });\n\n        expect(result).to.equal('<p>Hello <strong>world</strong>!</p>\\n');\n\n        done();\n    });\n\n    it('should properly include Markdown with nested include', function (done) {\n        var result = ejs.render('<%- includeMD(\"partials/markdown-ejs-nested\") %>', {\n          world: 'world'\n        }, {\n            filename: __filename\n        });\n\n        expect(result).to.contain('<p>Nested:</p><p>Hello <strong>world</strong>!</p>');\n\n        done();\n    });\n});\n\ndescribe('includeFiles', function () {\n    it('should include one file by glob', function (done) {\n        var result = ejs.render('<%- includeFiles(\"partials/mask-one.html\") %>', {\n            filename: __filename\n        });\n\n        expect(result).to.equal('one<br>');\n\n        done();\n    });\n\n    it('should include multiple files by glob', function (done) {\n        var result = ejs.render('<%- includeFiles(\"partials/mask-*.html\") %>', {\n            filename: __filename\n        });\n\n        expect(result).to.contain('one');\n        expect(result).to.contain('two');\n        expect(result).to.contain('three');\n        expect(result).to.contain('Hello');\n\n        done();\n    });\n});"
  },
  {
    "path": "test/unit/lib/extendTillSpec.js",
    "content": "var should = require('should');\nvar assert = require('assert');\nvar path = require('path');\n\nvar pathToMasterApp = path.resolve('./');\nvar extendTillSpec = require(path.join(pathToMasterApp, 'core/lib/extendTillSpec'));\n\nvar target = {\n    base: {\n        btn: {\n            specFile: {\n                some: [\n                        'a',\n                        'b',\n                        'c'\n                ]\n            }\n        },\n        test: 'bgg'\n    },\n    project: 'some'\n};\n\nvar src = {\n    base: {\n        btn: {\n            specFile: {\n                some: [\n                        'a'\n                ]\n            }\n        }\n    }\n};\n\ntarget = extendTillSpec(target, src);\n\ndescribe('extendTillSpec module check', function () {\n    it('should overwrite all in specFile', function (done) {\n        var length = target.base.btn.specFile.some.length;\n\n        length.should.equal(1);\n\n        done();\n    });\n\n    it('should extend everything till specFile', function (done) {\n\n        target.project.should.be.type('string');\n        target.base.test.should.be.type('string');\n\n        done();\n    });\n});"
  },
  {
    "path": "test/unit/lib/utils.js",
    "content": "var should = require('should');\nvar assert = require('assert');\nvar path = require('path');\n\nvar pathToMasterApp = path.resolve('./');\nvar utils = require(path.join(pathToMasterApp, 'core/lib/utils'));\n\ndescribe('utils: extendOptions', function () {\n    it('it should extend objects skipping arrays merge', function (done) {\n        var input = {\n            a: {\n                foo: \"bar\"\n            },\n            b: ['foo', 'bar']\n        };\n\n        utils.extendOptions(input, {\n            a: {\n                bar: \"foo\"\n            },\n            b: ['bar'],\n            c: 'val'\n        });\n\n        input.should.have.property('c', 'val');\n\n        input.a.should.have.property('foo', 'bar');\n        input.a.should.have.property('bar', 'foo');\n\n        input.should.have.property('b').with.lengthOf(1);\n        input.should.have.property('b', ['bar']);\n\n        done();\n    });\n\n    it('it should accept multiple objects', function (done) {\n        var input = {};\n\n        utils.extendOptions(input, {a: 'val', arr: ['foo', 'bar', 'foo']}, {'b': 'val'}, {c: 'val', arr: ['bar', 'foo']});\n\n        input.should.have.property('a', 'val');\n        input.should.have.property('b', 'val');\n        input.should.have.property('c', 'val');\n        input.should.have.property('arr', ['bar', 'foo']);\n\n        done();\n    });\n});"
  },
  {
    "path": "test/unit/middleware/clarify.js",
    "content": "var fs = require('fs');\nvar path = require('path');\n\nvar pathToMasterApp = path.resolve('./');\nvar jq = fs.readFileSync(path.join(pathToMasterApp,'assets/js/lib/jquery-2.1.4.min.js'), \"utf-8\");\n\nvar should = require('should');\nvar assert = require('assert');\nvar request = require('supertest');\nvar jsdom = require('jsdom');\n\nvar loadOptions = require(path.join(pathToMasterApp, 'core/loadOptions'));\nglobal.opts = loadOptions(path.resolve(pathToMasterApp));\n\n\ndescribe('Clarify test /docs/spec?clarify=true', function () {\n    describe('GET from JSDOM /docs/spec?clarify=true...', function () {\n        var url = 'http://localhost:8080/docs/spec/?clarify=true';\n        it('should return nothing (&sections=77)', function (done) {\n            request(url)\n                .get('&sections=77')\n                .expect(200)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    jsdom.env({\n                        html: res.text,\n                        src: [jq],\n                        done: function (errors, window) {\n                            var $ = window.$;\n                            var examples = $('.source_example');\n\n                            examples.length.should.equal(0);\n\n                            done();\n                        }\n                    });\n                });\n        });\n\n        it('should return all sections', function (done) {\n            request(url)\n                .get()\n                .expect(200)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    jsdom.env({\n                        html: res.text,\n                        src: [jq],\n                        done: function (errors, window) {\n                            var $ = window.$;\n                            var sectionHeaders = $('.source_section_h');\n                            var examples = $('.source_example');\n\n                            sectionHeaders.length.should.be.greaterThan(1);\n                            examples.length.should.be.greaterThan(0);\n\n                            done();\n                        }\n                    });\n                });\n        });\n\n        it('should return one example', function (done) {\n            request(url)\n                .get('&sections=1.1')\n                .expect(200)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    jsdom.env({\n                        html: res.text,\n                        src: [jq],\n                        done: function (errors, window) {\n                            var $ = window.$;\n                            var examples = $('.source_example');\n\n                            examples.length.should.equal(1);\n\n                            done();\n                        }\n                    });\n                });\n        });\n\n        it('should have injected resources', function (done) {\n            request(url)\n                .get('&sections=1.1')\n                .expect(200)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    jsdom.env({\n                        html: res.text,\n                        src: [jq],\n                        done: function (errors, window) {\n                            var $ = window.$;\n\n                            $('[href*=\"bootstrap.css\"]').length.should.equal(1);\n                            $('body > style').length.should.be.greaterThan(0);\n                            $('body > script').length.should.be.greaterThan(0);\n\n                            done();\n                        }\n                    });\n                });\n        });\n\n        it('should change template', function (done) {\n            request(url)\n                .get('&tpl=clear')\n                .expect(200)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    jsdom.env({\n                        html: res.text,\n                        src: [jq],\n                        done: function (errors, window) {\n                            var $ = window.$;\n                            var examples = $('.source_example');\n\n                            $('.__clear').length.should.equal(1);\n                            examples.length.should.equal(0);\n\n                            done();\n                        }\n                    });\n                });\n        });\n    });\n\n    describe('GET from API /docs/spec?clarify=true&fromApi=true...', function () {\n        var urlFromApi = 'http://localhost:8080/docs/spec/?clarify=true&fromApi=true';\n\n        it('should return nothing (&sections=77&apiUpdate=true)', function (done) {\n            this.timeout(10000);\n            request(urlFromApi)\n                .get('&sections=77&apiUpdate=true')\n                .expect(500)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    jsdom.env({\n                        html: res.text,\n                        src: [jq],\n                        done: function (errors, window) {\n                            var $ = window.$;\n                            var examples = $('.source_example');\n\n                            examples.length.should.equal(0);\n\n                            done();\n                        }\n                    });\n                });\n        });\n\n        if (global.opts.plugins && global.opts.plugins.htmlParser && global.opts.plugins.htmlParser.enabled) {\n            it('should return all sections', function (done) {\n                request(urlFromApi)\n                    .get()\n                    .expect(200)\n                    .end(function (err, res) {\n                        if (err) {\n                            throw err;\n                        }\n\n                        jsdom.env({\n                            html: res.text,\n                            src: [jq],\n                            done: function (errors, window) {\n                                var $ = window.$;\n                                var sectionHeaders = $('.source_section_h');\n                                var examples = $('.source_example');\n\n                                sectionHeaders.length.should.be.greaterThan(1);\n                                examples.length.should.be.greaterThan(0);\n\n                                done();\n                            }\n                        });\n                    });\n            });\n\n            it('should return one example', function (done) {\n                request(urlFromApi)\n                    .get('&sections=1.1')\n                    .expect(200)\n                    .end(function (err, res) {\n                        if (err) {\n                            throw err;\n                        }\n\n                        jsdom.env({\n                            html: res.text,\n                            src: [jq],\n                            done: function (errors, window) {\n                                var $ = window.$;\n                                var examples = $('.source_example');\n\n                                examples.length.should.equal(1);\n\n                                done();\n                            }\n                        });\n                    });\n            });\n\n            it('should have injected resources', function (done) {\n                request(urlFromApi)\n                    .get('&sections=1.1')\n                    .expect(200)\n                    .end(function (err, res) {\n                        if (err) {\n                            throw err;\n                        }\n\n                        jsdom.env({\n                            html: res.text,\n                            src: [jq],\n                            done: function (errors, window) {\n                                var $ = window.$;\n\n                                $('[href*=\"bootstrap.css\"]').length.should.equal(1);\n                                $('body > style').length.should.be.greaterThan(0);\n                                $('body > script').length.should.be.greaterThan(0);\n\n                                done();\n                            }\n                        });\n                    });\n            });\n\n            it('should change template', function (done) {\n                request(urlFromApi)\n                    .get('&tpl=clear')\n                    .expect(200)\n                    .end(function (err, res) {\n                        if (err) {\n                            throw err;\n                        }\n\n                        jsdom.env({\n                            html: res.text,\n                            src: [jq],\n                            done: function (errors, window) {\n                                var $ = window.$;\n                                var examples = $('.source_example');\n\n                                $('.__clear').length.should.equal(1);\n                                examples.length.should.equal(0);\n\n                                done();\n                            }\n                        });\n                    });\n            });\n        }\n    });\n});"
  },
  {
    "path": "test/unit/middleware/md.js",
    "content": "var should = require('should');\nvar request = require('supertest');\nvar cheerio = require('cheerio');\n\ndescribe('Test .md support', function () {\n    var url = 'http://127.0.0.1:8080';\n\n    describe('GET /docs/markdown/', function () {\n        it('should render h1', function (done) {\n            var body = {\n            };\n            request(url)\n                .get('/docs/markdown/')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    var $ = cheerio.load('<div id=\"content\">'+ res.text +'</div>');\n\n                    var hasDom = $('h1').length === 1;\n\n                    hasDom.should.be.ok;\n\n                    done();\n                });\n        });\n    });\n\n    describe('GET /docs/markdown/', function () {\n        it('should render sections', function (done) {\n            var body = {\n            };\n            request(url)\n                .get('/docs/markdown/')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    var $ = cheerio.load('<div id=\"content\">'+ res.text +'</div>');\n\n                    var hasDom = $('.source_section').length >= 1;\n                    var oneHeaderPerSection = true;\n\n                    $('.source_section').each(function(){\n                        if ($(this).children('h2').length !== 1) {\n                            oneHeaderPerSection = false;\n                        }\n                    });\n\n                    hasDom.should.be.ok;\n                    oneHeaderPerSection.should.be.ok;\n\n                    done();\n                });\n        });\n    });\n\n    describe('GET /docs/markdown/', function () {\n        it('should render code', function (done) {\n            var body = {\n            };\n            request(url)\n                .get('/docs/markdown/')\n                .expect(200)\n                .send(body)\n                .end(function (err, res) {\n                    if (err) {\n                        throw err;\n                    }\n\n                    var $ = cheerio.load('<div id=\"content\">'+ res.text +'</div>');\n\n                    var hasDom = $('code.src-html').length >= 1;\n\n                    hasDom.should.be.ok;\n\n                    done();\n                });\n        });\n    });\n});"
  },
  {
    "path": "test/unit/partials/markdown-ejs-nested.md",
    "content": "Hello **<%= world %>**!\n\nNested:<%- includeMD('markdown.md') %>"
  },
  {
    "path": "test/unit/partials/markdown-ejs.md",
    "content": "Hello **<%= world %>**!"
  },
  {
    "path": "test/unit/partials/markdown.md",
    "content": "Hello **world**!"
  },
  {
    "path": "test/unit/partials/mask-one.html",
    "content": "one<br>"
  },
  {
    "path": "test/unit/partials/mask-two.html",
    "content": "two<br>\n<%- includeFiles('three.html') %>"
  },
  {
    "path": "test/unit/partials/three.html",
    "content": "three<br>\n<%- includeMD('markdown.md') %>"
  }
]