diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..9da27ca6 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,19 @@ +{ + "env": { + "browser": true, + "es2021": true + }, + "extends": ["eslint:recommended", "prettier"], + "parserOptions": { + "ecmaVersion": 12, + "sourceType": "module" + }, + "rules": { + "no-irregular-whitespace": [ + "error", + { + "skipComments": true + } + ] + } +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b623dff..cf928349 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,4 +10,4 @@ jobs: node-version: '14' - run: npm ci - run: npm run build - - run: npm test \ No newline at end of file + - run: npm test diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index b353d700..00000000 --- a/.jshintrc +++ /dev/null @@ -1,23 +0,0 @@ -{ - "esversion": 9, - "browser": true, - "curly": true, - "evil": true, - "globals": { - "console": true, - "define": true, "exports": true, "require": true, "module": true, - "describe": true, "xdescribe": true, "it": true, "xit": true, "expect": true, "runs": true, "waits": true, "waitsFor": true, "itConditionally": true, - "EventEmitter2": true, - "F2": true, - "domify": true, - "fetchJsonp": true, - "_": true - }, - "latedef": false, - "noarg": true, - "quotmark": "single", - "shadow": false, - "sub": true, - "undef": true, - "unused": "vars" -} \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..f9085fe3 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +dist +docs \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..e166c065 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{ singleQuote: true, tabWidth: 2, trailingComma: none, useTabs: true } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 335ee03b..b21a73b8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,8 +14,8 @@ First, a couple of ground rules. 1. Make sure you have a [GitHub account](https://github.com/signup/free). 2. [Submit a ticket for your issue](https://github.com/OpenF2/F2/issues), assuming one does not already exist. **(Search first!)** - * Clearly describe the issue including steps to reproduce when it is a bug. - * Include the F2 version number. + - Clearly describe the issue including steps to reproduce when it is a bug. + - Include the F2 version number. 3. [Fork the F2 repository](https://github.com/OpenF2/F2/fork). ## New to GitHub? @@ -26,7 +26,7 @@ GitHub has terrific [Guides](http://guides.github.com/) to help developers throu ### Understanding the "wip" branch -The latest F2 changes can be found in the `*-wip` branch. This branch's name uses the upcoming version number followed by `-wip` which stands for "work-in-progress", for example `1.3.1-wip` as shown below. There *should* only be one `-wip` branch at any given time. +The latest F2 changes can be found in the `*-wip` branch. This branch's name uses the upcoming version number followed by `-wip` which stands for "work-in-progress", for example `1.3.1-wip` as shown below. There _should_ only be one `-wip` branch at any given time. Do not work directly in `master`! @@ -36,21 +36,21 @@ Do not work directly in `master`! Once you've forked the F2 repository: -1. Create a new branch in your fork from the next version `*-wip` branch. Do not work directly in `master`! - * `$> git checkout -b 'your_branch_name' *-wip` -3. Read the F2 [coding standards](https://github.com/OpenF2/F2/wiki/Coding-Standards). -4. Add and document unit test(s) for your changes. **At least one unit test is required** for new or changed functionality. -5. Re-run all the Jasmine tests to confirm your changes didn't break anything. `$> npm test` and/or `$> npm run test-live` -6. Perform browser testing in [supported browsers](https://github.com/OpenF2/F2/wiki/Browser-Compatibility). +1. Create a new branch in your fork from the next version `*-wip` branch. Do not work directly in `master`! + - `$> git checkout -b 'your_branch_name' *-wip` +2. Read the F2 [coding standards](https://github.com/OpenF2/F2/wiki/Coding-Standards). +3. Add and document unit test(s) for your changes. **At least one unit test is required** for new or changed functionality. +4. Re-run all the Jasmine tests to confirm your changes didn't break anything. `$> npm test` and/or `$> npm run test-live` +5. Perform browser testing in [supported browsers](https://github.com/OpenF2/F2/wiki/Browser-Compatibility). ### Committing Changes -* You should only commit files you have changed. **Do not commit compiled or generated F2 files** -* After you've staged your changes, add a detailed commit message. -* Push committed changes to your fork's branch. -* [Submit a pull request](https://help.github.com/articles/using-pull-requests) for `F2\*-wip` **not** `F2\master`. -* Add a message or additional detail for your changes in the pull request comments. -* Wait for your change(s) to be reviewed. +- You should only commit files you have changed. **Do not commit compiled or generated F2 files** +- After you've staged your changes, add a detailed commit message. +- Push committed changes to your fork's branch. +- [Submit a pull request](https://help.github.com/articles/using-pull-requests) for `F2\*-wip` **not** `F2\master`. +- Add a message or additional detail for your changes in the pull request comments. +- Wait for your change(s) to be reviewed. ## Coding Standards @@ -66,7 +66,7 @@ If you have any questions while writing code to contribute to F2, post a message ## Resources -* [F2 Google Group](https://groups.google.com/forum/#!forum/OpenF2) -* [F2 Coding Standards](https://github.com/OpenF2/F2/wiki/Coding-Standards) -* [GitHub Documentation: Using Pull Requests](https://help.github.com/articles/using-pull-requests) -* [GitHub Documentation](https://help.github.com/) +- [F2 Google Group](https://groups.google.com/forum/#!forum/OpenF2) +- [F2 Coding Standards](https://github.com/OpenF2/F2/wiki/Coding-Standards) +- [GitHub Documentation: Using Pull Requests](https://help.github.com/articles/using-pull-requests) +- [GitHub Documentation](https://help.github.com/) diff --git a/README.md b/README.md index a720fdb1..a0e2af0e 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ Join the team and help contribute to F2 on GitHub. Begin by reading our [contrib ### Get F2.js -* Choose a [F2.js package](http://docs.openf2.org/f2js-sdk.html#packages), including [F2.basic.js](https://raw.github.com/OpenF2/F2/master/sdk/packages/f2.basic.min.js) (7kb, minified and gzipped) -* Grab any version of F2 [on cdnjs.com](http://cdnjs.com/libraries/F2/). -* For .NET developers: install the [NuGet Package](https://nuget.org/packages/F2/) or `PM> Install-Package F2` -* Bower: `bower install F2` +- Choose a [F2.js package](http://docs.openf2.org/f2js-sdk.html#packages), including [F2.basic.js](https://raw.github.com/OpenF2/F2/master/sdk/packages/f2.basic.min.js) (7kb, minified and gzipped) +- Grab any version of F2 [on cdnjs.com](http://cdnjs.com/libraries/F2/). +- For .NET developers: install the [NuGet Package](https://nuget.org/packages/F2/) or `PM> Install-Package F2` +- Bower: `bower install F2` ### Docs @@ -81,7 +81,6 @@ Copyright © 2015 Markit On Demand, Inc. [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - -Please note that F2 ("Software") may contain third party material that Markit On Demand Inc. has a license to use and include within the Software (the "Third Party Material"). A list of the software comprising the Third Party Material and the terms and conditions under which such Third Party Material is distributed are reproduced in the [ThirdPartyMaterial.md](ThirdPartyMaterial.md) file. The inclusion of the Third Party Material in the Software does not grant, provide nor result in you having acquiring any rights whatsoever, other than as stipulated in the terms and conditions related to the specific Third Party Material, if any. +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +Please note that F2 ("Software") may contain third party material that Markit On Demand Inc. has a license to use and include within the Software (the "Third Party Material"). A list of the software comprising the Third Party Material and the terms and conditions under which such Third Party Material is distributed are reproduced in the [ThirdPartyMaterial.md](ThirdPartyMaterial.md) file. The inclusion of the Third Party Material in the Software does not grant, provide nor result in you having acquiring any rights whatsoever, other than as stipulated in the terms and conditions related to the specific Third Party Material, if any. diff --git a/ThirdPartyMaterial.md b/ThirdPartyMaterial.md index ca82c6c3..c5faa068 100644 --- a/ThirdPartyMaterial.md +++ b/ThirdPartyMaterial.md @@ -25,7 +25,6 @@ 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. - ## lodash The MIT License @@ -82,7 +81,7 @@ terms above. Hij1nx requires the following notice to accompany EventEmitter: -Copyright © 2011 hij1nx +Copyright © 2011 hij1nx [http://www.twitter.com/hij1nx](http://www.twitter.com/hij1nx) @@ -94,7 +93,7 @@ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ## fetch-jsonp -Copyright (c) 2021 Cam Song - https://github.com/camsong/fetch-jsonp +Copyright (c) 2021 Cam Song - https://github.com/camsong/fetch-jsonp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -112,4 +111,4 @@ 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. \ No newline at end of file +SOFTWARE. diff --git a/bower.json b/bower.json index f8ca0785..9284d95e 100644 --- a/bower.json +++ b/bower.json @@ -1,11 +1,7 @@ { "name": "f2", "description": "F2 is an open and free web integration framework that allows you to deploy apps & components both within your existing web application and cross-domain.", - "keywords": [ - "f2", - "openf2", - "markit f2" - ], + "keywords": ["f2", "openf2", "markit f2"], "homepage": "http://www.openf2.org", "version": "1.4.5", "main": "dist/f2.js", @@ -32,4 +28,4 @@ "type": "git", "url": "git://github.com/OpenF2/F2.git" } -} \ No newline at end of file +} diff --git a/docs/bin/gen-docs.js b/docs/bin/gen-docs.js index 20b84bf7..a6627cac 100644 --- a/docs/bin/gen-docs.js +++ b/docs/bin/gen-docs.js @@ -11,112 +11,141 @@ var handlebars = require('handlebars'); var _ = require('underscore'); var srcDir = path.resolve(__dirname, '../src/'), - distDir = path.resolve(__dirname, '../dist/'), - srcFiles = fs.readdirSync(srcDir), - templateFile = path.resolve(__dirname, '../src/template/layout.html'), - template = fs.readFileSync(templateFile, 'utf8'), - renderer = new marked.Renderer(), - locals = {}; + distDir = path.resolve(__dirname, '../dist/'), + srcFiles = fs.readdirSync(srcDir), + templateFile = path.resolve(__dirname, '../src/template/layout.html'), + template = fs.readFileSync(templateFile, 'utf8'), + renderer = new marked.Renderer(), + locals = {}; //setup partials locals.templates = { - head: fs.readFileSync(path.resolve(__dirname, '../src/template/head.html'), 'utf8'), - nav: fs.readFileSync(path.resolve(__dirname, '../src/template/nav.html'), 'utf8'), - footer: fs.readFileSync(path.resolve(__dirname, '../src/template/footer.html'), 'utf8') + head: fs.readFileSync( + path.resolve(__dirname, '../src/template/head.html'), + 'utf8' + ), + nav: fs.readFileSync( + path.resolve(__dirname, '../src/template/nav.html'), + 'utf8' + ), + footer: fs.readFileSync( + path.resolve(__dirname, '../src/template/footer.html'), + 'utf8' + ) }; //loop over *.md files in source directory for conversion -srcFiles.forEach(function(filename) { - var src, html, dist, _locals, headings = []; - - _locals = _.extend({},locals,pkg); - - //F2 docs are written only in markdown - if (!filename.match(/\.md$/)) { - return; - } - - _locals.filename = filename; - _locals.filename_html = filename.replace(/\.md$/, '.html'); - _locals.filename_amd = filename.replace(/\.md$/, ''); - - //override Marked heading renderer - //https://github.com/chjj/marked#overriding-renderer-methods - renderer.heading = function(text, level) { - var escapedText = text.toLowerCase().replace(/[^\w]+/g, '-'); - var html; - - //de-dupe headings so we end up with unique IDs in the HTML - if (_.contains(headings,escapedText)){ - escapedText += '-' + _.indexOf(headings, escapedText); - } - - //clean up URL slightly if hash looks like this: "#which-apps-support-a-locale-" - //by removing trailing hypen - var hasHyphenLast = escapedText.substr(escapedText.length - 1) === '-'; - if (hasHyphenLast){ - escapedText = escapedText.substr(0, escapedText.length-1); - } - - html = (level > 1) ? - '' + - text + - '' + - '#' + - '' + - '' - : ''; - - //page and some other UI helper versions - if (level === 1) { - _locals.title = text; - _locals.title_for_url = encodeURIComponent(_locals.title); - _locals.title_css = escapedText; - } - - //keep track for de-duping header IDs - headings.push(escapedText); - - return html; - }; - - //get source - src = fs.readFileSync(path.join(srcDir, filename), 'utf8'); - - //convert markdown to html and highlight source code - html = marked(src, { renderer: renderer, smartypants: true, highlight: function (code, lang) { - if (lang){ - return highlight.highlight(lang, code).value; - } else { - return highlight.highlightAuto(code).value; - } - }}); - - //"content" is HTML (converted from markdown & variables compiled) - _locals.content = (handlebars.compile(html))(_locals); - - //so we can highlight the 'active' section in the UI - _locals.activeNav = { - getstarted: _locals.title == 'Getting Started with F2', - container: _locals.title == 'Container Development', - app: _locals.title == 'App Development', - extend: _locals.title == 'Extending F2', - migrating: _locals.title == 'Migrating to v2', - f2js: _locals.title == 'F2.js SDK', - about: _locals.title == 'About F2' - }; - - //compile template partials - //this happens once for all the source files - //(after the 1st file, all the {{handlebars}} templates are replaced) - for (var t in _locals.templates){ - _locals.templates[t] = (handlebars.compile( _locals.templates[t]) )(_locals); - } - - //now compile the templateFile to add _locals.templates and _locals.content - dist = (handlebars.compile(template, {noEscape:true}))(_locals); - - //save to /dist - fs.writeFileSync(path.join(distDir, filename.replace(/\.md$/, '.html')), dist, 'utf8'); - -});//end loop \ No newline at end of file +srcFiles.forEach(function (filename) { + var src, + html, + dist, + _locals, + headings = []; + + _locals = _.extend({}, locals, pkg); + + //F2 docs are written only in markdown + if (!filename.match(/\.md$/)) { + return; + } + + _locals.filename = filename; + _locals.filename_html = filename.replace(/\.md$/, '.html'); + _locals.filename_amd = filename.replace(/\.md$/, ''); + + //override Marked heading renderer + //https://github.com/chjj/marked#overriding-renderer-methods + renderer.heading = function (text, level) { + var escapedText = text.toLowerCase().replace(/[^\w]+/g, '-'); + var html; + + //de-dupe headings so we end up with unique <hx> IDs in the HTML + if (_.contains(headings, escapedText)) { + escapedText += '-' + _.indexOf(headings, escapedText); + } + + //clean up URL slightly if hash looks like this: "#which-apps-support-a-locale-" + //by removing trailing hypen + var hasHyphenLast = escapedText.substr(escapedText.length - 1) === '-'; + if (hasHyphenLast) { + escapedText = escapedText.substr(0, escapedText.length - 1); + } + + html = + level > 1 + ? '<h' + + level + + ' class="link-header" id="' + + escapedText + + '">' + + text + + '<a class="anchor" href="#' + + escapedText + + '">' + + '<span>#</span>' + + '</a>' + + '</h' + + level + + '>' + : ''; + + //page <title> and some other UI helper versions + if (level === 1) { + _locals.title = text; + _locals.title_for_url = encodeURIComponent(_locals.title); + _locals.title_css = escapedText; + } + + //keep track for de-duping header IDs + headings.push(escapedText); + + return html; + }; + + //get source + src = fs.readFileSync(path.join(srcDir, filename), 'utf8'); + + //convert markdown to html and highlight source code + html = marked(src, { + renderer: renderer, + smartypants: true, + highlight: function (code, lang) { + if (lang) { + return highlight.highlight(lang, code).value; + } else { + return highlight.highlightAuto(code).value; + } + } + }); + + //"content" is HTML (converted from markdown & variables compiled) + _locals.content = handlebars.compile(html)(_locals); + + //so we can highlight the 'active' section in the UI + _locals.activeNav = { + getstarted: _locals.title == 'Getting Started with F2', + container: _locals.title == 'Container Development', + app: _locals.title == 'App Development', + extend: _locals.title == 'Extending F2', + migrating: _locals.title == 'Migrating to v2', + f2js: _locals.title == 'F2.js SDK', + about: _locals.title == 'About F2' + }; + + //compile template partials + //this happens once for all the source files + //(after the 1st file, all the {{handlebars}} templates are replaced) + for (var t in _locals.templates) { + _locals.templates[t] = handlebars.compile(_locals.templates[t])(_locals); + } + + //now compile the templateFile to add _locals.templates and _locals.content + dist = handlebars.compile(template, { noEscape: true })(_locals); + + //save to /dist + fs.writeFileSync( + path.join(distDir, filename.replace(/\.md$/, '.html')), + dist, + 'utf8' + ); +}); //end loop diff --git a/docs/bin/yuidocs.js b/docs/bin/yuidocs.js index 4492466e..1b13a599 100644 --- a/docs/bin/yuidocs.js +++ b/docs/bin/yuidocs.js @@ -3,39 +3,39 @@ var Y = require('yuidocjs'); // paths relative to root of the repo... var builder, - docOptions = { - quiet: false, - paths: ['./src'], - outdir: './docs/dist/sdk/', - themedir: './docs/src/sdk-template', - helpers: ['./docs/src/sdk-template/helpers/helpers.js'] - }, - json, - pkg = require('../../package.json'); + docOptions = { + quiet: false, + paths: ['./src'], + outdir: './docs/dist/sdk/', + themedir: './docs/src/sdk-template', + helpers: ['./docs/src/sdk-template/helpers/helpers.js'] + }, + json, + pkg = require('../../package.json'); -json = (new Y.YUIDoc(docOptions)).run(); +json = new Y.YUIDoc(docOptions).run(); // massage in some meta information from F2.json json.project = { - docsAssets: '../', - version: pkg.version, - releaseDateFormatted: pkg._releaseDateFormatted, - title: 'API Reference' + docsAssets: '../', + version: pkg.version, + releaseDateFormatted: pkg._releaseDateFormatted, + title: 'API Reference' }; docOptions = Y.Project.mix(json, docOptions); // ensures that the class has members and isn't just an empty namespace // used in sidebar.handlebars -Y.Handlebars.registerHelper('hasClassMembers', function() { - for (var i = 0, len = json.classitems.length; i < len; i++) { - //console.log(json.classitems[i].class, this.name); - if (json.classitems[i].class === this.name) { - return ''; - } - } - return 'hidden'; +Y.Handlebars.registerHelper('hasClassMembers', function () { + for (var i = 0, len = json.classitems.length; i < len; i++) { + //console.log(json.classitems[i].class, this.name); + if (json.classitems[i].class === this.name) { + return ''; + } + } + return 'hidden'; }); builder = new Y.DocBuilder(docOptions, json); -builder.compile(function() { - console.log('done'); -}); \ No newline at end of file +builder.compile(function () { + console.log('done'); +}); diff --git a/docs/src/app-development.md b/docs/src/app-development.md index 8923143a..2c951827 100644 --- a/docs/src/app-development.md +++ b/docs/src/app-development.md @@ -17,7 +17,7 @@ For the purposes of the documentation on this page, we'll focus on developing ** _Interested in developing F2 containers? [Browse to Container Development](container-development.html)._ -* * * * +--- ## Get Started @@ -51,13 +51,14 @@ Setup a basic container HTML template (or add F2.js to an existing website): ```javascript var _appConfig = { - appId: 'com_openf2_examples_javascript_helloworld', - manifestUrl: 'http://docs.openf2.org/demos/apps/JavaScript/HelloWorld/manifest.js' + appId: 'com_openf2_examples_javascript_helloworld', + manifestUrl: + 'http://docs.openf2.org/demos/apps/JavaScript/HelloWorld/manifest.js' }; -$(function(){ - F2.init(); - F2.registerApps(_appConfig); +$(function () { + F2.init(); + F2.registerApps(_appConfig); }); ``` @@ -93,7 +94,7 @@ To get started working with or developing containers, browse to the [documentati <p><a href="#developing-f2-apps" class="btn btn-primary btn-small">Developing F2 Apps</a> <a href="./sdk/" class="btn btn-default btn-small">F2.js SDK Reference</a></p> -* * * * +--- ## App Design @@ -109,7 +110,7 @@ In order to ensure that apps built using F2 are successful, they must be accessi Ultimately, the responsibility of app design falls on either the Container or App Developer. In many cases, Container Developers will provide App Developers will visual designs, style guides or other assets required to ensure apps have the form and function for a given container. Container Developers may also [provide CSS for App Developers](about-f2.html#creating-a-common-look-and-feel) to adhere to—which should be easy since F2 enforces a [consistent HTML structure across all containers and apps](app-development.html#automatic-consistency). -* * * * +--- ## Developing F2 Apps @@ -127,10 +128,10 @@ As an example, your AppID could look like this: If you built more than one app while working at Acme Corporation, you could create more AppIDs. All of these are valid: -* `com_acmecorp_watchlist2` -* `com_acmecorp_watchlist_big_and_tall` -* `com_acmecorp_static_charts` -* `com_acmecorp_interactive_charts` +- `com_acmecorp_watchlist2` +- `com_acmecorp_watchlist_big_and_tall` +- `com_acmecorp_static_charts` +- `com_acmecorp_interactive_charts` To guarantee uniqueness, we have provided an AppID generation service that allows you to customize your AppID. @@ -140,7 +141,7 @@ To guarantee uniqueness, we have provided an AppID generation service that allow Once you have your AppID, start by setting up your project. You will need at least one file: the **App Manifest**. Create a new file called `manifest.js`. Also, chances are you'll want custom styling and functionality, so go ahead and create `appclass.js` (for your app logic) and `app.css` for your CSS. Your project folder should look like this: -![](./img/project_folder.png "Setup your project") +![](./img/project_folder.png 'Setup your project') <span class="label label-default">Helper</span> [Download the F2 examples](http://docs.openf2.org/F2-examples.zip) or read about [setting up a basic container and app](#get-started) in Getting Started. @@ -167,22 +168,20 @@ When it's complete (using the examples further below), the App Manifest looks li ```javascript F2_jsonpCallback_com_companyname_appname({ - "inlineScripts":["(function(){ var foo = bar; doSomething(); })()"], - "scripts":[ - "http://www.domain.com/js/appclass.js" - ], - "styles":[ - "http://www.domain.com/css/app.css" - ], - "apps":[{ - "data":{ - foo: "bar", + inlineScripts: ['(function(){ var foo = bar; doSomething(); })()'], + scripts: ['http://www.domain.com/js/appclass.js'], + styles: ['http://www.domain.com/css/app.css'], + apps: [ + { + data: { + foo: 'bar', value: 12345 }, - "html":"<div class=\"sunrise\">Hello world.</div>", - "status":"good" - }] -}) + html: '<div class="sunrise">Hello world.</div>', + status: 'good' + } + ] +}); ``` Let's break the App Manifest object down and look at each property (in reverse order to keep it fun). @@ -313,22 +312,20 @@ If we use the examples above, our `AppManifest` would look like this: ```javascript F2_jsonpCallback_com_companyname_appname({ - "inlineScripts":["(function(){ var foo = bar; doSomething(); })()"], - "scripts":[ - "http://www.domain.com/js/appclass.js" - ], - "styles":[ - "http://www.domain.com/css/app.css" - ], - "apps":[{ - "data":{ - foo: "bar", + inlineScripts: ['(function(){ var foo = bar; doSomething(); })()'], + scripts: ['http://www.domain.com/js/appclass.js'], + styles: ['http://www.domain.com/css/app.css'], + apps: [ + { + data: { + foo: 'bar', value: 12345 }, - "html":"<div class=\"sunrise\">Hello world.</div>", - "status":"good" - }] -}) + html: '<div class="sunrise">Hello world.</div>', + status: 'good' + } + ] +}); ``` <span class="label label-info">Note</span> You may have noticed the presence of the function name `F2_jsonpCallback_com_companyname_appname` on the first line of the example above. That function name is the callback and is explained in [App Manifest Response](#app-manifest-response). @@ -348,16 +345,14 @@ When applied, the final (bare bones) App Manifest file looks like this example ( ```javascript //manifest.js F2_jsonpCallback_com_companyname_appname({ - "scripts":[ - "http://www.domain.com/js/appclass.js" - ], - "styles":[ - "http://www.domain.com/css/app.css" - ], - "apps":[{ - "html":"<div class=\"sunrise\">Hello world.</div>" - }] -}) + scripts: ['http://www.domain.com/js/appclass.js'], + styles: ['http://www.domain.com/css/app.css'], + apps: [ + { + html: '<div class="sunrise">Hello world.</div>' + } + ] +}); ``` <span class="label label-info">Note</span> The JSONP callback function name will _not_ be passed from the container using a traditional querystring parameter (HTTP GET), so you must configure this correctly for your app to appear on a container. This means you have to hard-code it in your `AppManifest`. @@ -410,8 +405,8 @@ An example two-column layout using Bootstrap-specifed markup: ```html <div class="row"> - <div class="col-md-4">...</div> - <div class="col-md-8">...</div> + <div class="col-md-4">...</div> + <div class="col-md-8">...</div> </div> ``` @@ -461,30 +456,30 @@ We won't even begin to talk about or describe this fantastic design pattern simp An example of an App Class using prototypal inheritance inside a [closure](http://davidbcalhoun.com/2011/what-is-a-closure-in-javascript) is below. Note the inclusion of the `App_Class.prototype.init()` function—which will be called automatically during app load—and the [trailing parentheses](http://peter.michaux.ca/articles/an-important-pair-of-parens), `()`, which are responsible for automatic function execution. Thanks to the closure, the `App_Class` is returned _and_ assigned to `F2.Apps["com_companyname_appname"]`. ```javascript -F2.Apps["com_companyname_appname"] = (function() { - var App_Class = function(appConfig, appContent, root) { - // constructor - } +F2.Apps['com_companyname_appname'] = (function () { + var App_Class = function (appConfig, appContent, root) { + // constructor + }; - App_Class.prototype.init = function() { - // perform init actions - } + App_Class.prototype.init = function () { + // perform init actions + }; - return App_Class; + return App_Class; })(); -```` +``` #### Module Pattern As an alternative to the prototypal inheritance pattern above, `appclass.js` code could be written following the module pattern shown in the example below. Note the inclusion of an `init()` function—which will be called automatically during app load—and the _exclusion_ of the closure and trailing parentheses present in the example using prototypal inheritance above. ```javascript -F2.Apps["com_companyname_appname"] = function(appConfig, appContent, root) { - return { - init:function() { - // perform init actions - } - }; +F2.Apps['com_companyname_appname'] = function (appConfig, appContent, root) { + return { + init: function () { + // perform init actions + } + }; }; ``` @@ -499,7 +494,7 @@ Of course, you don't have to use either one of these patterns in your `appclass. If you don't want to think about any of this and would rather just start coding, [download the F2 examples](http://docs.openf2.org/F2-examples.zip). -* * * * +--- ### Internationalization @@ -517,7 +512,7 @@ App Providers can listen for locale changes. var currentLocale = F2.getContainerLocale(); //en-us //listen for Container-broadcasted F2 event with new locale -F2.Events.on(F2.Constants.Events.CONTAINER_LOCALE_CHANGE,function(data){ +F2.Events.on(F2.Constants.Events.CONTAINER_LOCALE_CHANGE, function (data) { //get newly-updated locale currentLocale = F2.getContainerLocale(); //en-gb }); @@ -530,21 +525,21 @@ There is a parameter sent to each `AppManifest` request during `F2.registerApps` Here is an example of the two ways of getting the container locale inside an AppClass. ```javascript -F2.Apps["com_companyname_appname"] = (function() { - var App_Class = function(appConfig, appContent, root) { - // "containerLocale" is added to the AppConfig - // during F2.registerApps - console.log(appConfig.containerLocale);//en-us - } +F2.Apps['com_companyname_appname'] = (function () { + var App_Class = function (appConfig, appContent, root) { + // "containerLocale" is added to the AppConfig + // during F2.registerApps + console.log(appConfig.containerLocale); //en-us + }; - App_Class.prototype.init = function() { - // get locale using helper function - // if locale changes, this function will - // always return the current locale - console.log(F2.getContainerLocale());//en-us - } + App_Class.prototype.init = function () { + // get locale using helper function + // if locale changes, this function will + // always return the current locale + console.log(F2.getContainerLocale()); //en-us + }; - return App_Class; + return App_Class; })(); ``` @@ -569,7 +564,7 @@ Sample `AppConfig` showing the `localeSupport` property: <span class="label label-info">Note</span> For more detail on the `localeSupport` property, browse to the SDK for [F2.AppConfig](./sdk/classes/F2.AppConfig.html#properties-localeSupport). -* * * * +--- ## Namespacing @@ -584,9 +579,7 @@ When Container Developers [register apps](container-development.html#app-integra This example shows app HTML after it has been drawn on the container. Note the `com_companyName_appName` classname. ```html -<div class="f2-app-container com_companyName_appName"> - ... -</div> +<div class="f2-app-container com_companyName_appName">...</div> ``` To avoid styling conflicts or other display issues related to app-provided style sheets, **App Developers must namespace their CSS selectors.** Fortunately, this is quite easy. @@ -595,11 +588,11 @@ Every selector in app-provided style sheets must look like this: ```css .com_companyName_appName p { - padding:5px; + padding: 5px; } .com_companyName_appName .alert { - color:red; + color: red; } ``` @@ -609,7 +602,7 @@ While the [CSS cascade](http://www.webdesignfromscratch.com/html-css/css-inherit ```css .com_companyName_appName #notice { - background-color:yellow; + background-color: yellow; } ``` @@ -630,18 +623,21 @@ The [F2.js SDK](f2js-sdk.html) was designed with extensibility in mind and there Example: ```javascript -F2.extend('YourPluginName', (function(){ - return { - doSomething: function(){ - F2.log("Something has been done."); - } - }; -})()); +F2.extend( + 'YourPluginName', + (function () { + return { + doSomething: function () { + F2.log('Something has been done.'); + } + }; + })() +); ``` For more information, read [Extending F2](extending-f2.html). -* * * * +--- ## Context @@ -662,24 +658,18 @@ Let's look at some code. In this example, the container broadcasts, or emits, a javascript event defined in `F2.Events.Constants`. The `F2.Events.emit()` method accepts two arguments: the event name and an optional data object. ```javascript -F2.Events.emit( - F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, - { - symbol: "AAPL", - name: "Apple, Inc." - } -); +F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { + symbol: 'AAPL', + name: 'Apple, Inc.' +}); ``` To listen to the `F2.Constants.Events.CONTAINER_SYMBOL_CHANGE` event inside your F2 app, you can use this code to trigger an alert dialog with the symbol: ```javascript -F2.Events.on( - F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, - function(data){ - F2.log("The symbol was changed to " + data.symbol); - } -); +F2.Events.on(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, function (data) { + F2.log('The symbol was changed to ' + data.symbol); +}); ``` The `F2.Events.on()` method accepts the event name and listener function as arguments. [Read the SDK](./sdk/classes/F2.Events.html) for more information. @@ -693,16 +683,16 @@ Often times containers will want to send context to apps during [app registratio ```javascript //define app config var _appConfigs = [ - { - appId: "com_acmecorp_news", - description: "Acme Corp News", - manifestUrl: "http://www.acme.com/apps/news-manifest.js", - name: "Acme News App", - context: { - sessionId: myApp.sessionId, - someArray: [value1,value2] - } - } + { + appId: 'com_acmecorp_news', + description: 'Acme Corp News', + manifestUrl: 'http://www.acme.com/apps/news-manifest.js', + name: 'Acme News App', + context: { + sessionId: myApp.sessionId, + someArray: [value1, value2] + } + } ]; ``` @@ -729,24 +719,18 @@ This demonstrates complete flexibility of passing arbitrary context values from In this example, your app emits an event indicating a user is looking at a different stock ticker _within your app_. Using `F2.Events.emit()` in your code, your app broadcasts the new symbol. As with container-to-app context passing, the `F2.Events.emit()` method accepts two arguments: the event name and an optional data object. ```javascript -F2.Events.emit( - F2.Constants.Events.APP_SYMBOL_CHANGE, - { - symbol: "MSFT", - name: "Microsoft, Inc." - } -); +F2.Events.emit(F2.Constants.Events.APP_SYMBOL_CHANGE, { + symbol: 'MSFT', + name: 'Microsoft, Inc.' +}); ``` The container would need to listen to your app's broadcasted `F2.Constants.Events.APP_SYMBOL_CHANGE` event using code like this: ```javascript -F2.Events.on( - F2.Constants.Events.APP_SYMBOL_CHANGE, - function(data){ - F2.log("The symbol was changed to " + data.symbol); - } -); +F2.Events.on(F2.Constants.Events.APP_SYMBOL_CHANGE, function (data) { + F2.log('The symbol was changed to ' + data.symbol); +}); ``` <span class="label label-default">Note</span> For a full list of support event types, browse to the SDK for [F2.Constants.Events](./sdk/classes/F2.Constants.Events.html). @@ -759,13 +743,13 @@ Within "App 1", context is _sent_ using `F2.Events.emit()`: ```javascript F2.Events.emit( - "buy_stock", //custom event name + 'buy_stock', //custom event name { - symbol: "GOOG", - name: "Google Inc", + symbol: 'GOOG', + name: 'Google Inc', price: 682.68, isAvailableToPurchase: true, - orderType: "Market Order" + orderType: 'Market Order' } ); ``` @@ -773,16 +757,13 @@ F2.Events.emit( Within "App 2", context is _received_ using `F2.Events.on()`: ```javascript -F2.Events.on( - "buy_stock", - function(data){ - if (data.isAvailableToPurchase){ - F2.log("Trade ticket order for " + data.symbol + " at $" + data.price); - } else { - F2.log("This stock is not available for purchase.") - } +F2.Events.on('buy_stock', function (data) { + if (data.isAvailableToPurchase) { + F2.log('Trade ticket order for ' + data.symbol + ' at $' + data.price); + } else { + F2.log('This stock is not available for purchase.'); } -); +}); ``` ### More Complex Context @@ -793,23 +774,23 @@ This is an example Context object demonstrating arbitrary JavaScript objects: ```javascript F2.Events.emit( - "example_event", //custom event name + 'example_event', //custom event name { //number price: 100, //string name: 'John Smith', //function - callback: function(){ + callback: function () { F2.log('Callback!'); }, //array - watchlist: ['AAPL','MSFT','GE'], + watchlist: ['AAPL', 'MSFT', 'GE'], //object userInfo: { name: 'John Smith', title: 'Managing Director', - groups: ['Alpha','Beta'], + groups: ['Alpha', 'Beta'], sessionId: 1234567890 } } @@ -820,15 +801,15 @@ If two apps want to communicate data for populating a trade ticket _and_ execute ```javascript F2.Events.emit( - "buy_stock", //custom event name + 'buy_stock', //custom event name { - symbol: "GOOG", - name: "Google Inc", + symbol: 'GOOG', + name: 'Google Inc', price: 682.68, isAvailableToPurchase: true, - orderType: "Market Order", + orderType: 'Market Order', //define callback - callback: function(data){ + callback: function (data) { alert('Trade ticket populated'); } } @@ -838,17 +819,14 @@ F2.Events.emit( The F2 app listening for the `buy_stock` event would fire the `callback` function. ```javascript -F2.Events.on( - "buy_stock", - function(data){ - F2.log("Trade ticket order for " + data.symbol + " at $" + data.price); - //..populate the trade ticket... - //fire the callback - if (typeof data.callback === 'function'){ - data.callback(); - } +F2.Events.on('buy_stock', function (data) { + F2.log('Trade ticket order for ' + data.symbol + ' at $' + data.price); + //..populate the trade ticket... + //fire the callback + if (typeof data.callback === 'function') { + data.callback(); } -); +}); ``` ### Types of Context @@ -859,9 +837,9 @@ Context is a term used to describe the state of an F2 container and its apps. At Said another way, while `{ symbol:"AAPL", name: "Apple, Inc" }` can be used to communicate symbol context, developers could also use `{ symbol: "123456789" }` to identify Apple, Inc. The latter is more likely given not all apps would programmatically understand `AAPL` but—given symbol lookup services—would understand `123456789` as the universal _F2_ identifier for Apple, Inc. It is clear Container and App Developers alike would prefer to communicate with a guaranteed-to-never-change universal ID for all instrument types across all asset classes. -F2 will be providing lookup web services in future releases that provide universal F2 identifiers for container and app providers. These lookup services will not just be limited to symbols. _Further details will be forthcoming as the F2 specification evolves._ +F2 will be providing lookup web services in future releases that provide universal F2 identifiers for container and app providers. These lookup services will not just be limited to symbols. _Further details will be forthcoming as the F2 specification evolves._ -* * * * +--- ## Container Integration @@ -886,7 +864,7 @@ If you open `~/F2/examples/container/js/sampleApps.js` in your text editor, you' For full details on these `F2.AppConfig` properties and all the others, [browse the F2.js SDK documentation](./sdk/classes/F2.AppConfig.html). -* * * * +--- ## Entitlements @@ -894,13 +872,13 @@ User or content entitlements are the responsibility of the App Developer. Many a _Further details around app entitlements will be forthcoming as the F2 specification evolves._ -* * * * +--- ## Single Sign-On Single sign-on (SSO) is a shared responsibility between the Container and App Developer. In some cases, containers will want all of its apps to be authenticated seamlessly for users;that will be negotiated between Container and App Developers. For the purposes of this documentation, it is assumed Container Developers will build and host their container access authentication. -Once a user is authenticated on the container, how is the user then authenticated with all of the apps? [Encrypted URLs](#using-encrypted-urls).* +Once a user is authenticated on the container, how is the user then authenticated with all of the apps? [Encrypted URLs](#using-encrypted-urls).\* <span class="label label-default">Note</span> The Container Developer is free to utilize any app authentication method they deem fit. Container Developers and app developers will need to work together to finalize the authentication details. @@ -918,4 +896,4 @@ Authentication is a critical part of any container-app relationship. There are a _Further details around container and app single sign-on will be forthcoming as the F2 specification evolves._ -* * * * +--- diff --git a/docs/src/apps/com_openf2_examples_csharp_stocktwits/app.css b/docs/src/apps/com_openf2_examples_csharp_stocktwits/app.css index 5ff409af..82c024f0 100644 --- a/docs/src/apps/com_openf2_examples_csharp_stocktwits/app.css +++ b/docs/src/apps/com_openf2_examples_csharp_stocktwits/app.css @@ -12,11 +12,11 @@ .com_openf2_examples_csharp_stocktwits time { display: block; - font-size:12px; + font-size: 12px; color: #8f8f8f; } -.com_openf2_examples_csharp_stocktwits .table>tbody>tr>td { +.com_openf2_examples_csharp_stocktwits .table > tbody > tr > td { border-top: 0; border-bottom: 1px solid #ddd; -} \ No newline at end of file +} diff --git a/docs/src/apps/com_openf2_examples_csharp_stocktwits/appclass.js b/docs/src/apps/com_openf2_examples_csharp_stocktwits/appclass.js index 02ffa7ed..02490775 100644 --- a/docs/src/apps/com_openf2_examples_csharp_stocktwits/appclass.js +++ b/docs/src/apps/com_openf2_examples_csharp_stocktwits/appclass.js @@ -1,127 +1,153 @@ -F2.Apps["com_openf2_examples_csharp_stocktwits"] = (function () { - - var App_Class = function (appConfig, appContent, root) { - // constructor - this.appConfig = appConfig; - this.appContent = appContent; - this.$root = $(root); //if you're using jQuery. - this.$app = $("div", this.$root); - this.context = this.appConfig.context || {}; - this.symbol = this.context.symbol || "MSFT"; //default to MSFT - this.setupEvents(); - } - - App_Class.prototype.init = function () { - this.getTwits(); - } - - App_Class.prototype.setupEvents = function () { - F2.Events.on( - F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, $.proxy(function (data) { - this.symbol = data.symbol; - this.init(); - }, this) - ); - } - - App_Class.prototype.getTwits = function () { - $.ajax({ - //url: "http://www.openf2.org/api/stocktwits/" + this.symbol, - url: "https://api.stocktwits.com/api/2/streams/symbol/" + this.symbol + ".json", - data: { }, - cache: true, - context: this - }).done(function (data, txtStatus) { - this.draw(data); - }).fail(function (jqxhr, txtStatus) { - console.error("F2wits failed to load StockTwits data.", jqxhr, txtStatus); - this.$app.html("<p>An error occurred loading StockTwits data for " + this.symbol + ".</p>"); - }); - } - - App_Class.prototype.draw = function (data) { - - var html = []; - var moment = window.moment || require('moment'); - - if (data.errors){ - html.push('StockTwits API unavailable.'); - } else { - - html.push('<table class="table">'); - - $.each(data.messages, $.proxy(function (idx, item) { - //body, created_at, source, symbols, user - - if (idx > 4) { - return true; - } //only show 5 - - var body = item.body, - created_at = moment(new Date(item.created_at)).startOf('hour').fromNow(), - id = item.id, - source = item.source, - symbols = item.symbols, - user = item.user, - symList = []; - - body = this.replaceURLWithHTMLLinks(body); - body = this.replaceDollarSigns(body); - - //build list of symbols - // $.each(symbols, function (idx, item) { - // symList.push( - // '<li>', - // //'<a href="http://stocktwits.com/symbol/',item.symbol,'" title="',item.title,'" target="_blank">$',item.symbol,'</a>', - // //' | ', - // '<a href="javascript:;" title="Change context to ', item.symbol, '" class="focus" data-symbol="', item.symbol, '" tabindex="-1">', item.symbol, '</a>', - // '</li>' - // ); - // }); - - html.push( - '<tr>', - '<td class="avatar"><a target="_blank" href="http://stocktwits.com/', user.username, '"><img title="by ', user.username, '" src="', user.avatar_url, '" width="35" height="35"></td>', - '<td>', - body, - '<div class="clearfix">', - '<time class="pull-left">', created_at, '</time>', - '</div>', - '</td>', - '</tr>' - ); - }, this)); - - html.push('</table>'); - } - - this.$app.html(html.join('')); - - //assign event to change container focus - $("a.focus", this.$app).click(function () { - F2.Events.emit( - F2.Constants.Events.APP_SYMBOL_CHANGE, { - symbol: $(this).attr("data-symbol"), - name: $(this).attr("data-symbol") - } - ); - }); - } - - //http://stackoverflow.com/questions/37684/how-to-replace-plain-urls-with-links - App_Class.prototype.replaceURLWithHTMLLinks = function (text) { - var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; - return text.replace(exp, "<a target='_blank' href='$1'>$1</a>"); - } - - App_Class.prototype.replaceDollarSigns = function (text) { - var exp = /\$([A-Za-z0-9_]+)/ig; - //use this to link to StockTwits.com - //return text.replace(exp,"<a target='_blank' href='http://stocktwits.com/symbol/$1'>$$$1</a>"); - - //use this to apply focus to container - return text.replace(exp, "<a href='javascript:;' data-symbol='$1' class='focus' title='Change context to $$$1'>$$$1</a>"); - } - - return App_Class; -})(); \ No newline at end of file +F2.Apps['com_openf2_examples_csharp_stocktwits'] = (function () { + var App_Class = function (appConfig, appContent, root) { + // constructor + this.appConfig = appConfig; + this.appContent = appContent; + this.$root = $(root); //if you're using jQuery. + this.$app = $('div', this.$root); + this.context = this.appConfig.context || {}; + this.symbol = this.context.symbol || 'MSFT'; //default to MSFT + this.setupEvents(); + }; + + App_Class.prototype.init = function () { + this.getTwits(); + }; + + App_Class.prototype.setupEvents = function () { + F2.Events.on( + F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, + $.proxy(function (data) { + this.symbol = data.symbol; + this.init(); + }, this) + ); + }; + + App_Class.prototype.getTwits = function () { + $.ajax({ + //url: "http://www.openf2.org/api/stocktwits/" + this.symbol, + url: + 'https://api.stocktwits.com/api/2/streams/symbol/' + + this.symbol + + '.json', + data: {}, + cache: true, + context: this + }) + .done(function (data, txtStatus) { + this.draw(data); + }) + .fail(function (jqxhr, txtStatus) { + console.error( + 'F2wits failed to load StockTwits data.', + jqxhr, + txtStatus + ); + this.$app.html( + '<p>An error occurred loading StockTwits data for ' + + this.symbol + + '.</p>' + ); + }); + }; + + App_Class.prototype.draw = function (data) { + var html = []; + var moment = window.moment || require('moment'); + + if (data.errors) { + html.push('StockTwits API unavailable.'); + } else { + html.push('<table class="table">'); + + $.each( + data.messages, + $.proxy(function (idx, item) { + //body, created_at, source, symbols, user + + if (idx > 4) { + return true; + } //only show 5 + + var body = item.body, + created_at = moment(new Date(item.created_at)) + .startOf('hour') + .fromNow(), + id = item.id, + source = item.source, + symbols = item.symbols, + user = item.user, + symList = []; + + body = this.replaceURLWithHTMLLinks(body); + body = this.replaceDollarSigns(body); + + //build list of symbols + // $.each(symbols, function (idx, item) { + // symList.push( + // '<li>', + // //'<a href="http://stocktwits.com/symbol/',item.symbol,'" title="',item.title,'" target="_blank">$',item.symbol,'</a>', + // //' | ', + // '<a href="javascript:;" title="Change context to ', item.symbol, '" class="focus" data-symbol="', item.symbol, '" tabindex="-1">', item.symbol, '</a>', + // '</li>' + // ); + // }); + + html.push( + '<tr>', + '<td class="avatar"><a target="_blank" href="http://stocktwits.com/', + user.username, + '"><img title="by ', + user.username, + '" src="', + user.avatar_url, + '" width="35" height="35"></td>', + '<td>', + body, + '<div class="clearfix">', + '<time class="pull-left">', + created_at, + '</time>', + '</div>', + '</td>', + '</tr>' + ); + }, this) + ); + + html.push('</table>'); + } + + this.$app.html(html.join('')); + + //assign event to change container focus + $('a.focus', this.$app).click(function () { + F2.Events.emit(F2.Constants.Events.APP_SYMBOL_CHANGE, { + symbol: $(this).attr('data-symbol'), + name: $(this).attr('data-symbol') + }); + }); + }; + + //http://stackoverflow.com/questions/37684/how-to-replace-plain-urls-with-links + App_Class.prototype.replaceURLWithHTMLLinks = function (text) { + var exp = + /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi; + return text.replace(exp, "<a target='_blank' href='$1'>$1</a>"); + }; + + App_Class.prototype.replaceDollarSigns = function (text) { + var exp = /\$([A-Za-z0-9_]+)/gi; + //use this to link to StockTwits.com + //return text.replace(exp,"<a target='_blank' href='http://stocktwits.com/symbol/$1'>$$$1</a>"); + + //use this to apply focus to container + return text.replace( + exp, + "<a href='javascript:;' data-symbol='$1' class='focus' title='Change context to $$$1'>$$$1</a>" + ); + }; + + return App_Class; +})(); diff --git a/docs/src/apps/com_openf2_examples_csharp_stocktwits/manifest.js b/docs/src/apps/com_openf2_examples_csharp_stocktwits/manifest.js index a59ce37c..026c48fe 100644 --- a/docs/src/apps/com_openf2_examples_csharp_stocktwits/manifest.js +++ b/docs/src/apps/com_openf2_examples_csharp_stocktwits/manifest.js @@ -1,18 +1,16 @@ F2_jsonpCallback_com_openf2_examples_csharp_stocktwits({ - "inlineScripts": [], - "scripts": [ - "/js/thirdparty/moment.min.js", - "/apps/com_openf2_examples_csharp_stocktwits/appclass.js" - ], - "styles": [ - "/apps/com_openf2_examples_csharp_stocktwits/app.css" - ], - "apps": [ - { - "data": {}, - "html": "<div></div>", - "status": "SUCCESS", - "id": "com_openf2_examples_csharp_stocktwits" - } - ] -}); \ No newline at end of file + inlineScripts: [], + scripts: [ + '/js/thirdparty/moment.min.js', + '/apps/com_openf2_examples_csharp_stocktwits/appclass.js' + ], + styles: ['/apps/com_openf2_examples_csharp_stocktwits/app.css'], + apps: [ + { + data: {}, + html: '<div></div>', + status: 'SUCCESS', + id: 'com_openf2_examples_csharp_stocktwits' + } + ] +}); diff --git a/docs/src/container-development.md b/docs/src/container-development.md index 6e6be97c..26d8f2f2 100644 --- a/docs/src/container-development.md +++ b/docs/src/container-development.md @@ -4,7 +4,7 @@ The container is the foundation of any F2-enabled solution. By leveraging the [F2.js SDK](f2js-sdk.html), Container Providers offer a consistent and reliable mechanism for all App Developers to load their apps on that container regardless of where it is hosted, who developed it, or what back-end stack it uses. You can [read more about the framework](about-f2.html#framework), [download the project on GitHub](https://github.com/OpenF2/F2#quick-start) or [get started](#get-started) below. </p> -* * * * +--- ## Get Started @@ -38,13 +38,14 @@ Setup a basic container HTML template (or add F2.js to an existing website): ```javascript var _appConfig = { - appId: 'com_openf2_examples_javascript_helloworld', - manifestUrl: 'http://docs.openf2.org/demos/apps/JavaScript/HelloWorld/manifest.js' + appId: 'com_openf2_examples_javascript_helloworld', + manifestUrl: + 'http://docs.openf2.org/demos/apps/JavaScript/HelloWorld/manifest.js' }; -$(function(){ - F2.init(); - F2.registerApps(_appConfig); +$(function () { + F2.init(); + F2.registerApps(_appConfig); }); ``` @@ -82,7 +83,7 @@ To get started working with or developing apps, browse to the [documentation for <p><a href="#developing-f2-containers" class="btn btn-primary btn-small">Developing F2 Containers</a> <a href="./sdk/" class="btn btn-default btn-small">F2.js SDK Reference</a></p> -* * * * +--- ## Container Design @@ -98,7 +99,7 @@ In order to ensure that containers built using F2 are successful, they must be a Ultimately, the responsibility of app design falls on either the Container or App Developer or both. In many cases, Container Developers will provide App Developers will visual designs, style guides or other assets required to ensure apps have the form and function for a given container. Container Developers may also [provide CSS for App Developers](about-f2.html#creating-a-common-look-and-feel) to adhere to—which should be easy since F2 enforces a [consistent HTML structure across all containers and apps](app-development.html#automatic-consistency). In other cases, Container and App Developers may never know each other and it's important everyone strictly adheres to the guidelines set forth in this documentation. -* * * * +--- ## Developing F2 Containers @@ -124,9 +125,9 @@ As an example, your ContainerID could look like this: If you built more than one container while working at Acme Corporation, you could create more ContainerIDs. All of these are valid: -* `com_container_acmecorp_activetrader` -* `com_container_acmecorp_retail` -* `com_container_acmecorp_mobilestreamer` +- `com_container_acmecorp_activetrader` +- `com_container_acmecorp_retail` +- `com_container_acmecorp_mobilestreamer` To guarantee uniqueness, we will provide a ContainerID generation service that allows customization of your ContainerID in the [Developer Center](about-f2.html#developer-center). @@ -148,9 +149,9 @@ To initialize a container with a `ContainerConfig`, use: ```javascript F2.init({ - UI: {}, - xhr: function(){}, - supportedViews: [] + UI: {}, + xhr: function () {}, + supportedViews: [] }); ``` @@ -164,7 +165,7 @@ To enable debug mode in a container, use the following [property](./sdk/classes/ ```javascript F2.init({ - debugMode: true + debugMode: true }); ``` @@ -178,7 +179,7 @@ Configuration of current region and language using the `locale`: ```javascript F2.init({ - locale: 'en-us' + locale: 'en-us' }); ``` @@ -194,8 +195,8 @@ Here is an example of triggering the locale change event: var currentLocale = F2.getContainerLocale(); //en-us //emit F2 event with new locale -F2.Events.emit(F2.Constants.Events.CONTAINER_LOCALE_CHANGE,{ - locale: 'en-gb' +F2.Events.emit(F2.Constants.Events.CONTAINER_LOCALE_CHANGE, { + locale: 'en-gb' }); //get newly-updated locale @@ -209,21 +210,21 @@ There is a parameter sent to each `AppManifest` request during `F2.registerApps` Here is an example of the two ways of getting the container locale inside an AppClass. ```javascript -F2.Apps["com_companyname_appname"] = (function() { - var App_Class = function(appConfig, appContent, root) { - // "containerLocale" is added to the AppConfig - // during F2.registerApps - console.log(appConfig.containerLocale);//en-us - } - - App_Class.prototype.init = function() { - // get locale using helper function - // if locale changes, this function will - // always return the current locale - console.log(F2.getContainerLocale());//en-us - } - - return App_Class; +F2.Apps['com_companyname_appname'] = (function () { + var App_Class = function (appConfig, appContent, root) { + // "containerLocale" is added to the AppConfig + // during F2.registerApps + console.log(appConfig.containerLocale); //en-us + }; + + App_Class.prototype.init = function () { + // get locale using helper function + // if locale changes, this function will + // always return the current locale + console.log(F2.getContainerLocale()); //en-us + }; + + return App_Class; })(); ``` @@ -250,7 +251,7 @@ Sample `AppConfig` showing the `localeSupport` property: ### Override the AppManifest Request -Occasionally Container Developers need more granular control over the `AppManifest` request mechanism in F2.js. The [manifest request process](./sdk/classes/F2.html#methods-registerApps)—intentionally obscured from developers through the `F2.registerApps()` API—is handled by a simple ajax call to an HTTP endpoint. (F2 relies on `jQuery.ajax()` for this.) In version {{version}} of F2, the `AppManifest` request can be overridden in the Container Config. +Occasionally Container Developers need more granular control over the `AppManifest` request mechanism in F2.js. The [manifest request process](./sdk/classes/F2.html#methods-registerApps)—intentionally obscured from developers through the `F2.registerApps()` API—is handled by a simple ajax call to an HTTP endpoint. (F2 relies on `jQuery.ajax()` for this.) In version {{version}} of F2, the `AppManifest` request can be overridden in the Container Config. <span class="label label-info">Note</span> The `AppManifest` endpoint is configured in the `manifestUrl` property within each [`AppConfig`](#appconfigs). @@ -258,30 +259,30 @@ The following example demonstrates how the `xhr` property of the `ContainerConfi ```javascript F2.init({ - xhr: function(url, appConfigs, success, error, complete) { - $.ajax({ - url: url, - type: 'POST', - data: { - params: F2.stringify(appConfigs, F2.appConfigReplacer) - }, - jsonp: false, // do not put 'callback=' in the query string - jsonpCallback: F2.Constants.JSONP_CALLBACK + appConfigs[0].appId, // Unique function name - dataType: 'json', - success: function(appManifest) { - // custom success logic - success(appManifest); // fire success callback - }, - error: function() { - // custom error logic - error(); // fire error callback - }, - complete: function() { - // custom complete logic - complete(); // fire complete callback - } - }); - } + xhr: function (url, appConfigs, success, error, complete) { + $.ajax({ + url: url, + type: 'POST', + data: { + params: F2.stringify(appConfigs, F2.appConfigReplacer) + }, + jsonp: false, // do not put 'callback=' in the query string + jsonpCallback: F2.Constants.JSONP_CALLBACK + appConfigs[0].appId, // Unique function name + dataType: 'json', + success: function (appManifest) { + // custom success logic + success(appManifest); // fire success callback + }, + error: function () { + // custom error logic + error(); // fire error callback + }, + complete: function () { + // custom complete logic + complete(); // fire complete callback + } + }); + } }); ``` @@ -295,11 +296,11 @@ The `dataType` property allows the container to override the request data type ( ```javascript F2.init({ - xhr: { - dataType: function(url) { - return F2.isLocalRequest(url) ? 'json' : 'jsonp'; - } - } + xhr: { + dataType: function (url) { + return F2.isLocalRequest(url) ? 'json' : 'jsonp'; + } + } }); ``` @@ -309,11 +310,11 @@ The `type` property allows the container to override the request method that is ```javascript F2.init({ - xhr: { - type: function(url) { - return F2.isLocalRequest(url) ? 'POST' : 'GET'; - } - } + xhr: { + type: function (url) { + return F2.isLocalRequest(url) ? 'POST' : 'GET'; + } + } }); ``` @@ -331,10 +332,10 @@ To override the script loader, assign a function to `loadScripts` in `F2.init` a ```javascript F2.init({ - loadScripts: function(scripts,callback){ - //perform script loading - callback(); - } + loadScripts: function (scripts, callback) { + //perform script loading + callback(); + } }); ``` @@ -342,11 +343,11 @@ The following example demonstrates using [HeadJS](http://headjs.com/site/api/v1. ```javascript F2.init({ - loadScripts: function(scripts,callback){ - head.load(scripts, function(){ - callback(); - }); - } + loadScripts: function (scripts, callback) { + head.load(scripts, function () { + callback(); + }); + } }); ``` @@ -360,10 +361,10 @@ To override the stylesheet loader, assign a function to `loadStyles` in `F2.init ```javascript F2.init({ - loadStyles: function(styles,callback){ - //perform stylesheet loading - callback(); - } + loadStyles: function (styles, callback) { + //perform stylesheet loading + callback(); + } }); ``` @@ -371,11 +372,11 @@ The following example demonstrates using [HeadJS](http://headjs.com/site/api/v1. ```javascript F2.init({ - loadStyles: function(styles,callback){ - head.load(styles, function(){ - callback(); - }); - } + loadStyles: function (styles, callback) { + head.load(styles, function () { + callback(); + }); + } }); ``` @@ -389,10 +390,10 @@ To override the inline script evaluator, assign a function to `loadInlineScripts ```javascript F2.init({ - loadInlineScripts: function(inlines,callback){ - //perform inline script evaluation - callback(); - } + loadInlineScripts: function (inlines, callback) { + //perform inline script evaluation + callback(); + } }); ``` @@ -407,11 +408,11 @@ In the event any scripts defined in an `AppManifest` fail to load—such as ```javascript var _token = F2.AppHandlers.getToken(); F2.AppHandlers.on( - _token, - F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, - function(appConfig, scriptInfo) { - F2.log(appConfig.appId); - } + _token, + F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, + function (appConfig, scriptInfo) { + F2.log(appConfig.appId); + } ); ``` @@ -420,9 +421,9 @@ F2.AppHandlers.on( When all of the scripts defined in an `AppManifest` have been loaded, the `APP_SCRIPTS_LOADED` event is triggered. This event receives the `appId` and array of `scripts` just loaded. _This event is fired for every App registered._ ```javascript -F2.Events.on('APP_SCRIPTS_LOADED', function(data){ - F2.log('All scripts for ' +data.appId+ ' have been loaded.'); - //Ouputs 'All scripts for com_test_app have been loaded.' +F2.Events.on('APP_SCRIPTS_LOADED', function (data) { + F2.log('All scripts for ' + data.appId + ' have been loaded.'); + //Ouputs 'All scripts for com_test_app have been loaded.' }); ``` @@ -430,7 +431,7 @@ F2.Events.on('APP_SCRIPTS_LOADED', function(data){ If you're looking for sample container HTML template code, jump to the [Get Started section](#get-started). -* * * * +--- ## App Integration @@ -461,30 +462,30 @@ An example array of `AppConfig` objects for a collection of apps: ```javascript [ - { - appId: "com_companyName_appName", - manifestUrl: "http://www.domain.com/manifest.js", - name: "App name", - context: { - data: [1,2,3,4,5] - } - }, - { - appId: "com_companyName_appName2", - manifestUrl: "http://www.domain.com/manifest2.js", - name: "App2 name", - context: { - name: 'value' - } - }, - { - appId: "com_companyName_appName3", - manifestUrl: "http://www.domain.com/manifest3.js", - name: "App3 name", - context: { - status: 'ok' - } - }, + { + appId: 'com_companyName_appName', + manifestUrl: 'http://www.domain.com/manifest.js', + name: 'App name', + context: { + data: [1, 2, 3, 4, 5] + } + }, + { + appId: 'com_companyName_appName2', + manifestUrl: 'http://www.domain.com/manifest2.js', + name: 'App2 name', + context: { + name: 'value' + } + }, + { + appId: 'com_companyName_appName3', + manifestUrl: 'http://www.domain.com/manifest3.js', + name: 'App3 name', + context: { + status: 'ok' + } + } ]; ``` @@ -500,11 +501,11 @@ During the F2 app load life cycle, the following events happen in order: 4. If the `AppConfig` contains a `root` property, F2 switches to [preloading mode](#registering-pre-loaded-apps) 5. If the `AppConfig` contains the `enableBatchRequests:true` property, F2 switches to [batching mode](#batch-requesting-apps) 6. Finally, the [internal `_loadApps` function](https://github.com/OpenF2/F2/blob/master/sdk/src/container.js#L211) is called which: - 1. Iterates over each URL in the `styles` array, creates a new `<link rel="stylesheet">` tag and inserts it into the `<head>`. - 2. Iterates over each app in the `apps` array, stores off any `data` to pass to the `appclass` later, and inserts any HTML into the app's root. - 3. Iterates over each URL in the `scripts` array, creates a new `<script>` tag and attaches it to the `<body>`. The scripts are _requested and added in serial_ to ensure they execute in order. - 4. Iterates over each string in the `inlineScripts` array, and evaluates the script—only when all of the scripts in the previous step have been loaded. - 5. When this process is complete and _all dependencies have been loaded_, a new app instance is created and [the `appclass` is initialized](app-development.html#app-class). +7. Iterates over each URL in the `styles` array, creates a new `<link rel="stylesheet">` tag and inserts it into the `<head>`. +8. Iterates over each app in the `apps` array, stores off any `data` to pass to the `appclass` later, and inserts any HTML into the app's root. +9. Iterates over each URL in the `scripts` array, creates a new `<script>` tag and attaches it to the `<body>`. The scripts are _requested and added in serial_ to ensure they execute in order. +10. Iterates over each string in the `inlineScripts` array, and evaluates the script—only when all of the scripts in the previous step have been loaded. +11. When this process is complete and _all dependencies have been loaded_, a new app instance is created and [the `appclass` is initialized](app-development.html#app-class). <span class="label label-danger">Important</span> Since version 1.4.0, regardless of how many times a particular app is loaded, each of its `scripts` and `styles` dependencies is requested and inserted into the page **only once**. @@ -515,23 +516,31 @@ Since version 1.4.0, App Placeholders provide a way to greatly simplify F2 App i By using one of the available attributes (`f2-autoload`), F2 auto-registers this "Hello World" App and inserts it into this "placeholder" DOM element. ```html -<div id="f2-autoload" data-f2-appid="com_openf2_examples_nodejs_helloworld" data-f2-manifesturl="http://www.openf2.org/F2/apps"></div> +<div + id="f2-autoload" + data-f2-appid="com_openf2_examples_nodejs_helloworld" + data-f2-manifesturl="http://www.openf2.org/F2/apps" +></div> ``` #### Supported Auto-Load Attributes The following HTML elements are automatically parsed by F2.js and will trigger auto-loading (provided requirements below are met): -* CSS classname: `.f2-autoload` -* Data attribute: `[data-f2-autoload]` -* ID attribute: `#f2-autoload` +- CSS classname: `.f2-autoload` +- Data attribute: `[data-f2-autoload]` +- ID attribute: `#f2-autoload` #### Requirements Both an `appId` and `manifestUrl` are required for F2.js to successfully register an App. Use `data-f2-appid` and `data-f2-manifesturl` as shown in this example: ```html -<div id="f2-autoload" data-f2-appid="com_openf2_examples_nodejs_helloworld" data-f2-manifesturl="http://www.openf2.org/F2/apps"></div> +<div + id="f2-autoload" + data-f2-appid="com_openf2_examples_nodejs_helloworld" + data-f2-manifesturl="http://www.openf2.org/F2/apps" +></div> ``` #### Other Options @@ -545,12 +554,17 @@ data-f2-context="{"hello":"world"}" Implemented: ```html -<div id="f2-autoload" data-f2-appid="com_openf2_examples_nodejs_helloworld" data-f2-manifesturl="http://www.openf2.org/F2/apps" data-f2-context="{"hello":"world"}"></div> +<div + id="f2-autoload" + data-f2-appid="com_openf2_examples_nodejs_helloworld" + data-f2-manifesturl="http://www.openf2.org/F2/apps" + data-f2-context='{"hello":"world"}' +></div> ``` [Batch requesting](#batch-requesting-apps) of is supported in the auto-loading mode. -* To enable batch requests, use the `data-f2-enablebatchrequests` data attribute. +- To enable batch requests, use the `data-f2-enablebatchrequests` data attribute. <span class="label label-info">Note</span> More `AppConfig` properties could be added as data attributes for auto-loading in future versions. See [#187](https://github.com/OpenF2/F2/issues/187). @@ -687,11 +701,11 @@ To use pre-loaded apps, an additional property is required on the `AppConfig` ob ```javascript var _appConfig = { - appId: 'com_openf2_examples_csharp_marketnews', - description: 'Example News', - manifestUrl: 'http://www.openf2.org/Examples/Apps', - name: 'Example News', - root: document.getElementById('news_app') + appId: 'com_openf2_examples_csharp_marketnews', + description: 'Example News', + manifestUrl: 'http://www.openf2.org/Examples/Apps', + name: 'Example News', + root: document.getElementById('news_app') }; ``` @@ -701,7 +715,7 @@ Using JavaScript: ```javascript { - root: document.getElementById('news_app') + root: document.getElementById('news_app'); } ``` @@ -709,7 +723,7 @@ Using a CSS selector string: ```javascript { - root: '#news_app' + root: '#news_app'; } ``` @@ -721,16 +735,16 @@ Since you started with the `AppConfig` and now have the `AppManifest` from step ```javascript var _appConfig = { - appId: 'com_openf2_examples_csharp_marketnews', - description: 'Example News', - manifestUrl: 'http://www.openf2.org/Examples/Apps', - name: 'Example News', - root: document.getElementById('news_app') + appId: 'com_openf2_examples_csharp_marketnews', + description: 'Example News', + manifestUrl: 'http://www.openf2.org/Examples/Apps', + name: 'Example News', + root: document.getElementById('news_app') }; -$(function(){ - F2.init(); - F2.registerApps(_appConfig); +$(function () { + F2.init(); + F2.registerApps(_appConfig); }); ``` @@ -744,29 +758,27 @@ In the following example, the `AppManifest` was pre-loaded and stored in the `_a ```javascript var _appConfig = { - appId: 'com_openf2_examples_csharp_marketnews', - description: 'Example News', - manifestUrl: 'http://www.openf2.org/Examples/Apps', - name: 'Example News', - root: document.getElementById('news_app') + appId: 'com_openf2_examples_csharp_marketnews', + description: 'Example News', + manifestUrl: 'http://www.openf2.org/Examples/Apps', + name: 'Example News', + root: document.getElementById('news_app') }; var _appManifest = { - "apps":[{ - "data":{}, - "html": "<div data-module-name=\"MarketNewsApp\">...</div>", - }], - "scripts":[ - "http://www.openf2.org/js/main.js" - ], - "styles":[ - "http://www.openf2.org/css/site.css" - ] + apps: [ + { + data: {}, + html: '<div data-module-name="MarketNewsApp">...</div>' + } + ], + scripts: ['http://www.openf2.org/js/main.js'], + styles: ['http://www.openf2.org/css/site.css'] }; -$(function(){ - F2.init(); - F2.registerApps(_appConfig,_appManifest); +$(function () { + F2.init(); + F2.registerApps(_appConfig, _appManifest); }); ``` @@ -781,7 +793,7 @@ If a manifest is passed with the `AppConfig`, then the `AppClass` will receive a <span class="label label-danger">Important</span> The `F2.registerApps()` API supports both an array of objects and object literals for each argument. Internally, F2.js converts the value of each argument into an array using concatenation (`[].concat()`). If arrays of objects are used (when there are more than one app on the container), the `_appConfig` and `_appManifest` arrays must be of equal length, and the object at each index must be a parallel reference. This means the `AppConfig` and `AppManifest` for the sample news app used above must be in `_appConfig[0]` and `_appManifest[0]`. -* * * * +--- ## AppHandlers for App Layout @@ -796,10 +808,10 @@ Using `AppHandlers` is as simple as attaching an event handler function to be ex A new feature has been added to F2 as part of `AppHandlers`: the event token. The token is designed to be used only by Container Developers to ensure the `AppHandlers` listeners are only called by their applications, and aren't accessible to App Developers' code. Container Developers should create a variable for this token in their JavaScript and encapsulate it inside a closure as shown in the example below. ```javascript -(function(){ - var token = F2.AppHandlers.getToken(); - console.log(token); - //outputs a GUID like 'ce2e7aae-04fa-96a3-edd7-be67e99937b4' +(function () { + var token = F2.AppHandlers.getToken(); + console.log(token); + //outputs a GUID like 'ce2e7aae-04fa-96a3-edd7-be67e99937b4' }); ``` @@ -820,18 +832,17 @@ Appending apps to the `<body>` is the default app rendering behavior of F2. F2 `AppHandlers` provide event handlers for customized app layout using `F2.AppHandlers.on()` and `F2.AppHandlers.off()`. The use of `on` and `off` require both a [token](#apphandler-tokens) and an event type as arguments. The event types, defined as constants in `F2.Constants.AppHandlers`, are: -* `appManifestRequestFail` -* `appCreateRoot` -* `appDestroy` -* `appDestroyAfter` -* `appDestroyBefore` -* `appRender` -* `appRenderAfter` -* `appRenderBefore` +- `appManifestRequestFail` +- `appCreateRoot` +- `appDestroy` +- `appDestroyAfter` +- `appDestroyBefore` +- `appRender` +- `appRenderAfter` +- `appRenderBefore` Review the complete `F2.Constants.AppHandlers` collection and their purpose in [the F2.js SDK documentation](./sdk/classes/F2.Constants.AppHandlers.html). The order of operations is detailed in [F2.AppHandlers](./sdk/classes/F2.AppHandlers.html). - #### Appending an App to a DOM Element There are many uses for `AppHandlers` in Container Developers' applications and they are detailed—including plenty of examples—in the [F2.js SDK documentation](./sdk/classes/F2.AppHandlers.html). Before jumping to that section of the docs, let's look at one of the more common uses for `AppHandlers`: targeting the placement of an app into a specific DOM element. @@ -840,10 +851,10 @@ In the following example, the app will be appended to the `#my_sidebar` DOM elem ```javascript var _token = F2.AppHandlers.getToken(), - _appConfig = { - appId: 'com_example_app', - manifestUrl: '/manifest.js' - }; + _appConfig = { + appId: 'com_example_app', + manifestUrl: '/manifest.js' + }; F2.init(); F2.AppHandlers.on(_token, 'appRender', document.getElementById('my_sidebar')); @@ -854,12 +865,12 @@ F2 will insert `html` from the `AppManifest` inside the specified DOM element. T ```html <div id="my_sidebar"> - <!--HTML defined in AppManifest inserted here--> - <div class="f2-app f2-app-container com_example_app"> - <div class="f2-app-view" data-f2-view="home"> - <p>Hello World!</p> - </div> - </div> + <!--HTML defined in AppManifest inserted here--> + <div class="f2-app f2-app-container com_example_app"> + <div class="f2-app-view" data-f2-view="home"> + <p>Hello World!</p> + </div> + </div> </div> ``` @@ -879,7 +890,7 @@ Here is a slightly more complicated example of the `appRender` event coupled wit There are numerous examples shown on the Properties tab of [`F2.Constants.AppHandlers`](./sdk/classes/F2.Constants.AppHandlers.html). These demonstrate more advanced use of `F2.AppHandlers` and aim to provide Container Developers demonstrable low-level control over the [life cycle of app rendering](#page-load-life-cycle). -* * * * +--- ## Namespacing @@ -897,11 +908,11 @@ In this simple example, container-provided CSS should be namespaced as shown bel ```css .com_container_companyName_containerName p { - padding:5px; + padding: 5px; } .com_container_companyName_containerName .alert { - color:red; + color: red; } ``` @@ -911,7 +922,7 @@ While the [CSS cascade](http://www.webdesignfromscratch.com/html-css/css-inherit ```css .com_container_companyName_containerName #notice { - background-color:yellow; + background-color: yellow; } ``` @@ -928,18 +939,21 @@ The F2.js SDK was designed with extensibility in mind and therefore custom logic Example: ```javascript -F2.extend('YourPluginName', (function(){ - return { - doSomething: function(){ - F2.log("Something has been done."); - } - }; -})()); +F2.extend( + 'YourPluginName', + (function () { + return { + doSomething: function () { + F2.log('Something has been done.'); + } + }; + })() +); ``` For more information, read [Extending F2](extending-f2.html). -* * * * +--- ## Context @@ -964,24 +978,18 @@ Let's look at some code. In this example, the container broadcasts, or emits, a javascript event defined in `F2.Events.Constants`. The `F2.Events.emit()` method accepts two arguments: the event name and an optional data object. ```javascript -F2.Events.emit( - F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, - { - symbol: "AAPL", - name: "Apple, Inc." - } -); +F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { + symbol: 'AAPL', + name: 'Apple, Inc.' +}); ``` To listen to the `F2.Constants.Events.CONTAINER_SYMBOL_CHANGE` event inside your F2 app, you can use this code to trigger an alert dialog with the symbol: ```javascript -F2.Events.on( - F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, - function(data){ - F2.log("The symbol was changed to " + data.symbol); - } -); +F2.Events.on(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, function (data) { + F2.log('The symbol was changed to ' + data.symbol); +}); ``` The `F2.Events.on()` method accepts the event name and listener function as arguments. [Read the SDK](./sdk/classes/F2.Events.html) for more information. @@ -995,16 +1003,16 @@ Often times containers will want to send context to apps during [app registratio ```javascript //define app config var _appConfigs = [ - { - appId: "com_acmecorp_news", - description: "Acme Corp News", - manifestUrl: "http://www.acme.com/apps/news-manifest.js", - name: "Acme News App", - context: { - sessionId: myApp.sessionId, - someArray: [value1,value2] - } - } + { + appId: 'com_acmecorp_news', + description: 'Acme Corp News', + manifestUrl: 'http://www.acme.com/apps/news-manifest.js', + name: 'Acme News App', + context: { + sessionId: myApp.sessionId, + someArray: [value1, value2] + } + } ]; ``` @@ -1027,24 +1035,18 @@ This demonstrates complete flexibility of passing arbitrary context values from In this example, your app emits an event indicating a user is looking at a different stock ticker _within your app_. Using `F2.Events.emit()` in your code, your app broadcasts the new symbol. As with container-to-app context passing, the `F2.Events.emit()` method accepts two arguments: the event name and an optional data object. ```javascript -F2.Events.emit( - F2.Constants.Events.APP_SYMBOL_CHANGE, - { - symbol: "MSFT", - name: "Microsoft, Inc." - } -); +F2.Events.emit(F2.Constants.Events.APP_SYMBOL_CHANGE, { + symbol: 'MSFT', + name: 'Microsoft, Inc.' +}); ``` The container would need to listen to your app's broadcasted `F2.Constants.Events.APP_SYMBOL_CHANGE` event using code like this: ```javascript -F2.Events.on( - F2.Constants.Events.APP_SYMBOL_CHANGE, - function(data){ - F2.log("The symbol was changed to " + data.symbol); - } -); +F2.Events.on(F2.Constants.Events.APP_SYMBOL_CHANGE, function (data) { + F2.log('The symbol was changed to ' + data.symbol); +}); ``` <span class="label label-default">Note</span> For a full list of support event types, browse to the SDK for [F2.Constants.Events](./sdk/classes/F2.Constants.Events.html). @@ -1057,30 +1059,27 @@ Within "App 1", context is _sent_ using `F2.Events.emit()`: ```javascript F2.Events.emit( - "buy_stock", //custom event name - { - symbol: "GOOG", - name: "Google Inc", - price: 682.68, - isAvailableToPurchase: true, - orderType: "Market Order" - } + 'buy_stock', //custom event name + { + symbol: 'GOOG', + name: 'Google Inc', + price: 682.68, + isAvailableToPurchase: true, + orderType: 'Market Order' + } ); ``` Within "App 2", context is _received_ using `F2.Events.on()`: ```javascript -F2.Events.on( - "buy_stock", - function(data){ - if (data.isAvailableToPurchase){ - F2.log("Trade ticket order for " + data.symbol + " at $" + data.price); - } else { - F2.log("This stock is not available for purchase.") - } - } -); +F2.Events.on('buy_stock', function (data) { + if (data.isAvailableToPurchase) { + F2.log('Trade ticket order for ' + data.symbol + ' at $' + data.price); + } else { + F2.log('This stock is not available for purchase.'); + } +}); ``` ### More Complex Context @@ -1091,26 +1090,26 @@ This is an example Context object demonstrating arbitrary JavaScript objects: ```javascript F2.Events.emit( - "example_event", //custom event name - { - //number - price: 100, - //string - name: 'John Smith', - //function - callback: function(){ - F2.log('Callback!'); - }, - //array - watchlist: ['AAPL','MSFT','GE'], - //object - userInfo: { - name: 'John Smith', - title: 'Managing Director', - groups: ['Alpha','Beta'], - sessionId: 1234567890 - } - } + 'example_event', //custom event name + { + //number + price: 100, + //string + name: 'John Smith', + //function + callback: function () { + F2.log('Callback!'); + }, + //array + watchlist: ['AAPL', 'MSFT', 'GE'], + //object + userInfo: { + name: 'John Smith', + title: 'Managing Director', + groups: ['Alpha', 'Beta'], + sessionId: 1234567890 + } + } ); ``` @@ -1118,35 +1117,32 @@ If two apps want to communicate data for populating a trade ticket _and_ execute ```javascript F2.Events.emit( - "buy_stock", //custom event name - { - symbol: "GOOG", - name: "Google Inc", - price: 682.68, - isAvailableToPurchase: true, - orderType: "Market Order", - //define callback - callback: function(data){ - alert('Trade ticket populated'); - } - } + 'buy_stock', //custom event name + { + symbol: 'GOOG', + name: 'Google Inc', + price: 682.68, + isAvailableToPurchase: true, + orderType: 'Market Order', + //define callback + callback: function (data) { + alert('Trade ticket populated'); + } + } ); ``` The F2 app listening for the `buy_stock` event would fire the `callback` function. ```javascript -F2.Events.on( - "buy_stock", - function(data){ - F2.log("Trade ticket order for " + data.symbol + " at $" + data.price); - //..populate the trade ticket... - //fire the callback - if (typeof data.callback === 'function'){ - data.callback(); - } - } -); +F2.Events.on('buy_stock', function (data) { + F2.log('Trade ticket order for ' + data.symbol + ' at $' + data.price); + //..populate the trade ticket... + //fire the callback + if (typeof data.callback === 'function') { + data.callback(); + } +}); ``` ### Types of Context @@ -1157,13 +1153,13 @@ Context is a term used to describe the state of an F2 container and its apps. At Said another way, while `{ symbol:"AAPL", name: "Apple, Inc" }` can be used to communicate symbol context, developers could also use `{ symbol: "123456789" }` to identify Apple, Inc. The latter is more likely given not all apps would programmatically understand `AAPL` but—given symbol lookup services—would understand `123456789` as the universal _F2_ identifier for Apple, Inc. It is clear Container and App Developers alike would prefer to communicate with a guaranteed-to-never-change universal ID for all instrument types across all asset classes. _Further details will be forthcoming as the F2 specification evolves._ -* * * * +--- ## Utilities The [F2.js JavaScript SDK](f2js-sdk.html) provides utility methods for Container Developers. These are available within the `F2` namespace and complete details are in the [Reference documentation](./sdk/classes/F2.html). -* * * * +--- ## Entitlements @@ -1171,13 +1167,13 @@ User or content entitlements are the responsibility of the App developer. Many a _Further details around app entitlements will be forthcoming as the F2 specification evolves._ -* * * * +--- ## Single Sign-On Single sign-on (SSO) will be a shared responsibility between the Container and App Developer. In some cases, containers will want all its apps to be authenticated seamlessly for users, and that will have to be negotiated between Container and App Developers. For the purposes of this documentation, it is assumed Container Developers will build and host authentication for access to their container(s). -Once a user is authenticated on the container, how is the user then authenticated with all of the apps? [Encrypted URLs](#using-encrypted-urls).* +Once a user is authenticated on the container, how is the user then authenticated with all of the apps? [Encrypted URLs](#using-encrypted-urls).\* <span class="label label-default">Note</span> The Container Developer is free to utilize any app authentication method they deem fit. Container Developers and App Developers will need to work together to finalize the authentication details. @@ -1193,4 +1189,4 @@ Authentication is a critical part of any container-app relationship. There are a _Further details around container and app single sign-on will be forthcoming as the F2 specification evolves._ -* * * * +--- diff --git a/docs/src/css/less/animate.less b/docs/src/css/less/animate.less index f98c2ce6..b50441d6 100644 --- a/docs/src/css/less/animate.less +++ b/docs/src/css/less/animate.less @@ -21,2827 +21,2877 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI // } .animated.infinite { - -webkit-animation-iteration-count: infinite; - animation-iteration-count: infinite; + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; } .animated.hinge { - -webkit-animation-duration: 2s; - animation-duration: 2s; + -webkit-animation-duration: 2s; + animation-duration: 2s; } @-webkit-keyframes bounce { - 0%, 20%, 50%, 80%, 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - - 40% { - -webkit-transform: translateY(-30px); - transform: translateY(-30px); - } - - 60% { - -webkit-transform: translateY(-15px); - transform: translateY(-15px); - } + 0%, + 20%, + 50%, + 80%, + 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 40% { + -webkit-transform: translateY(-30px); + transform: translateY(-30px); + } + + 60% { + -webkit-transform: translateY(-15px); + transform: translateY(-15px); + } } @keyframes bounce { - 0%, 20%, 50%, 80%, 100% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 40% { - -webkit-transform: translateY(-30px); - -ms-transform: translateY(-30px); - transform: translateY(-30px); - } - - 60% { - -webkit-transform: translateY(-15px); - -ms-transform: translateY(-15px); - transform: translateY(-15px); - } + 0%, + 20%, + 50%, + 80%, + 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 40% { + -webkit-transform: translateY(-30px); + -ms-transform: translateY(-30px); + transform: translateY(-30px); + } + + 60% { + -webkit-transform: translateY(-15px); + -ms-transform: translateY(-15px); + transform: translateY(-15px); + } } .bounce { - -webkit-animation-name: bounce; - animation-name: bounce; + -webkit-animation-name: bounce; + animation-name: bounce; } @-webkit-keyframes flash { - 0%, 50%, 100% { - opacity: 1; - } + 0%, + 50%, + 100% { + opacity: 1; + } - 25%, 75% { - opacity: 0; - } + 25%, + 75% { + opacity: 0; + } } @keyframes flash { - 0%, 50%, 100% { - opacity: 1; - } + 0%, + 50%, + 100% { + opacity: 1; + } - 25%, 75% { - opacity: 0; - } + 25%, + 75% { + opacity: 0; + } } .flash { - -webkit-animation-name: flash; - animation-name: flash; + -webkit-animation-name: flash; + animation-name: flash; } /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ @-webkit-keyframes pulse { - 0% { - -webkit-transform: scale(1); - transform: scale(1); - } + 0% { + -webkit-transform: scale(1); + transform: scale(1); + } - 50% { - -webkit-transform: scale(1.1); - transform: scale(1.1); - } + 50% { + -webkit-transform: scale(1.1); + transform: scale(1.1); + } - 100% { - -webkit-transform: scale(1); - transform: scale(1); - } + 100% { + -webkit-transform: scale(1); + transform: scale(1); + } } @keyframes pulse { - 0% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } + 0% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } - 50% { - -webkit-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); - } + 50% { + -webkit-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); + } - 100% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } + 100% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } } .pulse { - -webkit-animation-name: pulse; - animation-name: pulse; + -webkit-animation-name: pulse; + animation-name: pulse; } @-webkit-keyframes rubberBand { - 0% { - -webkit-transform: scale(1); - transform: scale(1); - } + 0% { + -webkit-transform: scale(1); + transform: scale(1); + } - 30% { - -webkit-transform: scaleX(1.25) scaleY(0.75); - transform: scaleX(1.25) scaleY(0.75); - } + 30% { + -webkit-transform: scaleX(1.25) scaleY(0.75); + transform: scaleX(1.25) scaleY(0.75); + } - 40% { - -webkit-transform: scaleX(0.75) scaleY(1.25); - transform: scaleX(0.75) scaleY(1.25); - } + 40% { + -webkit-transform: scaleX(0.75) scaleY(1.25); + transform: scaleX(0.75) scaleY(1.25); + } - 60% { - -webkit-transform: scaleX(1.15) scaleY(0.85); - transform: scaleX(1.15) scaleY(0.85); - } + 60% { + -webkit-transform: scaleX(1.15) scaleY(0.85); + transform: scaleX(1.15) scaleY(0.85); + } - 100% { - -webkit-transform: scale(1); - transform: scale(1); - } + 100% { + -webkit-transform: scale(1); + transform: scale(1); + } } @keyframes rubberBand { - 0% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - - 30% { - -webkit-transform: scaleX(1.25) scaleY(0.75); - -ms-transform: scaleX(1.25) scaleY(0.75); - transform: scaleX(1.25) scaleY(0.75); - } - - 40% { - -webkit-transform: scaleX(0.75) scaleY(1.25); - -ms-transform: scaleX(0.75) scaleY(1.25); - transform: scaleX(0.75) scaleY(1.25); - } - - 60% { - -webkit-transform: scaleX(1.15) scaleY(0.85); - -ms-transform: scaleX(1.15) scaleY(0.85); - transform: scaleX(1.15) scaleY(0.85); - } - - 100% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } + 0% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + + 30% { + -webkit-transform: scaleX(1.25) scaleY(0.75); + -ms-transform: scaleX(1.25) scaleY(0.75); + transform: scaleX(1.25) scaleY(0.75); + } + + 40% { + -webkit-transform: scaleX(0.75) scaleY(1.25); + -ms-transform: scaleX(0.75) scaleY(1.25); + transform: scaleX(0.75) scaleY(1.25); + } + + 60% { + -webkit-transform: scaleX(1.15) scaleY(0.85); + -ms-transform: scaleX(1.15) scaleY(0.85); + transform: scaleX(1.15) scaleY(0.85); + } + + 100% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } } .rubberBand { - -webkit-animation-name: rubberBand; - animation-name: rubberBand; + -webkit-animation-name: rubberBand; + animation-name: rubberBand; } @-webkit-keyframes shake { - 0%, 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - - 10%, 30%, 50%, 70%, 90% { - -webkit-transform: translateX(-10px); - transform: translateX(-10px); - } - - 20%, 40%, 60%, 80% { - -webkit-transform: translateX(10px); - transform: translateX(10px); - } + 0%, + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 10%, + 30%, + 50%, + 70%, + 90% { + -webkit-transform: translateX(-10px); + transform: translateX(-10px); + } + + 20%, + 40%, + 60%, + 80% { + -webkit-transform: translateX(10px); + transform: translateX(10px); + } } @keyframes shake { - 0%, 100% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 10%, 30%, 50%, 70%, 90% { - -webkit-transform: translateX(-10px); - -ms-transform: translateX(-10px); - transform: translateX(-10px); - } - - 20%, 40%, 60%, 80% { - -webkit-transform: translateX(10px); - -ms-transform: translateX(10px); - transform: translateX(10px); - } + 0%, + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 10%, + 30%, + 50%, + 70%, + 90% { + -webkit-transform: translateX(-10px); + -ms-transform: translateX(-10px); + transform: translateX(-10px); + } + + 20%, + 40%, + 60%, + 80% { + -webkit-transform: translateX(10px); + -ms-transform: translateX(10px); + transform: translateX(10px); + } } .shake { - -webkit-animation-name: shake; - animation-name: shake; + -webkit-animation-name: shake; + animation-name: shake; } @-webkit-keyframes swing { - 20% { - -webkit-transform: rotate(15deg); - transform: rotate(15deg); - } + 20% { + -webkit-transform: rotate(15deg); + transform: rotate(15deg); + } - 40% { - -webkit-transform: rotate(-10deg); - transform: rotate(-10deg); - } + 40% { + -webkit-transform: rotate(-10deg); + transform: rotate(-10deg); + } - 60% { - -webkit-transform: rotate(5deg); - transform: rotate(5deg); - } + 60% { + -webkit-transform: rotate(5deg); + transform: rotate(5deg); + } - 80% { - -webkit-transform: rotate(-5deg); - transform: rotate(-5deg); - } + 80% { + -webkit-transform: rotate(-5deg); + transform: rotate(-5deg); + } - 100% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } + 100% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } } @keyframes swing { - 20% { - -webkit-transform: rotate(15deg); - -ms-transform: rotate(15deg); - transform: rotate(15deg); - } - - 40% { - -webkit-transform: rotate(-10deg); - -ms-transform: rotate(-10deg); - transform: rotate(-10deg); - } - - 60% { - -webkit-transform: rotate(5deg); - -ms-transform: rotate(5deg); - transform: rotate(5deg); - } - - 80% { - -webkit-transform: rotate(-5deg); - -ms-transform: rotate(-5deg); - transform: rotate(-5deg); - } - - 100% { - -webkit-transform: rotate(0deg); - -ms-transform: rotate(0deg); - transform: rotate(0deg); - } + 20% { + -webkit-transform: rotate(15deg); + -ms-transform: rotate(15deg); + transform: rotate(15deg); + } + + 40% { + -webkit-transform: rotate(-10deg); + -ms-transform: rotate(-10deg); + transform: rotate(-10deg); + } + + 60% { + -webkit-transform: rotate(5deg); + -ms-transform: rotate(5deg); + transform: rotate(5deg); + } + + 80% { + -webkit-transform: rotate(-5deg); + -ms-transform: rotate(-5deg); + transform: rotate(-5deg); + } + + 100% { + -webkit-transform: rotate(0deg); + -ms-transform: rotate(0deg); + transform: rotate(0deg); + } } .swing { - -webkit-transform-origin: top center; - -ms-transform-origin: top center; - transform-origin: top center; - -webkit-animation-name: swing; - animation-name: swing; + -webkit-transform-origin: top center; + -ms-transform-origin: top center; + transform-origin: top center; + -webkit-animation-name: swing; + animation-name: swing; } @-webkit-keyframes tada { - 0% { - -webkit-transform: scale(1); - transform: scale(1); - } - - 10%, 20% { - -webkit-transform: scale(0.9) rotate(-3deg); - transform: scale(0.9) rotate(-3deg); - } - - 30%, 50%, 70%, 90% { - -webkit-transform: scale(1.1) rotate(3deg); - transform: scale(1.1) rotate(3deg); - } - - 40%, 60%, 80% { - -webkit-transform: scale(1.1) rotate(-3deg); - transform: scale(1.1) rotate(-3deg); - } - - 100% { - -webkit-transform: scale(1) rotate(0); - transform: scale(1) rotate(0); - } + 0% { + -webkit-transform: scale(1); + transform: scale(1); + } + + 10%, + 20% { + -webkit-transform: scale(0.9) rotate(-3deg); + transform: scale(0.9) rotate(-3deg); + } + + 30%, + 50%, + 70%, + 90% { + -webkit-transform: scale(1.1) rotate(3deg); + transform: scale(1.1) rotate(3deg); + } + + 40%, + 60%, + 80% { + -webkit-transform: scale(1.1) rotate(-3deg); + transform: scale(1.1) rotate(-3deg); + } + + 100% { + -webkit-transform: scale(1) rotate(0); + transform: scale(1) rotate(0); + } } @keyframes tada { - 0% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - - 10%, 20% { - -webkit-transform: scale(0.9) rotate(-3deg); - -ms-transform: scale(0.9) rotate(-3deg); - transform: scale(0.9) rotate(-3deg); - } - - 30%, 50%, 70%, 90% { - -webkit-transform: scale(1.1) rotate(3deg); - -ms-transform: scale(1.1) rotate(3deg); - transform: scale(1.1) rotate(3deg); - } - - 40%, 60%, 80% { - -webkit-transform: scale(1.1) rotate(-3deg); - -ms-transform: scale(1.1) rotate(-3deg); - transform: scale(1.1) rotate(-3deg); - } - - 100% { - -webkit-transform: scale(1) rotate(0); - -ms-transform: scale(1) rotate(0); - transform: scale(1) rotate(0); - } + 0% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + + 10%, + 20% { + -webkit-transform: scale(0.9) rotate(-3deg); + -ms-transform: scale(0.9) rotate(-3deg); + transform: scale(0.9) rotate(-3deg); + } + + 30%, + 50%, + 70%, + 90% { + -webkit-transform: scale(1.1) rotate(3deg); + -ms-transform: scale(1.1) rotate(3deg); + transform: scale(1.1) rotate(3deg); + } + + 40%, + 60%, + 80% { + -webkit-transform: scale(1.1) rotate(-3deg); + -ms-transform: scale(1.1) rotate(-3deg); + transform: scale(1.1) rotate(-3deg); + } + + 100% { + -webkit-transform: scale(1) rotate(0); + -ms-transform: scale(1) rotate(0); + transform: scale(1) rotate(0); + } } .tada { - -webkit-animation-name: tada; - animation-name: tada; + -webkit-animation-name: tada; + animation-name: tada; } /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ @-webkit-keyframes wobble { - 0% { - -webkit-transform: translateX(0%); - transform: translateX(0%); - } - - 15% { - -webkit-transform: translateX(-25%) rotate(-5deg); - transform: translateX(-25%) rotate(-5deg); - } - - 30% { - -webkit-transform: translateX(20%) rotate(3deg); - transform: translateX(20%) rotate(3deg); - } - - 45% { - -webkit-transform: translateX(-15%) rotate(-3deg); - transform: translateX(-15%) rotate(-3deg); - } - - 60% { - -webkit-transform: translateX(10%) rotate(2deg); - transform: translateX(10%) rotate(2deg); - } - - 75% { - -webkit-transform: translateX(-5%) rotate(-1deg); - transform: translateX(-5%) rotate(-1deg); - } - - 100% { - -webkit-transform: translateX(0%); - transform: translateX(0%); - } + 0% { + -webkit-transform: translateX(0%); + transform: translateX(0%); + } + + 15% { + -webkit-transform: translateX(-25%) rotate(-5deg); + transform: translateX(-25%) rotate(-5deg); + } + + 30% { + -webkit-transform: translateX(20%) rotate(3deg); + transform: translateX(20%) rotate(3deg); + } + + 45% { + -webkit-transform: translateX(-15%) rotate(-3deg); + transform: translateX(-15%) rotate(-3deg); + } + + 60% { + -webkit-transform: translateX(10%) rotate(2deg); + transform: translateX(10%) rotate(2deg); + } + + 75% { + -webkit-transform: translateX(-5%) rotate(-1deg); + transform: translateX(-5%) rotate(-1deg); + } + + 100% { + -webkit-transform: translateX(0%); + transform: translateX(0%); + } } @keyframes wobble { - 0% { - -webkit-transform: translateX(0%); - -ms-transform: translateX(0%); - transform: translateX(0%); - } - - 15% { - -webkit-transform: translateX(-25%) rotate(-5deg); - -ms-transform: translateX(-25%) rotate(-5deg); - transform: translateX(-25%) rotate(-5deg); - } - - 30% { - -webkit-transform: translateX(20%) rotate(3deg); - -ms-transform: translateX(20%) rotate(3deg); - transform: translateX(20%) rotate(3deg); - } - - 45% { - -webkit-transform: translateX(-15%) rotate(-3deg); - -ms-transform: translateX(-15%) rotate(-3deg); - transform: translateX(-15%) rotate(-3deg); - } - - 60% { - -webkit-transform: translateX(10%) rotate(2deg); - -ms-transform: translateX(10%) rotate(2deg); - transform: translateX(10%) rotate(2deg); - } - - 75% { - -webkit-transform: translateX(-5%) rotate(-1deg); - -ms-transform: translateX(-5%) rotate(-1deg); - transform: translateX(-5%) rotate(-1deg); - } - - 100% { - -webkit-transform: translateX(0%); - -ms-transform: translateX(0%); - transform: translateX(0%); - } + 0% { + -webkit-transform: translateX(0%); + -ms-transform: translateX(0%); + transform: translateX(0%); + } + + 15% { + -webkit-transform: translateX(-25%) rotate(-5deg); + -ms-transform: translateX(-25%) rotate(-5deg); + transform: translateX(-25%) rotate(-5deg); + } + + 30% { + -webkit-transform: translateX(20%) rotate(3deg); + -ms-transform: translateX(20%) rotate(3deg); + transform: translateX(20%) rotate(3deg); + } + + 45% { + -webkit-transform: translateX(-15%) rotate(-3deg); + -ms-transform: translateX(-15%) rotate(-3deg); + transform: translateX(-15%) rotate(-3deg); + } + + 60% { + -webkit-transform: translateX(10%) rotate(2deg); + -ms-transform: translateX(10%) rotate(2deg); + transform: translateX(10%) rotate(2deg); + } + + 75% { + -webkit-transform: translateX(-5%) rotate(-1deg); + -ms-transform: translateX(-5%) rotate(-1deg); + transform: translateX(-5%) rotate(-1deg); + } + + 100% { + -webkit-transform: translateX(0%); + -ms-transform: translateX(0%); + transform: translateX(0%); + } } .wobble { - -webkit-animation-name: wobble; - animation-name: wobble; + -webkit-animation-name: wobble; + animation-name: wobble; } @-webkit-keyframes bounceIn { - 0% { - opacity: 0; - -webkit-transform: scale(.3); - transform: scale(.3); - } - - 50% { - opacity: 1; - -webkit-transform: scale(1.05); - transform: scale(1.05); - } - - 70% { - -webkit-transform: scale(.9); - transform: scale(.9); - } - - 100% { - opacity: 1; - -webkit-transform: scale(1); - transform: scale(1); - } + 0% { + opacity: 0; + -webkit-transform: scale(0.3); + transform: scale(0.3); + } + + 50% { + opacity: 1; + -webkit-transform: scale(1.05); + transform: scale(1.05); + } + + 70% { + -webkit-transform: scale(0.9); + transform: scale(0.9); + } + + 100% { + opacity: 1; + -webkit-transform: scale(1); + transform: scale(1); + } } @keyframes bounceIn { - 0% { - opacity: 0; - -webkit-transform: scale(.3); - -ms-transform: scale(.3); - transform: scale(.3); - } - - 50% { - opacity: 1; - -webkit-transform: scale(1.05); - -ms-transform: scale(1.05); - transform: scale(1.05); - } - - 70% { - -webkit-transform: scale(.9); - -ms-transform: scale(.9); - transform: scale(.9); - } - - 100% { - opacity: 1; - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } + 0% { + opacity: 0; + -webkit-transform: scale(0.3); + -ms-transform: scale(0.3); + transform: scale(0.3); + } + + 50% { + opacity: 1; + -webkit-transform: scale(1.05); + -ms-transform: scale(1.05); + transform: scale(1.05); + } + + 70% { + -webkit-transform: scale(0.9); + -ms-transform: scale(0.9); + transform: scale(0.9); + } + + 100% { + opacity: 1; + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } } .bounceIn { - -webkit-animation-name: bounceIn; - animation-name: bounceIn; + -webkit-animation-name: bounceIn; + animation-name: bounceIn; } @-webkit-keyframes bounceInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } - 60% { - opacity: 1; - -webkit-transform: translateY(30px); - transform: translateY(30px); - } + 60% { + opacity: 1; + -webkit-transform: translateY(30px); + transform: translateY(30px); + } - 80% { - -webkit-transform: translateY(-10px); - transform: translateY(-10px); - } + 80% { + -webkit-transform: translateY(-10px); + transform: translateY(-10px); + } - 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } + 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } } @keyframes bounceInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateY(30px); - -ms-transform: translateY(30px); - transform: translateY(30px); - } - - 80% { - -webkit-transform: translateY(-10px); - -ms-transform: translateY(-10px); - transform: translateY(-10px); - } - - 100% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateY(30px); + -ms-transform: translateY(30px); + transform: translateY(30px); + } + + 80% { + -webkit-transform: translateY(-10px); + -ms-transform: translateY(-10px); + transform: translateY(-10px); + } + + 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } } .bounceInDown { - -webkit-animation-name: bounceInDown; - animation-name: bounceInDown; + -webkit-animation-name: bounceInDown; + animation-name: bounceInDown; } @-webkit-keyframes bounceInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } - 60% { - opacity: 1; - -webkit-transform: translateX(30px); - transform: translateX(30px); - } + 60% { + opacity: 1; + -webkit-transform: translateX(30px); + transform: translateX(30px); + } - 80% { - -webkit-transform: translateX(-10px); - transform: translateX(-10px); - } + 80% { + -webkit-transform: translateX(-10px); + transform: translateX(-10px); + } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } } @keyframes bounceInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateX(30px); - -ms-transform: translateX(30px); - transform: translateX(30px); - } - - 80% { - -webkit-transform: translateX(-10px); - -ms-transform: translateX(-10px); - transform: translateX(-10px); - } - - 100% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateX(30px); + -ms-transform: translateX(30px); + transform: translateX(30px); + } + + 80% { + -webkit-transform: translateX(-10px); + -ms-transform: translateX(-10px); + transform: translateX(-10px); + } + + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } } .bounceInLeft { - -webkit-animation-name: bounceInLeft; - animation-name: bounceInLeft; + -webkit-animation-name: bounceInLeft; + animation-name: bounceInLeft; } @-webkit-keyframes bounceInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } - 60% { - opacity: 1; - -webkit-transform: translateX(-30px); - transform: translateX(-30px); - } + 60% { + opacity: 1; + -webkit-transform: translateX(-30px); + transform: translateX(-30px); + } - 80% { - -webkit-transform: translateX(10px); - transform: translateX(10px); - } + 80% { + -webkit-transform: translateX(10px); + transform: translateX(10px); + } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } } @keyframes bounceInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateX(-30px); - -ms-transform: translateX(-30px); - transform: translateX(-30px); - } - - 80% { - -webkit-transform: translateX(10px); - -ms-transform: translateX(10px); - transform: translateX(10px); - } - - 100% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateX(-30px); + -ms-transform: translateX(-30px); + transform: translateX(-30px); + } + + 80% { + -webkit-transform: translateX(10px); + -ms-transform: translateX(10px); + transform: translateX(10px); + } + + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } } .bounceInRight { - -webkit-animation-name: bounceInRight; - animation-name: bounceInRight; + -webkit-animation-name: bounceInRight; + animation-name: bounceInRight; } @-webkit-keyframes bounceInUp { - 0% { - opacity: 0; - -webkit-transform: translateY(2000px); - transform: translateY(2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } - 60% { - opacity: 1; - -webkit-transform: translateY(-30px); - transform: translateY(-30px); - } + 60% { + opacity: 1; + -webkit-transform: translateY(-30px); + transform: translateY(-30px); + } - 80% { - -webkit-transform: translateY(10px); - transform: translateY(10px); - } + 80% { + -webkit-transform: translateY(10px); + transform: translateY(10px); + } - 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } + 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } } @keyframes bounceInUp { - 0% { - opacity: 0; - -webkit-transform: translateY(2000px); - -ms-transform: translateY(2000px); - transform: translateY(2000px); - } - - 60% { - opacity: 1; - -webkit-transform: translateY(-30px); - -ms-transform: translateY(-30px); - transform: translateY(-30px); - } - - 80% { - -webkit-transform: translateY(10px); - -ms-transform: translateY(10px); - transform: translateY(10px); - } - - 100% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateY(-30px); + -ms-transform: translateY(-30px); + transform: translateY(-30px); + } + + 80% { + -webkit-transform: translateY(10px); + -ms-transform: translateY(10px); + transform: translateY(10px); + } + + 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } } .bounceInUp { - -webkit-animation-name: bounceInUp; - animation-name: bounceInUp; + -webkit-animation-name: bounceInUp; + animation-name: bounceInUp; } @-webkit-keyframes bounceOut { - 0% { - -webkit-transform: scale(1); - transform: scale(1); - } + 0% { + -webkit-transform: scale(1); + transform: scale(1); + } - 25% { - -webkit-transform: scale(.95); - transform: scale(.95); - } + 25% { + -webkit-transform: scale(0.95); + transform: scale(0.95); + } - 50% { - opacity: 1; - -webkit-transform: scale(1.1); - transform: scale(1.1); - } + 50% { + opacity: 1; + -webkit-transform: scale(1.1); + transform: scale(1.1); + } - 100% { - opacity: 0; - -webkit-transform: scale(.3); - transform: scale(.3); - } + 100% { + opacity: 0; + -webkit-transform: scale(0.3); + transform: scale(0.3); + } } @keyframes bounceOut { - 0% { - -webkit-transform: scale(1); - -ms-transform: scale(1); - transform: scale(1); - } - - 25% { - -webkit-transform: scale(.95); - -ms-transform: scale(.95); - transform: scale(.95); - } - - 50% { - opacity: 1; - -webkit-transform: scale(1.1); - -ms-transform: scale(1.1); - transform: scale(1.1); - } - - 100% { - opacity: 0; - -webkit-transform: scale(.3); - -ms-transform: scale(.3); - transform: scale(.3); - } + 0% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + + 25% { + -webkit-transform: scale(0.95); + -ms-transform: scale(0.95); + transform: scale(0.95); + } + + 50% { + opacity: 1; + -webkit-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); + } + + 100% { + opacity: 0; + -webkit-transform: scale(0.3); + -ms-transform: scale(0.3); + transform: scale(0.3); + } } .bounceOut { - -webkit-animation-name: bounceOut; - animation-name: bounceOut; + -webkit-animation-name: bounceOut; + animation-name: bounceOut; } @-webkit-keyframes bounceOutDown { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } + 0% { + -webkit-transform: translateY(0); + transform: translateY(0); + } - 20% { - opacity: 1; - -webkit-transform: translateY(-20px); - transform: translateY(-20px); - } + 20% { + opacity: 1; + -webkit-transform: translateY(-20px); + transform: translateY(-20px); + } - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - transform: translateY(2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } } @keyframes bounceOutDown { - 0% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateY(-20px); - -ms-transform: translateY(-20px); - transform: translateY(-20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - -ms-transform: translateY(2000px); - transform: translateY(2000px); - } + 0% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateY(-20px); + -ms-transform: translateY(-20px); + transform: translateY(-20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } } .bounceOutDown { - -webkit-animation-name: bounceOutDown; - animation-name: bounceOutDown; + -webkit-animation-name: bounceOutDown; + animation-name: bounceOutDown; } @-webkit-keyframes bounceOutLeft { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } - 20% { - opacity: 1; - -webkit-transform: translateX(20px); - transform: translateX(20px); - } + 20% { + opacity: 1; + -webkit-transform: translateX(20px); + transform: translateX(20px); + } - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } } @keyframes bounceOutLeft { - 0% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateX(20px); - -ms-transform: translateX(20px); - transform: translateX(20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateX(20px); + -ms-transform: translateX(20px); + transform: translateX(20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } } .bounceOutLeft { - -webkit-animation-name: bounceOutLeft; - animation-name: bounceOutLeft; + -webkit-animation-name: bounceOutLeft; + animation-name: bounceOutLeft; } @-webkit-keyframes bounceOutRight { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } - 20% { - opacity: 1; - -webkit-transform: translateX(-20px); - transform: translateX(-20px); - } + 20% { + opacity: 1; + -webkit-transform: translateX(-20px); + transform: translateX(-20px); + } - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } } @keyframes bounceOutRight { - 0% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateX(-20px); - -ms-transform: translateX(-20px); - transform: translateX(-20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateX(-20px); + -ms-transform: translateX(-20px); + transform: translateX(-20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } } .bounceOutRight { - -webkit-animation-name: bounceOutRight; - animation-name: bounceOutRight; + -webkit-animation-name: bounceOutRight; + animation-name: bounceOutRight; } @-webkit-keyframes bounceOutUp { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } + 0% { + -webkit-transform: translateY(0); + transform: translateY(0); + } - 20% { - opacity: 1; - -webkit-transform: translateY(20px); - transform: translateY(20px); - } + 20% { + opacity: 1; + -webkit-transform: translateY(20px); + transform: translateY(20px); + } - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } } @keyframes bounceOutUp { - 0% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } - - 20% { - opacity: 1; - -webkit-transform: translateY(20px); - -ms-transform: translateY(20px); - transform: translateY(20px); - } - - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } + 0% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateY(20px); + -ms-transform: translateY(20px); + transform: translateY(20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } } .bounceOutUp { - -webkit-animation-name: bounceOutUp; - animation-name: bounceOutUp; + -webkit-animation-name: bounceOutUp; + animation-name: bounceOutUp; } @-webkit-keyframes fadeIn { - 0% { - opacity: 0; - } + 0% { + opacity: 0; + } - 100% { - opacity: 1; - } + 100% { + opacity: 1; + } } @keyframes fadeIn { - 0% { - opacity: 0; - } + 0% { + opacity: 0; + } - 100% { - opacity: 1; - } + 100% { + opacity: 1; + } } .fadeIn { - -webkit-animation-name: fadeIn; - animation-name: fadeIn; + -webkit-animation-name: fadeIn; + animation-name: fadeIn; } @-webkit-keyframes fadeInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-20px); - transform: translateY(-20px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(-20px); + transform: translateY(-20px); + } - 100% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } } @keyframes fadeInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-20px); - -ms-transform: translateY(-20px); - transform: translateY(-20px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(-20px); + -ms-transform: translateY(-20px); + transform: translateY(-20px); + } - 100% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } } .fadeInDown { - -webkit-animation-name: fadeInDown; - animation-name: fadeInDown; + -webkit-animation-name: fadeInDown; + animation-name: fadeInDown; } @-webkit-keyframes fadeInDownBig { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } - 100% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } } @keyframes fadeInDownBig { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } - 100% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } } .fadeInDownBig { - -webkit-animation-name: fadeInDownBig; - animation-name: fadeInDownBig; + -webkit-animation-name: fadeInDownBig; + animation-name: fadeInDownBig; } @-webkit-keyframes fadeInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-20px); - transform: translateX(-20px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(-20px); + transform: translateX(-20px); + } - 100% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } } @keyframes fadeInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-20px); - -ms-transform: translateX(-20px); - transform: translateX(-20px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(-20px); + -ms-transform: translateX(-20px); + transform: translateX(-20px); + } - 100% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } } .fadeInLeft { - -webkit-animation-name: fadeInLeft; - animation-name: fadeInLeft; + -webkit-animation-name: fadeInLeft; + animation-name: fadeInLeft; } @-webkit-keyframes fadeInLeftBig { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } - 100% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } } @keyframes fadeInLeftBig { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } - 100% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } } .fadeInLeftBig { - -webkit-animation-name: fadeInLeftBig; - animation-name: fadeInLeftBig; + -webkit-animation-name: fadeInLeftBig; + animation-name: fadeInLeftBig; } @-webkit-keyframes fadeInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(20px); - transform: translateX(20px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(20px); + transform: translateX(20px); + } - 100% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } } @keyframes fadeInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(20px); - -ms-transform: translateX(20px); - transform: translateX(20px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(20px); + -ms-transform: translateX(20px); + transform: translateX(20px); + } - 100% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } } .fadeInRight { - -webkit-animation-name: fadeInRight; - animation-name: fadeInRight; + -webkit-animation-name: fadeInRight; + animation-name: fadeInRight; } @-webkit-keyframes fadeInRightBig { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } - 100% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } } @keyframes fadeInRightBig { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } - 100% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } } .fadeInRightBig { - -webkit-animation-name: fadeInRightBig; - animation-name: fadeInRightBig; + -webkit-animation-name: fadeInRightBig; + animation-name: fadeInRightBig; } @-webkit-keyframes fadeInUp { - 0% { - opacity: 0; - -webkit-transform: translateY(20px); - transform: translateY(20px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + transform: translateY(20px); + } - 100% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } } @keyframes fadeInUp { - 0% { - opacity: 0; - -webkit-transform: translateY(20px); - -ms-transform: translateY(20px); - transform: translateY(20px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + -ms-transform: translateY(20px); + transform: translateY(20px); + } - 100% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } } .fadeInUp { - -webkit-animation-name: fadeInUp; - animation-name: fadeInUp; + -webkit-animation-name: fadeInUp; + animation-name: fadeInUp; } @-webkit-keyframes fadeInUpBig { - 0% { - opacity: 0; - -webkit-transform: translateY(2000px); - transform: translateY(2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } - 100% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } } @keyframes fadeInUpBig { - 0% { - opacity: 0; - -webkit-transform: translateY(2000px); - -ms-transform: translateY(2000px); - transform: translateY(2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } - 100% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } } .fadeInUpBig { - -webkit-animation-name: fadeInUpBig; - animation-name: fadeInUpBig; + -webkit-animation-name: fadeInUpBig; + animation-name: fadeInUpBig; } @-webkit-keyframes fadeOut { - 0% { - opacity: 1; - } + 0% { + opacity: 1; + } - 100% { - opacity: 0; - } + 100% { + opacity: 0; + } } @keyframes fadeOut { - 0% { - opacity: 1; - } + 0% { + opacity: 1; + } - 100% { - opacity: 0; - } + 100% { + opacity: 0; + } } .fadeOut { - -webkit-animation-name: fadeOut; - animation-name: fadeOut; + -webkit-animation-name: fadeOut; + animation-name: fadeOut; } @-webkit-keyframes fadeOutDown { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(20px); - transform: translateY(20px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(20px); + transform: translateY(20px); + } } @keyframes fadeOutDown { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(20px); - -ms-transform: translateY(20px); - transform: translateY(20px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(20px); + -ms-transform: translateY(20px); + transform: translateY(20px); + } } .fadeOutDown { - -webkit-animation-name: fadeOutDown; - animation-name: fadeOutDown; + -webkit-animation-name: fadeOutDown; + animation-name: fadeOutDown; } @-webkit-keyframes fadeOutDownBig { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - transform: translateY(2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } } @keyframes fadeOutDownBig { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - -ms-transform: translateY(2000px); - transform: translateY(2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } } .fadeOutDownBig { - -webkit-animation-name: fadeOutDownBig; - animation-name: fadeOutDownBig; + -webkit-animation-name: fadeOutDownBig; + animation-name: fadeOutDownBig; } @-webkit-keyframes fadeOutLeft { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(-20px); - transform: translateX(-20px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(-20px); + transform: translateX(-20px); + } } @keyframes fadeOutLeft { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(-20px); - -ms-transform: translateX(-20px); - transform: translateX(-20px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(-20px); + -ms-transform: translateX(-20px); + transform: translateX(-20px); + } } .fadeOutLeft { - -webkit-animation-name: fadeOutLeft; - animation-name: fadeOutLeft; + -webkit-animation-name: fadeOutLeft; + animation-name: fadeOutLeft; } @-webkit-keyframes fadeOutLeftBig { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } } @keyframes fadeOutLeftBig { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } } .fadeOutLeftBig { - -webkit-animation-name: fadeOutLeftBig; - animation-name: fadeOutLeftBig; + -webkit-animation-name: fadeOutLeftBig; + animation-name: fadeOutLeftBig; } @-webkit-keyframes fadeOutRight { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(20px); - transform: translateX(20px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(20px); + transform: translateX(20px); + } } @keyframes fadeOutRight { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(20px); - -ms-transform: translateX(20px); - transform: translateX(20px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(20px); + -ms-transform: translateX(20px); + transform: translateX(20px); + } } .fadeOutRight { - -webkit-animation-name: fadeOutRight; - animation-name: fadeOutRight; + -webkit-animation-name: fadeOutRight; + animation-name: fadeOutRight; } @-webkit-keyframes fadeOutRightBig { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - transform: translateX(0); - } + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } } @keyframes fadeOutRightBig { - 0% { - opacity: 1; - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } } .fadeOutRightBig { - -webkit-animation-name: fadeOutRightBig; - animation-name: fadeOutRightBig; + -webkit-animation-name: fadeOutRightBig; + animation-name: fadeOutRightBig; } @-webkit-keyframes fadeOutUp { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(-20px); - transform: translateY(-20px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(-20px); + transform: translateY(-20px); + } } @keyframes fadeOutUp { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(-20px); - -ms-transform: translateY(-20px); - transform: translateY(-20px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(-20px); + -ms-transform: translateY(-20px); + transform: translateY(-20px); + } } .fadeOutUp { - -webkit-animation-name: fadeOutUp; - animation-name: fadeOutUp; + -webkit-animation-name: fadeOutUp; + animation-name: fadeOutUp; } @-webkit-keyframes fadeOutUpBig { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - transform: translateY(0); - } + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } } @keyframes fadeOutUpBig { - 0% { - opacity: 1; - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } } .fadeOutUpBig { - -webkit-animation-name: fadeOutUpBig; - animation-name: fadeOutUpBig; + -webkit-animation-name: fadeOutUpBig; + animation-name: fadeOutUpBig; } @-webkit-keyframes flip { - 0% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); - transform: perspective(400px) translateZ(0) rotateY(0) scale(1); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 40% { - -webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); - transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 50% { - -webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); - transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 80% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); - transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 100% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); - transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } + 0% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 40% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg) + scale(1); + transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 50% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) + scale(1); + transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 80% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) + scale(0.95); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(0.95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 100% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } } @keyframes flip { - 0% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); - -ms-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); - transform: perspective(400px) translateZ(0) rotateY(0) scale(1); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 40% { - -webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); - -ms-transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); - transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; - } - - 50% { - -webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); - -ms-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); - transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 80% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); - -ms-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); - transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } - - 100% { - -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); - -ms-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); - transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; - } + 0% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + -ms-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 40% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg) + scale(1); + -ms-transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 50% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) + scale(1); + -ms-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 80% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) + scale(0.95); + -ms-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(0.95); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(0.95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 100% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + -ms-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } } .animated.flip { - -webkit-backface-visibility: visible; - -ms-backface-visibility: visible; - backface-visibility: visible; - -webkit-animation-name: flip; - animation-name: flip; + -webkit-backface-visibility: visible; + -ms-backface-visibility: visible; + backface-visibility: visible; + -webkit-animation-name: flip; + animation-name: flip; } @-webkit-keyframes flipInX { - 0% { - -webkit-transform: perspective(400px) rotateX(90deg); - transform: perspective(400px) rotateX(90deg); - opacity: 0; - } + 0% { + -webkit-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } - 40% { - -webkit-transform: perspective(400px) rotateX(-10deg); - transform: perspective(400px) rotateX(-10deg); - } + 40% { + -webkit-transform: perspective(400px) rotateX(-10deg); + transform: perspective(400px) rotateX(-10deg); + } - 70% { - -webkit-transform: perspective(400px) rotateX(10deg); - transform: perspective(400px) rotateX(10deg); - } + 70% { + -webkit-transform: perspective(400px) rotateX(10deg); + transform: perspective(400px) rotateX(10deg); + } - 100% { - -webkit-transform: perspective(400px) rotateX(0deg); - transform: perspective(400px) rotateX(0deg); - opacity: 1; - } + 100% { + -webkit-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } } @keyframes flipInX { - 0% { - -webkit-transform: perspective(400px) rotateX(90deg); - -ms-transform: perspective(400px) rotateX(90deg); - transform: perspective(400px) rotateX(90deg); - opacity: 0; - } - - 40% { - -webkit-transform: perspective(400px) rotateX(-10deg); - -ms-transform: perspective(400px) rotateX(-10deg); - transform: perspective(400px) rotateX(-10deg); - } - - 70% { - -webkit-transform: perspective(400px) rotateX(10deg); - -ms-transform: perspective(400px) rotateX(10deg); - transform: perspective(400px) rotateX(10deg); - } - - 100% { - -webkit-transform: perspective(400px) rotateX(0deg); - -ms-transform: perspective(400px) rotateX(0deg); - transform: perspective(400px) rotateX(0deg); - opacity: 1; - } + 0% { + -webkit-transform: perspective(400px) rotateX(90deg); + -ms-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotateX(-10deg); + -ms-transform: perspective(400px) rotateX(-10deg); + transform: perspective(400px) rotateX(-10deg); + } + + 70% { + -webkit-transform: perspective(400px) rotateX(10deg); + -ms-transform: perspective(400px) rotateX(10deg); + transform: perspective(400px) rotateX(10deg); + } + + 100% { + -webkit-transform: perspective(400px) rotateX(0deg); + -ms-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } } .flipInX { - -webkit-backface-visibility: visible !important; - -ms-backface-visibility: visible !important; - backface-visibility: visible !important; - -webkit-animation-name: flipInX; - animation-name: flipInX; + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipInX; + animation-name: flipInX; } @-webkit-keyframes flipInY { - 0% { - -webkit-transform: perspective(400px) rotateY(90deg); - transform: perspective(400px) rotateY(90deg); - opacity: 0; - } + 0% { + -webkit-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } - 40% { - -webkit-transform: perspective(400px) rotateY(-10deg); - transform: perspective(400px) rotateY(-10deg); - } + 40% { + -webkit-transform: perspective(400px) rotateY(-10deg); + transform: perspective(400px) rotateY(-10deg); + } - 70% { - -webkit-transform: perspective(400px) rotateY(10deg); - transform: perspective(400px) rotateY(10deg); - } + 70% { + -webkit-transform: perspective(400px) rotateY(10deg); + transform: perspective(400px) rotateY(10deg); + } - 100% { - -webkit-transform: perspective(400px) rotateY(0deg); - transform: perspective(400px) rotateY(0deg); - opacity: 1; - } + 100% { + -webkit-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } } @keyframes flipInY { - 0% { - -webkit-transform: perspective(400px) rotateY(90deg); - -ms-transform: perspective(400px) rotateY(90deg); - transform: perspective(400px) rotateY(90deg); - opacity: 0; - } - - 40% { - -webkit-transform: perspective(400px) rotateY(-10deg); - -ms-transform: perspective(400px) rotateY(-10deg); - transform: perspective(400px) rotateY(-10deg); - } - - 70% { - -webkit-transform: perspective(400px) rotateY(10deg); - -ms-transform: perspective(400px) rotateY(10deg); - transform: perspective(400px) rotateY(10deg); - } - - 100% { - -webkit-transform: perspective(400px) rotateY(0deg); - -ms-transform: perspective(400px) rotateY(0deg); - transform: perspective(400px) rotateY(0deg); - opacity: 1; - } + 0% { + -webkit-transform: perspective(400px) rotateY(90deg); + -ms-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotateY(-10deg); + -ms-transform: perspective(400px) rotateY(-10deg); + transform: perspective(400px) rotateY(-10deg); + } + + 70% { + -webkit-transform: perspective(400px) rotateY(10deg); + -ms-transform: perspective(400px) rotateY(10deg); + transform: perspective(400px) rotateY(10deg); + } + + 100% { + -webkit-transform: perspective(400px) rotateY(0deg); + -ms-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } } .flipInY { - -webkit-backface-visibility: visible !important; - -ms-backface-visibility: visible !important; - backface-visibility: visible !important; - -webkit-animation-name: flipInY; - animation-name: flipInY; + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipInY; + animation-name: flipInY; } @-webkit-keyframes flipOutX { - 0% { - -webkit-transform: perspective(400px) rotateX(0deg); - transform: perspective(400px) rotateX(0deg); - opacity: 1; - } + 0% { + -webkit-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } - 100% { - -webkit-transform: perspective(400px) rotateX(90deg); - transform: perspective(400px) rotateX(90deg); - opacity: 0; - } + 100% { + -webkit-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } } @keyframes flipOutX { - 0% { - -webkit-transform: perspective(400px) rotateX(0deg); - -ms-transform: perspective(400px) rotateX(0deg); - transform: perspective(400px) rotateX(0deg); - opacity: 1; - } + 0% { + -webkit-transform: perspective(400px) rotateX(0deg); + -ms-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } - 100% { - -webkit-transform: perspective(400px) rotateX(90deg); - -ms-transform: perspective(400px) rotateX(90deg); - transform: perspective(400px) rotateX(90deg); - opacity: 0; - } + 100% { + -webkit-transform: perspective(400px) rotateX(90deg); + -ms-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } } .flipOutX { - -webkit-animation-name: flipOutX; - animation-name: flipOutX; - -webkit-backface-visibility: visible !important; - -ms-backface-visibility: visible !important; - backface-visibility: visible !important; + -webkit-animation-name: flipOutX; + animation-name: flipOutX; + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; } @-webkit-keyframes flipOutY { - 0% { - -webkit-transform: perspective(400px) rotateY(0deg); - transform: perspective(400px) rotateY(0deg); - opacity: 1; - } + 0% { + -webkit-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } - 100% { - -webkit-transform: perspective(400px) rotateY(90deg); - transform: perspective(400px) rotateY(90deg); - opacity: 0; - } + 100% { + -webkit-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } } @keyframes flipOutY { - 0% { - -webkit-transform: perspective(400px) rotateY(0deg); - -ms-transform: perspective(400px) rotateY(0deg); - transform: perspective(400px) rotateY(0deg); - opacity: 1; - } + 0% { + -webkit-transform: perspective(400px) rotateY(0deg); + -ms-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } - 100% { - -webkit-transform: perspective(400px) rotateY(90deg); - -ms-transform: perspective(400px) rotateY(90deg); - transform: perspective(400px) rotateY(90deg); - opacity: 0; - } + 100% { + -webkit-transform: perspective(400px) rotateY(90deg); + -ms-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } } .flipOutY { - -webkit-backface-visibility: visible !important; - -ms-backface-visibility: visible !important; - backface-visibility: visible !important; - -webkit-animation-name: flipOutY; - animation-name: flipOutY; + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipOutY; + animation-name: flipOutY; } @-webkit-keyframes lightSpeedIn { - 0% { - -webkit-transform: translateX(100%) skewX(-30deg); - transform: translateX(100%) skewX(-30deg); - opacity: 0; - } - - 60% { - -webkit-transform: translateX(-20%) skewX(30deg); - transform: translateX(-20%) skewX(30deg); - opacity: 1; - } - - 80% { - -webkit-transform: translateX(0%) skewX(-15deg); - transform: translateX(0%) skewX(-15deg); - opacity: 1; - } - - 100% { - -webkit-transform: translateX(0%) skewX(0deg); - transform: translateX(0%) skewX(0deg); - opacity: 1; - } + 0% { + -webkit-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } + + 60% { + -webkit-transform: translateX(-20%) skewX(30deg); + transform: translateX(-20%) skewX(30deg); + opacity: 1; + } + + 80% { + -webkit-transform: translateX(0%) skewX(-15deg); + transform: translateX(0%) skewX(-15deg); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } } @keyframes lightSpeedIn { - 0% { - -webkit-transform: translateX(100%) skewX(-30deg); - -ms-transform: translateX(100%) skewX(-30deg); - transform: translateX(100%) skewX(-30deg); - opacity: 0; - } - - 60% { - -webkit-transform: translateX(-20%) skewX(30deg); - -ms-transform: translateX(-20%) skewX(30deg); - transform: translateX(-20%) skewX(30deg); - opacity: 1; - } - - 80% { - -webkit-transform: translateX(0%) skewX(-15deg); - -ms-transform: translateX(0%) skewX(-15deg); - transform: translateX(0%) skewX(-15deg); - opacity: 1; - } - - 100% { - -webkit-transform: translateX(0%) skewX(0deg); - -ms-transform: translateX(0%) skewX(0deg); - transform: translateX(0%) skewX(0deg); - opacity: 1; - } + 0% { + -webkit-transform: translateX(100%) skewX(-30deg); + -ms-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } + + 60% { + -webkit-transform: translateX(-20%) skewX(30deg); + -ms-transform: translateX(-20%) skewX(30deg); + transform: translateX(-20%) skewX(30deg); + opacity: 1; + } + + 80% { + -webkit-transform: translateX(0%) skewX(-15deg); + -ms-transform: translateX(0%) skewX(-15deg); + transform: translateX(0%) skewX(-15deg); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(0%) skewX(0deg); + -ms-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } } .lightSpeedIn { - -webkit-animation-name: lightSpeedIn; - animation-name: lightSpeedIn; - -webkit-animation-timing-function: ease-out; - animation-timing-function: ease-out; + -webkit-animation-name: lightSpeedIn; + animation-name: lightSpeedIn; + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; } @-webkit-keyframes lightSpeedOut { - 0% { - -webkit-transform: translateX(0%) skewX(0deg); - transform: translateX(0%) skewX(0deg); - opacity: 1; - } + 0% { + -webkit-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } - 100% { - -webkit-transform: translateX(100%) skewX(-30deg); - transform: translateX(100%) skewX(-30deg); - opacity: 0; - } + 100% { + -webkit-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } } @keyframes lightSpeedOut { - 0% { - -webkit-transform: translateX(0%) skewX(0deg); - -ms-transform: translateX(0%) skewX(0deg); - transform: translateX(0%) skewX(0deg); - opacity: 1; - } + 0% { + -webkit-transform: translateX(0%) skewX(0deg); + -ms-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } - 100% { - -webkit-transform: translateX(100%) skewX(-30deg); - -ms-transform: translateX(100%) skewX(-30deg); - transform: translateX(100%) skewX(-30deg); - opacity: 0; - } + 100% { + -webkit-transform: translateX(100%) skewX(-30deg); + -ms-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } } .lightSpeedOut { - -webkit-animation-name: lightSpeedOut; - animation-name: lightSpeedOut; - -webkit-animation-timing-function: ease-in; - animation-timing-function: ease-in; + -webkit-animation-name: lightSpeedOut; + animation-name: lightSpeedOut; + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; } @-webkit-keyframes rotateIn { - 0% { - -webkit-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(-200deg); - transform: rotate(-200deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } + 0% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(-200deg); + transform: rotate(-200deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } } @keyframes rotateIn { - 0% { - -webkit-transform-origin: center center; - -ms-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(-200deg); - -ms-transform: rotate(-200deg); - transform: rotate(-200deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: center center; - -ms-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } + 0% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(-200deg); + -ms-transform: rotate(-200deg); + transform: rotate(-200deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } } .rotateIn { - -webkit-animation-name: rotateIn; - animation-name: rotateIn; + -webkit-animation-name: rotateIn; + animation-name: rotateIn; } @-webkit-keyframes rotateInDownLeft { - 0% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } } @keyframes rotateInDownLeft { - 0% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(-90deg); - -ms-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } } .rotateInDownLeft { - -webkit-animation-name: rotateInDownLeft; - animation-name: rotateInDownLeft; + -webkit-animation-name: rotateInDownLeft; + animation-name: rotateInDownLeft; } @-webkit-keyframes rotateInDownRight { - 0% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } } @keyframes rotateInDownRight { - 0% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } } .rotateInDownRight { - -webkit-animation-name: rotateInDownRight; - animation-name: rotateInDownRight; + -webkit-animation-name: rotateInDownRight; + animation-name: rotateInDownRight; } @-webkit-keyframes rotateInUpLeft { - 0% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } } @keyframes rotateInUpLeft { - 0% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } } .rotateInUpLeft { - -webkit-animation-name: rotateInUpLeft; - animation-name: rotateInUpLeft; + -webkit-animation-name: rotateInUpLeft; + animation-name: rotateInUpLeft; } @-webkit-keyframes rotateInUpRight { - 0% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } } @keyframes rotateInUpRight { - 0% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(-90deg); - -ms-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } - - 100% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } } .rotateInUpRight { - -webkit-animation-name: rotateInUpRight; - animation-name: rotateInUpRight; + -webkit-animation-name: rotateInUpRight; + animation-name: rotateInUpRight; } @-webkit-keyframes rotateOut { - 0% { - -webkit-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(200deg); - transform: rotate(200deg); - opacity: 0; - } + 0% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(200deg); + transform: rotate(200deg); + opacity: 0; + } } @keyframes rotateOut { - 0% { - -webkit-transform-origin: center center; - -ms-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: center center; - -ms-transform-origin: center center; - transform-origin: center center; - -webkit-transform: rotate(200deg); - -ms-transform: rotate(200deg); - transform: rotate(200deg); - opacity: 0; - } + 0% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(200deg); + -ms-transform: rotate(200deg); + transform: rotate(200deg); + opacity: 0; + } } .rotateOut { - -webkit-animation-name: rotateOut; - animation-name: rotateOut; + -webkit-animation-name: rotateOut; + animation-name: rotateOut; } @-webkit-keyframes rotateOutDownLeft { - 0% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } } @keyframes rotateOutDownLeft { - 0% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } } .rotateOutDownLeft { - -webkit-animation-name: rotateOutDownLeft; - animation-name: rotateOutDownLeft; + -webkit-animation-name: rotateOutDownLeft; + animation-name: rotateOutDownLeft; } @-webkit-keyframes rotateOutDownRight { - 0% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } } @keyframes rotateOutDownRight { - 0% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(-90deg); - -ms-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } } .rotateOutDownRight { - -webkit-animation-name: rotateOutDownRight; - animation-name: rotateOutDownRight; + -webkit-animation-name: rotateOutDownRight; + animation-name: rotateOutDownRight; } @-webkit-keyframes rotateOutUpLeft { - 0% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } } @keyframes rotateOutUpLeft { - 0% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: left bottom; - -ms-transform-origin: left bottom; - transform-origin: left bottom; - -webkit-transform: rotate(-90deg); - -ms-transform: rotate(-90deg); - transform: rotate(-90deg); - opacity: 0; - } + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } } .rotateOutUpLeft { - -webkit-animation-name: rotateOutUpLeft; - animation-name: rotateOutUpLeft; + -webkit-animation-name: rotateOutUpLeft; + animation-name: rotateOutUpLeft; } @-webkit-keyframes rotateOutUpRight { - 0% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } } @keyframes rotateOutUpRight { - 0% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - opacity: 1; - } - - 100% { - -webkit-transform-origin: right bottom; - -ms-transform-origin: right bottom; - transform-origin: right bottom; - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); - opacity: 0; - } + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } } .rotateOutUpRight { - -webkit-animation-name: rotateOutUpRight; - animation-name: rotateOutUpRight; + -webkit-animation-name: rotateOutUpRight; + animation-name: rotateOutUpRight; } @-webkit-keyframes slideInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } - 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } + 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } } @keyframes slideInDown { - 0% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } - 100% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } } .slideInDown { - -webkit-animation-name: slideInDown; - animation-name: slideInDown; + -webkit-animation-name: slideInDown; + animation-name: slideInDown; } @-webkit-keyframes slideInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } } @keyframes slideInLeft { - 0% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } - 100% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } } .slideInLeft { - -webkit-animation-name: slideInLeft; - animation-name: slideInLeft; + -webkit-animation-name: slideInLeft; + animation-name: slideInLeft; } @-webkit-keyframes slideInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } } @keyframes slideInRight { - 0% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } - 100% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } } .slideInRight { - -webkit-animation-name: slideInRight; - animation-name: slideInRight; + -webkit-animation-name: slideInRight; + animation-name: slideInRight; } @-webkit-keyframes slideOutLeft { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - transform: translateX(-2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } } @keyframes slideOutLeft { - 0% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(-2000px); - -ms-transform: translateX(-2000px); - transform: translateX(-2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } } .slideOutLeft { - -webkit-animation-name: slideOutLeft; - animation-name: slideOutLeft; + -webkit-animation-name: slideOutLeft; + animation-name: slideOutLeft; } @-webkit-keyframes slideOutRight { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - transform: translateX(2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } } @keyframes slideOutRight { - 0% { - -webkit-transform: translateX(0); - -ms-transform: translateX(0); - transform: translateX(0); - } + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } - 100% { - opacity: 0; - -webkit-transform: translateX(2000px); - -ms-transform: translateX(2000px); - transform: translateX(2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } } .slideOutRight { - -webkit-animation-name: slideOutRight; - animation-name: slideOutRight; + -webkit-animation-name: slideOutRight; + animation-name: slideOutRight; } @-webkit-keyframes slideOutUp { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } + 0% { + -webkit-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - transform: translateY(-2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } } @keyframes slideOutUp { - 0% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 0% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(-2000px); - -ms-transform: translateY(-2000px); - transform: translateY(-2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } } .slideOutUp { - -webkit-animation-name: slideOutUp; - animation-name: slideOutUp; + -webkit-animation-name: slideOutUp; + animation-name: slideOutUp; } @-webkit-keyframes slideOutDown { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } + 0% { + -webkit-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - transform: translateY(2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } } @keyframes slideOutDown { - 0% { - -webkit-transform: translateY(0); - -ms-transform: translateY(0); - transform: translateY(0); - } + 0% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } - 100% { - opacity: 0; - -webkit-transform: translateY(2000px); - -ms-transform: translateY(2000px); - transform: translateY(2000px); - } + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } } .slideOutDown { - -webkit-animation-name: slideOutDown; - animation-name: slideOutDown; + -webkit-animation-name: slideOutDown; + animation-name: slideOutDown; } @-webkit-keyframes hinge { - 0% { - -webkit-transform: rotate(0); - transform: rotate(0); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 20%, 60% { - -webkit-transform: rotate(80deg); - transform: rotate(80deg); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 40% { - -webkit-transform: rotate(60deg); - transform: rotate(60deg); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 80% { - -webkit-transform: rotate(60deg) translateY(0); - transform: rotate(60deg) translateY(0); - -webkit-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - opacity: 1; - } - - 100% { - -webkit-transform: translateY(700px); - transform: translateY(700px); - opacity: 0; - } + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 20%, + 60% { + -webkit-transform: rotate(80deg); + transform: rotate(80deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 40% { + -webkit-transform: rotate(60deg); + transform: rotate(60deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 80% { + -webkit-transform: rotate(60deg) translateY(0); + transform: rotate(60deg) translateY(0); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + opacity: 1; + } + + 100% { + -webkit-transform: translateY(700px); + transform: translateY(700px); + opacity: 0; + } } @keyframes hinge { - 0% { - -webkit-transform: rotate(0); - -ms-transform: rotate(0); - transform: rotate(0); - -webkit-transform-origin: top left; - -ms-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 20%, 60% { - -webkit-transform: rotate(80deg); - -ms-transform: rotate(80deg); - transform: rotate(80deg); - -webkit-transform-origin: top left; - -ms-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 40% { - -webkit-transform: rotate(60deg); - -ms-transform: rotate(60deg); - transform: rotate(60deg); - -webkit-transform-origin: top left; - -ms-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - } - - 80% { - -webkit-transform: rotate(60deg) translateY(0); - -ms-transform: rotate(60deg) translateY(0); - transform: rotate(60deg) translateY(0); - -webkit-transform-origin: top left; - -ms-transform-origin: top left; - transform-origin: top left; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - opacity: 1; - } - - 100% { - -webkit-transform: translateY(700px); - -ms-transform: translateY(700px); - transform: translateY(700px); - opacity: 0; - } + 0% { + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 20%, + 60% { + -webkit-transform: rotate(80deg); + -ms-transform: rotate(80deg); + transform: rotate(80deg); + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 40% { + -webkit-transform: rotate(60deg); + -ms-transform: rotate(60deg); + transform: rotate(60deg); + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 80% { + -webkit-transform: rotate(60deg) translateY(0); + -ms-transform: rotate(60deg) translateY(0); + transform: rotate(60deg) translateY(0); + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + opacity: 1; + } + + 100% { + -webkit-transform: translateY(700px); + -ms-transform: translateY(700px); + transform: translateY(700px); + opacity: 0; + } } .hinge { - -webkit-animation-name: hinge; - animation-name: hinge; + -webkit-animation-name: hinge; + animation-name: hinge; } /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ @-webkit-keyframes rollIn { - 0% { - opacity: 0; - -webkit-transform: translateX(-100%) rotate(-120deg); - transform: translateX(-100%) rotate(-120deg); - } + 0% { + opacity: 0; + -webkit-transform: translateX(-100%) rotate(-120deg); + transform: translateX(-100%) rotate(-120deg); + } - 100% { - opacity: 1; - -webkit-transform: translateX(0px) rotate(0deg); - transform: translateX(0px) rotate(0deg); - } + 100% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } } @keyframes rollIn { - 0% { - opacity: 0; - -webkit-transform: translateX(-100%) rotate(-120deg); - -ms-transform: translateX(-100%) rotate(-120deg); - transform: translateX(-100%) rotate(-120deg); - } + 0% { + opacity: 0; + -webkit-transform: translateX(-100%) rotate(-120deg); + -ms-transform: translateX(-100%) rotate(-120deg); + transform: translateX(-100%) rotate(-120deg); + } - 100% { - opacity: 1; - -webkit-transform: translateX(0px) rotate(0deg); - -ms-transform: translateX(0px) rotate(0deg); - transform: translateX(0px) rotate(0deg); - } + 100% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + -ms-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } } .rollIn { - -webkit-animation-name: rollIn; - animation-name: rollIn; + -webkit-animation-name: rollIn; + animation-name: rollIn; } /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ @-webkit-keyframes rollOut { - 0% { - opacity: 1; - -webkit-transform: translateX(0px) rotate(0deg); - transform: translateX(0px) rotate(0deg); - } + 0% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } - 100% { - opacity: 0; - -webkit-transform: translateX(100%) rotate(120deg); - transform: translateX(100%) rotate(120deg); - } + 100% { + opacity: 0; + -webkit-transform: translateX(100%) rotate(120deg); + transform: translateX(100%) rotate(120deg); + } } @keyframes rollOut { - 0% { - opacity: 1; - -webkit-transform: translateX(0px) rotate(0deg); - -ms-transform: translateX(0px) rotate(0deg); - transform: translateX(0px) rotate(0deg); - } + 0% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + -ms-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } - 100% { - opacity: 0; - -webkit-transform: translateX(100%) rotate(120deg); - -ms-transform: translateX(100%) rotate(120deg); - transform: translateX(100%) rotate(120deg); - } + 100% { + opacity: 0; + -webkit-transform: translateX(100%) rotate(120deg); + -ms-transform: translateX(100%) rotate(120deg); + transform: translateX(100%) rotate(120deg); + } } .rollOut { - -webkit-animation-name: rollOut; - animation-name: rollOut; -} \ No newline at end of file + -webkit-animation-name: rollOut; + animation-name: rollOut; +} diff --git a/docs/src/css/less/app-overrides.less b/docs/src/css/less/app-overrides.less index 0f82d8b2..7d8236bf 100644 --- a/docs/src/css/less/app-overrides.less +++ b/docs/src/css/less/app-overrides.less @@ -1,10 +1,10 @@ -.com_mtnewswires_livebriefs{ - footer{ +.com_mtnewswires_livebriefs { + footer { min-height: 0px; - height: 33px; - line-height: 30px; - font-size: 11px; - vertical-align: middle; - padding-left: 5px; + height: 33px; + line-height: 30px; + font-size: 11px; + vertical-align: middle; + padding-left: 5px; } -} \ No newline at end of file +} diff --git a/docs/src/css/less/examples.less b/docs/src/css/less/examples.less index 4a12aabe..0cf28748 100644 --- a/docs/src/css/less/examples.less +++ b/docs/src/css/less/examples.less @@ -1,15 +1,15 @@ .examples { - .aboutbox { .container { text-align: left; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { padding-top: 60px; } } - h1, h5 { + h1, + h5 { .font-bold(); } @@ -17,7 +17,7 @@ padding-top: 20px; padding-bottom: 40px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { padding-top: 40px; } @@ -25,7 +25,7 @@ font-size: 18px; font-family: @font-family-sans-serif-thin; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { font-size: 23px; line-height: 1.6; } @@ -53,7 +53,6 @@ } .examples-container { - p { font-size: 15px; } @@ -110,6 +109,5 @@ .font-bold(); } - @import "jquery-ui.less"; - + @import 'jquery-ui.less'; } diff --git a/docs/src/css/less/fontawesome/bordered-pulled.less b/docs/src/css/less/fontawesome/bordered-pulled.less index 0c90eb56..6a43f2dc 100644 --- a/docs/src/css/less/fontawesome/bordered-pulled.less +++ b/docs/src/css/less/fontawesome/bordered-pulled.less @@ -2,15 +2,23 @@ // ------------------------- .@{fa-css-prefix}-border { - padding: .2em .25em .15em; - border: solid .08em @fa-border-color; - border-radius: .1em; + padding: 0.2em 0.25em 0.15em; + border: solid 0.08em @fa-border-color; + border-radius: 0.1em; } -.pull-right { float: right; } -.pull-left { float: left; } +.pull-right { + float: right; +} +.pull-left { + float: left; +} .@{fa-css-prefix} { - &.pull-left { margin-right: .3em; } - &.pull-right { margin-left: .3em; } + &.pull-left { + margin-right: 0.3em; + } + &.pull-right { + margin-left: 0.3em; + } } diff --git a/docs/src/css/less/fontawesome/core.less b/docs/src/css/less/fontawesome/core.less index 6d223bc2..440e0acc 100644 --- a/docs/src/css/less/fontawesome/core.less +++ b/docs/src/css/less/fontawesome/core.less @@ -2,11 +2,11 @@ // ------------------------- .@{fa-css-prefix} { - display: inline-block; - font-family: FontAwesome; - font-style: normal; - font-weight: normal; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + display: inline-block; + font-family: FontAwesome; + font-style: normal; + font-weight: normal; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } diff --git a/docs/src/css/less/fontawesome/fixed-width.less b/docs/src/css/less/fontawesome/fixed-width.less index 110289f2..678865b4 100644 --- a/docs/src/css/less/fontawesome/fixed-width.less +++ b/docs/src/css/less/fontawesome/fixed-width.less @@ -1,6 +1,6 @@ // Fixed Width Icons // ------------------------- .@{fa-css-prefix}-fw { - width: (18em / 14); - text-align: center; + width: (18em / 14); + text-align: center; } diff --git a/docs/src/css/less/fontawesome/font-awesome.less b/docs/src/css/less/fontawesome/font-awesome.less index 50cbcac4..739a8edc 100644 --- a/docs/src/css/less/fontawesome/font-awesome.less +++ b/docs/src/css/less/fontawesome/font-awesome.less @@ -3,15 +3,15 @@ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) */ -@import "variables.less"; -@import "mixins.less"; -@import "path.less"; -@import "core.less"; -@import "larger.less"; -@import "fixed-width.less"; -@import "list.less"; -@import "bordered-pulled.less"; -@import "spinning.less"; -@import "rotated-flipped.less"; -@import "stacked.less"; -@import "icons.less"; +@import 'variables.less'; +@import 'mixins.less'; +@import 'path.less'; +@import 'core.less'; +@import 'larger.less'; +@import 'fixed-width.less'; +@import 'list.less'; +@import 'bordered-pulled.less'; +@import 'spinning.less'; +@import 'rotated-flipped.less'; +@import 'stacked.less'; +@import 'icons.less'; diff --git a/docs/src/css/less/fontawesome/icons.less b/docs/src/css/less/fontawesome/icons.less index 13d8c685..70f2d67c 100644 --- a/docs/src/css/less/fontawesome/icons.less +++ b/docs/src/css/less/fontawesome/icons.less @@ -1,506 +1,1384 @@ /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ -.@{fa-css-prefix}-glass:before { content: @fa-var-glass; } -.@{fa-css-prefix}-music:before { content: @fa-var-music; } -.@{fa-css-prefix}-search:before { content: @fa-var-search; } -.@{fa-css-prefix}-envelope-o:before { content: @fa-var-envelope-o; } -.@{fa-css-prefix}-heart:before { content: @fa-var-heart; } -.@{fa-css-prefix}-star:before { content: @fa-var-star; } -.@{fa-css-prefix}-star-o:before { content: @fa-var-star-o; } -.@{fa-css-prefix}-user:before { content: @fa-var-user; } -.@{fa-css-prefix}-film:before { content: @fa-var-film; } -.@{fa-css-prefix}-th-large:before { content: @fa-var-th-large; } -.@{fa-css-prefix}-th:before { content: @fa-var-th; } -.@{fa-css-prefix}-th-list:before { content: @fa-var-th-list; } -.@{fa-css-prefix}-check:before { content: @fa-var-check; } -.@{fa-css-prefix}-times:before { content: @fa-var-times; } -.@{fa-css-prefix}-search-plus:before { content: @fa-var-search-plus; } -.@{fa-css-prefix}-search-minus:before { content: @fa-var-search-minus; } -.@{fa-css-prefix}-power-off:before { content: @fa-var-power-off; } -.@{fa-css-prefix}-signal:before { content: @fa-var-signal; } +.@{fa-css-prefix}-glass:before { + content: @fa-var-glass; +} +.@{fa-css-prefix}-music:before { + content: @fa-var-music; +} +.@{fa-css-prefix}-search:before { + content: @fa-var-search; +} +.@{fa-css-prefix}-envelope-o:before { + content: @fa-var-envelope-o; +} +.@{fa-css-prefix}-heart:before { + content: @fa-var-heart; +} +.@{fa-css-prefix}-star:before { + content: @fa-var-star; +} +.@{fa-css-prefix}-star-o:before { + content: @fa-var-star-o; +} +.@{fa-css-prefix}-user:before { + content: @fa-var-user; +} +.@{fa-css-prefix}-film:before { + content: @fa-var-film; +} +.@{fa-css-prefix}-th-large:before { + content: @fa-var-th-large; +} +.@{fa-css-prefix}-th:before { + content: @fa-var-th; +} +.@{fa-css-prefix}-th-list:before { + content: @fa-var-th-list; +} +.@{fa-css-prefix}-check:before { + content: @fa-var-check; +} +.@{fa-css-prefix}-times:before { + content: @fa-var-times; +} +.@{fa-css-prefix}-search-plus:before { + content: @fa-var-search-plus; +} +.@{fa-css-prefix}-search-minus:before { + content: @fa-var-search-minus; +} +.@{fa-css-prefix}-power-off:before { + content: @fa-var-power-off; +} +.@{fa-css-prefix}-signal:before { + content: @fa-var-signal; +} .@{fa-css-prefix}-gear:before, -.@{fa-css-prefix}-cog:before { content: @fa-var-cog; } -.@{fa-css-prefix}-trash-o:before { content: @fa-var-trash-o; } -.@{fa-css-prefix}-home:before { content: @fa-var-home; } -.@{fa-css-prefix}-file-o:before { content: @fa-var-file-o; } -.@{fa-css-prefix}-clock-o:before { content: @fa-var-clock-o; } -.@{fa-css-prefix}-road:before { content: @fa-var-road; } -.@{fa-css-prefix}-download:before { content: @fa-var-download; } -.@{fa-css-prefix}-arrow-circle-o-down:before { content: @fa-var-arrow-circle-o-down; } -.@{fa-css-prefix}-arrow-circle-o-up:before { content: @fa-var-arrow-circle-o-up; } -.@{fa-css-prefix}-inbox:before { content: @fa-var-inbox; } -.@{fa-css-prefix}-play-circle-o:before { content: @fa-var-play-circle-o; } +.@{fa-css-prefix}-cog:before { + content: @fa-var-cog; +} +.@{fa-css-prefix}-trash-o:before { + content: @fa-var-trash-o; +} +.@{fa-css-prefix}-home:before { + content: @fa-var-home; +} +.@{fa-css-prefix}-file-o:before { + content: @fa-var-file-o; +} +.@{fa-css-prefix}-clock-o:before { + content: @fa-var-clock-o; +} +.@{fa-css-prefix}-road:before { + content: @fa-var-road; +} +.@{fa-css-prefix}-download:before { + content: @fa-var-download; +} +.@{fa-css-prefix}-arrow-circle-o-down:before { + content: @fa-var-arrow-circle-o-down; +} +.@{fa-css-prefix}-arrow-circle-o-up:before { + content: @fa-var-arrow-circle-o-up; +} +.@{fa-css-prefix}-inbox:before { + content: @fa-var-inbox; +} +.@{fa-css-prefix}-play-circle-o:before { + content: @fa-var-play-circle-o; +} .@{fa-css-prefix}-rotate-right:before, -.@{fa-css-prefix}-repeat:before { content: @fa-var-repeat; } -.@{fa-css-prefix}-refresh:before { content: @fa-var-refresh; } -.@{fa-css-prefix}-list-alt:before { content: @fa-var-list-alt; } -.@{fa-css-prefix}-lock:before { content: @fa-var-lock; } -.@{fa-css-prefix}-flag:before { content: @fa-var-flag; } -.@{fa-css-prefix}-headphones:before { content: @fa-var-headphones; } -.@{fa-css-prefix}-volume-off:before { content: @fa-var-volume-off; } -.@{fa-css-prefix}-volume-down:before { content: @fa-var-volume-down; } -.@{fa-css-prefix}-volume-up:before { content: @fa-var-volume-up; } -.@{fa-css-prefix}-qrcode:before { content: @fa-var-qrcode; } -.@{fa-css-prefix}-barcode:before { content: @fa-var-barcode; } -.@{fa-css-prefix}-tag:before { content: @fa-var-tag; } -.@{fa-css-prefix}-tags:before { content: @fa-var-tags; } -.@{fa-css-prefix}-book:before { content: @fa-var-book; } -.@{fa-css-prefix}-bookmark:before { content: @fa-var-bookmark; } -.@{fa-css-prefix}-print:before { content: @fa-var-print; } -.@{fa-css-prefix}-camera:before { content: @fa-var-camera; } -.@{fa-css-prefix}-font:before { content: @fa-var-font; } -.@{fa-css-prefix}-bold:before { content: @fa-var-bold; } -.@{fa-css-prefix}-italic:before { content: @fa-var-italic; } -.@{fa-css-prefix}-text-height:before { content: @fa-var-text-height; } -.@{fa-css-prefix}-text-width:before { content: @fa-var-text-width; } -.@{fa-css-prefix}-align-left:before { content: @fa-var-align-left; } -.@{fa-css-prefix}-align-center:before { content: @fa-var-align-center; } -.@{fa-css-prefix}-align-right:before { content: @fa-var-align-right; } -.@{fa-css-prefix}-align-justify:before { content: @fa-var-align-justify; } -.@{fa-css-prefix}-list:before { content: @fa-var-list; } +.@{fa-css-prefix}-repeat:before { + content: @fa-var-repeat; +} +.@{fa-css-prefix}-refresh:before { + content: @fa-var-refresh; +} +.@{fa-css-prefix}-list-alt:before { + content: @fa-var-list-alt; +} +.@{fa-css-prefix}-lock:before { + content: @fa-var-lock; +} +.@{fa-css-prefix}-flag:before { + content: @fa-var-flag; +} +.@{fa-css-prefix}-headphones:before { + content: @fa-var-headphones; +} +.@{fa-css-prefix}-volume-off:before { + content: @fa-var-volume-off; +} +.@{fa-css-prefix}-volume-down:before { + content: @fa-var-volume-down; +} +.@{fa-css-prefix}-volume-up:before { + content: @fa-var-volume-up; +} +.@{fa-css-prefix}-qrcode:before { + content: @fa-var-qrcode; +} +.@{fa-css-prefix}-barcode:before { + content: @fa-var-barcode; +} +.@{fa-css-prefix}-tag:before { + content: @fa-var-tag; +} +.@{fa-css-prefix}-tags:before { + content: @fa-var-tags; +} +.@{fa-css-prefix}-book:before { + content: @fa-var-book; +} +.@{fa-css-prefix}-bookmark:before { + content: @fa-var-bookmark; +} +.@{fa-css-prefix}-print:before { + content: @fa-var-print; +} +.@{fa-css-prefix}-camera:before { + content: @fa-var-camera; +} +.@{fa-css-prefix}-font:before { + content: @fa-var-font; +} +.@{fa-css-prefix}-bold:before { + content: @fa-var-bold; +} +.@{fa-css-prefix}-italic:before { + content: @fa-var-italic; +} +.@{fa-css-prefix}-text-height:before { + content: @fa-var-text-height; +} +.@{fa-css-prefix}-text-width:before { + content: @fa-var-text-width; +} +.@{fa-css-prefix}-align-left:before { + content: @fa-var-align-left; +} +.@{fa-css-prefix}-align-center:before { + content: @fa-var-align-center; +} +.@{fa-css-prefix}-align-right:before { + content: @fa-var-align-right; +} +.@{fa-css-prefix}-align-justify:before { + content: @fa-var-align-justify; +} +.@{fa-css-prefix}-list:before { + content: @fa-var-list; +} .@{fa-css-prefix}-dedent:before, -.@{fa-css-prefix}-outdent:before { content: @fa-var-outdent; } -.@{fa-css-prefix}-indent:before { content: @fa-var-indent; } -.@{fa-css-prefix}-video-camera:before { content: @fa-var-video-camera; } +.@{fa-css-prefix}-outdent:before { + content: @fa-var-outdent; +} +.@{fa-css-prefix}-indent:before { + content: @fa-var-indent; +} +.@{fa-css-prefix}-video-camera:before { + content: @fa-var-video-camera; +} .@{fa-css-prefix}-photo:before, .@{fa-css-prefix}-image:before, -.@{fa-css-prefix}-picture-o:before { content: @fa-var-picture-o; } -.@{fa-css-prefix}-pencil:before { content: @fa-var-pencil; } -.@{fa-css-prefix}-map-marker:before { content: @fa-var-map-marker; } -.@{fa-css-prefix}-adjust:before { content: @fa-var-adjust; } -.@{fa-css-prefix}-tint:before { content: @fa-var-tint; } +.@{fa-css-prefix}-picture-o:before { + content: @fa-var-picture-o; +} +.@{fa-css-prefix}-pencil:before { + content: @fa-var-pencil; +} +.@{fa-css-prefix}-map-marker:before { + content: @fa-var-map-marker; +} +.@{fa-css-prefix}-adjust:before { + content: @fa-var-adjust; +} +.@{fa-css-prefix}-tint:before { + content: @fa-var-tint; +} .@{fa-css-prefix}-edit:before, -.@{fa-css-prefix}-pencil-square-o:before { content: @fa-var-pencil-square-o; } -.@{fa-css-prefix}-share-square-o:before { content: @fa-var-share-square-o; } -.@{fa-css-prefix}-check-square-o:before { content: @fa-var-check-square-o; } -.@{fa-css-prefix}-arrows:before { content: @fa-var-arrows; } -.@{fa-css-prefix}-step-backward:before { content: @fa-var-step-backward; } -.@{fa-css-prefix}-fast-backward:before { content: @fa-var-fast-backward; } -.@{fa-css-prefix}-backward:before { content: @fa-var-backward; } -.@{fa-css-prefix}-play:before { content: @fa-var-play; } -.@{fa-css-prefix}-pause:before { content: @fa-var-pause; } -.@{fa-css-prefix}-stop:before { content: @fa-var-stop; } -.@{fa-css-prefix}-forward:before { content: @fa-var-forward; } -.@{fa-css-prefix}-fast-forward:before { content: @fa-var-fast-forward; } -.@{fa-css-prefix}-step-forward:before { content: @fa-var-step-forward; } -.@{fa-css-prefix}-eject:before { content: @fa-var-eject; } -.@{fa-css-prefix}-chevron-left:before { content: @fa-var-chevron-left; } -.@{fa-css-prefix}-chevron-right:before { content: @fa-var-chevron-right; } -.@{fa-css-prefix}-plus-circle:before { content: @fa-var-plus-circle; } -.@{fa-css-prefix}-minus-circle:before { content: @fa-var-minus-circle; } -.@{fa-css-prefix}-times-circle:before { content: @fa-var-times-circle; } -.@{fa-css-prefix}-check-circle:before { content: @fa-var-check-circle; } -.@{fa-css-prefix}-question-circle:before { content: @fa-var-question-circle; } -.@{fa-css-prefix}-info-circle:before { content: @fa-var-info-circle; } -.@{fa-css-prefix}-crosshairs:before { content: @fa-var-crosshairs; } -.@{fa-css-prefix}-times-circle-o:before { content: @fa-var-times-circle-o; } -.@{fa-css-prefix}-check-circle-o:before { content: @fa-var-check-circle-o; } -.@{fa-css-prefix}-ban:before { content: @fa-var-ban; } -.@{fa-css-prefix}-arrow-left:before { content: @fa-var-arrow-left; } -.@{fa-css-prefix}-arrow-right:before { content: @fa-var-arrow-right; } -.@{fa-css-prefix}-arrow-up:before { content: @fa-var-arrow-up; } -.@{fa-css-prefix}-arrow-down:before { content: @fa-var-arrow-down; } +.@{fa-css-prefix}-pencil-square-o:before { + content: @fa-var-pencil-square-o; +} +.@{fa-css-prefix}-share-square-o:before { + content: @fa-var-share-square-o; +} +.@{fa-css-prefix}-check-square-o:before { + content: @fa-var-check-square-o; +} +.@{fa-css-prefix}-arrows:before { + content: @fa-var-arrows; +} +.@{fa-css-prefix}-step-backward:before { + content: @fa-var-step-backward; +} +.@{fa-css-prefix}-fast-backward:before { + content: @fa-var-fast-backward; +} +.@{fa-css-prefix}-backward:before { + content: @fa-var-backward; +} +.@{fa-css-prefix}-play:before { + content: @fa-var-play; +} +.@{fa-css-prefix}-pause:before { + content: @fa-var-pause; +} +.@{fa-css-prefix}-stop:before { + content: @fa-var-stop; +} +.@{fa-css-prefix}-forward:before { + content: @fa-var-forward; +} +.@{fa-css-prefix}-fast-forward:before { + content: @fa-var-fast-forward; +} +.@{fa-css-prefix}-step-forward:before { + content: @fa-var-step-forward; +} +.@{fa-css-prefix}-eject:before { + content: @fa-var-eject; +} +.@{fa-css-prefix}-chevron-left:before { + content: @fa-var-chevron-left; +} +.@{fa-css-prefix}-chevron-right:before { + content: @fa-var-chevron-right; +} +.@{fa-css-prefix}-plus-circle:before { + content: @fa-var-plus-circle; +} +.@{fa-css-prefix}-minus-circle:before { + content: @fa-var-minus-circle; +} +.@{fa-css-prefix}-times-circle:before { + content: @fa-var-times-circle; +} +.@{fa-css-prefix}-check-circle:before { + content: @fa-var-check-circle; +} +.@{fa-css-prefix}-question-circle:before { + content: @fa-var-question-circle; +} +.@{fa-css-prefix}-info-circle:before { + content: @fa-var-info-circle; +} +.@{fa-css-prefix}-crosshairs:before { + content: @fa-var-crosshairs; +} +.@{fa-css-prefix}-times-circle-o:before { + content: @fa-var-times-circle-o; +} +.@{fa-css-prefix}-check-circle-o:before { + content: @fa-var-check-circle-o; +} +.@{fa-css-prefix}-ban:before { + content: @fa-var-ban; +} +.@{fa-css-prefix}-arrow-left:before { + content: @fa-var-arrow-left; +} +.@{fa-css-prefix}-arrow-right:before { + content: @fa-var-arrow-right; +} +.@{fa-css-prefix}-arrow-up:before { + content: @fa-var-arrow-up; +} +.@{fa-css-prefix}-arrow-down:before { + content: @fa-var-arrow-down; +} .@{fa-css-prefix}-mail-forward:before, -.@{fa-css-prefix}-share:before { content: @fa-var-share; } -.@{fa-css-prefix}-expand:before { content: @fa-var-expand; } -.@{fa-css-prefix}-compress:before { content: @fa-var-compress; } -.@{fa-css-prefix}-plus:before { content: @fa-var-plus; } -.@{fa-css-prefix}-minus:before { content: @fa-var-minus; } -.@{fa-css-prefix}-asterisk:before { content: @fa-var-asterisk; } -.@{fa-css-prefix}-exclamation-circle:before { content: @fa-var-exclamation-circle; } -.@{fa-css-prefix}-gift:before { content: @fa-var-gift; } -.@{fa-css-prefix}-leaf:before { content: @fa-var-leaf; } -.@{fa-css-prefix}-fire:before { content: @fa-var-fire; } -.@{fa-css-prefix}-eye:before { content: @fa-var-eye; } -.@{fa-css-prefix}-eye-slash:before { content: @fa-var-eye-slash; } +.@{fa-css-prefix}-share:before { + content: @fa-var-share; +} +.@{fa-css-prefix}-expand:before { + content: @fa-var-expand; +} +.@{fa-css-prefix}-compress:before { + content: @fa-var-compress; +} +.@{fa-css-prefix}-plus:before { + content: @fa-var-plus; +} +.@{fa-css-prefix}-minus:before { + content: @fa-var-minus; +} +.@{fa-css-prefix}-asterisk:before { + content: @fa-var-asterisk; +} +.@{fa-css-prefix}-exclamation-circle:before { + content: @fa-var-exclamation-circle; +} +.@{fa-css-prefix}-gift:before { + content: @fa-var-gift; +} +.@{fa-css-prefix}-leaf:before { + content: @fa-var-leaf; +} +.@{fa-css-prefix}-fire:before { + content: @fa-var-fire; +} +.@{fa-css-prefix}-eye:before { + content: @fa-var-eye; +} +.@{fa-css-prefix}-eye-slash:before { + content: @fa-var-eye-slash; +} .@{fa-css-prefix}-warning:before, -.@{fa-css-prefix}-exclamation-triangle:before { content: @fa-var-exclamation-triangle; } -.@{fa-css-prefix}-plane:before { content: @fa-var-plane; } -.@{fa-css-prefix}-calendar:before { content: @fa-var-calendar; } -.@{fa-css-prefix}-random:before { content: @fa-var-random; } -.@{fa-css-prefix}-comment:before { content: @fa-var-comment; } -.@{fa-css-prefix}-magnet:before { content: @fa-var-magnet; } -.@{fa-css-prefix}-chevron-up:before { content: @fa-var-chevron-up; } -.@{fa-css-prefix}-chevron-down:before { content: @fa-var-chevron-down; } -.@{fa-css-prefix}-retweet:before { content: @fa-var-retweet; } -.@{fa-css-prefix}-shopping-cart:before { content: @fa-var-shopping-cart; } -.@{fa-css-prefix}-folder:before { content: @fa-var-folder; } -.@{fa-css-prefix}-folder-open:before { content: @fa-var-folder-open; } -.@{fa-css-prefix}-arrows-v:before { content: @fa-var-arrows-v; } -.@{fa-css-prefix}-arrows-h:before { content: @fa-var-arrows-h; } -.@{fa-css-prefix}-bar-chart-o:before { content: @fa-var-bar-chart-o; } -.@{fa-css-prefix}-twitter-square:before { content: @fa-var-twitter-square; } -.@{fa-css-prefix}-facebook-square:before { content: @fa-var-facebook-square; } -.@{fa-css-prefix}-camera-retro:before { content: @fa-var-camera-retro; } -.@{fa-css-prefix}-key:before { content: @fa-var-key; } +.@{fa-css-prefix}-exclamation-triangle:before { + content: @fa-var-exclamation-triangle; +} +.@{fa-css-prefix}-plane:before { + content: @fa-var-plane; +} +.@{fa-css-prefix}-calendar:before { + content: @fa-var-calendar; +} +.@{fa-css-prefix}-random:before { + content: @fa-var-random; +} +.@{fa-css-prefix}-comment:before { + content: @fa-var-comment; +} +.@{fa-css-prefix}-magnet:before { + content: @fa-var-magnet; +} +.@{fa-css-prefix}-chevron-up:before { + content: @fa-var-chevron-up; +} +.@{fa-css-prefix}-chevron-down:before { + content: @fa-var-chevron-down; +} +.@{fa-css-prefix}-retweet:before { + content: @fa-var-retweet; +} +.@{fa-css-prefix}-shopping-cart:before { + content: @fa-var-shopping-cart; +} +.@{fa-css-prefix}-folder:before { + content: @fa-var-folder; +} +.@{fa-css-prefix}-folder-open:before { + content: @fa-var-folder-open; +} +.@{fa-css-prefix}-arrows-v:before { + content: @fa-var-arrows-v; +} +.@{fa-css-prefix}-arrows-h:before { + content: @fa-var-arrows-h; +} +.@{fa-css-prefix}-bar-chart-o:before { + content: @fa-var-bar-chart-o; +} +.@{fa-css-prefix}-twitter-square:before { + content: @fa-var-twitter-square; +} +.@{fa-css-prefix}-facebook-square:before { + content: @fa-var-facebook-square; +} +.@{fa-css-prefix}-camera-retro:before { + content: @fa-var-camera-retro; +} +.@{fa-css-prefix}-key:before { + content: @fa-var-key; +} .@{fa-css-prefix}-gears:before, -.@{fa-css-prefix}-cogs:before { content: @fa-var-cogs; } -.@{fa-css-prefix}-comments:before { content: @fa-var-comments; } -.@{fa-css-prefix}-thumbs-o-up:before { content: @fa-var-thumbs-o-up; } -.@{fa-css-prefix}-thumbs-o-down:before { content: @fa-var-thumbs-o-down; } -.@{fa-css-prefix}-star-half:before { content: @fa-var-star-half; } -.@{fa-css-prefix}-heart-o:before { content: @fa-var-heart-o; } -.@{fa-css-prefix}-sign-out:before { content: @fa-var-sign-out; } -.@{fa-css-prefix}-linkedin-square:before { content: @fa-var-linkedin-square; } -.@{fa-css-prefix}-thumb-tack:before { content: @fa-var-thumb-tack; } -.@{fa-css-prefix}-external-link:before { content: @fa-var-external-link; } -.@{fa-css-prefix}-sign-in:before { content: @fa-var-sign-in; } -.@{fa-css-prefix}-trophy:before { content: @fa-var-trophy; } -.@{fa-css-prefix}-github-square:before { content: @fa-var-github-square; } -.@{fa-css-prefix}-upload:before { content: @fa-var-upload; } -.@{fa-css-prefix}-lemon-o:before { content: @fa-var-lemon-o; } -.@{fa-css-prefix}-phone:before { content: @fa-var-phone; } -.@{fa-css-prefix}-square-o:before { content: @fa-var-square-o; } -.@{fa-css-prefix}-bookmark-o:before { content: @fa-var-bookmark-o; } -.@{fa-css-prefix}-phone-square:before { content: @fa-var-phone-square; } -.@{fa-css-prefix}-twitter:before { content: @fa-var-twitter; } -.@{fa-css-prefix}-facebook:before { content: @fa-var-facebook; } -.@{fa-css-prefix}-github:before { content: @fa-var-github; } -.@{fa-css-prefix}-unlock:before { content: @fa-var-unlock; } -.@{fa-css-prefix}-credit-card:before { content: @fa-var-credit-card; } -.@{fa-css-prefix}-rss:before { content: @fa-var-rss; } -.@{fa-css-prefix}-hdd-o:before { content: @fa-var-hdd-o; } -.@{fa-css-prefix}-bullhorn:before { content: @fa-var-bullhorn; } -.@{fa-css-prefix}-bell:before { content: @fa-var-bell; } -.@{fa-css-prefix}-certificate:before { content: @fa-var-certificate; } -.@{fa-css-prefix}-hand-o-right:before { content: @fa-var-hand-o-right; } -.@{fa-css-prefix}-hand-o-left:before { content: @fa-var-hand-o-left; } -.@{fa-css-prefix}-hand-o-up:before { content: @fa-var-hand-o-up; } -.@{fa-css-prefix}-hand-o-down:before { content: @fa-var-hand-o-down; } -.@{fa-css-prefix}-arrow-circle-left:before { content: @fa-var-arrow-circle-left; } -.@{fa-css-prefix}-arrow-circle-right:before { content: @fa-var-arrow-circle-right; } -.@{fa-css-prefix}-arrow-circle-up:before { content: @fa-var-arrow-circle-up; } -.@{fa-css-prefix}-arrow-circle-down:before { content: @fa-var-arrow-circle-down; } -.@{fa-css-prefix}-globe:before { content: @fa-var-globe; } -.@{fa-css-prefix}-wrench:before { content: @fa-var-wrench; } -.@{fa-css-prefix}-tasks:before { content: @fa-var-tasks; } -.@{fa-css-prefix}-filter:before { content: @fa-var-filter; } -.@{fa-css-prefix}-briefcase:before { content: @fa-var-briefcase; } -.@{fa-css-prefix}-arrows-alt:before { content: @fa-var-arrows-alt; } +.@{fa-css-prefix}-cogs:before { + content: @fa-var-cogs; +} +.@{fa-css-prefix}-comments:before { + content: @fa-var-comments; +} +.@{fa-css-prefix}-thumbs-o-up:before { + content: @fa-var-thumbs-o-up; +} +.@{fa-css-prefix}-thumbs-o-down:before { + content: @fa-var-thumbs-o-down; +} +.@{fa-css-prefix}-star-half:before { + content: @fa-var-star-half; +} +.@{fa-css-prefix}-heart-o:before { + content: @fa-var-heart-o; +} +.@{fa-css-prefix}-sign-out:before { + content: @fa-var-sign-out; +} +.@{fa-css-prefix}-linkedin-square:before { + content: @fa-var-linkedin-square; +} +.@{fa-css-prefix}-thumb-tack:before { + content: @fa-var-thumb-tack; +} +.@{fa-css-prefix}-external-link:before { + content: @fa-var-external-link; +} +.@{fa-css-prefix}-sign-in:before { + content: @fa-var-sign-in; +} +.@{fa-css-prefix}-trophy:before { + content: @fa-var-trophy; +} +.@{fa-css-prefix}-github-square:before { + content: @fa-var-github-square; +} +.@{fa-css-prefix}-upload:before { + content: @fa-var-upload; +} +.@{fa-css-prefix}-lemon-o:before { + content: @fa-var-lemon-o; +} +.@{fa-css-prefix}-phone:before { + content: @fa-var-phone; +} +.@{fa-css-prefix}-square-o:before { + content: @fa-var-square-o; +} +.@{fa-css-prefix}-bookmark-o:before { + content: @fa-var-bookmark-o; +} +.@{fa-css-prefix}-phone-square:before { + content: @fa-var-phone-square; +} +.@{fa-css-prefix}-twitter:before { + content: @fa-var-twitter; +} +.@{fa-css-prefix}-facebook:before { + content: @fa-var-facebook; +} +.@{fa-css-prefix}-github:before { + content: @fa-var-github; +} +.@{fa-css-prefix}-unlock:before { + content: @fa-var-unlock; +} +.@{fa-css-prefix}-credit-card:before { + content: @fa-var-credit-card; +} +.@{fa-css-prefix}-rss:before { + content: @fa-var-rss; +} +.@{fa-css-prefix}-hdd-o:before { + content: @fa-var-hdd-o; +} +.@{fa-css-prefix}-bullhorn:before { + content: @fa-var-bullhorn; +} +.@{fa-css-prefix}-bell:before { + content: @fa-var-bell; +} +.@{fa-css-prefix}-certificate:before { + content: @fa-var-certificate; +} +.@{fa-css-prefix}-hand-o-right:before { + content: @fa-var-hand-o-right; +} +.@{fa-css-prefix}-hand-o-left:before { + content: @fa-var-hand-o-left; +} +.@{fa-css-prefix}-hand-o-up:before { + content: @fa-var-hand-o-up; +} +.@{fa-css-prefix}-hand-o-down:before { + content: @fa-var-hand-o-down; +} +.@{fa-css-prefix}-arrow-circle-left:before { + content: @fa-var-arrow-circle-left; +} +.@{fa-css-prefix}-arrow-circle-right:before { + content: @fa-var-arrow-circle-right; +} +.@{fa-css-prefix}-arrow-circle-up:before { + content: @fa-var-arrow-circle-up; +} +.@{fa-css-prefix}-arrow-circle-down:before { + content: @fa-var-arrow-circle-down; +} +.@{fa-css-prefix}-globe:before { + content: @fa-var-globe; +} +.@{fa-css-prefix}-wrench:before { + content: @fa-var-wrench; +} +.@{fa-css-prefix}-tasks:before { + content: @fa-var-tasks; +} +.@{fa-css-prefix}-filter:before { + content: @fa-var-filter; +} +.@{fa-css-prefix}-briefcase:before { + content: @fa-var-briefcase; +} +.@{fa-css-prefix}-arrows-alt:before { + content: @fa-var-arrows-alt; +} .@{fa-css-prefix}-group:before, -.@{fa-css-prefix}-users:before { content: @fa-var-users; } +.@{fa-css-prefix}-users:before { + content: @fa-var-users; +} .@{fa-css-prefix}-chain:before, -.@{fa-css-prefix}-link:before { content: @fa-var-link; } -.@{fa-css-prefix}-cloud:before { content: @fa-var-cloud; } -.@{fa-css-prefix}-flask:before { content: @fa-var-flask; } +.@{fa-css-prefix}-link:before { + content: @fa-var-link; +} +.@{fa-css-prefix}-cloud:before { + content: @fa-var-cloud; +} +.@{fa-css-prefix}-flask:before { + content: @fa-var-flask; +} .@{fa-css-prefix}-cut:before, -.@{fa-css-prefix}-scissors:before { content: @fa-var-scissors; } +.@{fa-css-prefix}-scissors:before { + content: @fa-var-scissors; +} .@{fa-css-prefix}-copy:before, -.@{fa-css-prefix}-files-o:before { content: @fa-var-files-o; } -.@{fa-css-prefix}-paperclip:before { content: @fa-var-paperclip; } +.@{fa-css-prefix}-files-o:before { + content: @fa-var-files-o; +} +.@{fa-css-prefix}-paperclip:before { + content: @fa-var-paperclip; +} .@{fa-css-prefix}-save:before, -.@{fa-css-prefix}-floppy-o:before { content: @fa-var-floppy-o; } -.@{fa-css-prefix}-square:before { content: @fa-var-square; } +.@{fa-css-prefix}-floppy-o:before { + content: @fa-var-floppy-o; +} +.@{fa-css-prefix}-square:before { + content: @fa-var-square; +} .@{fa-css-prefix}-navicon:before, .@{fa-css-prefix}-reorder:before, -.@{fa-css-prefix}-bars:before { content: @fa-var-bars; } -.@{fa-css-prefix}-list-ul:before { content: @fa-var-list-ul; } -.@{fa-css-prefix}-list-ol:before { content: @fa-var-list-ol; } -.@{fa-css-prefix}-strikethrough:before { content: @fa-var-strikethrough; } -.@{fa-css-prefix}-underline:before { content: @fa-var-underline; } -.@{fa-css-prefix}-table:before { content: @fa-var-table; } -.@{fa-css-prefix}-magic:before { content: @fa-var-magic; } -.@{fa-css-prefix}-truck:before { content: @fa-var-truck; } -.@{fa-css-prefix}-pinterest:before { content: @fa-var-pinterest; } -.@{fa-css-prefix}-pinterest-square:before { content: @fa-var-pinterest-square; } -.@{fa-css-prefix}-google-plus-square:before { content: @fa-var-google-plus-square; } -.@{fa-css-prefix}-google-plus:before { content: @fa-var-google-plus; } -.@{fa-css-prefix}-money:before { content: @fa-var-money; } -.@{fa-css-prefix}-caret-down:before { content: @fa-var-caret-down; } -.@{fa-css-prefix}-caret-up:before { content: @fa-var-caret-up; } -.@{fa-css-prefix}-caret-left:before { content: @fa-var-caret-left; } -.@{fa-css-prefix}-caret-right:before { content: @fa-var-caret-right; } -.@{fa-css-prefix}-columns:before { content: @fa-var-columns; } +.@{fa-css-prefix}-bars:before { + content: @fa-var-bars; +} +.@{fa-css-prefix}-list-ul:before { + content: @fa-var-list-ul; +} +.@{fa-css-prefix}-list-ol:before { + content: @fa-var-list-ol; +} +.@{fa-css-prefix}-strikethrough:before { + content: @fa-var-strikethrough; +} +.@{fa-css-prefix}-underline:before { + content: @fa-var-underline; +} +.@{fa-css-prefix}-table:before { + content: @fa-var-table; +} +.@{fa-css-prefix}-magic:before { + content: @fa-var-magic; +} +.@{fa-css-prefix}-truck:before { + content: @fa-var-truck; +} +.@{fa-css-prefix}-pinterest:before { + content: @fa-var-pinterest; +} +.@{fa-css-prefix}-pinterest-square:before { + content: @fa-var-pinterest-square; +} +.@{fa-css-prefix}-google-plus-square:before { + content: @fa-var-google-plus-square; +} +.@{fa-css-prefix}-google-plus:before { + content: @fa-var-google-plus; +} +.@{fa-css-prefix}-money:before { + content: @fa-var-money; +} +.@{fa-css-prefix}-caret-down:before { + content: @fa-var-caret-down; +} +.@{fa-css-prefix}-caret-up:before { + content: @fa-var-caret-up; +} +.@{fa-css-prefix}-caret-left:before { + content: @fa-var-caret-left; +} +.@{fa-css-prefix}-caret-right:before { + content: @fa-var-caret-right; +} +.@{fa-css-prefix}-columns:before { + content: @fa-var-columns; +} .@{fa-css-prefix}-unsorted:before, -.@{fa-css-prefix}-sort:before { content: @fa-var-sort; } +.@{fa-css-prefix}-sort:before { + content: @fa-var-sort; +} .@{fa-css-prefix}-sort-down:before, -.@{fa-css-prefix}-sort-desc:before { content: @fa-var-sort-desc; } +.@{fa-css-prefix}-sort-desc:before { + content: @fa-var-sort-desc; +} .@{fa-css-prefix}-sort-up:before, -.@{fa-css-prefix}-sort-asc:before { content: @fa-var-sort-asc; } -.@{fa-css-prefix}-envelope:before { content: @fa-var-envelope; } -.@{fa-css-prefix}-linkedin:before { content: @fa-var-linkedin; } +.@{fa-css-prefix}-sort-asc:before { + content: @fa-var-sort-asc; +} +.@{fa-css-prefix}-envelope:before { + content: @fa-var-envelope; +} +.@{fa-css-prefix}-linkedin:before { + content: @fa-var-linkedin; +} .@{fa-css-prefix}-rotate-left:before, -.@{fa-css-prefix}-undo:before { content: @fa-var-undo; } +.@{fa-css-prefix}-undo:before { + content: @fa-var-undo; +} .@{fa-css-prefix}-legal:before, -.@{fa-css-prefix}-gavel:before { content: @fa-var-gavel; } +.@{fa-css-prefix}-gavel:before { + content: @fa-var-gavel; +} .@{fa-css-prefix}-dashboard:before, -.@{fa-css-prefix}-tachometer:before { content: @fa-var-tachometer; } -.@{fa-css-prefix}-comment-o:before { content: @fa-var-comment-o; } -.@{fa-css-prefix}-comments-o:before { content: @fa-var-comments-o; } +.@{fa-css-prefix}-tachometer:before { + content: @fa-var-tachometer; +} +.@{fa-css-prefix}-comment-o:before { + content: @fa-var-comment-o; +} +.@{fa-css-prefix}-comments-o:before { + content: @fa-var-comments-o; +} .@{fa-css-prefix}-flash:before, -.@{fa-css-prefix}-bolt:before { content: @fa-var-bolt; } -.@{fa-css-prefix}-sitemap:before { content: @fa-var-sitemap; } -.@{fa-css-prefix}-umbrella:before { content: @fa-var-umbrella; } +.@{fa-css-prefix}-bolt:before { + content: @fa-var-bolt; +} +.@{fa-css-prefix}-sitemap:before { + content: @fa-var-sitemap; +} +.@{fa-css-prefix}-umbrella:before { + content: @fa-var-umbrella; +} .@{fa-css-prefix}-paste:before, -.@{fa-css-prefix}-clipboard:before { content: @fa-var-clipboard; } -.@{fa-css-prefix}-lightbulb-o:before { content: @fa-var-lightbulb-o; } -.@{fa-css-prefix}-exchange:before { content: @fa-var-exchange; } -.@{fa-css-prefix}-cloud-download:before { content: @fa-var-cloud-download; } -.@{fa-css-prefix}-cloud-upload:before { content: @fa-var-cloud-upload; } -.@{fa-css-prefix}-user-md:before { content: @fa-var-user-md; } -.@{fa-css-prefix}-stethoscope:before { content: @fa-var-stethoscope; } -.@{fa-css-prefix}-suitcase:before { content: @fa-var-suitcase; } -.@{fa-css-prefix}-bell-o:before { content: @fa-var-bell-o; } -.@{fa-css-prefix}-coffee:before { content: @fa-var-coffee; } -.@{fa-css-prefix}-cutlery:before { content: @fa-var-cutlery; } -.@{fa-css-prefix}-file-text-o:before { content: @fa-var-file-text-o; } -.@{fa-css-prefix}-building-o:before { content: @fa-var-building-o; } -.@{fa-css-prefix}-hospital-o:before { content: @fa-var-hospital-o; } -.@{fa-css-prefix}-ambulance:before { content: @fa-var-ambulance; } -.@{fa-css-prefix}-medkit:before { content: @fa-var-medkit; } -.@{fa-css-prefix}-fighter-jet:before { content: @fa-var-fighter-jet; } -.@{fa-css-prefix}-beer:before { content: @fa-var-beer; } -.@{fa-css-prefix}-h-square:before { content: @fa-var-h-square; } -.@{fa-css-prefix}-plus-square:before { content: @fa-var-plus-square; } -.@{fa-css-prefix}-angle-double-left:before { content: @fa-var-angle-double-left; } -.@{fa-css-prefix}-angle-double-right:before { content: @fa-var-angle-double-right; } -.@{fa-css-prefix}-angle-double-up:before { content: @fa-var-angle-double-up; } -.@{fa-css-prefix}-angle-double-down:before { content: @fa-var-angle-double-down; } -.@{fa-css-prefix}-angle-left:before { content: @fa-var-angle-left; } -.@{fa-css-prefix}-angle-right:before { content: @fa-var-angle-right; } -.@{fa-css-prefix}-angle-up:before { content: @fa-var-angle-up; } -.@{fa-css-prefix}-angle-down:before { content: @fa-var-angle-down; } -.@{fa-css-prefix}-desktop:before { content: @fa-var-desktop; } -.@{fa-css-prefix}-laptop:before { content: @fa-var-laptop; } -.@{fa-css-prefix}-tablet:before { content: @fa-var-tablet; } +.@{fa-css-prefix}-clipboard:before { + content: @fa-var-clipboard; +} +.@{fa-css-prefix}-lightbulb-o:before { + content: @fa-var-lightbulb-o; +} +.@{fa-css-prefix}-exchange:before { + content: @fa-var-exchange; +} +.@{fa-css-prefix}-cloud-download:before { + content: @fa-var-cloud-download; +} +.@{fa-css-prefix}-cloud-upload:before { + content: @fa-var-cloud-upload; +} +.@{fa-css-prefix}-user-md:before { + content: @fa-var-user-md; +} +.@{fa-css-prefix}-stethoscope:before { + content: @fa-var-stethoscope; +} +.@{fa-css-prefix}-suitcase:before { + content: @fa-var-suitcase; +} +.@{fa-css-prefix}-bell-o:before { + content: @fa-var-bell-o; +} +.@{fa-css-prefix}-coffee:before { + content: @fa-var-coffee; +} +.@{fa-css-prefix}-cutlery:before { + content: @fa-var-cutlery; +} +.@{fa-css-prefix}-file-text-o:before { + content: @fa-var-file-text-o; +} +.@{fa-css-prefix}-building-o:before { + content: @fa-var-building-o; +} +.@{fa-css-prefix}-hospital-o:before { + content: @fa-var-hospital-o; +} +.@{fa-css-prefix}-ambulance:before { + content: @fa-var-ambulance; +} +.@{fa-css-prefix}-medkit:before { + content: @fa-var-medkit; +} +.@{fa-css-prefix}-fighter-jet:before { + content: @fa-var-fighter-jet; +} +.@{fa-css-prefix}-beer:before { + content: @fa-var-beer; +} +.@{fa-css-prefix}-h-square:before { + content: @fa-var-h-square; +} +.@{fa-css-prefix}-plus-square:before { + content: @fa-var-plus-square; +} +.@{fa-css-prefix}-angle-double-left:before { + content: @fa-var-angle-double-left; +} +.@{fa-css-prefix}-angle-double-right:before { + content: @fa-var-angle-double-right; +} +.@{fa-css-prefix}-angle-double-up:before { + content: @fa-var-angle-double-up; +} +.@{fa-css-prefix}-angle-double-down:before { + content: @fa-var-angle-double-down; +} +.@{fa-css-prefix}-angle-left:before { + content: @fa-var-angle-left; +} +.@{fa-css-prefix}-angle-right:before { + content: @fa-var-angle-right; +} +.@{fa-css-prefix}-angle-up:before { + content: @fa-var-angle-up; +} +.@{fa-css-prefix}-angle-down:before { + content: @fa-var-angle-down; +} +.@{fa-css-prefix}-desktop:before { + content: @fa-var-desktop; +} +.@{fa-css-prefix}-laptop:before { + content: @fa-var-laptop; +} +.@{fa-css-prefix}-tablet:before { + content: @fa-var-tablet; +} .@{fa-css-prefix}-mobile-phone:before, -.@{fa-css-prefix}-mobile:before { content: @fa-var-mobile; } -.@{fa-css-prefix}-circle-o:before { content: @fa-var-circle-o; } -.@{fa-css-prefix}-quote-left:before { content: @fa-var-quote-left; } -.@{fa-css-prefix}-quote-right:before { content: @fa-var-quote-right; } -.@{fa-css-prefix}-spinner:before { content: @fa-var-spinner; } -.@{fa-css-prefix}-circle:before { content: @fa-var-circle; } +.@{fa-css-prefix}-mobile:before { + content: @fa-var-mobile; +} +.@{fa-css-prefix}-circle-o:before { + content: @fa-var-circle-o; +} +.@{fa-css-prefix}-quote-left:before { + content: @fa-var-quote-left; +} +.@{fa-css-prefix}-quote-right:before { + content: @fa-var-quote-right; +} +.@{fa-css-prefix}-spinner:before { + content: @fa-var-spinner; +} +.@{fa-css-prefix}-circle:before { + content: @fa-var-circle; +} .@{fa-css-prefix}-mail-reply:before, -.@{fa-css-prefix}-reply:before { content: @fa-var-reply; } -.@{fa-css-prefix}-github-alt:before { content: @fa-var-github-alt; } -.@{fa-css-prefix}-folder-o:before { content: @fa-var-folder-o; } -.@{fa-css-prefix}-folder-open-o:before { content: @fa-var-folder-open-o; } -.@{fa-css-prefix}-smile-o:before { content: @fa-var-smile-o; } -.@{fa-css-prefix}-frown-o:before { content: @fa-var-frown-o; } -.@{fa-css-prefix}-meh-o:before { content: @fa-var-meh-o; } -.@{fa-css-prefix}-gamepad:before { content: @fa-var-gamepad; } -.@{fa-css-prefix}-keyboard-o:before { content: @fa-var-keyboard-o; } -.@{fa-css-prefix}-flag-o:before { content: @fa-var-flag-o; } -.@{fa-css-prefix}-flag-checkered:before { content: @fa-var-flag-checkered; } -.@{fa-css-prefix}-terminal:before { content: @fa-var-terminal; } -.@{fa-css-prefix}-code:before { content: @fa-var-code; } +.@{fa-css-prefix}-reply:before { + content: @fa-var-reply; +} +.@{fa-css-prefix}-github-alt:before { + content: @fa-var-github-alt; +} +.@{fa-css-prefix}-folder-o:before { + content: @fa-var-folder-o; +} +.@{fa-css-prefix}-folder-open-o:before { + content: @fa-var-folder-open-o; +} +.@{fa-css-prefix}-smile-o:before { + content: @fa-var-smile-o; +} +.@{fa-css-prefix}-frown-o:before { + content: @fa-var-frown-o; +} +.@{fa-css-prefix}-meh-o:before { + content: @fa-var-meh-o; +} +.@{fa-css-prefix}-gamepad:before { + content: @fa-var-gamepad; +} +.@{fa-css-prefix}-keyboard-o:before { + content: @fa-var-keyboard-o; +} +.@{fa-css-prefix}-flag-o:before { + content: @fa-var-flag-o; +} +.@{fa-css-prefix}-flag-checkered:before { + content: @fa-var-flag-checkered; +} +.@{fa-css-prefix}-terminal:before { + content: @fa-var-terminal; +} +.@{fa-css-prefix}-code:before { + content: @fa-var-code; +} .@{fa-css-prefix}-mail-reply-all:before, -.@{fa-css-prefix}-reply-all:before { content: @fa-var-reply-all; } +.@{fa-css-prefix}-reply-all:before { + content: @fa-var-reply-all; +} .@{fa-css-prefix}-star-half-empty:before, .@{fa-css-prefix}-star-half-full:before, -.@{fa-css-prefix}-star-half-o:before { content: @fa-var-star-half-o; } -.@{fa-css-prefix}-location-arrow:before { content: @fa-var-location-arrow; } -.@{fa-css-prefix}-crop:before { content: @fa-var-crop; } -.@{fa-css-prefix}-code-fork:before { content: @fa-var-code-fork; } +.@{fa-css-prefix}-star-half-o:before { + content: @fa-var-star-half-o; +} +.@{fa-css-prefix}-location-arrow:before { + content: @fa-var-location-arrow; +} +.@{fa-css-prefix}-crop:before { + content: @fa-var-crop; +} +.@{fa-css-prefix}-code-fork:before { + content: @fa-var-code-fork; +} .@{fa-css-prefix}-unlink:before, -.@{fa-css-prefix}-chain-broken:before { content: @fa-var-chain-broken; } -.@{fa-css-prefix}-question:before { content: @fa-var-question; } -.@{fa-css-prefix}-info:before { content: @fa-var-info; } -.@{fa-css-prefix}-exclamation:before { content: @fa-var-exclamation; } -.@{fa-css-prefix}-superscript:before { content: @fa-var-superscript; } -.@{fa-css-prefix}-subscript:before { content: @fa-var-subscript; } -.@{fa-css-prefix}-eraser:before { content: @fa-var-eraser; } -.@{fa-css-prefix}-puzzle-piece:before { content: @fa-var-puzzle-piece; } -.@{fa-css-prefix}-microphone:before { content: @fa-var-microphone; } -.@{fa-css-prefix}-microphone-slash:before { content: @fa-var-microphone-slash; } -.@{fa-css-prefix}-shield:before { content: @fa-var-shield; } -.@{fa-css-prefix}-calendar-o:before { content: @fa-var-calendar-o; } -.@{fa-css-prefix}-fire-extinguisher:before { content: @fa-var-fire-extinguisher; } -.@{fa-css-prefix}-rocket:before { content: @fa-var-rocket; } -.@{fa-css-prefix}-maxcdn:before { content: @fa-var-maxcdn; } -.@{fa-css-prefix}-chevron-circle-left:before { content: @fa-var-chevron-circle-left; } -.@{fa-css-prefix}-chevron-circle-right:before { content: @fa-var-chevron-circle-right; } -.@{fa-css-prefix}-chevron-circle-up:before { content: @fa-var-chevron-circle-up; } -.@{fa-css-prefix}-chevron-circle-down:before { content: @fa-var-chevron-circle-down; } -.@{fa-css-prefix}-html5:before { content: @fa-var-html5; } -.@{fa-css-prefix}-css3:before { content: @fa-var-css3; } -.@{fa-css-prefix}-anchor:before { content: @fa-var-anchor; } -.@{fa-css-prefix}-unlock-alt:before { content: @fa-var-unlock-alt; } -.@{fa-css-prefix}-bullseye:before { content: @fa-var-bullseye; } -.@{fa-css-prefix}-ellipsis-h:before { content: @fa-var-ellipsis-h; } -.@{fa-css-prefix}-ellipsis-v:before { content: @fa-var-ellipsis-v; } -.@{fa-css-prefix}-rss-square:before { content: @fa-var-rss-square; } -.@{fa-css-prefix}-play-circle:before { content: @fa-var-play-circle; } -.@{fa-css-prefix}-ticket:before { content: @fa-var-ticket; } -.@{fa-css-prefix}-minus-square:before { content: @fa-var-minus-square; } -.@{fa-css-prefix}-minus-square-o:before { content: @fa-var-minus-square-o; } -.@{fa-css-prefix}-level-up:before { content: @fa-var-level-up; } -.@{fa-css-prefix}-level-down:before { content: @fa-var-level-down; } -.@{fa-css-prefix}-check-square:before { content: @fa-var-check-square; } -.@{fa-css-prefix}-pencil-square:before { content: @fa-var-pencil-square; } -.@{fa-css-prefix}-external-link-square:before { content: @fa-var-external-link-square; } -.@{fa-css-prefix}-share-square:before { content: @fa-var-share-square; } -.@{fa-css-prefix}-compass:before { content: @fa-var-compass; } +.@{fa-css-prefix}-chain-broken:before { + content: @fa-var-chain-broken; +} +.@{fa-css-prefix}-question:before { + content: @fa-var-question; +} +.@{fa-css-prefix}-info:before { + content: @fa-var-info; +} +.@{fa-css-prefix}-exclamation:before { + content: @fa-var-exclamation; +} +.@{fa-css-prefix}-superscript:before { + content: @fa-var-superscript; +} +.@{fa-css-prefix}-subscript:before { + content: @fa-var-subscript; +} +.@{fa-css-prefix}-eraser:before { + content: @fa-var-eraser; +} +.@{fa-css-prefix}-puzzle-piece:before { + content: @fa-var-puzzle-piece; +} +.@{fa-css-prefix}-microphone:before { + content: @fa-var-microphone; +} +.@{fa-css-prefix}-microphone-slash:before { + content: @fa-var-microphone-slash; +} +.@{fa-css-prefix}-shield:before { + content: @fa-var-shield; +} +.@{fa-css-prefix}-calendar-o:before { + content: @fa-var-calendar-o; +} +.@{fa-css-prefix}-fire-extinguisher:before { + content: @fa-var-fire-extinguisher; +} +.@{fa-css-prefix}-rocket:before { + content: @fa-var-rocket; +} +.@{fa-css-prefix}-maxcdn:before { + content: @fa-var-maxcdn; +} +.@{fa-css-prefix}-chevron-circle-left:before { + content: @fa-var-chevron-circle-left; +} +.@{fa-css-prefix}-chevron-circle-right:before { + content: @fa-var-chevron-circle-right; +} +.@{fa-css-prefix}-chevron-circle-up:before { + content: @fa-var-chevron-circle-up; +} +.@{fa-css-prefix}-chevron-circle-down:before { + content: @fa-var-chevron-circle-down; +} +.@{fa-css-prefix}-html5:before { + content: @fa-var-html5; +} +.@{fa-css-prefix}-css3:before { + content: @fa-var-css3; +} +.@{fa-css-prefix}-anchor:before { + content: @fa-var-anchor; +} +.@{fa-css-prefix}-unlock-alt:before { + content: @fa-var-unlock-alt; +} +.@{fa-css-prefix}-bullseye:before { + content: @fa-var-bullseye; +} +.@{fa-css-prefix}-ellipsis-h:before { + content: @fa-var-ellipsis-h; +} +.@{fa-css-prefix}-ellipsis-v:before { + content: @fa-var-ellipsis-v; +} +.@{fa-css-prefix}-rss-square:before { + content: @fa-var-rss-square; +} +.@{fa-css-prefix}-play-circle:before { + content: @fa-var-play-circle; +} +.@{fa-css-prefix}-ticket:before { + content: @fa-var-ticket; +} +.@{fa-css-prefix}-minus-square:before { + content: @fa-var-minus-square; +} +.@{fa-css-prefix}-minus-square-o:before { + content: @fa-var-minus-square-o; +} +.@{fa-css-prefix}-level-up:before { + content: @fa-var-level-up; +} +.@{fa-css-prefix}-level-down:before { + content: @fa-var-level-down; +} +.@{fa-css-prefix}-check-square:before { + content: @fa-var-check-square; +} +.@{fa-css-prefix}-pencil-square:before { + content: @fa-var-pencil-square; +} +.@{fa-css-prefix}-external-link-square:before { + content: @fa-var-external-link-square; +} +.@{fa-css-prefix}-share-square:before { + content: @fa-var-share-square; +} +.@{fa-css-prefix}-compass:before { + content: @fa-var-compass; +} .@{fa-css-prefix}-toggle-down:before, -.@{fa-css-prefix}-caret-square-o-down:before { content: @fa-var-caret-square-o-down; } +.@{fa-css-prefix}-caret-square-o-down:before { + content: @fa-var-caret-square-o-down; +} .@{fa-css-prefix}-toggle-up:before, -.@{fa-css-prefix}-caret-square-o-up:before { content: @fa-var-caret-square-o-up; } +.@{fa-css-prefix}-caret-square-o-up:before { + content: @fa-var-caret-square-o-up; +} .@{fa-css-prefix}-toggle-right:before, -.@{fa-css-prefix}-caret-square-o-right:before { content: @fa-var-caret-square-o-right; } +.@{fa-css-prefix}-caret-square-o-right:before { + content: @fa-var-caret-square-o-right; +} .@{fa-css-prefix}-euro:before, -.@{fa-css-prefix}-eur:before { content: @fa-var-eur; } -.@{fa-css-prefix}-gbp:before { content: @fa-var-gbp; } +.@{fa-css-prefix}-eur:before { + content: @fa-var-eur; +} +.@{fa-css-prefix}-gbp:before { + content: @fa-var-gbp; +} .@{fa-css-prefix}-dollar:before, -.@{fa-css-prefix}-usd:before { content: @fa-var-usd; } +.@{fa-css-prefix}-usd:before { + content: @fa-var-usd; +} .@{fa-css-prefix}-rupee:before, -.@{fa-css-prefix}-inr:before { content: @fa-var-inr; } +.@{fa-css-prefix}-inr:before { + content: @fa-var-inr; +} .@{fa-css-prefix}-cny:before, .@{fa-css-prefix}-rmb:before, .@{fa-css-prefix}-yen:before, -.@{fa-css-prefix}-jpy:before { content: @fa-var-jpy; } +.@{fa-css-prefix}-jpy:before { + content: @fa-var-jpy; +} .@{fa-css-prefix}-ruble:before, .@{fa-css-prefix}-rouble:before, -.@{fa-css-prefix}-rub:before { content: @fa-var-rub; } +.@{fa-css-prefix}-rub:before { + content: @fa-var-rub; +} .@{fa-css-prefix}-won:before, -.@{fa-css-prefix}-krw:before { content: @fa-var-krw; } +.@{fa-css-prefix}-krw:before { + content: @fa-var-krw; +} .@{fa-css-prefix}-bitcoin:before, -.@{fa-css-prefix}-btc:before { content: @fa-var-btc; } -.@{fa-css-prefix}-file:before { content: @fa-var-file; } -.@{fa-css-prefix}-file-text:before { content: @fa-var-file-text; } -.@{fa-css-prefix}-sort-alpha-asc:before { content: @fa-var-sort-alpha-asc; } -.@{fa-css-prefix}-sort-alpha-desc:before { content: @fa-var-sort-alpha-desc; } -.@{fa-css-prefix}-sort-amount-asc:before { content: @fa-var-sort-amount-asc; } -.@{fa-css-prefix}-sort-amount-desc:before { content: @fa-var-sort-amount-desc; } -.@{fa-css-prefix}-sort-numeric-asc:before { content: @fa-var-sort-numeric-asc; } -.@{fa-css-prefix}-sort-numeric-desc:before { content: @fa-var-sort-numeric-desc; } -.@{fa-css-prefix}-thumbs-up:before { content: @fa-var-thumbs-up; } -.@{fa-css-prefix}-thumbs-down:before { content: @fa-var-thumbs-down; } -.@{fa-css-prefix}-youtube-square:before { content: @fa-var-youtube-square; } -.@{fa-css-prefix}-youtube:before { content: @fa-var-youtube; } -.@{fa-css-prefix}-xing:before { content: @fa-var-xing; } -.@{fa-css-prefix}-xing-square:before { content: @fa-var-xing-square; } -.@{fa-css-prefix}-youtube-play:before { content: @fa-var-youtube-play; } -.@{fa-css-prefix}-dropbox:before { content: @fa-var-dropbox; } -.@{fa-css-prefix}-stack-overflow:before { content: @fa-var-stack-overflow; } -.@{fa-css-prefix}-instagram:before { content: @fa-var-instagram; } -.@{fa-css-prefix}-flickr:before { content: @fa-var-flickr; } -.@{fa-css-prefix}-adn:before { content: @fa-var-adn; } -.@{fa-css-prefix}-bitbucket:before { content: @fa-var-bitbucket; } -.@{fa-css-prefix}-bitbucket-square:before { content: @fa-var-bitbucket-square; } -.@{fa-css-prefix}-tumblr:before { content: @fa-var-tumblr; } -.@{fa-css-prefix}-tumblr-square:before { content: @fa-var-tumblr-square; } -.@{fa-css-prefix}-long-arrow-down:before { content: @fa-var-long-arrow-down; } -.@{fa-css-prefix}-long-arrow-up:before { content: @fa-var-long-arrow-up; } -.@{fa-css-prefix}-long-arrow-left:before { content: @fa-var-long-arrow-left; } -.@{fa-css-prefix}-long-arrow-right:before { content: @fa-var-long-arrow-right; } -.@{fa-css-prefix}-apple:before { content: @fa-var-apple; } -.@{fa-css-prefix}-windows:before { content: @fa-var-windows; } -.@{fa-css-prefix}-android:before { content: @fa-var-android; } -.@{fa-css-prefix}-linux:before { content: @fa-var-linux; } -.@{fa-css-prefix}-dribbble:before { content: @fa-var-dribbble; } -.@{fa-css-prefix}-skype:before { content: @fa-var-skype; } -.@{fa-css-prefix}-foursquare:before { content: @fa-var-foursquare; } -.@{fa-css-prefix}-trello:before { content: @fa-var-trello; } -.@{fa-css-prefix}-female:before { content: @fa-var-female; } -.@{fa-css-prefix}-male:before { content: @fa-var-male; } -.@{fa-css-prefix}-gittip:before { content: @fa-var-gittip; } -.@{fa-css-prefix}-sun-o:before { content: @fa-var-sun-o; } -.@{fa-css-prefix}-moon-o:before { content: @fa-var-moon-o; } -.@{fa-css-prefix}-archive:before { content: @fa-var-archive; } -.@{fa-css-prefix}-bug:before { content: @fa-var-bug; } -.@{fa-css-prefix}-vk:before { content: @fa-var-vk; } -.@{fa-css-prefix}-weibo:before { content: @fa-var-weibo; } -.@{fa-css-prefix}-renren:before { content: @fa-var-renren; } -.@{fa-css-prefix}-pagelines:before { content: @fa-var-pagelines; } -.@{fa-css-prefix}-stack-exchange:before { content: @fa-var-stack-exchange; } -.@{fa-css-prefix}-arrow-circle-o-right:before { content: @fa-var-arrow-circle-o-right; } -.@{fa-css-prefix}-arrow-circle-o-left:before { content: @fa-var-arrow-circle-o-left; } +.@{fa-css-prefix}-btc:before { + content: @fa-var-btc; +} +.@{fa-css-prefix}-file:before { + content: @fa-var-file; +} +.@{fa-css-prefix}-file-text:before { + content: @fa-var-file-text; +} +.@{fa-css-prefix}-sort-alpha-asc:before { + content: @fa-var-sort-alpha-asc; +} +.@{fa-css-prefix}-sort-alpha-desc:before { + content: @fa-var-sort-alpha-desc; +} +.@{fa-css-prefix}-sort-amount-asc:before { + content: @fa-var-sort-amount-asc; +} +.@{fa-css-prefix}-sort-amount-desc:before { + content: @fa-var-sort-amount-desc; +} +.@{fa-css-prefix}-sort-numeric-asc:before { + content: @fa-var-sort-numeric-asc; +} +.@{fa-css-prefix}-sort-numeric-desc:before { + content: @fa-var-sort-numeric-desc; +} +.@{fa-css-prefix}-thumbs-up:before { + content: @fa-var-thumbs-up; +} +.@{fa-css-prefix}-thumbs-down:before { + content: @fa-var-thumbs-down; +} +.@{fa-css-prefix}-youtube-square:before { + content: @fa-var-youtube-square; +} +.@{fa-css-prefix}-youtube:before { + content: @fa-var-youtube; +} +.@{fa-css-prefix}-xing:before { + content: @fa-var-xing; +} +.@{fa-css-prefix}-xing-square:before { + content: @fa-var-xing-square; +} +.@{fa-css-prefix}-youtube-play:before { + content: @fa-var-youtube-play; +} +.@{fa-css-prefix}-dropbox:before { + content: @fa-var-dropbox; +} +.@{fa-css-prefix}-stack-overflow:before { + content: @fa-var-stack-overflow; +} +.@{fa-css-prefix}-instagram:before { + content: @fa-var-instagram; +} +.@{fa-css-prefix}-flickr:before { + content: @fa-var-flickr; +} +.@{fa-css-prefix}-adn:before { + content: @fa-var-adn; +} +.@{fa-css-prefix}-bitbucket:before { + content: @fa-var-bitbucket; +} +.@{fa-css-prefix}-bitbucket-square:before { + content: @fa-var-bitbucket-square; +} +.@{fa-css-prefix}-tumblr:before { + content: @fa-var-tumblr; +} +.@{fa-css-prefix}-tumblr-square:before { + content: @fa-var-tumblr-square; +} +.@{fa-css-prefix}-long-arrow-down:before { + content: @fa-var-long-arrow-down; +} +.@{fa-css-prefix}-long-arrow-up:before { + content: @fa-var-long-arrow-up; +} +.@{fa-css-prefix}-long-arrow-left:before { + content: @fa-var-long-arrow-left; +} +.@{fa-css-prefix}-long-arrow-right:before { + content: @fa-var-long-arrow-right; +} +.@{fa-css-prefix}-apple:before { + content: @fa-var-apple; +} +.@{fa-css-prefix}-windows:before { + content: @fa-var-windows; +} +.@{fa-css-prefix}-android:before { + content: @fa-var-android; +} +.@{fa-css-prefix}-linux:before { + content: @fa-var-linux; +} +.@{fa-css-prefix}-dribbble:before { + content: @fa-var-dribbble; +} +.@{fa-css-prefix}-skype:before { + content: @fa-var-skype; +} +.@{fa-css-prefix}-foursquare:before { + content: @fa-var-foursquare; +} +.@{fa-css-prefix}-trello:before { + content: @fa-var-trello; +} +.@{fa-css-prefix}-female:before { + content: @fa-var-female; +} +.@{fa-css-prefix}-male:before { + content: @fa-var-male; +} +.@{fa-css-prefix}-gittip:before { + content: @fa-var-gittip; +} +.@{fa-css-prefix}-sun-o:before { + content: @fa-var-sun-o; +} +.@{fa-css-prefix}-moon-o:before { + content: @fa-var-moon-o; +} +.@{fa-css-prefix}-archive:before { + content: @fa-var-archive; +} +.@{fa-css-prefix}-bug:before { + content: @fa-var-bug; +} +.@{fa-css-prefix}-vk:before { + content: @fa-var-vk; +} +.@{fa-css-prefix}-weibo:before { + content: @fa-var-weibo; +} +.@{fa-css-prefix}-renren:before { + content: @fa-var-renren; +} +.@{fa-css-prefix}-pagelines:before { + content: @fa-var-pagelines; +} +.@{fa-css-prefix}-stack-exchange:before { + content: @fa-var-stack-exchange; +} +.@{fa-css-prefix}-arrow-circle-o-right:before { + content: @fa-var-arrow-circle-o-right; +} +.@{fa-css-prefix}-arrow-circle-o-left:before { + content: @fa-var-arrow-circle-o-left; +} .@{fa-css-prefix}-toggle-left:before, -.@{fa-css-prefix}-caret-square-o-left:before { content: @fa-var-caret-square-o-left; } -.@{fa-css-prefix}-dot-circle-o:before { content: @fa-var-dot-circle-o; } -.@{fa-css-prefix}-wheelchair:before { content: @fa-var-wheelchair; } -.@{fa-css-prefix}-vimeo-square:before { content: @fa-var-vimeo-square; } +.@{fa-css-prefix}-caret-square-o-left:before { + content: @fa-var-caret-square-o-left; +} +.@{fa-css-prefix}-dot-circle-o:before { + content: @fa-var-dot-circle-o; +} +.@{fa-css-prefix}-wheelchair:before { + content: @fa-var-wheelchair; +} +.@{fa-css-prefix}-vimeo-square:before { + content: @fa-var-vimeo-square; +} .@{fa-css-prefix}-turkish-lira:before, -.@{fa-css-prefix}-try:before { content: @fa-var-try; } -.@{fa-css-prefix}-plus-square-o:before { content: @fa-var-plus-square-o; } -.@{fa-css-prefix}-space-shuttle:before { content: @fa-var-space-shuttle; } -.@{fa-css-prefix}-slack:before { content: @fa-var-slack; } -.@{fa-css-prefix}-envelope-square:before { content: @fa-var-envelope-square; } -.@{fa-css-prefix}-wordpress:before { content: @fa-var-wordpress; } -.@{fa-css-prefix}-openid:before { content: @fa-var-openid; } +.@{fa-css-prefix}-try:before { + content: @fa-var-try; +} +.@{fa-css-prefix}-plus-square-o:before { + content: @fa-var-plus-square-o; +} +.@{fa-css-prefix}-space-shuttle:before { + content: @fa-var-space-shuttle; +} +.@{fa-css-prefix}-slack:before { + content: @fa-var-slack; +} +.@{fa-css-prefix}-envelope-square:before { + content: @fa-var-envelope-square; +} +.@{fa-css-prefix}-wordpress:before { + content: @fa-var-wordpress; +} +.@{fa-css-prefix}-openid:before { + content: @fa-var-openid; +} .@{fa-css-prefix}-institution:before, .@{fa-css-prefix}-bank:before, -.@{fa-css-prefix}-university:before { content: @fa-var-university; } +.@{fa-css-prefix}-university:before { + content: @fa-var-university; +} .@{fa-css-prefix}-mortar-board:before, -.@{fa-css-prefix}-graduation-cap:before { content: @fa-var-graduation-cap; } -.@{fa-css-prefix}-yahoo:before { content: @fa-var-yahoo; } -.@{fa-css-prefix}-google:before { content: @fa-var-google; } -.@{fa-css-prefix}-reddit:before { content: @fa-var-reddit; } -.@{fa-css-prefix}-reddit-square:before { content: @fa-var-reddit-square; } -.@{fa-css-prefix}-stumbleupon-circle:before { content: @fa-var-stumbleupon-circle; } -.@{fa-css-prefix}-stumbleupon:before { content: @fa-var-stumbleupon; } -.@{fa-css-prefix}-delicious:before { content: @fa-var-delicious; } -.@{fa-css-prefix}-digg:before { content: @fa-var-digg; } +.@{fa-css-prefix}-graduation-cap:before { + content: @fa-var-graduation-cap; +} +.@{fa-css-prefix}-yahoo:before { + content: @fa-var-yahoo; +} +.@{fa-css-prefix}-google:before { + content: @fa-var-google; +} +.@{fa-css-prefix}-reddit:before { + content: @fa-var-reddit; +} +.@{fa-css-prefix}-reddit-square:before { + content: @fa-var-reddit-square; +} +.@{fa-css-prefix}-stumbleupon-circle:before { + content: @fa-var-stumbleupon-circle; +} +.@{fa-css-prefix}-stumbleupon:before { + content: @fa-var-stumbleupon; +} +.@{fa-css-prefix}-delicious:before { + content: @fa-var-delicious; +} +.@{fa-css-prefix}-digg:before { + content: @fa-var-digg; +} .@{fa-css-prefix}-pied-piper-square:before, -.@{fa-css-prefix}-pied-piper:before { content: @fa-var-pied-piper; } -.@{fa-css-prefix}-pied-piper-alt:before { content: @fa-var-pied-piper-alt; } -.@{fa-css-prefix}-drupal:before { content: @fa-var-drupal; } -.@{fa-css-prefix}-joomla:before { content: @fa-var-joomla; } -.@{fa-css-prefix}-language:before { content: @fa-var-language; } -.@{fa-css-prefix}-fax:before { content: @fa-var-fax; } -.@{fa-css-prefix}-building:before { content: @fa-var-building; } -.@{fa-css-prefix}-child:before { content: @fa-var-child; } -.@{fa-css-prefix}-paw:before { content: @fa-var-paw; } -.@{fa-css-prefix}-spoon:before { content: @fa-var-spoon; } -.@{fa-css-prefix}-cube:before { content: @fa-var-cube; } -.@{fa-css-prefix}-cubes:before { content: @fa-var-cubes; } -.@{fa-css-prefix}-behance:before { content: @fa-var-behance; } -.@{fa-css-prefix}-behance-square:before { content: @fa-var-behance-square; } -.@{fa-css-prefix}-steam:before { content: @fa-var-steam; } -.@{fa-css-prefix}-steam-square:before { content: @fa-var-steam-square; } -.@{fa-css-prefix}-recycle:before { content: @fa-var-recycle; } +.@{fa-css-prefix}-pied-piper:before { + content: @fa-var-pied-piper; +} +.@{fa-css-prefix}-pied-piper-alt:before { + content: @fa-var-pied-piper-alt; +} +.@{fa-css-prefix}-drupal:before { + content: @fa-var-drupal; +} +.@{fa-css-prefix}-joomla:before { + content: @fa-var-joomla; +} +.@{fa-css-prefix}-language:before { + content: @fa-var-language; +} +.@{fa-css-prefix}-fax:before { + content: @fa-var-fax; +} +.@{fa-css-prefix}-building:before { + content: @fa-var-building; +} +.@{fa-css-prefix}-child:before { + content: @fa-var-child; +} +.@{fa-css-prefix}-paw:before { + content: @fa-var-paw; +} +.@{fa-css-prefix}-spoon:before { + content: @fa-var-spoon; +} +.@{fa-css-prefix}-cube:before { + content: @fa-var-cube; +} +.@{fa-css-prefix}-cubes:before { + content: @fa-var-cubes; +} +.@{fa-css-prefix}-behance:before { + content: @fa-var-behance; +} +.@{fa-css-prefix}-behance-square:before { + content: @fa-var-behance-square; +} +.@{fa-css-prefix}-steam:before { + content: @fa-var-steam; +} +.@{fa-css-prefix}-steam-square:before { + content: @fa-var-steam-square; +} +.@{fa-css-prefix}-recycle:before { + content: @fa-var-recycle; +} .@{fa-css-prefix}-automobile:before, -.@{fa-css-prefix}-car:before { content: @fa-var-car; } +.@{fa-css-prefix}-car:before { + content: @fa-var-car; +} .@{fa-css-prefix}-cab:before, -.@{fa-css-prefix}-taxi:before { content: @fa-var-taxi; } -.@{fa-css-prefix}-tree:before { content: @fa-var-tree; } -.@{fa-css-prefix}-spotify:before { content: @fa-var-spotify; } -.@{fa-css-prefix}-deviantart:before { content: @fa-var-deviantart; } -.@{fa-css-prefix}-soundcloud:before { content: @fa-var-soundcloud; } -.@{fa-css-prefix}-database:before { content: @fa-var-database; } -.@{fa-css-prefix}-file-pdf-o:before { content: @fa-var-file-pdf-o; } -.@{fa-css-prefix}-file-word-o:before { content: @fa-var-file-word-o; } -.@{fa-css-prefix}-file-excel-o:before { content: @fa-var-file-excel-o; } -.@{fa-css-prefix}-file-powerpoint-o:before { content: @fa-var-file-powerpoint-o; } +.@{fa-css-prefix}-taxi:before { + content: @fa-var-taxi; +} +.@{fa-css-prefix}-tree:before { + content: @fa-var-tree; +} +.@{fa-css-prefix}-spotify:before { + content: @fa-var-spotify; +} +.@{fa-css-prefix}-deviantart:before { + content: @fa-var-deviantart; +} +.@{fa-css-prefix}-soundcloud:before { + content: @fa-var-soundcloud; +} +.@{fa-css-prefix}-database:before { + content: @fa-var-database; +} +.@{fa-css-prefix}-file-pdf-o:before { + content: @fa-var-file-pdf-o; +} +.@{fa-css-prefix}-file-word-o:before { + content: @fa-var-file-word-o; +} +.@{fa-css-prefix}-file-excel-o:before { + content: @fa-var-file-excel-o; +} +.@{fa-css-prefix}-file-powerpoint-o:before { + content: @fa-var-file-powerpoint-o; +} .@{fa-css-prefix}-file-photo-o:before, .@{fa-css-prefix}-file-picture-o:before, -.@{fa-css-prefix}-file-image-o:before { content: @fa-var-file-image-o; } +.@{fa-css-prefix}-file-image-o:before { + content: @fa-var-file-image-o; +} .@{fa-css-prefix}-file-zip-o:before, -.@{fa-css-prefix}-file-archive-o:before { content: @fa-var-file-archive-o; } +.@{fa-css-prefix}-file-archive-o:before { + content: @fa-var-file-archive-o; +} .@{fa-css-prefix}-file-sound-o:before, -.@{fa-css-prefix}-file-audio-o:before { content: @fa-var-file-audio-o; } +.@{fa-css-prefix}-file-audio-o:before { + content: @fa-var-file-audio-o; +} .@{fa-css-prefix}-file-movie-o:before, -.@{fa-css-prefix}-file-video-o:before { content: @fa-var-file-video-o; } -.@{fa-css-prefix}-file-code-o:before { content: @fa-var-file-code-o; } -.@{fa-css-prefix}-vine:before { content: @fa-var-vine; } -.@{fa-css-prefix}-codepen:before { content: @fa-var-codepen; } -.@{fa-css-prefix}-jsfiddle:before { content: @fa-var-jsfiddle; } +.@{fa-css-prefix}-file-video-o:before { + content: @fa-var-file-video-o; +} +.@{fa-css-prefix}-file-code-o:before { + content: @fa-var-file-code-o; +} +.@{fa-css-prefix}-vine:before { + content: @fa-var-vine; +} +.@{fa-css-prefix}-codepen:before { + content: @fa-var-codepen; +} +.@{fa-css-prefix}-jsfiddle:before { + content: @fa-var-jsfiddle; +} .@{fa-css-prefix}-life-bouy:before, .@{fa-css-prefix}-life-saver:before, .@{fa-css-prefix}-support:before, -.@{fa-css-prefix}-life-ring:before { content: @fa-var-life-ring; } -.@{fa-css-prefix}-circle-o-notch:before { content: @fa-var-circle-o-notch; } +.@{fa-css-prefix}-life-ring:before { + content: @fa-var-life-ring; +} +.@{fa-css-prefix}-circle-o-notch:before { + content: @fa-var-circle-o-notch; +} .@{fa-css-prefix}-ra:before, -.@{fa-css-prefix}-rebel:before { content: @fa-var-rebel; } +.@{fa-css-prefix}-rebel:before { + content: @fa-var-rebel; +} .@{fa-css-prefix}-ge:before, -.@{fa-css-prefix}-empire:before { content: @fa-var-empire; } -.@{fa-css-prefix}-git-square:before { content: @fa-var-git-square; } -.@{fa-css-prefix}-git:before { content: @fa-var-git; } -.@{fa-css-prefix}-hacker-news:before { content: @fa-var-hacker-news; } -.@{fa-css-prefix}-tencent-weibo:before { content: @fa-var-tencent-weibo; } -.@{fa-css-prefix}-qq:before { content: @fa-var-qq; } +.@{fa-css-prefix}-empire:before { + content: @fa-var-empire; +} +.@{fa-css-prefix}-git-square:before { + content: @fa-var-git-square; +} +.@{fa-css-prefix}-git:before { + content: @fa-var-git; +} +.@{fa-css-prefix}-hacker-news:before { + content: @fa-var-hacker-news; +} +.@{fa-css-prefix}-tencent-weibo:before { + content: @fa-var-tencent-weibo; +} +.@{fa-css-prefix}-qq:before { + content: @fa-var-qq; +} .@{fa-css-prefix}-wechat:before, -.@{fa-css-prefix}-weixin:before { content: @fa-var-weixin; } +.@{fa-css-prefix}-weixin:before { + content: @fa-var-weixin; +} .@{fa-css-prefix}-send:before, -.@{fa-css-prefix}-paper-plane:before { content: @fa-var-paper-plane; } +.@{fa-css-prefix}-paper-plane:before { + content: @fa-var-paper-plane; +} .@{fa-css-prefix}-send-o:before, -.@{fa-css-prefix}-paper-plane-o:before { content: @fa-var-paper-plane-o; } -.@{fa-css-prefix}-history:before { content: @fa-var-history; } -.@{fa-css-prefix}-circle-thin:before { content: @fa-var-circle-thin; } -.@{fa-css-prefix}-header:before { content: @fa-var-header; } -.@{fa-css-prefix}-paragraph:before { content: @fa-var-paragraph; } -.@{fa-css-prefix}-sliders:before { content: @fa-var-sliders; } -.@{fa-css-prefix}-share-alt:before { content: @fa-var-share-alt; } -.@{fa-css-prefix}-share-alt-square:before { content: @fa-var-share-alt-square; } -.@{fa-css-prefix}-bomb:before { content: @fa-var-bomb; } +.@{fa-css-prefix}-paper-plane-o:before { + content: @fa-var-paper-plane-o; +} +.@{fa-css-prefix}-history:before { + content: @fa-var-history; +} +.@{fa-css-prefix}-circle-thin:before { + content: @fa-var-circle-thin; +} +.@{fa-css-prefix}-header:before { + content: @fa-var-header; +} +.@{fa-css-prefix}-paragraph:before { + content: @fa-var-paragraph; +} +.@{fa-css-prefix}-sliders:before { + content: @fa-var-sliders; +} +.@{fa-css-prefix}-share-alt:before { + content: @fa-var-share-alt; +} +.@{fa-css-prefix}-share-alt-square:before { + content: @fa-var-share-alt-square; +} +.@{fa-css-prefix}-bomb:before { + content: @fa-var-bomb; +} diff --git a/docs/src/css/less/fontawesome/larger.less b/docs/src/css/less/fontawesome/larger.less index c9d64677..0f84e7d6 100644 --- a/docs/src/css/less/fontawesome/larger.less +++ b/docs/src/css/less/fontawesome/larger.less @@ -3,11 +3,19 @@ /* makes the font 33% larger relative to the icon container */ .@{fa-css-prefix}-lg { - font-size: (4em / 3); - line-height: (3em / 4); - vertical-align: -15%; -} -.@{fa-css-prefix}-2x { font-size: 2em; } -.@{fa-css-prefix}-3x { font-size: 3em; } -.@{fa-css-prefix}-4x { font-size: 4em; } -.@{fa-css-prefix}-5x { font-size: 5em; } + font-size: (4em / 3); + line-height: (3em / 4); + vertical-align: -15%; +} +.@{fa-css-prefix}-2x { + font-size: 2em; +} +.@{fa-css-prefix}-3x { + font-size: 3em; +} +.@{fa-css-prefix}-4x { + font-size: 4em; +} +.@{fa-css-prefix}-5x { + font-size: 5em; +} diff --git a/docs/src/css/less/fontawesome/list.less b/docs/src/css/less/fontawesome/list.less index eed93405..1de22510 100644 --- a/docs/src/css/less/fontawesome/list.less +++ b/docs/src/css/less/fontawesome/list.less @@ -2,18 +2,20 @@ // ------------------------- .@{fa-css-prefix}-ul { - padding-left: 0; - margin-left: @fa-li-width; - list-style-type: none; - > li { position: relative; } + padding-left: 0; + margin-left: @fa-li-width; + list-style-type: none; + > li { + position: relative; + } } .@{fa-css-prefix}-li { - position: absolute; - left: -@fa-li-width; - width: @fa-li-width; - top: (2em / 14); - text-align: center; - &.@{fa-css-prefix}-lg { - left: -@fa-li-width + (4em / 14); - } + position: absolute; + left: -@fa-li-width; + width: @fa-li-width; + top: (2em / 14); + text-align: center; + &.@{fa-css-prefix}-lg { + left: -@fa-li-width + (4em / 14); + } } diff --git a/docs/src/css/less/fontawesome/mixins.less b/docs/src/css/less/fontawesome/mixins.less index 19e5a645..64958f14 100644 --- a/docs/src/css/less/fontawesome/mixins.less +++ b/docs/src/css/less/fontawesome/mixins.less @@ -2,19 +2,19 @@ // -------------------------- .fa-icon-rotate(@degrees, @rotation) { - filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); - -webkit-transform: rotate(@degrees); - -moz-transform: rotate(@degrees); - -ms-transform: rotate(@degrees); - -o-transform: rotate(@degrees); - transform: rotate(@degrees); + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); + -webkit-transform: rotate(@degrees); + -moz-transform: rotate(@degrees); + -ms-transform: rotate(@degrees); + -o-transform: rotate(@degrees); + transform: rotate(@degrees); } .fa-icon-flip(@horiz, @vert, @rotation) { - filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); - -webkit-transform: scale(@horiz, @vert); - -moz-transform: scale(@horiz, @vert); - -ms-transform: scale(@horiz, @vert); - -o-transform: scale(@horiz, @vert); - transform: scale(@horiz, @vert); + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); + -webkit-transform: scale(@horiz, @vert); + -moz-transform: scale(@horiz, @vert); + -ms-transform: scale(@horiz, @vert); + -o-transform: scale(@horiz, @vert); + transform: scale(@horiz, @vert); } diff --git a/docs/src/css/less/fontawesome/path.less b/docs/src/css/less/fontawesome/path.less index d73bff8b..57c9a799 100644 --- a/docs/src/css/less/fontawesome/path.less +++ b/docs/src/css/less/fontawesome/path.less @@ -2,13 +2,13 @@ * -------------------------- */ @font-face { - font-family: 'FontAwesome'; - src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}')"; - src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype')", - ~"url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff')", - ~"url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype')", - ~"url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg')"; -// src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts - font-weight: normal; - font-style: normal; + font-family: 'FontAwesome'; + src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}')"; + src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype')", + ~"url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff')", + ~"url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype')", + ~"url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg')"; + // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts + font-weight: normal; + font-style: normal; } diff --git a/docs/src/css/less/fontawesome/rotated-flipped.less b/docs/src/css/less/fontawesome/rotated-flipped.less index 8fff3a6c..8dc519b3 100644 --- a/docs/src/css/less/fontawesome/rotated-flipped.less +++ b/docs/src/css/less/fontawesome/rotated-flipped.less @@ -1,9 +1,19 @@ // Rotated & Flipped Icons // ------------------------- -.@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } -.@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } -.@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } +.@{fa-css-prefix}-rotate-90 { + .fa-icon-rotate(90deg, 1); +} +.@{fa-css-prefix}-rotate-180 { + .fa-icon-rotate(180deg, 2); +} +.@{fa-css-prefix}-rotate-270 { + .fa-icon-rotate(270deg, 3); +} -.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } -.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } +.@{fa-css-prefix}-flip-horizontal { + .fa-icon-flip(-1, 1, 0); +} +.@{fa-css-prefix}-flip-vertical { + .fa-icon-flip(1, -1, 2); +} diff --git a/docs/src/css/less/fontawesome/spinning.less b/docs/src/css/less/fontawesome/spinning.less index 06b71ecb..93a57431 100644 --- a/docs/src/css/less/fontawesome/spinning.less +++ b/docs/src/css/less/fontawesome/spinning.less @@ -2,31 +2,43 @@ // -------------------------- .@{fa-css-prefix}-spin { - -webkit-animation: spin 2s infinite linear; - -moz-animation: spin 2s infinite linear; - -o-animation: spin 2s infinite linear; - animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; } @-moz-keyframes spin { - 0% { -moz-transform: rotate(0deg); } - 100% { -moz-transform: rotate(359deg); } + 0% { + -moz-transform: rotate(0deg); + } + 100% { + -moz-transform: rotate(359deg); + } } @-webkit-keyframes spin { - 0% { -webkit-transform: rotate(0deg); } - 100% { -webkit-transform: rotate(359deg); } + 0% { + -webkit-transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + } } @-o-keyframes spin { - 0% { -o-transform: rotate(0deg); } - 100% { -o-transform: rotate(359deg); } + 0% { + -o-transform: rotate(0deg); + } + 100% { + -o-transform: rotate(359deg); + } } @keyframes spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } } diff --git a/docs/src/css/less/fontawesome/stacked.less b/docs/src/css/less/fontawesome/stacked.less index fc53fb0e..a4f51c23 100644 --- a/docs/src/css/less/fontawesome/stacked.less +++ b/docs/src/css/less/fontawesome/stacked.less @@ -2,19 +2,26 @@ // ------------------------- .@{fa-css-prefix}-stack { - position: relative; - display: inline-block; - width: 2em; - height: 2em; - line-height: 2em; - vertical-align: middle; + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; } -.@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { - position: absolute; - left: 0; - width: 100%; - text-align: center; +.@{fa-css-prefix}-stack-1x, +.@{fa-css-prefix}-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.@{fa-css-prefix}-stack-1x { + line-height: inherit; +} +.@{fa-css-prefix}-stack-2x { + font-size: 2em; +} +.@{fa-css-prefix}-inverse { + color: @fa-inverse; } -.@{fa-css-prefix}-stack-1x { line-height: inherit; } -.@{fa-css-prefix}-stack-2x { font-size: 2em; } -.@{fa-css-prefix}-inverse { color: @fa-inverse; } diff --git a/docs/src/css/less/fontawesome/variables.less b/docs/src/css/less/fontawesome/variables.less index 203befd5..99c32eee 100644 --- a/docs/src/css/less/fontawesome/variables.less +++ b/docs/src/css/less/fontawesome/variables.less @@ -1,515 +1,514 @@ // Variables // -------------------------- -@fa-font-path: "/fonts"; +@fa-font-path: '/fonts'; //@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.1.0/fonts"; // for referencing Bootstrap CDN font files directly -@fa-css-prefix: fa; -@fa-version: "4.1.0"; -@fa-border-color: #eee; -@fa-inverse: #fff; -@fa-li-width: (30em / 14); - -@fa-var-adjust: "\f042"; -@fa-var-adn: "\f170"; -@fa-var-align-center: "\f037"; -@fa-var-align-justify: "\f039"; -@fa-var-align-left: "\f036"; -@fa-var-align-right: "\f038"; -@fa-var-ambulance: "\f0f9"; -@fa-var-anchor: "\f13d"; -@fa-var-android: "\f17b"; -@fa-var-angle-double-down: "\f103"; -@fa-var-angle-double-left: "\f100"; -@fa-var-angle-double-right: "\f101"; -@fa-var-angle-double-up: "\f102"; -@fa-var-angle-down: "\f107"; -@fa-var-angle-left: "\f104"; -@fa-var-angle-right: "\f105"; -@fa-var-angle-up: "\f106"; -@fa-var-apple: "\f179"; -@fa-var-archive: "\f187"; -@fa-var-arrow-circle-down: "\f0ab"; -@fa-var-arrow-circle-left: "\f0a8"; -@fa-var-arrow-circle-o-down: "\f01a"; -@fa-var-arrow-circle-o-left: "\f190"; -@fa-var-arrow-circle-o-right: "\f18e"; -@fa-var-arrow-circle-o-up: "\f01b"; -@fa-var-arrow-circle-right: "\f0a9"; -@fa-var-arrow-circle-up: "\f0aa"; -@fa-var-arrow-down: "\f063"; -@fa-var-arrow-left: "\f060"; -@fa-var-arrow-right: "\f061"; -@fa-var-arrow-up: "\f062"; -@fa-var-arrows: "\f047"; -@fa-var-arrows-alt: "\f0b2"; -@fa-var-arrows-h: "\f07e"; -@fa-var-arrows-v: "\f07d"; -@fa-var-asterisk: "\f069"; -@fa-var-automobile: "\f1b9"; -@fa-var-backward: "\f04a"; -@fa-var-ban: "\f05e"; -@fa-var-bank: "\f19c"; -@fa-var-bar-chart-o: "\f080"; -@fa-var-barcode: "\f02a"; -@fa-var-bars: "\f0c9"; -@fa-var-beer: "\f0fc"; -@fa-var-behance: "\f1b4"; -@fa-var-behance-square: "\f1b5"; -@fa-var-bell: "\f0f3"; -@fa-var-bell-o: "\f0a2"; -@fa-var-bitbucket: "\f171"; -@fa-var-bitbucket-square: "\f172"; -@fa-var-bitcoin: "\f15a"; -@fa-var-bold: "\f032"; -@fa-var-bolt: "\f0e7"; -@fa-var-bomb: "\f1e2"; -@fa-var-book: "\f02d"; -@fa-var-bookmark: "\f02e"; -@fa-var-bookmark-o: "\f097"; -@fa-var-briefcase: "\f0b1"; -@fa-var-btc: "\f15a"; -@fa-var-bug: "\f188"; -@fa-var-building: "\f1ad"; -@fa-var-building-o: "\f0f7"; -@fa-var-bullhorn: "\f0a1"; -@fa-var-bullseye: "\f140"; -@fa-var-cab: "\f1ba"; -@fa-var-calendar: "\f073"; -@fa-var-calendar-o: "\f133"; -@fa-var-camera: "\f030"; -@fa-var-camera-retro: "\f083"; -@fa-var-car: "\f1b9"; -@fa-var-caret-down: "\f0d7"; -@fa-var-caret-left: "\f0d9"; -@fa-var-caret-right: "\f0da"; -@fa-var-caret-square-o-down: "\f150"; -@fa-var-caret-square-o-left: "\f191"; -@fa-var-caret-square-o-right: "\f152"; -@fa-var-caret-square-o-up: "\f151"; -@fa-var-caret-up: "\f0d8"; -@fa-var-certificate: "\f0a3"; -@fa-var-chain: "\f0c1"; -@fa-var-chain-broken: "\f127"; -@fa-var-check: "\f00c"; -@fa-var-check-circle: "\f058"; -@fa-var-check-circle-o: "\f05d"; -@fa-var-check-square: "\f14a"; -@fa-var-check-square-o: "\f046"; -@fa-var-chevron-circle-down: "\f13a"; -@fa-var-chevron-circle-left: "\f137"; -@fa-var-chevron-circle-right: "\f138"; -@fa-var-chevron-circle-up: "\f139"; -@fa-var-chevron-down: "\f078"; -@fa-var-chevron-left: "\f053"; -@fa-var-chevron-right: "\f054"; -@fa-var-chevron-up: "\f077"; -@fa-var-child: "\f1ae"; -@fa-var-circle: "\f111"; -@fa-var-circle-o: "\f10c"; -@fa-var-circle-o-notch: "\f1ce"; -@fa-var-circle-thin: "\f1db"; -@fa-var-clipboard: "\f0ea"; -@fa-var-clock-o: "\f017"; -@fa-var-cloud: "\f0c2"; -@fa-var-cloud-download: "\f0ed"; -@fa-var-cloud-upload: "\f0ee"; -@fa-var-cny: "\f157"; -@fa-var-code: "\f121"; -@fa-var-code-fork: "\f126"; -@fa-var-codepen: "\f1cb"; -@fa-var-coffee: "\f0f4"; -@fa-var-cog: "\f013"; -@fa-var-cogs: "\f085"; -@fa-var-columns: "\f0db"; -@fa-var-comment: "\f075"; -@fa-var-comment-o: "\f0e5"; -@fa-var-comments: "\f086"; -@fa-var-comments-o: "\f0e6"; -@fa-var-compass: "\f14e"; -@fa-var-compress: "\f066"; -@fa-var-copy: "\f0c5"; -@fa-var-credit-card: "\f09d"; -@fa-var-crop: "\f125"; -@fa-var-crosshairs: "\f05b"; -@fa-var-css3: "\f13c"; -@fa-var-cube: "\f1b2"; -@fa-var-cubes: "\f1b3"; -@fa-var-cut: "\f0c4"; -@fa-var-cutlery: "\f0f5"; -@fa-var-dashboard: "\f0e4"; -@fa-var-database: "\f1c0"; -@fa-var-dedent: "\f03b"; -@fa-var-delicious: "\f1a5"; -@fa-var-desktop: "\f108"; -@fa-var-deviantart: "\f1bd"; -@fa-var-digg: "\f1a6"; -@fa-var-dollar: "\f155"; -@fa-var-dot-circle-o: "\f192"; -@fa-var-download: "\f019"; -@fa-var-dribbble: "\f17d"; -@fa-var-dropbox: "\f16b"; -@fa-var-drupal: "\f1a9"; -@fa-var-edit: "\f044"; -@fa-var-eject: "\f052"; -@fa-var-ellipsis-h: "\f141"; -@fa-var-ellipsis-v: "\f142"; -@fa-var-empire: "\f1d1"; -@fa-var-envelope: "\f0e0"; -@fa-var-envelope-o: "\f003"; -@fa-var-envelope-square: "\f199"; -@fa-var-eraser: "\f12d"; -@fa-var-eur: "\f153"; -@fa-var-euro: "\f153"; -@fa-var-exchange: "\f0ec"; -@fa-var-exclamation: "\f12a"; -@fa-var-exclamation-circle: "\f06a"; -@fa-var-exclamation-triangle: "\f071"; -@fa-var-expand: "\f065"; -@fa-var-external-link: "\f08e"; -@fa-var-external-link-square: "\f14c"; -@fa-var-eye: "\f06e"; -@fa-var-eye-slash: "\f070"; -@fa-var-facebook: "\f09a"; -@fa-var-facebook-square: "\f082"; -@fa-var-fast-backward: "\f049"; -@fa-var-fast-forward: "\f050"; -@fa-var-fax: "\f1ac"; -@fa-var-female: "\f182"; -@fa-var-fighter-jet: "\f0fb"; -@fa-var-file: "\f15b"; -@fa-var-file-archive-o: "\f1c6"; -@fa-var-file-audio-o: "\f1c7"; -@fa-var-file-code-o: "\f1c9"; -@fa-var-file-excel-o: "\f1c3"; -@fa-var-file-image-o: "\f1c5"; -@fa-var-file-movie-o: "\f1c8"; -@fa-var-file-o: "\f016"; -@fa-var-file-pdf-o: "\f1c1"; -@fa-var-file-photo-o: "\f1c5"; -@fa-var-file-picture-o: "\f1c5"; -@fa-var-file-powerpoint-o: "\f1c4"; -@fa-var-file-sound-o: "\f1c7"; -@fa-var-file-text: "\f15c"; -@fa-var-file-text-o: "\f0f6"; -@fa-var-file-video-o: "\f1c8"; -@fa-var-file-word-o: "\f1c2"; -@fa-var-file-zip-o: "\f1c6"; -@fa-var-files-o: "\f0c5"; -@fa-var-film: "\f008"; -@fa-var-filter: "\f0b0"; -@fa-var-fire: "\f06d"; -@fa-var-fire-extinguisher: "\f134"; -@fa-var-flag: "\f024"; -@fa-var-flag-checkered: "\f11e"; -@fa-var-flag-o: "\f11d"; -@fa-var-flash: "\f0e7"; -@fa-var-flask: "\f0c3"; -@fa-var-flickr: "\f16e"; -@fa-var-floppy-o: "\f0c7"; -@fa-var-folder: "\f07b"; -@fa-var-folder-o: "\f114"; -@fa-var-folder-open: "\f07c"; -@fa-var-folder-open-o: "\f115"; -@fa-var-font: "\f031"; -@fa-var-forward: "\f04e"; -@fa-var-foursquare: "\f180"; -@fa-var-frown-o: "\f119"; -@fa-var-gamepad: "\f11b"; -@fa-var-gavel: "\f0e3"; -@fa-var-gbp: "\f154"; -@fa-var-ge: "\f1d1"; -@fa-var-gear: "\f013"; -@fa-var-gears: "\f085"; -@fa-var-gift: "\f06b"; -@fa-var-git: "\f1d3"; -@fa-var-git-square: "\f1d2"; -@fa-var-github: "\f09b"; -@fa-var-github-alt: "\f113"; -@fa-var-github-square: "\f092"; -@fa-var-gittip: "\f184"; -@fa-var-glass: "\f000"; -@fa-var-globe: "\f0ac"; -@fa-var-google: "\f1a0"; -@fa-var-google-plus: "\f0d5"; -@fa-var-google-plus-square: "\f0d4"; -@fa-var-graduation-cap: "\f19d"; -@fa-var-group: "\f0c0"; -@fa-var-h-square: "\f0fd"; -@fa-var-hacker-news: "\f1d4"; -@fa-var-hand-o-down: "\f0a7"; -@fa-var-hand-o-left: "\f0a5"; -@fa-var-hand-o-right: "\f0a4"; -@fa-var-hand-o-up: "\f0a6"; -@fa-var-hdd-o: "\f0a0"; -@fa-var-header: "\f1dc"; -@fa-var-headphones: "\f025"; -@fa-var-heart: "\f004"; -@fa-var-heart-o: "\f08a"; -@fa-var-history: "\f1da"; -@fa-var-home: "\f015"; -@fa-var-hospital-o: "\f0f8"; -@fa-var-html5: "\f13b"; -@fa-var-image: "\f03e"; -@fa-var-inbox: "\f01c"; -@fa-var-indent: "\f03c"; -@fa-var-info: "\f129"; -@fa-var-info-circle: "\f05a"; -@fa-var-inr: "\f156"; -@fa-var-instagram: "\f16d"; -@fa-var-institution: "\f19c"; -@fa-var-italic: "\f033"; -@fa-var-joomla: "\f1aa"; -@fa-var-jpy: "\f157"; -@fa-var-jsfiddle: "\f1cc"; -@fa-var-key: "\f084"; -@fa-var-keyboard-o: "\f11c"; -@fa-var-krw: "\f159"; -@fa-var-language: "\f1ab"; -@fa-var-laptop: "\f109"; -@fa-var-leaf: "\f06c"; -@fa-var-legal: "\f0e3"; -@fa-var-lemon-o: "\f094"; -@fa-var-level-down: "\f149"; -@fa-var-level-up: "\f148"; -@fa-var-life-bouy: "\f1cd"; -@fa-var-life-ring: "\f1cd"; -@fa-var-life-saver: "\f1cd"; -@fa-var-lightbulb-o: "\f0eb"; -@fa-var-link: "\f0c1"; -@fa-var-linkedin: "\f0e1"; -@fa-var-linkedin-square: "\f08c"; -@fa-var-linux: "\f17c"; -@fa-var-list: "\f03a"; -@fa-var-list-alt: "\f022"; -@fa-var-list-ol: "\f0cb"; -@fa-var-list-ul: "\f0ca"; -@fa-var-location-arrow: "\f124"; -@fa-var-lock: "\f023"; -@fa-var-long-arrow-down: "\f175"; -@fa-var-long-arrow-left: "\f177"; -@fa-var-long-arrow-right: "\f178"; -@fa-var-long-arrow-up: "\f176"; -@fa-var-magic: "\f0d0"; -@fa-var-magnet: "\f076"; -@fa-var-mail-forward: "\f064"; -@fa-var-mail-reply: "\f112"; -@fa-var-mail-reply-all: "\f122"; -@fa-var-male: "\f183"; -@fa-var-map-marker: "\f041"; -@fa-var-maxcdn: "\f136"; -@fa-var-medkit: "\f0fa"; -@fa-var-meh-o: "\f11a"; -@fa-var-microphone: "\f130"; -@fa-var-microphone-slash: "\f131"; -@fa-var-minus: "\f068"; -@fa-var-minus-circle: "\f056"; -@fa-var-minus-square: "\f146"; -@fa-var-minus-square-o: "\f147"; -@fa-var-mobile: "\f10b"; -@fa-var-mobile-phone: "\f10b"; -@fa-var-money: "\f0d6"; -@fa-var-moon-o: "\f186"; -@fa-var-mortar-board: "\f19d"; -@fa-var-music: "\f001"; -@fa-var-navicon: "\f0c9"; -@fa-var-openid: "\f19b"; -@fa-var-outdent: "\f03b"; -@fa-var-pagelines: "\f18c"; -@fa-var-paper-plane: "\f1d8"; -@fa-var-paper-plane-o: "\f1d9"; -@fa-var-paperclip: "\f0c6"; -@fa-var-paragraph: "\f1dd"; -@fa-var-paste: "\f0ea"; -@fa-var-pause: "\f04c"; -@fa-var-paw: "\f1b0"; -@fa-var-pencil: "\f040"; -@fa-var-pencil-square: "\f14b"; -@fa-var-pencil-square-o: "\f044"; -@fa-var-phone: "\f095"; -@fa-var-phone-square: "\f098"; -@fa-var-photo: "\f03e"; -@fa-var-picture-o: "\f03e"; -@fa-var-pied-piper: "\f1a7"; -@fa-var-pied-piper-alt: "\f1a8"; -@fa-var-pied-piper-square: "\f1a7"; -@fa-var-pinterest: "\f0d2"; -@fa-var-pinterest-square: "\f0d3"; -@fa-var-plane: "\f072"; -@fa-var-play: "\f04b"; -@fa-var-play-circle: "\f144"; -@fa-var-play-circle-o: "\f01d"; -@fa-var-plus: "\f067"; -@fa-var-plus-circle: "\f055"; -@fa-var-plus-square: "\f0fe"; -@fa-var-plus-square-o: "\f196"; -@fa-var-power-off: "\f011"; -@fa-var-print: "\f02f"; -@fa-var-puzzle-piece: "\f12e"; -@fa-var-qq: "\f1d6"; -@fa-var-qrcode: "\f029"; -@fa-var-question: "\f128"; -@fa-var-question-circle: "\f059"; -@fa-var-quote-left: "\f10d"; -@fa-var-quote-right: "\f10e"; -@fa-var-ra: "\f1d0"; -@fa-var-random: "\f074"; -@fa-var-rebel: "\f1d0"; -@fa-var-recycle: "\f1b8"; -@fa-var-reddit: "\f1a1"; -@fa-var-reddit-square: "\f1a2"; -@fa-var-refresh: "\f021"; -@fa-var-renren: "\f18b"; -@fa-var-reorder: "\f0c9"; -@fa-var-repeat: "\f01e"; -@fa-var-reply: "\f112"; -@fa-var-reply-all: "\f122"; -@fa-var-retweet: "\f079"; -@fa-var-rmb: "\f157"; -@fa-var-road: "\f018"; -@fa-var-rocket: "\f135"; -@fa-var-rotate-left: "\f0e2"; -@fa-var-rotate-right: "\f01e"; -@fa-var-rouble: "\f158"; -@fa-var-rss: "\f09e"; -@fa-var-rss-square: "\f143"; -@fa-var-rub: "\f158"; -@fa-var-ruble: "\f158"; -@fa-var-rupee: "\f156"; -@fa-var-save: "\f0c7"; -@fa-var-scissors: "\f0c4"; -@fa-var-search: "\f002"; -@fa-var-search-minus: "\f010"; -@fa-var-search-plus: "\f00e"; -@fa-var-send: "\f1d8"; -@fa-var-send-o: "\f1d9"; -@fa-var-share: "\f064"; -@fa-var-share-alt: "\f1e0"; -@fa-var-share-alt-square: "\f1e1"; -@fa-var-share-square: "\f14d"; -@fa-var-share-square-o: "\f045"; -@fa-var-shield: "\f132"; -@fa-var-shopping-cart: "\f07a"; -@fa-var-sign-in: "\f090"; -@fa-var-sign-out: "\f08b"; -@fa-var-signal: "\f012"; -@fa-var-sitemap: "\f0e8"; -@fa-var-skype: "\f17e"; -@fa-var-slack: "\f198"; -@fa-var-sliders: "\f1de"; -@fa-var-smile-o: "\f118"; -@fa-var-sort: "\f0dc"; -@fa-var-sort-alpha-asc: "\f15d"; -@fa-var-sort-alpha-desc: "\f15e"; -@fa-var-sort-amount-asc: "\f160"; -@fa-var-sort-amount-desc: "\f161"; -@fa-var-sort-asc: "\f0de"; -@fa-var-sort-desc: "\f0dd"; -@fa-var-sort-down: "\f0dd"; -@fa-var-sort-numeric-asc: "\f162"; -@fa-var-sort-numeric-desc: "\f163"; -@fa-var-sort-up: "\f0de"; -@fa-var-soundcloud: "\f1be"; -@fa-var-space-shuttle: "\f197"; -@fa-var-spinner: "\f110"; -@fa-var-spoon: "\f1b1"; -@fa-var-spotify: "\f1bc"; -@fa-var-square: "\f0c8"; -@fa-var-square-o: "\f096"; -@fa-var-stack-exchange: "\f18d"; -@fa-var-stack-overflow: "\f16c"; -@fa-var-star: "\f005"; -@fa-var-star-half: "\f089"; -@fa-var-star-half-empty: "\f123"; -@fa-var-star-half-full: "\f123"; -@fa-var-star-half-o: "\f123"; -@fa-var-star-o: "\f006"; -@fa-var-steam: "\f1b6"; -@fa-var-steam-square: "\f1b7"; -@fa-var-step-backward: "\f048"; -@fa-var-step-forward: "\f051"; -@fa-var-stethoscope: "\f0f1"; -@fa-var-stop: "\f04d"; -@fa-var-strikethrough: "\f0cc"; -@fa-var-stumbleupon: "\f1a4"; -@fa-var-stumbleupon-circle: "\f1a3"; -@fa-var-subscript: "\f12c"; -@fa-var-suitcase: "\f0f2"; -@fa-var-sun-o: "\f185"; -@fa-var-superscript: "\f12b"; -@fa-var-support: "\f1cd"; -@fa-var-table: "\f0ce"; -@fa-var-tablet: "\f10a"; -@fa-var-tachometer: "\f0e4"; -@fa-var-tag: "\f02b"; -@fa-var-tags: "\f02c"; -@fa-var-tasks: "\f0ae"; -@fa-var-taxi: "\f1ba"; -@fa-var-tencent-weibo: "\f1d5"; -@fa-var-terminal: "\f120"; -@fa-var-text-height: "\f034"; -@fa-var-text-width: "\f035"; -@fa-var-th: "\f00a"; -@fa-var-th-large: "\f009"; -@fa-var-th-list: "\f00b"; -@fa-var-thumb-tack: "\f08d"; -@fa-var-thumbs-down: "\f165"; -@fa-var-thumbs-o-down: "\f088"; -@fa-var-thumbs-o-up: "\f087"; -@fa-var-thumbs-up: "\f164"; -@fa-var-ticket: "\f145"; -@fa-var-times: "\f00d"; -@fa-var-times-circle: "\f057"; -@fa-var-times-circle-o: "\f05c"; -@fa-var-tint: "\f043"; -@fa-var-toggle-down: "\f150"; -@fa-var-toggle-left: "\f191"; -@fa-var-toggle-right: "\f152"; -@fa-var-toggle-up: "\f151"; -@fa-var-trash-o: "\f014"; -@fa-var-tree: "\f1bb"; -@fa-var-trello: "\f181"; -@fa-var-trophy: "\f091"; -@fa-var-truck: "\f0d1"; -@fa-var-try: "\f195"; -@fa-var-tumblr: "\f173"; -@fa-var-tumblr-square: "\f174"; -@fa-var-turkish-lira: "\f195"; -@fa-var-twitter: "\f099"; -@fa-var-twitter-square: "\f081"; -@fa-var-umbrella: "\f0e9"; -@fa-var-underline: "\f0cd"; -@fa-var-undo: "\f0e2"; -@fa-var-university: "\f19c"; -@fa-var-unlink: "\f127"; -@fa-var-unlock: "\f09c"; -@fa-var-unlock-alt: "\f13e"; -@fa-var-unsorted: "\f0dc"; -@fa-var-upload: "\f093"; -@fa-var-usd: "\f155"; -@fa-var-user: "\f007"; -@fa-var-user-md: "\f0f0"; -@fa-var-users: "\f0c0"; -@fa-var-video-camera: "\f03d"; -@fa-var-vimeo-square: "\f194"; -@fa-var-vine: "\f1ca"; -@fa-var-vk: "\f189"; -@fa-var-volume-down: "\f027"; -@fa-var-volume-off: "\f026"; -@fa-var-volume-up: "\f028"; -@fa-var-warning: "\f071"; -@fa-var-wechat: "\f1d7"; -@fa-var-weibo: "\f18a"; -@fa-var-weixin: "\f1d7"; -@fa-var-wheelchair: "\f193"; -@fa-var-windows: "\f17a"; -@fa-var-won: "\f159"; -@fa-var-wordpress: "\f19a"; -@fa-var-wrench: "\f0ad"; -@fa-var-xing: "\f168"; -@fa-var-xing-square: "\f169"; -@fa-var-yahoo: "\f19e"; -@fa-var-yen: "\f157"; -@fa-var-youtube: "\f167"; -@fa-var-youtube-play: "\f16a"; -@fa-var-youtube-square: "\f166"; +@fa-css-prefix: fa; +@fa-version: '4.1.0'; +@fa-border-color: #eee; +@fa-inverse: #fff; +@fa-li-width: (30em / 14); +@fa-var-adjust: '\f042'; +@fa-var-adn: '\f170'; +@fa-var-align-center: '\f037'; +@fa-var-align-justify: '\f039'; +@fa-var-align-left: '\f036'; +@fa-var-align-right: '\f038'; +@fa-var-ambulance: '\f0f9'; +@fa-var-anchor: '\f13d'; +@fa-var-android: '\f17b'; +@fa-var-angle-double-down: '\f103'; +@fa-var-angle-double-left: '\f100'; +@fa-var-angle-double-right: '\f101'; +@fa-var-angle-double-up: '\f102'; +@fa-var-angle-down: '\f107'; +@fa-var-angle-left: '\f104'; +@fa-var-angle-right: '\f105'; +@fa-var-angle-up: '\f106'; +@fa-var-apple: '\f179'; +@fa-var-archive: '\f187'; +@fa-var-arrow-circle-down: '\f0ab'; +@fa-var-arrow-circle-left: '\f0a8'; +@fa-var-arrow-circle-o-down: '\f01a'; +@fa-var-arrow-circle-o-left: '\f190'; +@fa-var-arrow-circle-o-right: '\f18e'; +@fa-var-arrow-circle-o-up: '\f01b'; +@fa-var-arrow-circle-right: '\f0a9'; +@fa-var-arrow-circle-up: '\f0aa'; +@fa-var-arrow-down: '\f063'; +@fa-var-arrow-left: '\f060'; +@fa-var-arrow-right: '\f061'; +@fa-var-arrow-up: '\f062'; +@fa-var-arrows: '\f047'; +@fa-var-arrows-alt: '\f0b2'; +@fa-var-arrows-h: '\f07e'; +@fa-var-arrows-v: '\f07d'; +@fa-var-asterisk: '\f069'; +@fa-var-automobile: '\f1b9'; +@fa-var-backward: '\f04a'; +@fa-var-ban: '\f05e'; +@fa-var-bank: '\f19c'; +@fa-var-bar-chart-o: '\f080'; +@fa-var-barcode: '\f02a'; +@fa-var-bars: '\f0c9'; +@fa-var-beer: '\f0fc'; +@fa-var-behance: '\f1b4'; +@fa-var-behance-square: '\f1b5'; +@fa-var-bell: '\f0f3'; +@fa-var-bell-o: '\f0a2'; +@fa-var-bitbucket: '\f171'; +@fa-var-bitbucket-square: '\f172'; +@fa-var-bitcoin: '\f15a'; +@fa-var-bold: '\f032'; +@fa-var-bolt: '\f0e7'; +@fa-var-bomb: '\f1e2'; +@fa-var-book: '\f02d'; +@fa-var-bookmark: '\f02e'; +@fa-var-bookmark-o: '\f097'; +@fa-var-briefcase: '\f0b1'; +@fa-var-btc: '\f15a'; +@fa-var-bug: '\f188'; +@fa-var-building: '\f1ad'; +@fa-var-building-o: '\f0f7'; +@fa-var-bullhorn: '\f0a1'; +@fa-var-bullseye: '\f140'; +@fa-var-cab: '\f1ba'; +@fa-var-calendar: '\f073'; +@fa-var-calendar-o: '\f133'; +@fa-var-camera: '\f030'; +@fa-var-camera-retro: '\f083'; +@fa-var-car: '\f1b9'; +@fa-var-caret-down: '\f0d7'; +@fa-var-caret-left: '\f0d9'; +@fa-var-caret-right: '\f0da'; +@fa-var-caret-square-o-down: '\f150'; +@fa-var-caret-square-o-left: '\f191'; +@fa-var-caret-square-o-right: '\f152'; +@fa-var-caret-square-o-up: '\f151'; +@fa-var-caret-up: '\f0d8'; +@fa-var-certificate: '\f0a3'; +@fa-var-chain: '\f0c1'; +@fa-var-chain-broken: '\f127'; +@fa-var-check: '\f00c'; +@fa-var-check-circle: '\f058'; +@fa-var-check-circle-o: '\f05d'; +@fa-var-check-square: '\f14a'; +@fa-var-check-square-o: '\f046'; +@fa-var-chevron-circle-down: '\f13a'; +@fa-var-chevron-circle-left: '\f137'; +@fa-var-chevron-circle-right: '\f138'; +@fa-var-chevron-circle-up: '\f139'; +@fa-var-chevron-down: '\f078'; +@fa-var-chevron-left: '\f053'; +@fa-var-chevron-right: '\f054'; +@fa-var-chevron-up: '\f077'; +@fa-var-child: '\f1ae'; +@fa-var-circle: '\f111'; +@fa-var-circle-o: '\f10c'; +@fa-var-circle-o-notch: '\f1ce'; +@fa-var-circle-thin: '\f1db'; +@fa-var-clipboard: '\f0ea'; +@fa-var-clock-o: '\f017'; +@fa-var-cloud: '\f0c2'; +@fa-var-cloud-download: '\f0ed'; +@fa-var-cloud-upload: '\f0ee'; +@fa-var-cny: '\f157'; +@fa-var-code: '\f121'; +@fa-var-code-fork: '\f126'; +@fa-var-codepen: '\f1cb'; +@fa-var-coffee: '\f0f4'; +@fa-var-cog: '\f013'; +@fa-var-cogs: '\f085'; +@fa-var-columns: '\f0db'; +@fa-var-comment: '\f075'; +@fa-var-comment-o: '\f0e5'; +@fa-var-comments: '\f086'; +@fa-var-comments-o: '\f0e6'; +@fa-var-compass: '\f14e'; +@fa-var-compress: '\f066'; +@fa-var-copy: '\f0c5'; +@fa-var-credit-card: '\f09d'; +@fa-var-crop: '\f125'; +@fa-var-crosshairs: '\f05b'; +@fa-var-css3: '\f13c'; +@fa-var-cube: '\f1b2'; +@fa-var-cubes: '\f1b3'; +@fa-var-cut: '\f0c4'; +@fa-var-cutlery: '\f0f5'; +@fa-var-dashboard: '\f0e4'; +@fa-var-database: '\f1c0'; +@fa-var-dedent: '\f03b'; +@fa-var-delicious: '\f1a5'; +@fa-var-desktop: '\f108'; +@fa-var-deviantart: '\f1bd'; +@fa-var-digg: '\f1a6'; +@fa-var-dollar: '\f155'; +@fa-var-dot-circle-o: '\f192'; +@fa-var-download: '\f019'; +@fa-var-dribbble: '\f17d'; +@fa-var-dropbox: '\f16b'; +@fa-var-drupal: '\f1a9'; +@fa-var-edit: '\f044'; +@fa-var-eject: '\f052'; +@fa-var-ellipsis-h: '\f141'; +@fa-var-ellipsis-v: '\f142'; +@fa-var-empire: '\f1d1'; +@fa-var-envelope: '\f0e0'; +@fa-var-envelope-o: '\f003'; +@fa-var-envelope-square: '\f199'; +@fa-var-eraser: '\f12d'; +@fa-var-eur: '\f153'; +@fa-var-euro: '\f153'; +@fa-var-exchange: '\f0ec'; +@fa-var-exclamation: '\f12a'; +@fa-var-exclamation-circle: '\f06a'; +@fa-var-exclamation-triangle: '\f071'; +@fa-var-expand: '\f065'; +@fa-var-external-link: '\f08e'; +@fa-var-external-link-square: '\f14c'; +@fa-var-eye: '\f06e'; +@fa-var-eye-slash: '\f070'; +@fa-var-facebook: '\f09a'; +@fa-var-facebook-square: '\f082'; +@fa-var-fast-backward: '\f049'; +@fa-var-fast-forward: '\f050'; +@fa-var-fax: '\f1ac'; +@fa-var-female: '\f182'; +@fa-var-fighter-jet: '\f0fb'; +@fa-var-file: '\f15b'; +@fa-var-file-archive-o: '\f1c6'; +@fa-var-file-audio-o: '\f1c7'; +@fa-var-file-code-o: '\f1c9'; +@fa-var-file-excel-o: '\f1c3'; +@fa-var-file-image-o: '\f1c5'; +@fa-var-file-movie-o: '\f1c8'; +@fa-var-file-o: '\f016'; +@fa-var-file-pdf-o: '\f1c1'; +@fa-var-file-photo-o: '\f1c5'; +@fa-var-file-picture-o: '\f1c5'; +@fa-var-file-powerpoint-o: '\f1c4'; +@fa-var-file-sound-o: '\f1c7'; +@fa-var-file-text: '\f15c'; +@fa-var-file-text-o: '\f0f6'; +@fa-var-file-video-o: '\f1c8'; +@fa-var-file-word-o: '\f1c2'; +@fa-var-file-zip-o: '\f1c6'; +@fa-var-files-o: '\f0c5'; +@fa-var-film: '\f008'; +@fa-var-filter: '\f0b0'; +@fa-var-fire: '\f06d'; +@fa-var-fire-extinguisher: '\f134'; +@fa-var-flag: '\f024'; +@fa-var-flag-checkered: '\f11e'; +@fa-var-flag-o: '\f11d'; +@fa-var-flash: '\f0e7'; +@fa-var-flask: '\f0c3'; +@fa-var-flickr: '\f16e'; +@fa-var-floppy-o: '\f0c7'; +@fa-var-folder: '\f07b'; +@fa-var-folder-o: '\f114'; +@fa-var-folder-open: '\f07c'; +@fa-var-folder-open-o: '\f115'; +@fa-var-font: '\f031'; +@fa-var-forward: '\f04e'; +@fa-var-foursquare: '\f180'; +@fa-var-frown-o: '\f119'; +@fa-var-gamepad: '\f11b'; +@fa-var-gavel: '\f0e3'; +@fa-var-gbp: '\f154'; +@fa-var-ge: '\f1d1'; +@fa-var-gear: '\f013'; +@fa-var-gears: '\f085'; +@fa-var-gift: '\f06b'; +@fa-var-git: '\f1d3'; +@fa-var-git-square: '\f1d2'; +@fa-var-github: '\f09b'; +@fa-var-github-alt: '\f113'; +@fa-var-github-square: '\f092'; +@fa-var-gittip: '\f184'; +@fa-var-glass: '\f000'; +@fa-var-globe: '\f0ac'; +@fa-var-google: '\f1a0'; +@fa-var-google-plus: '\f0d5'; +@fa-var-google-plus-square: '\f0d4'; +@fa-var-graduation-cap: '\f19d'; +@fa-var-group: '\f0c0'; +@fa-var-h-square: '\f0fd'; +@fa-var-hacker-news: '\f1d4'; +@fa-var-hand-o-down: '\f0a7'; +@fa-var-hand-o-left: '\f0a5'; +@fa-var-hand-o-right: '\f0a4'; +@fa-var-hand-o-up: '\f0a6'; +@fa-var-hdd-o: '\f0a0'; +@fa-var-header: '\f1dc'; +@fa-var-headphones: '\f025'; +@fa-var-heart: '\f004'; +@fa-var-heart-o: '\f08a'; +@fa-var-history: '\f1da'; +@fa-var-home: '\f015'; +@fa-var-hospital-o: '\f0f8'; +@fa-var-html5: '\f13b'; +@fa-var-image: '\f03e'; +@fa-var-inbox: '\f01c'; +@fa-var-indent: '\f03c'; +@fa-var-info: '\f129'; +@fa-var-info-circle: '\f05a'; +@fa-var-inr: '\f156'; +@fa-var-instagram: '\f16d'; +@fa-var-institution: '\f19c'; +@fa-var-italic: '\f033'; +@fa-var-joomla: '\f1aa'; +@fa-var-jpy: '\f157'; +@fa-var-jsfiddle: '\f1cc'; +@fa-var-key: '\f084'; +@fa-var-keyboard-o: '\f11c'; +@fa-var-krw: '\f159'; +@fa-var-language: '\f1ab'; +@fa-var-laptop: '\f109'; +@fa-var-leaf: '\f06c'; +@fa-var-legal: '\f0e3'; +@fa-var-lemon-o: '\f094'; +@fa-var-level-down: '\f149'; +@fa-var-level-up: '\f148'; +@fa-var-life-bouy: '\f1cd'; +@fa-var-life-ring: '\f1cd'; +@fa-var-life-saver: '\f1cd'; +@fa-var-lightbulb-o: '\f0eb'; +@fa-var-link: '\f0c1'; +@fa-var-linkedin: '\f0e1'; +@fa-var-linkedin-square: '\f08c'; +@fa-var-linux: '\f17c'; +@fa-var-list: '\f03a'; +@fa-var-list-alt: '\f022'; +@fa-var-list-ol: '\f0cb'; +@fa-var-list-ul: '\f0ca'; +@fa-var-location-arrow: '\f124'; +@fa-var-lock: '\f023'; +@fa-var-long-arrow-down: '\f175'; +@fa-var-long-arrow-left: '\f177'; +@fa-var-long-arrow-right: '\f178'; +@fa-var-long-arrow-up: '\f176'; +@fa-var-magic: '\f0d0'; +@fa-var-magnet: '\f076'; +@fa-var-mail-forward: '\f064'; +@fa-var-mail-reply: '\f112'; +@fa-var-mail-reply-all: '\f122'; +@fa-var-male: '\f183'; +@fa-var-map-marker: '\f041'; +@fa-var-maxcdn: '\f136'; +@fa-var-medkit: '\f0fa'; +@fa-var-meh-o: '\f11a'; +@fa-var-microphone: '\f130'; +@fa-var-microphone-slash: '\f131'; +@fa-var-minus: '\f068'; +@fa-var-minus-circle: '\f056'; +@fa-var-minus-square: '\f146'; +@fa-var-minus-square-o: '\f147'; +@fa-var-mobile: '\f10b'; +@fa-var-mobile-phone: '\f10b'; +@fa-var-money: '\f0d6'; +@fa-var-moon-o: '\f186'; +@fa-var-mortar-board: '\f19d'; +@fa-var-music: '\f001'; +@fa-var-navicon: '\f0c9'; +@fa-var-openid: '\f19b'; +@fa-var-outdent: '\f03b'; +@fa-var-pagelines: '\f18c'; +@fa-var-paper-plane: '\f1d8'; +@fa-var-paper-plane-o: '\f1d9'; +@fa-var-paperclip: '\f0c6'; +@fa-var-paragraph: '\f1dd'; +@fa-var-paste: '\f0ea'; +@fa-var-pause: '\f04c'; +@fa-var-paw: '\f1b0'; +@fa-var-pencil: '\f040'; +@fa-var-pencil-square: '\f14b'; +@fa-var-pencil-square-o: '\f044'; +@fa-var-phone: '\f095'; +@fa-var-phone-square: '\f098'; +@fa-var-photo: '\f03e'; +@fa-var-picture-o: '\f03e'; +@fa-var-pied-piper: '\f1a7'; +@fa-var-pied-piper-alt: '\f1a8'; +@fa-var-pied-piper-square: '\f1a7'; +@fa-var-pinterest: '\f0d2'; +@fa-var-pinterest-square: '\f0d3'; +@fa-var-plane: '\f072'; +@fa-var-play: '\f04b'; +@fa-var-play-circle: '\f144'; +@fa-var-play-circle-o: '\f01d'; +@fa-var-plus: '\f067'; +@fa-var-plus-circle: '\f055'; +@fa-var-plus-square: '\f0fe'; +@fa-var-plus-square-o: '\f196'; +@fa-var-power-off: '\f011'; +@fa-var-print: '\f02f'; +@fa-var-puzzle-piece: '\f12e'; +@fa-var-qq: '\f1d6'; +@fa-var-qrcode: '\f029'; +@fa-var-question: '\f128'; +@fa-var-question-circle: '\f059'; +@fa-var-quote-left: '\f10d'; +@fa-var-quote-right: '\f10e'; +@fa-var-ra: '\f1d0'; +@fa-var-random: '\f074'; +@fa-var-rebel: '\f1d0'; +@fa-var-recycle: '\f1b8'; +@fa-var-reddit: '\f1a1'; +@fa-var-reddit-square: '\f1a2'; +@fa-var-refresh: '\f021'; +@fa-var-renren: '\f18b'; +@fa-var-reorder: '\f0c9'; +@fa-var-repeat: '\f01e'; +@fa-var-reply: '\f112'; +@fa-var-reply-all: '\f122'; +@fa-var-retweet: '\f079'; +@fa-var-rmb: '\f157'; +@fa-var-road: '\f018'; +@fa-var-rocket: '\f135'; +@fa-var-rotate-left: '\f0e2'; +@fa-var-rotate-right: '\f01e'; +@fa-var-rouble: '\f158'; +@fa-var-rss: '\f09e'; +@fa-var-rss-square: '\f143'; +@fa-var-rub: '\f158'; +@fa-var-ruble: '\f158'; +@fa-var-rupee: '\f156'; +@fa-var-save: '\f0c7'; +@fa-var-scissors: '\f0c4'; +@fa-var-search: '\f002'; +@fa-var-search-minus: '\f010'; +@fa-var-search-plus: '\f00e'; +@fa-var-send: '\f1d8'; +@fa-var-send-o: '\f1d9'; +@fa-var-share: '\f064'; +@fa-var-share-alt: '\f1e0'; +@fa-var-share-alt-square: '\f1e1'; +@fa-var-share-square: '\f14d'; +@fa-var-share-square-o: '\f045'; +@fa-var-shield: '\f132'; +@fa-var-shopping-cart: '\f07a'; +@fa-var-sign-in: '\f090'; +@fa-var-sign-out: '\f08b'; +@fa-var-signal: '\f012'; +@fa-var-sitemap: '\f0e8'; +@fa-var-skype: '\f17e'; +@fa-var-slack: '\f198'; +@fa-var-sliders: '\f1de'; +@fa-var-smile-o: '\f118'; +@fa-var-sort: '\f0dc'; +@fa-var-sort-alpha-asc: '\f15d'; +@fa-var-sort-alpha-desc: '\f15e'; +@fa-var-sort-amount-asc: '\f160'; +@fa-var-sort-amount-desc: '\f161'; +@fa-var-sort-asc: '\f0de'; +@fa-var-sort-desc: '\f0dd'; +@fa-var-sort-down: '\f0dd'; +@fa-var-sort-numeric-asc: '\f162'; +@fa-var-sort-numeric-desc: '\f163'; +@fa-var-sort-up: '\f0de'; +@fa-var-soundcloud: '\f1be'; +@fa-var-space-shuttle: '\f197'; +@fa-var-spinner: '\f110'; +@fa-var-spoon: '\f1b1'; +@fa-var-spotify: '\f1bc'; +@fa-var-square: '\f0c8'; +@fa-var-square-o: '\f096'; +@fa-var-stack-exchange: '\f18d'; +@fa-var-stack-overflow: '\f16c'; +@fa-var-star: '\f005'; +@fa-var-star-half: '\f089'; +@fa-var-star-half-empty: '\f123'; +@fa-var-star-half-full: '\f123'; +@fa-var-star-half-o: '\f123'; +@fa-var-star-o: '\f006'; +@fa-var-steam: '\f1b6'; +@fa-var-steam-square: '\f1b7'; +@fa-var-step-backward: '\f048'; +@fa-var-step-forward: '\f051'; +@fa-var-stethoscope: '\f0f1'; +@fa-var-stop: '\f04d'; +@fa-var-strikethrough: '\f0cc'; +@fa-var-stumbleupon: '\f1a4'; +@fa-var-stumbleupon-circle: '\f1a3'; +@fa-var-subscript: '\f12c'; +@fa-var-suitcase: '\f0f2'; +@fa-var-sun-o: '\f185'; +@fa-var-superscript: '\f12b'; +@fa-var-support: '\f1cd'; +@fa-var-table: '\f0ce'; +@fa-var-tablet: '\f10a'; +@fa-var-tachometer: '\f0e4'; +@fa-var-tag: '\f02b'; +@fa-var-tags: '\f02c'; +@fa-var-tasks: '\f0ae'; +@fa-var-taxi: '\f1ba'; +@fa-var-tencent-weibo: '\f1d5'; +@fa-var-terminal: '\f120'; +@fa-var-text-height: '\f034'; +@fa-var-text-width: '\f035'; +@fa-var-th: '\f00a'; +@fa-var-th-large: '\f009'; +@fa-var-th-list: '\f00b'; +@fa-var-thumb-tack: '\f08d'; +@fa-var-thumbs-down: '\f165'; +@fa-var-thumbs-o-down: '\f088'; +@fa-var-thumbs-o-up: '\f087'; +@fa-var-thumbs-up: '\f164'; +@fa-var-ticket: '\f145'; +@fa-var-times: '\f00d'; +@fa-var-times-circle: '\f057'; +@fa-var-times-circle-o: '\f05c'; +@fa-var-tint: '\f043'; +@fa-var-toggle-down: '\f150'; +@fa-var-toggle-left: '\f191'; +@fa-var-toggle-right: '\f152'; +@fa-var-toggle-up: '\f151'; +@fa-var-trash-o: '\f014'; +@fa-var-tree: '\f1bb'; +@fa-var-trello: '\f181'; +@fa-var-trophy: '\f091'; +@fa-var-truck: '\f0d1'; +@fa-var-try: '\f195'; +@fa-var-tumblr: '\f173'; +@fa-var-tumblr-square: '\f174'; +@fa-var-turkish-lira: '\f195'; +@fa-var-twitter: '\f099'; +@fa-var-twitter-square: '\f081'; +@fa-var-umbrella: '\f0e9'; +@fa-var-underline: '\f0cd'; +@fa-var-undo: '\f0e2'; +@fa-var-university: '\f19c'; +@fa-var-unlink: '\f127'; +@fa-var-unlock: '\f09c'; +@fa-var-unlock-alt: '\f13e'; +@fa-var-unsorted: '\f0dc'; +@fa-var-upload: '\f093'; +@fa-var-usd: '\f155'; +@fa-var-user: '\f007'; +@fa-var-user-md: '\f0f0'; +@fa-var-users: '\f0c0'; +@fa-var-video-camera: '\f03d'; +@fa-var-vimeo-square: '\f194'; +@fa-var-vine: '\f1ca'; +@fa-var-vk: '\f189'; +@fa-var-volume-down: '\f027'; +@fa-var-volume-off: '\f026'; +@fa-var-volume-up: '\f028'; +@fa-var-warning: '\f071'; +@fa-var-wechat: '\f1d7'; +@fa-var-weibo: '\f18a'; +@fa-var-weixin: '\f1d7'; +@fa-var-wheelchair: '\f193'; +@fa-var-windows: '\f17a'; +@fa-var-won: '\f159'; +@fa-var-wordpress: '\f19a'; +@fa-var-wrench: '\f0ad'; +@fa-var-xing: '\f168'; +@fa-var-xing-square: '\f169'; +@fa-var-yahoo: '\f19e'; +@fa-var-yen: '\f157'; +@fa-var-youtube: '\f167'; +@fa-var-youtube-play: '\f16a'; +@fa-var-youtube-square: '\f166'; diff --git a/docs/src/css/less/footer.less b/docs/src/css/less/footer.less index 69f05bfd..e5621bad 100644 --- a/docs/src/css/less/footer.less +++ b/docs/src/css/less/footer.less @@ -53,7 +53,7 @@ footer { .footer-nav.iconlist { margin-top: 40px; - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { margin-top: 20px; text-align: right; } @@ -65,7 +65,7 @@ footer { .align-center(); display: inline-block; - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { width: auto; margin-left: 40px; } @@ -97,7 +97,7 @@ footer { color: #fff; } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { li.version { width: 200px; .clearfix(); @@ -146,5 +146,4 @@ footer { } } } - -} \ No newline at end of file +} diff --git a/docs/src/css/less/hljs.less b/docs/src/css/less/hljs.less index b05d814b..8e75c2b9 100644 --- a/docs/src/css/less/hljs.less +++ b/docs/src/css/less/hljs.less @@ -5,16 +5,16 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net> */ .hljs { - display: block; - padding: 0; + display: block; + padding: 0; } .hljs-comment, .hljs-template_comment, .diff .hljs-header, .hljs-javadoc { - color: #998; - font-style: italic + color: #998; + font-style: italic; } .hljs-keyword, @@ -25,62 +25,62 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net> .hljs-subst, .hljs-request, .hljs-status { - color: #333; - font-weight: bold + color: #333; + font-weight: bold; } .hljs-number, .hljs-hexcolor, .ruby .hljs-constant { - color: #099; + color: #099; } .hljs-string, .hljs-tag .hljs-value, .hljs-phpdoc, .tex .hljs-formula { - color: #d14 + color: #d14; } .hljs-title, .hljs-id, .coffeescript .hljs-params, .scss .hljs-preprocessor { - color: #900; - font-weight: bold + color: #900; + font-weight: bold; } .javascript .hljs-title, .lisp .hljs-title, .clojure .hljs-title, .hljs-subst { - font-weight: normal + font-weight: normal; } .hljs-class .hljs-title, .haskell .hljs-type, .vhdl .hljs-literal, .tex .hljs-command { - color: #458; - font-weight: bold + color: #458; + font-weight: bold; } .hljs-tag, .hljs-tag .hljs-title, .hljs-rules .hljs-property, .django .hljs-tag .hljs-keyword { - color: #000080; - font-weight: normal + color: #000080; + font-weight: normal; } .hljs-attribute, .hljs-variable, .lisp .hljs-body { - color: #008080 + color: #008080; } .hljs-regexp { - color: #009926 + color: #009926; } .hljs-symbol, @@ -88,13 +88,13 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net> .lisp .hljs-keyword, .tex .hljs-special, .hljs-prompt { - color: #990073 + color: #990073; } .hljs-built_in, .lisp .hljs-title, .clojure .hljs-built_in { - color: #0086b3 + color: #0086b3; } .hljs-preprocessor, @@ -103,22 +103,22 @@ github.com style (c) Vasily Polovnyov <vast@whiteants.net> .hljs-doctype, .hljs-shebang, .hljs-cdata { - color: #999; - font-weight: bold + color: #999; + font-weight: bold; } .hljs-deletion { - background: #fdd + background: #fdd; } .hljs-addition { - background: #dfd + background: #dfd; } .diff .hljs-change { - background: #0086b3 + background: #0086b3; } .hljs-chunk { - color: #aaa -} \ No newline at end of file + color: #aaa; +} diff --git a/docs/src/css/less/homepage-gallery.less b/docs/src/css/less/homepage-gallery.less index 8ba2c493..f56f2b12 100644 --- a/docs/src/css/less/homepage-gallery.less +++ b/docs/src/css/less/homepage-gallery.less @@ -4,14 +4,14 @@ @gallery-height: 777px - @gallery-dots-height; //mixin for gallery items -.leftright-pane(){ +.leftright-pane() { .leftright { .clearfix(); .pull-left { text-align: left; width: 90%; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { width: 50%; } } @@ -20,17 +20,17 @@ color: @headingBlue; margin-bottom: 10px; font-size: 26px; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { font-size: 32px; } - @media (min-width:@screen-lg-min) { + @media (min-width: @screen-lg-min) { font-size: 40px; } } h4 { font-size: 14px; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { font-size: 18px; } .font-bold(); @@ -39,7 +39,7 @@ h5 { padding-top: 4px; font-size: 13px; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { font-size: 15px; } .font-bold(); @@ -47,20 +47,21 @@ p { font-size: 14px; - @media (min-width:@screen-lg-min) { + @media (min-width: @screen-lg-min) { font-size: 15px; } } h5 + p { font-size: 13px; - @media (min-width:@screen-lg-min) { + @media (min-width: @screen-lg-min) { font-size: 14px; } } } - .gist,code { + .gist, + code { font-size: 13px; } } @@ -81,16 +82,17 @@ // padding-top: @gallery-padding-top-bottom; // padding-bottom: @gallery-padding-top-bottom; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { width: 820px; } - @media (min-width:@screen-lg-min) { + @media (min-width: @screen-lg-min) { width: 1024px; } } -.gallery-items {//view +.gallery-items { + //view width: 8000px; height: @gallery-height; .transition-transform(0.4s cubic-bezier(0, 0, 0.25, 1) 0s); @@ -102,15 +104,15 @@ padding: 0; width: 320px; - @media (min-width:@screen-sm-min) { + @media (min-width: @screen-sm-min) { width: 768px; } - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { width: 820px; } - @media (min-width:@screen-lg-min) { + @media (min-width: @screen-lg-min) { width: 1024px; } @@ -128,7 +130,7 @@ // .opacity(0); -webkit-transform: translateZ(0); - transform: translateZ(0); + transform: translateZ(0); .transition(opacity 0.25s linear); *:not(aside) { @@ -145,7 +147,6 @@ } .gallery-dots { - ul { .list-inline(); margin-bottom: 60px; @@ -161,7 +162,8 @@ height: 12px; display: block; outline: none; - background: transparent url('/img/gallery_dot.png?v=@{version}') center center; + background: transparent url('/img/gallery_dot.png?v=@{version}') center + center; &.active { background-image: url('/img/gallery_dot_active.png?v=@{version}'); @@ -171,101 +173,98 @@ /* paddles */ .gallery-paddles { - position:absolute; - z-index:1003; - top:0; - width:100%; - height:0; + position: absolute; + z-index: 1003; + top: 0; + width: 100%; + height: 0; ul { - position:relative; - z-index:1; - margin:0 auto; - list-style: - none outside; + position: relative; + z-index: 1; + margin: 0 auto; + list-style: none outside; - @media (min-width:@screen-lg-min) { - max-width:1160px; + @media (min-width: @screen-lg-min) { + max-width: 1160px; } } li { - position:relative; - *position:static; - z-index:1; + position: relative; + *position: static; + z-index: 1; - @media (max-width:@screen-lg-min) { - margin:0 100px; + @media (max-width: @screen-lg-min) { + margin: 0 100px; } .paddle-arrow { - position:absolute; - z-index:1; - top:0; - height:(@gallery-height); - bottom:0; - .opacity(.65); - display:block; - margin:0; - width:100%; - outline:none; - background-image:url('/img/blank.gif?v=@{version}'); - cursor:pointer; + position: absolute; + z-index: 1; + top: 0; + height: (@gallery-height); + bottom: 0; + .opacity(0.65); + display: block; + margin: 0; + width: 100%; + outline: none; + background-image: url('/img/blank.gif?v=@{version}'); + cursor: pointer; &:hover { - .opacity(.95); + .opacity(0.95); } &.disabled { - display:none; + display: none; } b { - position:relative; - z-index:1; - top:50%; - display:block; - overflow:hidden; - margin:-22px 0; - width:25px; - height:48px; - background:no-repeat 0 0; - background-size:24px 48px; - text-indent:-9999px; + position: relative; + z-index: 1; + top: 50%; + display: block; + overflow: hidden; + margin: -22px 0; + width: 25px; + height: 48px; + background: no-repeat 0 0; + background-size: 24px 48px; + text-indent: -9999px; } &.previous { margin-right: 115px; - right:100%; - @media (min-width:@screen-lg-min) { + right: 100%; + @media (min-width: @screen-lg-min) { margin-right: 14px; } b { - float:right; - background-image:url('/img/paddle_prev.png?v=@{version}'); + float: right; + background-image: url('/img/paddle_prev.png?v=@{version}'); } } &.next { margin-left: 75px; - @media (min-width:@screen-lg-min) { + @media (min-width: @screen-lg-min) { margin-left: -25px; } - left:100%; + left: 100%; b { - float:left; - background-image:url('/img/paddle_next.png?v=@{version}'); + float: left; + background-image: url('/img/paddle_next.png?v=@{version}'); } } - } } } #gallery-multivendor { - .leftright-pane(); @gallery-multivendor-top-offset: 55px; @@ -273,39 +272,36 @@ height: @gallery-height - @gallery-multivendor-top-offset; padding-top: @gallery-multivendor-top-offset; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { height: @gallery-height - (@gallery-multivendor-top-offset * 3); padding-top: @gallery-multivendor-top-offset * 3; } .leftright .pull-left { - - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { width: 35%; padding-top: 20px; } } .layers { - - background: transparent url('/img/gallery-multivendor.png?v=@{version}') center bottom no-repeat; + background: transparent url('/img/gallery-multivendor.png?v=@{version}') + center bottom no-repeat; background-size: 300px 143px; - @media (min-width:@screen-sm-min) { + @media (min-width: @screen-sm-min) { background-size: 680px 323px; } - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { background-size: 540px 256px; background-position: 95%; } - @media (min-width:@screen-lg-min) { + @media (min-width: @screen-lg-min) { background-size: 740px 351px; background-position: right top; } - - } } @@ -313,14 +309,14 @@ .no-backgroundsize { #gallery-multivendor .layers { background-image: url('/img/gallery-multivendor-300x143.png?v=@{version}'); - @media (min-width:@screen-sm-min) { + @media (min-width: @screen-sm-min) { background-image: url('/img/gallery-multivendor-680x323.png?v=@{version}'); } - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { background-image: url('/img/gallery-multivendor-540x256.png?v=@{version}'); background-position: 95%; } - @media (min-width:@screen-lg-min) { + @media (min-width: @screen-lg-min) { background-image: url('/img/gallery-multivendor-740x351.png?v=@{version}'); background-position: right top; } @@ -328,28 +324,26 @@ } #gallery-containersapps { - .leftright-pane(); @gallery-containersapps-top-offset: 50px; height: @gallery-height - @gallery-containersapps-top-offset; padding-top: @gallery-containersapps-top-offset; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { height: @gallery-height - (@gallery-containersapps-top-offset * 3); padding-top: @gallery-containersapps-top-offset * 3; } .leftright { - - height: 400px;//image height - @media (min-width:@screen-md-min) { + height: 400px; //image height + @media (min-width: @screen-md-min) { height: 510px; } .pull-left { padding-top: 20px; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { width: 55%; } } @@ -374,11 +368,11 @@ right: 5px; top: -20px; height: 400px; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { height: 455px; top: 40px; } - @media (min-width:@screen-lg-min) { + @media (min-width: @screen-lg-min) { height: 535px; top: -20px; } @@ -392,7 +386,7 @@ img { //.center-block(); max-width: 290px; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { max-width: 100%; } } @@ -433,14 +427,13 @@ } #gallery-context { - .leftright-pane(); @gallery-context-top-offset: 53px; height: @gallery-height - @gallery-context-top-offset; padding-top: @gallery-context-top-offset; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { height: @gallery-height - (@gallery-context-top-offset * 3); padding-top: @gallery-context-top-offset * 3; } @@ -450,11 +443,10 @@ } .leftright { - .pull-left { padding-top: 25px; float: none !important; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { float: left !important; } } @@ -463,7 +455,7 @@ width: 90%; text-align: left; float: none !important; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { float: right !important; width: 45%; } @@ -476,7 +468,7 @@ } .f2-app-container { - .box-shadow(0 6px 12px rgba(0,0,0,.175)); + .box-shadow(0 6px 12px rgba(0,0,0,0.175)); border: 1px solid @f2greydark; padding: 8px 4px; margin-right: 2px; @@ -485,7 +477,7 @@ .f2-app-body { height: 250px; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { height: 400px; } overflow: auto; @@ -496,7 +488,7 @@ min-height: 300px; min-width: 300px; width: 80%; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { width: 100%; } } @@ -504,23 +496,21 @@ } #gallery-devices { - .leftright-pane(); @gallery-devices-top-offset: 33px; height: @gallery-height - @gallery-devices-top-offset; padding-top: @gallery-devices-top-offset; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { height: @gallery-height - (@gallery-devices-top-offset * 3); padding-top: @gallery-devices-top-offset * 3; } .leftright { - .pull-left { float: none !important; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { float: left !important; width: 30%; margin-top: 150px; @@ -529,7 +519,7 @@ .pull-right { float: none !important; - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { float: left !important; } } @@ -543,14 +533,14 @@ left: 0; top: 0; width: 290px; - @media (min-width:@screen-sm-min) { + @media (min-width: @screen-sm-min) { width: 648px; margin-left: 65px; } - @media (min-width:@screen-md-min) { + @media (min-width: @screen-md-min) { width: 560px; } - @media (min-width:@screen-lg-min) { + @media (min-width: @screen-lg-min) { width: 648px; } // @media (min-width:@screen-md-min) { @@ -561,4 +551,4 @@ } } } -} \ No newline at end of file +} diff --git a/docs/src/css/less/homepage.less b/docs/src/css/less/homepage.less index 6e43d9de..bf92f435 100644 --- a/docs/src/css/less/homepage.less +++ b/docs/src/css/less/homepage.less @@ -1,16 +1,16 @@ //specific sections of page **************** .intro { &.aboutbox { - - @media (min-width: @screen-sm-min){ - background: @navbar-inverse-bg url('/img/header-bg.png?v=@{version}') center -228px no-repeat; + @media (min-width: @screen-sm-min) { + background: @navbar-inverse-bg url('/img/header-bg.png?v=@{version}') + center -228px no-repeat; } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { background-position: center -114px; } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { min-height: 550px; } @@ -19,7 +19,7 @@ margin-bottom: 0; .container { - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { padding-top: 90px; } } @@ -36,7 +36,7 @@ line-height: 1; font-size: 30px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { font-size: 50px; } } @@ -48,11 +48,11 @@ font-size: 17px !important; line-height: 1.3; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { padding-bottom: 120px; } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { width: 70%; } } @@ -73,7 +73,7 @@ .benefits { padding-bottom: 0px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { padding-bottom: 0px; } @@ -85,7 +85,7 @@ padding-left: 25px; padding-right: 25px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { margin-top: 65px; margin-bottom: 110px; } @@ -95,7 +95,7 @@ margin-bottom: 30px; .align-center(); - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { text-align: left; } @@ -108,7 +108,8 @@ &.standardized { background-image: url('/img/icon_standardization.png?v=@{version}'); - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + @media (-webkit-min-device-pixel-ratio: 2), + (min-resolution: 192dpi) { background-image: url('/img/icon_standardization@2x.png?v=@{version}'); background-size: 19px 25px; } @@ -117,7 +118,8 @@ &.efficency { background-image: url('/img/icon_efficency.png?v=@{version}'); - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + @media (-webkit-min-device-pixel-ratio: 2), + (min-resolution: 192dpi) { background-image: url('/img/icon_efficency@2x.png?v=@{version}'); background-size: 25px 23px; } @@ -126,24 +128,23 @@ &.nimbleness { background-image: url('/img/icon_nimbleness.png?v=@{version}'); - @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + @media (-webkit-min-device-pixel-ratio: 2), + (min-resolution: 192dpi) { background-image: url('/img/icon_nimbleness@2x.png?v=@{version}'); background-size: 24px 24px; } } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { margin-right: 20px; margin-top: 0; } - } span { display: block; - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { float: left; } - } span + span { font-size: 15px; @@ -152,7 +153,7 @@ .font-bold(); margin-top: 30px; - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { font-size: 17px; display: inline-block; margin-top: 4px; @@ -162,12 +163,12 @@ p { color: @gray-light; font-size: 14px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { .align-center(); width: 65%; } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { font-size: 15px; text-align: left; width: 90%; @@ -189,7 +190,7 @@ margin-top: 0; } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { margin-top: 65px; + dl { margin-top: 65px; @@ -216,8 +217,7 @@ } .partners { - - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { padding-bottom: 150px; } @@ -225,7 +225,7 @@ padding-bottom: 50px; } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { h2 { padding-bottom: 100px !important; } @@ -238,7 +238,7 @@ //there's a slight color difference //in the background image for the "partners_vert.png" file //so change out the BG color until we can get a new image - @media (max-width: @screen-md-min){ + @media (max-width: @screen-md-min) { &.box-greydark { background-color: @f2greydarkAlt; } @@ -249,12 +249,12 @@ display: none; visibility: hidden; - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { display: block; visibility: visible; min-height: 900px; - @media (min-width: @screen-lg-min){ + @media (min-width: @screen-lg-min) { min-height: 1100px; } @@ -360,7 +360,7 @@ } //larger viewport - @media (min-width: @screen-lg-min){ + @media (min-width: @screen-lg-min) { width: @brickWidth-lg; height: @brickWidth-lg; @@ -402,6 +402,4 @@ } } } - - -} \ No newline at end of file +} diff --git a/docs/src/css/less/jquery-ui.less b/docs/src/css/less/jquery-ui.less index a208bfe0..e1a038a5 100644 --- a/docs/src/css/less/jquery-ui.less +++ b/docs/src/css/less/jquery-ui.less @@ -1,4 +1,4 @@ -@import "jquery-ui/jquery-ui.min.less"; +@import 'jquery-ui/jquery-ui.min.less'; .ui-widget { font-family: @font-family-sans-serif; @@ -19,7 +19,6 @@ } .ui-menu-item { - padding: 1px 5px; &.ui-state-focus { @@ -42,4 +41,4 @@ } } } -} \ No newline at end of file +} diff --git a/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.js b/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.js index 59775b56..c820a897 100644 --- a/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.js +++ b/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.js @@ -1,2513 +1,2726 @@ /*! jQuery UI - v1.10.3 - 2013-11-24 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.menu.js -* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ - -(function( $, undefined ) { - -var uuid = 0, - runiqueId = /^ui-id-\d+$/; - -// $.ui might exist from components with no dependencies, e.g., $.ui.position -$.ui = $.ui || {}; - -$.extend( $.ui, { - version: "1.10.3", - - keyCode: { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - NUMPAD_ADD: 107, - NUMPAD_DECIMAL: 110, - NUMPAD_DIVIDE: 111, - NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, - NUMPAD_SUBTRACT: 109, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - } -}); - -// plugins -$.fn.extend({ - focus: (function( orig ) { - return function( delay, fn ) { - return typeof delay === "number" ? - this.each(function() { - var elem = this; - setTimeout(function() { - $( elem ).focus(); - if ( fn ) { - fn.call( elem ); - } - }, delay ); - }) : - orig.apply( this, arguments ); - }; - })( $.fn.focus ), - - scrollParent: function() { - var scrollParent; - if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { - scrollParent = this.parents().filter(function() { - return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } else { - scrollParent = this.parents().filter(function() { - return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); - }).eq(0); - } - - return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; - }, - - zIndex: function( zIndex ) { - if ( zIndex !== undefined ) { - return this.css( "zIndex", zIndex ); + * http://jqueryui.com + * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.menu.js + * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ + +(function ($, undefined) { + var uuid = 0, + runiqueId = /^ui-id-\d+$/; + + // $.ui might exist from components with no dependencies, e.g., $.ui.position + $.ui = $.ui || {}; + + $.extend($.ui, { + version: '1.10.3', + + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 } + }); - if ( this.length ) { - var elem = $( this[ 0 ] ), position, value; - while ( elem.length && elem[ 0 ] !== document ) { - // Ignore z-index if position is set to a value where z-index is ignored by the browser - // This makes behavior of this function consistent across browsers - // WebKit always returns auto if the element is positioned - position = elem.css( "position" ); - if ( position === "absolute" || position === "relative" || position === "fixed" ) { - // IE returns 0 when zIndex is not specified - // other browsers return a string - // we ignore the case of nested elements with an explicit value of 0 - // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> - value = parseInt( elem.css( "zIndex" ), 10 ); - if ( !isNaN( value ) && value !== 0 ) { - return value; - } - } - elem = elem.parent(); + // plugins + $.fn.extend({ + focus: (function (orig) { + return function (delay, fn) { + return typeof delay === 'number' + ? this.each(function () { + var elem = this; + setTimeout(function () { + $(elem).focus(); + if (fn) { + fn.call(elem); + } + }, delay); + }) + : orig.apply(this, arguments); + }; + })($.fn.focus), + + scrollParent: function () { + var scrollParent; + if ( + ($.ui.ie && /(static|relative)/.test(this.css('position'))) || + /absolute/.test(this.css('position')) + ) { + scrollParent = this.parents() + .filter(function () { + return ( + /(relative|absolute|fixed)/.test($.css(this, 'position')) && + /(auto|scroll)/.test( + $.css(this, 'overflow') + + $.css(this, 'overflow-y') + + $.css(this, 'overflow-x') + ) + ); + }) + .eq(0); + } else { + scrollParent = this.parents() + .filter(function () { + return /(auto|scroll)/.test( + $.css(this, 'overflow') + + $.css(this, 'overflow-y') + + $.css(this, 'overflow-x') + ); + }) + .eq(0); } - } - return 0; - }, + return /fixed/.test(this.css('position')) || !scrollParent.length + ? $(document) + : scrollParent; + }, - uniqueId: function() { - return this.each(function() { - if ( !this.id ) { - this.id = "ui-id-" + (++uuid); + zIndex: function (zIndex) { + if (zIndex !== undefined) { + return this.css('zIndex', zIndex); } - }); - }, - removeUniqueId: function() { - return this.each(function() { - if ( runiqueId.test( this.id ) ) { - $( this ).removeAttr( "id" ); + if (this.length) { + var elem = $(this[0]), + position, + value; + while (elem.length && elem[0] !== document) { + // Ignore z-index if position is set to a value where z-index is ignored by the browser + // This makes behavior of this function consistent across browsers + // WebKit always returns auto if the element is positioned + position = elem.css('position'); + if ( + position === 'absolute' || + position === 'relative' || + position === 'fixed' + ) { + // IE returns 0 when zIndex is not specified + // other browsers return a string + // we ignore the case of nested elements with an explicit value of 0 + // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> + value = parseInt(elem.css('zIndex'), 10); + if (!isNaN(value) && value !== 0) { + return value; + } + } + elem = elem.parent(); + } } - }); - } -}); - -// selectors -function focusable( element, isTabIndexNotNaN ) { - var map, mapName, img, - nodeName = element.nodeName.toLowerCase(); - if ( "area" === nodeName ) { - map = element.parentNode; - mapName = map.name; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap=#" + mapName + "]" )[0]; - return !!img && visible( img ); - } - return ( /input|select|textarea|button|object/.test( nodeName ) ? - !element.disabled : - "a" === nodeName ? - element.href || isTabIndexNotNaN : - isTabIndexNotNaN) && - // the element and all of its ancestors must be visible - visible( element ); -} - -function visible( element ) { - return $.expr.filters.visible( element ) && - !$( element ).parents().addBack().filter(function() { - return $.css( this, "visibility" ) === "hidden"; - }).length; -} - -$.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo(function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - }) : - // support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - }, - focusable: function( element ) { - return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); - }, - - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - isTabIndexNaN = isNaN( tabIndex ); - return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); - } -}); - -// support: jQuery <1.8 -if ( !$( "<a>" ).outerWidth( 1 ).jquery ) { - $.each( [ "Width", "Height" ], function( i, name ) { - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], - type = name.toLowerCase(), - orig = { - innerWidth: $.fn.innerWidth, - innerHeight: $.fn.innerHeight, - outerWidth: $.fn.outerWidth, - outerHeight: $.fn.outerHeight - }; + return 0; + }, - function reduce( elem, size, border, margin ) { - $.each( side, function() { - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; - if ( border ) { - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + uniqueId: function () { + return this.each(function () { + if (!this.id) { + this.id = 'ui-id-' + ++uuid; } - if ( margin ) { - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + }); + }, + + removeUniqueId: function () { + return this.each(function () { + if (runiqueId.test(this.id)) { + $(this).removeAttr('id'); } }); - return size; } + }); - $.fn[ "inner" + name ] = function( size ) { - if ( size === undefined ) { - return orig[ "inner" + name ].call( this ); + // selectors + function focusable(element, isTabIndexNotNaN) { + var map, + mapName, + img, + nodeName = element.nodeName.toLowerCase(); + if ('area' === nodeName) { + map = element.parentNode; + mapName = map.name; + if (!element.href || !mapName || map.nodeName.toLowerCase() !== 'map') { + return false; } + img = $('img[usemap=#' + mapName + ']')[0]; + return !!img && visible(img); + } + return ( + (/input|select|textarea|button|object/.test(nodeName) + ? !element.disabled + : 'a' === nodeName + ? element.href || isTabIndexNotNaN + : isTabIndexNotNaN) && + // the element and all of its ancestors must be visible + visible(element) + ); + } - return this.each(function() { - $( this ).css( type, reduce( this, size ) + "px" ); - }); - }; + function visible(element) { + return ( + $.expr.filters.visible(element) && + !$(element) + .parents() + .addBack() + .filter(function () { + return $.css(this, 'visibility') === 'hidden'; + }).length + ); + } - $.fn[ "outer" + name] = function( size, margin ) { - if ( typeof size !== "number" ) { - return orig[ "outer" + name ].call( this, size ); - } + $.extend($.expr[':'], { + data: $.expr.createPseudo + ? $.expr.createPseudo(function (dataName) { + return function (elem) { + return !!$.data(elem, dataName); + }; + }) + : // support: jQuery <1.8 + function (elem, i, match) { + return !!$.data(elem, match[3]); + }, + + focusable: function (element) { + return focusable(element, !isNaN($.attr(element, 'tabindex'))); + }, - return this.each(function() { - $( this).css( type, reduce( this, size, true, margin ) + "px" ); - }); - }; + tabbable: function (element) { + var tabIndex = $.attr(element, 'tabindex'), + isTabIndexNaN = isNaN(tabIndex); + return ( + (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN) + ); + } }); -} - -// support: jQuery <1.8 -if ( !$.fn.addBack ) { - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) -if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { - $.fn.removeData = (function( removeData ) { - return function( key ) { - if ( arguments.length ) { - return removeData.call( this, $.camelCase( key ) ); - } else { - return removeData.call( this ); - } - }; - })( $.fn.removeData ); -} + // support: jQuery <1.8 + if (!$('<a>').outerWidth(1).jquery) { + $.each(['Width', 'Height'], function (i, name) { + var side = name === 'Width' ? ['Left', 'Right'] : ['Top', 'Bottom'], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + function reduce(elem, size, border, margin) { + $.each(side, function () { + size -= parseFloat($.css(elem, 'padding' + this)) || 0; + if (border) { + size -= parseFloat($.css(elem, 'border' + this + 'Width')) || 0; + } + if (margin) { + size -= parseFloat($.css(elem, 'margin' + this)) || 0; + } + }); + return size; + } + $.fn['inner' + name] = function (size) { + if (size === undefined) { + return orig['inner' + name].call(this); + } + return this.each(function () { + $(this).css(type, reduce(this, size) + 'px'); + }); + }; -// deprecated -$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); + $.fn['outer' + name] = function (size, margin) { + if (typeof size !== 'number') { + return orig['outer' + name].call(this, size); + } -$.support.selectstart = "onselectstart" in document.createElement( "div" ); -$.fn.extend({ - disableSelection: function() { - return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) + - ".ui-disableSelection", function( event ) { - event.preventDefault(); - }); - }, + return this.each(function () { + $(this).css(type, reduce(this, size, true, margin) + 'px'); + }); + }; + }); + } - enableSelection: function() { - return this.unbind( ".ui-disableSelection" ); + // support: jQuery <1.8 + if (!$.fn.addBack) { + $.fn.addBack = function (selector) { + return this.add( + selector == null ? this.prevObject : this.prevObject.filter(selector) + ); + }; } -}); - -$.extend( $.ui, { - // $.ui.plugin is deprecated. Use $.widget() extensions instead. - plugin: { - add: function( module, option, set ) { - var i, - proto = $.ui[ module ].prototype; - for ( i in set ) { - proto.plugins[ i ] = proto.plugins[ i ] || []; - proto.plugins[ i ].push( [ option, set[ i ] ] ); - } - }, - call: function( instance, name, args ) { - var i, - set = instance.plugins[ name ]; - if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) { - return; - } - for ( i = 0; i < set.length; i++ ) { - if ( instance.options[ set[ i ][ 0 ] ] ) { - set[ i ][ 1 ].apply( instance.element, args ); + // support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) + if ($('<a>').data('a-b', 'a').removeData('a-b').data('a-b')) { + $.fn.removeData = (function (removeData) { + return function (key) { + if (arguments.length) { + return removeData.call(this, $.camelCase(key)); + } else { + return removeData.call(this); } - } - } - }, + }; + })($.fn.removeData); + } + + // deprecated + $.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()); - // only used by resizable - hasScroll: function( el, a ) { + $.support.selectstart = 'onselectstart' in document.createElement('div'); + $.fn.extend({ + disableSelection: function () { + return this.bind( + ($.support.selectstart ? 'selectstart' : 'mousedown') + + '.ui-disableSelection', + function (event) { + event.preventDefault(); + } + ); + }, - //If overflow is hidden, the element might have extra content, but the user wants to hide it - if ( $( el ).css( "overflow" ) === "hidden") { - return false; + enableSelection: function () { + return this.unbind('.ui-disableSelection'); } + }); - var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", - has = false; + $.extend($.ui, { + // $.ui.plugin is deprecated. Use $.widget() extensions instead. + plugin: { + add: function (module, option, set) { + var i, + proto = $.ui[module].prototype; + for (i in set) { + proto.plugins[i] = proto.plugins[i] || []; + proto.plugins[i].push([option, set[i]]); + } + }, + call: function (instance, name, args) { + var i, + set = instance.plugins[name]; + if ( + !set || + !instance.element[0].parentNode || + instance.element[0].parentNode.nodeType === 11 + ) { + return; + } - if ( el[ scroll ] > 0 ) { - return true; - } + for (i = 0; i < set.length; i++) { + if (instance.options[set[i][0]]) { + set[i][1].apply(instance.element, args); + } + } + } + }, - // TODO: determine which cases actually cause this to happen - // if the element doesn't have the scroll set, see if it's possible to - // set the scroll - el[ scroll ] = 1; - has = ( el[ scroll ] > 0 ); - el[ scroll ] = 0; - return has; - } -}); - -})( jQuery ); -(function( $, undefined ) { - -var uuid = 0, - slice = Array.prototype.slice, - _cleanData = $.cleanData; -$.cleanData = function( elems ) { - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { - try { - $( elem ).triggerHandler( "remove" ); - // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} - } - _cleanData( elems ); -}; - -$.widget = function( name, base, prototype ) { - var fullName, existingConstructor, constructor, basePrototype, - // proxiedPrototype allows the provided prototype to remain unmodified - // so that it can be used as a mixin for multiple widgets (#8876) - proxiedPrototype = {}, - namespace = name.split( "." )[ 0 ]; - - name = name.split( "." )[ 1 ]; - fullName = namespace + "-" + name; - - if ( !prototype ) { - prototype = base; - base = $.Widget; - } + // only used by resizable + hasScroll: function (el, a) { + //If overflow is hidden, the element might have extra content, but the user wants to hide it + if ($(el).css('overflow') === 'hidden') { + return false; + } - // create selector for plugin - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { - return !!$.data( elem, fullName ); - }; + var scroll = a && a === 'left' ? 'scrollLeft' : 'scrollTop', + has = false; - $[ namespace ] = $[ namespace ] || {}; - existingConstructor = $[ namespace ][ name ]; - constructor = $[ namespace ][ name ] = function( options, element ) { - // allow instantiation without "new" keyword - if ( !this._createWidget ) { - return new constructor( options, element ); - } + if (el[scroll] > 0) { + return true; + } - // allow instantiation without initializing for simple inheritance - // must use "new" keyword (the code above always passes args) - if ( arguments.length ) { - this._createWidget( options, element ); + // TODO: determine which cases actually cause this to happen + // if the element doesn't have the scroll set, see if it's possible to + // set the scroll + el[scroll] = 1; + has = el[scroll] > 0; + el[scroll] = 0; + return has; } - }; - // extend with the existing constructor to carry over any static properties - $.extend( constructor, existingConstructor, { - version: prototype.version, - // copy the object used to create the prototype in case we need to - // redefine the widget later - _proto: $.extend( {}, prototype ), - // track widgets that inherit from this widget in case this widget is - // redefined after a widget inherits from it - _childConstructors: [] }); +})(jQuery); +(function ($, undefined) { + var uuid = 0, + slice = Array.prototype.slice, + _cleanData = $.cleanData; + $.cleanData = function (elems) { + for (var i = 0, elem; (elem = elems[i]) != null; i++) { + try { + $(elem).triggerHandler('remove'); + // http://bugs.jquery.com/ticket/8235 + } catch (e) {} + } + _cleanData(elems); + }; - basePrototype = new base(); - // we need to make the options hash a property directly on the new instance - // otherwise we'll modify the options hash on the prototype that we're - // inheriting from - basePrototype.options = $.widget.extend( {}, basePrototype.options ); - $.each( prototype, function( prop, value ) { - if ( !$.isFunction( value ) ) { - proxiedPrototype[ prop ] = value; - return; - } - proxiedPrototype[ prop ] = (function() { - var _super = function() { - return base.prototype[ prop ].apply( this, arguments ); - }, - _superApply = function( args ) { - return base.prototype[ prop ].apply( this, args ); - }; - return function() { - var __super = this._super, - __superApply = this._superApply, - returnValue; + $.widget = function (name, base, prototype) { + var fullName, + existingConstructor, + constructor, + basePrototype, + // proxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + proxiedPrototype = {}, + namespace = name.split('.')[0]; - this._super = _super; - this._superApply = _superApply; + name = name.split('.')[1]; + fullName = namespace + '-' + name; - returnValue = value.apply( this, arguments ); + if (!prototype) { + prototype = base; + base = $.Widget; + } - this._super = __super; - this._superApply = __superApply; + // create selector for plugin + $.expr[':'][fullName.toLowerCase()] = function (elem) { + return !!$.data(elem, fullName); + }; - return returnValue; - }; - })(); - }); - constructor.prototype = $.widget.extend( basePrototype, { - // TODO: remove support for widgetEventPrefix - // always use the name + a colon as the prefix, e.g., draggable:start - // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name - }, proxiedPrototype, { - constructor: constructor, - namespace: namespace, - widgetName: name, - widgetFullName: fullName - }); + $[namespace] = $[namespace] || {}; + existingConstructor = $[namespace][name]; + constructor = $[namespace][name] = function (options, element) { + // allow instantiation without "new" keyword + if (!this._createWidget) { + return new constructor(options, element); + } - // If this widget is being redefined then we need to find all widgets that - // are inheriting from it and redefine all of them so that they inherit from - // the new version of this widget. We're essentially trying to replace one - // level in the prototype chain. - if ( existingConstructor ) { - $.each( existingConstructor._childConstructors, function( i, child ) { - var childPrototype = child.prototype; - - // redefine the child widget using the same prototype that was - // originally used, but inherit from the new version of the base - $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); + // allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if (arguments.length) { + this._createWidget(options, element); + } + }; + // extend with the existing constructor to carry over any static properties + $.extend(constructor, existingConstructor, { + version: prototype.version, + // copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend({}, prototype), + // track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] }); - // remove the list of existing child constructors from the old constructor - // so the old child constructors can be garbage collected - delete existingConstructor._childConstructors; - } else { - base._childConstructors.push( constructor ); - } - $.widget.bridge( name, constructor ); -}; - -$.widget.extend = function( target ) { - var input = slice.call( arguments, 1 ), - inputIndex = 0, - inputLength = input.length, - key, - value; - for ( ; inputIndex < inputLength; inputIndex++ ) { - for ( key in input[ inputIndex ] ) { - value = input[ inputIndex ][ key ]; - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { - // Clone objects - if ( $.isPlainObject( value ) ) { - target[ key ] = $.isPlainObject( target[ key ] ) ? - $.widget.extend( {}, target[ key ], value ) : - // Don't extend strings, arrays, etc. with objects - $.widget.extend( {}, value ); - // Copy everything else by reference - } else { - target[ key ] = value; - } + basePrototype = new base(); + // we need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend({}, basePrototype.options); + $.each(prototype, function (prop, value) { + if (!$.isFunction(value)) { + proxiedPrototype[prop] = value; + return; } - } - } - return target; -}; - -$.widget.bridge = function( name, object ) { - var fullName = object.prototype.widgetFullName || name; - $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string", - args = slice.call( arguments, 1 ), - returnValue = this; - - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.widget.extend.apply( null, [ options ].concat(args) ) : - options; - - if ( isMethodCall ) { - this.each(function() { - var methodValue, - instance = $.data( this, fullName ); - if ( !instance ) { - return $.error( "cannot call methods on " + name + " prior to initialization; " + - "attempted to call method '" + options + "'" ); - } - if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { - return $.error( "no such method '" + options + "' for " + name + " widget instance" ); - } - methodValue = instance[ options ].apply( instance, args ); - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue && methodValue.jquery ? - returnValue.pushStack( methodValue.get() ) : - methodValue; - return false; - } + proxiedPrototype[prop] = (function () { + var _super = function () { + return base.prototype[prop].apply(this, arguments); + }, + _superApply = function (args) { + return base.prototype[prop].apply(this, args); + }; + return function () { + var __super = this._super, + __superApply = this._superApply, + returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply(this, arguments); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + })(); + }); + constructor.prototype = $.widget.extend( + basePrototype, + { + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor + ? basePrototype.widgetEventPrefix + : name + }, + proxiedPrototype, + { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + } + ); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if (existingConstructor) { + $.each(existingConstructor._childConstructors, function (i, child) { + var childPrototype = child.prototype; + + // redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( + childPrototype.namespace + '.' + childPrototype.widgetName, + constructor, + child._proto + ); }); + // remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; } else { - this.each(function() { - var instance = $.data( this, fullName ); - if ( instance ) { - instance.option( options || {} )._init(); - } else { - $.data( this, fullName, new object( options, this ) ); - } - }); + base._childConstructors.push(constructor); } - return returnValue; + $.widget.bridge(name, constructor); }; -}; - -$.Widget = function( /* options, element */ ) {}; -$.Widget._childConstructors = []; - -$.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - defaultElement: "<div>", - options: { - disabled: false, - - // callbacks - create: null - }, - _createWidget: function( options, element ) { - element = $( element || this.defaultElement || this )[ 0 ]; - this.element = $( element ); - this.uuid = uuid++; - this.eventNamespace = "." + this.widgetName + this.uuid; - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); - - this.bindings = $(); - this.hoverable = $(); - this.focusable = $(); - - if ( element !== this ) { - $.data( element, this.widgetFullName, this ); - this._on( true, this.element, { - remove: function( event ) { - if ( event.target === element ) { - this.destroy(); + + $.widget.extend = function (target) { + var input = slice.call(arguments, 1), + inputIndex = 0, + inputLength = input.length, + key, + value; + for (; inputIndex < inputLength; inputIndex++) { + for (key in input[inputIndex]) { + value = input[inputIndex][key]; + if (input[inputIndex].hasOwnProperty(key) && value !== undefined) { + // Clone objects + if ($.isPlainObject(value)) { + target[key] = $.isPlainObject(target[key]) + ? $.widget.extend({}, target[key], value) + : // Don't extend strings, arrays, etc. with objects + $.widget.extend({}, value); + // Copy everything else by reference + } else { + target[key] = value; } } - }); - this.document = $( element.style ? - // element within the document - element.ownerDocument : - // element is window or document - element.document || element ); - this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); - } - - this._create(); - this._trigger( "create", null, this._getCreateEventData() ); - this._init(); - }, - _getCreateOptions: $.noop, - _getCreateEventData: $.noop, - _create: $.noop, - _init: $.noop, - - destroy: function() { - this._destroy(); - // we can probably remove the unbind calls in 2.0 - // all event bindings should go through this._on() - this.element - .unbind( this.eventNamespace ) - // 1.9 BC for #7810 - // TODO remove dual storage - .removeData( this.widgetName ) - .removeData( this.widgetFullName ) - // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 - .removeData( $.camelCase( this.widgetFullName ) ); - this.widget() - .unbind( this.eventNamespace ) - .removeAttr( "aria-disabled" ) - .removeClass( - this.widgetFullName + "-disabled " + - "ui-state-disabled" ); - - // clean up events and states - this.bindings.unbind( this.eventNamespace ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - }, - _destroy: $.noop, - - widget: function() { - return this.element; - }, - - option: function( key, value ) { - var options = key, - parts, - curOption, - i; - - if ( arguments.length === 0 ) { - // don't return a reference to the internal hash - return $.widget.extend( {}, this.options ); + } } + return target; + }; - if ( typeof key === "string" ) { - // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } - options = {}; - parts = key.split( "." ); - key = parts.shift(); - if ( parts.length ) { - curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); - for ( i = 0; i < parts.length - 1; i++ ) { - curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; - curOption = curOption[ parts[ i ] ]; - } - key = parts.pop(); - if ( value === undefined ) { - return curOption[ key ] === undefined ? null : curOption[ key ]; - } - curOption[ key ] = value; + $.widget.bridge = function (name, object) { + var fullName = object.prototype.widgetFullName || name; + $.fn[name] = function (options) { + var isMethodCall = typeof options === 'string', + args = slice.call(arguments, 1), + returnValue = this; + + // allow multiple hashes to be passed on init + options = + !isMethodCall && args.length + ? $.widget.extend.apply(null, [options].concat(args)) + : options; + + if (isMethodCall) { + this.each(function () { + var methodValue, + instance = $.data(this, fullName); + if (!instance) { + return $.error( + 'cannot call methods on ' + + name + + ' prior to initialization; ' + + "attempted to call method '" + + options + + "'" + ); + } + if (!$.isFunction(instance[options]) || options.charAt(0) === '_') { + return $.error( + "no such method '" + + options + + "' for " + + name + + ' widget instance' + ); + } + methodValue = instance[options].apply(instance, args); + if (methodValue !== instance && methodValue !== undefined) { + returnValue = + methodValue && methodValue.jquery + ? returnValue.pushStack(methodValue.get()) + : methodValue; + return false; + } + }); } else { - if ( value === undefined ) { - return this.options[ key ] === undefined ? null : this.options[ key ]; - } - options[ key ] = value; + this.each(function () { + var instance = $.data(this, fullName); + if (instance) { + instance.option(options || {})._init(); + } else { + $.data(this, fullName, new object(options, this)); + } + }); } - } - this._setOptions( options ); + return returnValue; + }; + }; - return this; - }, - _setOptions: function( options ) { - var key; + $.Widget = function (/* options, element */) {}; + $.Widget._childConstructors = []; - for ( key in options ) { - this._setOption( key, options[ key ] ); - } + $.Widget.prototype = { + widgetName: 'widget', + widgetEventPrefix: '', + defaultElement: '<div>', + options: { + disabled: false, - return this; - }, - _setOption: function( key, value ) { - this.options[ key ] = value; + // callbacks + create: null + }, + _createWidget: function (options, element) { + element = $(element || this.defaultElement || this)[0]; + this.element = $(element); + this.uuid = uuid++; + this.eventNamespace = '.' + this.widgetName + this.uuid; + this.options = $.widget.extend( + {}, + this.options, + this._getCreateOptions(), + options + ); + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + + if (element !== this) { + $.data(element, this.widgetFullName, this); + this._on(true, this.element, { + remove: function (event) { + if (event.target === element) { + this.destroy(); + } + } + }); + this.document = $( + element.style + ? // element within the document + element.ownerDocument + : // element is window or document + element.document || element + ); + this.window = $( + this.document[0].defaultView || this.document[0].parentWindow + ); + } - if ( key === "disabled" ) { + this._create(); + this._trigger('create', null, this._getCreateEventData()); + this._init(); + }, + _getCreateOptions: $.noop, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, + + destroy: function () { + this._destroy(); + // we can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .unbind(this.eventNamespace) + // 1.9 BC for #7810 + // TODO remove dual storage + .removeData(this.widgetName) + .removeData(this.widgetFullName) + // support: jquery <1.6.3 + // http://bugs.jquery.com/ticket/9413 + .removeData($.camelCase(this.widgetFullName)); this.widget() - .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) - .attr( "aria-disabled", value ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - } + .unbind(this.eventNamespace) + .removeAttr('aria-disabled') + .removeClass(this.widgetFullName + '-disabled ' + 'ui-state-disabled'); + + // clean up events and states + this.bindings.unbind(this.eventNamespace); + this.hoverable.removeClass('ui-state-hover'); + this.focusable.removeClass('ui-state-focus'); + }, + _destroy: $.noop, - return this; - }, - - enable: function() { - return this._setOption( "disabled", false ); - }, - disable: function() { - return this._setOption( "disabled", true ); - }, - - _on: function( suppressDisabledCheck, element, handlers ) { - var delegateElement, - instance = this; - - // no suppressDisabledCheck flag, shuffle arguments - if ( typeof suppressDisabledCheck !== "boolean" ) { - handlers = element; - element = suppressDisabledCheck; - suppressDisabledCheck = false; - } + widget: function () { + return this.element; + }, - // no element argument, shuffle and use this.element - if ( !handlers ) { - handlers = element; - element = this.element; - delegateElement = this.widget(); - } else { - // accept selectors, DOM elements - element = delegateElement = $( element ); - this.bindings = this.bindings.add( element ); - } + option: function (key, value) { + var options = key, + parts, + curOption, + i; - $.each( handlers, function( event, handler ) { - function handlerProxy() { - // allow widgets to customize the disabled handling - // - disabled as an array instead of boolean - // - disabled class as method for disabling individual parts - if ( !suppressDisabledCheck && - ( instance.options.disabled === true || - $( this ).hasClass( "ui-state-disabled" ) ) ) { - return; + if (arguments.length === 0) { + // don't return a reference to the internal hash + return $.widget.extend({}, this.options); + } + + if (typeof key === 'string') { + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split('.'); + key = parts.shift(); + if (parts.length) { + curOption = options[key] = $.widget.extend({}, this.options[key]); + for (i = 0; i < parts.length - 1; i++) { + curOption[parts[i]] = curOption[parts[i]] || {}; + curOption = curOption[parts[i]]; + } + key = parts.pop(); + if (value === undefined) { + return curOption[key] === undefined ? null : curOption[key]; + } + curOption[key] = value; + } else { + if (value === undefined) { + return this.options[key] === undefined ? null : this.options[key]; + } + options[key] = value; } - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); } - // copy the guid so direct unbinding works - if ( typeof handler !== "string" ) { - handlerProxy.guid = handler.guid = - handler.guid || handlerProxy.guid || $.guid++; + this._setOptions(options); + + return this; + }, + _setOptions: function (options) { + var key; + + for (key in options) { + this._setOption(key, options[key]); } - var match = event.match( /^(\w+)\s*(.*)$/ ), - eventName = match[1] + instance.eventNamespace, - selector = match[2]; - if ( selector ) { - delegateElement.delegate( selector, eventName, handlerProxy ); - } else { - element.bind( eventName, handlerProxy ); + return this; + }, + _setOption: function (key, value) { + this.options[key] = value; + + if (key === 'disabled') { + this.widget() + .toggleClass( + this.widgetFullName + '-disabled ui-state-disabled', + !!value + ) + .attr('aria-disabled', value); + this.hoverable.removeClass('ui-state-hover'); + this.focusable.removeClass('ui-state-focus'); } - }); - }, - _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; - element.unbind( eventName ).undelegate( eventName ); - }, + return this; + }, - _delay: function( handler, delay ) { - function handlerProxy() { - return ( typeof handler === "string" ? instance[ handler ] : handler ) - .apply( instance, arguments ); - } - var instance = this; - return setTimeout( handlerProxy, delay || 0 ); - }, - - _hoverable: function( element ) { - this.hoverable = this.hoverable.add( element ); - this._on( element, { - mouseenter: function( event ) { - $( event.currentTarget ).addClass( "ui-state-hover" ); - }, - mouseleave: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-hover" ); + enable: function () { + return this._setOption('disabled', false); + }, + disable: function () { + return this._setOption('disabled', true); + }, + + _on: function (suppressDisabledCheck, element, handlers) { + var delegateElement, + instance = this; + + // no suppressDisabledCheck flag, shuffle arguments + if (typeof suppressDisabledCheck !== 'boolean') { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; } - }); - }, - _focusable: function( element ) { - this.focusable = this.focusable.add( element ); - this._on( element, { - focusin: function( event ) { - $( event.currentTarget ).addClass( "ui-state-focus" ); - }, - focusout: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-focus" ); + // no element argument, shuffle and use this.element + if (!handlers) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + // accept selectors, DOM elements + element = delegateElement = $(element); + this.bindings = this.bindings.add(element); } - }); - }, - - _trigger: function( type, event, data ) { - var prop, orig, - callback = this.options[ type ]; - - data = data || {}; - event = $.Event( event ); - event.type = ( type === this.widgetEventPrefix ? - type : - this.widgetEventPrefix + type ).toLowerCase(); - // the original event may come from any element - // so we need to reset the target on the new event - event.target = this.element[ 0 ]; - - // copy original event properties over to the new event - orig = event.originalEvent; - if ( orig ) { - for ( prop in orig ) { - if ( !( prop in event ) ) { - event[ prop ] = orig[ prop ]; + + $.each(handlers, function (event, handler) { + function handlerProxy() { + // allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( + !suppressDisabledCheck && + (instance.options.disabled === true || + $(this).hasClass('ui-state-disabled')) + ) { + return; + } + return ( + typeof handler === 'string' ? instance[handler] : handler + ).apply(instance, arguments); + } + + // copy the guid so direct unbinding works + if (typeof handler !== 'string') { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match(/^(\w+)\s*(.*)$/), + eventName = match[1] + instance.eventNamespace, + selector = match[2]; + if (selector) { + delegateElement.delegate(selector, eventName, handlerProxy); + } else { + element.bind(eventName, handlerProxy); } + }); + }, + + _off: function (element, eventName) { + eventName = + (eventName || '').split(' ').join(this.eventNamespace + ' ') + + this.eventNamespace; + element.unbind(eventName).undelegate(eventName); + }, + + _delay: function (handler, delay) { + function handlerProxy() { + return ( + typeof handler === 'string' ? instance[handler] : handler + ).apply(instance, arguments); } - } + var instance = this; + return setTimeout(handlerProxy, delay || 0); + }, - this.element.trigger( event, data ); - return !( $.isFunction( callback ) && - callback.apply( this.element[0], [ event ].concat( data ) ) === false || - event.isDefaultPrevented() ); - } -}; + _hoverable: function (element) { + this.hoverable = this.hoverable.add(element); + this._on(element, { + mouseenter: function (event) { + $(event.currentTarget).addClass('ui-state-hover'); + }, + mouseleave: function (event) { + $(event.currentTarget).removeClass('ui-state-hover'); + } + }); + }, -$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { - $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { - if ( typeof options === "string" ) { - options = { effect: options }; - } - var hasOptions, - effectName = !options ? - method : - options === true || typeof options === "number" ? - defaultEffect : - options.effect || defaultEffect; - options = options || {}; - if ( typeof options === "number" ) { - options = { duration: options }; - } - hasOptions = !$.isEmptyObject( options ); - options.complete = callback; - if ( options.delay ) { - element.delay( options.delay ); - } - if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { - element[ method ]( options ); - } else if ( effectName !== method && element[ effectName ] ) { - element[ effectName ]( options.duration, options.easing, callback ); - } else { - element.queue(function( next ) { - $( this )[ method ](); - if ( callback ) { - callback.call( element[ 0 ] ); + _focusable: function (element) { + this.focusable = this.focusable.add(element); + this._on(element, { + focusin: function (event) { + $(event.currentTarget).addClass('ui-state-focus'); + }, + focusout: function (event) { + $(event.currentTarget).removeClass('ui-state-focus'); } - next(); }); + }, + + _trigger: function (type, event, data) { + var prop, + orig, + callback = this.options[type]; + + data = data || {}; + event = $.Event(event); + event.type = ( + type === this.widgetEventPrefix ? type : this.widgetEventPrefix + type + ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[0]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if (orig) { + for (prop in orig) { + if (!(prop in event)) { + event[prop] = orig[prop]; + } + } + } + + this.element.trigger(event, data); + return !( + ($.isFunction(callback) && + callback.apply(this.element[0], [event].concat(data)) === false) || + event.isDefaultPrevented() + ); } }; -}); - -})( jQuery ); -(function( $, undefined ) { - -$.ui = $.ui || {}; - -var cachedScrollbarWidth, - max = Math.max, - abs = Math.abs, - round = Math.round, - rhorizontal = /left|center|right/, - rvertical = /top|center|bottom/, - roffset = /[\+\-]\d+(\.[\d]+)?%?/, - rposition = /^\w+/, - rpercent = /%$/, - _position = $.fn.position; - -function getOffsets( offsets, width, height ) { - return [ - parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), - parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) - ]; -} - -function parseCss( element, property ) { - return parseInt( $.css( element, property ), 10 ) || 0; -} - -function getDimensions( elem ) { - var raw = elem[0]; - if ( raw.nodeType === 9 ) { - return { - width: elem.width(), - height: elem.height(), - offset: { top: 0, left: 0 } - }; - } - if ( $.isWindow( raw ) ) { - return { - width: elem.width(), - height: elem.height(), - offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + + $.each({ show: 'fadeIn', hide: 'fadeOut' }, function (method, defaultEffect) { + $.Widget.prototype['_' + method] = function (element, options, callback) { + if (typeof options === 'string') { + options = { effect: options }; + } + var hasOptions, + effectName = !options + ? method + : options === true || typeof options === 'number' + ? defaultEffect + : options.effect || defaultEffect; + options = options || {}; + if (typeof options === 'number') { + options = { duration: options }; + } + hasOptions = !$.isEmptyObject(options); + options.complete = callback; + if (options.delay) { + element.delay(options.delay); + } + if (hasOptions && $.effects && $.effects.effect[effectName]) { + element[method](options); + } else if (effectName !== method && element[effectName]) { + element[effectName](options.duration, options.easing, callback); + } else { + element.queue(function (next) { + $(this)[method](); + if (callback) { + callback.call(element[0]); + } + next(); + }); + } }; + }); +})(jQuery); +(function ($, undefined) { + $.ui = $.ui || {}; + + var cachedScrollbarWidth, + max = Math.max, + abs = Math.abs, + round = Math.round, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+(\.[\d]+)?%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; + + function getOffsets(offsets, width, height) { + return [ + parseFloat(offsets[0]) * (rpercent.test(offsets[0]) ? width / 100 : 1), + parseFloat(offsets[1]) * (rpercent.test(offsets[1]) ? height / 100 : 1) + ]; } - if ( raw.preventDefault ) { - return { - width: 0, - height: 0, - offset: { top: raw.pageY, left: raw.pageX } - }; + + function parseCss(element, property) { + return parseInt($.css(element, property), 10) || 0; } - return { - width: elem.outerWidth(), - height: elem.outerHeight(), - offset: elem.offset() - }; -} -$.position = { - scrollbarWidth: function() { - if ( cachedScrollbarWidth !== undefined ) { - return cachedScrollbarWidth; + function getDimensions(elem) { + var raw = elem[0]; + if (raw.nodeType === 9) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: 0, left: 0 } + }; } - var w1, w2, - div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ), - innerDiv = div.children()[0]; - - $( "body" ).append( div ); - w1 = innerDiv.offsetWidth; - div.css( "overflow", "scroll" ); - - w2 = innerDiv.offsetWidth; - - if ( w1 === w2 ) { - w2 = div[0].clientWidth; + if ($.isWindow(raw)) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + }; + } + if (raw.preventDefault) { + return { + width: 0, + height: 0, + offset: { top: raw.pageY, left: raw.pageX } + }; } - - div.remove(); - - return (cachedScrollbarWidth = w1 - w2); - }, - getScrollInfo: function( within ) { - var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ), - overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ), - hasOverflowX = overflowX === "scroll" || - ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), - hasOverflowY = overflowY === "scroll" || - ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); - return { - width: hasOverflowY ? $.position.scrollbarWidth() : 0, - height: hasOverflowX ? $.position.scrollbarWidth() : 0 - }; - }, - getWithinInfo: function( element ) { - var withinElement = $( element || window ), - isWindow = $.isWindow( withinElement[0] ); return { - element: withinElement, - isWindow: isWindow, - offset: withinElement.offset() || { left: 0, top: 0 }, - scrollLeft: withinElement.scrollLeft(), - scrollTop: withinElement.scrollTop(), - width: isWindow ? withinElement.width() : withinElement.outerWidth(), - height: isWindow ? withinElement.height() : withinElement.outerHeight() + width: elem.outerWidth(), + height: elem.outerHeight(), + offset: elem.offset() }; } -}; -$.fn.position = function( options ) { - if ( !options || !options.of ) { - return _position.apply( this, arguments ); - } + $.position = { + scrollbarWidth: function () { + if (cachedScrollbarWidth !== undefined) { + return cachedScrollbarWidth; + } + var w1, + w2, + div = $( + "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" + ), + innerDiv = div.children()[0]; - // make a copy, we don't want to modify arguments - options = $.extend( {}, options ); + $('body').append(div); + w1 = innerDiv.offsetWidth; + div.css('overflow', 'scroll'); - var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, - target = $( options.of ), - within = $.position.getWithinInfo( options.within ), - scrollInfo = $.position.getScrollInfo( within ), - collision = ( options.collision || "flip" ).split( " " ), - offsets = {}; + w2 = innerDiv.offsetWidth; - dimensions = getDimensions( target ); - if ( target[0].preventDefault ) { - // force left top to allow flipping - options.at = "left top"; - } - targetWidth = dimensions.width; - targetHeight = dimensions.height; - targetOffset = dimensions.offset; - // clone to reuse original targetOffset later - basePosition = $.extend( {}, targetOffset ); - - // force my and at to have valid horizontal and vertical positions - // if a value is missing or invalid, it will be converted to center - $.each( [ "my", "at" ], function() { - var pos = ( options[ this ] || "" ).split( " " ), - horizontalOffset, - verticalOffset; - - if ( pos.length === 1) { - pos = rhorizontal.test( pos[ 0 ] ) ? - pos.concat( [ "center" ] ) : - rvertical.test( pos[ 0 ] ) ? - [ "center" ].concat( pos ) : - [ "center", "center" ]; - } - pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; - pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; - - // calculate offsets - horizontalOffset = roffset.exec( pos[ 0 ] ); - verticalOffset = roffset.exec( pos[ 1 ] ); - offsets[ this ] = [ - horizontalOffset ? horizontalOffset[ 0 ] : 0, - verticalOffset ? verticalOffset[ 0 ] : 0 - ]; - - // reduce to just the positions without the offsets - options[ this ] = [ - rposition.exec( pos[ 0 ] )[ 0 ], - rposition.exec( pos[ 1 ] )[ 0 ] - ]; - }); - - // normalize collision option - if ( collision.length === 1 ) { - collision[ 1 ] = collision[ 0 ]; - } - - if ( options.at[ 0 ] === "right" ) { - basePosition.left += targetWidth; - } else if ( options.at[ 0 ] === "center" ) { - basePosition.left += targetWidth / 2; - } + if (w1 === w2) { + w2 = div[0].clientWidth; + } - if ( options.at[ 1 ] === "bottom" ) { - basePosition.top += targetHeight; - } else if ( options.at[ 1 ] === "center" ) { - basePosition.top += targetHeight / 2; - } + div.remove(); - atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); - basePosition.left += atOffset[ 0 ]; - basePosition.top += atOffset[ 1 ]; - - return this.each(function() { - var collisionPosition, using, - elem = $( this ), - elemWidth = elem.outerWidth(), - elemHeight = elem.outerHeight(), - marginLeft = parseCss( this, "marginLeft" ), - marginTop = parseCss( this, "marginTop" ), - collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, - collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, - position = $.extend( {}, basePosition ), - myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); - - if ( options.my[ 0 ] === "right" ) { - position.left -= elemWidth; - } else if ( options.my[ 0 ] === "center" ) { - position.left -= elemWidth / 2; + return (cachedScrollbarWidth = w1 - w2); + }, + getScrollInfo: function (within) { + var overflowX = within.isWindow ? '' : within.element.css('overflow-x'), + overflowY = within.isWindow ? '' : within.element.css('overflow-y'), + hasOverflowX = + overflowX === 'scroll' || + (overflowX === 'auto' && + within.width < within.element[0].scrollWidth), + hasOverflowY = + overflowY === 'scroll' || + (overflowY === 'auto' && + within.height < within.element[0].scrollHeight); + return { + width: hasOverflowY ? $.position.scrollbarWidth() : 0, + height: hasOverflowX ? $.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function (element) { + var withinElement = $(element || window), + isWindow = $.isWindow(withinElement[0]); + return { + element: withinElement, + isWindow: isWindow, + offset: withinElement.offset() || { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + width: isWindow ? withinElement.width() : withinElement.outerWidth(), + height: isWindow ? withinElement.height() : withinElement.outerHeight() + }; } + }; - if ( options.my[ 1 ] === "bottom" ) { - position.top -= elemHeight; - } else if ( options.my[ 1 ] === "center" ) { - position.top -= elemHeight / 2; - } + $.fn.position = function (options) { + if (!options || !options.of) { + return _position.apply(this, arguments); + } + + // make a copy, we don't want to modify arguments + options = $.extend({}, options); + + var atOffset, + targetWidth, + targetHeight, + targetOffset, + basePosition, + dimensions, + target = $(options.of), + within = $.position.getWithinInfo(options.within), + scrollInfo = $.position.getScrollInfo(within), + collision = (options.collision || 'flip').split(' '), + offsets = {}; + + dimensions = getDimensions(target); + if (target[0].preventDefault) { + // force left top to allow flipping + options.at = 'left top'; + } + targetWidth = dimensions.width; + targetHeight = dimensions.height; + targetOffset = dimensions.offset; + // clone to reuse original targetOffset later + basePosition = $.extend({}, targetOffset); + + // force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each(['my', 'at'], function () { + var pos = (options[this] || '').split(' '), + horizontalOffset, + verticalOffset; + + if (pos.length === 1) { + pos = rhorizontal.test(pos[0]) + ? pos.concat(['center']) + : rvertical.test(pos[0]) + ? ['center'].concat(pos) + : ['center', 'center']; + } + pos[0] = rhorizontal.test(pos[0]) ? pos[0] : 'center'; + pos[1] = rvertical.test(pos[1]) ? pos[1] : 'center'; + + // calculate offsets + horizontalOffset = roffset.exec(pos[0]); + verticalOffset = roffset.exec(pos[1]); + offsets[this] = [ + horizontalOffset ? horizontalOffset[0] : 0, + verticalOffset ? verticalOffset[0] : 0 + ]; + + // reduce to just the positions without the offsets + options[this] = [rposition.exec(pos[0])[0], rposition.exec(pos[1])[0]]; + }); - position.left += myOffset[ 0 ]; - position.top += myOffset[ 1 ]; + // normalize collision option + if (collision.length === 1) { + collision[1] = collision[0]; + } + + if (options.at[0] === 'right') { + basePosition.left += targetWidth; + } else if (options.at[0] === 'center') { + basePosition.left += targetWidth / 2; + } + + if (options.at[1] === 'bottom') { + basePosition.top += targetHeight; + } else if (options.at[1] === 'center') { + basePosition.top += targetHeight / 2; + } + + atOffset = getOffsets(offsets.at, targetWidth, targetHeight); + basePosition.left += atOffset[0]; + basePosition.top += atOffset[1]; + + return this.each(function () { + var collisionPosition, + using, + elem = $(this), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss(this, 'marginLeft'), + marginTop = parseCss(this, 'marginTop'), + collisionWidth = + elemWidth + + marginLeft + + parseCss(this, 'marginRight') + + scrollInfo.width, + collisionHeight = + elemHeight + + marginTop + + parseCss(this, 'marginBottom') + + scrollInfo.height, + position = $.extend({}, basePosition), + myOffset = getOffsets( + offsets.my, + elem.outerWidth(), + elem.outerHeight() + ); + + if (options.my[0] === 'right') { + position.left -= elemWidth; + } else if (options.my[0] === 'center') { + position.left -= elemWidth / 2; + } - // if the browser doesn't support fractions, then round for consistent results - if ( !$.support.offsetFractions ) { - position.left = round( position.left ); - position.top = round( position.top ); - } + if (options.my[1] === 'bottom') { + position.top -= elemHeight; + } else if (options.my[1] === 'center') { + position.top -= elemHeight / 2; + } - collisionPosition = { - marginLeft: marginLeft, - marginTop: marginTop - }; + position.left += myOffset[0]; + position.top += myOffset[1]; - $.each( [ "left", "top" ], function( i, dir ) { - if ( $.ui.position[ collision[ i ] ] ) { - $.ui.position[ collision[ i ] ][ dir ]( position, { - targetWidth: targetWidth, - targetHeight: targetHeight, - elemWidth: elemWidth, - elemHeight: elemHeight, - collisionPosition: collisionPosition, - collisionWidth: collisionWidth, - collisionHeight: collisionHeight, - offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], - my: options.my, - at: options.at, - within: within, - elem : elem - }); + // if the browser doesn't support fractions, then round for consistent results + if (!$.support.offsetFractions) { + position.left = round(position.left); + position.top = round(position.top); } - }); - if ( options.using ) { - // adds feedback as second argument to using callback, if present - using = function( props ) { - var left = targetOffset.left - position.left, - right = left + targetWidth - elemWidth, - top = targetOffset.top - position.top, - bottom = top + targetHeight - elemHeight, - feedback = { - target: { - element: target, - left: targetOffset.left, - top: targetOffset.top, - width: targetWidth, - height: targetHeight - }, - element: { - element: elem, - left: position.left, - top: position.top, - width: elemWidth, - height: elemHeight - }, - horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", - vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" - }; - if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { - feedback.horizontal = "center"; - } - if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { - feedback.vertical = "middle"; - } - if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { - feedback.important = "horizontal"; - } else { - feedback.important = "vertical"; - } - options.using.call( this, props, feedback ); + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop }; - } - elem.offset( $.extend( position, { using: using } ) ); - }); -}; - -$.ui.position = { - fit: { - left: function( position, data ) { - var within = data.within, - withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, - outerWidth = within.width, - collisionPosLeft = position.left - data.collisionPosition.marginLeft, - overLeft = withinOffset - collisionPosLeft, - overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, - newOverRight; - - // element is wider than within - if ( data.collisionWidth > outerWidth ) { - // element is initially over the left side of within - if ( overLeft > 0 && overRight <= 0 ) { - newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; - position.left += overLeft - newOverRight; - // element is initially over right side of within - } else if ( overRight > 0 && overLeft <= 0 ) { - position.left = withinOffset; - // element is initially over both left and right sides of within - } else { - if ( overLeft > overRight ) { - position.left = withinOffset + outerWidth - data.collisionWidth; + $.each(['left', 'top'], function (i, dir) { + if ($.ui.position[collision[i]]) { + $.ui.position[collision[i]][dir](position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [atOffset[0] + myOffset[0], atOffset[1] + myOffset[1]], + my: options.my, + at: options.at, + within: within, + elem: elem + }); + } + }); + + if (options.using) { + // adds feedback as second argument to using callback, if present + using = function (props) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? 'left' : left > 0 ? 'right' : 'center', + vertical: bottom < 0 ? 'top' : top > 0 ? 'bottom' : 'middle' + }; + if (targetWidth < elemWidth && abs(left + right) < targetWidth) { + feedback.horizontal = 'center'; + } + if (targetHeight < elemHeight && abs(top + bottom) < targetHeight) { + feedback.vertical = 'middle'; + } + if (max(abs(left), abs(right)) > max(abs(top), abs(bottom))) { + feedback.important = 'horizontal'; } else { + feedback.important = 'vertical'; + } + options.using.call(this, props, feedback); + }; + } + + elem.offset($.extend(position, { using: using })); + }); + }; + + $.ui.position = { + fit: { + left: function (position, data) { + var within = data.within, + withinOffset = within.isWindow + ? within.scrollLeft + : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = + collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; + + // element is wider than within + if (data.collisionWidth > outerWidth) { + // element is initially over the left side of within + if (overLeft > 0 && overRight <= 0) { + newOverRight = + position.left + + overLeft + + data.collisionWidth - + outerWidth - + withinOffset; + position.left += overLeft - newOverRight; + // element is initially over right side of within + } else if (overRight > 0 && overLeft <= 0) { position.left = withinOffset; + // element is initially over both left and right sides of within + } else { + if (overLeft > overRight) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } } - } - // too far left -> align with left edge - } else if ( overLeft > 0 ) { - position.left += overLeft; - // too far right -> align with right edge - } else if ( overRight > 0 ) { - position.left -= overRight; - // adjust based on position and margin - } else { - position.left = max( position.left - collisionPosLeft, position.left ); - } - }, - top: function( position, data ) { - var within = data.within, - withinOffset = within.isWindow ? within.scrollTop : within.offset.top, - outerHeight = data.within.height, - collisionPosTop = position.top - data.collisionPosition.marginTop, - overTop = withinOffset - collisionPosTop, - overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, - newOverBottom; - - // element is taller than within - if ( data.collisionHeight > outerHeight ) { - // element is initially over the top of within - if ( overTop > 0 && overBottom <= 0 ) { - newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; - position.top += overTop - newOverBottom; - // element is initially over bottom of within - } else if ( overBottom > 0 && overTop <= 0 ) { - position.top = withinOffset; - // element is initially over both top and bottom of within + // too far left -> align with left edge + } else if (overLeft > 0) { + position.left += overLeft; + // too far right -> align with right edge + } else if (overRight > 0) { + position.left -= overRight; + // adjust based on position and margin } else { - if ( overTop > overBottom ) { - position.top = withinOffset + outerHeight - data.collisionHeight; - } else { + position.left = max(position.left - collisionPosLeft, position.left); + } + }, + top: function (position, data) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = + collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; + + // element is taller than within + if (data.collisionHeight > outerHeight) { + // element is initially over the top of within + if (overTop > 0 && overBottom <= 0) { + newOverBottom = + position.top + + overTop + + data.collisionHeight - + outerHeight - + withinOffset; + position.top += overTop - newOverBottom; + // element is initially over bottom of within + } else if (overBottom > 0 && overTop <= 0) { position.top = withinOffset; + // element is initially over both top and bottom of within + } else { + if (overTop > overBottom) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } } + // too far up -> align with top + } else if (overTop > 0) { + position.top += overTop; + // too far down -> align with bottom edge + } else if (overBottom > 0) { + position.top -= overBottom; + // adjust based on position and margin + } else { + position.top = max(position.top - collisionPosTop, position.top); } - // too far up -> align with top - } else if ( overTop > 0 ) { - position.top += overTop; - // too far down -> align with bottom edge - } else if ( overBottom > 0 ) { - position.top -= overBottom; - // adjust based on position and margin - } else { - position.top = max( position.top - collisionPosTop, position.top ); } - } - }, - flip: { - left: function( position, data ) { - var within = data.within, - withinOffset = within.offset.left + within.scrollLeft, - outerWidth = within.width, - offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, - collisionPosLeft = position.left - data.collisionPosition.marginLeft, - overLeft = collisionPosLeft - offsetLeft, - overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, - myOffset = data.my[ 0 ] === "left" ? - -data.elemWidth : - data.my[ 0 ] === "right" ? - data.elemWidth : - 0, - atOffset = data.at[ 0 ] === "left" ? - data.targetWidth : - data.at[ 0 ] === "right" ? - -data.targetWidth : - 0, - offset = -2 * data.offset[ 0 ], - newOverRight, - newOverLeft; - - if ( overLeft < 0 ) { - newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; - if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { - position.left += myOffset + atOffset + offset; + }, + flip: { + left: function (position, data) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = + collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = + data.my[0] === 'left' + ? -data.elemWidth + : data.my[0] === 'right' + ? data.elemWidth + : 0, + atOffset = + data.at[0] === 'left' + ? data.targetWidth + : data.at[0] === 'right' + ? -data.targetWidth + : 0, + offset = -2 * data.offset[0], + newOverRight, + newOverLeft; + + if (overLeft < 0) { + newOverRight = + position.left + + myOffset + + atOffset + + offset + + data.collisionWidth - + outerWidth - + withinOffset; + if (newOverRight < 0 || newOverRight < abs(overLeft)) { + position.left += myOffset + atOffset + offset; + } + } else if (overRight > 0) { + newOverLeft = + position.left - + data.collisionPosition.marginLeft + + myOffset + + atOffset + + offset - + offsetLeft; + if (newOverLeft > 0 || abs(newOverLeft) < overRight) { + position.left += myOffset + atOffset + offset; + } } - } - else if ( overRight > 0 ) { - newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; - if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { - position.left += myOffset + atOffset + offset; + }, + top: function (position, data) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = + collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[1] === 'top', + myOffset = top + ? -data.elemHeight + : data.my[1] === 'bottom' + ? data.elemHeight + : 0, + atOffset = + data.at[1] === 'top' + ? data.targetHeight + : data.at[1] === 'bottom' + ? -data.targetHeight + : 0, + offset = -2 * data.offset[1], + newOverTop, + newOverBottom; + if (overTop < 0) { + newOverBottom = + position.top + + myOffset + + atOffset + + offset + + data.collisionHeight - + outerHeight - + withinOffset; + if ( + position.top + myOffset + atOffset + offset > overTop && + (newOverBottom < 0 || newOverBottom < abs(overTop)) + ) { + position.top += myOffset + atOffset + offset; + } + } else if (overBottom > 0) { + newOverTop = + position.top - + data.collisionPosition.marginTop + + myOffset + + atOffset + + offset - + offsetTop; + if ( + position.top + myOffset + atOffset + offset > overBottom && + (newOverTop > 0 || abs(newOverTop) < overBottom) + ) { + position.top += myOffset + atOffset + offset; + } } } }, - top: function( position, data ) { - var within = data.within, - withinOffset = within.offset.top + within.scrollTop, - outerHeight = within.height, - offsetTop = within.isWindow ? within.scrollTop : within.offset.top, - collisionPosTop = position.top - data.collisionPosition.marginTop, - overTop = collisionPosTop - offsetTop, - overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, - top = data.my[ 1 ] === "top", - myOffset = top ? - -data.elemHeight : - data.my[ 1 ] === "bottom" ? - data.elemHeight : - 0, - atOffset = data.at[ 1 ] === "top" ? - data.targetHeight : - data.at[ 1 ] === "bottom" ? - -data.targetHeight : - 0, - offset = -2 * data.offset[ 1 ], - newOverTop, - newOverBottom; - if ( overTop < 0 ) { - newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; - if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) { - position.top += myOffset + atOffset + offset; - } - } - else if ( overBottom > 0 ) { - newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; - if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) { - position.top += myOffset + atOffset + offset; - } + flipfit: { + left: function () { + $.ui.position.flip.left.apply(this, arguments); + $.ui.position.fit.left.apply(this, arguments); + }, + top: function () { + $.ui.position.flip.top.apply(this, arguments); + $.ui.position.fit.top.apply(this, arguments); } } - }, - flipfit: { - left: function() { - $.ui.position.flip.left.apply( this, arguments ); - $.ui.position.fit.left.apply( this, arguments ); - }, - top: function() { - $.ui.position.flip.top.apply( this, arguments ); - $.ui.position.fit.top.apply( this, arguments ); - } - } -}; - -// fraction support test -(function () { - var testElement, testElementParent, testElementStyle, offsetLeft, i, - body = document.getElementsByTagName( "body" )[ 0 ], - div = document.createElement( "div" ); - - //Create a "fake body" for testing based on method used in jQuery.support - testElement = document.createElement( body ? "div" : "body" ); - testElementStyle = { - visibility: "hidden", - width: 0, - height: 0, - border: 0, - margin: 0, - background: "none" }; - if ( body ) { - $.extend( testElementStyle, { - position: "absolute", - left: "-1000px", - top: "-1000px" - }); - } - for ( i in testElementStyle ) { - testElement.style[ i ] = testElementStyle[ i ]; - } - testElement.appendChild( div ); - testElementParent = body || document.documentElement; - testElementParent.insertBefore( testElement, testElementParent.firstChild ); - div.style.cssText = "position: absolute; left: 10.7432222px;"; - - offsetLeft = $( div ).offset().left; - $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11; - - testElement.innerHTML = ""; - testElementParent.removeChild( testElement ); -})(); - -}( jQuery ) ); -(function( $, undefined ) { + // fraction support test + (function () { + var testElement, + testElementParent, + testElementStyle, + offsetLeft, + i, + body = document.getElementsByTagName('body')[0], + div = document.createElement('div'); + + //Create a "fake body" for testing based on method used in jQuery.support + testElement = document.createElement(body ? 'div' : 'body'); + testElementStyle = { + visibility: 'hidden', + width: 0, + height: 0, + border: 0, + margin: 0, + background: 'none' + }; + if (body) { + $.extend(testElementStyle, { + position: 'absolute', + left: '-1000px', + top: '-1000px' + }); + } + for (i in testElementStyle) { + testElement.style[i] = testElementStyle[i]; + } + testElement.appendChild(div); + testElementParent = body || document.documentElement; + testElementParent.insertBefore(testElement, testElementParent.firstChild); + + div.style.cssText = 'position: absolute; left: 10.7432222px;'; + + offsetLeft = $(div).offset().left; + $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11; + + testElement.innerHTML = ''; + testElementParent.removeChild(testElement); + })(); +})(jQuery); +(function ($, undefined) { + // used to prevent race conditions with remote data sources + var requestIndex = 0; + + $.widget('ui.autocomplete', { + version: '1.10.3', + defaultElement: '<input>', + options: { + appendTo: null, + autoFocus: false, + delay: 300, + minLength: 1, + position: { + my: 'left top', + at: 'left bottom', + collision: 'none' + }, + source: null, + + // callbacks + change: null, + close: null, + focus: null, + open: null, + response: null, + search: null, + select: null + }, -// used to prevent race conditions with remote data sources -var requestIndex = 0; + pending: 0, + + _create: function () { + // Some browsers only repeat keydown events, not keypress events, + // so we use the suppressKeyPress flag to determine if we've already + // handled the keydown event. #7269 + // Unfortunately the code for & in keypress is the same as the up arrow, + // so we use the suppressKeyPressRepeat flag to avoid handling keypress + // events when we know the keydown event was used to modify the + // search term. #7799 + var suppressKeyPress, + suppressKeyPressRepeat, + suppressInput, + nodeName = this.element[0].nodeName.toLowerCase(), + isTextarea = nodeName === 'textarea', + isInput = nodeName === 'input'; + + this.isMultiLine = + // Textareas are always multi-line + isTextarea + ? true + : // Inputs are always single-line, even if inside a contentEditable element + // IE also treats inputs as contentEditable + isInput + ? false + : // All other element types are determined by whether or not they're contentEditable + this.element.prop('isContentEditable'); + + this.valueMethod = this.element[isTextarea || isInput ? 'val' : 'text']; + this.isNewMenu = true; -$.widget( "ui.autocomplete", { - version: "1.10.3", - defaultElement: "<input>", - options: { - appendTo: null, - autoFocus: false, - delay: 300, - minLength: 1, - position: { - my: "left top", - at: "left bottom", - collision: "none" - }, - source: null, - - // callbacks - change: null, - close: null, - focus: null, - open: null, - response: null, - search: null, - select: null - }, - - pending: 0, - - _create: function() { - // Some browsers only repeat keydown events, not keypress events, - // so we use the suppressKeyPress flag to determine if we've already - // handled the keydown event. #7269 - // Unfortunately the code for & in keypress is the same as the up arrow, - // so we use the suppressKeyPressRepeat flag to avoid handling keypress - // events when we know the keydown event was used to modify the - // search term. #7799 - var suppressKeyPress, suppressKeyPressRepeat, suppressInput, - nodeName = this.element[0].nodeName.toLowerCase(), - isTextarea = nodeName === "textarea", - isInput = nodeName === "input"; - - this.isMultiLine = - // Textareas are always multi-line - isTextarea ? true : - // Inputs are always single-line, even if inside a contentEditable element - // IE also treats inputs as contentEditable - isInput ? false : - // All other element types are determined by whether or not they're contentEditable - this.element.prop( "isContentEditable" ); - - this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; - this.isNewMenu = true; - - this.element - .addClass( "ui-autocomplete-input" ) - .attr( "autocomplete", "off" ); - - this._on( this.element, { - keydown: function( event ) { - /*jshint maxcomplexity:15*/ - if ( this.element.prop( "readOnly" ) ) { - suppressKeyPress = true; - suppressInput = true; - suppressKeyPressRepeat = true; - return; - } + this.element + .addClass('ui-autocomplete-input') + .attr('autocomplete', 'off'); - suppressKeyPress = false; - suppressInput = false; - suppressKeyPressRepeat = false; - var keyCode = $.ui.keyCode; - switch( event.keyCode ) { - case keyCode.PAGE_UP: - suppressKeyPress = true; - this._move( "previousPage", event ); - break; - case keyCode.PAGE_DOWN: - suppressKeyPress = true; - this._move( "nextPage", event ); - break; - case keyCode.UP: - suppressKeyPress = true; - this._keyEvent( "previous", event ); - break; - case keyCode.DOWN: - suppressKeyPress = true; - this._keyEvent( "next", event ); - break; - case keyCode.ENTER: - case keyCode.NUMPAD_ENTER: - // when menu is open and has focus - if ( this.menu.active ) { - // #6055 - Opera still allows the keypress to occur - // which causes forms to submit + this._on(this.element, { + keydown: function (event) { + /*jshint maxcomplexity:15*/ + if (this.element.prop('readOnly')) { suppressKeyPress = true; - event.preventDefault(); - this.menu.select( event ); + suppressInput = true; + suppressKeyPressRepeat = true; + return; } - break; - case keyCode.TAB: - if ( this.menu.active ) { - this.menu.select( event ); + + suppressKeyPress = false; + suppressInput = false; + suppressKeyPressRepeat = false; + var keyCode = $.ui.keyCode; + switch (event.keyCode) { + case keyCode.PAGE_UP: + suppressKeyPress = true; + this._move('previousPage', event); + break; + case keyCode.PAGE_DOWN: + suppressKeyPress = true; + this._move('nextPage', event); + break; + case keyCode.UP: + suppressKeyPress = true; + this._keyEvent('previous', event); + break; + case keyCode.DOWN: + suppressKeyPress = true; + this._keyEvent('next', event); + break; + case keyCode.ENTER: + case keyCode.NUMPAD_ENTER: + // when menu is open and has focus + if (this.menu.active) { + // #6055 - Opera still allows the keypress to occur + // which causes forms to submit + suppressKeyPress = true; + event.preventDefault(); + this.menu.select(event); + } + break; + case keyCode.TAB: + if (this.menu.active) { + this.menu.select(event); + } + break; + case keyCode.ESCAPE: + if (this.menu.element.is(':visible')) { + this._value(this.term); + this.close(event); + // Different browsers have different default behavior for escape + // Single press can mean undo or clear + // Double press in IE means clear the whole form + event.preventDefault(); + } + break; + default: + suppressKeyPressRepeat = true; + // search timeout should be triggered before the input value is changed + this._searchTimeout(event); + break; } - break; - case keyCode.ESCAPE: - if ( this.menu.element.is( ":visible" ) ) { - this._value( this.term ); - this.close( event ); - // Different browsers have different default behavior for escape - // Single press can mean undo or clear - // Double press in IE means clear the whole form - event.preventDefault(); + }, + keypress: function (event) { + if (suppressKeyPress) { + suppressKeyPress = false; + if (!this.isMultiLine || this.menu.element.is(':visible')) { + event.preventDefault(); + } + return; } - break; - default: - suppressKeyPressRepeat = true; - // search timeout should be triggered before the input value is changed - this._searchTimeout( event ); - break; - } - }, - keypress: function( event ) { - if ( suppressKeyPress ) { - suppressKeyPress = false; - if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { + if (suppressKeyPressRepeat) { + return; + } + + // replicate some key handlers to allow them to repeat in Firefox and Opera + var keyCode = $.ui.keyCode; + switch (event.keyCode) { + case keyCode.PAGE_UP: + this._move('previousPage', event); + break; + case keyCode.PAGE_DOWN: + this._move('nextPage', event); + break; + case keyCode.UP: + this._keyEvent('previous', event); + break; + case keyCode.DOWN: + this._keyEvent('next', event); + break; + } + }, + input: function (event) { + if (suppressInput) { + suppressInput = false; event.preventDefault(); + return; + } + this._searchTimeout(event); + }, + focus: function () { + this.selectedItem = null; + this.previous = this._value(); + }, + blur: function (event) { + if (this.cancelBlur) { + delete this.cancelBlur; + return; } - return; - } - if ( suppressKeyPressRepeat ) { - return; - } - // replicate some key handlers to allow them to repeat in Firefox and Opera - var keyCode = $.ui.keyCode; - switch( event.keyCode ) { - case keyCode.PAGE_UP: - this._move( "previousPage", event ); - break; - case keyCode.PAGE_DOWN: - this._move( "nextPage", event ); - break; - case keyCode.UP: - this._keyEvent( "previous", event ); - break; - case keyCode.DOWN: - this._keyEvent( "next", event ); - break; - } - }, - input: function( event ) { - if ( suppressInput ) { - suppressInput = false; - event.preventDefault(); - return; - } - this._searchTimeout( event ); - }, - focus: function() { - this.selectedItem = null; - this.previous = this._value(); - }, - blur: function( event ) { - if ( this.cancelBlur ) { - delete this.cancelBlur; - return; + clearTimeout(this.searching); + this.close(event); + this._change(event); } + }); - clearTimeout( this.searching ); - this.close( event ); - this._change( event ); - } - }); - - this._initSource(); - this.menu = $( "<ul>" ) - .addClass( "ui-autocomplete ui-front" ) - .appendTo( this._appendTo() ) - .menu({ - // disable ARIA support, the live region takes care of that - role: null - }) - .hide() - .data( "ui-menu" ); + this._initSource(); + this.menu = $('<ul>') + .addClass('ui-autocomplete ui-front') + .appendTo(this._appendTo()) + .menu({ + // disable ARIA support, the live region takes care of that + role: null + }) + .hide() + .data('ui-menu'); - this._on( this.menu.element, { - mousedown: function( event ) { - // prevent moving focus out of the text field - event.preventDefault(); + this._on(this.menu.element, { + mousedown: function (event) { + // prevent moving focus out of the text field + event.preventDefault(); - // IE doesn't prevent moving focus even with event.preventDefault() - // so we set a flag to know when we should ignore the blur event - this.cancelBlur = true; - this._delay(function() { - delete this.cancelBlur; - }); + // IE doesn't prevent moving focus even with event.preventDefault() + // so we set a flag to know when we should ignore the blur event + this.cancelBlur = true; + this._delay(function () { + delete this.cancelBlur; + }); - // clicking on the scrollbar causes focus to shift to the body - // but we can't detect a mouseup or a click immediately afterward - // so we have to track the next mousedown and close the menu if - // the user clicks somewhere outside of the autocomplete - var menuElement = this.menu.element[ 0 ]; - if ( !$( event.target ).closest( ".ui-menu-item" ).length ) { - this._delay(function() { - var that = this; - this.document.one( "mousedown", function( event ) { - if ( event.target !== that.element[ 0 ] && + // clicking on the scrollbar causes focus to shift to the body + // but we can't detect a mouseup or a click immediately afterward + // so we have to track the next mousedown and close the menu if + // the user clicks somewhere outside of the autocomplete + var menuElement = this.menu.element[0]; + if (!$(event.target).closest('.ui-menu-item').length) { + this._delay(function () { + var that = this; + this.document.one('mousedown', function (event) { + if ( + event.target !== that.element[0] && event.target !== menuElement && - !$.contains( menuElement, event.target ) ) { - that.close(); - } - }); - }); - } - }, - menufocus: function( event, ui ) { - // support: Firefox - // Prevent accidental activation of menu items in Firefox (#7024 #9118) - if ( this.isNewMenu ) { - this.isNewMenu = false; - if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) { - this.menu.blur(); - - this.document.one( "mousemove", function() { - $( event.target ).trigger( event.originalEvent ); + !$.contains(menuElement, event.target) + ) { + that.close(); + } + }); }); - - return; } - } + }, + menufocus: function (event, ui) { + // support: Firefox + // Prevent accidental activation of menu items in Firefox (#7024 #9118) + if (this.isNewMenu) { + this.isNewMenu = false; + if ( + event.originalEvent && + /^mouse/.test(event.originalEvent.type) + ) { + this.menu.blur(); + + this.document.one('mousemove', function () { + $(event.target).trigger(event.originalEvent); + }); + + return; + } + } - var item = ui.item.data( "ui-autocomplete-item" ); - if ( false !== this._trigger( "focus", event, { item: item } ) ) { - // use value to match what will end up in the input, if it was a key event - if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) { - this._value( item.value ); + var item = ui.item.data('ui-autocomplete-item'); + if (false !== this._trigger('focus', event, { item: item })) { + // use value to match what will end up in the input, if it was a key event + if (event.originalEvent && /^key/.test(event.originalEvent.type)) { + this._value(item.value); + } + } else { + // Normally the input is populated with the item's value as the + // menu is navigated, causing screen readers to notice a change and + // announce the item. Since the focus event was canceled, this doesn't + // happen, so we update the live region so that screen readers can + // still notice the change and announce it. + this.liveRegion.text(item.value); } - } else { - // Normally the input is populated with the item's value as the - // menu is navigated, causing screen readers to notice a change and - // announce the item. Since the focus event was canceled, this doesn't - // happen, so we update the live region so that screen readers can - // still notice the change and announce it. - this.liveRegion.text( item.value ); - } - }, - menuselect: function( event, ui ) { - var item = ui.item.data( "ui-autocomplete-item" ), - previous = this.previous; - - // only trigger when focus was lost (click on menu) - if ( this.element[0] !== this.document[0].activeElement ) { - this.element.focus(); - this.previous = previous; - // #6109 - IE triggers two focus events and the second - // is asynchronous, so we need to reset the previous - // term synchronously and asynchronously :-( - this._delay(function() { + }, + menuselect: function (event, ui) { + var item = ui.item.data('ui-autocomplete-item'), + previous = this.previous; + + // only trigger when focus was lost (click on menu) + if (this.element[0] !== this.document[0].activeElement) { + this.element.focus(); this.previous = previous; - this.selectedItem = item; - }); + // #6109 - IE triggers two focus events and the second + // is asynchronous, so we need to reset the previous + // term synchronously and asynchronously :-( + this._delay(function () { + this.previous = previous; + this.selectedItem = item; + }); + } + + if (false !== this._trigger('select', event, { item: item })) { + this._value(item.value); + } + // reset the term after the select event + // this allows custom select handling to work properly + this.term = this._value(); + + this.close(event); + this.selectedItem = item; } + }); - if ( false !== this._trigger( "select", event, { item: item } ) ) { - this._value( item.value ); + this.liveRegion = $('<span>', { + role: 'status', + 'aria-live': 'polite' + }) + .addClass('ui-helper-hidden-accessible') + .insertBefore(this.element); + + // turning off autocomplete prevents the browser from remembering the + // value when navigating through history, so we re-enable autocomplete + // if the page is unloaded before the widget is destroyed. #7790 + this._on(this.window, { + beforeunload: function () { + this.element.removeAttr('autocomplete'); } - // reset the term after the select event - // this allows custom select handling to work properly - this.term = this._value(); + }); + }, - this.close( event ); - this.selectedItem = item; + _destroy: function () { + clearTimeout(this.searching); + this.element + .removeClass('ui-autocomplete-input') + .removeAttr('autocomplete'); + this.menu.element.remove(); + this.liveRegion.remove(); + }, + + _setOption: function (key, value) { + this._super(key, value); + if (key === 'source') { + this._initSource(); } - }); + if (key === 'appendTo') { + this.menu.element.appendTo(this._appendTo()); + } + if (key === 'disabled' && value && this.xhr) { + this.xhr.abort(); + } + }, - this.liveRegion = $( "<span>", { - role: "status", - "aria-live": "polite" - }) - .addClass( "ui-helper-hidden-accessible" ) - .insertBefore( this.element ); + _appendTo: function () { + var element = this.options.appendTo; - // turning off autocomplete prevents the browser from remembering the - // value when navigating through history, so we re-enable autocomplete - // if the page is unloaded before the widget is destroyed. #7790 - this._on( this.window, { - beforeunload: function() { - this.element.removeAttr( "autocomplete" ); + if (element) { + element = + element.jquery || element.nodeType + ? $(element) + : this.document.find(element).eq(0); } - }); - }, - - _destroy: function() { - clearTimeout( this.searching ); - this.element - .removeClass( "ui-autocomplete-input" ) - .removeAttr( "autocomplete" ); - this.menu.element.remove(); - this.liveRegion.remove(); - }, - - _setOption: function( key, value ) { - this._super( key, value ); - if ( key === "source" ) { - this._initSource(); - } - if ( key === "appendTo" ) { - this.menu.element.appendTo( this._appendTo() ); - } - if ( key === "disabled" && value && this.xhr ) { - this.xhr.abort(); - } - }, - _appendTo: function() { - var element = this.options.appendTo; - - if ( element ) { - element = element.jquery || element.nodeType ? - $( element ) : - this.document.find( element ).eq( 0 ); - } + if (!element) { + element = this.element.closest('.ui-front'); + } - if ( !element ) { - element = this.element.closest( ".ui-front" ); - } + if (!element.length) { + element = this.document[0].body; + } - if ( !element.length ) { - element = this.document[0].body; - } + return element; + }, - return element; - }, + _initSource: function () { + var array, + url, + that = this; + if ($.isArray(this.options.source)) { + array = this.options.source; + this.source = function (request, response) { + response($.ui.autocomplete.filter(array, request.term)); + }; + } else if (typeof this.options.source === 'string') { + url = this.options.source; + this.source = function (request, response) { + if (that.xhr) { + that.xhr.abort(); + } + that.xhr = $.ajax({ + url: url, + data: request, + dataType: 'json', + success: function (data) { + response(data); + }, + error: function () { + response([]); + } + }); + }; + } else { + this.source = this.options.source; + } + }, - _initSource: function() { - var array, url, - that = this; - if ( $.isArray(this.options.source) ) { - array = this.options.source; - this.source = function( request, response ) { - response( $.ui.autocomplete.filter( array, request.term ) ); - }; - } else if ( typeof this.options.source === "string" ) { - url = this.options.source; - this.source = function( request, response ) { - if ( that.xhr ) { - that.xhr.abort(); + _searchTimeout: function (event) { + clearTimeout(this.searching); + this.searching = this._delay(function () { + // only search if the value has changed + if (this.term !== this._value()) { + this.selectedItem = null; + this.search(null, event); } - that.xhr = $.ajax({ - url: url, - data: request, - dataType: "json", - success: function( data ) { - response( data ); - }, - error: function() { - response( [] ); - } - }); - }; - } else { - this.source = this.options.source; - } - }, + }, this.options.delay); + }, - _searchTimeout: function( event ) { - clearTimeout( this.searching ); - this.searching = this._delay(function() { - // only search if the value has changed - if ( this.term !== this._value() ) { - this.selectedItem = null; - this.search( null, event ); - } - }, this.options.delay ); - }, + search: function (value, event) { + value = value != null ? value : this._value(); - search: function( value, event ) { - value = value != null ? value : this._value(); + // always save the actual value, not the one passed as an argument + this.term = this._value(); - // always save the actual value, not the one passed as an argument - this.term = this._value(); + if (value.length < this.options.minLength) { + return this.close(event); + } - if ( value.length < this.options.minLength ) { - return this.close( event ); - } + if (this._trigger('search', event) === false) { + return; + } - if ( this._trigger( "search", event ) === false ) { - return; - } + return this._search(value); + }, - return this._search( value ); - }, + _search: function (value) { + this.pending++; + this.element.addClass('ui-autocomplete-loading'); + this.cancelSearch = false; - _search: function( value ) { - this.pending++; - this.element.addClass( "ui-autocomplete-loading" ); - this.cancelSearch = false; + this.source({ term: value }, this._response()); + }, + + _response: function () { + var that = this, + index = ++requestIndex; - this.source( { term: value }, this._response() ); - }, + return function (content) { + if (index === requestIndex) { + that.__response(content); + } - _response: function() { - var that = this, - index = ++requestIndex; + that.pending--; + if (!that.pending) { + that.element.removeClass('ui-autocomplete-loading'); + } + }; + }, - return function( content ) { - if ( index === requestIndex ) { - that.__response( content ); + __response: function (content) { + if (content) { + content = this._normalize(content); + } + this._trigger('response', null, { content: content }); + if ( + !this.options.disabled && + content && + content.length && + !this.cancelSearch + ) { + this._suggest(content); + this._trigger('open'); + } else { + // use ._close() instead of .close() so we don't cancel future searches + this._close(); } + }, + + close: function (event) { + this.cancelSearch = true; + this._close(event); + }, - that.pending--; - if ( !that.pending ) { - that.element.removeClass( "ui-autocomplete-loading" ); + _close: function (event) { + if (this.menu.element.is(':visible')) { + this.menu.element.hide(); + this.menu.blur(); + this.isNewMenu = true; + this._trigger('close', event); } - }; - }, + }, - __response: function( content ) { - if ( content ) { - content = this._normalize( content ); - } - this._trigger( "response", null, { content: content } ); - if ( !this.options.disabled && content && content.length && !this.cancelSearch ) { - this._suggest( content ); - this._trigger( "open" ); - } else { - // use ._close() instead of .close() so we don't cancel future searches - this._close(); - } - }, + _change: function (event) { + if (this.previous !== this._value()) { + this._trigger('change', event, { item: this.selectedItem }); + } + }, - close: function( event ) { - this.cancelSearch = true; - this._close( event ); - }, + _normalize: function (items) { + // assume all items have the right format when the first item is complete + if (items.length && items[0].label && items[0].value) { + return items; + } + return $.map(items, function (item) { + if (typeof item === 'string') { + return { + label: item, + value: item + }; + } + return $.extend( + { + label: item.label || item.value, + value: item.value || item.label + }, + item + ); + }); + }, - _close: function( event ) { - if ( this.menu.element.is( ":visible" ) ) { - this.menu.element.hide(); - this.menu.blur(); + _suggest: function (items) { + var ul = this.menu.element.empty(); + this._renderMenu(ul, items); this.isNewMenu = true; - this._trigger( "close", event ); - } - }, - - _change: function( event ) { - if ( this.previous !== this._value() ) { - this._trigger( "change", event, { item: this.selectedItem } ); - } - }, + this.menu.refresh(); + + // size and position menu + ul.show(); + this._resizeMenu(); + ul.position( + $.extend( + { + of: this.element + }, + this.options.position + ) + ); - _normalize: function( items ) { - // assume all items have the right format when the first item is complete - if ( items.length && items[0].label && items[0].value ) { - return items; - } - return $.map( items, function( item ) { - if ( typeof item === "string" ) { - return { - label: item, - value: item - }; + if (this.options.autoFocus) { + this.menu.next(); } - return $.extend({ - label: item.label || item.value, - value: item.value || item.label - }, item ); - }); - }, - - _suggest: function( items ) { - var ul = this.menu.element.empty(); - this._renderMenu( ul, items ); - this.isNewMenu = true; - this.menu.refresh(); - - // size and position menu - ul.show(); - this._resizeMenu(); - ul.position( $.extend({ - of: this.element - }, this.options.position )); - - if ( this.options.autoFocus ) { - this.menu.next(); - } - }, - - _resizeMenu: function() { - var ul = this.menu.element; - ul.outerWidth( Math.max( - // Firefox wraps long text (possibly a rounding bug) - // so we add 1px to avoid the wrapping (#7513) - ul.width( "" ).outerWidth() + 1, - this.element.outerWidth() - ) ); - }, - - _renderMenu: function( ul, items ) { - var that = this; - $.each( items, function( index, item ) { - that._renderItemData( ul, item ); - }); - }, - - _renderItemData: function( ul, item ) { - return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); - }, - - _renderItem: function( ul, item ) { - return $( "<li>" ) - .append( $( "<a>" ).text( item.label ) ) - .appendTo( ul ); - }, - - _move: function( direction, event ) { - if ( !this.menu.element.is( ":visible" ) ) { - this.search( null, event ); - return; - } - if ( this.menu.isFirstItem() && /^previous/.test( direction ) || - this.menu.isLastItem() && /^next/.test( direction ) ) { - this._value( this.term ); - this.menu.blur(); - return; - } - this.menu[ direction ]( event ); - }, + }, - widget: function() { - return this.menu.element; - }, + _resizeMenu: function () { + var ul = this.menu.element; + ul.outerWidth( + Math.max( + // Firefox wraps long text (possibly a rounding bug) + // so we add 1px to avoid the wrapping (#7513) + ul.width('').outerWidth() + 1, + this.element.outerWidth() + ) + ); + }, - _value: function() { - return this.valueMethod.apply( this.element, arguments ); - }, + _renderMenu: function (ul, items) { + var that = this; + $.each(items, function (index, item) { + that._renderItemData(ul, item); + }); + }, - _keyEvent: function( keyEvent, event ) { - if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { - this._move( keyEvent, event ); + _renderItemData: function (ul, item) { + return this._renderItem(ul, item).data('ui-autocomplete-item', item); + }, - // prevents moving cursor to beginning/end of the text field in some browsers - event.preventDefault(); - } - } -}); - -$.extend( $.ui.autocomplete, { - escapeRegex: function( value ) { - return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); - }, - filter: function(array, term) { - var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" ); - return $.grep( array, function(value) { - return matcher.test( value.label || value.value || value ); - }); - } -}); + _renderItem: function (ul, item) { + return $('<li>').append($('<a>').text(item.label)).appendTo(ul); + }, + + _move: function (direction, event) { + if (!this.menu.element.is(':visible')) { + this.search(null, event); + return; + } + if ( + (this.menu.isFirstItem() && /^previous/.test(direction)) || + (this.menu.isLastItem() && /^next/.test(direction)) + ) { + this._value(this.term); + this.menu.blur(); + return; + } + this.menu[direction](event); + }, + + widget: function () { + return this.menu.element; + }, + + _value: function () { + return this.valueMethod.apply(this.element, arguments); + }, + _keyEvent: function (keyEvent, event) { + if (!this.isMultiLine || this.menu.element.is(':visible')) { + this._move(keyEvent, event); -// live region extension, adding a `messages` option -// NOTE: This is an experimental API. We are still investigating -// a full solution for string manipulation and internationalization. -$.widget( "ui.autocomplete", $.ui.autocomplete, { - options: { - messages: { - noResults: "No search results.", - results: function( amount ) { - return amount + ( amount > 1 ? " results are" : " result is" ) + - " available, use up and down arrow keys to navigate."; + // prevents moving cursor to beginning/end of the text field in some browsers + event.preventDefault(); } } - }, + }); - __response: function( content ) { - var message; - this._superApply( arguments ); - if ( this.options.disabled || this.cancelSearch ) { - return; - } - if ( content && content.length ) { - message = this.options.messages.results( content.length ); - } else { - message = this.options.messages.noResults; + $.extend($.ui.autocomplete, { + escapeRegex: function (value) { + return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&'); + }, + filter: function (array, term) { + var matcher = new RegExp($.ui.autocomplete.escapeRegex(term), 'i'); + return $.grep(array, function (value) { + return matcher.test(value.label || value.value || value); + }); } - this.liveRegion.text( message ); - } -}); - -}( jQuery )); -(function( $, undefined ) { - -$.widget( "ui.menu", { - version: "1.10.3", - defaultElement: "<ul>", - delay: 300, - options: { - icons: { - submenu: "ui-icon-carat-1-e" - }, - menus: "ul", - position: { - my: "left top", - at: "right top" - }, - role: "menu", - - // callbacks - blur: null, - focus: null, - select: null - }, - - _create: function() { - this.activeMenu = this.element; - // flag used to prevent firing of the click handler - // as the event bubbles up through nested menus - this.mouseHandled = false; - this.element - .uniqueId() - .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) - .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ) - .attr({ - role: this.options.role, - tabIndex: 0 - }) - // need to catch all clicks on disabled menu - // not possible through _on - .bind( "click" + this.eventNamespace, $.proxy(function( event ) { - if ( this.options.disabled ) { - event.preventDefault(); + }); + + // live region extension, adding a `messages` option + // NOTE: This is an experimental API. We are still investigating + // a full solution for string manipulation and internationalization. + $.widget('ui.autocomplete', $.ui.autocomplete, { + options: { + messages: { + noResults: 'No search results.', + results: function (amount) { + return ( + amount + + (amount > 1 ? ' results are' : ' result is') + + ' available, use up and down arrow keys to navigate.' + ); } - }, this )); + } + }, - if ( this.options.disabled ) { - this.element - .addClass( "ui-state-disabled" ) - .attr( "aria-disabled", "true" ); + __response: function (content) { + var message; + this._superApply(arguments); + if (this.options.disabled || this.cancelSearch) { + return; + } + if (content && content.length) { + message = this.options.messages.results(content.length); + } else { + message = this.options.messages.noResults; + } + this.liveRegion.text(message); } - - this._on({ - // Prevent focus from sticking to links inside menu after clicking - // them (focus should always stay on UL during navigation). - "mousedown .ui-menu-item > a": function( event ) { - event.preventDefault(); + }); +})(jQuery); +(function ($, undefined) { + $.widget('ui.menu', { + version: '1.10.3', + defaultElement: '<ul>', + delay: 300, + options: { + icons: { + submenu: 'ui-icon-carat-1-e' }, - "click .ui-state-disabled > a": function( event ) { - event.preventDefault(); + menus: 'ul', + position: { + my: 'left top', + at: 'right top' }, - "click .ui-menu-item:has(a)": function( event ) { - var target = $( event.target ).closest( ".ui-menu-item" ); - if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) { - this.mouseHandled = true; - - this.select( event ); - // Open submenu on click - if ( target.has( ".ui-menu" ).length ) { - this.expand( event ); - } else if ( !this.element.is( ":focus" ) ) { - // Redirect focus to the menu - this.element.trigger( "focus", [ true ] ); - - // If the active item is on the top level, let it stay active. - // Otherwise, blur the active item since it is no longer visible. - if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { - clearTimeout( this.timer ); + role: 'menu', + + // callbacks + blur: null, + focus: null, + select: null + }, + + _create: function () { + this.activeMenu = this.element; + // flag used to prevent firing of the click handler + // as the event bubbles up through nested menus + this.mouseHandled = false; + this.element + .uniqueId() + .addClass('ui-menu ui-widget ui-widget-content ui-corner-all') + .toggleClass('ui-menu-icons', !!this.element.find('.ui-icon').length) + .attr({ + role: this.options.role, + tabIndex: 0 + }) + // need to catch all clicks on disabled menu + // not possible through _on + .bind( + 'click' + this.eventNamespace, + $.proxy(function (event) { + if (this.options.disabled) { + event.preventDefault(); + } + }, this) + ); + + if (this.options.disabled) { + this.element + .addClass('ui-state-disabled') + .attr('aria-disabled', 'true'); + } + + this._on({ + // Prevent focus from sticking to links inside menu after clicking + // them (focus should always stay on UL during navigation). + 'mousedown .ui-menu-item > a': function (event) { + event.preventDefault(); + }, + 'click .ui-state-disabled > a': function (event) { + event.preventDefault(); + }, + 'click .ui-menu-item:has(a)': function (event) { + var target = $(event.target).closest('.ui-menu-item'); + if (!this.mouseHandled && target.not('.ui-state-disabled').length) { + this.mouseHandled = true; + + this.select(event); + // Open submenu on click + if (target.has('.ui-menu').length) { + this.expand(event); + } else if (!this.element.is(':focus')) { + // Redirect focus to the menu + this.element.trigger('focus', [true]); + + // If the active item is on the top level, let it stay active. + // Otherwise, blur the active item since it is no longer visible. + if (this.active && this.active.parents('.ui-menu').length === 1) { + clearTimeout(this.timer); + } } } - } - }, - "mouseenter .ui-menu-item": function( event ) { - var target = $( event.currentTarget ); - // Remove ui-state-active class from siblings of the newly focused menu item - // to avoid a jump caused by adjacent elements both having a class with a border - target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" ); - this.focus( event, target ); - }, - mouseleave: "collapseAll", - "mouseleave .ui-menu": "collapseAll", - focus: function( event, keepActiveItem ) { - // If there's already an active item, keep it active - // If not, activate the first item - var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 ); - - if ( !keepActiveItem ) { - this.focus( event, item ); - } - }, - blur: function( event ) { - this._delay(function() { - if ( !$.contains( this.element[0], this.document[0].activeElement ) ) { - this.collapseAll( event ); + }, + 'mouseenter .ui-menu-item': function (event) { + var target = $(event.currentTarget); + // Remove ui-state-active class from siblings of the newly focused menu item + // to avoid a jump caused by adjacent elements both having a class with a border + target + .siblings() + .children('.ui-state-active') + .removeClass('ui-state-active'); + this.focus(event, target); + }, + mouseleave: 'collapseAll', + 'mouseleave .ui-menu': 'collapseAll', + focus: function (event, keepActiveItem) { + // If there's already an active item, keep it active + // If not, activate the first item + var item = + this.active || this.element.children('.ui-menu-item').eq(0); + + if (!keepActiveItem) { + this.focus(event, item); } - }); - }, - keydown: "_keydown" - }); + }, + blur: function (event) { + this._delay(function () { + if (!$.contains(this.element[0], this.document[0].activeElement)) { + this.collapseAll(event); + } + }); + }, + keydown: '_keydown' + }); + + this.refresh(); - this.refresh(); + // Clicks outside of a menu collapse any open menus + this._on(this.document, { + click: function (event) { + if (!$(event.target).closest('.ui-menu').length) { + this.collapseAll(event); + } - // Clicks outside of a menu collapse any open menus - this._on( this.document, { - click: function( event ) { - if ( !$( event.target ).closest( ".ui-menu" ).length ) { - this.collapseAll( event ); + // Reset the mouseHandled flag + this.mouseHandled = false; } + }); + }, - // Reset the mouseHandled flag - this.mouseHandled = false; - } - }); - }, - - _destroy: function() { - // Destroy (sub)menus - this.element - .removeAttr( "aria-activedescendant" ) - .find( ".ui-menu" ).addBack() - .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" ) - .removeAttr( "role" ) - .removeAttr( "tabIndex" ) - .removeAttr( "aria-labelledby" ) - .removeAttr( "aria-expanded" ) - .removeAttr( "aria-hidden" ) - .removeAttr( "aria-disabled" ) + _destroy: function () { + // Destroy (sub)menus + this.element + .removeAttr('aria-activedescendant') + .find('.ui-menu') + .addBack() + .removeClass( + 'ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons' + ) + .removeAttr('role') + .removeAttr('tabIndex') + .removeAttr('aria-labelledby') + .removeAttr('aria-expanded') + .removeAttr('aria-hidden') + .removeAttr('aria-disabled') .removeUniqueId() .show(); - // Destroy menu items - this.element.find( ".ui-menu-item" ) - .removeClass( "ui-menu-item" ) - .removeAttr( "role" ) - .removeAttr( "aria-disabled" ) - .children( "a" ) + // Destroy menu items + this.element + .find('.ui-menu-item') + .removeClass('ui-menu-item') + .removeAttr('role') + .removeAttr('aria-disabled') + .children('a') .removeUniqueId() - .removeClass( "ui-corner-all ui-state-hover" ) - .removeAttr( "tabIndex" ) - .removeAttr( "role" ) - .removeAttr( "aria-haspopup" ) - .children().each( function() { - var elem = $( this ); - if ( elem.data( "ui-menu-submenu-carat" ) ) { + .removeClass('ui-corner-all ui-state-hover') + .removeAttr('tabIndex') + .removeAttr('role') + .removeAttr('aria-haspopup') + .children() + .each(function () { + var elem = $(this); + if (elem.data('ui-menu-submenu-carat')) { elem.remove(); } }); - // Destroy menu dividers - this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" ); - }, + // Destroy menu dividers + this.element + .find('.ui-menu-divider') + .removeClass('ui-menu-divider ui-widget-content'); + }, - _keydown: function( event ) { - /*jshint maxcomplexity:20*/ - var match, prev, character, skip, regex, - preventDefault = true; + _keydown: function (event) { + /*jshint maxcomplexity:20*/ + var match, + prev, + character, + skip, + regex, + preventDefault = true; + + function escape(value) { + return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&'); + } - function escape( value ) { - return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); - } + switch (event.keyCode) { + case $.ui.keyCode.PAGE_UP: + this.previousPage(event); + break; + case $.ui.keyCode.PAGE_DOWN: + this.nextPage(event); + break; + case $.ui.keyCode.HOME: + this._move('first', 'first', event); + break; + case $.ui.keyCode.END: + this._move('last', 'last', event); + break; + case $.ui.keyCode.UP: + this.previous(event); + break; + case $.ui.keyCode.DOWN: + this.next(event); + break; + case $.ui.keyCode.LEFT: + this.collapse(event); + break; + case $.ui.keyCode.RIGHT: + if (this.active && !this.active.is('.ui-state-disabled')) { + this.expand(event); + } + break; + case $.ui.keyCode.ENTER: + case $.ui.keyCode.SPACE: + this._activate(event); + break; + case $.ui.keyCode.ESCAPE: + this.collapse(event); + break; + default: + preventDefault = false; + prev = this.previousFilter || ''; + character = String.fromCharCode(event.keyCode); + skip = false; - switch ( event.keyCode ) { - case $.ui.keyCode.PAGE_UP: - this.previousPage( event ); - break; - case $.ui.keyCode.PAGE_DOWN: - this.nextPage( event ); - break; - case $.ui.keyCode.HOME: - this._move( "first", "first", event ); - break; - case $.ui.keyCode.END: - this._move( "last", "last", event ); - break; - case $.ui.keyCode.UP: - this.previous( event ); - break; - case $.ui.keyCode.DOWN: - this.next( event ); - break; - case $.ui.keyCode.LEFT: - this.collapse( event ); - break; - case $.ui.keyCode.RIGHT: - if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { - this.expand( event ); - } - break; - case $.ui.keyCode.ENTER: - case $.ui.keyCode.SPACE: - this._activate( event ); - break; - case $.ui.keyCode.ESCAPE: - this.collapse( event ); - break; - default: - preventDefault = false; - prev = this.previousFilter || ""; - character = String.fromCharCode( event.keyCode ); - skip = false; - - clearTimeout( this.filterTimer ); - - if ( character === prev ) { - skip = true; - } else { - character = prev + character; + clearTimeout(this.filterTimer); + + if (character === prev) { + skip = true; + } else { + character = prev + character; + } + + regex = new RegExp('^' + escape(character), 'i'); + match = this.activeMenu.children('.ui-menu-item').filter(function () { + return regex.test($(this).children('a').text()); + }); + match = + skip && match.index(this.active.next()) !== -1 + ? this.active.nextAll('.ui-menu-item') + : match; + + // If no matches on the current filter, reset to the last character pressed + // to move down the menu to the first item that starts with that character + if (!match.length) { + character = String.fromCharCode(event.keyCode); + regex = new RegExp('^' + escape(character), 'i'); + match = this.activeMenu + .children('.ui-menu-item') + .filter(function () { + return regex.test($(this).children('a').text()); + }); + } + + if (match.length) { + this.focus(event, match); + if (match.length > 1) { + this.previousFilter = character; + this.filterTimer = this._delay(function () { + delete this.previousFilter; + }, 1000); + } else { + delete this.previousFilter; + } + } else { + delete this.previousFilter; + } } - regex = new RegExp( "^" + escape( character ), "i" ); - match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { - return regex.test( $( this ).children( "a" ).text() ); - }); - match = skip && match.index( this.active.next() ) !== -1 ? - this.active.nextAll( ".ui-menu-item" ) : - match; - - // If no matches on the current filter, reset to the last character pressed - // to move down the menu to the first item that starts with that character - if ( !match.length ) { - character = String.fromCharCode( event.keyCode ); - regex = new RegExp( "^" + escape( character ), "i" ); - match = this.activeMenu.children( ".ui-menu-item" ).filter(function() { - return regex.test( $( this ).children( "a" ).text() ); - }); + if (preventDefault) { + event.preventDefault(); } + }, - if ( match.length ) { - this.focus( event, match ); - if ( match.length > 1 ) { - this.previousFilter = character; - this.filterTimer = this._delay(function() { - delete this.previousFilter; - }, 1000 ); + _activate: function (event) { + if (!this.active.is('.ui-state-disabled')) { + if (this.active.children("a[aria-haspopup='true']").length) { + this.expand(event); } else { - delete this.previousFilter; + this.select(event); } - } else { - delete this.previousFilter; } - } + }, - if ( preventDefault ) { - event.preventDefault(); - } - }, + refresh: function () { + var menus, + icon = this.options.icons.submenu, + submenus = this.element.find(this.options.menus); - _activate: function( event ) { - if ( !this.active.is( ".ui-state-disabled" ) ) { - if ( this.active.children( "a[aria-haspopup='true']" ).length ) { - this.expand( event ); - } else { - this.select( event ); - } - } - }, - - refresh: function() { - var menus, - icon = this.options.icons.submenu, - submenus = this.element.find( this.options.menus ); - - // Initialize nested menus - submenus.filter( ":not(.ui-menu)" ) - .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) - .hide() - .attr({ - role: this.options.role, - "aria-hidden": "true", - "aria-expanded": "false" - }) - .each(function() { - var menu = $( this ), - item = menu.prev( "a" ), - submenuCarat = $( "<span>" ) - .addClass( "ui-menu-icon ui-icon " + icon ) - .data( "ui-menu-submenu-carat", true ); - - item - .attr( "aria-haspopup", "true" ) - .prepend( submenuCarat ); - menu.attr( "aria-labelledby", item.attr( "id" ) ); - }); + // Initialize nested menus + submenus + .filter(':not(.ui-menu)') + .addClass('ui-menu ui-widget ui-widget-content ui-corner-all') + .hide() + .attr({ + role: this.options.role, + 'aria-hidden': 'true', + 'aria-expanded': 'false' + }) + .each(function () { + var menu = $(this), + item = menu.prev('a'), + submenuCarat = $('<span>') + .addClass('ui-menu-icon ui-icon ' + icon) + .data('ui-menu-submenu-carat', true); + + item.attr('aria-haspopup', 'true').prepend(submenuCarat); + menu.attr('aria-labelledby', item.attr('id')); + }); - menus = submenus.add( this.element ); + menus = submenus.add(this.element); - // Don't refresh list items that are already adapted - menus.children( ":not(.ui-menu-item):has(a)" ) - .addClass( "ui-menu-item" ) - .attr( "role", "presentation" ) - .children( "a" ) + // Don't refresh list items that are already adapted + menus + .children(':not(.ui-menu-item):has(a)') + .addClass('ui-menu-item') + .attr('role', 'presentation') + .children('a') .uniqueId() - .addClass( "ui-corner-all" ) + .addClass('ui-corner-all') .attr({ tabIndex: -1, role: this._itemRole() }); - // Initialize unlinked menu-items containing spaces and/or dashes only as dividers - menus.children( ":not(.ui-menu-item)" ).each(function() { - var item = $( this ); - // hyphen, em dash, en dash - if ( !/[^\-\u2014\u2013\s]/.test( item.text() ) ) { - item.addClass( "ui-widget-content ui-menu-divider" ); - } - }); + // Initialize unlinked menu-items containing spaces and/or dashes only as dividers + menus.children(':not(.ui-menu-item)').each(function () { + var item = $(this); + // hyphen, em dash, en dash + if (!/[^\-\u2014\u2013\s]/.test(item.text())) { + item.addClass('ui-widget-content ui-menu-divider'); + } + }); - // Add aria-disabled attribute to any disabled menu item - menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); + // Add aria-disabled attribute to any disabled menu item + menus.children('.ui-state-disabled').attr('aria-disabled', 'true'); - // If the active item has been removed, blur the menu - if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { - this.blur(); - } - }, + // If the active item has been removed, blur the menu + if (this.active && !$.contains(this.element[0], this.active[0])) { + this.blur(); + } + }, - _itemRole: function() { - return { - menu: "menuitem", - listbox: "option" - }[ this.options.role ]; - }, - - _setOption: function( key, value ) { - if ( key === "icons" ) { - this.element.find( ".ui-menu-icon" ) - .removeClass( this.options.icons.submenu ) - .addClass( value.submenu ); - } - this._super( key, value ); - }, + _itemRole: function () { + return { + menu: 'menuitem', + listbox: 'option' + }[this.options.role]; + }, - focus: function( event, item ) { - var nested, focused; - this.blur( event, event && event.type === "focus" ); + _setOption: function (key, value) { + if (key === 'icons') { + this.element + .find('.ui-menu-icon') + .removeClass(this.options.icons.submenu) + .addClass(value.submenu); + } + this._super(key, value); + }, - this._scrollIntoView( item ); + focus: function (event, item) { + var nested, focused; + this.blur(event, event && event.type === 'focus'); - this.active = item.first(); - focused = this.active.children( "a" ).addClass( "ui-state-focus" ); - // Only update aria-activedescendant if there's a role - // otherwise we assume focus is managed elsewhere - if ( this.options.role ) { - this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); - } + this._scrollIntoView(item); + + this.active = item.first(); + focused = this.active.children('a').addClass('ui-state-focus'); + // Only update aria-activedescendant if there's a role + // otherwise we assume focus is managed elsewhere + if (this.options.role) { + this.element.attr('aria-activedescendant', focused.attr('id')); + } - // Highlight active parent menu item, if any - this.active - .parent() - .closest( ".ui-menu-item" ) - .children( "a:first" ) - .addClass( "ui-state-active" ); + // Highlight active parent menu item, if any + this.active + .parent() + .closest('.ui-menu-item') + .children('a:first') + .addClass('ui-state-active'); - if ( event && event.type === "keydown" ) { - this._close(); - } else { - this.timer = this._delay(function() { + if (event && event.type === 'keydown') { this._close(); - }, this.delay ); - } + } else { + this.timer = this._delay(function () { + this._close(); + }, this.delay); + } - nested = item.children( ".ui-menu" ); - if ( nested.length && ( /^mouse/.test( event.type ) ) ) { - this._startOpening(nested); - } - this.activeMenu = item.parent(); - - this._trigger( "focus", event, { item: item } ); - }, - - _scrollIntoView: function( item ) { - var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; - if ( this._hasScroll() ) { - borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0; - paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0; - offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; - scroll = this.activeMenu.scrollTop(); - elementHeight = this.activeMenu.height(); - itemHeight = item.height(); - - if ( offset < 0 ) { - this.activeMenu.scrollTop( scroll + offset ); - } else if ( offset + itemHeight > elementHeight ) { - this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); + nested = item.children('.ui-menu'); + if (nested.length && /^mouse/.test(event.type)) { + this._startOpening(nested); } - } - }, + this.activeMenu = item.parent(); - blur: function( event, fromFocus ) { - if ( !fromFocus ) { - clearTimeout( this.timer ); - } + this._trigger('focus', event, { item: item }); + }, - if ( !this.active ) { - return; - } + _scrollIntoView: function (item) { + var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; + if (this._hasScroll()) { + borderTop = + parseFloat($.css(this.activeMenu[0], 'borderTopWidth')) || 0; + paddingTop = parseFloat($.css(this.activeMenu[0], 'paddingTop')) || 0; + offset = + item.offset().top - + this.activeMenu.offset().top - + borderTop - + paddingTop; + scroll = this.activeMenu.scrollTop(); + elementHeight = this.activeMenu.height(); + itemHeight = item.height(); + + if (offset < 0) { + this.activeMenu.scrollTop(scroll + offset); + } else if (offset + itemHeight > elementHeight) { + this.activeMenu.scrollTop( + scroll + offset - elementHeight + itemHeight + ); + } + } + }, + + blur: function (event, fromFocus) { + if (!fromFocus) { + clearTimeout(this.timer); + } - this.active.children( "a" ).removeClass( "ui-state-focus" ); - this.active = null; + if (!this.active) { + return; + } - this._trigger( "blur", event, { item: this.active } ); - }, + this.active.children('a').removeClass('ui-state-focus'); + this.active = null; - _startOpening: function( submenu ) { - clearTimeout( this.timer ); + this._trigger('blur', event, { item: this.active }); + }, - // Don't open if already open fixes a Firefox bug that caused a .5 pixel - // shift in the submenu position when mousing over the carat icon - if ( submenu.attr( "aria-hidden" ) !== "true" ) { - return; - } + _startOpening: function (submenu) { + clearTimeout(this.timer); - this.timer = this._delay(function() { - this._close(); - this._open( submenu ); - }, this.delay ); - }, - - _open: function( submenu ) { - var position = $.extend({ - of: this.active - }, this.options.position ); - - clearTimeout( this.timer ); - this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) - .hide() - .attr( "aria-hidden", "true" ); - - submenu - .show() - .removeAttr( "aria-hidden" ) - .attr( "aria-expanded", "true" ) - .position( position ); - }, - - collapseAll: function( event, all ) { - clearTimeout( this.timer ); - this.timer = this._delay(function() { - // If we were passed an event, look for the submenu that contains the event - var currentMenu = all ? this.element : - $( event && event.target ).closest( this.element.find( ".ui-menu" ) ); - - // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway - if ( !currentMenu.length ) { - currentMenu = this.element; - } - - this._close( currentMenu ); - - this.blur( event ); - this.activeMenu = currentMenu; - }, this.delay ); - }, - - // With no arguments, closes the currently active menu - if nothing is active - // it closes all menus. If passed an argument, it will search for menus BELOW - _close: function( startMenu ) { - if ( !startMenu ) { - startMenu = this.active ? this.active.parent() : this.element; - } + // Don't open if already open fixes a Firefox bug that caused a .5 pixel + // shift in the submenu position when mousing over the carat icon + if (submenu.attr('aria-hidden') !== 'true') { + return; + } - startMenu - .find( ".ui-menu" ) + this.timer = this._delay(function () { + this._close(); + this._open(submenu); + }, this.delay); + }, + + _open: function (submenu) { + var position = $.extend( + { + of: this.active + }, + this.options.position + ); + + clearTimeout(this.timer); + this.element + .find('.ui-menu') + .not(submenu.parents('.ui-menu')) .hide() - .attr( "aria-hidden", "true" ) - .attr( "aria-expanded", "false" ) - .end() - .find( "a.ui-state-active" ) - .removeClass( "ui-state-active" ); - }, - - collapse: function( event ) { - var newItem = this.active && - this.active.parent().closest( ".ui-menu-item", this.element ); - if ( newItem && newItem.length ) { - this._close(); - this.focus( event, newItem ); - } - }, + .attr('aria-hidden', 'true'); - expand: function( event ) { - var newItem = this.active && - this.active - .children( ".ui-menu " ) - .children( ".ui-menu-item" ) - .first(); + submenu + .show() + .removeAttr('aria-hidden') + .attr('aria-expanded', 'true') + .position(position); + }, - if ( newItem && newItem.length ) { - this._open( newItem.parent() ); + collapseAll: function (event, all) { + clearTimeout(this.timer); + this.timer = this._delay(function () { + // If we were passed an event, look for the submenu that contains the event + var currentMenu = all + ? this.element + : $(event && event.target).closest(this.element.find('.ui-menu')); + + // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway + if (!currentMenu.length) { + currentMenu = this.element; + } - // Delay so Firefox will not hide activedescendant change in expanding submenu from AT - this._delay(function() { - this.focus( event, newItem ); - }); - } - }, - - next: function( event ) { - this._move( "next", "first", event ); - }, - - previous: function( event ) { - this._move( "prev", "last", event ); - }, - - isFirstItem: function() { - return this.active && !this.active.prevAll( ".ui-menu-item" ).length; - }, - - isLastItem: function() { - return this.active && !this.active.nextAll( ".ui-menu-item" ).length; - }, - - _move: function( direction, filter, event ) { - var next; - if ( this.active ) { - if ( direction === "first" || direction === "last" ) { - next = this.active - [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) - .eq( -1 ); - } else { - next = this.active - [ direction + "All" ]( ".ui-menu-item" ) - .eq( 0 ); + this._close(currentMenu); + + this.blur(event); + this.activeMenu = currentMenu; + }, this.delay); + }, + + // With no arguments, closes the currently active menu - if nothing is active + // it closes all menus. If passed an argument, it will search for menus BELOW + _close: function (startMenu) { + if (!startMenu) { + startMenu = this.active ? this.active.parent() : this.element; } - } - if ( !next || !next.length || !this.active ) { - next = this.activeMenu.children( ".ui-menu-item" )[ filter ](); - } - this.focus( event, next ); - }, + startMenu + .find('.ui-menu') + .hide() + .attr('aria-hidden', 'true') + .attr('aria-expanded', 'false') + .end() + .find('a.ui-state-active') + .removeClass('ui-state-active'); + }, - nextPage: function( event ) { - var item, base, height; + collapse: function (event) { + var newItem = + this.active && + this.active.parent().closest('.ui-menu-item', this.element); + if (newItem && newItem.length) { + this._close(); + this.focus(event, newItem); + } + }, - if ( !this.active ) { - this.next( event ); - return; - } - if ( this.isLastItem() ) { - return; - } - if ( this._hasScroll() ) { - base = this.active.offset().top; - height = this.element.height(); - this.active.nextAll( ".ui-menu-item" ).each(function() { - item = $( this ); - return item.offset().top - base - height < 0; - }); + expand: function (event) { + var newItem = + this.active && + this.active.children('.ui-menu ').children('.ui-menu-item').first(); - this.focus( event, item ); - } else { - this.focus( event, this.activeMenu.children( ".ui-menu-item" ) - [ !this.active ? "first" : "last" ]() ); - } - }, + if (newItem && newItem.length) { + this._open(newItem.parent()); - previousPage: function( event ) { - var item, base, height; - if ( !this.active ) { - this.next( event ); - return; - } - if ( this.isFirstItem() ) { - return; - } - if ( this._hasScroll() ) { - base = this.active.offset().top; - height = this.element.height(); - this.active.prevAll( ".ui-menu-item" ).each(function() { - item = $( this ); - return item.offset().top - base + height > 0; - }); + // Delay so Firefox will not hide activedescendant change in expanding submenu from AT + this._delay(function () { + this.focus(event, newItem); + }); + } + }, - this.focus( event, item ); - } else { - this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() ); - } - }, - - _hasScroll: function() { - return this.element.outerHeight() < this.element.prop( "scrollHeight" ); - }, - - select: function( event ) { - // TODO: It should never be possible to not have an active item at this - // point, but the tests don't trigger mouseenter before click. - this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); - var ui = { item: this.active }; - if ( !this.active.has( ".ui-menu" ).length ) { - this.collapseAll( event, true ); - } - this._trigger( "select", event, ui ); - } -}); + next: function (event) { + this._move('next', 'first', event); + }, + + previous: function (event) { + this._move('prev', 'last', event); + }, + + isFirstItem: function () { + return this.active && !this.active.prevAll('.ui-menu-item').length; + }, + + isLastItem: function () { + return this.active && !this.active.nextAll('.ui-menu-item').length; + }, + + _move: function (direction, filter, event) { + var next; + if (this.active) { + if (direction === 'first' || direction === 'last') { + next = + this.active[direction === 'first' ? 'prevAll' : 'nextAll']( + '.ui-menu-item' + ).eq(-1); + } else { + next = this.active[direction + 'All']('.ui-menu-item').eq(0); + } + } + if (!next || !next.length || !this.active) { + next = this.activeMenu.children('.ui-menu-item')[filter](); + } + + this.focus(event, next); + }, + + nextPage: function (event) { + var item, base, height; + + if (!this.active) { + this.next(event); + return; + } + if (this.isLastItem()) { + return; + } + if (this._hasScroll()) { + base = this.active.offset().top; + height = this.element.height(); + this.active.nextAll('.ui-menu-item').each(function () { + item = $(this); + return item.offset().top - base - height < 0; + }); + + this.focus(event, item); + } else { + this.focus( + event, + this.activeMenu + .children('.ui-menu-item') + [!this.active ? 'first' : 'last']() + ); + } + }, -}( jQuery )); + previousPage: function (event) { + var item, base, height; + if (!this.active) { + this.next(event); + return; + } + if (this.isFirstItem()) { + return; + } + if (this._hasScroll()) { + base = this.active.offset().top; + height = this.element.height(); + this.active.prevAll('.ui-menu-item').each(function () { + item = $(this); + return item.offset().top - base + height > 0; + }); + + this.focus(event, item); + } else { + this.focus(event, this.activeMenu.children('.ui-menu-item').first()); + } + }, + + _hasScroll: function () { + return this.element.outerHeight() < this.element.prop('scrollHeight'); + }, + + select: function (event) { + // TODO: It should never be possible to not have an active item at this + // point, but the tests don't trigger mouseenter before click. + this.active = this.active || $(event.target).closest('.ui-menu-item'); + var ui = { item: this.active }; + if (!this.active.has('.ui-menu').length) { + this.collapseAll(event, true); + } + this._trigger('select', event, ui); + } + }); +})(jQuery); diff --git a/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.less b/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.less index 1cebc60e..68b6c84c 100644 --- a/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.less +++ b/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.less @@ -30,7 +30,7 @@ } .ui-helper-clearfix:before, .ui-helper-clearfix:after { - content: ""; + content: ''; display: table; border-collapse: collapse; } @@ -47,21 +47,19 @@ left: 0; position: absolute; opacity: 0; - filter:Alpha(Opacity=0); + filter: Alpha(Opacity=0); } .ui-front { z-index: 100; } - /* Interaction Cues ----------------------------------*/ .ui-state-disabled { cursor: default !important; } - /* Icons ----------------------------------*/ @@ -73,7 +71,6 @@ background-repeat: no-repeat; } - /* Misc visuals ----------------------------------*/ @@ -119,7 +116,7 @@ .ui-menu .ui-menu-item a { text-decoration: none; display: block; - padding: 2px .4em; + padding: 2px 0.4em; line-height: 1.5; min-height: 0; /* support: IE7 */ font-weight: normal; @@ -132,7 +129,7 @@ .ui-menu .ui-state-disabled { font-weight: normal; - margin: .4em 0 .2em; + margin: 0.4em 0 0.2em; line-height: 1.5; } .ui-menu .ui-state-disabled a { @@ -151,8 +148,8 @@ /* left-aligned */ .ui-menu .ui-icon { position: absolute; - top: .2em; - left: .2em; + top: 0.2em; + left: 0.2em; } /* right-aligned */ diff --git a/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.min.css b/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.min.css index 2b6657c1..57fe0137 100644 --- a/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.min.css +++ b/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.min.css @@ -3,4 +3,133 @@ * Includes: jquery.ui.core.css, jquery.ui.autocomplete.css, jquery.ui.menu.css * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ -.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right} \ No newline at end of file +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ''; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter: Alpha(Opacity=0); +} +.ui-front { + z-index: 100; +} +.ui-state-disabled { + cursor: default !important; +} +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-menu { + list-style: none; + padding: 2px; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + margin-top: -3px; + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + padding: 0; + width: 100%; + list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +.ui-menu .ui-menu-divider { + margin: 5px -2px 5px -2px; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-menu-item a { + text-decoration: none; + display: block; + padding: 2px 0.4em; + line-height: 1.5; + min-height: 0; + font-weight: normal; +} +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} +.ui-menu .ui-state-disabled { + font-weight: normal; + margin: 0.4em 0 0.2em; + line-height: 1.5; +} +.ui-menu .ui-state-disabled a { + cursor: default; +} +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item a { + position: relative; + padding-left: 2em; +} +.ui-menu .ui-icon { + position: absolute; + top: 0.2em; + left: 0.2em; +} +.ui-menu .ui-menu-icon { + position: static; + float: right; +} diff --git a/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.min.js b/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.min.js index 0f03e832..2c43dadd 100644 --- a/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.min.js +++ b/docs/src/css/less/jquery-ui/autocomplete/jquery-ui-1.10.3.custom.min.js @@ -1,6 +1,1766 @@ /*! jQuery UI - v1.10.3 - 2013-11-24 -* http://jqueryui.com -* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.menu.js -* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ + * http://jqueryui.com + * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.position.js, jquery.ui.autocomplete.js, jquery.ui.menu.js + * Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ -(function(e,t){function i(t,i){var s,n,r,o=t.nodeName.toLowerCase();return"area"===o?(s=t.parentNode,n=s.name,t.href&&n&&"map"===s.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&a(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&a(t)}function a(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,a){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),a&&a.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var a,s,n=e(this[0]);n.length&&n[0]!==document;){if(a=n.css("position"),("absolute"===a||"relative"===a||"fixed"===a)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,a){return!!e.data(t,a[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var a=e.attr(t,"tabindex"),s=isNaN(a);return(s||a>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,a){function s(t,i,a,s){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,a&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===a?["Left","Right"]:["Top","Bottom"],r=a.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+a]=function(i){return i===t?o["inner"+a].call(this):this.each(function(){e(this).css(r,s(this,i)+"px")})},e.fn["outer"+a]=function(t,i){return"number"!=typeof t?o["outer"+a].call(this,t):this.each(function(){e(this).css(r,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,a){var s,n=e.ui[t].prototype;for(s in a)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([i,a[s]])},call:function(e,t,i){var a,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(a=0;s.length>a;a++)e.options[s[a][0]]&&s[a][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var a=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[a]>0?!0:(t[a]=1,s=t[a]>0,t[a]=0,s)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,a=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(n){}a(t)},e.widget=function(i,s,a){var n,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],n=u+"-"+i,a||(a=s,s=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:a.version,_proto:e.extend({},a),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(a,function(i,a){return e.isFunction(a)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,n=this._superApply;return this._super=e,this._superApply=t,i=a.apply(this,arguments),this._super=s,this._superApply=n,i}}(),t):(l[i]=a,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:n}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var a,n,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(a in r[o])n=r[o][a],r[o].hasOwnProperty(a)&&n!==t&&(i[a]=e.isPlainObject(n)?e.isPlainObject(i[a])?e.widget.extend({},i[a],n):e.widget.extend({},n):n);return i},e.widget.bridge=function(i,a){var n=a.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,a=e.data(this,n);return a?e.isFunction(a[r])&&"_"!==r.charAt(0)?(s=a[r].apply(a,h),s!==a&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,n);t?t.option(r||{})._init():e.data(this,n,new a(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var a,n,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},a=i.split("."),i=a.shift(),a.length){for(n=o[i]=e.widget.extend({},this.options[i]),r=0;a.length-1>r;r++)n[a[r]]=n[a[r]]||{},n=n[a[r]];if(i=a.pop(),s===t)return n[i]===t?null:n[i];n[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,a){var n,r=this;"boolean"!=typeof i&&(a=s,s=i,i=!1),a?(s=n=e(s),this.bindings=this.bindings.add(s)):(a=s,s=this.element,n=this.widget()),e.each(a,function(a,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=a.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?n.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var a,n,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],n=i.originalEvent)for(a in n)a in i||(i[a]=n[a]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,a,n){"string"==typeof a&&(a={effect:a});var r,o=a?a===!0||"number"==typeof a?i:a.effect||i:t;a=a||{},"number"==typeof a&&(a={duration:a}),r=!e.isEmptyObject(a),a.complete=n,a.delay&&s.delay(a.delay),r&&e.effects&&e.effects.effect[o]?s[t](a):o!==t&&s[o]?s[o](a.duration,a.easing,n):s.queue(function(i){e(this)[t](),n&&n.call(s[0]),i()})}})})(jQuery);(function(e,t){function i(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function s(t,i){return parseInt(e.css(t,i),10)||0}function a(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,r=Math.max,o=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(n!==t)return n;var i,s,a=e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=a.children()[0];return e("body").append(a),i=r.offsetWidth,a.css("overflow","scroll"),s=r.offsetWidth,i===s&&(s=a[0].clientWidth),a.remove(),n=i-s},getScrollInfo:function(t){var i=t.isWindow?"":t.element.css("overflow-x"),s=t.isWindow?"":t.element.css("overflow-y"),a="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,n="scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight;return{width:n?e.position.scrollbarWidth():0,height:a?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return f.apply(this,arguments);t=e.extend({},t);var n,p,m,g,v,y,b=e(t.of),_=e.position.getWithinInfo(t.within),x=e.position.getScrollInfo(_),k=(t.collision||"flip").split(" "),w={};return y=a(b),b[0].preventDefault&&(t.at="left top"),p=y.width,m=y.height,g=y.offset,v=e.extend({},g),e.each(["my","at"],function(){var e,i,s=(t[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):u.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=u.test(s[1])?s[1]:"center",e=c.exec(s[0]),i=c.exec(s[1]),w[this]=[e?e[0]:0,i?i[0]:0],t[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===t.at[0]?v.left+=p:"center"===t.at[0]&&(v.left+=p/2),"bottom"===t.at[1]?v.top+=m:"center"===t.at[1]&&(v.top+=m/2),n=i(w.at,p,m),v.left+=n[0],v.top+=n[1],this.each(function(){var a,l,u=e(this),c=u.outerWidth(),d=u.outerHeight(),f=s(this,"marginLeft"),y=s(this,"marginTop"),D=c+f+s(this,"marginRight")+x.width,T=d+y+s(this,"marginBottom")+x.height,M=e.extend({},v),S=i(w.my,u.outerWidth(),u.outerHeight());"right"===t.my[0]?M.left-=c:"center"===t.my[0]&&(M.left-=c/2),"bottom"===t.my[1]?M.top-=d:"center"===t.my[1]&&(M.top-=d/2),M.left+=S[0],M.top+=S[1],e.support.offsetFractions||(M.left=h(M.left),M.top=h(M.top)),a={marginLeft:f,marginTop:y},e.each(["left","top"],function(i,s){e.ui.position[k[i]]&&e.ui.position[k[i]][s](M,{targetWidth:p,targetHeight:m,elemWidth:c,elemHeight:d,collisionPosition:a,collisionWidth:D,collisionHeight:T,offset:[n[0]+S[0],n[1]+S[1]],my:t.my,at:t.at,within:_,elem:u})}),t.using&&(l=function(e){var i=g.left-M.left,s=i+p-c,a=g.top-M.top,n=a+m-d,h={target:{element:b,left:g.left,top:g.top,width:p,height:m},element:{element:u,left:M.left,top:M.top,width:c,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>n?"top":a>0?"bottom":"middle"};c>p&&p>o(i+s)&&(h.horizontal="center"),d>m&&m>o(a+n)&&(h.vertical="middle"),h.important=r(o(i),o(s))>r(o(a),o(n))?"horizontal":"vertical",t.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,a=s.isWindow?s.scrollLeft:s.offset.left,n=s.width,o=e.left-t.collisionPosition.marginLeft,h=a-o,l=o+t.collisionWidth-n-a;t.collisionWidth>n?h>0&&0>=l?(i=e.left+h+t.collisionWidth-n-a,e.left+=h-i):e.left=l>0&&0>=h?a:h>l?a+n-t.collisionWidth:a:h>0?e.left+=h:l>0?e.left-=l:e.left=r(e.left-o,e.left)},top:function(e,t){var i,s=t.within,a=s.isWindow?s.scrollTop:s.offset.top,n=t.within.height,o=e.top-t.collisionPosition.marginTop,h=a-o,l=o+t.collisionHeight-n-a;t.collisionHeight>n?h>0&&0>=l?(i=e.top+h+t.collisionHeight-n-a,e.top+=h-i):e.top=l>0&&0>=h?a:h>l?a+n-t.collisionHeight:a:h>0?e.top+=h:l>0?e.top-=l:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var i,s,a=t.within,n=a.offset.left+a.scrollLeft,r=a.width,h=a.isWindow?a.scrollLeft:a.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,c=l+t.collisionWidth-r-h,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+d+p+f+t.collisionWidth-r-n,(0>i||o(u)>i)&&(e.left+=d+p+f)):c>0&&(s=e.left-t.collisionPosition.marginLeft+d+p+f-h,(s>0||c>o(s))&&(e.left+=d+p+f))},top:function(e,t){var i,s,a=t.within,n=a.offset.top+a.scrollTop,r=a.height,h=a.isWindow?a.scrollTop:a.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,c=l+t.collisionHeight-r-h,d="top"===t.my[1],p=d?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-r-n,e.top+p+f+m>u&&(0>s||o(u)>s)&&(e.top+=p+f+m)):c>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,e.top+p+f+m>c&&(i>0||c>o(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,a,n,r=document.getElementsByTagName("body")[0],o=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(n in s)t.style[n]=s[n];t.appendChild(o),i=r||document.documentElement,i.insertBefore(t,i.firstChild),o.style.cssText="position: absolute; left: 10.7432222px;",a=e(o).offset().left,e.support.offsetFractions=a>10&&11>a,t.innerHTML="",i.removeChild(t)}()})(jQuery);(function(e){var t=0;e.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var t,i,a,s=this.element[0].nodeName.toLowerCase(),n="textarea"===s,r="input"===s;this.isMultiLine=n?!0:r?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[n||r?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return t=!0,a=!0,i=!0,undefined;t=!1,a=!1,i=!1;var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:t=!0,this._move("previousPage",s);break;case n.PAGE_DOWN:t=!0,this._move("nextPage",s);break;case n.UP:t=!0,this._keyEvent("previous",s);break;case n.DOWN:t=!0,this._keyEvent("next",s);break;case n.ENTER:case n.NUMPAD_ENTER:this.menu.active&&(t=!0,s.preventDefault(),this.menu.select(s));break;case n.TAB:this.menu.active&&this.menu.select(s);break;case n.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(a){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&a.preventDefault(),undefined;if(!i){var s=e.ui.keyCode;switch(a.keyCode){case s.PAGE_UP:this._move("previousPage",a);break;case s.PAGE_DOWN:this._move("nextPage",a);break;case s.UP:this._keyEvent("previous",a);break;case s.DOWN:this._keyEvent("next",a)}}},input:function(e){return a?(a=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(a){a.target===t.element[0]||a.target===i||e.contains(i,a.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),undefined;var a=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:a})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(a.value):this.liveRegion.text(a.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),a=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=a,this._delay(function(){this.previous=a,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,a=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,a){a(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,s){a.xhr&&a.xhr.abort(),a.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){s(e)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):undefined},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var e=this,i=++t;return function(a){i===t&&e.__response(a),e.pending--,e.pending||e.element.removeClass("ui-autocomplete-loading")}},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var a=this;e.each(i,function(e,i){a._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[e](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var a=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return a.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})})(jQuery);(function(e){e.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(e){e.preventDefault()},"click .ui-state-disabled > a":function(e){e.preventDefault()},"click .ui-menu-item:has(a)":function(t){var i=e(t.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(t),i.has(".ui-menu").length?this.expand(t):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=e(t.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(".ui-menu").length||this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,a,n,r,o,h=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:h=!1,a=this.previousFilter||"",n=String.fromCharCode(t.keyCode),r=!1,clearTimeout(this.filterTimer),n===a?r=!0:n=a+n,o=RegExp("^"+i(n),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())}),s=r&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(n=String.fromCharCode(t.keyCode),o=RegExp("^"+i(n),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return o.test(e(this).children("a").text())})),s.length?(this.focus(t,s),s.length>1?(this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var t,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),s=t.prev("a"),a=e("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(a),t.attr("aria-labelledby",s.attr("id"))}),t=s.add(this.element),t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),t.children(":not(.ui-menu-item)").each(function(){var t=e(this);/[^\-\u2014\u2013\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")}),t.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,a,n,r,o;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,a=t.offset().top-this.activeMenu.offset().top-i-s,n=this.activeMenu.scrollTop(),r=this.activeMenu.height(),o=t.height(),0>a?this.activeMenu.scrollTop(n+a):a+o>r&&this.activeMenu.scrollTop(n+a-r+o))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[t]()),this.focus(i,s)},nextPage:function(t){var i,s,a;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,a=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-a}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(t),undefined)},previousPage:function(t){var i,s,a;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,a=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+a>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(t),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)}})})(jQuery); \ No newline at end of file +(function (e, t) { + function i(t, i) { + var s, + n, + r, + o = t.nodeName.toLowerCase(); + return 'area' === o + ? ((s = t.parentNode), + (n = s.name), + t.href && n && 'map' === s.nodeName.toLowerCase() + ? ((r = e('img[usemap=#' + n + ']')[0]), !!r && a(r)) + : !1) + : (/input|select|textarea|button|object/.test(o) + ? !t.disabled + : 'a' === o + ? t.href || i + : i) && a(t); + } + function a(t) { + return ( + e.expr.filters.visible(t) && + !e(t) + .parents() + .addBack() + .filter(function () { + return 'hidden' === e.css(this, 'visibility'); + }).length + ); + } + var s = 0, + n = /^ui-id-\d+$/; + (e.ui = e.ui || {}), + e.extend(e.ui, { + version: '1.10.3', + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + } + }), + e.fn.extend({ + focus: (function (t) { + return function (i, a) { + return 'number' == typeof i + ? this.each(function () { + var t = this; + setTimeout(function () { + e(t).focus(), a && a.call(t); + }, i); + }) + : t.apply(this, arguments); + }; + })(e.fn.focus), + scrollParent: function () { + var t; + return ( + (t = + (e.ui.ie && /(static|relative)/.test(this.css('position'))) || + /absolute/.test(this.css('position')) + ? this.parents() + .filter(function () { + return ( + /(relative|absolute|fixed)/.test( + e.css(this, 'position') + ) && + /(auto|scroll)/.test( + e.css(this, 'overflow') + + e.css(this, 'overflow-y') + + e.css(this, 'overflow-x') + ) + ); + }) + .eq(0) + : this.parents() + .filter(function () { + return /(auto|scroll)/.test( + e.css(this, 'overflow') + + e.css(this, 'overflow-y') + + e.css(this, 'overflow-x') + ); + }) + .eq(0)), + /fixed/.test(this.css('position')) || !t.length ? e(document) : t + ); + }, + zIndex: function (i) { + if (i !== t) return this.css('zIndex', i); + if (this.length) + for (var a, s, n = e(this[0]); n.length && n[0] !== document; ) { + if ( + ((a = n.css('position')), + ('absolute' === a || 'relative' === a || 'fixed' === a) && + ((s = parseInt(n.css('zIndex'), 10)), !isNaN(s) && 0 !== s)) + ) + return s; + n = n.parent(); + } + return 0; + }, + uniqueId: function () { + return this.each(function () { + this.id || (this.id = 'ui-id-' + ++s); + }); + }, + removeUniqueId: function () { + return this.each(function () { + n.test(this.id) && e(this).removeAttr('id'); + }); + } + }), + e.extend(e.expr[':'], { + data: e.expr.createPseudo + ? e.expr.createPseudo(function (t) { + return function (i) { + return !!e.data(i, t); + }; + }) + : function (t, i, a) { + return !!e.data(t, a[3]); + }, + focusable: function (t) { + return i(t, !isNaN(e.attr(t, 'tabindex'))); + }, + tabbable: function (t) { + var a = e.attr(t, 'tabindex'), + s = isNaN(a); + return (s || a >= 0) && i(t, !s); + } + }), + e('<a>').outerWidth(1).jquery || + e.each(['Width', 'Height'], function (i, a) { + function s(t, i, a, s) { + return ( + e.each(n, function () { + (i -= parseFloat(e.css(t, 'padding' + this)) || 0), + a && + (i -= parseFloat(e.css(t, 'border' + this + 'Width')) || 0), + s && (i -= parseFloat(e.css(t, 'margin' + this)) || 0); + }), + i + ); + } + var n = 'Width' === a ? ['Left', 'Right'] : ['Top', 'Bottom'], + r = a.toLowerCase(), + o = { + innerWidth: e.fn.innerWidth, + innerHeight: e.fn.innerHeight, + outerWidth: e.fn.outerWidth, + outerHeight: e.fn.outerHeight + }; + (e.fn['inner' + a] = function (i) { + return i === t + ? o['inner' + a].call(this) + : this.each(function () { + e(this).css(r, s(this, i) + 'px'); + }); + }), + (e.fn['outer' + a] = function (t, i) { + return 'number' != typeof t + ? o['outer' + a].call(this, t) + : this.each(function () { + e(this).css(r, s(this, t, !0, i) + 'px'); + }); + }); + }), + e.fn.addBack || + (e.fn.addBack = function (e) { + return this.add( + null == e ? this.prevObject : this.prevObject.filter(e) + ); + }), + e('<a>').data('a-b', 'a').removeData('a-b').data('a-b') && + (e.fn.removeData = (function (t) { + return function (i) { + return arguments.length ? t.call(this, e.camelCase(i)) : t.call(this); + }; + })(e.fn.removeData)), + (e.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())), + (e.support.selectstart = 'onselectstart' in document.createElement('div')), + e.fn.extend({ + disableSelection: function () { + return this.bind( + (e.support.selectstart ? 'selectstart' : 'mousedown') + + '.ui-disableSelection', + function (e) { + e.preventDefault(); + } + ); + }, + enableSelection: function () { + return this.unbind('.ui-disableSelection'); + } + }), + e.extend(e.ui, { + plugin: { + add: function (t, i, a) { + var s, + n = e.ui[t].prototype; + for (s in a) + (n.plugins[s] = n.plugins[s] || []), n.plugins[s].push([i, a[s]]); + }, + call: function (e, t, i) { + var a, + s = e.plugins[t]; + if ( + s && + e.element[0].parentNode && + 11 !== e.element[0].parentNode.nodeType + ) + for (a = 0; s.length > a; a++) + e.options[s[a][0]] && s[a][1].apply(e.element, i); + } + }, + hasScroll: function (t, i) { + if ('hidden' === e(t).css('overflow')) return !1; + var a = i && 'left' === i ? 'scrollLeft' : 'scrollTop', + s = !1; + return t[a] > 0 ? !0 : ((t[a] = 1), (s = t[a] > 0), (t[a] = 0), s); + } + }); +})(jQuery); +(function (e, t) { + var i = 0, + s = Array.prototype.slice, + a = e.cleanData; + (e.cleanData = function (t) { + for (var i, s = 0; null != (i = t[s]); s++) + try { + e(i).triggerHandler('remove'); + } catch (n) {} + a(t); + }), + (e.widget = function (i, s, a) { + var n, + r, + o, + h, + l = {}, + u = i.split('.')[0]; + (i = i.split('.')[1]), + (n = u + '-' + i), + a || ((a = s), (s = e.Widget)), + (e.expr[':'][n.toLowerCase()] = function (t) { + return !!e.data(t, n); + }), + (e[u] = e[u] || {}), + (r = e[u][i]), + (o = e[u][i] = + function (e, i) { + return this._createWidget + ? (arguments.length && this._createWidget(e, i), t) + : new o(e, i); + }), + e.extend(o, r, { + version: a.version, + _proto: e.extend({}, a), + _childConstructors: [] + }), + (h = new s()), + (h.options = e.widget.extend({}, h.options)), + e.each(a, function (i, a) { + return e.isFunction(a) + ? ((l[i] = (function () { + var e = function () { + return s.prototype[i].apply(this, arguments); + }, + t = function (e) { + return s.prototype[i].apply(this, e); + }; + return function () { + var i, + s = this._super, + n = this._superApply; + return ( + (this._super = e), + (this._superApply = t), + (i = a.apply(this, arguments)), + (this._super = s), + (this._superApply = n), + i + ); + }; + })()), + t) + : ((l[i] = a), t); + }), + (o.prototype = e.widget.extend( + h, + { widgetEventPrefix: r ? h.widgetEventPrefix : i }, + l, + { constructor: o, namespace: u, widgetName: i, widgetFullName: n } + )), + r + ? (e.each(r._childConstructors, function (t, i) { + var s = i.prototype; + e.widget(s.namespace + '.' + s.widgetName, o, i._proto); + }), + delete r._childConstructors) + : s._childConstructors.push(o), + e.widget.bridge(i, o); + }), + (e.widget.extend = function (i) { + for (var a, n, r = s.call(arguments, 1), o = 0, h = r.length; h > o; o++) + for (a in r[o]) + (n = r[o][a]), + r[o].hasOwnProperty(a) && + n !== t && + (i[a] = e.isPlainObject(n) + ? e.isPlainObject(i[a]) + ? e.widget.extend({}, i[a], n) + : e.widget.extend({}, n) + : n); + return i; + }), + (e.widget.bridge = function (i, a) { + var n = a.prototype.widgetFullName || i; + e.fn[i] = function (r) { + var o = 'string' == typeof r, + h = s.call(arguments, 1), + l = this; + return ( + (r = !o && h.length ? e.widget.extend.apply(null, [r].concat(h)) : r), + o + ? this.each(function () { + var s, + a = e.data(this, n); + return a + ? e.isFunction(a[r]) && '_' !== r.charAt(0) + ? ((s = a[r].apply(a, h)), + s !== a && s !== t + ? ((l = s && s.jquery ? l.pushStack(s.get()) : s), !1) + : t) + : e.error( + "no such method '" + + r + + "' for " + + i + + ' widget instance' + ) + : e.error( + 'cannot call methods on ' + + i + + ' prior to initialization; ' + + "attempted to call method '" + + r + + "'" + ); + }) + : this.each(function () { + var t = e.data(this, n); + t ? t.option(r || {})._init() : e.data(this, n, new a(r, this)); + }), + l + ); + }; + }), + (e.Widget = function () {}), + (e.Widget._childConstructors = []), + (e.Widget.prototype = { + widgetName: 'widget', + widgetEventPrefix: '', + defaultElement: '<div>', + options: { disabled: !1, create: null }, + _createWidget: function (t, s) { + (s = e(s || this.defaultElement || this)[0]), + (this.element = e(s)), + (this.uuid = i++), + (this.eventNamespace = '.' + this.widgetName + this.uuid), + (this.options = e.widget.extend( + {}, + this.options, + this._getCreateOptions(), + t + )), + (this.bindings = e()), + (this.hoverable = e()), + (this.focusable = e()), + s !== this && + (e.data(s, this.widgetFullName, this), + this._on(!0, this.element, { + remove: function (e) { + e.target === s && this.destroy(); + } + }), + (this.document = e(s.style ? s.ownerDocument : s.document || s)), + (this.window = e( + this.document[0].defaultView || this.document[0].parentWindow + ))), + this._create(), + this._trigger('create', null, this._getCreateEventData()), + this._init(); + }, + _getCreateOptions: e.noop, + _getCreateEventData: e.noop, + _create: e.noop, + _init: e.noop, + destroy: function () { + this._destroy(), + this.element + .unbind(this.eventNamespace) + .removeData(this.widgetName) + .removeData(this.widgetFullName) + .removeData(e.camelCase(this.widgetFullName)), + this.widget() + .unbind(this.eventNamespace) + .removeAttr('aria-disabled') + .removeClass( + this.widgetFullName + '-disabled ' + 'ui-state-disabled' + ), + this.bindings.unbind(this.eventNamespace), + this.hoverable.removeClass('ui-state-hover'), + this.focusable.removeClass('ui-state-focus'); + }, + _destroy: e.noop, + widget: function () { + return this.element; + }, + option: function (i, s) { + var a, + n, + r, + o = i; + if (0 === arguments.length) return e.widget.extend({}, this.options); + if ('string' == typeof i) + if (((o = {}), (a = i.split('.')), (i = a.shift()), a.length)) { + for ( + n = o[i] = e.widget.extend({}, this.options[i]), r = 0; + a.length - 1 > r; + r++ + ) + (n[a[r]] = n[a[r]] || {}), (n = n[a[r]]); + if (((i = a.pop()), s === t)) return n[i] === t ? null : n[i]; + n[i] = s; + } else { + if (s === t) return this.options[i] === t ? null : this.options[i]; + o[i] = s; + } + return this._setOptions(o), this; + }, + _setOptions: function (e) { + var t; + for (t in e) this._setOption(t, e[t]); + return this; + }, + _setOption: function (e, t) { + return ( + (this.options[e] = t), + 'disabled' === e && + (this.widget() + .toggleClass( + this.widgetFullName + '-disabled ui-state-disabled', + !!t + ) + .attr('aria-disabled', t), + this.hoverable.removeClass('ui-state-hover'), + this.focusable.removeClass('ui-state-focus')), + this + ); + }, + enable: function () { + return this._setOption('disabled', !1); + }, + disable: function () { + return this._setOption('disabled', !0); + }, + _on: function (i, s, a) { + var n, + r = this; + 'boolean' != typeof i && ((a = s), (s = i), (i = !1)), + a + ? ((s = n = e(s)), (this.bindings = this.bindings.add(s))) + : ((a = s), (s = this.element), (n = this.widget())), + e.each(a, function (a, o) { + function h() { + return i || + (r.options.disabled !== !0 && + !e(this).hasClass('ui-state-disabled')) + ? ('string' == typeof o ? r[o] : o).apply(r, arguments) + : t; + } + 'string' != typeof o && + (h.guid = o.guid = o.guid || h.guid || e.guid++); + var l = a.match(/^(\w+)\s*(.*)$/), + u = l[1] + r.eventNamespace, + c = l[2]; + c ? n.delegate(c, u, h) : s.bind(u, h); + }); + }, + _off: function (e, t) { + (t = + (t || '').split(' ').join(this.eventNamespace + ' ') + + this.eventNamespace), + e.unbind(t).undelegate(t); + }, + _delay: function (e, t) { + function i() { + return ('string' == typeof e ? s[e] : e).apply(s, arguments); + } + var s = this; + return setTimeout(i, t || 0); + }, + _hoverable: function (t) { + (this.hoverable = this.hoverable.add(t)), + this._on(t, { + mouseenter: function (t) { + e(t.currentTarget).addClass('ui-state-hover'); + }, + mouseleave: function (t) { + e(t.currentTarget).removeClass('ui-state-hover'); + } + }); + }, + _focusable: function (t) { + (this.focusable = this.focusable.add(t)), + this._on(t, { + focusin: function (t) { + e(t.currentTarget).addClass('ui-state-focus'); + }, + focusout: function (t) { + e(t.currentTarget).removeClass('ui-state-focus'); + } + }); + }, + _trigger: function (t, i, s) { + var a, + n, + r = this.options[t]; + if ( + ((s = s || {}), + (i = e.Event(i)), + (i.type = ( + t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t + ).toLowerCase()), + (i.target = this.element[0]), + (n = i.originalEvent)) + ) + for (a in n) a in i || (i[a] = n[a]); + return ( + this.element.trigger(i, s), + !( + (e.isFunction(r) && + r.apply(this.element[0], [i].concat(s)) === !1) || + i.isDefaultPrevented() + ) + ); + } + }), + e.each({ show: 'fadeIn', hide: 'fadeOut' }, function (t, i) { + e.Widget.prototype['_' + t] = function (s, a, n) { + 'string' == typeof a && (a = { effect: a }); + var r, + o = a ? (a === !0 || 'number' == typeof a ? i : a.effect || i) : t; + (a = a || {}), + 'number' == typeof a && (a = { duration: a }), + (r = !e.isEmptyObject(a)), + (a.complete = n), + a.delay && s.delay(a.delay), + r && e.effects && e.effects.effect[o] + ? s[t](a) + : o !== t && s[o] + ? s[o](a.duration, a.easing, n) + : s.queue(function (i) { + e(this)[t](), n && n.call(s[0]), i(); + }); + }; + }); +})(jQuery); +(function (e, t) { + function i(e, t, i) { + return [ + parseFloat(e[0]) * (p.test(e[0]) ? t / 100 : 1), + parseFloat(e[1]) * (p.test(e[1]) ? i / 100 : 1) + ]; + } + function s(t, i) { + return parseInt(e.css(t, i), 10) || 0; + } + function a(t) { + var i = t[0]; + return 9 === i.nodeType + ? { width: t.width(), height: t.height(), offset: { top: 0, left: 0 } } + : e.isWindow(i) + ? { + width: t.width(), + height: t.height(), + offset: { top: t.scrollTop(), left: t.scrollLeft() } + } + : i.preventDefault + ? { width: 0, height: 0, offset: { top: i.pageY, left: i.pageX } } + : { width: t.outerWidth(), height: t.outerHeight(), offset: t.offset() }; + } + e.ui = e.ui || {}; + var n, + r = Math.max, + o = Math.abs, + h = Math.round, + l = /left|center|right/, + u = /top|center|bottom/, + c = /[\+\-]\d+(\.[\d]+)?%?/, + d = /^\w+/, + p = /%$/, + f = e.fn.position; + (e.position = { + scrollbarWidth: function () { + if (n !== t) return n; + var i, + s, + a = e( + "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" + ), + r = a.children()[0]; + return ( + e('body').append(a), + (i = r.offsetWidth), + a.css('overflow', 'scroll'), + (s = r.offsetWidth), + i === s && (s = a[0].clientWidth), + a.remove(), + (n = i - s) + ); + }, + getScrollInfo: function (t) { + var i = t.isWindow ? '' : t.element.css('overflow-x'), + s = t.isWindow ? '' : t.element.css('overflow-y'), + a = + 'scroll' === i || + ('auto' === i && t.width < t.element[0].scrollWidth), + n = + 'scroll' === s || + ('auto' === s && t.height < t.element[0].scrollHeight); + return { + width: n ? e.position.scrollbarWidth() : 0, + height: a ? e.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function (t) { + var i = e(t || window), + s = e.isWindow(i[0]); + return { + element: i, + isWindow: s, + offset: i.offset() || { left: 0, top: 0 }, + scrollLeft: i.scrollLeft(), + scrollTop: i.scrollTop(), + width: s ? i.width() : i.outerWidth(), + height: s ? i.height() : i.outerHeight() + }; + } + }), + (e.fn.position = function (t) { + if (!t || !t.of) return f.apply(this, arguments); + t = e.extend({}, t); + var n, + p, + m, + g, + v, + y, + b = e(t.of), + _ = e.position.getWithinInfo(t.within), + x = e.position.getScrollInfo(_), + k = (t.collision || 'flip').split(' '), + w = {}; + return ( + (y = a(b)), + b[0].preventDefault && (t.at = 'left top'), + (p = y.width), + (m = y.height), + (g = y.offset), + (v = e.extend({}, g)), + e.each(['my', 'at'], function () { + var e, + i, + s = (t[this] || '').split(' '); + 1 === s.length && + (s = l.test(s[0]) + ? s.concat(['center']) + : u.test(s[0]) + ? ['center'].concat(s) + : ['center', 'center']), + (s[0] = l.test(s[0]) ? s[0] : 'center'), + (s[1] = u.test(s[1]) ? s[1] : 'center'), + (e = c.exec(s[0])), + (i = c.exec(s[1])), + (w[this] = [e ? e[0] : 0, i ? i[0] : 0]), + (t[this] = [d.exec(s[0])[0], d.exec(s[1])[0]]); + }), + 1 === k.length && (k[1] = k[0]), + 'right' === t.at[0] + ? (v.left += p) + : 'center' === t.at[0] && (v.left += p / 2), + 'bottom' === t.at[1] + ? (v.top += m) + : 'center' === t.at[1] && (v.top += m / 2), + (n = i(w.at, p, m)), + (v.left += n[0]), + (v.top += n[1]), + this.each(function () { + var a, + l, + u = e(this), + c = u.outerWidth(), + d = u.outerHeight(), + f = s(this, 'marginLeft'), + y = s(this, 'marginTop'), + D = c + f + s(this, 'marginRight') + x.width, + T = d + y + s(this, 'marginBottom') + x.height, + M = e.extend({}, v), + S = i(w.my, u.outerWidth(), u.outerHeight()); + 'right' === t.my[0] + ? (M.left -= c) + : 'center' === t.my[0] && (M.left -= c / 2), + 'bottom' === t.my[1] + ? (M.top -= d) + : 'center' === t.my[1] && (M.top -= d / 2), + (M.left += S[0]), + (M.top += S[1]), + e.support.offsetFractions || + ((M.left = h(M.left)), (M.top = h(M.top))), + (a = { marginLeft: f, marginTop: y }), + e.each(['left', 'top'], function (i, s) { + e.ui.position[k[i]] && + e.ui.position[k[i]][s](M, { + targetWidth: p, + targetHeight: m, + elemWidth: c, + elemHeight: d, + collisionPosition: a, + collisionWidth: D, + collisionHeight: T, + offset: [n[0] + S[0], n[1] + S[1]], + my: t.my, + at: t.at, + within: _, + elem: u + }); + }), + t.using && + (l = function (e) { + var i = g.left - M.left, + s = i + p - c, + a = g.top - M.top, + n = a + m - d, + h = { + target: { + element: b, + left: g.left, + top: g.top, + width: p, + height: m + }, + element: { + element: u, + left: M.left, + top: M.top, + width: c, + height: d + }, + horizontal: 0 > s ? 'left' : i > 0 ? 'right' : 'center', + vertical: 0 > n ? 'top' : a > 0 ? 'bottom' : 'middle' + }; + c > p && p > o(i + s) && (h.horizontal = 'center'), + d > m && m > o(a + n) && (h.vertical = 'middle'), + (h.important = + r(o(i), o(s)) > r(o(a), o(n)) ? 'horizontal' : 'vertical'), + t.using.call(this, e, h); + }), + u.offset(e.extend(M, { using: l })); + }) + ); + }), + (e.ui.position = { + fit: { + left: function (e, t) { + var i, + s = t.within, + a = s.isWindow ? s.scrollLeft : s.offset.left, + n = s.width, + o = e.left - t.collisionPosition.marginLeft, + h = a - o, + l = o + t.collisionWidth - n - a; + t.collisionWidth > n + ? h > 0 && 0 >= l + ? ((i = e.left + h + t.collisionWidth - n - a), (e.left += h - i)) + : (e.left = + l > 0 && 0 >= h ? a : h > l ? a + n - t.collisionWidth : a) + : h > 0 + ? (e.left += h) + : l > 0 + ? (e.left -= l) + : (e.left = r(e.left - o, e.left)); + }, + top: function (e, t) { + var i, + s = t.within, + a = s.isWindow ? s.scrollTop : s.offset.top, + n = t.within.height, + o = e.top - t.collisionPosition.marginTop, + h = a - o, + l = o + t.collisionHeight - n - a; + t.collisionHeight > n + ? h > 0 && 0 >= l + ? ((i = e.top + h + t.collisionHeight - n - a), (e.top += h - i)) + : (e.top = + l > 0 && 0 >= h ? a : h > l ? a + n - t.collisionHeight : a) + : h > 0 + ? (e.top += h) + : l > 0 + ? (e.top -= l) + : (e.top = r(e.top - o, e.top)); + } + }, + flip: { + left: function (e, t) { + var i, + s, + a = t.within, + n = a.offset.left + a.scrollLeft, + r = a.width, + h = a.isWindow ? a.scrollLeft : a.offset.left, + l = e.left - t.collisionPosition.marginLeft, + u = l - h, + c = l + t.collisionWidth - r - h, + d = + 'left' === t.my[0] + ? -t.elemWidth + : 'right' === t.my[0] + ? t.elemWidth + : 0, + p = + 'left' === t.at[0] + ? t.targetWidth + : 'right' === t.at[0] + ? -t.targetWidth + : 0, + f = -2 * t.offset[0]; + 0 > u + ? ((i = e.left + d + p + f + t.collisionWidth - r - n), + (0 > i || o(u) > i) && (e.left += d + p + f)) + : c > 0 && + ((s = e.left - t.collisionPosition.marginLeft + d + p + f - h), + (s > 0 || c > o(s)) && (e.left += d + p + f)); + }, + top: function (e, t) { + var i, + s, + a = t.within, + n = a.offset.top + a.scrollTop, + r = a.height, + h = a.isWindow ? a.scrollTop : a.offset.top, + l = e.top - t.collisionPosition.marginTop, + u = l - h, + c = l + t.collisionHeight - r - h, + d = 'top' === t.my[1], + p = d ? -t.elemHeight : 'bottom' === t.my[1] ? t.elemHeight : 0, + f = + 'top' === t.at[1] + ? t.targetHeight + : 'bottom' === t.at[1] + ? -t.targetHeight + : 0, + m = -2 * t.offset[1]; + 0 > u + ? ((s = e.top + p + f + m + t.collisionHeight - r - n), + e.top + p + f + m > u && + (0 > s || o(u) > s) && + (e.top += p + f + m)) + : c > 0 && + ((i = e.top - t.collisionPosition.marginTop + p + f + m - h), + e.top + p + f + m > c && + (i > 0 || c > o(i)) && + (e.top += p + f + m)); + } + }, + flipfit: { + left: function () { + e.ui.position.flip.left.apply(this, arguments), + e.ui.position.fit.left.apply(this, arguments); + }, + top: function () { + e.ui.position.flip.top.apply(this, arguments), + e.ui.position.fit.top.apply(this, arguments); + } + } + }), + (function () { + var t, + i, + s, + a, + n, + r = document.getElementsByTagName('body')[0], + o = document.createElement('div'); + (t = document.createElement(r ? 'div' : 'body')), + (s = { + visibility: 'hidden', + width: 0, + height: 0, + border: 0, + margin: 0, + background: 'none' + }), + r && + e.extend(s, { + position: 'absolute', + left: '-1000px', + top: '-1000px' + }); + for (n in s) t.style[n] = s[n]; + t.appendChild(o), + (i = r || document.documentElement), + i.insertBefore(t, i.firstChild), + (o.style.cssText = 'position: absolute; left: 10.7432222px;'), + (a = e(o).offset().left), + (e.support.offsetFractions = a > 10 && 11 > a), + (t.innerHTML = ''), + i.removeChild(t); + })(); +})(jQuery); +(function (e) { + var t = 0; + e.widget('ui.autocomplete', { + version: '1.10.3', + defaultElement: '<input>', + options: { + appendTo: null, + autoFocus: !1, + delay: 300, + minLength: 1, + position: { my: 'left top', at: 'left bottom', collision: 'none' }, + source: null, + change: null, + close: null, + focus: null, + open: null, + response: null, + search: null, + select: null + }, + pending: 0, + _create: function () { + var t, + i, + a, + s = this.element[0].nodeName.toLowerCase(), + n = 'textarea' === s, + r = 'input' === s; + (this.isMultiLine = n + ? !0 + : r + ? !1 + : this.element.prop('isContentEditable')), + (this.valueMethod = this.element[n || r ? 'val' : 'text']), + (this.isNewMenu = !0), + this.element + .addClass('ui-autocomplete-input') + .attr('autocomplete', 'off'), + this._on(this.element, { + keydown: function (s) { + if (this.element.prop('readOnly')) + return (t = !0), (a = !0), (i = !0), undefined; + (t = !1), (a = !1), (i = !1); + var n = e.ui.keyCode; + switch (s.keyCode) { + case n.PAGE_UP: + (t = !0), this._move('previousPage', s); + break; + case n.PAGE_DOWN: + (t = !0), this._move('nextPage', s); + break; + case n.UP: + (t = !0), this._keyEvent('previous', s); + break; + case n.DOWN: + (t = !0), this._keyEvent('next', s); + break; + case n.ENTER: + case n.NUMPAD_ENTER: + this.menu.active && + ((t = !0), s.preventDefault(), this.menu.select(s)); + break; + case n.TAB: + this.menu.active && this.menu.select(s); + break; + case n.ESCAPE: + this.menu.element.is(':visible') && + (this._value(this.term), this.close(s), s.preventDefault()); + break; + default: + (i = !0), this._searchTimeout(s); + } + }, + keypress: function (a) { + if (t) + return ( + (t = !1), + (!this.isMultiLine || this.menu.element.is(':visible')) && + a.preventDefault(), + undefined + ); + if (!i) { + var s = e.ui.keyCode; + switch (a.keyCode) { + case s.PAGE_UP: + this._move('previousPage', a); + break; + case s.PAGE_DOWN: + this._move('nextPage', a); + break; + case s.UP: + this._keyEvent('previous', a); + break; + case s.DOWN: + this._keyEvent('next', a); + } + } + }, + input: function (e) { + return a + ? ((a = !1), e.preventDefault(), undefined) + : (this._searchTimeout(e), undefined); + }, + focus: function () { + (this.selectedItem = null), (this.previous = this._value()); + }, + blur: function (e) { + return this.cancelBlur + ? (delete this.cancelBlur, undefined) + : (clearTimeout(this.searching), + this.close(e), + this._change(e), + undefined); + } + }), + this._initSource(), + (this.menu = e('<ul>') + .addClass('ui-autocomplete ui-front') + .appendTo(this._appendTo()) + .menu({ role: null }) + .hide() + .data('ui-menu')), + this._on(this.menu.element, { + mousedown: function (t) { + t.preventDefault(), + (this.cancelBlur = !0), + this._delay(function () { + delete this.cancelBlur; + }); + var i = this.menu.element[0]; + e(t.target).closest('.ui-menu-item').length || + this._delay(function () { + var t = this; + this.document.one('mousedown', function (a) { + a.target === t.element[0] || + a.target === i || + e.contains(i, a.target) || + t.close(); + }); + }); + }, + menufocus: function (t, i) { + if ( + this.isNewMenu && + ((this.isNewMenu = !1), + t.originalEvent && /^mouse/.test(t.originalEvent.type)) + ) + return ( + this.menu.blur(), + this.document.one('mousemove', function () { + e(t.target).trigger(t.originalEvent); + }), + undefined + ); + var a = i.item.data('ui-autocomplete-item'); + !1 !== this._trigger('focus', t, { item: a }) + ? t.originalEvent && + /^key/.test(t.originalEvent.type) && + this._value(a.value) + : this.liveRegion.text(a.value); + }, + menuselect: function (e, t) { + var i = t.item.data('ui-autocomplete-item'), + a = this.previous; + this.element[0] !== this.document[0].activeElement && + (this.element.focus(), + (this.previous = a), + this._delay(function () { + (this.previous = a), (this.selectedItem = i); + })), + !1 !== this._trigger('select', e, { item: i }) && + this._value(i.value), + (this.term = this._value()), + this.close(e), + (this.selectedItem = i); + } + }), + (this.liveRegion = e('<span>', { + role: 'status', + 'aria-live': 'polite' + }) + .addClass('ui-helper-hidden-accessible') + .insertBefore(this.element)), + this._on(this.window, { + beforeunload: function () { + this.element.removeAttr('autocomplete'); + } + }); + }, + _destroy: function () { + clearTimeout(this.searching), + this.element + .removeClass('ui-autocomplete-input') + .removeAttr('autocomplete'), + this.menu.element.remove(), + this.liveRegion.remove(); + }, + _setOption: function (e, t) { + this._super(e, t), + 'source' === e && this._initSource(), + 'appendTo' === e && this.menu.element.appendTo(this._appendTo()), + 'disabled' === e && t && this.xhr && this.xhr.abort(); + }, + _appendTo: function () { + var t = this.options.appendTo; + return ( + t && (t = t.jquery || t.nodeType ? e(t) : this.document.find(t).eq(0)), + t || (t = this.element.closest('.ui-front')), + t.length || (t = this.document[0].body), + t + ); + }, + _initSource: function () { + var t, + i, + a = this; + e.isArray(this.options.source) + ? ((t = this.options.source), + (this.source = function (i, a) { + a(e.ui.autocomplete.filter(t, i.term)); + })) + : 'string' == typeof this.options.source + ? ((i = this.options.source), + (this.source = function (t, s) { + a.xhr && a.xhr.abort(), + (a.xhr = e.ajax({ + url: i, + data: t, + dataType: 'json', + success: function (e) { + s(e); + }, + error: function () { + s([]); + } + })); + })) + : (this.source = this.options.source); + }, + _searchTimeout: function (e) { + clearTimeout(this.searching), + (this.searching = this._delay(function () { + this.term !== this._value() && + ((this.selectedItem = null), this.search(null, e)); + }, this.options.delay)); + }, + search: function (e, t) { + return ( + (e = null != e ? e : this._value()), + (this.term = this._value()), + e.length < this.options.minLength + ? this.close(t) + : this._trigger('search', t) !== !1 + ? this._search(e) + : undefined + ); + }, + _search: function (e) { + this.pending++, + this.element.addClass('ui-autocomplete-loading'), + (this.cancelSearch = !1), + this.source({ term: e }, this._response()); + }, + _response: function () { + var e = this, + i = ++t; + return function (a) { + i === t && e.__response(a), + e.pending--, + e.pending || e.element.removeClass('ui-autocomplete-loading'); + }; + }, + __response: function (e) { + e && (e = this._normalize(e)), + this._trigger('response', null, { content: e }), + !this.options.disabled && e && e.length && !this.cancelSearch + ? (this._suggest(e), this._trigger('open')) + : this._close(); + }, + close: function (e) { + (this.cancelSearch = !0), this._close(e); + }, + _close: function (e) { + this.menu.element.is(':visible') && + (this.menu.element.hide(), + this.menu.blur(), + (this.isNewMenu = !0), + this._trigger('close', e)); + }, + _change: function (e) { + this.previous !== this._value() && + this._trigger('change', e, { item: this.selectedItem }); + }, + _normalize: function (t) { + return t.length && t[0].label && t[0].value + ? t + : e.map(t, function (t) { + return 'string' == typeof t + ? { label: t, value: t } + : e.extend( + { label: t.label || t.value, value: t.value || t.label }, + t + ); + }); + }, + _suggest: function (t) { + var i = this.menu.element.empty(); + this._renderMenu(i, t), + (this.isNewMenu = !0), + this.menu.refresh(), + i.show(), + this._resizeMenu(), + i.position(e.extend({ of: this.element }, this.options.position)), + this.options.autoFocus && this.menu.next(); + }, + _resizeMenu: function () { + var e = this.menu.element; + e.outerWidth( + Math.max(e.width('').outerWidth() + 1, this.element.outerWidth()) + ); + }, + _renderMenu: function (t, i) { + var a = this; + e.each(i, function (e, i) { + a._renderItemData(t, i); + }); + }, + _renderItemData: function (e, t) { + return this._renderItem(e, t).data('ui-autocomplete-item', t); + }, + _renderItem: function (t, i) { + return e('<li>').append(e('<a>').text(i.label)).appendTo(t); + }, + _move: function (e, t) { + return this.menu.element.is(':visible') + ? (this.menu.isFirstItem() && /^previous/.test(e)) || + (this.menu.isLastItem() && /^next/.test(e)) + ? (this._value(this.term), this.menu.blur(), undefined) + : (this.menu[e](t), undefined) + : (this.search(null, t), undefined); + }, + widget: function () { + return this.menu.element; + }, + _value: function () { + return this.valueMethod.apply(this.element, arguments); + }, + _keyEvent: function (e, t) { + (!this.isMultiLine || this.menu.element.is(':visible')) && + (this._move(e, t), t.preventDefault()); + } + }), + e.extend(e.ui.autocomplete, { + escapeRegex: function (e) { + return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&'); + }, + filter: function (t, i) { + var a = RegExp(e.ui.autocomplete.escapeRegex(i), 'i'); + return e.grep(t, function (e) { + return a.test(e.label || e.value || e); + }); + } + }), + e.widget('ui.autocomplete', e.ui.autocomplete, { + options: { + messages: { + noResults: 'No search results.', + results: function (e) { + return ( + e + + (e > 1 ? ' results are' : ' result is') + + ' available, use up and down arrow keys to navigate.' + ); + } + } + }, + __response: function (e) { + var t; + this._superApply(arguments), + this.options.disabled || + this.cancelSearch || + ((t = + e && e.length + ? this.options.messages.results(e.length) + : this.options.messages.noResults), + this.liveRegion.text(t)); + } + }); +})(jQuery); +(function (e) { + e.widget('ui.menu', { + version: '1.10.3', + defaultElement: '<ul>', + delay: 300, + options: { + icons: { submenu: 'ui-icon-carat-1-e' }, + menus: 'ul', + position: { my: 'left top', at: 'right top' }, + role: 'menu', + blur: null, + focus: null, + select: null + }, + _create: function () { + (this.activeMenu = this.element), + (this.mouseHandled = !1), + this.element + .uniqueId() + .addClass('ui-menu ui-widget ui-widget-content ui-corner-all') + .toggleClass('ui-menu-icons', !!this.element.find('.ui-icon').length) + .attr({ role: this.options.role, tabIndex: 0 }) + .bind( + 'click' + this.eventNamespace, + e.proxy(function (e) { + this.options.disabled && e.preventDefault(); + }, this) + ), + this.options.disabled && + this.element + .addClass('ui-state-disabled') + .attr('aria-disabled', 'true'), + this._on({ + 'mousedown .ui-menu-item > a': function (e) { + e.preventDefault(); + }, + 'click .ui-state-disabled > a': function (e) { + e.preventDefault(); + }, + 'click .ui-menu-item:has(a)': function (t) { + var i = e(t.target).closest('.ui-menu-item'); + !this.mouseHandled && + i.not('.ui-state-disabled').length && + ((this.mouseHandled = !0), + this.select(t), + i.has('.ui-menu').length + ? this.expand(t) + : this.element.is(':focus') || + (this.element.trigger('focus', [!0]), + this.active && + 1 === this.active.parents('.ui-menu').length && + clearTimeout(this.timer))); + }, + 'mouseenter .ui-menu-item': function (t) { + var i = e(t.currentTarget); + i + .siblings() + .children('.ui-state-active') + .removeClass('ui-state-active'), + this.focus(t, i); + }, + mouseleave: 'collapseAll', + 'mouseleave .ui-menu': 'collapseAll', + focus: function (e, t) { + var i = this.active || this.element.children('.ui-menu-item').eq(0); + t || this.focus(e, i); + }, + blur: function (t) { + this._delay(function () { + e.contains(this.element[0], this.document[0].activeElement) || + this.collapseAll(t); + }); + }, + keydown: '_keydown' + }), + this.refresh(), + this._on(this.document, { + click: function (t) { + e(t.target).closest('.ui-menu').length || this.collapseAll(t), + (this.mouseHandled = !1); + } + }); + }, + _destroy: function () { + this.element + .removeAttr('aria-activedescendant') + .find('.ui-menu') + .addBack() + .removeClass( + 'ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons' + ) + .removeAttr('role') + .removeAttr('tabIndex') + .removeAttr('aria-labelledby') + .removeAttr('aria-expanded') + .removeAttr('aria-hidden') + .removeAttr('aria-disabled') + .removeUniqueId() + .show(), + this.element + .find('.ui-menu-item') + .removeClass('ui-menu-item') + .removeAttr('role') + .removeAttr('aria-disabled') + .children('a') + .removeUniqueId() + .removeClass('ui-corner-all ui-state-hover') + .removeAttr('tabIndex') + .removeAttr('role') + .removeAttr('aria-haspopup') + .children() + .each(function () { + var t = e(this); + t.data('ui-menu-submenu-carat') && t.remove(); + }), + this.element + .find('.ui-menu-divider') + .removeClass('ui-menu-divider ui-widget-content'); + }, + _keydown: function (t) { + function i(e) { + return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&'); + } + var s, + a, + n, + r, + o, + h = !0; + switch (t.keyCode) { + case e.ui.keyCode.PAGE_UP: + this.previousPage(t); + break; + case e.ui.keyCode.PAGE_DOWN: + this.nextPage(t); + break; + case e.ui.keyCode.HOME: + this._move('first', 'first', t); + break; + case e.ui.keyCode.END: + this._move('last', 'last', t); + break; + case e.ui.keyCode.UP: + this.previous(t); + break; + case e.ui.keyCode.DOWN: + this.next(t); + break; + case e.ui.keyCode.LEFT: + this.collapse(t); + break; + case e.ui.keyCode.RIGHT: + this.active && + !this.active.is('.ui-state-disabled') && + this.expand(t); + break; + case e.ui.keyCode.ENTER: + case e.ui.keyCode.SPACE: + this._activate(t); + break; + case e.ui.keyCode.ESCAPE: + this.collapse(t); + break; + default: + (h = !1), + (a = this.previousFilter || ''), + (n = String.fromCharCode(t.keyCode)), + (r = !1), + clearTimeout(this.filterTimer), + n === a ? (r = !0) : (n = a + n), + (o = RegExp('^' + i(n), 'i')), + (s = this.activeMenu.children('.ui-menu-item').filter(function () { + return o.test(e(this).children('a').text()); + })), + (s = + r && -1 !== s.index(this.active.next()) + ? this.active.nextAll('.ui-menu-item') + : s), + s.length || + ((n = String.fromCharCode(t.keyCode)), + (o = RegExp('^' + i(n), 'i')), + (s = this.activeMenu + .children('.ui-menu-item') + .filter(function () { + return o.test(e(this).children('a').text()); + }))), + s.length + ? (this.focus(t, s), + s.length > 1 + ? ((this.previousFilter = n), + (this.filterTimer = this._delay(function () { + delete this.previousFilter; + }, 1e3))) + : delete this.previousFilter) + : delete this.previousFilter; + } + h && t.preventDefault(); + }, + _activate: function (e) { + this.active.is('.ui-state-disabled') || + (this.active.children("a[aria-haspopup='true']").length + ? this.expand(e) + : this.select(e)); + }, + refresh: function () { + var t, + i = this.options.icons.submenu, + s = this.element.find(this.options.menus); + s + .filter(':not(.ui-menu)') + .addClass('ui-menu ui-widget ui-widget-content ui-corner-all') + .hide() + .attr({ + role: this.options.role, + 'aria-hidden': 'true', + 'aria-expanded': 'false' + }) + .each(function () { + var t = e(this), + s = t.prev('a'), + a = e('<span>') + .addClass('ui-menu-icon ui-icon ' + i) + .data('ui-menu-submenu-carat', !0); + s.attr('aria-haspopup', 'true').prepend(a), + t.attr('aria-labelledby', s.attr('id')); + }), + (t = s.add(this.element)), + t + .children(':not(.ui-menu-item):has(a)') + .addClass('ui-menu-item') + .attr('role', 'presentation') + .children('a') + .uniqueId() + .addClass('ui-corner-all') + .attr({ tabIndex: -1, role: this._itemRole() }), + t.children(':not(.ui-menu-item)').each(function () { + var t = e(this); + /[^\-\u2014\u2013\s]/.test(t.text()) || + t.addClass('ui-widget-content ui-menu-divider'); + }), + t.children('.ui-state-disabled').attr('aria-disabled', 'true'), + this.active && + !e.contains(this.element[0], this.active[0]) && + this.blur(); + }, + _itemRole: function () { + return { menu: 'menuitem', listbox: 'option' }[this.options.role]; + }, + _setOption: function (e, t) { + 'icons' === e && + this.element + .find('.ui-menu-icon') + .removeClass(this.options.icons.submenu) + .addClass(t.submenu), + this._super(e, t); + }, + focus: function (e, t) { + var i, s; + this.blur(e, e && 'focus' === e.type), + this._scrollIntoView(t), + (this.active = t.first()), + (s = this.active.children('a').addClass('ui-state-focus')), + this.options.role && + this.element.attr('aria-activedescendant', s.attr('id')), + this.active + .parent() + .closest('.ui-menu-item') + .children('a:first') + .addClass('ui-state-active'), + e && 'keydown' === e.type + ? this._close() + : (this.timer = this._delay(function () { + this._close(); + }, this.delay)), + (i = t.children('.ui-menu')), + i.length && /^mouse/.test(e.type) && this._startOpening(i), + (this.activeMenu = t.parent()), + this._trigger('focus', e, { item: t }); + }, + _scrollIntoView: function (t) { + var i, s, a, n, r, o; + this._hasScroll() && + ((i = parseFloat(e.css(this.activeMenu[0], 'borderTopWidth')) || 0), + (s = parseFloat(e.css(this.activeMenu[0], 'paddingTop')) || 0), + (a = t.offset().top - this.activeMenu.offset().top - i - s), + (n = this.activeMenu.scrollTop()), + (r = this.activeMenu.height()), + (o = t.height()), + 0 > a + ? this.activeMenu.scrollTop(n + a) + : a + o > r && this.activeMenu.scrollTop(n + a - r + o)); + }, + blur: function (e, t) { + t || clearTimeout(this.timer), + this.active && + (this.active.children('a').removeClass('ui-state-focus'), + (this.active = null), + this._trigger('blur', e, { item: this.active })); + }, + _startOpening: function (e) { + clearTimeout(this.timer), + 'true' === e.attr('aria-hidden') && + (this.timer = this._delay(function () { + this._close(), this._open(e); + }, this.delay)); + }, + _open: function (t) { + var i = e.extend({ of: this.active }, this.options.position); + clearTimeout(this.timer), + this.element + .find('.ui-menu') + .not(t.parents('.ui-menu')) + .hide() + .attr('aria-hidden', 'true'), + t + .show() + .removeAttr('aria-hidden') + .attr('aria-expanded', 'true') + .position(i); + }, + collapseAll: function (t, i) { + clearTimeout(this.timer), + (this.timer = this._delay(function () { + var s = i + ? this.element + : e(t && t.target).closest(this.element.find('.ui-menu')); + s.length || (s = this.element), + this._close(s), + this.blur(t), + (this.activeMenu = s); + }, this.delay)); + }, + _close: function (e) { + e || (e = this.active ? this.active.parent() : this.element), + e + .find('.ui-menu') + .hide() + .attr('aria-hidden', 'true') + .attr('aria-expanded', 'false') + .end() + .find('a.ui-state-active') + .removeClass('ui-state-active'); + }, + collapse: function (e) { + var t = + this.active && + this.active.parent().closest('.ui-menu-item', this.element); + t && t.length && (this._close(), this.focus(e, t)); + }, + expand: function (e) { + var t = + this.active && + this.active.children('.ui-menu ').children('.ui-menu-item').first(); + t && + t.length && + (this._open(t.parent()), + this._delay(function () { + this.focus(e, t); + })); + }, + next: function (e) { + this._move('next', 'first', e); + }, + previous: function (e) { + this._move('prev', 'last', e); + }, + isFirstItem: function () { + return this.active && !this.active.prevAll('.ui-menu-item').length; + }, + isLastItem: function () { + return this.active && !this.active.nextAll('.ui-menu-item').length; + }, + _move: function (e, t, i) { + var s; + this.active && + (s = + 'first' === e || 'last' === e + ? this.active['first' === e ? 'prevAll' : 'nextAll']( + '.ui-menu-item' + ).eq(-1) + : this.active[e + 'All']('.ui-menu-item').eq(0)), + (s && s.length && this.active) || + (s = this.activeMenu.children('.ui-menu-item')[t]()), + this.focus(i, s); + }, + nextPage: function (t) { + var i, s, a; + return this.active + ? (this.isLastItem() || + (this._hasScroll() + ? ((s = this.active.offset().top), + (a = this.element.height()), + this.active.nextAll('.ui-menu-item').each(function () { + return (i = e(this)), 0 > i.offset().top - s - a; + }), + this.focus(t, i)) + : this.focus( + t, + this.activeMenu + .children('.ui-menu-item') + [this.active ? 'last' : 'first']() + )), + undefined) + : (this.next(t), undefined); + }, + previousPage: function (t) { + var i, s, a; + return this.active + ? (this.isFirstItem() || + (this._hasScroll() + ? ((s = this.active.offset().top), + (a = this.element.height()), + this.active.prevAll('.ui-menu-item').each(function () { + return (i = e(this)), i.offset().top - s + a > 0; + }), + this.focus(t, i)) + : this.focus( + t, + this.activeMenu.children('.ui-menu-item').first() + )), + undefined) + : (this.next(t), undefined); + }, + _hasScroll: function () { + return this.element.outerHeight() < this.element.prop('scrollHeight'); + }, + select: function (t) { + this.active = this.active || e(t.target).closest('.ui-menu-item'); + var i = { item: this.active }; + this.active.has('.ui-menu').length || this.collapseAll(t, !0), + this._trigger('select', t, i); + } + }); +})(jQuery); diff --git a/docs/src/css/less/jquery-ui/jquery-ui.min.js b/docs/src/css/less/jquery-ui/jquery-ui.min.js index a6d08cb3..b3a3a0cd 100644 --- a/docs/src/css/less/jquery-ui/jquery-ui.min.js +++ b/docs/src/css/less/jquery-ui/jquery-ui.min.js @@ -1,7 +1,1791 @@ /*! jQuery UI - v1.11.1 - 2014-08-14 -* http://jqueryui.com -* Includes: core.js, widget.js, position.js, autocomplete.js, menu.js -* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + * http://jqueryui.com + * Includes: core.js, widget.js, position.js, autocomplete.js, menu.js + * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ -(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.1",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var s=0,n=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,a=n.call(arguments,1),o=0,r=a.length;r>o;o++)for(i in a[o])s=a[o][i],a[o].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(a){var o="string"==typeof a,r=n.call(arguments,1),h=this;return a=!o&&r.length?e.widget.extend.apply(null,[a].concat(r)):a,o?this.each(function(){var i,n=e.data(this,s);return"instance"===a?(h=n,!1):n?e.isFunction(n[a])&&"_"!==a.charAt(0)?(i=n[a].apply(n,r),i!==n&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+a+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var t=e.data(this,s);t?(t.option(a||{}),t._init&&t._init()):e.data(this,s,new i(a,this))}),h}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget,function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,a="scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight;return{width:a?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},e.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=e.extend({},n);var p,m,g,v,y,b,_=e(n.of),x=e.position.getWithinInfo(n.within),w=e.position.getScrollInfo(x),k=(n.collision||"flip").split(" "),T={};return b=s(_),_[0].preventDefault&&(n.at="left top"),m=b.width,g=b.height,v=b.offset,y=e.extend({},v),e.each(["my","at"],function(){var e,t,i=(n[this]||"").split(" ");1===i.length&&(i=l.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=l.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",e=d.exec(i[0]),t=d.exec(i[1]),T[this]=[e?e[0]:0,t?t[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===n.at[0]?y.left+=m:"center"===n.at[0]&&(y.left+=m/2),"bottom"===n.at[1]?y.top+=g:"center"===n.at[1]&&(y.top+=g/2),p=t(T.at,m,g),y.left+=p[0],y.top+=p[1],this.each(function(){var s,l,u=e(this),d=u.outerWidth(),c=u.outerHeight(),f=i(this,"marginLeft"),b=i(this,"marginTop"),D=d+f+i(this,"marginRight")+w.width,S=c+b+i(this,"marginBottom")+w.height,N=e.extend({},y),M=t(T.my,u.outerWidth(),u.outerHeight());"right"===n.my[0]?N.left-=d:"center"===n.my[0]&&(N.left-=d/2),"bottom"===n.my[1]?N.top-=c:"center"===n.my[1]&&(N.top-=c/2),N.left+=M[0],N.top+=M[1],a||(N.left=h(N.left),N.top=h(N.top)),s={marginLeft:f,marginTop:b},e.each(["left","top"],function(t,i){e.ui.position[k[t]]&&e.ui.position[k[t]][i](N,{targetWidth:m,targetHeight:g,elemWidth:d,elemHeight:c,collisionPosition:s,collisionWidth:D,collisionHeight:S,offset:[p[0]+M[0],p[1]+M[1]],my:n.my,at:n.at,within:x,elem:u})}),n.using&&(l=function(e){var t=v.left-N.left,i=t+m-d,s=v.top-N.top,a=s+g-c,h={target:{element:_,left:v.left,top:v.top,width:m,height:g},element:{element:u,left:N.left,top:N.top,width:d,height:c},horizontal:0>i?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};d>m&&m>r(t+i)&&(h.horizontal="center"),c>g&&g>r(s+a)&&(h.vertical="middle"),h.important=o(r(t),r(i))>o(r(s),r(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(N,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,d=l+t.collisionWidth-o-h,c="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+c+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=c+p+f)):d>0&&(s=e.left-t.collisionPosition.marginLeft+c+p+f-h,(s>0||d>r(s))&&(e.left+=c+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,d=l+t.collisionHeight-o-h,c="top"===t.my[1],p=c?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,e.top+p+f+m>u&&(0>s||r(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,e.top+p+f+m>d&&(i>0||d>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.menu",{version:"1.11.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,h=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:h=!1,n=this.previousFilter||"",a=String.fromCharCode(t.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.find(this.options.items).filter(function(){return r.test(e(this).text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(t.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.find(this.options.items).filter(function(){return r.test(e(this).text())})),s.length?(this.focus(t,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)}}),e.widget("ui.autocomplete",{version:"1.11.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&e.trim(s).length&&(this.liveRegion.children().hide(),e("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),s=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!s)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next() -},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete}); \ No newline at end of file +(function (e) { + 'function' == typeof define && define.amd ? define(['jquery'], e) : e(jQuery); +})(function (e) { + function t(t, s) { + var n, + a, + o, + r = t.nodeName.toLowerCase(); + return 'area' === r + ? ((n = t.parentNode), + (a = n.name), + t.href && a && 'map' === n.nodeName.toLowerCase() + ? ((o = e("img[usemap='#" + a + "']")[0]), !!o && i(o)) + : !1) + : (/input|select|textarea|button|object/.test(r) + ? !t.disabled + : 'a' === r + ? t.href || s + : s) && i(t); + } + function i(t) { + return ( + e.expr.filters.visible(t) && + !e(t) + .parents() + .addBack() + .filter(function () { + return 'hidden' === e.css(this, 'visibility'); + }).length + ); + } + (e.ui = e.ui || {}), + e.extend(e.ui, { + version: '1.11.1', + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + } + }), + e.fn.extend({ + scrollParent: function (t) { + var i = this.css('position'), + s = 'absolute' === i, + n = t ? /(auto|scroll|hidden)/ : /(auto|scroll)/, + a = this.parents() + .filter(function () { + var t = e(this); + return s && 'static' === t.css('position') + ? !1 + : n.test( + t.css('overflow') + + t.css('overflow-y') + + t.css('overflow-x') + ); + }) + .eq(0); + return 'fixed' !== i && a.length + ? a + : e(this[0].ownerDocument || document); + }, + uniqueId: (function () { + var e = 0; + return function () { + return this.each(function () { + this.id || (this.id = 'ui-id-' + ++e); + }); + }; + })(), + removeUniqueId: function () { + return this.each(function () { + /^ui-id-\d+$/.test(this.id) && e(this).removeAttr('id'); + }); + } + }), + e.extend(e.expr[':'], { + data: e.expr.createPseudo + ? e.expr.createPseudo(function (t) { + return function (i) { + return !!e.data(i, t); + }; + }) + : function (t, i, s) { + return !!e.data(t, s[3]); + }, + focusable: function (i) { + return t(i, !isNaN(e.attr(i, 'tabindex'))); + }, + tabbable: function (i) { + var s = e.attr(i, 'tabindex'), + n = isNaN(s); + return (n || s >= 0) && t(i, !n); + } + }), + e('<a>').outerWidth(1).jquery || + e.each(['Width', 'Height'], function (t, i) { + function s(t, i, s, a) { + return ( + e.each(n, function () { + (i -= parseFloat(e.css(t, 'padding' + this)) || 0), + s && + (i -= parseFloat(e.css(t, 'border' + this + 'Width')) || 0), + a && (i -= parseFloat(e.css(t, 'margin' + this)) || 0); + }), + i + ); + } + var n = 'Width' === i ? ['Left', 'Right'] : ['Top', 'Bottom'], + a = i.toLowerCase(), + o = { + innerWidth: e.fn.innerWidth, + innerHeight: e.fn.innerHeight, + outerWidth: e.fn.outerWidth, + outerHeight: e.fn.outerHeight + }; + (e.fn['inner' + i] = function (t) { + return void 0 === t + ? o['inner' + i].call(this) + : this.each(function () { + e(this).css(a, s(this, t) + 'px'); + }); + }), + (e.fn['outer' + i] = function (t, n) { + return 'number' != typeof t + ? o['outer' + i].call(this, t) + : this.each(function () { + e(this).css(a, s(this, t, !0, n) + 'px'); + }); + }); + }), + e.fn.addBack || + (e.fn.addBack = function (e) { + return this.add( + null == e ? this.prevObject : this.prevObject.filter(e) + ); + }), + e('<a>').data('a-b', 'a').removeData('a-b').data('a-b') && + (e.fn.removeData = (function (t) { + return function (i) { + return arguments.length ? t.call(this, e.camelCase(i)) : t.call(this); + }; + })(e.fn.removeData)), + (e.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())), + e.fn.extend({ + focus: (function (t) { + return function (i, s) { + return 'number' == typeof i + ? this.each(function () { + var t = this; + setTimeout(function () { + e(t).focus(), s && s.call(t); + }, i); + }) + : t.apply(this, arguments); + }; + })(e.fn.focus), + disableSelection: (function () { + var e = + 'onselectstart' in document.createElement('div') + ? 'selectstart' + : 'mousedown'; + return function () { + return this.bind(e + '.ui-disableSelection', function (e) { + e.preventDefault(); + }); + }; + })(), + enableSelection: function () { + return this.unbind('.ui-disableSelection'); + }, + zIndex: function (t) { + if (void 0 !== t) return this.css('zIndex', t); + if (this.length) + for (var i, s, n = e(this[0]); n.length && n[0] !== document; ) { + if ( + ((i = n.css('position')), + ('absolute' === i || 'relative' === i || 'fixed' === i) && + ((s = parseInt(n.css('zIndex'), 10)), !isNaN(s) && 0 !== s)) + ) + return s; + n = n.parent(); + } + return 0; + } + }), + (e.ui.plugin = { + add: function (t, i, s) { + var n, + a = e.ui[t].prototype; + for (n in s) + (a.plugins[n] = a.plugins[n] || []), a.plugins[n].push([i, s[n]]); + }, + call: function (e, t, i, s) { + var n, + a = e.plugins[t]; + if ( + a && + (s || + (e.element[0].parentNode && + 11 !== e.element[0].parentNode.nodeType)) + ) + for (n = 0; a.length > n; n++) + e.options[a[n][0]] && a[n][1].apply(e.element, i); + } + }); + var s = 0, + n = Array.prototype.slice; + (e.cleanData = (function (t) { + return function (i) { + var s, n, a; + for (a = 0; null != (n = i[a]); a++) + try { + (s = e._data(n, 'events')), + s && s.remove && e(n).triggerHandler('remove'); + } catch (o) {} + t(i); + }; + })(e.cleanData)), + (e.widget = function (t, i, s) { + var n, + a, + o, + r, + h = {}, + l = t.split('.')[0]; + return ( + (t = t.split('.')[1]), + (n = l + '-' + t), + s || ((s = i), (i = e.Widget)), + (e.expr[':'][n.toLowerCase()] = function (t) { + return !!e.data(t, n); + }), + (e[l] = e[l] || {}), + (a = e[l][t]), + (o = e[l][t] = + function (e, t) { + return this._createWidget + ? (arguments.length && this._createWidget(e, t), void 0) + : new o(e, t); + }), + e.extend(o, a, { + version: s.version, + _proto: e.extend({}, s), + _childConstructors: [] + }), + (r = new i()), + (r.options = e.widget.extend({}, r.options)), + e.each(s, function (t, s) { + return e.isFunction(s) + ? ((h[t] = (function () { + var e = function () { + return i.prototype[t].apply(this, arguments); + }, + n = function (e) { + return i.prototype[t].apply(this, e); + }; + return function () { + var t, + i = this._super, + a = this._superApply; + return ( + (this._super = e), + (this._superApply = n), + (t = s.apply(this, arguments)), + (this._super = i), + (this._superApply = a), + t + ); + }; + })()), + void 0) + : ((h[t] = s), void 0); + }), + (o.prototype = e.widget.extend( + r, + { widgetEventPrefix: a ? r.widgetEventPrefix || t : t }, + h, + { constructor: o, namespace: l, widgetName: t, widgetFullName: n } + )), + a + ? (e.each(a._childConstructors, function (t, i) { + var s = i.prototype; + e.widget(s.namespace + '.' + s.widgetName, o, i._proto); + }), + delete a._childConstructors) + : i._childConstructors.push(o), + e.widget.bridge(t, o), + o + ); + }), + (e.widget.extend = function (t) { + for (var i, s, a = n.call(arguments, 1), o = 0, r = a.length; r > o; o++) + for (i in a[o]) + (s = a[o][i]), + a[o].hasOwnProperty(i) && + void 0 !== s && + (t[i] = e.isPlainObject(s) + ? e.isPlainObject(t[i]) + ? e.widget.extend({}, t[i], s) + : e.widget.extend({}, s) + : s); + return t; + }), + (e.widget.bridge = function (t, i) { + var s = i.prototype.widgetFullName || t; + e.fn[t] = function (a) { + var o = 'string' == typeof a, + r = n.call(arguments, 1), + h = this; + return ( + (a = !o && r.length ? e.widget.extend.apply(null, [a].concat(r)) : a), + o + ? this.each(function () { + var i, + n = e.data(this, s); + return 'instance' === a + ? ((h = n), !1) + : n + ? e.isFunction(n[a]) && '_' !== a.charAt(0) + ? ((i = n[a].apply(n, r)), + i !== n && void 0 !== i + ? ((h = i && i.jquery ? h.pushStack(i.get()) : i), !1) + : void 0) + : e.error( + "no such method '" + + a + + "' for " + + t + + ' widget instance' + ) + : e.error( + 'cannot call methods on ' + + t + + ' prior to initialization; ' + + "attempted to call method '" + + a + + "'" + ); + }) + : this.each(function () { + var t = e.data(this, s); + t + ? (t.option(a || {}), t._init && t._init()) + : e.data(this, s, new i(a, this)); + }), + h + ); + }; + }), + (e.Widget = function () {}), + (e.Widget._childConstructors = []), + (e.Widget.prototype = { + widgetName: 'widget', + widgetEventPrefix: '', + defaultElement: '<div>', + options: { disabled: !1, create: null }, + _createWidget: function (t, i) { + (i = e(i || this.defaultElement || this)[0]), + (this.element = e(i)), + (this.uuid = s++), + (this.eventNamespace = '.' + this.widgetName + this.uuid), + (this.options = e.widget.extend( + {}, + this.options, + this._getCreateOptions(), + t + )), + (this.bindings = e()), + (this.hoverable = e()), + (this.focusable = e()), + i !== this && + (e.data(i, this.widgetFullName, this), + this._on(!0, this.element, { + remove: function (e) { + e.target === i && this.destroy(); + } + }), + (this.document = e(i.style ? i.ownerDocument : i.document || i)), + (this.window = e( + this.document[0].defaultView || this.document[0].parentWindow + ))), + this._create(), + this._trigger('create', null, this._getCreateEventData()), + this._init(); + }, + _getCreateOptions: e.noop, + _getCreateEventData: e.noop, + _create: e.noop, + _init: e.noop, + destroy: function () { + this._destroy(), + this.element + .unbind(this.eventNamespace) + .removeData(this.widgetFullName) + .removeData(e.camelCase(this.widgetFullName)), + this.widget() + .unbind(this.eventNamespace) + .removeAttr('aria-disabled') + .removeClass( + this.widgetFullName + '-disabled ' + 'ui-state-disabled' + ), + this.bindings.unbind(this.eventNamespace), + this.hoverable.removeClass('ui-state-hover'), + this.focusable.removeClass('ui-state-focus'); + }, + _destroy: e.noop, + widget: function () { + return this.element; + }, + option: function (t, i) { + var s, + n, + a, + o = t; + if (0 === arguments.length) return e.widget.extend({}, this.options); + if ('string' == typeof t) + if (((o = {}), (s = t.split('.')), (t = s.shift()), s.length)) { + for ( + n = o[t] = e.widget.extend({}, this.options[t]), a = 0; + s.length - 1 > a; + a++ + ) + (n[s[a]] = n[s[a]] || {}), (n = n[s[a]]); + if (((t = s.pop()), 1 === arguments.length)) + return void 0 === n[t] ? null : n[t]; + n[t] = i; + } else { + if (1 === arguments.length) + return void 0 === this.options[t] ? null : this.options[t]; + o[t] = i; + } + return this._setOptions(o), this; + }, + _setOptions: function (e) { + var t; + for (t in e) this._setOption(t, e[t]); + return this; + }, + _setOption: function (e, t) { + return ( + (this.options[e] = t), + 'disabled' === e && + (this.widget().toggleClass(this.widgetFullName + '-disabled', !!t), + t && + (this.hoverable.removeClass('ui-state-hover'), + this.focusable.removeClass('ui-state-focus'))), + this + ); + }, + enable: function () { + return this._setOptions({ disabled: !1 }); + }, + disable: function () { + return this._setOptions({ disabled: !0 }); + }, + _on: function (t, i, s) { + var n, + a = this; + 'boolean' != typeof t && ((s = i), (i = t), (t = !1)), + s + ? ((i = n = e(i)), (this.bindings = this.bindings.add(i))) + : ((s = i), (i = this.element), (n = this.widget())), + e.each(s, function (s, o) { + function r() { + return t || + (a.options.disabled !== !0 && + !e(this).hasClass('ui-state-disabled')) + ? ('string' == typeof o ? a[o] : o).apply(a, arguments) + : void 0; + } + 'string' != typeof o && + (r.guid = o.guid = o.guid || r.guid || e.guid++); + var h = s.match(/^([\w:-]*)\s*(.*)$/), + l = h[1] + a.eventNamespace, + u = h[2]; + u ? n.delegate(u, l, r) : i.bind(l, r); + }); + }, + _off: function (e, t) { + (t = + (t || '').split(' ').join(this.eventNamespace + ' ') + + this.eventNamespace), + e.unbind(t).undelegate(t); + }, + _delay: function (e, t) { + function i() { + return ('string' == typeof e ? s[e] : e).apply(s, arguments); + } + var s = this; + return setTimeout(i, t || 0); + }, + _hoverable: function (t) { + (this.hoverable = this.hoverable.add(t)), + this._on(t, { + mouseenter: function (t) { + e(t.currentTarget).addClass('ui-state-hover'); + }, + mouseleave: function (t) { + e(t.currentTarget).removeClass('ui-state-hover'); + } + }); + }, + _focusable: function (t) { + (this.focusable = this.focusable.add(t)), + this._on(t, { + focusin: function (t) { + e(t.currentTarget).addClass('ui-state-focus'); + }, + focusout: function (t) { + e(t.currentTarget).removeClass('ui-state-focus'); + } + }); + }, + _trigger: function (t, i, s) { + var n, + a, + o = this.options[t]; + if ( + ((s = s || {}), + (i = e.Event(i)), + (i.type = ( + t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t + ).toLowerCase()), + (i.target = this.element[0]), + (a = i.originalEvent)) + ) + for (n in a) n in i || (i[n] = a[n]); + return ( + this.element.trigger(i, s), + !( + (e.isFunction(o) && + o.apply(this.element[0], [i].concat(s)) === !1) || + i.isDefaultPrevented() + ) + ); + } + }), + e.each({ show: 'fadeIn', hide: 'fadeOut' }, function (t, i) { + e.Widget.prototype['_' + t] = function (s, n, a) { + 'string' == typeof n && (n = { effect: n }); + var o, + r = n ? (n === !0 || 'number' == typeof n ? i : n.effect || i) : t; + (n = n || {}), + 'number' == typeof n && (n = { duration: n }), + (o = !e.isEmptyObject(n)), + (n.complete = a), + n.delay && s.delay(n.delay), + o && e.effects && e.effects.effect[r] + ? s[t](n) + : r !== t && s[r] + ? s[r](n.duration, n.easing, a) + : s.queue(function (i) { + e(this)[t](), a && a.call(s[0]), i(); + }); + }; + }), + e.widget, + (function () { + function t(e, t, i) { + return [ + parseFloat(e[0]) * (p.test(e[0]) ? t / 100 : 1), + parseFloat(e[1]) * (p.test(e[1]) ? i / 100 : 1) + ]; + } + function i(t, i) { + return parseInt(e.css(t, i), 10) || 0; + } + function s(t) { + var i = t[0]; + return 9 === i.nodeType + ? { + width: t.width(), + height: t.height(), + offset: { top: 0, left: 0 } + } + : e.isWindow(i) + ? { + width: t.width(), + height: t.height(), + offset: { top: t.scrollTop(), left: t.scrollLeft() } + } + : i.preventDefault + ? { width: 0, height: 0, offset: { top: i.pageY, left: i.pageX } } + : { + width: t.outerWidth(), + height: t.outerHeight(), + offset: t.offset() + }; + } + e.ui = e.ui || {}; + var n, + a, + o = Math.max, + r = Math.abs, + h = Math.round, + l = /left|center|right/, + u = /top|center|bottom/, + d = /[\+\-]\d+(\.[\d]+)?%?/, + c = /^\w+/, + p = /%$/, + f = e.fn.position; + (e.position = { + scrollbarWidth: function () { + if (void 0 !== n) return n; + var t, + i, + s = e( + "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" + ), + a = s.children()[0]; + return ( + e('body').append(s), + (t = a.offsetWidth), + s.css('overflow', 'scroll'), + (i = a.offsetWidth), + t === i && (i = s[0].clientWidth), + s.remove(), + (n = t - i) + ); + }, + getScrollInfo: function (t) { + var i = t.isWindow || t.isDocument ? '' : t.element.css('overflow-x'), + s = t.isWindow || t.isDocument ? '' : t.element.css('overflow-y'), + n = + 'scroll' === i || + ('auto' === i && t.width < t.element[0].scrollWidth), + a = + 'scroll' === s || + ('auto' === s && t.height < t.element[0].scrollHeight); + return { + width: a ? e.position.scrollbarWidth() : 0, + height: n ? e.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function (t) { + var i = e(t || window), + s = e.isWindow(i[0]), + n = !!i[0] && 9 === i[0].nodeType; + return { + element: i, + isWindow: s, + isDocument: n, + offset: i.offset() || { left: 0, top: 0 }, + scrollLeft: i.scrollLeft(), + scrollTop: i.scrollTop(), + width: s || n ? i.width() : i.outerWidth(), + height: s || n ? i.height() : i.outerHeight() + }; + } + }), + (e.fn.position = function (n) { + if (!n || !n.of) return f.apply(this, arguments); + n = e.extend({}, n); + var p, + m, + g, + v, + y, + b, + _ = e(n.of), + x = e.position.getWithinInfo(n.within), + w = e.position.getScrollInfo(x), + k = (n.collision || 'flip').split(' '), + T = {}; + return ( + (b = s(_)), + _[0].preventDefault && (n.at = 'left top'), + (m = b.width), + (g = b.height), + (v = b.offset), + (y = e.extend({}, v)), + e.each(['my', 'at'], function () { + var e, + t, + i = (n[this] || '').split(' '); + 1 === i.length && + (i = l.test(i[0]) + ? i.concat(['center']) + : u.test(i[0]) + ? ['center'].concat(i) + : ['center', 'center']), + (i[0] = l.test(i[0]) ? i[0] : 'center'), + (i[1] = u.test(i[1]) ? i[1] : 'center'), + (e = d.exec(i[0])), + (t = d.exec(i[1])), + (T[this] = [e ? e[0] : 0, t ? t[0] : 0]), + (n[this] = [c.exec(i[0])[0], c.exec(i[1])[0]]); + }), + 1 === k.length && (k[1] = k[0]), + 'right' === n.at[0] + ? (y.left += m) + : 'center' === n.at[0] && (y.left += m / 2), + 'bottom' === n.at[1] + ? (y.top += g) + : 'center' === n.at[1] && (y.top += g / 2), + (p = t(T.at, m, g)), + (y.left += p[0]), + (y.top += p[1]), + this.each(function () { + var s, + l, + u = e(this), + d = u.outerWidth(), + c = u.outerHeight(), + f = i(this, 'marginLeft'), + b = i(this, 'marginTop'), + D = d + f + i(this, 'marginRight') + w.width, + S = c + b + i(this, 'marginBottom') + w.height, + N = e.extend({}, y), + M = t(T.my, u.outerWidth(), u.outerHeight()); + 'right' === n.my[0] + ? (N.left -= d) + : 'center' === n.my[0] && (N.left -= d / 2), + 'bottom' === n.my[1] + ? (N.top -= c) + : 'center' === n.my[1] && (N.top -= c / 2), + (N.left += M[0]), + (N.top += M[1]), + a || ((N.left = h(N.left)), (N.top = h(N.top))), + (s = { marginLeft: f, marginTop: b }), + e.each(['left', 'top'], function (t, i) { + e.ui.position[k[t]] && + e.ui.position[k[t]][i](N, { + targetWidth: m, + targetHeight: g, + elemWidth: d, + elemHeight: c, + collisionPosition: s, + collisionWidth: D, + collisionHeight: S, + offset: [p[0] + M[0], p[1] + M[1]], + my: n.my, + at: n.at, + within: x, + elem: u + }); + }), + n.using && + (l = function (e) { + var t = v.left - N.left, + i = t + m - d, + s = v.top - N.top, + a = s + g - c, + h = { + target: { + element: _, + left: v.left, + top: v.top, + width: m, + height: g + }, + element: { + element: u, + left: N.left, + top: N.top, + width: d, + height: c + }, + horizontal: 0 > i ? 'left' : t > 0 ? 'right' : 'center', + vertical: 0 > a ? 'top' : s > 0 ? 'bottom' : 'middle' + }; + d > m && m > r(t + i) && (h.horizontal = 'center'), + c > g && g > r(s + a) && (h.vertical = 'middle'), + (h.important = + o(r(t), r(i)) > o(r(s), r(a)) + ? 'horizontal' + : 'vertical'), + n.using.call(this, e, h); + }), + u.offset(e.extend(N, { using: l })); + }) + ); + }), + (e.ui.position = { + fit: { + left: function (e, t) { + var i, + s = t.within, + n = s.isWindow ? s.scrollLeft : s.offset.left, + a = s.width, + r = e.left - t.collisionPosition.marginLeft, + h = n - r, + l = r + t.collisionWidth - a - n; + t.collisionWidth > a + ? h > 0 && 0 >= l + ? ((i = e.left + h + t.collisionWidth - a - n), + (e.left += h - i)) + : (e.left = + l > 0 && 0 >= h + ? n + : h > l + ? n + a - t.collisionWidth + : n) + : h > 0 + ? (e.left += h) + : l > 0 + ? (e.left -= l) + : (e.left = o(e.left - r, e.left)); + }, + top: function (e, t) { + var i, + s = t.within, + n = s.isWindow ? s.scrollTop : s.offset.top, + a = t.within.height, + r = e.top - t.collisionPosition.marginTop, + h = n - r, + l = r + t.collisionHeight - a - n; + t.collisionHeight > a + ? h > 0 && 0 >= l + ? ((i = e.top + h + t.collisionHeight - a - n), + (e.top += h - i)) + : (e.top = + l > 0 && 0 >= h + ? n + : h > l + ? n + a - t.collisionHeight + : n) + : h > 0 + ? (e.top += h) + : l > 0 + ? (e.top -= l) + : (e.top = o(e.top - r, e.top)); + } + }, + flip: { + left: function (e, t) { + var i, + s, + n = t.within, + a = n.offset.left + n.scrollLeft, + o = n.width, + h = n.isWindow ? n.scrollLeft : n.offset.left, + l = e.left - t.collisionPosition.marginLeft, + u = l - h, + d = l + t.collisionWidth - o - h, + c = + 'left' === t.my[0] + ? -t.elemWidth + : 'right' === t.my[0] + ? t.elemWidth + : 0, + p = + 'left' === t.at[0] + ? t.targetWidth + : 'right' === t.at[0] + ? -t.targetWidth + : 0, + f = -2 * t.offset[0]; + 0 > u + ? ((i = e.left + c + p + f + t.collisionWidth - o - a), + (0 > i || r(u) > i) && (e.left += c + p + f)) + : d > 0 && + ((s = + e.left - t.collisionPosition.marginLeft + c + p + f - h), + (s > 0 || d > r(s)) && (e.left += c + p + f)); + }, + top: function (e, t) { + var i, + s, + n = t.within, + a = n.offset.top + n.scrollTop, + o = n.height, + h = n.isWindow ? n.scrollTop : n.offset.top, + l = e.top - t.collisionPosition.marginTop, + u = l - h, + d = l + t.collisionHeight - o - h, + c = 'top' === t.my[1], + p = c ? -t.elemHeight : 'bottom' === t.my[1] ? t.elemHeight : 0, + f = + 'top' === t.at[1] + ? t.targetHeight + : 'bottom' === t.at[1] + ? -t.targetHeight + : 0, + m = -2 * t.offset[1]; + 0 > u + ? ((s = e.top + p + f + m + t.collisionHeight - o - a), + e.top + p + f + m > u && + (0 > s || r(u) > s) && + (e.top += p + f + m)) + : d > 0 && + ((i = e.top - t.collisionPosition.marginTop + p + f + m - h), + e.top + p + f + m > d && + (i > 0 || d > r(i)) && + (e.top += p + f + m)); + } + }, + flipfit: { + left: function () { + e.ui.position.flip.left.apply(this, arguments), + e.ui.position.fit.left.apply(this, arguments); + }, + top: function () { + e.ui.position.flip.top.apply(this, arguments), + e.ui.position.fit.top.apply(this, arguments); + } + } + }), + (function () { + var t, + i, + s, + n, + o, + r = document.getElementsByTagName('body')[0], + h = document.createElement('div'); + (t = document.createElement(r ? 'div' : 'body')), + (s = { + visibility: 'hidden', + width: 0, + height: 0, + border: 0, + margin: 0, + background: 'none' + }), + r && + e.extend(s, { + position: 'absolute', + left: '-1000px', + top: '-1000px' + }); + for (o in s) t.style[o] = s[o]; + t.appendChild(h), + (i = r || document.documentElement), + i.insertBefore(t, i.firstChild), + (h.style.cssText = 'position: absolute; left: 10.7432222px;'), + (n = e(h).offset().left), + (a = n > 10 && 11 > n), + (t.innerHTML = ''), + i.removeChild(t); + })(); + })(), + e.ui.position, + e.widget('ui.menu', { + version: '1.11.1', + defaultElement: '<ul>', + delay: 300, + options: { + icons: { submenu: 'ui-icon-carat-1-e' }, + items: '> *', + menus: 'ul', + position: { my: 'left-1 top', at: 'right top' }, + role: 'menu', + blur: null, + focus: null, + select: null + }, + _create: function () { + (this.activeMenu = this.element), + (this.mouseHandled = !1), + this.element + .uniqueId() + .addClass('ui-menu ui-widget ui-widget-content') + .toggleClass( + 'ui-menu-icons', + !!this.element.find('.ui-icon').length + ) + .attr({ role: this.options.role, tabIndex: 0 }), + this.options.disabled && + this.element + .addClass('ui-state-disabled') + .attr('aria-disabled', 'true'), + this._on({ + 'mousedown .ui-menu-item': function (e) { + e.preventDefault(); + }, + 'click .ui-menu-item': function (t) { + var i = e(t.target); + !this.mouseHandled && + i.not('.ui-state-disabled').length && + (this.select(t), + t.isPropagationStopped() || (this.mouseHandled = !0), + i.has('.ui-menu').length + ? this.expand(t) + : !this.element.is(':focus') && + e(this.document[0].activeElement).closest('.ui-menu') + .length && + (this.element.trigger('focus', [!0]), + this.active && + 1 === this.active.parents('.ui-menu').length && + clearTimeout(this.timer))); + }, + 'mouseenter .ui-menu-item': function (t) { + var i = e(t.currentTarget); + i.siblings('.ui-state-active').removeClass('ui-state-active'), + this.focus(t, i); + }, + mouseleave: 'collapseAll', + 'mouseleave .ui-menu': 'collapseAll', + focus: function (e, t) { + var i = + this.active || this.element.find(this.options.items).eq(0); + t || this.focus(e, i); + }, + blur: function (t) { + this._delay(function () { + e.contains(this.element[0], this.document[0].activeElement) || + this.collapseAll(t); + }); + }, + keydown: '_keydown' + }), + this.refresh(), + this._on(this.document, { + click: function (e) { + this._closeOnDocumentClick(e) && this.collapseAll(e), + (this.mouseHandled = !1); + } + }); + }, + _destroy: function () { + this.element + .removeAttr('aria-activedescendant') + .find('.ui-menu') + .addBack() + .removeClass( + 'ui-menu ui-widget ui-widget-content ui-menu-icons ui-front' + ) + .removeAttr('role') + .removeAttr('tabIndex') + .removeAttr('aria-labelledby') + .removeAttr('aria-expanded') + .removeAttr('aria-hidden') + .removeAttr('aria-disabled') + .removeUniqueId() + .show(), + this.element + .find('.ui-menu-item') + .removeClass('ui-menu-item') + .removeAttr('role') + .removeAttr('aria-disabled') + .removeUniqueId() + .removeClass('ui-state-hover') + .removeAttr('tabIndex') + .removeAttr('role') + .removeAttr('aria-haspopup') + .children() + .each(function () { + var t = e(this); + t.data('ui-menu-submenu-carat') && t.remove(); + }), + this.element + .find('.ui-menu-divider') + .removeClass('ui-menu-divider ui-widget-content'); + }, + _keydown: function (t) { + function i(e) { + return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&'); + } + var s, + n, + a, + o, + r, + h = !0; + switch (t.keyCode) { + case e.ui.keyCode.PAGE_UP: + this.previousPage(t); + break; + case e.ui.keyCode.PAGE_DOWN: + this.nextPage(t); + break; + case e.ui.keyCode.HOME: + this._move('first', 'first', t); + break; + case e.ui.keyCode.END: + this._move('last', 'last', t); + break; + case e.ui.keyCode.UP: + this.previous(t); + break; + case e.ui.keyCode.DOWN: + this.next(t); + break; + case e.ui.keyCode.LEFT: + this.collapse(t); + break; + case e.ui.keyCode.RIGHT: + this.active && + !this.active.is('.ui-state-disabled') && + this.expand(t); + break; + case e.ui.keyCode.ENTER: + case e.ui.keyCode.SPACE: + this._activate(t); + break; + case e.ui.keyCode.ESCAPE: + this.collapse(t); + break; + default: + (h = !1), + (n = this.previousFilter || ''), + (a = String.fromCharCode(t.keyCode)), + (o = !1), + clearTimeout(this.filterTimer), + a === n ? (o = !0) : (a = n + a), + (r = RegExp('^' + i(a), 'i')), + (s = this.activeMenu.find(this.options.items).filter(function () { + return r.test(e(this).text()); + })), + (s = + o && -1 !== s.index(this.active.next()) + ? this.active.nextAll('.ui-menu-item') + : s), + s.length || + ((a = String.fromCharCode(t.keyCode)), + (r = RegExp('^' + i(a), 'i')), + (s = this.activeMenu + .find(this.options.items) + .filter(function () { + return r.test(e(this).text()); + }))), + s.length + ? (this.focus(t, s), + s.length > 1 + ? ((this.previousFilter = a), + (this.filterTimer = this._delay(function () { + delete this.previousFilter; + }, 1e3))) + : delete this.previousFilter) + : delete this.previousFilter; + } + h && t.preventDefault(); + }, + _activate: function (e) { + this.active.is('.ui-state-disabled') || + (this.active.is("[aria-haspopup='true']") + ? this.expand(e) + : this.select(e)); + }, + refresh: function () { + var t, + i, + s = this, + n = this.options.icons.submenu, + a = this.element.find(this.options.menus); + this.element.toggleClass( + 'ui-menu-icons', + !!this.element.find('.ui-icon').length + ), + a + .filter(':not(.ui-menu)') + .addClass('ui-menu ui-widget ui-widget-content ui-front') + .hide() + .attr({ + role: this.options.role, + 'aria-hidden': 'true', + 'aria-expanded': 'false' + }) + .each(function () { + var t = e(this), + i = t.parent(), + s = e('<span>') + .addClass('ui-menu-icon ui-icon ' + n) + .data('ui-menu-submenu-carat', !0); + i.attr('aria-haspopup', 'true').prepend(s), + t.attr('aria-labelledby', i.attr('id')); + }), + (t = a.add(this.element)), + (i = t.find(this.options.items)), + i.not('.ui-menu-item').each(function () { + var t = e(this); + s._isDivider(t) && t.addClass('ui-widget-content ui-menu-divider'); + }), + i + .not('.ui-menu-item, .ui-menu-divider') + .addClass('ui-menu-item') + .uniqueId() + .attr({ tabIndex: -1, role: this._itemRole() }), + i.filter('.ui-state-disabled').attr('aria-disabled', 'true'), + this.active && + !e.contains(this.element[0], this.active[0]) && + this.blur(); + }, + _itemRole: function () { + return { menu: 'menuitem', listbox: 'option' }[this.options.role]; + }, + _setOption: function (e, t) { + 'icons' === e && + this.element + .find('.ui-menu-icon') + .removeClass(this.options.icons.submenu) + .addClass(t.submenu), + 'disabled' === e && + this.element + .toggleClass('ui-state-disabled', !!t) + .attr('aria-disabled', t), + this._super(e, t); + }, + focus: function (e, t) { + var i, s; + this.blur(e, e && 'focus' === e.type), + this._scrollIntoView(t), + (this.active = t.first()), + (s = this.active + .addClass('ui-state-focus') + .removeClass('ui-state-active')), + this.options.role && + this.element.attr('aria-activedescendant', s.attr('id')), + this.active + .parent() + .closest('.ui-menu-item') + .addClass('ui-state-active'), + e && 'keydown' === e.type + ? this._close() + : (this.timer = this._delay(function () { + this._close(); + }, this.delay)), + (i = t.children('.ui-menu')), + i.length && e && /^mouse/.test(e.type) && this._startOpening(i), + (this.activeMenu = t.parent()), + this._trigger('focus', e, { item: t }); + }, + _scrollIntoView: function (t) { + var i, s, n, a, o, r; + this._hasScroll() && + ((i = parseFloat(e.css(this.activeMenu[0], 'borderTopWidth')) || 0), + (s = parseFloat(e.css(this.activeMenu[0], 'paddingTop')) || 0), + (n = t.offset().top - this.activeMenu.offset().top - i - s), + (a = this.activeMenu.scrollTop()), + (o = this.activeMenu.height()), + (r = t.outerHeight()), + 0 > n + ? this.activeMenu.scrollTop(a + n) + : n + r > o && this.activeMenu.scrollTop(a + n - o + r)); + }, + blur: function (e, t) { + t || clearTimeout(this.timer), + this.active && + (this.active.removeClass('ui-state-focus'), + (this.active = null), + this._trigger('blur', e, { item: this.active })); + }, + _startOpening: function (e) { + clearTimeout(this.timer), + 'true' === e.attr('aria-hidden') && + (this.timer = this._delay(function () { + this._close(), this._open(e); + }, this.delay)); + }, + _open: function (t) { + var i = e.extend({ of: this.active }, this.options.position); + clearTimeout(this.timer), + this.element + .find('.ui-menu') + .not(t.parents('.ui-menu')) + .hide() + .attr('aria-hidden', 'true'), + t + .show() + .removeAttr('aria-hidden') + .attr('aria-expanded', 'true') + .position(i); + }, + collapseAll: function (t, i) { + clearTimeout(this.timer), + (this.timer = this._delay(function () { + var s = i + ? this.element + : e(t && t.target).closest(this.element.find('.ui-menu')); + s.length || (s = this.element), + this._close(s), + this.blur(t), + (this.activeMenu = s); + }, this.delay)); + }, + _close: function (e) { + e || (e = this.active ? this.active.parent() : this.element), + e + .find('.ui-menu') + .hide() + .attr('aria-hidden', 'true') + .attr('aria-expanded', 'false') + .end() + .find('.ui-state-active') + .not('.ui-state-focus') + .removeClass('ui-state-active'); + }, + _closeOnDocumentClick: function (t) { + return !e(t.target).closest('.ui-menu').length; + }, + _isDivider: function (e) { + return !/[^\-\u2014\u2013\s]/.test(e.text()); + }, + collapse: function (e) { + var t = + this.active && + this.active.parent().closest('.ui-menu-item', this.element); + t && t.length && (this._close(), this.focus(e, t)); + }, + expand: function (e) { + var t = + this.active && + this.active.children('.ui-menu ').find(this.options.items).first(); + t && + t.length && + (this._open(t.parent()), + this._delay(function () { + this.focus(e, t); + })); + }, + next: function (e) { + this._move('next', 'first', e); + }, + previous: function (e) { + this._move('prev', 'last', e); + }, + isFirstItem: function () { + return this.active && !this.active.prevAll('.ui-menu-item').length; + }, + isLastItem: function () { + return this.active && !this.active.nextAll('.ui-menu-item').length; + }, + _move: function (e, t, i) { + var s; + this.active && + (s = + 'first' === e || 'last' === e + ? this.active['first' === e ? 'prevAll' : 'nextAll']( + '.ui-menu-item' + ).eq(-1) + : this.active[e + 'All']('.ui-menu-item').eq(0)), + (s && s.length && this.active) || + (s = this.activeMenu.find(this.options.items)[t]()), + this.focus(i, s); + }, + nextPage: function (t) { + var i, s, n; + return this.active + ? (this.isLastItem() || + (this._hasScroll() + ? ((s = this.active.offset().top), + (n = this.element.height()), + this.active.nextAll('.ui-menu-item').each(function () { + return (i = e(this)), 0 > i.offset().top - s - n; + }), + this.focus(t, i)) + : this.focus( + t, + this.activeMenu + .find(this.options.items) + [this.active ? 'last' : 'first']() + )), + void 0) + : (this.next(t), void 0); + }, + previousPage: function (t) { + var i, s, n; + return this.active + ? (this.isFirstItem() || + (this._hasScroll() + ? ((s = this.active.offset().top), + (n = this.element.height()), + this.active.prevAll('.ui-menu-item').each(function () { + return (i = e(this)), i.offset().top - s + n > 0; + }), + this.focus(t, i)) + : this.focus( + t, + this.activeMenu.find(this.options.items).first() + )), + void 0) + : (this.next(t), void 0); + }, + _hasScroll: function () { + return this.element.outerHeight() < this.element.prop('scrollHeight'); + }, + select: function (t) { + this.active = this.active || e(t.target).closest('.ui-menu-item'); + var i = { item: this.active }; + this.active.has('.ui-menu').length || this.collapseAll(t, !0), + this._trigger('select', t, i); + } + }), + e.widget('ui.autocomplete', { + version: '1.11.1', + defaultElement: '<input>', + options: { + appendTo: null, + autoFocus: !1, + delay: 300, + minLength: 1, + position: { my: 'left top', at: 'left bottom', collision: 'none' }, + source: null, + change: null, + close: null, + focus: null, + open: null, + response: null, + search: null, + select: null + }, + requestIndex: 0, + pending: 0, + _create: function () { + var t, + i, + s, + n = this.element[0].nodeName.toLowerCase(), + a = 'textarea' === n, + o = 'input' === n; + (this.isMultiLine = a + ? !0 + : o + ? !1 + : this.element.prop('isContentEditable')), + (this.valueMethod = this.element[a || o ? 'val' : 'text']), + (this.isNewMenu = !0), + this.element + .addClass('ui-autocomplete-input') + .attr('autocomplete', 'off'), + this._on(this.element, { + keydown: function (n) { + if (this.element.prop('readOnly')) + return (t = !0), (s = !0), (i = !0), void 0; + (t = !1), (s = !1), (i = !1); + var a = e.ui.keyCode; + switch (n.keyCode) { + case a.PAGE_UP: + (t = !0), this._move('previousPage', n); + break; + case a.PAGE_DOWN: + (t = !0), this._move('nextPage', n); + break; + case a.UP: + (t = !0), this._keyEvent('previous', n); + break; + case a.DOWN: + (t = !0), this._keyEvent('next', n); + break; + case a.ENTER: + this.menu.active && + ((t = !0), n.preventDefault(), this.menu.select(n)); + break; + case a.TAB: + this.menu.active && this.menu.select(n); + break; + case a.ESCAPE: + this.menu.element.is(':visible') && + (this.isMultiLine || this._value(this.term), + this.close(n), + n.preventDefault()); + break; + default: + (i = !0), this._searchTimeout(n); + } + }, + keypress: function (s) { + if (t) + return ( + (t = !1), + (!this.isMultiLine || this.menu.element.is(':visible')) && + s.preventDefault(), + void 0 + ); + if (!i) { + var n = e.ui.keyCode; + switch (s.keyCode) { + case n.PAGE_UP: + this._move('previousPage', s); + break; + case n.PAGE_DOWN: + this._move('nextPage', s); + break; + case n.UP: + this._keyEvent('previous', s); + break; + case n.DOWN: + this._keyEvent('next', s); + } + } + }, + input: function (e) { + return s + ? ((s = !1), e.preventDefault(), void 0) + : (this._searchTimeout(e), void 0); + }, + focus: function () { + (this.selectedItem = null), (this.previous = this._value()); + }, + blur: function (e) { + return this.cancelBlur + ? (delete this.cancelBlur, void 0) + : (clearTimeout(this.searching), + this.close(e), + this._change(e), + void 0); + } + }), + this._initSource(), + (this.menu = e('<ul>') + .addClass('ui-autocomplete ui-front') + .appendTo(this._appendTo()) + .menu({ role: null }) + .hide() + .menu('instance')), + this._on(this.menu.element, { + mousedown: function (t) { + t.preventDefault(), + (this.cancelBlur = !0), + this._delay(function () { + delete this.cancelBlur; + }); + var i = this.menu.element[0]; + e(t.target).closest('.ui-menu-item').length || + this._delay(function () { + var t = this; + this.document.one('mousedown', function (s) { + s.target === t.element[0] || + s.target === i || + e.contains(i, s.target) || + t.close(); + }); + }); + }, + menufocus: function (t, i) { + var s, n; + return this.isNewMenu && + ((this.isNewMenu = !1), + t.originalEvent && /^mouse/.test(t.originalEvent.type)) + ? (this.menu.blur(), + this.document.one('mousemove', function () { + e(t.target).trigger(t.originalEvent); + }), + void 0) + : ((n = i.item.data('ui-autocomplete-item')), + !1 !== this._trigger('focus', t, { item: n }) && + t.originalEvent && + /^key/.test(t.originalEvent.type) && + this._value(n.value), + (s = i.item.attr('aria-label') || n.value), + s && + e.trim(s).length && + (this.liveRegion.children().hide(), + e('<div>').text(s).appendTo(this.liveRegion)), + void 0); + }, + menuselect: function (e, t) { + var i = t.item.data('ui-autocomplete-item'), + s = this.previous; + this.element[0] !== this.document[0].activeElement && + (this.element.focus(), + (this.previous = s), + this._delay(function () { + (this.previous = s), (this.selectedItem = i); + })), + !1 !== this._trigger('select', e, { item: i }) && + this._value(i.value), + (this.term = this._value()), + this.close(e), + (this.selectedItem = i); + } + }), + (this.liveRegion = e('<span>', { + role: 'status', + 'aria-live': 'assertive', + 'aria-relevant': 'additions' + }) + .addClass('ui-helper-hidden-accessible') + .appendTo(this.document[0].body)), + this._on(this.window, { + beforeunload: function () { + this.element.removeAttr('autocomplete'); + } + }); + }, + _destroy: function () { + clearTimeout(this.searching), + this.element + .removeClass('ui-autocomplete-input') + .removeAttr('autocomplete'), + this.menu.element.remove(), + this.liveRegion.remove(); + }, + _setOption: function (e, t) { + this._super(e, t), + 'source' === e && this._initSource(), + 'appendTo' === e && this.menu.element.appendTo(this._appendTo()), + 'disabled' === e && t && this.xhr && this.xhr.abort(); + }, + _appendTo: function () { + var t = this.options.appendTo; + return ( + t && + (t = t.jquery || t.nodeType ? e(t) : this.document.find(t).eq(0)), + (t && t[0]) || (t = this.element.closest('.ui-front')), + t.length || (t = this.document[0].body), + t + ); + }, + _initSource: function () { + var t, + i, + s = this; + e.isArray(this.options.source) + ? ((t = this.options.source), + (this.source = function (i, s) { + s(e.ui.autocomplete.filter(t, i.term)); + })) + : 'string' == typeof this.options.source + ? ((i = this.options.source), + (this.source = function (t, n) { + s.xhr && s.xhr.abort(), + (s.xhr = e.ajax({ + url: i, + data: t, + dataType: 'json', + success: function (e) { + n(e); + }, + error: function () { + n([]); + } + })); + })) + : (this.source = this.options.source); + }, + _searchTimeout: function (e) { + clearTimeout(this.searching), + (this.searching = this._delay(function () { + var t = this.term === this._value(), + i = this.menu.element.is(':visible'), + s = e.altKey || e.ctrlKey || e.metaKey || e.shiftKey; + (!t || (t && !i && !s)) && + ((this.selectedItem = null), this.search(null, e)); + }, this.options.delay)); + }, + search: function (e, t) { + return ( + (e = null != e ? e : this._value()), + (this.term = this._value()), + e.length < this.options.minLength + ? this.close(t) + : this._trigger('search', t) !== !1 + ? this._search(e) + : void 0 + ); + }, + _search: function (e) { + this.pending++, + this.element.addClass('ui-autocomplete-loading'), + (this.cancelSearch = !1), + this.source({ term: e }, this._response()); + }, + _response: function () { + var t = ++this.requestIndex; + return e.proxy(function (e) { + t === this.requestIndex && this.__response(e), + this.pending--, + this.pending || this.element.removeClass('ui-autocomplete-loading'); + }, this); + }, + __response: function (e) { + e && (e = this._normalize(e)), + this._trigger('response', null, { content: e }), + !this.options.disabled && e && e.length && !this.cancelSearch + ? (this._suggest(e), this._trigger('open')) + : this._close(); + }, + close: function (e) { + (this.cancelSearch = !0), this._close(e); + }, + _close: function (e) { + this.menu.element.is(':visible') && + (this.menu.element.hide(), + this.menu.blur(), + (this.isNewMenu = !0), + this._trigger('close', e)); + }, + _change: function (e) { + this.previous !== this._value() && + this._trigger('change', e, { item: this.selectedItem }); + }, + _normalize: function (t) { + return t.length && t[0].label && t[0].value + ? t + : e.map(t, function (t) { + return 'string' == typeof t + ? { label: t, value: t } + : e.extend({}, t, { + label: t.label || t.value, + value: t.value || t.label + }); + }); + }, + _suggest: function (t) { + var i = this.menu.element.empty(); + this._renderMenu(i, t), + (this.isNewMenu = !0), + this.menu.refresh(), + i.show(), + this._resizeMenu(), + i.position(e.extend({ of: this.element }, this.options.position)), + this.options.autoFocus && this.menu.next(); + }, + _resizeMenu: function () { + var e = this.menu.element; + e.outerWidth( + Math.max(e.width('').outerWidth() + 1, this.element.outerWidth()) + ); + }, + _renderMenu: function (t, i) { + var s = this; + e.each(i, function (e, i) { + s._renderItemData(t, i); + }); + }, + _renderItemData: function (e, t) { + return this._renderItem(e, t).data('ui-autocomplete-item', t); + }, + _renderItem: function (t, i) { + return e('<li>').text(i.label).appendTo(t); + }, + _move: function (e, t) { + return this.menu.element.is(':visible') + ? (this.menu.isFirstItem() && /^previous/.test(e)) || + (this.menu.isLastItem() && /^next/.test(e)) + ? (this.isMultiLine || this._value(this.term), + this.menu.blur(), + void 0) + : (this.menu[e](t), void 0) + : (this.search(null, t), void 0); + }, + widget: function () { + return this.menu.element; + }, + _value: function () { + return this.valueMethod.apply(this.element, arguments); + }, + _keyEvent: function (e, t) { + (!this.isMultiLine || this.menu.element.is(':visible')) && + (this._move(e, t), t.preventDefault()); + } + }), + e.extend(e.ui.autocomplete, { + escapeRegex: function (e) { + return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&'); + }, + filter: function (t, i) { + var s = RegExp(e.ui.autocomplete.escapeRegex(i), 'i'); + return e.grep(t, function (e) { + return s.test(e.label || e.value || e); + }); + } + }), + e.widget('ui.autocomplete', e.ui.autocomplete, { + options: { + messages: { + noResults: 'No search results.', + results: function (e) { + return ( + e + + (e > 1 ? ' results are' : ' result is') + + ' available, use up and down arrow keys to navigate.' + ); + } + } + }, + __response: function (t) { + var i; + this._superApply(arguments), + this.options.disabled || + this.cancelSearch || + ((i = + t && t.length + ? this.options.messages.results(t.length) + : this.options.messages.noResults), + this.liveRegion.children().hide(), + e('<div>').text(i).appendTo(this.liveRegion)); + } + }), + e.ui.autocomplete; +}); diff --git a/docs/src/css/less/jquery-ui/jquery-ui.min.less b/docs/src/css/less/jquery-ui/jquery-ui.min.less index 682dc5ea..346bc508 100644 --- a/docs/src/css/less/jquery-ui/jquery-ui.min.less +++ b/docs/src/css/less/jquery-ui/jquery-ui.min.less @@ -4,4 +4,1504 @@ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ -.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_228ef1_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffd27a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px} \ No newline at end of file +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ''; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter: Alpha(Opacity=0); +} +.ui-front { + z-index: 100; +} +.ui-state-disabled { + cursor: default !important; +} +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: 0.5em 0.5em 0.5em 0.7em; + min-height: 0; + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: 0.5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: 0.1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +.ui-button-icon-only { + width: 2.2em; +} +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: 0.4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: 0.4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 0.4em 1em 0.4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: 0.4em 2.1em 0.4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +input.ui-button { + padding: 0.4em 1em; +} +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: 0.5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: 0.5em; +} +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -0.3em; +} +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: 0.2em 0.2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: 0.2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: 0.9em; + border-collapse: collapse; + margin: 0 0 0.4em; +} +.ui-datepicker th { + padding: 0.7em 0.3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: 0.2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: 0.7em 0 0 0; + padding: 0 0.2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: 0.5em 0.2em 0.4em; + cursor: pointer; + padding: 0.2em 0.6em 0.3em 0.6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto 0.4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: 0.2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: 0.4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: 0.1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: 0.3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: 0.5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: 0.5em; + padding: 0.3em 1em 0.5em 0.4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: 0.5em 0.4em 0.5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px 0.4em; + cursor: pointer; + min-height: 0; + list-style-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: 0.2em; + margin: auto 0; +} +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url('data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=='); + height: 100%; + filter: alpha(opacity=25); + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: 0.7em; + display: block; + border: 0; + background-position: 0 0; +} +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} +.ui-slider-horizontal { + height: 0.8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -0.3em; + margin-left: -0.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} +.ui-slider-vertical { + width: 0.8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -0.3em; + margin-left: 0; + margin-bottom: -0.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: 0.2em 0; + vertical-align: middle; + margin-left: 0.4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: 0.5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} +.ui-spinner .ui-icon-triangle-1-s { + background-position: -65px -16px; +} +.ui-tabs { + position: relative; + padding: 0.2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: 0.2em 0.2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px 0.2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: 0.5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} +.ui-widget { + font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #ddd; + background: #eee url('images/ui-bg_highlight-soft_100_eeeeee_1x100.png') 50% + top repeat-x; + color: #333; +} +.ui-widget-content a { + color: #333; +} +.ui-widget-header { + border: 1px solid #e78f08; + background: #f6a828 url('images/ui-bg_gloss-wave_35_f6a828_500x100.png') 50% + 50% repeat-x; + color: #fff; + font-weight: bold; +} +.ui-widget-header a { + color: #fff; +} +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #ccc; + background: #f6f6f6 url('images/ui-bg_glass_100_f6f6f6_1x400.png') 50% 50% + repeat-x; + font-weight: bold; + color: #1c94c4; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #1c94c4; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #fbcb09; + background: #fdf5ce url('images/ui-bg_glass_100_fdf5ce_1x400.png') 50% 50% + repeat-x; + font-weight: bold; + color: #c77405; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #c77405; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #fbd850; + background: #fff url('images/ui-bg_glass_65_ffffff_1x400.png') 50% 50% + repeat-x; + font-weight: bold; + color: #eb8f00; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #eb8f00; + text-decoration: none; +} +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fed22f; + background: #ffe45c url('images/ui-bg_highlight-soft_75_ffe45c_1x100.png') 50% + top repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #b81900 url('images/ui-bg_diagonals-thick_18_b81900_40x40.png') + 50% 50% repeat; + color: #fff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #fff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #fff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: 0.7; + filter: Alpha(Opacity=70); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: 0.35; + filter: Alpha(Opacity=35); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter: Alpha(Opacity=35); +} +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url('images/ui-icons_222222_256x240.png'); +} +.ui-widget-header .ui-icon { + background-image: url('images/ui-icons_ffffff_256x240.png'); +} +.ui-state-default .ui-icon { + background-image: url('images/ui-icons_ef8c08_256x240.png'); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url('images/ui-icons_ef8c08_256x240.png'); +} +.ui-state-active .ui-icon { + background-image: url('images/ui-icons_ef8c08_256x240.png'); +} +.ui-state-highlight .ui-icon { + background-image: url('images/ui-icons_228ef1_256x240.png'); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url('images/ui-icons_ffd27a_256x240.png'); +} +.ui-icon-blank { + background-position: 16px 16px; +} +.ui-icon-carat-1-n { + background-position: 0 0; +} +.ui-icon-carat-1-ne { + background-position: -16px 0; +} +.ui-icon-carat-1-e { + background-position: -32px 0; +} +.ui-icon-carat-1-se { + background-position: -48px 0; +} +.ui-icon-carat-1-s { + background-position: -64px 0; +} +.ui-icon-carat-1-sw { + background-position: -80px 0; +} +.ui-icon-carat-1-w { + background-position: -96px 0; +} +.ui-icon-carat-1-nw { + background-position: -112px 0; +} +.ui-icon-carat-2-n-s { + background-position: -128px 0; +} +.ui-icon-carat-2-e-w { + background-position: -144px 0; +} +.ui-icon-triangle-1-n { + background-position: 0 -16px; +} +.ui-icon-triangle-1-ne { + background-position: -16px -16px; +} +.ui-icon-triangle-1-e { + background-position: -32px -16px; +} +.ui-icon-triangle-1-se { + background-position: -48px -16px; +} +.ui-icon-triangle-1-s { + background-position: -64px -16px; +} +.ui-icon-triangle-1-sw { + background-position: -80px -16px; +} +.ui-icon-triangle-1-w { + background-position: -96px -16px; +} +.ui-icon-triangle-1-nw { + background-position: -112px -16px; +} +.ui-icon-triangle-2-n-s { + background-position: -128px -16px; +} +.ui-icon-triangle-2-e-w { + background-position: -144px -16px; +} +.ui-icon-arrow-1-n { + background-position: 0 -32px; +} +.ui-icon-arrow-1-ne { + background-position: -16px -32px; +} +.ui-icon-arrow-1-e { + background-position: -32px -32px; +} +.ui-icon-arrow-1-se { + background-position: -48px -32px; +} +.ui-icon-arrow-1-s { + background-position: -64px -32px; +} +.ui-icon-arrow-1-sw { + background-position: -80px -32px; +} +.ui-icon-arrow-1-w { + background-position: -96px -32px; +} +.ui-icon-arrow-1-nw { + background-position: -112px -32px; +} +.ui-icon-arrow-2-n-s { + background-position: -128px -32px; +} +.ui-icon-arrow-2-ne-sw { + background-position: -144px -32px; +} +.ui-icon-arrow-2-e-w { + background-position: -160px -32px; +} +.ui-icon-arrow-2-se-nw { + background-position: -176px -32px; +} +.ui-icon-arrowstop-1-n { + background-position: -192px -32px; +} +.ui-icon-arrowstop-1-e { + background-position: -208px -32px; +} +.ui-icon-arrowstop-1-s { + background-position: -224px -32px; +} +.ui-icon-arrowstop-1-w { + background-position: -240px -32px; +} +.ui-icon-arrowthick-1-n { + background-position: 0 -48px; +} +.ui-icon-arrowthick-1-ne { + background-position: -16px -48px; +} +.ui-icon-arrowthick-1-e { + background-position: -32px -48px; +} +.ui-icon-arrowthick-1-se { + background-position: -48px -48px; +} +.ui-icon-arrowthick-1-s { + background-position: -64px -48px; +} +.ui-icon-arrowthick-1-sw { + background-position: -80px -48px; +} +.ui-icon-arrowthick-1-w { + background-position: -96px -48px; +} +.ui-icon-arrowthick-1-nw { + background-position: -112px -48px; +} +.ui-icon-arrowthick-2-n-s { + background-position: -128px -48px; +} +.ui-icon-arrowthick-2-ne-sw { + background-position: -144px -48px; +} +.ui-icon-arrowthick-2-e-w { + background-position: -160px -48px; +} +.ui-icon-arrowthick-2-se-nw { + background-position: -176px -48px; +} +.ui-icon-arrowthickstop-1-n { + background-position: -192px -48px; +} +.ui-icon-arrowthickstop-1-e { + background-position: -208px -48px; +} +.ui-icon-arrowthickstop-1-s { + background-position: -224px -48px; +} +.ui-icon-arrowthickstop-1-w { + background-position: -240px -48px; +} +.ui-icon-arrowreturnthick-1-w { + background-position: 0 -64px; +} +.ui-icon-arrowreturnthick-1-n { + background-position: -16px -64px; +} +.ui-icon-arrowreturnthick-1-e { + background-position: -32px -64px; +} +.ui-icon-arrowreturnthick-1-s { + background-position: -48px -64px; +} +.ui-icon-arrowreturn-1-w { + background-position: -64px -64px; +} +.ui-icon-arrowreturn-1-n { + background-position: -80px -64px; +} +.ui-icon-arrowreturn-1-e { + background-position: -96px -64px; +} +.ui-icon-arrowreturn-1-s { + background-position: -112px -64px; +} +.ui-icon-arrowrefresh-1-w { + background-position: -128px -64px; +} +.ui-icon-arrowrefresh-1-n { + background-position: -144px -64px; +} +.ui-icon-arrowrefresh-1-e { + background-position: -160px -64px; +} +.ui-icon-arrowrefresh-1-s { + background-position: -176px -64px; +} +.ui-icon-arrow-4 { + background-position: 0 -80px; +} +.ui-icon-arrow-4-diag { + background-position: -16px -80px; +} +.ui-icon-extlink { + background-position: -32px -80px; +} +.ui-icon-newwin { + background-position: -48px -80px; +} +.ui-icon-refresh { + background-position: -64px -80px; +} +.ui-icon-shuffle { + background-position: -80px -80px; +} +.ui-icon-transfer-e-w { + background-position: -96px -80px; +} +.ui-icon-transferthick-e-w { + background-position: -112px -80px; +} +.ui-icon-folder-collapsed { + background-position: 0 -96px; +} +.ui-icon-folder-open { + background-position: -16px -96px; +} +.ui-icon-document { + background-position: -32px -96px; +} +.ui-icon-document-b { + background-position: -48px -96px; +} +.ui-icon-note { + background-position: -64px -96px; +} +.ui-icon-mail-closed { + background-position: -80px -96px; +} +.ui-icon-mail-open { + background-position: -96px -96px; +} +.ui-icon-suitcase { + background-position: -112px -96px; +} +.ui-icon-comment { + background-position: -128px -96px; +} +.ui-icon-person { + background-position: -144px -96px; +} +.ui-icon-print { + background-position: -160px -96px; +} +.ui-icon-trash { + background-position: -176px -96px; +} +.ui-icon-locked { + background-position: -192px -96px; +} +.ui-icon-unlocked { + background-position: -208px -96px; +} +.ui-icon-bookmark { + background-position: -224px -96px; +} +.ui-icon-tag { + background-position: -240px -96px; +} +.ui-icon-home { + background-position: 0 -112px; +} +.ui-icon-flag { + background-position: -16px -112px; +} +.ui-icon-calendar { + background-position: -32px -112px; +} +.ui-icon-cart { + background-position: -48px -112px; +} +.ui-icon-pencil { + background-position: -64px -112px; +} +.ui-icon-clock { + background-position: -80px -112px; +} +.ui-icon-disk { + background-position: -96px -112px; +} +.ui-icon-calculator { + background-position: -112px -112px; +} +.ui-icon-zoomin { + background-position: -128px -112px; +} +.ui-icon-zoomout { + background-position: -144px -112px; +} +.ui-icon-search { + background-position: -160px -112px; +} +.ui-icon-wrench { + background-position: -176px -112px; +} +.ui-icon-gear { + background-position: -192px -112px; +} +.ui-icon-heart { + background-position: -208px -112px; +} +.ui-icon-star { + background-position: -224px -112px; +} +.ui-icon-link { + background-position: -240px -112px; +} +.ui-icon-cancel { + background-position: 0 -128px; +} +.ui-icon-plus { + background-position: -16px -128px; +} +.ui-icon-plusthick { + background-position: -32px -128px; +} +.ui-icon-minus { + background-position: -48px -128px; +} +.ui-icon-minusthick { + background-position: -64px -128px; +} +.ui-icon-close { + background-position: -80px -128px; +} +.ui-icon-closethick { + background-position: -96px -128px; +} +.ui-icon-key { + background-position: -112px -128px; +} +.ui-icon-lightbulb { + background-position: -128px -128px; +} +.ui-icon-scissors { + background-position: -144px -128px; +} +.ui-icon-clipboard { + background-position: -160px -128px; +} +.ui-icon-copy { + background-position: -176px -128px; +} +.ui-icon-contact { + background-position: -192px -128px; +} +.ui-icon-image { + background-position: -208px -128px; +} +.ui-icon-video { + background-position: -224px -128px; +} +.ui-icon-script { + background-position: -240px -128px; +} +.ui-icon-alert { + background-position: 0 -144px; +} +.ui-icon-info { + background-position: -16px -144px; +} +.ui-icon-notice { + background-position: -32px -144px; +} +.ui-icon-help { + background-position: -48px -144px; +} +.ui-icon-check { + background-position: -64px -144px; +} +.ui-icon-bullet { + background-position: -80px -144px; +} +.ui-icon-radio-on { + background-position: -96px -144px; +} +.ui-icon-radio-off { + background-position: -112px -144px; +} +.ui-icon-pin-w { + background-position: -128px -144px; +} +.ui-icon-pin-s { + background-position: -144px -144px; +} +.ui-icon-play { + background-position: 0 -160px; +} +.ui-icon-pause { + background-position: -16px -160px; +} +.ui-icon-seek-next { + background-position: -32px -160px; +} +.ui-icon-seek-prev { + background-position: -48px -160px; +} +.ui-icon-seek-end { + background-position: -64px -160px; +} +.ui-icon-seek-start { + background-position: -80px -160px; +} +.ui-icon-seek-first { + background-position: -80px -160px; +} +.ui-icon-stop { + background-position: -96px -160px; +} +.ui-icon-eject { + background-position: -112px -160px; +} +.ui-icon-volume-off { + background-position: -128px -160px; +} +.ui-icon-volume-on { + background-position: -144px -160px; +} +.ui-icon-power { + background-position: 0 -176px; +} +.ui-icon-signal-diag { + background-position: -16px -176px; +} +.ui-icon-signal { + background-position: -32px -176px; +} +.ui-icon-battery-0 { + background-position: -48px -176px; +} +.ui-icon-battery-1 { + background-position: -64px -176px; +} +.ui-icon-battery-2 { + background-position: -80px -176px; +} +.ui-icon-battery-3 { + background-position: -96px -176px; +} +.ui-icon-circle-plus { + background-position: 0 -192px; +} +.ui-icon-circle-minus { + background-position: -16px -192px; +} +.ui-icon-circle-close { + background-position: -32px -192px; +} +.ui-icon-circle-triangle-e { + background-position: -48px -192px; +} +.ui-icon-circle-triangle-s { + background-position: -64px -192px; +} +.ui-icon-circle-triangle-w { + background-position: -80px -192px; +} +.ui-icon-circle-triangle-n { + background-position: -96px -192px; +} +.ui-icon-circle-arrow-e { + background-position: -112px -192px; +} +.ui-icon-circle-arrow-s { + background-position: -128px -192px; +} +.ui-icon-circle-arrow-w { + background-position: -144px -192px; +} +.ui-icon-circle-arrow-n { + background-position: -160px -192px; +} +.ui-icon-circle-zoomin { + background-position: -176px -192px; +} +.ui-icon-circle-zoomout { + background-position: -192px -192px; +} +.ui-icon-circle-check { + background-position: -208px -192px; +} +.ui-icon-circlesmall-plus { + background-position: 0 -208px; +} +.ui-icon-circlesmall-minus { + background-position: -16px -208px; +} +.ui-icon-circlesmall-close { + background-position: -32px -208px; +} +.ui-icon-squaresmall-plus { + background-position: -48px -208px; +} +.ui-icon-squaresmall-minus { + background-position: -64px -208px; +} +.ui-icon-squaresmall-close { + background-position: -80px -208px; +} +.ui-icon-grip-dotted-vertical { + background-position: 0 -224px; +} +.ui-icon-grip-dotted-horizontal { + background-position: -16px -224px; +} +.ui-icon-grip-solid-vertical { + background-position: -32px -224px; +} +.ui-icon-grip-solid-horizontal { + background-position: -48px -224px; +} +.ui-icon-gripsmall-diagonal-se { + background-position: -64px -224px; +} +.ui-icon-grip-diagonal-se { + background-position: -80px -224px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} +.ui-widget-overlay { + background: #666 url('images/ui-bg_diagonals-thick_20_666666_40x40.png') 50% + 50% repeat; + opacity: 0.5; + filter: Alpha(Opacity=50); +} +.ui-widget-shadow { + margin: -5px 0 0 -5px; + padding: 5px; + background: #000 url('images/ui-bg_flat_10_000000_40x100.png') 50% 50% + repeat-x; + opacity: 0.2; + filter: Alpha(Opacity=20); + border-radius: 5px; +} diff --git a/docs/src/css/less/mailchimp.less b/docs/src/css/less/mailchimp.less index 18f1ca97..7d7c9f22 100644 --- a/docs/src/css/less/mailchimp.less +++ b/docs/src/css/less/mailchimp.less @@ -1,44 +1,202 @@ /* MailChimp Form Embed Code - Classic - 08/17/2011 */ -#mc_embed_signup form {display:block; position:relative; text-align:left; padding:10px 0 10px 3%} -#mc_embed_signup h2 {font-weight:bold; padding:0; margin:15px 0; font-size:1.4em;} -#mc_embed_signup input {border:1px solid #999; -webkit-appearance:none;} -#mc_embed_signup input[type=checkbox]{-webkit-appearance:checkbox;} -#mc_embed_signup input[type=radio]{-webkit-appearance:radio;} -#mc_embed_signup input:focus {border-color:#333;} -#mc_embed_signup .button {clear:both; background-color: #aaa; border: 0 none; border-radius:4px; color: #FFFFFF; cursor: pointer; display: inline-block; font-size:15px; font-weight: bold; height: 32px; line-height: 32px; margin: 0 5px 10px 0; padding: 0 22px; text-align: center; text-decoration: none; vertical-align: top; white-space: nowrap; width: auto;} -#mc_embed_signup .button:hover {background-color:#777;} -#mc_embed_signup .small-meta {font-size: 11px;} -#mc_embed_signup .nowrap {white-space:nowrap;} +#mc_embed_signup form { + display: block; + position: relative; + text-align: left; + padding: 10px 0 10px 3%; +} +#mc_embed_signup h2 { + font-weight: bold; + padding: 0; + margin: 15px 0; + font-size: 1.4em; +} +#mc_embed_signup input { + border: 1px solid #999; + -webkit-appearance: none; +} +#mc_embed_signup input[type='checkbox'] { + -webkit-appearance: checkbox; +} +#mc_embed_signup input[type='radio'] { + -webkit-appearance: radio; +} +#mc_embed_signup input:focus { + border-color: #333; +} +#mc_embed_signup .button { + clear: both; + background-color: #aaa; + border: 0 none; + border-radius: 4px; + color: #ffffff; + cursor: pointer; + display: inline-block; + font-size: 15px; + font-weight: bold; + height: 32px; + line-height: 32px; + margin: 0 5px 10px 0; + padding: 0 22px; + text-align: center; + text-decoration: none; + vertical-align: top; + white-space: nowrap; + width: auto; +} +#mc_embed_signup .button:hover { + background-color: #777; +} +#mc_embed_signup .small-meta { + font-size: 11px; +} +#mc_embed_signup .nowrap { + white-space: nowrap; +} -#mc_embed_signup .mc-field-group {clear:left; position:relative; width:96%; padding-bottom:3%; min-height:50px;} -#mc_embed_signup .size1of2 {clear:none; float:left; display:inline-block; width:46%; margin-right:4%;} -* html #mc_embed_signup .size1of2 {margin-right:2%; /* Fix for IE6 double margins. */} -#mc_embed_signup .mc-field-group label {display:block; margin-bottom:3px;} -#mc_embed_signup .mc-field-group input {display:block; width:100%; padding:8px 0; text-indent:2%;} -#mc_embed_signup .mc-field-group select {display:inline-block; width:99%; padding:5px 0; margin-bottom:2px;} +#mc_embed_signup .mc-field-group { + clear: left; + position: relative; + width: 96%; + padding-bottom: 3%; + min-height: 50px; +} +#mc_embed_signup .size1of2 { + clear: none; + float: left; + display: inline-block; + width: 46%; + margin-right: 4%; +} +* html #mc_embed_signup .size1of2 { + margin-right: 2%; /* Fix for IE6 double margins. */ +} +#mc_embed_signup .mc-field-group label { + display: block; + margin-bottom: 3px; +} +#mc_embed_signup .mc-field-group input { + display: block; + width: 100%; + padding: 8px 0; + text-indent: 2%; +} +#mc_embed_signup .mc-field-group select { + display: inline-block; + width: 99%; + padding: 5px 0; + margin-bottom: 2px; +} -#mc_embed_signup .datefield, #mc_embed_signup .phonefield-us{padding:5px 0;} -#mc_embed_signup .datefield input, #mc_embed_signup .phonefield-us input{display:inline; width:60px; margin:0 2px; letter-spacing:1px; text-align:center; padding:5px 0 2px 0;} -#mc_embed_signup .phonefield-us .phonearea input, #mc_embed_signup .phonefield-us .phonedetail1 input{width:40px;} -#mc_embed_signup .datefield .monthfield input, #mc_embed_signup .datefield .dayfield input{width:30px;} -#mc_embed_signup .datefield label, #mc_embed_signup .phonefield-us label{display:none;} +#mc_embed_signup .datefield, +#mc_embed_signup .phonefield-us { + padding: 5px 0; +} +#mc_embed_signup .datefield input, +#mc_embed_signup .phonefield-us input { + display: inline; + width: 60px; + margin: 0 2px; + letter-spacing: 1px; + text-align: center; + padding: 5px 0 2px 0; +} +#mc_embed_signup .phonefield-us .phonearea input, +#mc_embed_signup .phonefield-us .phonedetail1 input { + width: 40px; +} +#mc_embed_signup .datefield .monthfield input, +#mc_embed_signup .datefield .dayfield input { + width: 30px; +} +#mc_embed_signup .datefield label, +#mc_embed_signup .phonefield-us label { + display: none; +} -#mc_embed_signup .indicates-required {text-align:right; font-size:11px; margin-right:4%;} -#mc_embed_signup .asterisk {color:#c60; font-size:200%;} -#mc_embed_signup .mc-field-group .asterisk {position:absolute; top:25px; right:10px;} -#mc_embed_signup .clear {clear:both;} +#mc_embed_signup .indicates-required { + text-align: right; + font-size: 11px; + margin-right: 4%; +} +#mc_embed_signup .asterisk { + color: #c60; + font-size: 200%; +} +#mc_embed_signup .mc-field-group .asterisk { + position: absolute; + top: 25px; + right: 10px; +} +#mc_embed_signup .clear { + clear: both; +} -#mc_embed_signup .mc-field-group.input-group ul {margin:0; padding:5px 0; list-style:none;} -#mc_embed_signup .mc-field-group.input-group ul li {display:block; padding:3px 0; margin:0;} -#mc_embed_signup .mc-field-group.input-group label {display:inline;} -#mc_embed_signup .mc-field-group.input-group input {display:inline; width:auto; border:none;} +#mc_embed_signup .mc-field-group.input-group ul { + margin: 0; + padding: 5px 0; + list-style: none; +} +#mc_embed_signup .mc-field-group.input-group ul li { + display: block; + padding: 3px 0; + margin: 0; +} +#mc_embed_signup .mc-field-group.input-group label { + display: inline; +} +#mc_embed_signup .mc-field-group.input-group input { + display: inline; + width: auto; + border: none; +} -#mc_embed_signup div#mce-responses {float:left; top:-1.4em; padding:0em .5em 0em .5em; overflow:hidden; width:90%;margin: 0 5%; clear: both;} -#mc_embed_signup div.response {margin:1em 0; padding:1em .5em .5em 0; font-weight:bold; float:left; top:-1.5em; z-index:1; width:80%;} -#mc_embed_signup #mce-error-response {display:none;} -#mc_embed_signup #mce-success-response {color:#529214; display:none;} -#mc_embed_signup label.error {display:block; float:none; width:auto; margin-left:1.05em; text-align:left; padding:.5em 0;} +#mc_embed_signup div#mce-responses { + float: left; + top: -1.4em; + padding: 0em 0.5em 0em 0.5em; + overflow: hidden; + width: 90%; + margin: 0 5%; + clear: both; +} +#mc_embed_signup div.response { + margin: 1em 0; + padding: 1em 0.5em 0.5em 0; + font-weight: bold; + float: left; + top: -1.5em; + z-index: 1; + width: 80%; +} +#mc_embed_signup #mce-error-response { + display: none; +} +#mc_embed_signup #mce-success-response { + color: #529214; + display: none; +} +#mc_embed_signup label.error { + display: block; + float: none; + width: auto; + margin-left: 1.05em; + text-align: left; + padding: 0.5em 0; +} -#mc-embedded-subscribe {clear:both; width:auto; display:block; margin:1em 0 1em 5%;} -#mc_embed_signup #num-subscribers {font-size:1.1em;} -#mc_embed_signup #num-subscribers span {padding:.5em; border:1px solid #ccc; margin-right:.5em; font-weight:bold;} +#mc-embedded-subscribe { + clear: both; + width: auto; + display: block; + margin: 1em 0 1em 5%; +} +#mc_embed_signup #num-subscribers { + font-size: 1.1em; +} +#mc_embed_signup #num-subscribers span { + padding: 0.5em; + border: 1px solid #ccc; + margin-right: 0.5em; + font-weight: bold; +} diff --git a/docs/src/css/less/mixins.less b/docs/src/css/less/mixins.less index 0020736b..5d4b121b 100644 --- a/docs/src/css/less/mixins.less +++ b/docs/src/css/less/mixins.less @@ -1,5 +1,5 @@ // ------ MIXINS ---------- -.font-bold(){ +.font-bold() { font-weight: @font-weight-bold; font-family: @font-family-sans-serif-regular; } @@ -13,7 +13,7 @@ .align-center(); } -.make-circle(@diameter){ +.make-circle(@diameter) { display: inline-block; width: @diameter; height: @diameter; @@ -21,17 +21,17 @@ -webkit-border-radius: @diameter / 2; border-radius: @diameter / 2; text-align: center; - padding: 2px 0 0 4px + padding: 2px 0 0 4px; } -.make-hexagon(@width,@color){ +.make-hexagon(@width,@color) { display: inline-block; width: @width; height: @width / 1.8; position: relative; - &:before { - content: ""; + &:before { + content: ''; position: absolute; top: (@width / 4) * -1; left: 0; @@ -43,7 +43,7 @@ } &:after { - content: ""; + content: ''; position: absolute; bottom: (@width / 4) * -1; left: 0; @@ -55,14 +55,15 @@ } } - //generic, reusable classes for sections .aboutbox { .align-center(); position: relative; min-height: 350px; - h1, h2, h3 { + h1, + h2, + h3 { font-weight: normal; margin: 0; padding: 0; @@ -73,7 +74,7 @@ .align-center(); padding-top: 40px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { padding-top: 120px; } } @@ -89,7 +90,7 @@ padding-left: 10px; padding-right: 10px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { font-size: 40px; } } @@ -109,7 +110,7 @@ padding-left: 10px; padding-right: 10px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { font-size: 40px; } } @@ -126,7 +127,7 @@ padding-left: 10px; padding-right: 10px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { font-size: 40px; } } @@ -143,13 +144,11 @@ padding-left: 10px; padding-right: 10px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { font-size: 40px; } } } - - } //reusable circles @@ -184,7 +183,6 @@ //reusable hexagons .hexagon { - &.hexagon-grey { background-color: #e1e1e6; .make-hexagon(45px,#e1e1e6); @@ -195,13 +193,13 @@ } } -.blue-box-aside(){ +.blue-box-aside() { position: relative; padding: 50px 20px; background-color: @f2blueDark; text-align: left; - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { padding: 40px; } @@ -214,11 +212,11 @@ top: -22px; left: 50%; - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { top: -12px; left: -19px; } } } -// ------ MIXINS ---------- \ No newline at end of file +// ------ MIXINS ---------- diff --git a/docs/src/css/less/nav.less b/docs/src/css/less/nav.less index b6de820f..4c5c7a49 100644 --- a/docs/src/css/less/nav.less +++ b/docs/src/css/less/nav.less @@ -1,11 +1,11 @@ - //put this background image only on the home page .home .navbar-inverse { - @media (min-width: @screen-sm-min){ - background: @navbar-inverse-bg url('/img/header-bg.png?v=@{version}') center -114px no-repeat; + @media (min-width: @screen-sm-min) { + background: @navbar-inverse-bg url('/img/header-bg.png?v=@{version}') center -114px + no-repeat; } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { background-position: center top; } } @@ -21,7 +21,7 @@ padding-bottom: 30px; margin-bottom: 0; - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { .container { padding-right: 0px; } @@ -34,7 +34,7 @@ .navbar-header { margin-left: 15px; - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { width: @navbar-width; } } @@ -42,7 +42,7 @@ .navbar-brand { .text-hide(); - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { padding-left: 0; padding-right: 0; } @@ -65,14 +65,14 @@ margin-top: 20px; float: none; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { margin-top: 0; padding-left: 0; padding-right: 0; margin-left: -@navbar-width; //it's not in a "row", so slide it left } - @media (min-width: @screen-sm-min) and (max-width: @screen-md-min){ + @media (min-width: @screen-sm-min) and (max-width: @screen-md-min) { float: right; } @@ -87,7 +87,7 @@ border: 0 solid @navbarSeparator; border-bottom-width: 1px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { font-size: 12px; border: 0 none; &.active, @@ -98,16 +98,16 @@ } } - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { margin: 0 5px; padding: 8px 8px; } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { margin: 0 8px; } - @media (min-width: @screen-lg-min){ + @media (min-width: @screen-lg-min) { margin: 0 8px; } } @@ -122,4 +122,4 @@ } } } -} \ No newline at end of file +} diff --git a/docs/src/css/less/site.less b/docs/src/css/less/site.less index a51ee663..267f8383 100644 --- a/docs/src/css/less/site.less +++ b/docs/src/css/less/site.less @@ -1,11 +1,14 @@ -@import "twbs/bootstrap.less"; -@import "animate.less"; -@import "mixins.less"; -@import "hljs.less"; -@import "mailchimp.less"; -@import "app-overrides.less"; - -b,strong,th,dt { +@import 'twbs/bootstrap.less'; +@import 'animate.less'; +@import 'mixins.less'; +@import 'hljs.less'; +@import 'mailchimp.less'; +@import 'app-overrides.less'; + +b, +strong, +th, +dt { .font-bold(); } @@ -30,7 +33,7 @@ b,strong,th,dt { //animate ONLY on larger screens (basically not mobile) .animated { - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-fill-mode: both; @@ -42,7 +45,7 @@ b,strong,th,dt { //animate ONLY on larger screens (basically not mobile) .noviz { .opacity(1); - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { .opacity(0); } } @@ -55,30 +58,33 @@ hr.divider { padding: 0; } -@import "nav.less"; -@import "homepage.less"; -@import "homepage-gallery.less"; -@import "examples.less"; -@import "footer.less"; +@import 'nav.less'; +@import 'homepage.less'; +@import 'homepage-gallery.less'; +@import 'examples.less'; +@import 'footer.less'; //Generic page CSS, NOT applicable to home page. See 'homepage.less' for that. .pageContent { - margin-top: 40px; margin-bottom: 40px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { margin-top: 70px; min-height: 500px; } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { margin-top: 100px; margin-bottom: 0; min-height: 900px; } - h2, h3, h4, h5, h6 { + h2, + h3, + h4, + h5, + h6 { color: @f2blue; } @@ -121,7 +127,11 @@ hr.divider { /****** Right sidebar */ .sidebar { - h2, h3, h4, h5, h6 { + h2, + h3, + h4, + h5, + h6 { color: @headingGrey; } @@ -132,8 +142,6 @@ hr.divider { font-size: 16px; } } - - } } @@ -159,13 +167,18 @@ dl.faq { //Developers template .cssanimations { - .developers, .foundation { + .developers, + .foundation { .docs-masthead { position: relative; overflow: hidden; background-size: cover; background-color: @navbar-inverse-bg; - background-image: radial-gradient(farthest-corner, rgba(61, 156, 220, 0.5), rgba(61, 156, 220, 0.95)); + background-image: radial-gradient( + farthest-corner, + rgba(61, 156, 220, 0.5), + rgba(61, 156, 220, 0.95) + ); perspective: 1000px; } @@ -176,29 +189,30 @@ dl.faq { height: 135%; top: 46%; left: 0px; - content: ""; + content: ''; background: url('/img/gallery-multivendor-740x351.png?v=@{version}'); - .opacity(.05); - transform: rotateX(50deg) rotateZ(0deg) rotateY(0deg) translateY(-14%) translateX(-10%) translateZ(370px); + .opacity(0.05); + transform: rotateX(50deg) rotateZ(0deg) rotateY(0deg) translateY(-14%) + translateX(-10%) translateZ(370px); } } } -.developers, .foundation { - +.developers, +.foundation { .aboutbox { - .container { position: relative; z-index: 2; .btn-download { font-size: 15px; } - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { padding-top: 60px; } } - h1, h5 { + h1, + h5 { .font-bold(); } @@ -206,7 +220,7 @@ dl.faq { padding-top: 20px; padding-bottom: 40px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { padding-top: 40px; } @@ -214,12 +228,11 @@ dl.faq { font-size: 18px; font-family: @font-family-sans-serif-thin; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { font-size: 23px; line-height: 1.6; } } - } aside { @@ -237,12 +250,12 @@ dl.faq { .docs-3x { padding-bottom: 45px; - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { padding-bottom: 75px; } //icon h2 { - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { margin: 0; } color: @f2blueDark; @@ -256,11 +269,11 @@ dl.faq { .detail { text-align: left; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { min-height: 160px; } - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { font-size: 15px; min-height: 112px; } @@ -271,7 +284,7 @@ dl.faq { margin-top: 30px; padding: 30px 0; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { border-top: 1px solid @f2greydark; border-bottom-width: 0; padding-bottom: 0; @@ -287,11 +300,11 @@ dl.faq { li { padding: 0; &:after { - content: ", "; + content: ', '; } &:last-child { &:after { - content: ""; + content: ''; } } } @@ -303,7 +316,7 @@ dl.faq { } .apireference { - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { padding-bottom: 75px; } } @@ -314,21 +327,19 @@ dl.faq { .getinvolved { padding-bottom: 45px; - @media (min-width: @screen-md-min){ + @media (min-width: @screen-md-min) { padding-bottom: 75px; } h3 { margin-bottom: 10px; } - - } } .foundation { .project-guidelines { - padding:40px; + padding: 40px; } } @@ -336,12 +347,13 @@ dl.faq { .aboutbox { .container { text-align: left; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { padding-top: 60px; } } - h1, h5 { + h1, + h5 { .font-bold(); } @@ -349,14 +361,14 @@ dl.faq { padding-top: 20px; padding-bottom: 40px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { padding-top: 40px; } p { font-size: 18px; - @media (min-width: @screen-sm-min){ + @media (min-width: @screen-sm-min) { font-size: 23px; line-height: 1.6; } @@ -373,13 +385,17 @@ dl.faq { font-size: 15px; word-wrap: break-word; - h2,h3,h4,h5,h6 { + h2, + h3, + h4, + h5, + h6 { position: relative; } h4:not(.media-heading), h5, h6 { - margin-top: 30px; + margin-top: 30px; } .alert h4, .alert h5, @@ -387,7 +403,7 @@ dl.faq { .well h4, .well h5, .well h6 { - margin-top: 0; + margin-top: 0; } .link-header { @@ -463,28 +479,26 @@ dl.faq { .getting-started-with-f2 .media-left .fa { padding-left: 10px; } - } /****** Docs, left sidebar */ .sidebar-nav { - .affix { position: static; - width: 100%; - top: 5px; - @media (min-width: 768px){ - position: fixed; - width: 158px; - } + width: 100%; + top: 5px; + @media (min-width: 768px) { + position: fixed; + width: 158px; + } - @media (min-width: 992px){ - width: 213px; - } + @media (min-width: 992px) { + width: 213px; + } - @media (min-width: 1200px){ - width: 263px; - } + @media (min-width: 1200px) { + width: 263px; + } } .affix-bottom { @@ -495,7 +509,6 @@ dl.faq { &, .spy-container, .navs { - > ul { background-color: @f2grey; padding-bottom: 20px; diff --git a/docs/src/css/less/twbs/alerts.less b/docs/src/css/less/twbs/alerts.less index 3eab0662..79791217 100644 --- a/docs/src/css/less/twbs/alerts.less +++ b/docs/src/css/less/twbs/alerts.less @@ -2,35 +2,34 @@ // Alerts // -------------------------------------------------- - // Base styles // ------------------------- .alert { - padding: @alert-padding; - margin-bottom: @line-height-computed; - border: 1px solid transparent; - border-radius: @alert-border-radius; + padding: @alert-padding; + margin-bottom: @line-height-computed; + border: 1px solid transparent; + border-radius: @alert-border-radius; - // Headings for larger alerts - h4 { - margin-top: 0; - // Specified for the h4 to prevent conflicts of changing @headings-color - color: inherit; - } - // Provide class for links that match alerts - .alert-link { - font-weight: @alert-link-font-weight; - } + // Headings for larger alerts + h4 { + margin-top: 0; + // Specified for the h4 to prevent conflicts of changing @headings-color + color: inherit; + } + // Provide class for links that match alerts + .alert-link { + font-weight: @alert-link-font-weight; + } - // Improve alignment and spacing of inner content - > p, - > ul { - margin-bottom: 0; - } - > p + p { - margin-top: 5px; - } + // Improve alignment and spacing of inner content + > p, + > ul { + margin-bottom: 0; + } + > p + p { + margin-top: 5px; + } } // Dismissable alerts @@ -38,15 +37,15 @@ // Expand the right padding and account for the close button's positioning. .alert-dismissable { - padding-right: (@alert-padding + 20); + padding-right: (@alert-padding + 20); - // Adjust close link position - .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; - } + // Adjust close link position + .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; + } } // Alternate styles @@ -54,14 +53,14 @@ // Generate contextual modifier classes for colorizing the alert. .alert-success { - .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); + .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); } .alert-info { - .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); + .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); } .alert-warning { - .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); + .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); } .alert-danger { - .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); + .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); } diff --git a/docs/src/css/less/twbs/badges.less b/docs/src/css/less/twbs/badges.less index 56828cab..2f1b15c6 100644 --- a/docs/src/css/less/twbs/badges.less +++ b/docs/src/css/less/twbs/badges.less @@ -2,54 +2,53 @@ // Badges // -------------------------------------------------- - // Base classes .badge { - display: inline-block; - min-width: 10px; - padding: 3px 7px; - font-size: @font-size-small; - font-weight: @badge-font-weight; - color: @badge-color; - line-height: @badge-line-height; - vertical-align: baseline; - white-space: nowrap; - text-align: center; - background-color: @badge-bg; - border-radius: @badge-border-radius; + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: @font-size-small; + font-weight: @badge-font-weight; + color: @badge-color; + line-height: @badge-line-height; + vertical-align: baseline; + white-space: nowrap; + text-align: center; + background-color: @badge-bg; + border-radius: @badge-border-radius; - // Empty badges collapse automatically (not available in IE8) - &:empty { - display: none; - } + // Empty badges collapse automatically (not available in IE8) + &:empty { + display: none; + } - // Quick fix for badges in buttons - .btn & { - position: relative; - top: -1px; - } - .btn-xs & { - top: 0; - padding: 1px 5px; - } + // Quick fix for badges in buttons + .btn & { + position: relative; + top: -1px; + } + .btn-xs & { + top: 0; + padding: 1px 5px; + } } // Hover state, but only for links a.badge { - &:hover, - &:focus { - color: @badge-link-hover-color; - text-decoration: none; - cursor: pointer; - } + &:hover, + &:focus { + color: @badge-link-hover-color; + text-decoration: none; + cursor: pointer; + } } // Account for counters in navs a.list-group-item.active > .badge, .nav-pills > .active > a > .badge { - color: @badge-active-color; - background-color: @badge-active-bg; + color: @badge-active-color; + background-color: @badge-active-bg; } .nav-pills > li > a > .badge { - margin-left: 3px; + margin-left: 3px; } diff --git a/docs/src/css/less/twbs/bootstrap.less b/docs/src/css/less/twbs/bootstrap.less index f5d7e1fa..e2799a06 100644 --- a/docs/src/css/less/twbs/bootstrap.less +++ b/docs/src/css/less/twbs/bootstrap.less @@ -1,51 +1,51 @@ // Core variables and mixins -@import "variables.less"; -@import "../vars.less"; //custom overrides for openf2.org -@import "mixins.less"; +@import 'variables.less'; +@import '../vars.less'; //custom overrides for openf2.org +@import 'mixins.less'; // Reset -@import "normalize.less"; -@import "print.less"; +@import 'normalize.less'; +@import 'print.less'; // Core CSS -@import "scaffolding.less"; -@import "type.less"; -@import "code.less"; -@import "grid.less"; -@import "tables.less"; -@import "forms.less"; -@import "buttons.less"; +@import 'scaffolding.less'; +@import 'type.less'; +@import 'code.less'; +@import 'grid.less'; +@import 'tables.less'; +@import 'forms.less'; +@import 'buttons.less'; // Components -@import "component-animations.less"; -@import "glyphicons.less"; -@import "../fontawesome/font-awesome.less"; -@import "dropdowns.less"; -@import "button-groups.less"; -@import "input-groups.less"; -@import "navs.less"; -@import "navbar.less"; -@import "breadcrumbs.less"; -@import "pagination.less"; -@import "pager.less"; -@import "labels.less"; -@import "badges.less"; -@import "jumbotron.less"; -@import "thumbnails.less"; -@import "alerts.less"; -@import "progress-bars.less"; -@import "media.less"; -@import "list-group.less"; -@import "panels.less"; -@import "wells.less"; -@import "close.less"; +@import 'component-animations.less'; +@import 'glyphicons.less'; +@import '../fontawesome/font-awesome.less'; +@import 'dropdowns.less'; +@import 'button-groups.less'; +@import 'input-groups.less'; +@import 'navs.less'; +@import 'navbar.less'; +@import 'breadcrumbs.less'; +@import 'pagination.less'; +@import 'pager.less'; +@import 'labels.less'; +@import 'badges.less'; +@import 'jumbotron.less'; +@import 'thumbnails.less'; +@import 'alerts.less'; +@import 'progress-bars.less'; +@import 'media.less'; +@import 'list-group.less'; +@import 'panels.less'; +@import 'wells.less'; +@import 'close.less'; // Components w/ JavaScript -@import "modals.less"; -@import "tooltip.less"; -@import "popovers.less"; -@import "carousel.less"; +@import 'modals.less'; +@import 'tooltip.less'; +@import 'popovers.less'; +@import 'carousel.less'; // Utility classes -@import "utilities.less"; -@import "responsive-utilities.less"; +@import 'utilities.less'; +@import 'responsive-utilities.less'; diff --git a/docs/src/css/less/twbs/breadcrumbs.less b/docs/src/css/less/twbs/breadcrumbs.less index cb01d503..68468843 100644 --- a/docs/src/css/less/twbs/breadcrumbs.less +++ b/docs/src/css/less/twbs/breadcrumbs.less @@ -2,25 +2,24 @@ // Breadcrumbs // -------------------------------------------------- - .breadcrumb { - padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; - margin-bottom: @line-height-computed; - list-style: none; - background-color: @breadcrumb-bg; - border-radius: @border-radius-base; + padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; + margin-bottom: @line-height-computed; + list-style: none; + background-color: @breadcrumb-bg; + border-radius: @border-radius-base; - > li { - display: inline-block; + > li { + display: inline-block; - + li:before { - content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space - padding: 0 5px; - color: @breadcrumb-color; - } - } + + li:before { + content: '@{breadcrumb-separator}\00a0'; // Unicode space added since inline-block means non-collapsing white-space + padding: 0 5px; + color: @breadcrumb-color; + } + } - > .active { - color: @breadcrumb-active-color; - } + > .active { + color: @breadcrumb-active-color; + } } diff --git a/docs/src/css/less/twbs/button-groups.less b/docs/src/css/less/twbs/button-groups.less index 58fd9067..00a04415 100644 --- a/docs/src/css/less/twbs/button-groups.less +++ b/docs/src/css/less/twbs/button-groups.less @@ -5,222 +5,223 @@ // Make the div behave like a button .btn-group, .btn-group-vertical { - position: relative; - display: inline-block; - vertical-align: middle; // match .btn alignment given font-size hack above - > .btn { - position: relative; - float: left; - // Bring the "active" button to the front - &:hover, - &:focus, - &:active, - &.active { - z-index: 2; - } - &:focus { - // Remove focus outline when dropdown JS adds it after closing the menu - outline: none; - } - } + position: relative; + display: inline-block; + vertical-align: middle; // match .btn alignment given font-size hack above + > .btn { + position: relative; + float: left; + // Bring the "active" button to the front + &:hover, + &:focus, + &:active, + &.active { + z-index: 2; + } + &:focus { + // Remove focus outline when dropdown JS adds it after closing the menu + outline: none; + } + } } // Prevent double borders when buttons are next to each other .btn-group { - .btn + .btn, - .btn + .btn-group, - .btn-group + .btn, - .btn-group + .btn-group { - margin-left: -1px; - } + .btn + .btn, + .btn + .btn-group, + .btn-group + .btn, + .btn-group + .btn-group { + margin-left: -1px; + } } // Optional: Group multiple button groups together for a toolbar .btn-toolbar { - margin-left: -5px; // Offset the first child's margin - &:extend(.clearfix all); + margin-left: -5px; // Offset the first child's margin + &:extend(.clearfix all); - .btn-group, - .input-group { - float: left; - } - > .btn, - > .btn-group, - > .input-group { - margin-left: 5px; - } + .btn-group, + .input-group { + float: left; + } + > .btn, + > .btn-group, + > .input-group { + margin-left: 5px; + } } .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { - border-radius: 0; + border-radius: 0; } // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match .btn-group > .btn:first-child { - margin-left: 0; - &:not(:last-child):not(.dropdown-toggle) { - .border-right-radius(0); - } + margin-left: 0; + &:not(:last-child):not(.dropdown-toggle) { + .border-right-radius(0); + } } // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { - .border-left-radius(0); + .border-left-radius(0); } // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group) .btn-group > .btn-group { - float: left; + float: left; } .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; + border-radius: 0; } .btn-group > .btn-group:first-child { - > .btn:last-child, - > .dropdown-toggle { - .border-right-radius(0); - } + > .btn:last-child, + > .dropdown-toggle { + .border-right-radius(0); + } } .btn-group > .btn-group:last-child > .btn:first-child { - .border-left-radius(0); + .border-left-radius(0); } // On active and open, don't show outline .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { - outline: 0; + outline: 0; } - // Sizing // // Remix the default button sizing classes into new ones for easier manipulation. -.btn-group-xs > .btn { .btn-xs(); } -.btn-group-sm > .btn { .btn-sm(); } -.btn-group-lg > .btn { .btn-lg(); } - +.btn-group-xs > .btn { + .btn-xs(); +} +.btn-group-sm > .btn { + .btn-sm(); +} +.btn-group-lg > .btn { + .btn-lg(); +} // Split button dropdowns // ---------------------- // Give the line between buttons some depth .btn-group > .btn + .dropdown-toggle { - padding-left: 8px; - padding-right: 8px; + padding-left: 8px; + padding-right: 8px; } .btn-group > .btn-lg + .dropdown-toggle { - padding-left: 12px; - padding-right: 12px; + padding-left: 12px; + padding-right: 12px; } // The clickable button for toggling the menu // Remove the gradient and set the same inset shadow as the :active state .btn-group.open .dropdown-toggle { - .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); + .box-shadow(inset 0 3px 5px rgba(0,0,0,0.125)); - // Show no shadow for `.btn-link` since it has no other button styles. - &.btn-link { - .box-shadow(none); - } + // Show no shadow for `.btn-link` since it has no other button styles. + &.btn-link { + .box-shadow(none); + } } - // Reposition the caret .btn .caret { - margin-left: 0; + margin-left: 0; } // Carets in other button sizes .btn-lg .caret { - border-width: @caret-width-large @caret-width-large 0; - border-bottom-width: 0; + border-width: @caret-width-large @caret-width-large 0; + border-bottom-width: 0; } // Upside down carets for .dropup .dropup .btn-lg .caret { - border-width: 0 @caret-width-large @caret-width-large; + border-width: 0 @caret-width-large @caret-width-large; } - // Vertical button groups // ---------------------- .btn-group-vertical { - > .btn, - > .btn-group, - > .btn-group > .btn { - display: block; - float: none; - width: 100%; - max-width: 100%; - } - - // Clear floats so dropdown menus can be properly placed - > .btn-group { - &:extend(.clearfix all); - > .btn { - float: none; - } - } - - > .btn + .btn, - > .btn + .btn-group, - > .btn-group + .btn, - > .btn-group + .btn-group { - margin-top: -1px; - margin-left: 0; - } + > .btn, + > .btn-group, + > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100%; + } + + // Clear floats so dropdown menus can be properly placed + > .btn-group { + &:extend(.clearfix all); + > .btn { + float: none; + } + } + + > .btn + .btn, + > .btn + .btn-group, + > .btn-group + .btn, + > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; + } } .btn-group-vertical > .btn { - &:not(:first-child):not(:last-child) { - border-radius: 0; - } - &:first-child:not(:last-child) { - border-top-right-radius: @border-radius-base; - .border-bottom-radius(0); - } - &:last-child:not(:first-child) { - border-bottom-left-radius: @border-radius-base; - .border-top-radius(0); - } + &:not(:first-child):not(:last-child) { + border-radius: 0; + } + &:first-child:not(:last-child) { + border-top-right-radius: @border-radius-base; + .border-bottom-radius(0); + } + &:last-child:not(:first-child) { + border-bottom-left-radius: @border-radius-base; + .border-top-radius(0); + } } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; + border-radius: 0; } .btn-group-vertical > .btn-group:first-child:not(:last-child) { - > .btn:last-child, - > .dropdown-toggle { - .border-bottom-radius(0); - } + > .btn:last-child, + > .dropdown-toggle { + .border-bottom-radius(0); + } } -.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - .border-top-radius(0); +.btn-group-vertical + > .btn-group:last-child:not(:first-child) + > .btn:first-child { + .border-top-radius(0); } - - // Justified button groups // ---------------------- .btn-group-justified { - display: table; - width: 100%; - table-layout: fixed; - border-collapse: separate; - > .btn, - > .btn-group { - float: none; - display: table-cell; - width: 1%; - } - > .btn-group .btn { - width: 100%; - } + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate; + > .btn, + > .btn-group { + float: none; + display: table-cell; + width: 1%; + } + > .btn-group .btn { + width: 100%; + } } - // Checkbox and radio options -[data-toggle="buttons"] > .btn > input[type="radio"], -[data-toggle="buttons"] > .btn > input[type="checkbox"] { - display: none; +[data-toggle='buttons'] > .btn > input[type='radio'], +[data-toggle='buttons'] > .btn > input[type='checkbox'] { + display: none; } diff --git a/docs/src/css/less/twbs/buttons.less b/docs/src/css/less/twbs/buttons.less index 4858a8ae..581fcbf9 100644 --- a/docs/src/css/less/twbs/buttons.less +++ b/docs/src/css/less/twbs/buttons.less @@ -2,154 +2,149 @@ // Buttons // -------------------------------------------------- - // Base styles // -------------------------------------------------- .btn { - display: inline-block; - margin-bottom: 0; // For input.btn - font-weight: @btn-font-weight; - text-align: center; - vertical-align: middle; - cursor: pointer; - background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 - border: 1px solid transparent; - white-space: nowrap; - .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base); - .user-select(none); - - &:focus { - .tab-focus(); - } - - &:hover, - &:focus { - color: @btn-default-color; - text-decoration: none; - } - - &:active, - &.active { - outline: 0; - background-image: none; - .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); - } - - &.disabled, - &[disabled], - fieldset[disabled] & { - cursor: not-allowed; - pointer-events: none; // Future-proof disabling of clicks - .opacity(.65); - .box-shadow(none); - } + display: inline-block; + margin-bottom: 0; // For input.btn + font-weight: @btn-font-weight; + text-align: center; + vertical-align: middle; + cursor: pointer; + background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 + border: 1px solid transparent; + white-space: nowrap; + .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base); + .user-select(none); + + &:focus { + .tab-focus(); + } + + &:hover, + &:focus { + color: @btn-default-color; + text-decoration: none; + } + + &:active, + &.active { + outline: 0; + background-image: none; + .box-shadow(inset 0 3px 5px rgba(0,0,0,0.125)); + } + + &.disabled, + &[disabled], + fieldset[disabled] & { + cursor: not-allowed; + pointer-events: none; // Future-proof disabling of clicks + .opacity(0.65); + .box-shadow(none); + } } - // Alternate buttons // -------------------------------------------------- .btn-default { - .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border); + .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border); } .btn-primary { - .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); + .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); } // Success appears as green .btn-success { - .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); + .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); } // Info appears as blue-green .btn-info { - .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border); + .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border); } // Warning appears as orange .btn-warning { - .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); + .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); } // Danger and error appear as red .btn-danger { - .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); + .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); } - // Link buttons // ------------------------- // Make a button look and behave like a link .btn-link { - color: @link-color; - font-weight: normal; - cursor: pointer; - border-radius: 0; - - &, - &:active, - &[disabled], - fieldset[disabled] & { - background-color: transparent; - .box-shadow(none); - } - &, - &:hover, - &:focus, - &:active { - border-color: transparent; - } - &:hover, - &:focus { - color: @link-hover-color; - text-decoration: underline; - background-color: transparent; - } - &[disabled], - fieldset[disabled] & { - &:hover, - &:focus { - color: @btn-link-disabled-color; - text-decoration: none; - } - } + color: @link-color; + font-weight: normal; + cursor: pointer; + border-radius: 0; + + &, + &:active, + &[disabled], + fieldset[disabled] & { + background-color: transparent; + .box-shadow(none); + } + &, + &:hover, + &:focus, + &:active { + border-color: transparent; + } + &:hover, + &:focus { + color: @link-hover-color; + text-decoration: underline; + background-color: transparent; + } + &[disabled], + fieldset[disabled] & { + &:hover, + &:focus { + color: @btn-link-disabled-color; + text-decoration: none; + } + } } - // Button Sizes // -------------------------------------------------- .btn-lg { - // line-height: ensure even-numbered height of button next to large input - .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); + // line-height: ensure even-numbered height of button next to large input + .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); } .btn-sm { - // line-height: ensure proper height of button next to small input - .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); + // line-height: ensure proper height of button next to small input + .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); } .btn-xs { - .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small); + .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small); } - // Block button // -------------------------------------------------- .btn-block { - display: block; - width: 100%; - padding-left: 0; - padding-right: 0; + display: block; + width: 100%; + padding-left: 0; + padding-right: 0; } // Vertically space out multiple block buttons .btn-block + .btn-block { - margin-top: 5px; + margin-top: 5px; } // Specificity overrides -input[type="submit"], -input[type="reset"], -input[type="button"] { - &.btn-block { - width: 100%; - } +input[type='submit'], +input[type='reset'], +input[type='button'] { + &.btn-block { + width: 100%; + } } diff --git a/docs/src/css/less/twbs/carousel.less b/docs/src/css/less/twbs/carousel.less index e53365df..5e285e7f 100644 --- a/docs/src/css/less/twbs/carousel.less +++ b/docs/src/css/less/twbs/carousel.less @@ -2,138 +2,138 @@ // Carousel // -------------------------------------------------- - // Wrapper for the slide container and indicators .carousel { - position: relative; + position: relative; } .carousel-inner { - position: relative; - overflow: hidden; - width: 100%; - - > .item { - display: none; - position: relative; - .transition(.6s ease-in-out left); - - // Account for jankitude on images - > img, - > a > img { - .img-responsive(); - line-height: 1; - } - } - - > .active, - > .next, - > .prev { display: block; } - - > .active { - left: 0; - } - - > .next, - > .prev { - position: absolute; - top: 0; - width: 100%; - } - - > .next { - left: 100%; - } - > .prev { - left: -100%; - } - > .next.left, - > .prev.right { - left: 0; - } - - > .active.left { - left: -100%; - } - > .active.right { - left: 100%; - } - + position: relative; + overflow: hidden; + width: 100%; + + > .item { + display: none; + position: relative; + .transition(0.6s ease-in-out left); + + // Account for jankitude on images + > img, + > a > img { + .img-responsive(); + line-height: 1; + } + } + + > .active, + > .next, + > .prev { + display: block; + } + + > .active { + left: 0; + } + + > .next, + > .prev { + position: absolute; + top: 0; + width: 100%; + } + + > .next { + left: 100%; + } + > .prev { + left: -100%; + } + > .next.left, + > .prev.right { + left: 0; + } + + > .active.left { + left: -100%; + } + > .active.right { + left: 100%; + } } // Left/right controls for nav // --------------------------- .carousel-control { - position: absolute; - top: 0; - left: 0; - bottom: 0; - width: @carousel-control-width; - .opacity(@carousel-control-opacity); - font-size: @carousel-control-font-size; - color: @carousel-control-color; - text-align: center; - text-shadow: @carousel-text-shadow; - // We can't have this transition here because WebKit cancels the carousel - // animation if you trip this while in the middle of another animation. - - // Set gradients for backgrounds - &.left { - #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001)); - } - &.right { - left: auto; - right: 0; - #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5)); - } - - // Hover/focus state - &:hover, - &:focus { - outline: none; - color: @carousel-control-color; - text-decoration: none; - .opacity(.9); - } - - // Toggles - .icon-prev, - .icon-next, - .glyphicon-chevron-left, - .glyphicon-chevron-right { - position: absolute; - top: 50%; - z-index: 5; - display: inline-block; - } - .icon-prev, - .glyphicon-chevron-left { - left: 50%; - } - .icon-next, - .glyphicon-chevron-right { - right: 50%; - } - .icon-prev, - .icon-next { - width: 20px; - height: 20px; - margin-top: -10px; - margin-left: -10px; - font-family: serif; - } - - .icon-prev { - &:before { - content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) - } - } - .icon-next { - &:before { - content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A) - } - } + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: @carousel-control-width; + .opacity(@carousel-control-opacity); + font-size: @carousel-control-font-size; + color: @carousel-control-color; + text-align: center; + text-shadow: @carousel-text-shadow; + // We can't have this transition here because WebKit cancels the carousel + // animation if you trip this while in the middle of another animation. + + // Set gradients for backgrounds + &.left { + #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));; + } + &.right { + left: auto; + right: 0; + #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));; + } + + // Hover/focus state + &:hover, + &:focus { + outline: none; + color: @carousel-control-color; + text-decoration: none; + .opacity(0.9); + } + + // Toggles + .icon-prev, + .icon-next, + .glyphicon-chevron-left, + .glyphicon-chevron-right { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; + } + .icon-prev, + .glyphicon-chevron-left { + left: 50%; + } + .icon-next, + .glyphicon-chevron-right { + right: 50%; + } + .icon-prev, + .icon-next { + width: 20px; + height: 20px; + margin-top: -10px; + margin-left: -10px; + font-family: serif; + } + + .icon-prev { + &:before { + content: '\2039'; // SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) + } + } + .icon-next { + &:before { + content: '\203a'; // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A) + } + } } // Optional indicator pips @@ -142,91 +142,89 @@ // slide your carousel holds. .carousel-indicators { - position: absolute; - bottom: 10px; - left: 50%; - z-index: 15; - width: 60%; - margin-left: -30%; - padding-left: 0; - list-style: none; - text-align: center; - - li { - display: inline-block; - width: 10px; - height: 10px; - margin: 1px; - text-indent: -999px; - border: 1px solid @carousel-indicator-border-color; - border-radius: 10px; - cursor: pointer; - - // IE8-9 hack for event handling - // - // Internet Explorer 8-9 does not support clicks on elements without a set - // `background-color`. We cannot use `filter` since that's not viewed as a - // background color by the browser. Thus, a hack is needed. - // - // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we - // set alpha transparency for the best results possible. - background-color: #000 \9; // IE8 - background-color: rgba(0,0,0,0); // IE9 - } - .active { - margin: 0; - width: 12px; - height: 12px; - background-color: @carousel-indicator-active-bg; - } + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + margin-left: -30%; + padding-left: 0; + list-style: none; + text-align: center; + + li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + border: 1px solid @carousel-indicator-border-color; + border-radius: 10px; + cursor: pointer; + + // IE8-9 hack for event handling + // + // Internet Explorer 8-9 does not support clicks on elements without a set + // `background-color`. We cannot use `filter` since that's not viewed as a + // background color by the browser. Thus, a hack is needed. + // + // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we + // set alpha transparency for the best results possible. + background-color: #000 \9; // IE8 + background-color: rgba(0, 0, 0, 0); // IE9 + } + .active { + margin: 0; + width: 12px; + height: 12px; + background-color: @carousel-indicator-active-bg; + } } // Optional captions // ----------------------------- // Hidden by default for smaller viewports .carousel-caption { - position: absolute; - left: 15%; - right: 15%; - bottom: 20px; - z-index: 10; - padding-top: 20px; - padding-bottom: 20px; - color: @carousel-caption-color; - text-align: center; - text-shadow: @carousel-text-shadow; - & .btn { - text-shadow: none; // No shadow for button elements in carousel-caption - } + position: absolute; + left: 15%; + right: 15%; + bottom: 20px; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: @carousel-caption-color; + text-align: center; + text-shadow: @carousel-text-shadow; + & .btn { + text-shadow: none; // No shadow for button elements in carousel-caption + } } - // Scale up controls for tablets and up @media screen and (min-width: @screen-sm-min) { - - // Scale up the controls a smidge - .carousel-control { - .glyphicons-chevron-left, - .glyphicons-chevron-right, - .icon-prev, - .icon-next { - width: 30px; - height: 30px; - margin-top: -15px; - margin-left: -15px; - font-size: 30px; - } - } - - // Show and left align the captions - .carousel-caption { - left: 20%; - right: 20%; - padding-bottom: 30px; - } - - // Move up the indicators - .carousel-indicators { - bottom: 20px; - } + // Scale up the controls a smidge + .carousel-control { + .glyphicons-chevron-left, + .glyphicons-chevron-right, + .icon-prev, + .icon-next { + width: 30px; + height: 30px; + margin-top: -15px; + margin-left: -15px; + font-size: 30px; + } + } + + // Show and left align the captions + .carousel-caption { + left: 20%; + right: 20%; + padding-bottom: 30px; + } + + // Move up the indicators + .carousel-indicators { + bottom: 20px; + } } diff --git a/docs/src/css/less/twbs/close.less b/docs/src/css/less/twbs/close.less index 9b4e74f2..d3333dee 100644 --- a/docs/src/css/less/twbs/close.less +++ b/docs/src/css/less/twbs/close.less @@ -2,32 +2,31 @@ // Close icons // -------------------------------------------------- - .close { - float: right; - font-size: (@font-size-base * 1.5); - font-weight: @close-font-weight; - line-height: 1; - color: @close-color; - text-shadow: @close-text-shadow; - .opacity(.2); + float: right; + font-size: (@font-size-base * 1.5); + font-weight: @close-font-weight; + line-height: 1; + color: @close-color; + text-shadow: @close-text-shadow; + .opacity(0.2); - &:hover, - &:focus { - color: @close-color; - text-decoration: none; - cursor: pointer; - .opacity(.5); - } + &:hover, + &:focus { + color: @close-color; + text-decoration: none; + cursor: pointer; + .opacity(0.5); + } - // Additional properties for button version - // iOS requires the button element instead of an anchor tag. - // If you want the anchor version, it requires `href="#"`. - button& { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; - } + // Additional properties for button version + // iOS requires the button element instead of an anchor tag. + // If you want the anchor version, it requires `href="#"`. + button& { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; + } } diff --git a/docs/src/css/less/twbs/code.less b/docs/src/css/less/twbs/code.less index 3eed26c0..fed6a393 100644 --- a/docs/src/css/less/twbs/code.less +++ b/docs/src/css/less/twbs/code.less @@ -2,62 +2,61 @@ // Code (inline and block) // -------------------------------------------------- - // Inline and block code styles code, kbd, pre, samp { - font-family: @font-family-monospace; + font-family: @font-family-monospace; } // Inline code code { - padding: 2px 4px; - font-size: 90%; - color: @code-color; - background-color: @code-bg; - white-space: nowrap; - border-radius: @border-radius-base; + padding: 2px 4px; + font-size: 90%; + color: @code-color; + background-color: @code-bg; + white-space: nowrap; + border-radius: @border-radius-base; } // User input typically entered via keyboard kbd { - padding: 2px 4px; - font-size: 90%; - color: @kbd-color; - background-color: @kbd-bg; - border-radius: @border-radius-small; - box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); + padding: 2px 4px; + font-size: 90%; + color: @kbd-color; + background-color: @kbd-bg; + border-radius: @border-radius-small; + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); } // Blocks of code pre { - display: block; - padding: ((@line-height-computed - 1) / 2); - margin: 0 0 (@line-height-computed / 2); - font-size: (@font-size-base - 1); // 14px to 13px - line-height: @line-height-base; - word-break: break-all; - word-wrap: break-word; - color: @pre-color; - background-color: @pre-bg; - border: 1px solid @pre-border-color; - border-radius: @border-radius-base; + display: block; + padding: ((@line-height-computed - 1) / 2); + margin: 0 0 (@line-height-computed / 2); + font-size: (@font-size-base - 1); // 14px to 13px + line-height: @line-height-base; + word-break: break-all; + word-wrap: break-word; + color: @pre-color; + background-color: @pre-bg; + border: 1px solid @pre-border-color; + border-radius: @border-radius-base; - // Account for some code outputs that place code tags in pre tags - code { - padding: 0; - font-size: inherit; - color: inherit; - white-space: pre-wrap; - background-color: transparent; - border-radius: 0; - } + // Account for some code outputs that place code tags in pre tags + code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border-radius: 0; + } } // Enable scrollable blocks of code .pre-scrollable { - max-height: @pre-scrollable-max-height; - overflow-y: scroll; + max-height: @pre-scrollable-max-height; + overflow-y: scroll; } diff --git a/docs/src/css/less/twbs/component-animations.less b/docs/src/css/less/twbs/component-animations.less index 1efe45e2..e3a6c7ed 100644 --- a/docs/src/css/less/twbs/component-animations.less +++ b/docs/src/css/less/twbs/component-animations.less @@ -8,22 +8,22 @@ // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552. .fade { - opacity: 0; - .transition(opacity .15s linear); - &.in { - opacity: 1; - } + opacity: 0; + .transition(opacity 0.15s linear); + &.in { + opacity: 1; + } } .collapse { - display: none; - &.in { - display: block; - } + display: none; + &.in { + display: block; + } } .collapsing { - position: relative; - height: 0; - overflow: hidden; - .transition(height .35s ease); + position: relative; + height: 0; + overflow: hidden; + .transition(height 0.35s ease); } diff --git a/docs/src/css/less/twbs/dropdowns.less b/docs/src/css/less/twbs/dropdowns.less index dde2038e..39d883fd 100644 --- a/docs/src/css/less/twbs/dropdowns.less +++ b/docs/src/css/less/twbs/dropdowns.less @@ -2,94 +2,93 @@ // Dropdown menus // -------------------------------------------------- - // Dropdown arrow/caret .caret { - display: inline-block; - width: 0; - height: 0; - margin-left: 2px; - vertical-align: middle; - border-top: @caret-width-base solid; - border-right: @caret-width-base solid transparent; - border-left: @caret-width-base solid transparent; + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: @caret-width-base solid; + border-right: @caret-width-base solid transparent; + border-left: @caret-width-base solid transparent; } // The dropdown wrapper (div) .dropdown { - position: relative; + position: relative; } // Prevent the focus on the dropdown toggle when closing dropdowns .dropdown-toggle:focus { - outline: 0; + outline: 0; } // The dropdown menu (ul) .dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: @zindex-dropdown; - display: none; // none by default, but block on "open" of the menu - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; // override default ul - list-style: none; - font-size: @font-size-base; - background-color: @dropdown-bg; - border: 1px solid @dropdown-fallback-border; // IE8 fallback - border: 1px solid @dropdown-border; - border-radius: @border-radius-base; - .box-shadow(0 6px 12px rgba(0,0,0,.175)); - background-clip: padding-box; - - // Aligns the dropdown menu to right - // - // Deprecated as of 3.1 in favor of `.dropdown-menu-[dir]` - &.pull-right { - right: 0; - left: auto; - } - - // Dividers (basically an hr) within the dropdown - .divider { - .nav-divider(@dropdown-divider-bg); - } - - // Links within the dropdown menu - > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: @line-height-base; - color: @dropdown-link-color; - white-space: nowrap; // prevent links from randomly breaking onto new lines - } + position: absolute; + top: 100%; + left: 0; + z-index: @zindex-dropdown; + display: none; // none by default, but block on "open" of the menu + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; // override default ul + list-style: none; + font-size: @font-size-base; + background-color: @dropdown-bg; + border: 1px solid @dropdown-fallback-border; // IE8 fallback + border: 1px solid @dropdown-border; + border-radius: @border-radius-base; + .box-shadow(0 6px 12px rgba(0,0,0,0.175)); + background-clip: padding-box; + + // Aligns the dropdown menu to right + // + // Deprecated as of 3.1 in favor of `.dropdown-menu-[dir]` + &.pull-right { + right: 0; + left: auto; + } + + // Dividers (basically an hr) within the dropdown + .divider { + .nav-divider(@dropdown-divider-bg); + } + + // Links within the dropdown menu + > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: @line-height-base; + color: @dropdown-link-color; + white-space: nowrap; // prevent links from randomly breaking onto new lines + } } // Hover/Focus state .dropdown-menu > li > a { - &:hover, - &:focus { - text-decoration: none; - color: @dropdown-link-hover-color; - background-color: @dropdown-link-hover-bg; - } + &:hover, + &:focus { + text-decoration: none; + color: @dropdown-link-hover-color; + background-color: @dropdown-link-hover-bg; + } } // Active state .dropdown-menu > .active > a { - &, - &:hover, - &:focus { - color: @dropdown-link-active-color; - text-decoration: none; - outline: 0; - background-color: @dropdown-link-active-bg; - } + &, + &:hover, + &:focus { + color: @dropdown-link-active-color; + text-decoration: none; + outline: 0; + background-color: @dropdown-link-active-bg; + } } // Disabled state @@ -97,35 +96,35 @@ // Gray out text and ensure the hover/focus state remains gray .dropdown-menu > .disabled > a { - &, - &:hover, - &:focus { - color: @dropdown-link-disabled-color; - } + &, + &:hover, + &:focus { + color: @dropdown-link-disabled-color; + } } // Nuke hover/focus effects .dropdown-menu > .disabled > a { - &:hover, - &:focus { - text-decoration: none; - background-color: transparent; - background-image: none; // Remove CSS gradient - .reset-filter(); - cursor: not-allowed; - } + &:hover, + &:focus { + text-decoration: none; + background-color: transparent; + background-image: none; // Remove CSS gradient + .reset-filter(); + cursor: not-allowed; + } } // Open state for the dropdown .open { - // Show the menu - > .dropdown-menu { - display: block; - } + // Show the menu + > .dropdown-menu { + display: block; + } - // Remove the outline when :focus is triggered - > a { - outline: 0; - } + // Remove the outline when :focus is triggered + > a { + outline: 0; + } } // Menu positioning @@ -133,8 +132,8 @@ // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown // menu with the parent. .dropdown-menu-right { - left: auto; // Reset the default from `.dropdown-menu` - right: 0; + left: auto; // Reset the default from `.dropdown-menu` + right: 0; } // With v3, we enabled auto-flipping if you have a dropdown within a right // aligned nav component. To enable the undoing of that, we provide an override @@ -143,33 +142,33 @@ // This is only for left-aligning a dropdown menu within a `.navbar-right` or // `.pull-right` nav component. .dropdown-menu-left { - left: 0; - right: auto; + left: 0; + right: auto; } // Dropdown section headers .dropdown-header { - display: block; - padding: 3px 20px; - font-size: @font-size-small; - line-height: @line-height-base; - color: @dropdown-header-color; + display: block; + padding: 3px 20px; + font-size: @font-size-small; + line-height: @line-height-base; + color: @dropdown-header-color; } // Backdrop to catch body clicks on mobile, etc. .dropdown-backdrop { - position: fixed; - left: 0; - right: 0; - bottom: 0; - top: 0; - z-index: (@zindex-dropdown - 10); + position: fixed; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: (@zindex-dropdown - 10); } // Right aligned dropdowns .pull-right > .dropdown-menu { - right: 0; - left: auto; + right: 0; + left: auto; } // Allow for dropdowns to go bottom up (aka, dropup-menu) @@ -179,35 +178,33 @@ .dropup, .navbar-fixed-bottom .dropdown { - // Reverse the caret - .caret { - border-top: 0; - border-bottom: @caret-width-base solid; - content: ""; - } - // Different positioning for bottom up menu - .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; - } + // Reverse the caret + .caret { + border-top: 0; + border-bottom: @caret-width-base solid; + content: ''; + } + // Different positioning for bottom up menu + .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; + } } - // Component alignment // // Reiterate per navbar.less and the modified component alignment there. @media (min-width: @grid-float-breakpoint) { - .navbar-right { - .dropdown-menu { - .dropdown-menu-right(); - } - // Necessary for overrides of the default right aligned menu. - // Will remove come v4 in all likelihood. - .dropdown-menu-left { - .dropdown-menu-left(); - } - } + .navbar-right { + .dropdown-menu { + .dropdown-menu-right(); + } + // Necessary for overrides of the default right aligned menu. + // Will remove come v4 in all likelihood. + .dropdown-menu-left { + .dropdown-menu-left(); + } + } } - diff --git a/docs/src/css/less/twbs/forms.less b/docs/src/css/less/twbs/forms.less index 6b475ae1..74e98c6a 100644 --- a/docs/src/css/less/twbs/forms.less +++ b/docs/src/css/less/twbs/forms.less @@ -2,102 +2,99 @@ // Forms // -------------------------------------------------- - // Normalize non-controls // // Restyle and baseline non-control form elements. fieldset { - padding: 0; - margin: 0; - border: 0; + padding: 0; + margin: 0; + border: 0; } legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: @line-height-computed; - font-size: (@font-size-base * 1.5); - line-height: inherit; - color: @legend-color; - border: 0; - border-bottom: 1px solid @legend-border-color; + display: block; + width: 100%; + padding: 0; + margin-bottom: @line-height-computed; + font-size: (@font-size-base * 1.5); + line-height: inherit; + color: @legend-color; + border: 0; + border-bottom: 1px solid @legend-border-color; } label { - display: inline-block; - margin-bottom: 5px; - font-weight: bold; + display: inline-block; + margin-bottom: 5px; + font-weight: bold; } - // Normalize form controls // Override content-box in Normalize (* isn't specific enough) -input[type="search"] { - .box-sizing(border-box); +input[type='search'] { + .box-sizing(border-box); } // Position radios and checkboxes better -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; /* IE8-9 */ - line-height: normal; +input[type='radio'], +input[type='checkbox'] { + margin: 4px 0 0; + margin-top: 1px \9; /* IE8-9 */ + line-height: normal; } // Set the height of file controls to match text inputs -input[type="file"] { - display: block; +input[type='file'] { + display: block; } // Make range inputs behave like textual form controls -input[type="range"] { - display: block; - width: 100%; +input[type='range'] { + display: block; + width: 100%; } // Make multiple select elements height not fixed select[multiple], select[size] { - height: auto; + height: auto; } // Fix optgroup Firefox bug per https://github.com/twbs/bootstrap/issues/7611 select optgroup { - font-size: inherit; - font-style: inherit; - font-family: inherit; + font-size: inherit; + font-style: inherit; + font-family: inherit; } // Focus for file, radio, and checkbox -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - .tab-focus(); +input[type='file']:focus, +input[type='radio']:focus, +input[type='checkbox']:focus { + .tab-focus(); } // Fix for Chrome number input // Setting certain font-sizes causes the `I` bar to appear on hover of the bottom increment button. // See https://github.com/twbs/bootstrap/issues/8350 for more. -input[type="number"] { - &::-webkit-outer-spin-button, - &::-webkit-inner-spin-button { - height: auto; - } +input[type='number'] { + &::-webkit-outer-spin-button, + &::-webkit-inner-spin-button { + height: auto; + } } // Adjust output element output { - display: block; - padding-top: (@padding-base-vertical + 1); - font-size: @font-size-base; - line-height: @line-height-base; - color: @input-color; + display: block; + padding-top: (@padding-base-vertical + 1); + font-size: @font-size-base; + line-height: @line-height-base; + color: @input-color; } - // Common form controls // // Shared size and type resets for form controls. Apply `.form-control` to any @@ -121,202 +118,194 @@ output { // input[type="color"] .form-control { - display: block; - width: 100%; - height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border) - padding: @padding-base-vertical @padding-base-horizontal; - font-size: @font-size-base; - line-height: @line-height-base; - color: @input-color; - background-color: @input-bg; - background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 - border: 1px solid @input-border; - border-radius: @input-border-radius; - .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); - .transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s"); - - // Customize the `:focus` state to imitate native WebKit styles. - .form-control-focus(); - - // Placeholder - // - // Placeholder text gets special styles because when browsers invalidate entire - // lines if it doesn't understand a selector/ - .placeholder(); - - // Disabled and read-only inputs - // Note: HTML5 says that controls under a fieldset > legend:first-child won't - // be disabled if the fieldset is disabled. Due to implementation difficulty, - // we don't honor that edge case; we style them as disabled anyway. - &[disabled], - &[readonly], - fieldset[disabled] & { - cursor: not-allowed; - background-color: @input-bg-disabled; - } - - // Reset height for `textarea`s - textarea& { - height: auto; - } + display: block; + width: 100%; + height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border) + padding: @padding-base-vertical @padding-base-horizontal; + font-size: @font-size-base; + line-height: @line-height-base; + color: @input-color; + background-color: @input-bg; + background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 + border: 1px solid @input-border; + border-radius: @input-border-radius; + .box-shadow(inset 0 1px 1px rgba(0,0,0,0.075)); + .transition(~'border-color ease-in-out .15s, box-shadow ease-in-out .15s'); + + // Customize the `:focus` state to imitate native WebKit styles. + .form-control-focus(); + + // Placeholder + // + // Placeholder text gets special styles because when browsers invalidate entire + // lines if it doesn't understand a selector/ + .placeholder(); + + // Disabled and read-only inputs + // Note: HTML5 says that controls under a fieldset > legend:first-child won't + // be disabled if the fieldset is disabled. Due to implementation difficulty, + // we don't honor that edge case; we style them as disabled anyway. + &[disabled], + &[readonly], + fieldset[disabled] & { + cursor: not-allowed; + background-color: @input-bg-disabled; + } + + // Reset height for `textarea`s + textarea& { + height: auto; + } } // Special styles for iOS date input // // In Mobile Safari, date inputs require a pixel line-height that matches the // given height of the input. -input[type="date"] { - line-height: @input-height-base; +input[type='date'] { + line-height: @input-height-base; } - // Form groups // // Designed to help with the organization and spacing of vertical forms. For // horizontal forms, use the predefined grid classes. .form-group { - margin-bottom: 15px; + margin-bottom: 15px; } - // Checkboxes and radios // // Indent the labels to position radios/checkboxes as hanging controls. .radio, .checkbox { - display: block; - min-height: @line-height-computed; // clear the floating input if there is no label text - margin-top: 10px; - margin-bottom: 10px; - padding-left: 20px; - label { - display: inline; - font-weight: normal; - cursor: pointer; - } + display: block; + min-height: @line-height-computed; // clear the floating input if there is no label text + margin-top: 10px; + margin-bottom: 10px; + padding-left: 20px; + label { + display: inline; + font-weight: normal; + cursor: pointer; + } } -.radio input[type="radio"], -.radio-inline input[type="radio"], -.checkbox input[type="checkbox"], -.checkbox-inline input[type="checkbox"] { - float: left; - margin-left: -20px; +.radio input[type='radio'], +.radio-inline input[type='radio'], +.checkbox input[type='checkbox'], +.checkbox-inline input[type='checkbox'] { + float: left; + margin-left: -20px; } .radio + .radio, .checkbox + .checkbox { - margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing + margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing } // Radios and checkboxes on same line .radio-inline, .checkbox-inline { - display: inline-block; - padding-left: 20px; - margin-bottom: 0; - vertical-align: middle; - font-weight: normal; - cursor: pointer; + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + vertical-align: middle; + font-weight: normal; + cursor: pointer; } .radio-inline + .radio-inline, .checkbox-inline + .checkbox-inline { - margin-top: 0; - margin-left: 10px; // space out consecutive inline controls + margin-top: 0; + margin-left: 10px; // space out consecutive inline controls } // Apply same disabled cursor tweak as for inputs // // Note: Neither radios nor checkboxes can be readonly. -input[type="radio"], -input[type="checkbox"], +input[type='radio'], +input[type='checkbox'], .radio, .radio-inline, .checkbox, .checkbox-inline { - &[disabled], - fieldset[disabled] & { - cursor: not-allowed; - } + &[disabled], + fieldset[disabled] & { + cursor: not-allowed; + } } - // Form control sizing // // Build on `.form-control` with modifier classes to decrease or increase the // height and font-size of form controls. .input-sm { - .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); + .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); } .input-lg { - .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); + .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); } - // Form control feedback states // // Apply contextual and semantic states to individual form controls. .has-feedback { - // Enable absolute positioning - position: relative; - - // Ensure icons don't overlap text - .form-control { - padding-right: (@input-height-base * 1.25); - } - - // Feedback icon (requires .glyphicon classes) - .form-control-feedback { - position: absolute; - top: (@line-height-computed + 5); // Height of the `label` and its margin - right: 0; - display: block; - width: @input-height-base; - height: @input-height-base; - line-height: @input-height-base; - text-align: center; - } + // Enable absolute positioning + position: relative; + + // Ensure icons don't overlap text + .form-control { + padding-right: (@input-height-base * 1.25); + } + + // Feedback icon (requires .glyphicon classes) + .form-control-feedback { + position: absolute; + top: (@line-height-computed + 5); // Height of the `label` and its margin + right: 0; + display: block; + width: @input-height-base; + height: @input-height-base; + line-height: @input-height-base; + text-align: center; + } } // Feedback states .has-success { - .form-control-validation(@state-success-text; @state-success-text; @state-success-bg); + .form-control-validation(@state-success-text; @state-success-text; @state-success-bg); } .has-warning { - .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg); + .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg); } .has-error { - .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg); + .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg); } - // Static form control text // // Apply class to a `p` element to make any string of text align with labels in // a horizontal form layout. .form-control-static { - margin-bottom: 0; // Remove default margin from `p` + margin-bottom: 0; // Remove default margin from `p` } - // Help text // // Apply to any element you wish to create light text for placement immediately // below a form control. Use for general help, formatting, or instructional text. .help-block { - display: block; // account for any element using help-block - margin-top: 5px; - margin-bottom: 10px; - color: lighten(@text-color, 25%); // lighten the text some for contrast + display: block; // account for any element using help-block + margin-top: 5px; + margin-bottom: 10px; + color: lighten(@text-color, 25%); // lighten the text some for contrast } - - // Inline forms // // Make forms appear inline(-block) by adding the `.form-inline` class. Inline @@ -329,102 +318,99 @@ input[type="checkbox"], // Heads up! This is mixin-ed into `.navbar-form` in navbars.less. .form-inline { - - // Kick in the inline - @media (min-width: @screen-sm-min) { - // Inline-block all the things for "inline" - .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - - // In navbar-form, allow folks to *not* use `.form-group` - .form-control { - display: inline-block; - width: auto; // Prevent labels from stacking above inputs in `.form-group` - vertical-align: middle; - } - - .control-label { - margin-bottom: 0; - vertical-align: middle; - } - - // Remove default margin on radios/checkboxes that were used for stacking, and - // then undo the floating of radios and checkboxes to match (which also avoids - // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969). - .radio, - .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - padding-left: 0; - vertical-align: middle; - } - .radio input[type="radio"], - .checkbox input[type="checkbox"] { - float: none; - margin-left: 0; - } - - // Validation states - // - // Reposition the icon because it's now within a grid column and columns have - // `position: relative;` on them. Also accounts for the grid gutter padding. - .has-feedback .form-control-feedback { - top: 0; - } - } + // Kick in the inline + @media (min-width: @screen-sm-min) { + // Inline-block all the things for "inline" + .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + + // In navbar-form, allow folks to *not* use `.form-group` + .form-control { + display: inline-block; + width: auto; // Prevent labels from stacking above inputs in `.form-group` + vertical-align: middle; + } + + .control-label { + margin-bottom: 0; + vertical-align: middle; + } + + // Remove default margin on radios/checkboxes that were used for stacking, and + // then undo the floating of radios and checkboxes to match (which also avoids + // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969). + .radio, + .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; + vertical-align: middle; + } + .radio input[type='radio'], + .checkbox input[type='checkbox'] { + float: none; + margin-left: 0; + } + + // Validation states + // + // Reposition the icon because it's now within a grid column and columns have + // `position: relative;` on them. Also accounts for the grid gutter padding. + .has-feedback .form-control-feedback { + top: 0; + } + } } - // Horizontal forms // // Horizontal forms are built on grid classes and allow you to create forms with // labels on the left and inputs on the right. .form-horizontal { - - // Consistent vertical alignment of labels, radios, and checkboxes - .control-label, - .radio, - .checkbox, - .radio-inline, - .checkbox-inline { - margin-top: 0; - margin-bottom: 0; - padding-top: (@padding-base-vertical + 1); // Default padding plus a border - } - // Account for padding we're adding to ensure the alignment and of help text - // and other content below items - .radio, - .checkbox { - min-height: (@line-height-computed + (@padding-base-vertical + 1)); - } - - // Make form groups behave like rows - .form-group { - .make-row(); - } - - .form-control-static { - padding-top: (@padding-base-vertical + 1); - } - - // Only right align form labels here when the columns stop stacking - @media (min-width: @screen-sm-min) { - .control-label { - text-align: right; - } - } - - // Validation states - // - // Reposition the icon because it's now within a grid column and columns have - // `position: relative;` on them. Also accounts for the grid gutter padding. - .has-feedback .form-control-feedback { - top: 0; - right: (@grid-gutter-width / 2); - } + // Consistent vertical alignment of labels, radios, and checkboxes + .control-label, + .radio, + .checkbox, + .radio-inline, + .checkbox-inline { + margin-top: 0; + margin-bottom: 0; + padding-top: (@padding-base-vertical + 1); // Default padding plus a border + } + // Account for padding we're adding to ensure the alignment and of help text + // and other content below items + .radio, + .checkbox { + min-height: (@line-height-computed + (@padding-base-vertical + 1)); + } + + // Make form groups behave like rows + .form-group { + .make-row(); + } + + .form-control-static { + padding-top: (@padding-base-vertical + 1); + } + + // Only right align form labels here when the columns stop stacking + @media (min-width: @screen-sm-min) { + .control-label { + text-align: right; + } + } + + // Validation states + // + // Reposition the icon because it's now within a grid column and columns have + // `position: relative;` on them. Also accounts for the grid gutter padding. + .has-feedback .form-control-feedback { + top: 0; + right: (@grid-gutter-width / 2); + } } diff --git a/docs/src/css/less/twbs/glyphicons.less b/docs/src/css/less/twbs/glyphicons.less index 789c5e7f..54af2380 100644 --- a/docs/src/css/less/twbs/glyphicons.less +++ b/docs/src/css/less/twbs/glyphicons.less @@ -9,225 +9,1025 @@ // Import the fonts @font-face { - font-family: 'Glyphicons Halflings'; - src: ~"url('@{icon-font-path}@{icon-font-name}.eot')"; - src: ~"url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype')", - ~"url('@{icon-font-path}@{icon-font-name}.woff') format('woff')", - ~"url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype')", - ~"url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg')"; + font-family: 'Glyphicons Halflings'; + src: ~"url('@{icon-font-path}@{icon-font-name}.eot')"; + src: ~"url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype')", + ~"url('@{icon-font-path}@{icon-font-name}.woff') format('woff')", + ~"url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype')", + ~"url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg')"; } // Catchall baseclass .glyphicon { - position: relative; - top: 1px; - display: inline-block; - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: normal; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } // Individual icons -.glyphicon-asterisk { &:before { content: "\2a"; } } -.glyphicon-plus { &:before { content: "\2b"; } } -.glyphicon-euro { &:before { content: "\20ac"; } } -.glyphicon-minus { &:before { content: "\2212"; } } -.glyphicon-cloud { &:before { content: "\2601"; } } -.glyphicon-envelope { &:before { content: "\2709"; } } -.glyphicon-pencil { &:before { content: "\270f"; } } -.glyphicon-glass { &:before { content: "\e001"; } } -.glyphicon-music { &:before { content: "\e002"; } } -.glyphicon-search { &:before { content: "\e003"; } } -.glyphicon-heart { &:before { content: "\e005"; } } -.glyphicon-star { &:before { content: "\e006"; } } -.glyphicon-star-empty { &:before { content: "\e007"; } } -.glyphicon-user { &:before { content: "\e008"; } } -.glyphicon-film { &:before { content: "\e009"; } } -.glyphicon-th-large { &:before { content: "\e010"; } } -.glyphicon-th { &:before { content: "\e011"; } } -.glyphicon-th-list { &:before { content: "\e012"; } } -.glyphicon-ok { &:before { content: "\e013"; } } -.glyphicon-remove { &:before { content: "\e014"; } } -.glyphicon-zoom-in { &:before { content: "\e015"; } } -.glyphicon-zoom-out { &:before { content: "\e016"; } } -.glyphicon-off { &:before { content: "\e017"; } } -.glyphicon-signal { &:before { content: "\e018"; } } -.glyphicon-cog { &:before { content: "\e019"; } } -.glyphicon-trash { &:before { content: "\e020"; } } -.glyphicon-home { &:before { content: "\e021"; } } -.glyphicon-file { &:before { content: "\e022"; } } -.glyphicon-time { &:before { content: "\e023"; } } -.glyphicon-road { &:before { content: "\e024"; } } -.glyphicon-download-alt { &:before { content: "\e025"; } } -.glyphicon-download { &:before { content: "\e026"; } } -.glyphicon-upload { &:before { content: "\e027"; } } -.glyphicon-inbox { &:before { content: "\e028"; } } -.glyphicon-play-circle { &:before { content: "\e029"; } } -.glyphicon-repeat { &:before { content: "\e030"; } } -.glyphicon-refresh { &:before { content: "\e031"; } } -.glyphicon-list-alt { &:before { content: "\e032"; } } -.glyphicon-lock { &:before { content: "\e033"; } } -.glyphicon-flag { &:before { content: "\e034"; } } -.glyphicon-headphones { &:before { content: "\e035"; } } -.glyphicon-volume-off { &:before { content: "\e036"; } } -.glyphicon-volume-down { &:before { content: "\e037"; } } -.glyphicon-volume-up { &:before { content: "\e038"; } } -.glyphicon-qrcode { &:before { content: "\e039"; } } -.glyphicon-barcode { &:before { content: "\e040"; } } -.glyphicon-tag { &:before { content: "\e041"; } } -.glyphicon-tags { &:before { content: "\e042"; } } -.glyphicon-book { &:before { content: "\e043"; } } -.glyphicon-bookmark { &:before { content: "\e044"; } } -.glyphicon-print { &:before { content: "\e045"; } } -.glyphicon-camera { &:before { content: "\e046"; } } -.glyphicon-font { &:before { content: "\e047"; } } -.glyphicon-bold { &:before { content: "\e048"; } } -.glyphicon-italic { &:before { content: "\e049"; } } -.glyphicon-text-height { &:before { content: "\e050"; } } -.glyphicon-text-width { &:before { content: "\e051"; } } -.glyphicon-align-left { &:before { content: "\e052"; } } -.glyphicon-align-center { &:before { content: "\e053"; } } -.glyphicon-align-right { &:before { content: "\e054"; } } -.glyphicon-align-justify { &:before { content: "\e055"; } } -.glyphicon-list { &:before { content: "\e056"; } } -.glyphicon-indent-left { &:before { content: "\e057"; } } -.glyphicon-indent-right { &:before { content: "\e058"; } } -.glyphicon-facetime-video { &:before { content: "\e059"; } } -.glyphicon-picture { &:before { content: "\e060"; } } -.glyphicon-map-marker { &:before { content: "\e062"; } } -.glyphicon-adjust { &:before { content: "\e063"; } } -.glyphicon-tint { &:before { content: "\e064"; } } -.glyphicon-edit { &:before { content: "\e065"; } } -.glyphicon-share { &:before { content: "\e066"; } } -.glyphicon-check { &:before { content: "\e067"; } } -.glyphicon-move { &:before { content: "\e068"; } } -.glyphicon-step-backward { &:before { content: "\e069"; } } -.glyphicon-fast-backward { &:before { content: "\e070"; } } -.glyphicon-backward { &:before { content: "\e071"; } } -.glyphicon-play { &:before { content: "\e072"; } } -.glyphicon-pause { &:before { content: "\e073"; } } -.glyphicon-stop { &:before { content: "\e074"; } } -.glyphicon-forward { &:before { content: "\e075"; } } -.glyphicon-fast-forward { &:before { content: "\e076"; } } -.glyphicon-step-forward { &:before { content: "\e077"; } } -.glyphicon-eject { &:before { content: "\e078"; } } -.glyphicon-chevron-left { &:before { content: "\e079"; } } -.glyphicon-chevron-right { &:before { content: "\e080"; } } -.glyphicon-plus-sign { &:before { content: "\e081"; } } -.glyphicon-minus-sign { &:before { content: "\e082"; } } -.glyphicon-remove-sign { &:before { content: "\e083"; } } -.glyphicon-ok-sign { &:before { content: "\e084"; } } -.glyphicon-question-sign { &:before { content: "\e085"; } } -.glyphicon-info-sign { &:before { content: "\e086"; } } -.glyphicon-screenshot { &:before { content: "\e087"; } } -.glyphicon-remove-circle { &:before { content: "\e088"; } } -.glyphicon-ok-circle { &:before { content: "\e089"; } } -.glyphicon-ban-circle { &:before { content: "\e090"; } } -.glyphicon-arrow-left { &:before { content: "\e091"; } } -.glyphicon-arrow-right { &:before { content: "\e092"; } } -.glyphicon-arrow-up { &:before { content: "\e093"; } } -.glyphicon-arrow-down { &:before { content: "\e094"; } } -.glyphicon-share-alt { &:before { content: "\e095"; } } -.glyphicon-resize-full { &:before { content: "\e096"; } } -.glyphicon-resize-small { &:before { content: "\e097"; } } -.glyphicon-exclamation-sign { &:before { content: "\e101"; } } -.glyphicon-gift { &:before { content: "\e102"; } } -.glyphicon-leaf { &:before { content: "\e103"; } } -.glyphicon-fire { &:before { content: "\e104"; } } -.glyphicon-eye-open { &:before { content: "\e105"; } } -.glyphicon-eye-close { &:before { content: "\e106"; } } -.glyphicon-warning-sign { &:before { content: "\e107"; } } -.glyphicon-plane { &:before { content: "\e108"; } } -.glyphicon-calendar { &:before { content: "\e109"; } } -.glyphicon-random { &:before { content: "\e110"; } } -.glyphicon-comment { &:before { content: "\e111"; } } -.glyphicon-magnet { &:before { content: "\e112"; } } -.glyphicon-chevron-up { &:before { content: "\e113"; } } -.glyphicon-chevron-down { &:before { content: "\e114"; } } -.glyphicon-retweet { &:before { content: "\e115"; } } -.glyphicon-shopping-cart { &:before { content: "\e116"; } } -.glyphicon-folder-close { &:before { content: "\e117"; } } -.glyphicon-folder-open { &:before { content: "\e118"; } } -.glyphicon-resize-vertical { &:before { content: "\e119"; } } -.glyphicon-resize-horizontal { &:before { content: "\e120"; } } -.glyphicon-hdd { &:before { content: "\e121"; } } -.glyphicon-bullhorn { &:before { content: "\e122"; } } -.glyphicon-bell { &:before { content: "\e123"; } } -.glyphicon-certificate { &:before { content: "\e124"; } } -.glyphicon-thumbs-up { &:before { content: "\e125"; } } -.glyphicon-thumbs-down { &:before { content: "\e126"; } } -.glyphicon-hand-right { &:before { content: "\e127"; } } -.glyphicon-hand-left { &:before { content: "\e128"; } } -.glyphicon-hand-up { &:before { content: "\e129"; } } -.glyphicon-hand-down { &:before { content: "\e130"; } } -.glyphicon-circle-arrow-right { &:before { content: "\e131"; } } -.glyphicon-circle-arrow-left { &:before { content: "\e132"; } } -.glyphicon-circle-arrow-up { &:before { content: "\e133"; } } -.glyphicon-circle-arrow-down { &:before { content: "\e134"; } } -.glyphicon-globe { &:before { content: "\e135"; } } -.glyphicon-wrench { &:before { content: "\e136"; } } -.glyphicon-tasks { &:before { content: "\e137"; } } -.glyphicon-filter { &:before { content: "\e138"; } } -.glyphicon-briefcase { &:before { content: "\e139"; } } -.glyphicon-fullscreen { &:before { content: "\e140"; } } -.glyphicon-dashboard { &:before { content: "\e141"; } } -.glyphicon-paperclip { &:before { content: "\e142"; } } -.glyphicon-heart-empty { &:before { content: "\e143"; } } -.glyphicon-link { &:before { content: "\e144"; } } -.glyphicon-phone { &:before { content: "\e145"; } } -.glyphicon-pushpin { &:before { content: "\e146"; } } -.glyphicon-usd { &:before { content: "\e148"; } } -.glyphicon-gbp { &:before { content: "\e149"; } } -.glyphicon-sort { &:before { content: "\e150"; } } -.glyphicon-sort-by-alphabet { &:before { content: "\e151"; } } -.glyphicon-sort-by-alphabet-alt { &:before { content: "\e152"; } } -.glyphicon-sort-by-order { &:before { content: "\e153"; } } -.glyphicon-sort-by-order-alt { &:before { content: "\e154"; } } -.glyphicon-sort-by-attributes { &:before { content: "\e155"; } } -.glyphicon-sort-by-attributes-alt { &:before { content: "\e156"; } } -.glyphicon-unchecked { &:before { content: "\e157"; } } -.glyphicon-expand { &:before { content: "\e158"; } } -.glyphicon-collapse-down { &:before { content: "\e159"; } } -.glyphicon-collapse-up { &:before { content: "\e160"; } } -.glyphicon-log-in { &:before { content: "\e161"; } } -.glyphicon-flash { &:before { content: "\e162"; } } -.glyphicon-log-out { &:before { content: "\e163"; } } -.glyphicon-new-window { &:before { content: "\e164"; } } -.glyphicon-record { &:before { content: "\e165"; } } -.glyphicon-save { &:before { content: "\e166"; } } -.glyphicon-open { &:before { content: "\e167"; } } -.glyphicon-saved { &:before { content: "\e168"; } } -.glyphicon-import { &:before { content: "\e169"; } } -.glyphicon-export { &:before { content: "\e170"; } } -.glyphicon-send { &:before { content: "\e171"; } } -.glyphicon-floppy-disk { &:before { content: "\e172"; } } -.glyphicon-floppy-saved { &:before { content: "\e173"; } } -.glyphicon-floppy-remove { &:before { content: "\e174"; } } -.glyphicon-floppy-save { &:before { content: "\e175"; } } -.glyphicon-floppy-open { &:before { content: "\e176"; } } -.glyphicon-credit-card { &:before { content: "\e177"; } } -.glyphicon-transfer { &:before { content: "\e178"; } } -.glyphicon-cutlery { &:before { content: "\e179"; } } -.glyphicon-header { &:before { content: "\e180"; } } -.glyphicon-compressed { &:before { content: "\e181"; } } -.glyphicon-earphone { &:before { content: "\e182"; } } -.glyphicon-phone-alt { &:before { content: "\e183"; } } -.glyphicon-tower { &:before { content: "\e184"; } } -.glyphicon-stats { &:before { content: "\e185"; } } -.glyphicon-sd-video { &:before { content: "\e186"; } } -.glyphicon-hd-video { &:before { content: "\e187"; } } -.glyphicon-subtitles { &:before { content: "\e188"; } } -.glyphicon-sound-stereo { &:before { content: "\e189"; } } -.glyphicon-sound-dolby { &:before { content: "\e190"; } } -.glyphicon-sound-5-1 { &:before { content: "\e191"; } } -.glyphicon-sound-6-1 { &:before { content: "\e192"; } } -.glyphicon-sound-7-1 { &:before { content: "\e193"; } } -.glyphicon-copyright-mark { &:before { content: "\e194"; } } -.glyphicon-registration-mark { &:before { content: "\e195"; } } -.glyphicon-cloud-download { &:before { content: "\e197"; } } -.glyphicon-cloud-upload { &:before { content: "\e198"; } } -.glyphicon-tree-conifer { &:before { content: "\e199"; } } -.glyphicon-tree-deciduous { &:before { content: "\e200"; } } +.glyphicon-asterisk { + &:before { + content: '\2a'; + } +} +.glyphicon-plus { + &:before { + content: '\2b'; + } +} +.glyphicon-euro { + &:before { + content: '\20ac'; + } +} +.glyphicon-minus { + &:before { + content: '\2212'; + } +} +.glyphicon-cloud { + &:before { + content: '\2601'; + } +} +.glyphicon-envelope { + &:before { + content: '\2709'; + } +} +.glyphicon-pencil { + &:before { + content: '\270f'; + } +} +.glyphicon-glass { + &:before { + content: '\e001'; + } +} +.glyphicon-music { + &:before { + content: '\e002'; + } +} +.glyphicon-search { + &:before { + content: '\e003'; + } +} +.glyphicon-heart { + &:before { + content: '\e005'; + } +} +.glyphicon-star { + &:before { + content: '\e006'; + } +} +.glyphicon-star-empty { + &:before { + content: '\e007'; + } +} +.glyphicon-user { + &:before { + content: '\e008'; + } +} +.glyphicon-film { + &:before { + content: '\e009'; + } +} +.glyphicon-th-large { + &:before { + content: '\e010'; + } +} +.glyphicon-th { + &:before { + content: '\e011'; + } +} +.glyphicon-th-list { + &:before { + content: '\e012'; + } +} +.glyphicon-ok { + &:before { + content: '\e013'; + } +} +.glyphicon-remove { + &:before { + content: '\e014'; + } +} +.glyphicon-zoom-in { + &:before { + content: '\e015'; + } +} +.glyphicon-zoom-out { + &:before { + content: '\e016'; + } +} +.glyphicon-off { + &:before { + content: '\e017'; + } +} +.glyphicon-signal { + &:before { + content: '\e018'; + } +} +.glyphicon-cog { + &:before { + content: '\e019'; + } +} +.glyphicon-trash { + &:before { + content: '\e020'; + } +} +.glyphicon-home { + &:before { + content: '\e021'; + } +} +.glyphicon-file { + &:before { + content: '\e022'; + } +} +.glyphicon-time { + &:before { + content: '\e023'; + } +} +.glyphicon-road { + &:before { + content: '\e024'; + } +} +.glyphicon-download-alt { + &:before { + content: '\e025'; + } +} +.glyphicon-download { + &:before { + content: '\e026'; + } +} +.glyphicon-upload { + &:before { + content: '\e027'; + } +} +.glyphicon-inbox { + &:before { + content: '\e028'; + } +} +.glyphicon-play-circle { + &:before { + content: '\e029'; + } +} +.glyphicon-repeat { + &:before { + content: '\e030'; + } +} +.glyphicon-refresh { + &:before { + content: '\e031'; + } +} +.glyphicon-list-alt { + &:before { + content: '\e032'; + } +} +.glyphicon-lock { + &:before { + content: '\e033'; + } +} +.glyphicon-flag { + &:before { + content: '\e034'; + } +} +.glyphicon-headphones { + &:before { + content: '\e035'; + } +} +.glyphicon-volume-off { + &:before { + content: '\e036'; + } +} +.glyphicon-volume-down { + &:before { + content: '\e037'; + } +} +.glyphicon-volume-up { + &:before { + content: '\e038'; + } +} +.glyphicon-qrcode { + &:before { + content: '\e039'; + } +} +.glyphicon-barcode { + &:before { + content: '\e040'; + } +} +.glyphicon-tag { + &:before { + content: '\e041'; + } +} +.glyphicon-tags { + &:before { + content: '\e042'; + } +} +.glyphicon-book { + &:before { + content: '\e043'; + } +} +.glyphicon-bookmark { + &:before { + content: '\e044'; + } +} +.glyphicon-print { + &:before { + content: '\e045'; + } +} +.glyphicon-camera { + &:before { + content: '\e046'; + } +} +.glyphicon-font { + &:before { + content: '\e047'; + } +} +.glyphicon-bold { + &:before { + content: '\e048'; + } +} +.glyphicon-italic { + &:before { + content: '\e049'; + } +} +.glyphicon-text-height { + &:before { + content: '\e050'; + } +} +.glyphicon-text-width { + &:before { + content: '\e051'; + } +} +.glyphicon-align-left { + &:before { + content: '\e052'; + } +} +.glyphicon-align-center { + &:before { + content: '\e053'; + } +} +.glyphicon-align-right { + &:before { + content: '\e054'; + } +} +.glyphicon-align-justify { + &:before { + content: '\e055'; + } +} +.glyphicon-list { + &:before { + content: '\e056'; + } +} +.glyphicon-indent-left { + &:before { + content: '\e057'; + } +} +.glyphicon-indent-right { + &:before { + content: '\e058'; + } +} +.glyphicon-facetime-video { + &:before { + content: '\e059'; + } +} +.glyphicon-picture { + &:before { + content: '\e060'; + } +} +.glyphicon-map-marker { + &:before { + content: '\e062'; + } +} +.glyphicon-adjust { + &:before { + content: '\e063'; + } +} +.glyphicon-tint { + &:before { + content: '\e064'; + } +} +.glyphicon-edit { + &:before { + content: '\e065'; + } +} +.glyphicon-share { + &:before { + content: '\e066'; + } +} +.glyphicon-check { + &:before { + content: '\e067'; + } +} +.glyphicon-move { + &:before { + content: '\e068'; + } +} +.glyphicon-step-backward { + &:before { + content: '\e069'; + } +} +.glyphicon-fast-backward { + &:before { + content: '\e070'; + } +} +.glyphicon-backward { + &:before { + content: '\e071'; + } +} +.glyphicon-play { + &:before { + content: '\e072'; + } +} +.glyphicon-pause { + &:before { + content: '\e073'; + } +} +.glyphicon-stop { + &:before { + content: '\e074'; + } +} +.glyphicon-forward { + &:before { + content: '\e075'; + } +} +.glyphicon-fast-forward { + &:before { + content: '\e076'; + } +} +.glyphicon-step-forward { + &:before { + content: '\e077'; + } +} +.glyphicon-eject { + &:before { + content: '\e078'; + } +} +.glyphicon-chevron-left { + &:before { + content: '\e079'; + } +} +.glyphicon-chevron-right { + &:before { + content: '\e080'; + } +} +.glyphicon-plus-sign { + &:before { + content: '\e081'; + } +} +.glyphicon-minus-sign { + &:before { + content: '\e082'; + } +} +.glyphicon-remove-sign { + &:before { + content: '\e083'; + } +} +.glyphicon-ok-sign { + &:before { + content: '\e084'; + } +} +.glyphicon-question-sign { + &:before { + content: '\e085'; + } +} +.glyphicon-info-sign { + &:before { + content: '\e086'; + } +} +.glyphicon-screenshot { + &:before { + content: '\e087'; + } +} +.glyphicon-remove-circle { + &:before { + content: '\e088'; + } +} +.glyphicon-ok-circle { + &:before { + content: '\e089'; + } +} +.glyphicon-ban-circle { + &:before { + content: '\e090'; + } +} +.glyphicon-arrow-left { + &:before { + content: '\e091'; + } +} +.glyphicon-arrow-right { + &:before { + content: '\e092'; + } +} +.glyphicon-arrow-up { + &:before { + content: '\e093'; + } +} +.glyphicon-arrow-down { + &:before { + content: '\e094'; + } +} +.glyphicon-share-alt { + &:before { + content: '\e095'; + } +} +.glyphicon-resize-full { + &:before { + content: '\e096'; + } +} +.glyphicon-resize-small { + &:before { + content: '\e097'; + } +} +.glyphicon-exclamation-sign { + &:before { + content: '\e101'; + } +} +.glyphicon-gift { + &:before { + content: '\e102'; + } +} +.glyphicon-leaf { + &:before { + content: '\e103'; + } +} +.glyphicon-fire { + &:before { + content: '\e104'; + } +} +.glyphicon-eye-open { + &:before { + content: '\e105'; + } +} +.glyphicon-eye-close { + &:before { + content: '\e106'; + } +} +.glyphicon-warning-sign { + &:before { + content: '\e107'; + } +} +.glyphicon-plane { + &:before { + content: '\e108'; + } +} +.glyphicon-calendar { + &:before { + content: '\e109'; + } +} +.glyphicon-random { + &:before { + content: '\e110'; + } +} +.glyphicon-comment { + &:before { + content: '\e111'; + } +} +.glyphicon-magnet { + &:before { + content: '\e112'; + } +} +.glyphicon-chevron-up { + &:before { + content: '\e113'; + } +} +.glyphicon-chevron-down { + &:before { + content: '\e114'; + } +} +.glyphicon-retweet { + &:before { + content: '\e115'; + } +} +.glyphicon-shopping-cart { + &:before { + content: '\e116'; + } +} +.glyphicon-folder-close { + &:before { + content: '\e117'; + } +} +.glyphicon-folder-open { + &:before { + content: '\e118'; + } +} +.glyphicon-resize-vertical { + &:before { + content: '\e119'; + } +} +.glyphicon-resize-horizontal { + &:before { + content: '\e120'; + } +} +.glyphicon-hdd { + &:before { + content: '\e121'; + } +} +.glyphicon-bullhorn { + &:before { + content: '\e122'; + } +} +.glyphicon-bell { + &:before { + content: '\e123'; + } +} +.glyphicon-certificate { + &:before { + content: '\e124'; + } +} +.glyphicon-thumbs-up { + &:before { + content: '\e125'; + } +} +.glyphicon-thumbs-down { + &:before { + content: '\e126'; + } +} +.glyphicon-hand-right { + &:before { + content: '\e127'; + } +} +.glyphicon-hand-left { + &:before { + content: '\e128'; + } +} +.glyphicon-hand-up { + &:before { + content: '\e129'; + } +} +.glyphicon-hand-down { + &:before { + content: '\e130'; + } +} +.glyphicon-circle-arrow-right { + &:before { + content: '\e131'; + } +} +.glyphicon-circle-arrow-left { + &:before { + content: '\e132'; + } +} +.glyphicon-circle-arrow-up { + &:before { + content: '\e133'; + } +} +.glyphicon-circle-arrow-down { + &:before { + content: '\e134'; + } +} +.glyphicon-globe { + &:before { + content: '\e135'; + } +} +.glyphicon-wrench { + &:before { + content: '\e136'; + } +} +.glyphicon-tasks { + &:before { + content: '\e137'; + } +} +.glyphicon-filter { + &:before { + content: '\e138'; + } +} +.glyphicon-briefcase { + &:before { + content: '\e139'; + } +} +.glyphicon-fullscreen { + &:before { + content: '\e140'; + } +} +.glyphicon-dashboard { + &:before { + content: '\e141'; + } +} +.glyphicon-paperclip { + &:before { + content: '\e142'; + } +} +.glyphicon-heart-empty { + &:before { + content: '\e143'; + } +} +.glyphicon-link { + &:before { + content: '\e144'; + } +} +.glyphicon-phone { + &:before { + content: '\e145'; + } +} +.glyphicon-pushpin { + &:before { + content: '\e146'; + } +} +.glyphicon-usd { + &:before { + content: '\e148'; + } +} +.glyphicon-gbp { + &:before { + content: '\e149'; + } +} +.glyphicon-sort { + &:before { + content: '\e150'; + } +} +.glyphicon-sort-by-alphabet { + &:before { + content: '\e151'; + } +} +.glyphicon-sort-by-alphabet-alt { + &:before { + content: '\e152'; + } +} +.glyphicon-sort-by-order { + &:before { + content: '\e153'; + } +} +.glyphicon-sort-by-order-alt { + &:before { + content: '\e154'; + } +} +.glyphicon-sort-by-attributes { + &:before { + content: '\e155'; + } +} +.glyphicon-sort-by-attributes-alt { + &:before { + content: '\e156'; + } +} +.glyphicon-unchecked { + &:before { + content: '\e157'; + } +} +.glyphicon-expand { + &:before { + content: '\e158'; + } +} +.glyphicon-collapse-down { + &:before { + content: '\e159'; + } +} +.glyphicon-collapse-up { + &:before { + content: '\e160'; + } +} +.glyphicon-log-in { + &:before { + content: '\e161'; + } +} +.glyphicon-flash { + &:before { + content: '\e162'; + } +} +.glyphicon-log-out { + &:before { + content: '\e163'; + } +} +.glyphicon-new-window { + &:before { + content: '\e164'; + } +} +.glyphicon-record { + &:before { + content: '\e165'; + } +} +.glyphicon-save { + &:before { + content: '\e166'; + } +} +.glyphicon-open { + &:before { + content: '\e167'; + } +} +.glyphicon-saved { + &:before { + content: '\e168'; + } +} +.glyphicon-import { + &:before { + content: '\e169'; + } +} +.glyphicon-export { + &:before { + content: '\e170'; + } +} +.glyphicon-send { + &:before { + content: '\e171'; + } +} +.glyphicon-floppy-disk { + &:before { + content: '\e172'; + } +} +.glyphicon-floppy-saved { + &:before { + content: '\e173'; + } +} +.glyphicon-floppy-remove { + &:before { + content: '\e174'; + } +} +.glyphicon-floppy-save { + &:before { + content: '\e175'; + } +} +.glyphicon-floppy-open { + &:before { + content: '\e176'; + } +} +.glyphicon-credit-card { + &:before { + content: '\e177'; + } +} +.glyphicon-transfer { + &:before { + content: '\e178'; + } +} +.glyphicon-cutlery { + &:before { + content: '\e179'; + } +} +.glyphicon-header { + &:before { + content: '\e180'; + } +} +.glyphicon-compressed { + &:before { + content: '\e181'; + } +} +.glyphicon-earphone { + &:before { + content: '\e182'; + } +} +.glyphicon-phone-alt { + &:before { + content: '\e183'; + } +} +.glyphicon-tower { + &:before { + content: '\e184'; + } +} +.glyphicon-stats { + &:before { + content: '\e185'; + } +} +.glyphicon-sd-video { + &:before { + content: '\e186'; + } +} +.glyphicon-hd-video { + &:before { + content: '\e187'; + } +} +.glyphicon-subtitles { + &:before { + content: '\e188'; + } +} +.glyphicon-sound-stereo { + &:before { + content: '\e189'; + } +} +.glyphicon-sound-dolby { + &:before { + content: '\e190'; + } +} +.glyphicon-sound-5-1 { + &:before { + content: '\e191'; + } +} +.glyphicon-sound-6-1 { + &:before { + content: '\e192'; + } +} +.glyphicon-sound-7-1 { + &:before { + content: '\e193'; + } +} +.glyphicon-copyright-mark { + &:before { + content: '\e194'; + } +} +.glyphicon-registration-mark { + &:before { + content: '\e195'; + } +} +.glyphicon-cloud-download { + &:before { + content: '\e197'; + } +} +.glyphicon-cloud-upload { + &:before { + content: '\e198'; + } +} +.glyphicon-tree-conifer { + &:before { + content: '\e199'; + } +} +.glyphicon-tree-deciduous { + &:before { + content: '\e200'; + } +} diff --git a/docs/src/css/less/twbs/grid.less b/docs/src/css/less/twbs/grid.less index 88957f42..744c2aa9 100644 --- a/docs/src/css/less/twbs/grid.less +++ b/docs/src/css/less/twbs/grid.less @@ -2,52 +2,47 @@ // Grid system // -------------------------------------------------- - // Container widths // // Set the container width, and override it for fixed navbars in media queries. .container { - .container-fixed(); - - @media (min-width: @screen-sm-min) { - width: @container-sm; - } - @media (min-width: @screen-md-min) { - width: @container-md; - } - @media (min-width: @screen-lg-min) { - width: @container-lg; - } + .container-fixed(); + + @media (min-width: @screen-sm-min) { + width: @container-sm; + } + @media (min-width: @screen-md-min) { + width: @container-md; + } + @media (min-width: @screen-lg-min) { + width: @container-lg; + } } - // Fluid container // // Utilizes the mixin meant for fixed width containers, but without any defined // width for fluid, full width layouts. .container-fluid { - .container-fixed(); + .container-fixed(); } - // Row // // Rows contain and clear the floats of your columns. .row { - .make-row(); + .make-row(); } - // Columns // // Common styles for small and large grid columns .make-grid-columns(); - // Extra small grid // // Columns, offsets, pushes, and pulls for extra small devices like @@ -59,42 +54,39 @@ .make-grid(@grid-columns, xs, push); .make-grid(@grid-columns, xs, offset); - // Small grid // // Columns, offsets, pushes, and pulls for the small device range, from phones // to tablets. @media (min-width: @screen-sm-min) { - .make-grid-columns-float(sm); - .make-grid(@grid-columns, sm, width); - .make-grid(@grid-columns, sm, pull); - .make-grid(@grid-columns, sm, push); - .make-grid(@grid-columns, sm, offset); + .make-grid-columns-float(sm); + .make-grid(@grid-columns, sm, width); + .make-grid(@grid-columns, sm, pull); + .make-grid(@grid-columns, sm, push); + .make-grid(@grid-columns, sm, offset); } - // Medium grid // // Columns, offsets, pushes, and pulls for the desktop device range. @media (min-width: @screen-md-min) { - .make-grid-columns-float(md); - .make-grid(@grid-columns, md, width); - .make-grid(@grid-columns, md, pull); - .make-grid(@grid-columns, md, push); - .make-grid(@grid-columns, md, offset); + .make-grid-columns-float(md); + .make-grid(@grid-columns, md, width); + .make-grid(@grid-columns, md, pull); + .make-grid(@grid-columns, md, push); + .make-grid(@grid-columns, md, offset); } - // Large grid // // Columns, offsets, pushes, and pulls for the large desktop device range. @media (min-width: @screen-lg-min) { - .make-grid-columns-float(lg); - .make-grid(@grid-columns, lg, width); - .make-grid(@grid-columns, lg, pull); - .make-grid(@grid-columns, lg, push); - .make-grid(@grid-columns, lg, offset); + .make-grid-columns-float(lg); + .make-grid(@grid-columns, lg, width); + .make-grid(@grid-columns, lg, pull); + .make-grid(@grid-columns, lg, push); + .make-grid(@grid-columns, lg, offset); } diff --git a/docs/src/css/less/twbs/input-groups.less b/docs/src/css/less/twbs/input-groups.less index b486cf4d..5bb81560 100644 --- a/docs/src/css/less/twbs/input-groups.less +++ b/docs/src/css/less/twbs/input-groups.less @@ -5,26 +5,26 @@ // Base styles // ------------------------- .input-group { - position: relative; // For dropdowns - display: table; - border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table - - // Undo padding and float of grid classes - &[class*="col-"] { - float: none; - padding-left: 0; - padding-right: 0; - } - - .form-control { - // IE9 fubars the placeholder attribute in text inputs and the arrows on - // select elements in input groups. To fix it, we float the input. Details: - // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855 - float: left; - - width: 100%; - margin-bottom: 0; - } + position: relative; // For dropdowns + display: table; + border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table + + // Undo padding and float of grid classes + &[class*='col-'] { + float: none; + padding-left: 0; + padding-right: 0; + } + + .form-control { + // IE9 fubars the placeholder attribute in text inputs and the arrows on + // select elements in input groups. To fix it, we float the input. Details: + // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855 + float: left; + + width: 100%; + margin-bottom: 0; + } } // Sizing options @@ -34,61 +34,64 @@ .input-group-lg > .form-control, .input-group-lg > .input-group-addon, -.input-group-lg > .input-group-btn > .btn { .input-lg(); } +.input-group-lg > .input-group-btn > .btn { + .input-lg(); +} .input-group-sm > .form-control, .input-group-sm > .input-group-addon, -.input-group-sm > .input-group-btn > .btn { .input-sm(); } - +.input-group-sm > .input-group-btn > .btn { + .input-sm(); +} // Display as table-cell // ------------------------- .input-group-addon, .input-group-btn, .input-group .form-control { - display: table-cell; + display: table-cell; - &:not(:first-child):not(:last-child) { - border-radius: 0; - } + &:not(:first-child):not(:last-child) { + border-radius: 0; + } } // Addon and addon wrapper for buttons .input-group-addon, .input-group-btn { - width: 1%; - white-space: nowrap; - vertical-align: middle; // Match the inputs + width: 1%; + white-space: nowrap; + vertical-align: middle; // Match the inputs } // Text input groups // ------------------------- .input-group-addon { - padding: @padding-base-vertical @padding-base-horizontal; - font-size: @font-size-base; - font-weight: normal; - line-height: 1; - color: @input-color; - text-align: center; - background-color: @input-group-addon-bg; - border: 1px solid @input-group-addon-border-color; - border-radius: @border-radius-base; - - // Sizing - &.input-sm { - padding: @padding-small-vertical @padding-small-horizontal; - font-size: @font-size-small; - border-radius: @border-radius-small; - } - &.input-lg { - padding: @padding-large-vertical @padding-large-horizontal; - font-size: @font-size-large; - border-radius: @border-radius-large; - } - - // Nuke default margins from checkboxes and radios to vertically center within. - input[type="radio"], - input[type="checkbox"] { - margin-top: 0; - } + padding: @padding-base-vertical @padding-base-horizontal; + font-size: @font-size-base; + font-weight: normal; + line-height: 1; + color: @input-color; + text-align: center; + background-color: @input-group-addon-bg; + border: 1px solid @input-group-addon-border-color; + border-radius: @border-radius-base; + + // Sizing + &.input-sm { + padding: @padding-small-vertical @padding-small-horizontal; + font-size: @font-size-small; + border-radius: @border-radius-small; + } + &.input-lg { + padding: @padding-large-vertical @padding-large-horizontal; + font-size: @font-size-large; + border-radius: @border-radius-large; + } + + // Nuke default margins from checkboxes and radios to vertically center within. + input[type='radio'], + input[type='checkbox'] { + margin-top: 0; + } } // Reset rounded corners @@ -99,10 +102,10 @@ .input-group-btn:first-child > .dropdown-toggle, .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { - .border-right-radius(0); + .border-right-radius(0); } .input-group-addon:first-child { - border-right: 0; + border-right: 0; } .input-group .form-control:last-child, .input-group-addon:last-child, @@ -111,47 +114,47 @@ .input-group-btn:last-child > .dropdown-toggle, .input-group-btn:first-child > .btn:not(:first-child), .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { - .border-left-radius(0); + .border-left-radius(0); } .input-group-addon:last-child { - border-left: 0; + border-left: 0; } // Button input groups // ------------------------- .input-group-btn { - position: relative; - // Jankily prevent input button groups from wrapping with `white-space` and - // `font-size` in combination with `inline-block` on buttons. - font-size: 0; - white-space: nowrap; - - // Negative margin for spacing, position for bringing hovered/focused/actived - // element above the siblings. - > .btn { - position: relative; - + .btn { - margin-left: -1px; - } - // Bring the "active" button to the front - &:hover, - &:focus, - &:active { - z-index: 2; - } - } - - // Negative margin to only have a 1px border between the two - &:first-child { - > .btn, - > .btn-group { - margin-right: -1px; - } - } - &:last-child { - > .btn, - > .btn-group { - margin-left: -1px; - } - } + position: relative; + // Jankily prevent input button groups from wrapping with `white-space` and + // `font-size` in combination with `inline-block` on buttons. + font-size: 0; + white-space: nowrap; + + // Negative margin for spacing, position for bringing hovered/focused/actived + // element above the siblings. + > .btn { + position: relative; + + .btn { + margin-left: -1px; + } + // Bring the "active" button to the front + &:hover, + &:focus, + &:active { + z-index: 2; + } + } + + // Negative margin to only have a 1px border between the two + &:first-child { + > .btn, + > .btn-group { + margin-right: -1px; + } + } + &:last-child { + > .btn, + > .btn-group { + margin-left: -1px; + } + } } diff --git a/docs/src/css/less/twbs/jumbotron.less b/docs/src/css/less/twbs/jumbotron.less index a15e1697..a0561c11 100644 --- a/docs/src/css/less/twbs/jumbotron.less +++ b/docs/src/css/less/twbs/jumbotron.less @@ -2,43 +2,42 @@ // Jumbotron // -------------------------------------------------- - .jumbotron { - padding: @jumbotron-padding; - margin-bottom: @jumbotron-padding; - color: @jumbotron-color; - background-color: @jumbotron-bg; - - h1, - .h1 { - color: @jumbotron-heading-color; - } - p { - margin-bottom: (@jumbotron-padding / 2); - font-size: @jumbotron-font-size; - font-weight: 200; - } - - .container & { - border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container - } - - .container { - max-width: 100%; - } - - @media screen and (min-width: @screen-sm-min) { - padding-top: (@jumbotron-padding * 1.6); - padding-bottom: (@jumbotron-padding * 1.6); - - .container & { - padding-left: (@jumbotron-padding * 2); - padding-right: (@jumbotron-padding * 2); - } - - h1, - .h1 { - font-size: (@font-size-base * 4.5); - } - } + padding: @jumbotron-padding; + margin-bottom: @jumbotron-padding; + color: @jumbotron-color; + background-color: @jumbotron-bg; + + h1, + .h1 { + color: @jumbotron-heading-color; + } + p { + margin-bottom: (@jumbotron-padding / 2); + font-size: @jumbotron-font-size; + font-weight: 200; + } + + .container & { + border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container + } + + .container { + max-width: 100%; + } + + @media screen and (min-width: @screen-sm-min) { + padding-top: (@jumbotron-padding * 1.6); + padding-bottom: (@jumbotron-padding * 1.6); + + .container & { + padding-left: (@jumbotron-padding * 2); + padding-right: (@jumbotron-padding * 2); + } + + h1, + .h1 { + font-size: (@font-size-base * 4.5); + } + } } diff --git a/docs/src/css/less/twbs/labels.less b/docs/src/css/less/twbs/labels.less index 5db1ed12..2fd3570b 100644 --- a/docs/src/css/less/twbs/labels.less +++ b/docs/src/css/less/twbs/labels.less @@ -3,62 +3,62 @@ // -------------------------------------------------- .label { - display: inline; - padding: .2em .6em .3em; - font-size: 75%; - font-weight: bold; - line-height: 1; - color: @label-color; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25em; + display: inline; + padding: 0.2em 0.6em 0.3em; + font-size: 75%; + font-weight: bold; + line-height: 1; + color: @label-color; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: 0.25em; - // Add hover effects, but only for links - &[href] { - &:hover, - &:focus { - color: @label-link-hover-color; - text-decoration: none; - cursor: pointer; - } - } + // Add hover effects, but only for links + &[href] { + &:hover, + &:focus { + color: @label-link-hover-color; + text-decoration: none; + cursor: pointer; + } + } - // Empty labels collapse automatically (not available in IE8) - &:empty { - display: none; - } + // Empty labels collapse automatically (not available in IE8) + &:empty { + display: none; + } - // Quick fix for labels in buttons - .btn & { - position: relative; - top: -1px; - } + // Quick fix for labels in buttons + .btn & { + position: relative; + top: -1px; + } } // Colors // Contextual variations (linked labels get darker on :hover) .label-default { - .label-variant(@label-default-bg); + .label-variant(@label-default-bg); } .label-primary { - .label-variant(@label-primary-bg); + .label-variant(@label-primary-bg); } .label-success { - .label-variant(@label-success-bg); + .label-variant(@label-success-bg); } .label-info { - .label-variant(@label-info-bg); + .label-variant(@label-info-bg); } .label-warning { - .label-variant(@label-warning-bg); + .label-variant(@label-warning-bg); } .label-danger { - .label-variant(@label-danger-bg); + .label-variant(@label-danger-bg); } diff --git a/docs/src/css/less/twbs/list-group.less b/docs/src/css/less/twbs/list-group.less index 3343f8e5..1dc42e75 100644 --- a/docs/src/css/less/twbs/list-group.less +++ b/docs/src/css/less/twbs/list-group.less @@ -2,89 +2,85 @@ // List groups // -------------------------------------------------- - // Base class // // Easily usable on <ul>, <ol>, or <div>. .list-group { - // No need to set list-style: none; since .list-group-item is block level - margin-bottom: 20px; - padding-left: 0; // reset padding because ul and ol + // No need to set list-style: none; since .list-group-item is block level + margin-bottom: 20px; + padding-left: 0; // reset padding because ul and ol } - // Individual list items // // Use on `li`s or `div`s within the `.list-group` parent. .list-group-item { - position: relative; - display: block; - padding: 10px 15px; - // Place the border on the list items and negative margin up for better styling - margin-bottom: -1px; - background-color: @list-group-bg; - border: 1px solid @list-group-border; - - // Round the first and last items - &:first-child { - .border-top-radius(@list-group-border-radius); - } - &:last-child { - margin-bottom: 0; - .border-bottom-radius(@list-group-border-radius); - } - - // Align badges within list items - > .badge { - float: right; - } - > .badge + .badge { - margin-right: 5px; - } + position: relative; + display: block; + padding: 10px 15px; + // Place the border on the list items and negative margin up for better styling + margin-bottom: -1px; + background-color: @list-group-bg; + border: 1px solid @list-group-border; + + // Round the first and last items + &:first-child { + .border-top-radius(@list-group-border-radius); + } + &:last-child { + margin-bottom: 0; + .border-bottom-radius(@list-group-border-radius); + } + + // Align badges within list items + > .badge { + float: right; + } + > .badge + .badge { + margin-right: 5px; + } } - // Linked list items // // Use anchor elements instead of `li`s or `div`s to create linked list items. // Includes an extra `.active` modifier class for showing selected items. a.list-group-item { - color: @list-group-link-color; - - .list-group-item-heading { - color: @list-group-link-heading-color; - } - - // Hover state - &:hover, - &:focus { - text-decoration: none; - background-color: @list-group-hover-bg; - } - - // Active class on item itself, not parent - &.active, - &.active:hover, - &.active:focus { - z-index: 2; // Place active items above their siblings for proper border styling - color: @list-group-active-color; - background-color: @list-group-active-bg; - border-color: @list-group-active-border; - - // Force color to inherit for custom content - .list-group-item-heading { - color: inherit; - } - .list-group-item-text { - color: @list-group-active-text-color; - } - } + color: @list-group-link-color; + + .list-group-item-heading { + color: @list-group-link-heading-color; + } + + // Hover state + &:hover, + &:focus { + text-decoration: none; + background-color: @list-group-hover-bg; + } + + // Active class on item itself, not parent + &.active, + &.active:hover, + &.active:focus { + z-index: 2; // Place active items above their siblings for proper border styling + color: @list-group-active-color; + background-color: @list-group-active-bg; + border-color: @list-group-active-border; + + // Force color to inherit for custom content + .list-group-item-heading { + color: inherit; + } + .list-group-item-text { + color: @list-group-active-text-color; + } + } } - // Contextual variants // // Add modifier classes to change text and background color on individual items. @@ -95,16 +91,15 @@ a.list-group-item { .list-group-item-variant(warning; @state-warning-bg; @state-warning-text); .list-group-item-variant(danger; @state-danger-bg; @state-danger-text); - // Custom content options // // Extra classes for creating well-formatted content within `.list-group-item`s. .list-group-item-heading { - margin-top: 0; - margin-bottom: 5px; + margin-top: 0; + margin-bottom: 5px; } .list-group-item-text { - margin-bottom: 0; - line-height: 1.3; + margin-bottom: 0; + line-height: 1.3; } diff --git a/docs/src/css/less/twbs/media.less b/docs/src/css/less/twbs/media.less index 33743b09..575dbffa 100644 --- a/docs/src/css/less/twbs/media.less +++ b/docs/src/css/less/twbs/media.less @@ -1,57 +1,57 @@ .media { - // Proper spacing between instances of .media - margin-top: 15px; + // Proper spacing between instances of .media + margin-top: 15px; - &:first-child { - margin-top: 0; - } + &:first-child { + margin-top: 0; + } } .media, .media-body { - zoom: 1; - overflow: hidden; + zoom: 1; + overflow: hidden; } .media-object { - display: block; + display: block; } .media-right, .media > .pull-right { - padding-left: 10px; + padding-left: 10px; } .media-left, .media > .pull-left { - padding-right: 10px; + padding-right: 10px; } .media-left, .media-right, .media-body { - display: table-cell; - vertical-align: top; + display: table-cell; + vertical-align: top; } .media-middle { - vertical-align: middle; + vertical-align: middle; } .media-bottom { - vertical-align: bottom; + vertical-align: bottom; } // Reset margins on headings for tighter default spacing .media-heading { - margin-top: 0; - margin-bottom: 5px; + margin-top: 0; + margin-bottom: 5px; } // Media list variation // // Undo default ul/ol styles .media-list { - padding-left: 0; - list-style: none; -} \ No newline at end of file + padding-left: 0; + list-style: none; +} diff --git a/docs/src/css/less/twbs/mixins.less b/docs/src/css/less/twbs/mixins.less index 10459073..db144079 100644 --- a/docs/src/css/less/twbs/mixins.less +++ b/docs/src/css/less/twbs/mixins.less @@ -2,7 +2,6 @@ // Mixins // -------------------------------------------------- - // Utilities // ------------------------- @@ -17,56 +16,64 @@ // 2. The use of `table` rather than `block` is only necessary if using // `:before` to contain the top-margins of child elements. .clearfix() { - &:before, - &:after { - content: " "; // 1 - display: table; // 2 - } - &:after { - clear: both; - } + &:before, + &:after { + content: ' '; // 1 + display: table; // 2 + } + &:after { + clear: both; + } } // WebKit-style focus .tab-focus() { - // Default - outline: thin dotted; - // WebKit - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; + // Default + outline: thin dotted; + // WebKit + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } // Center-align a block level element .center-block() { - display: block; - margin-left: auto; - margin-right: auto; + display: block; + margin-left: auto; + margin-right: auto; } // Sizing shortcuts .size(@width; @height) { - width: @width; - height: @height; + width: @width; + height: @height; } .square(@size) { - .size(@size; @size); + .size(@size; @size); } // Placeholder text .placeholder(@color: @input-color-placeholder) { - &:-moz-placeholder { color: @color; } // Firefox 4-18 - &::-moz-placeholder { color: @color; // Firefox 19+ - opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526 - &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+ - &::-webkit-input-placeholder { color: @color; } // Safari and Chrome + &:-moz-placeholder { + color: @color; + } // Firefox 4-18 + &::-moz-placeholder { + color: @color; // Firefox 19+ + opacity: 1; + } // See https://github.com/twbs/bootstrap/pull/11526 + &:-ms-input-placeholder { + color: @color; + } // Internet Explorer 10+ + &::-webkit-input-placeholder { + color: @color; + } // Safari and Chrome } // Text overflow // Requires inline-block or block for proper styling .text-overflow() { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } // CSS image replacement @@ -80,268 +87,351 @@ // Deprecated as of v3.0.1 (will be removed in v4) .hide-text() { - font: ~"0/0" a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; + font: ~'0/0' a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; } // New mixin to use as of v3.0.1 .text-hide() { - .hide-text(); + .hide-text(); } - - // CSS3 PROPERTIES // -------------------------------------------------- // Single side border-radius .border-top-radius(@radius) { - border-top-right-radius: @radius; - border-top-left-radius: @radius; + border-top-right-radius: @radius; + border-top-left-radius: @radius; } .border-right-radius(@radius) { - border-bottom-right-radius: @radius; - border-top-right-radius: @radius; + border-bottom-right-radius: @radius; + border-top-right-radius: @radius; } .border-bottom-radius(@radius) { - border-bottom-right-radius: @radius; - border-bottom-left-radius: @radius; + border-bottom-right-radius: @radius; + border-bottom-left-radius: @radius; } .border-left-radius(@radius) { - border-bottom-left-radius: @radius; - border-top-left-radius: @radius; + border-bottom-left-radius: @radius; + border-top-left-radius: @radius; } // Drop shadows .box-shadow(@shadow) { - -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1 - box-shadow: @shadow; + -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1 + box-shadow: @shadow; } // Transitions .transition(@transition) { - -webkit-transition: @transition; - transition: @transition; + -webkit-transition: @transition; + transition: @transition; } .transition-property(@transition-property) { - -webkit-transition-property: @transition-property; - transition-property: @transition-property; + -webkit-transition-property: @transition-property; + transition-property: @transition-property; } .transition-delay(@transition-delay) { - -webkit-transition-delay: @transition-delay; - transition-delay: @transition-delay; + -webkit-transition-delay: @transition-delay; + transition-delay: @transition-delay; } .transition-duration(@transition-duration) { - -webkit-transition-duration: @transition-duration; - transition-duration: @transition-duration; + -webkit-transition-duration: @transition-duration; + transition-duration: @transition-duration; } .transition-transform(@transition) { - -webkit-transition: -webkit-transform @transition; - -moz-transition: -moz-transform @transition; - -o-transition: -o-transform @transition; - transition: transform @transition; + -webkit-transition: -webkit-transform @transition; + -moz-transition: -moz-transform @transition; + -o-transition: -o-transform @transition; + transition: transform @transition; } // Transformations .rotate(@degrees) { - -webkit-transform: rotate(@degrees); - -ms-transform: rotate(@degrees); // IE9 only - transform: rotate(@degrees); + -webkit-transform: rotate(@degrees); + -ms-transform: rotate(@degrees); // IE9 only + transform: rotate(@degrees); } .scale(@ratio; @ratio-y...) { - -webkit-transform: scale(@ratio, @ratio-y); - -ms-transform: scale(@ratio, @ratio-y); // IE9 only - transform: scale(@ratio, @ratio-y); + -webkit-transform: scale(@ratio, @ratio-y); + -ms-transform: scale(@ratio, @ratio-y); // IE9 only + transform: scale(@ratio, @ratio-y); } .translate(@x; @y) { - -webkit-transform: translate(@x, @y); - -ms-transform: translate(@x, @y); // IE9 only - transform: translate(@x, @y); + -webkit-transform: translate(@x, @y); + -ms-transform: translate(@x, @y); // IE9 only + transform: translate(@x, @y); } .skew(@x; @y) { - -webkit-transform: skew(@x, @y); - -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+ - transform: skew(@x, @y); + -webkit-transform: skew(@x, @y); + -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+ + transform: skew(@x, @y); } .translate3d(@x; @y; @z) { - -webkit-transform: translate3d(@x, @y, @z); - transform: translate3d(@x, @y, @z); + -webkit-transform: translate3d(@x, @y, @z); + transform: translate3d(@x, @y, @z); } .rotateX(@degrees) { - -webkit-transform: rotateX(@degrees); - -ms-transform: rotateX(@degrees); // IE9 only - transform: rotateX(@degrees); + -webkit-transform: rotateX(@degrees); + -ms-transform: rotateX(@degrees); // IE9 only + transform: rotateX(@degrees); } .rotateY(@degrees) { - -webkit-transform: rotateY(@degrees); - -ms-transform: rotateY(@degrees); // IE9 only - transform: rotateY(@degrees); + -webkit-transform: rotateY(@degrees); + -ms-transform: rotateY(@degrees); // IE9 only + transform: rotateY(@degrees); } .perspective(@perspective) { - -webkit-perspective: @perspective; - -moz-perspective: @perspective; - perspective: @perspective; + -webkit-perspective: @perspective; + -moz-perspective: @perspective; + perspective: @perspective; } .perspective-origin(@perspective) { - -webkit-perspective-origin: @perspective; - -moz-perspective-origin: @perspective; - perspective-origin: @perspective; + -webkit-perspective-origin: @perspective; + -moz-perspective-origin: @perspective; + perspective-origin: @perspective; } .transform-origin(@origin) { - -webkit-transform-origin: @origin; - -moz-transform-origin: @origin; - -ms-transform-origin: @origin; // IE9 only - transform-origin: @origin; + -webkit-transform-origin: @origin; + -moz-transform-origin: @origin; + -ms-transform-origin: @origin; // IE9 only + transform-origin: @origin; } // Animations .animation(@animation) { - -webkit-animation: @animation; - animation: @animation; + -webkit-animation: @animation; + animation: @animation; } .animation-name(@name) { - -webkit-animation-name: @name; - animation-name: @name; + -webkit-animation-name: @name; + animation-name: @name; } .animation-duration(@duration) { - -webkit-animation-duration: @duration; - animation-duration: @duration; + -webkit-animation-duration: @duration; + animation-duration: @duration; } .animation-timing-function(@timing-function) { - -webkit-animation-timing-function: @timing-function; - animation-timing-function: @timing-function; + -webkit-animation-timing-function: @timing-function; + animation-timing-function: @timing-function; } .animation-delay(@delay) { - -webkit-animation-delay: @delay; - animation-delay: @delay; + -webkit-animation-delay: @delay; + animation-delay: @delay; } .animation-iteration-count(@iteration-count) { - -webkit-animation-iteration-count: @iteration-count; - animation-iteration-count: @iteration-count; + -webkit-animation-iteration-count: @iteration-count; + animation-iteration-count: @iteration-count; } .animation-direction(@direction) { - -webkit-animation-direction: @direction; - animation-direction: @direction; + -webkit-animation-direction: @direction; + animation-direction: @direction; } // Backface visibility // Prevent browsers from flickering when using CSS 3D transforms. // Default value is `visible`, but can be changed to `hidden` -.backface-visibility(@visibility){ - -webkit-backface-visibility: @visibility; - -moz-backface-visibility: @visibility; - backface-visibility: @visibility; +.backface-visibility(@visibility) { + -webkit-backface-visibility: @visibility; + -moz-backface-visibility: @visibility; + backface-visibility: @visibility; } // Box sizing .box-sizing(@boxmodel) { - -webkit-box-sizing: @boxmodel; - -moz-box-sizing: @boxmodel; - box-sizing: @boxmodel; + -webkit-box-sizing: @boxmodel; + -moz-box-sizing: @boxmodel; + box-sizing: @boxmodel; } // User select // For selecting text on the page .user-select(@select) { - -webkit-user-select: @select; - -moz-user-select: @select; - -ms-user-select: @select; // IE10+ - -o-user-select: @select; - user-select: @select; + -webkit-user-select: @select; + -moz-user-select: @select; + -ms-user-select: @select; // IE10+ + -o-user-select: @select; + user-select: @select; } // Resize anything .resizable(@direction) { - resize: @direction; // Options: horizontal, vertical, both - overflow: auto; // Safari fix + resize: @direction; // Options: horizontal, vertical, both + overflow: auto; // Safari fix } // CSS3 Content Columns .content-columns(@column-count; @column-gap: @grid-gutter-width) { - -webkit-column-count: @column-count; - -moz-column-count: @column-count; - column-count: @column-count; - -webkit-column-gap: @column-gap; - -moz-column-gap: @column-gap; - column-gap: @column-gap; + -webkit-column-count: @column-count; + -moz-column-count: @column-count; + column-count: @column-count; + -webkit-column-gap: @column-gap; + -moz-column-gap: @column-gap; + column-gap: @column-gap; } // Optional hyphenation .hyphens(@mode: auto) { - word-wrap: break-word; - -webkit-hyphens: @mode; - -moz-hyphens: @mode; - -ms-hyphens: @mode; // IE10+ - -o-hyphens: @mode; - hyphens: @mode; + word-wrap: break-word; + -webkit-hyphens: @mode; + -moz-hyphens: @mode; + -ms-hyphens: @mode; // IE10+ + -o-hyphens: @mode; + hyphens: @mode; } // Opacity .opacity(@opacity) { - opacity: @opacity; - // IE8 filter - @opacity-ie: (@opacity * 100); - filter: ~"alpha(opacity=@{opacity-ie})"; + opacity: @opacity; + // IE8 filter + @opacity-ie: (@opacity * 100); + filter: ~'alpha(opacity=@{opacity-ie})'; } - - // GRADIENTS // -------------------------------------------------- #gradient { - - // Horizontal gradient, from left to right - // - // Creates two color stops, start and end, by specifying a color and position for each color stop. - // Color stops are not available in IE9 and below. - .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { - background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+ - background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ - background-repeat: repeat-x; - filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down - } - - // Vertical gradient, from top to bottom - // - // Creates two color stops, start and end, by specifying a color and position for each color stop. - // Color stops are not available in IE9 and below. - .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { - background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+ - background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ - background-repeat: repeat-x; - filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down - } - - .directional(@start-color: #555; @end-color: #333; @deg: 45deg) { - background-repeat: repeat-x; - background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+ - background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ - } - .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) { - background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color); - background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color); - background-repeat: no-repeat; - filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback - } - .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) { - background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color); - background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color); - background-repeat: no-repeat; - filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback - } - .radial(@inner-color: #555; @outer-color: #333) { - background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color); - background-image: radial-gradient(circle, @inner-color, @outer-color); - background-repeat: no-repeat; - } - .striped(@color: rgba(255,255,255,.15); @angle: 45deg) { - background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); - background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); - } + // Horizontal gradient, from left to right + // + // Creates two color stops, start and end, by specifying a color and position for each color stop. + // Color stops are not available in IE9 and below. + .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { + background-image: -webkit-linear-gradient( + left, + color-stop(@start-color @start-percent), + color-stop(@end-color @end-percent) + ); // Safari 5.1-6, Chrome 10+ + background-image: linear-gradient( + to right, + @start-color @start-percent, + @end-color @end-percent + ); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ + background-repeat: repeat-x; + filter: e( + %( + "progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)", + argb(@start-color), + argb(@end-color) + ) + ); // IE9 and down + } + + // Vertical gradient, from top to bottom + // + // Creates two color stops, start and end, by specifying a color and position for each color stop. + // Color stops are not available in IE9 and below. + .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { + background-image: -webkit-linear-gradient( + top, + @start-color @start-percent, + @end-color @end-percent + ); // Safari 5.1-6, Chrome 10+ + background-image: linear-gradient( + to bottom, + @start-color @start-percent, + @end-color @end-percent + ); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ + background-repeat: repeat-x; + filter: e( + %( + "progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", + argb(@start-color), + argb(@end-color) + ) + ); // IE9 and down + } + + .directional(@start-color: #555; @end-color: #333; @deg: 45deg) { + background-repeat: repeat-x; + background-image: -webkit-linear-gradient( + @deg, + @start-color, + @end-color + ); // Safari 5.1-6, Chrome 10+ + background-image: linear-gradient( + @deg, + @start-color, + @end-color + ); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ + } + .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) { + background-image: -webkit-linear-gradient( + left, + @start-color, + @mid-color @color-stop, + @end-color + ); + background-image: linear-gradient( + to right, + @start-color, + @mid-color @color-stop, + @end-color + ); + background-repeat: no-repeat; + filter: e( + %( + "progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)", + argb(@start-color), + argb(@end-color) + ) + ); // IE9 and down, gets no color-stop at all for proper fallback + } + .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) { + background-image: -webkit-linear-gradient( + @start-color, + @mid-color @color-stop, + @end-color + ); + background-image: linear-gradient( + @start-color, + @mid-color @color-stop, + @end-color + ); + background-repeat: no-repeat; + filter: e( + %( + "progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", + argb(@start-color), + argb(@end-color) + ) + ); // IE9 and down, gets no color-stop at all for proper fallback + } + .radial(@inner-color: #555; @outer-color: #333) { + background-image: -webkit-radial-gradient( + circle, + @inner-color, + @outer-color + ); + background-image: radial-gradient(circle, @inner-color, @outer-color); + background-repeat: no-repeat; + } + .striped(@color: rgba(255,255,255,0.15); @angle: 45deg) { + background-image: -webkit-linear-gradient( + @angle, + @color 25%, + transparent 25%, + transparent 50%, + @color 50%, + @color 75%, + transparent 75%, + transparent + ); + background-image: linear-gradient( + @angle, + @color 25%, + transparent 25%, + transparent 50%, + @color 50%, + @color 75%, + transparent 75%, + transparent + ); + } } // Reset filters for IE @@ -349,42 +439,37 @@ // When you need to remove a gradient background, do not forget to use this to reset // the IE filter for IE9 and below. .reset-filter() { - filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); + filter: e(%('progid:DXImageTransform.Microsoft.gradient(enabled = false)')); } - - // Retina images // // Short retina mixin for setting background-image and -size .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { - background-image: url("@{file-1x}"); + background-image: url('@{file-1x}'); - @media - only screen and (-webkit-min-device-pixel-ratio: 2), - only screen and ( min--moz-device-pixel-ratio: 2), - only screen and ( -o-min-device-pixel-ratio: 2/1), - only screen and ( min-device-pixel-ratio: 2), - only screen and ( min-resolution: 192dpi), - only screen and ( min-resolution: 2dppx) { - background-image: url("@{file-2x}"); - background-size: @width-1x @height-1x; - } + @media only screen and (-webkit-min-device-pixel-ratio: 2), + only screen and (min--moz-device-pixel-ratio: 2), + only screen and (-o-min-device-pixel-ratio: 2/1), + only screen and (min-device-pixel-ratio: 2), + only screen and (min-resolution: 192dpi), + only screen and (min-resolution: 2dppx) { + background-image: url('@{file-2x}'); + background-size: @width-1x @height-1x; + } } - // Responsive image // // Keep images from scaling beyond the width of their parents. .img-responsive(@display: block) { - display: @display; - max-width: 100%; // Part 1: Set a maximum relative to the parent - height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching + display: @display; + max-width: 100%; // Part 1: Set a maximum relative to the parent + height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching } - // COMPONENT MIXINS // -------------------------------------------------- @@ -392,102 +477,104 @@ // ------------------------- // Dividers (basically an hr) within dropdowns and nav lists .nav-divider(@color: #e5e5e5) { - height: 1px; - margin: ((@line-height-computed / 2) - 1) 0; - overflow: hidden; - background-color: @color; + height: 1px; + margin: ((@line-height-computed / 2) - 1) 0; + overflow: hidden; + background-color: @color; } // Panels // ------------------------- .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) { - border-color: @border; + border-color: @border; - & > .panel-heading { - color: @heading-text-color; - background-color: @heading-bg-color; - border-color: @heading-border; + & > .panel-heading { + color: @heading-text-color; + background-color: @heading-bg-color; + border-color: @heading-border; - + .panel-collapse .panel-body { - border-top-color: @border; - } - } - & > .panel-footer { - + .panel-collapse .panel-body { - border-bottom-color: @border; - } - } + + .panel-collapse .panel-body { + border-top-color: @border; + } + } + & > .panel-footer { + + .panel-collapse .panel-body { + border-bottom-color: @border; + } + } } // Alerts // ------------------------- .alert-variant(@background; @border; @text-color) { - background-color: @background; - border-color: @border; - color: @text-color; + background-color: @background; + border-color: @border; + color: @text-color; - hr { - border-top-color: darken(@border, 5%); - } - .alert-link { - color: darken(@text-color, 10%); - } + hr { + border-top-color: darken(@border, 5%); + } + .alert-link { + color: darken(@text-color, 10%); + } } // Tables // ------------------------- .table-row-variant(@state; @background) { - // Exact selectors below required to override `.table-striped` and prevent - // inheritance to nested tables. - .table > thead > tr, - .table > tbody > tr, - .table > tfoot > tr { - > td.@{state}, - > th.@{state}, - &.@{state} > td, - &.@{state} > th { - background-color: @background; - } - } - - // Hover states for `.table-hover` - // Note: this is not available for cells or rows within `thead` or `tfoot`. - .table-hover > tbody > tr { - > td.@{state}:hover, - > th.@{state}:hover, - &.@{state}:hover > td, - &.@{state}:hover > th { - background-color: darken(@background, 5%); - } - } + // Exact selectors below required to override `.table-striped` and prevent + // inheritance to nested tables. + .table > thead > tr, + .table > tbody > tr, + .table > tfoot > tr { + > td.@{state}, + > th.@{state}, + &.@{state} > td, + &.@{state} > th { + background-color: @background; + } + } + + // Hover states for `.table-hover` + // Note: this is not available for cells or rows within `thead` or `tfoot`. + .table-hover > tbody > tr { + > td.@{state}:hover, + > th.@{state}:hover, + &.@{state}:hover > td, + &.@{state}:hover > th { + background-color: darken(@background, 5%); + } + } } // List Groups // ------------------------- .list-group-item-variant(@state; @background; @color) { - .list-group-item-@{state} { - color: @color; - background-color: @background; - - a& { - color: @color; - - .list-group-item-heading { color: inherit; } - - &:hover, - &:focus { - color: @color; - background-color: darken(@background, 5%); - } - &.active, - &.active:hover, - &.active:focus { - color: #fff; - background-color: @color; - border-color: @color; - } - } - } + .list-group-item-@{state} { + color: @color; + background-color: @background; + + a& { + color: @color; + + .list-group-item-heading { + color: inherit; + } + + &:hover, + &:focus { + color: @color; + background-color: darken(@background, 5%); + } + &.active, + &.active:hover, + &.active:focus { + color: #fff; + background-color: @color; + border-color: @color; + } + } + } } // Button variants @@ -495,104 +582,104 @@ // Easily pump out default styles, as well as :hover, :focus, :active, // and disabled options for all buttons .button-variant(@color; @background; @border) { - color: @color; - background-color: @background; - border-color: @border; - - &:hover, - &:focus, - &:active, - &.active, - .open .dropdown-toggle& { - color: @color; - background-color: darken(@background, 8%); - border-color: darken(@border, 12%); - } - &:active, - &.active, - .open .dropdown-toggle& { - background-image: none; - } - &.disabled, - &[disabled], - fieldset[disabled] & { - &, - &:hover, - &:focus, - &:active, - &.active { - background-color: @background; - border-color: @border; - } - } - - .badge { - color: @background; - background-color: @color; - } + color: @color; + background-color: @background; + border-color: @border; + + &:hover, + &:focus, + &:active, + &.active, + .open .dropdown-toggle& { + color: @color; + background-color: darken(@background, 8%); + border-color: darken(@border, 12%); + } + &:active, + &.active, + .open .dropdown-toggle& { + background-image: none; + } + &.disabled, + &[disabled], + fieldset[disabled] & { + &, + &:hover, + &:focus, + &:active, + &.active { + background-color: @background; + border-color: @border; + } + } + + .badge { + color: @background; + background-color: @color; + } } // Button sizes // ------------------------- .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { - padding: @padding-vertical @padding-horizontal; - font-size: @font-size; - line-height: @line-height; - border-radius: @border-radius; + padding: @padding-vertical @padding-horizontal; + font-size: @font-size; + line-height: @line-height; + border-radius: @border-radius; } // Pagination // ------------------------- .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) { - > li { - > a, - > span { - padding: @padding-vertical @padding-horizontal; - font-size: @font-size; - } - &:first-child { - > a, - > span { - .border-left-radius(@border-radius); - } - } - &:last-child { - > a, - > span { - .border-right-radius(@border-radius); - } - } - } + > li { + > a, + > span { + padding: @padding-vertical @padding-horizontal; + font-size: @font-size; + } + &:first-child { + > a, + > span { + .border-left-radius(@border-radius); + } + } + &:last-child { + > a, + > span { + .border-right-radius(@border-radius); + } + } + } } // Labels // ------------------------- .label-variant(@color) { - background-color: @color; - &[href] { - &:hover, - &:focus { - background-color: darken(@color, 10%); - } - } + background-color: @color; + &[href] { + &:hover, + &:focus { + background-color: darken(@color, 10%); + } + } } // Contextual backgrounds // ------------------------- .bg-variant(@color) { - background-color: @color; - a&:hover { - background-color: darken(@color, 10%); - } + background-color: @color; + a&:hover { + background-color: darken(@color, 10%); + } } // Typography // ------------------------- .text-emphasis-variant(@color) { - color: @color; - a&:hover { - color: darken(@color, 10%); - } + color: @color; + a&:hover { + color: darken(@color, 10%); + } } // Navbar vertical align @@ -600,279 +687,288 @@ // Vertically center elements in the navbar. // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. .navbar-vertical-align(@element-height) { - margin-top: ((@navbar-height - @element-height) / 2); - margin-bottom: ((@navbar-height - @element-height) / 2); + margin-top: ((@navbar-height - @element-height) / 2); + margin-bottom: ((@navbar-height - @element-height) / 2); } // Progress bars // ------------------------- .progress-bar-variant(@color) { - background-color: @color; - .progress-striped & { - #gradient > .striped(); - } + background-color: @color; + .progress-striped & { + #gradient > .striped(); + } } // Responsive utilities // ------------------------- // More easily include all the states for responsive-utilities.less. .responsive-visibility() { - display: block !important; - table& { display: table; } - tr& { display: table-row !important; } - th&, - td& { display: table-cell !important; } + display: block !important; + table& { + display: table; + } + tr& { + display: table-row !important; + } + th&, + td& { + display: table-cell !important; + } } .responsive-invisibility() { - &, - tr&, - th&, - td& { display: none !important; } + &, + tr&, + th&, + td& { + display: none !important; + } } - // Grid System // ----------- // Centered container element .container-fixed() { - margin-right: auto; - margin-left: auto; - padding-left: (@grid-gutter-width / 2); - padding-right: (@grid-gutter-width / 2); - &:extend(.clearfix all); + margin-right: auto; + margin-left: auto; + padding-left: (@grid-gutter-width / 2); + padding-right: (@grid-gutter-width / 2); + &:extend(.clearfix all); } // Creates a wrapper for a series of columns .make-row(@gutter: @grid-gutter-width) { - margin-left: (@gutter / -2); - margin-right: (@gutter / -2); - &:extend(.clearfix all); + margin-left: (@gutter / -2); + margin-right: (@gutter / -2); + &:extend(.clearfix all); } // Generate the extra small columns .make-xs-column(@columns; @gutter: @grid-gutter-width) { - position: relative; - float: left; - width: percentage((@columns / @grid-columns)); - min-height: 1px; - padding-left: (@gutter / 2); - padding-right: (@gutter / 2); + position: relative; + float: left; + width: percentage((@columns / @grid-columns)); + min-height: 1px; + padding-left: (@gutter / 2); + padding-right: (@gutter / 2); } .make-xs-column-offset(@columns) { - @media (min-width: @screen-xs-min) { - margin-left: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-xs-min) { + margin-left: percentage((@columns / @grid-columns)); + } } .make-xs-column-push(@columns) { - @media (min-width: @screen-xs-min) { - left: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-xs-min) { + left: percentage((@columns / @grid-columns)); + } } .make-xs-column-pull(@columns) { - @media (min-width: @screen-xs-min) { - right: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-xs-min) { + right: percentage((@columns / @grid-columns)); + } } - // Generate the small columns .make-sm-column(@columns; @gutter: @grid-gutter-width) { - position: relative; - min-height: 1px; - padding-left: (@gutter / 2); - padding-right: (@gutter / 2); + position: relative; + min-height: 1px; + padding-left: (@gutter / 2); + padding-right: (@gutter / 2); - @media (min-width: @screen-sm-min) { - float: left; - width: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-sm-min) { + float: left; + width: percentage((@columns / @grid-columns)); + } } .make-sm-column-offset(@columns) { - @media (min-width: @screen-sm-min) { - margin-left: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-sm-min) { + margin-left: percentage((@columns / @grid-columns)); + } } .make-sm-column-push(@columns) { - @media (min-width: @screen-sm-min) { - left: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-sm-min) { + left: percentage((@columns / @grid-columns)); + } } .make-sm-column-pull(@columns) { - @media (min-width: @screen-sm-min) { - right: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-sm-min) { + right: percentage((@columns / @grid-columns)); + } } - // Generate the medium columns .make-md-column(@columns; @gutter: @grid-gutter-width) { - position: relative; - min-height: 1px; - padding-left: (@gutter / 2); - padding-right: (@gutter / 2); + position: relative; + min-height: 1px; + padding-left: (@gutter / 2); + padding-right: (@gutter / 2); - @media (min-width: @screen-md-min) { - float: left; - width: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-md-min) { + float: left; + width: percentage((@columns / @grid-columns)); + } } .make-md-column-offset(@columns) { - @media (min-width: @screen-md-min) { - margin-left: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-md-min) { + margin-left: percentage((@columns / @grid-columns)); + } } .make-md-column-push(@columns) { - @media (min-width: @screen-md-min) { - left: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-md-min) { + left: percentage((@columns / @grid-columns)); + } } .make-md-column-pull(@columns) { - @media (min-width: @screen-md-min) { - right: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-md-min) { + right: percentage((@columns / @grid-columns)); + } } - // Generate the large columns .make-lg-column(@columns; @gutter: @grid-gutter-width) { - position: relative; - min-height: 1px; - padding-left: (@gutter / 2); - padding-right: (@gutter / 2); + position: relative; + min-height: 1px; + padding-left: (@gutter / 2); + padding-right: (@gutter / 2); - @media (min-width: @screen-lg-min) { - float: left; - width: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-lg-min) { + float: left; + width: percentage((@columns / @grid-columns)); + } } .make-lg-column-offset(@columns) { - @media (min-width: @screen-lg-min) { - margin-left: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-lg-min) { + margin-left: percentage((@columns / @grid-columns)); + } } .make-lg-column-push(@columns) { - @media (min-width: @screen-lg-min) { - left: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-lg-min) { + left: percentage((@columns / @grid-columns)); + } } .make-lg-column-pull(@columns) { - @media (min-width: @screen-lg-min) { - right: percentage((@columns / @grid-columns)); - } + @media (min-width: @screen-lg-min) { + right: percentage((@columns / @grid-columns)); + } } - // Framework grid generation // // Used only by Bootstrap to generate the correct number of grid classes given // any value of `@grid-columns`. .make-grid-columns() { - // Common styles for all sizes of grid columns, widths 1-12 - .col(@index) when (@index = 1) { // initial - @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}"; - .col((@index + 1), @item); - } - .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo - @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}"; - .col((@index + 1), ~"@{list}, @{item}"); - } - .col(@index, @list) when (@index > @grid-columns) { // terminal - @{list} { - position: relative; - // Prevent columns from collapsing when empty - min-height: 1px; - // Inner gutter via padding - padding-left: (@grid-gutter-width / 2); - padding-right: (@grid-gutter-width / 2); - } - } - .col(1); // kickstart it + // Common styles for all sizes of grid columns, widths 1-12 + .col(@index) when (@index = 1) { + // initial + @item: ~'.col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}'; + .col((@index + 1), @item); + } + .col(@index, @list) when (@index =< @grid-columns) { + // general; "=<" isn't a typo + @item: ~'.col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}'; + .col((@index + 1), ~'@{list}, @{item}'); + } + .col(@index, @list) when (@index > @grid-columns) { + // terminal + @{list} { + position: relative; + // Prevent columns from collapsing when empty + min-height: 1px; + // Inner gutter via padding + padding-left: (@grid-gutter-width / 2); + padding-right: (@grid-gutter-width / 2); + } + } + .col(1); // kickstart it } .make-grid-columns-float(@class) { - .col(@index) when (@index = 1) { // initial - @item: ~".col-@{class}-@{index}"; - .col((@index + 1), @item); - } - .col(@index, @list) when (@index =< @grid-columns) { // general - @item: ~".col-@{class}-@{index}"; - .col((@index + 1), ~"@{list}, @{item}"); - } - .col(@index, @list) when (@index > @grid-columns) { // terminal - @{list} { - float: left; - } - } - .col(1); // kickstart it + .col(@index) when (@index = 1) { + // initial + @item: ~'.col-@{class}-@{index}'; + .col((@index + 1), @item); + } + .col(@index, @list) when (@index =< @grid-columns) { + // general + @item: ~'.col-@{class}-@{index}'; + .col((@index + 1), ~'@{list}, @{item}'); + } + .col(@index, @list) when (@index > @grid-columns) { + // terminal + @{list} { + float: left; + } + } + .col(1); // kickstart it } .calc-grid(@index, @class, @type) when (@type = width) and (@index > 0) { - .col-@{class}-@{index} { - width: percentage((@index / @grid-columns)); - } + .col-@{class}-@{index} { + width: percentage((@index / @grid-columns)); + } } .calc-grid(@index, @class, @type) when (@type = push) { - .col-@{class}-push-@{index} { - left: percentage((@index / @grid-columns)); - } + .col-@{class}-push-@{index} { + left: percentage((@index / @grid-columns)); + } } .calc-grid(@index, @class, @type) when (@type = pull) { - .col-@{class}-pull-@{index} { - right: percentage((@index / @grid-columns)); - } + .col-@{class}-pull-@{index} { + right: percentage((@index / @grid-columns)); + } } .calc-grid(@index, @class, @type) when (@type = offset) { - .col-@{class}-offset-@{index} { - margin-left: percentage((@index / @grid-columns)); - } + .col-@{class}-offset-@{index} { + margin-left: percentage((@index / @grid-columns)); + } } // Basic looping in LESS .make-grid(@index, @class, @type) when (@index >= 0) { - .calc-grid(@index, @class, @type); - // next iteration - .make-grid((@index - 1), @class, @type); + .calc-grid(@index, @class, @type); + // next iteration + .make-grid((@index - 1), @class, @type); } - // Form validation states // // Used in forms.less to generate the form validation CSS for warnings, errors, // and successes. .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) { - // Color the label and help text - .help-block, - .control-label, - .radio, - .checkbox, - .radio-inline, - .checkbox-inline { - color: @text-color; - } - // Set the border and box shadow on specific inputs to match - .form-control { - border-color: @border-color; - .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work - &:focus { - border-color: darken(@border-color, 10%); - @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%); - .box-shadow(@shadow); - } - } - // Set validation states also for addons - .input-group-addon { - color: @text-color; - border-color: @border-color; - background-color: @background-color; - } - // Optional feedback icon - .form-control-feedback { - color: @text-color; - } + // Color the label and help text + .help-block, + .control-label, + .radio, + .checkbox, + .radio-inline, + .checkbox-inline { + color: @text-color; + } + // Set the border and box shadow on specific inputs to match + .form-control { + border-color: @border-color; + .box-shadow(inset 0 1px 1px rgba(0,0,0,0.075)); // Redeclare so transitions work + &:focus { + border-color: darken(@border-color, 10%); + @shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), + 0 0 6px lighten(@border-color, 20%); + .box-shadow(@shadow); + } + } + // Set validation states also for addons + .input-group-addon { + color: @text-color; + border-color: @border-color; + background-color: @background-color; + } + // Optional feedback icon + .form-control-feedback { + color: @text-color; + } } // Form control focus state @@ -889,12 +985,12 @@ // contrast against a dark gray background. .form-control-focus(@color: @input-border-focus) { - @color-rgba: rgba(red(@color), green(@color), blue(@color), .6); - &:focus { - border-color: @color; - outline: 0; - .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}"); - } + @color-rgba: rgba(red(@color), green(@color), blue(@color), 0.6); + &:focus { + border-color: @color; + outline: 0; + .box-shadow(~'inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}'); + } } // Form control sizing @@ -904,18 +1000,18 @@ // element gets special love because it's special, and that's a fact! .input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { - height: @input-height; - padding: @padding-vertical @padding-horizontal; - font-size: @font-size; - line-height: @line-height; - border-radius: @border-radius; - - select& { - height: @input-height; - line-height: @input-height; - } - - textarea& { - height: auto; - } + height: @input-height; + padding: @padding-vertical @padding-horizontal; + font-size: @font-size; + line-height: @line-height; + border-radius: @border-radius; + + select& { + height: @input-height; + line-height: @input-height; + } + + textarea& { + height: auto; + } } diff --git a/docs/src/css/less/twbs/modals.less b/docs/src/css/less/twbs/modals.less index e7f3d726..d097f603 100644 --- a/docs/src/css/less/twbs/modals.less +++ b/docs/src/css/less/twbs/modals.less @@ -9,130 +9,139 @@ // Kill the scroll on the body .modal-open { - overflow: hidden; + overflow: hidden; } // Container that the modal scrolls within .modal { - display: none; - overflow: auto; - overflow-y: scroll; - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: @zindex-modal; - -webkit-overflow-scrolling: touch; - - // Prevent Chrome on Windows from adding a focus outline. For details, see - // https://github.com/twbs/bootstrap/pull/10951. - outline: 0; - - // When fading in the modal, animate it to slide down - &.fade .modal-dialog { - .translate(0, -25%); - .transition-transform(~"0.3s ease-out"); - } - &.in .modal-dialog { .translate(0, 0)} + display: none; + overflow: auto; + overflow-y: scroll; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: @zindex-modal; + -webkit-overflow-scrolling: touch; + + // Prevent Chrome on Windows from adding a focus outline. For details, see + // https://github.com/twbs/bootstrap/pull/10951. + outline: 0; + + // When fading in the modal, animate it to slide down + &.fade .modal-dialog { + .translate(0, -25%); + .transition-transform(~'0.3s ease-out'); + } + &.in .modal-dialog { + .translate(0, 0); + } } // Shell div to position the modal with bottom padding .modal-dialog { - position: relative; - width: auto; - margin: 10px; + position: relative; + width: auto; + margin: 10px; } // Actual modal .modal-content { - position: relative; - background-color: @modal-content-bg; - border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc) - border: 1px solid @modal-content-border-color; - border-radius: @border-radius-large; - .box-shadow(0 3px 9px rgba(0,0,0,.5)); - background-clip: padding-box; - // Remove focus outline from opened modal - outline: none; + position: relative; + background-color: @modal-content-bg; + border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc) + border: 1px solid @modal-content-border-color; + border-radius: @border-radius-large; + .box-shadow(0 3px 9px rgba(0,0,0,0.5)); + background-clip: padding-box; + // Remove focus outline from opened modal + outline: none; } // Modal background .modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: @zindex-modal-background; - background-color: @modal-backdrop-bg; - // Fade for backdrop - &.fade { .opacity(0); } - &.in { .opacity(@modal-backdrop-opacity); } + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: @zindex-modal-background; + background-color: @modal-backdrop-bg; + // Fade for backdrop + &.fade { + .opacity(0); + } + &.in { + .opacity(@modal-backdrop-opacity); + } } // Modal header // Top section of the modal w/ title and dismiss .modal-header { - padding: @modal-title-padding; - border-bottom: 1px solid @modal-header-border-color; - min-height: (@modal-title-padding + @modal-title-line-height); + padding: @modal-title-padding; + border-bottom: 1px solid @modal-header-border-color; + min-height: (@modal-title-padding + @modal-title-line-height); } // Close icon .modal-header .close { - margin-top: -2px; + margin-top: -2px; } // Title text within header .modal-title { - margin: 0; - line-height: @modal-title-line-height; + margin: 0; + line-height: @modal-title-line-height; } // Modal body // Where all modal content resides (sibling of .modal-header and .modal-footer) .modal-body { - position: relative; - padding: @modal-inner-padding; + position: relative; + padding: @modal-inner-padding; } // Footer (for actions) .modal-footer { - margin-top: 15px; - padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding; - text-align: right; // right align buttons - border-top: 1px solid @modal-footer-border-color; - &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons - - // Properly space out buttons - .btn + .btn { - margin-left: 5px; - margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs - } - // but override that for button groups - .btn-group .btn + .btn { - margin-left: -1px; - } - // and override it for block buttons as well - .btn-block + .btn-block { - margin-left: 0; - } + margin-top: 15px; + padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding; + text-align: right; // right align buttons + border-top: 1px solid @modal-footer-border-color; + &:extend(.clearfix + all); // clear it in case folks use .pull-* classes on buttons + + // Properly space out buttons + .btn + .btn { + margin-left: 5px; + margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs + } + // but override that for button groups + .btn-group .btn + .btn { + margin-left: -1px; + } + // and override it for block buttons as well + .btn-block + .btn-block { + margin-left: 0; + } } // Scale up the modal @media (min-width: @screen-sm-min) { - - // Automatically set modal's width for larger viewports - .modal-dialog { - width: @modal-md; - margin: 30px auto; - } - .modal-content { - .box-shadow(0 5px 15px rgba(0,0,0,.5)); - } - - // Modal sizes - .modal-sm { width: @modal-sm; } - .modal-lg { width: @modal-lg; } - + // Automatically set modal's width for larger viewports + .modal-dialog { + width: @modal-md; + margin: 30px auto; + } + .modal-content { + .box-shadow(0 5px 15px rgba(0,0,0,0.5)); + } + + // Modal sizes + .modal-sm { + width: @modal-sm; + } + .modal-lg { + width: @modal-lg; + } } diff --git a/docs/src/css/less/twbs/navbar.less b/docs/src/css/less/twbs/navbar.less index eea376f5..8754827f 100644 --- a/docs/src/css/less/twbs/navbar.less +++ b/docs/src/css/less/twbs/navbar.less @@ -2,41 +2,38 @@ // Navbars // -------------------------------------------------- - // Wrapper and base class // // Provide a static navbar from which we expand to create full-width, fixed, and // other navbar variations. .navbar { - position: relative; - min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode) - margin-bottom: @navbar-margin-bottom; - border: 1px solid transparent; + position: relative; + min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode) + margin-bottom: @navbar-margin-bottom; + border: 1px solid transparent; - // Prevent floats from breaking the navbar - &:extend(.clearfix all); + // Prevent floats from breaking the navbar + &:extend(.clearfix all); - @media (min-width: @grid-float-breakpoint) { - border-radius: @navbar-border-radius; - } + @media (min-width: @grid-float-breakpoint) { + border-radius: @navbar-border-radius; + } } - // Navbar heading // // Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy // styling of responsive aspects. .navbar-header { - &:extend(.clearfix all); + &:extend(.clearfix all); - @media (min-width: @grid-float-breakpoint) { - float: left; - } + @media (min-width: @grid-float-breakpoint) { + float: left; + } } - // Navbar collapse (body) // // Group your navbar content into this for easy collapsing and expanding across @@ -48,66 +45,64 @@ // content for the user's viewport. .navbar-collapse { - max-height: @navbar-collapse-max-height; - overflow-x: visible; - padding-right: @navbar-padding-horizontal; - padding-left: @navbar-padding-horizontal; - border-top: 1px solid transparent; - box-shadow: inset 0 1px 0 rgba(255,255,255,.1); - &:extend(.clearfix all); - -webkit-overflow-scrolling: touch; - - &.in { - overflow-y: auto; - } - - @media (min-width: @grid-float-breakpoint) { - width: auto; - border-top: 0; - box-shadow: none; - - &.collapse { - display: block !important; - height: auto !important; - padding-bottom: 0; // Override default setting - overflow: visible !important; - } - - &.in { - overflow-y: visible; - } - - // Undo the collapse side padding for navbars with containers to ensure - // alignment of right-aligned contents. - .navbar-fixed-top &, - .navbar-static-top &, - .navbar-fixed-bottom & { - padding-left: 0; - padding-right: 0; - } - } + max-height: @navbar-collapse-max-height; + overflow-x: visible; + padding-right: @navbar-padding-horizontal; + padding-left: @navbar-padding-horizontal; + border-top: 1px solid transparent; + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); + &:extend(.clearfix all); + -webkit-overflow-scrolling: touch; + + &.in { + overflow-y: auto; + } + + @media (min-width: @grid-float-breakpoint) { + width: auto; + border-top: 0; + box-shadow: none; + + &.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; // Override default setting + overflow: visible !important; + } + + &.in { + overflow-y: visible; + } + + // Undo the collapse side padding for navbars with containers to ensure + // alignment of right-aligned contents. + .navbar-fixed-top &, + .navbar-static-top &, + .navbar-fixed-bottom & { + padding-left: 0; + padding-right: 0; + } + } } - // Both navbar header and collapse // // When a container is present, change the behavior of the header and collapse. .container, .container-fluid { - > .navbar-header, - > .navbar-collapse { - margin-right: -@navbar-padding-horizontal; - margin-left: -@navbar-padding-horizontal; - - @media (min-width: @grid-float-breakpoint) { - margin-right: 0; - margin-left: 0; - } - } + > .navbar-header, + > .navbar-collapse { + margin-right: -@navbar-padding-horizontal; + margin-left: -@navbar-padding-horizontal; + + @media (min-width: @grid-float-breakpoint) { + margin-right: 0; + margin-left: 0; + } + } } - // // Navbar alignment options // @@ -116,164 +111,160 @@ // Static top (unfixed, but 100% wide) navbar .navbar-static-top { - z-index: @zindex-navbar; - border-width: 0 0 1px; + z-index: @zindex-navbar; + border-width: 0 0 1px; - @media (min-width: @grid-float-breakpoint) { - border-radius: 0; - } + @media (min-width: @grid-float-breakpoint) { + border-radius: 0; + } } // Fix the top/bottom navbars when screen real estate supports it .navbar-fixed-top, .navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: @zindex-navbar-fixed; - - // Undo the rounded corners - @media (min-width: @grid-float-breakpoint) { - border-radius: 0; - } + position: fixed; + right: 0; + left: 0; + z-index: @zindex-navbar-fixed; + + // Undo the rounded corners + @media (min-width: @grid-float-breakpoint) { + border-radius: 0; + } } .navbar-fixed-top { - top: 0; - border-width: 0 0 1px; + top: 0; + border-width: 0 0 1px; } .navbar-fixed-bottom { - bottom: 0; - margin-bottom: 0; // override .navbar defaults - border-width: 1px 0 0; + bottom: 0; + margin-bottom: 0; // override .navbar defaults + border-width: 1px 0 0; } - // Brand/project name .navbar-brand { - float: left; - padding: @navbar-padding-vertical @navbar-padding-horizontal; - font-size: @font-size-large; - line-height: @line-height-computed; - - &:hover, - &:focus { - text-decoration: none; - } - - // Prevent Glyphicons from increasing height of navbar - > .glyphicon { - float: left; - margin-top: -2px; - margin-right: 5px; - } - - @media (min-width: @grid-float-breakpoint) { - .navbar > .container &, - .navbar > .container-fluid & { - margin-left: -@navbar-padding-horizontal; - } - } + float: left; + padding: @navbar-padding-vertical @navbar-padding-horizontal; + font-size: @font-size-large; + line-height: @line-height-computed; + + &:hover, + &:focus { + text-decoration: none; + } + + // Prevent Glyphicons from increasing height of navbar + > .glyphicon { + float: left; + margin-top: -2px; + margin-right: 5px; + } + + @media (min-width: @grid-float-breakpoint) { + .navbar > .container &, + .navbar > .container-fluid & { + margin-left: -@navbar-padding-horizontal; + } + } } - // Navbar toggle // // Custom button for toggling the `.navbar-collapse`, powered by the collapse // JavaScript plugin. .navbar-toggle { - position: relative; - float: right; - margin-right: @navbar-padding-horizontal; - padding: 9px 10px; - .navbar-vertical-align(34px); - background-color: transparent; - background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 - border: 1px solid transparent; - border-radius: @border-radius-base; - - // We remove the `outline` here, but later compensate by attaching `:hover` - // styles to `:focus`. - &:focus { - outline: none; - } - - // Bars - .icon-bar { - display: block; - width: 22px; - height: 2px; - border-radius: 1px; - } - .icon-bar + .icon-bar { - margin-top: 4px; - } - - @media (min-width: @grid-float-breakpoint) { - display: none; - } + position: relative; + float: right; + margin-right: @navbar-padding-horizontal; + padding: 9px 10px; + .navbar-vertical-align(34px); + background-color: transparent; + background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 + border: 1px solid transparent; + border-radius: @border-radius-base; + + // We remove the `outline` here, but later compensate by attaching `:hover` + // styles to `:focus`. + &:focus { + outline: none; + } + + // Bars + .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px; + } + .icon-bar + .icon-bar { + margin-top: 4px; + } + + @media (min-width: @grid-float-breakpoint) { + display: none; + } } - // Navbar nav links // // Builds on top of the `.nav` components with its own modifier class to make // the nav the full height of the horizontal nav (above 768px). .navbar-nav { - margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal; - - > li > a { - padding-top: 10px; - padding-bottom: 10px; - line-height: @line-height-computed; - } - - @media (max-width: @grid-float-breakpoint-max) { - // Dropdowns get custom display when collapsed - .open .dropdown-menu { - position: static; - float: none; - width: auto; - margin-top: 0; - background-color: transparent; - border: 0; - box-shadow: none; - > li > a, - .dropdown-header { - padding: 5px 15px 5px 25px; - } - > li > a { - line-height: @line-height-computed; - &:hover, - &:focus { - background-image: none; - } - } - } - } - - // Uncollapse the nav - @media (min-width: @grid-float-breakpoint) { - float: left; - margin: 0; - - > li { - float: left; - > a { - padding-top: @navbar-padding-vertical; - padding-bottom: @navbar-padding-vertical; - } - } - - &.navbar-right:last-child { - margin-right: -@navbar-padding-horizontal; - } - } + margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal; + + > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: @line-height-computed; + } + + @media (max-width: @grid-float-breakpoint-max) { + // Dropdowns get custom display when collapsed + .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + box-shadow: none; + > li > a, + .dropdown-header { + padding: 5px 15px 5px 25px; + } + > li > a { + line-height: @line-height-computed; + &:hover, + &:focus { + background-image: none; + } + } + } + } + + // Uncollapse the nav + @media (min-width: @grid-float-breakpoint) { + float: left; + margin: 0; + + > li { + float: left; + > a { + padding-top: @navbar-padding-vertical; + padding-bottom: @navbar-padding-vertical; + } + } + + &.navbar-right:last-child { + margin-right: -@navbar-padding-horizontal; + } + } } - // Component alignment // // Repurpose the pull utilities as their own navbar utilities to avoid specificity @@ -281,101 +272,102 @@ // though so that navbar contents properly stack and align in mobile. @media (min-width: @grid-float-breakpoint) { - .navbar-left { .pull-left(); } - .navbar-right { .pull-right(); } + .navbar-left { + .pull-left(); + } + .navbar-right { + .pull-right(); + } } - // Navbar form // // Extension of the `.form-inline` with some extra flavor for optimum display in // our navbars. .navbar-form { - margin-left: -@navbar-padding-horizontal; - margin-right: -@navbar-padding-horizontal; - padding: 10px @navbar-padding-horizontal; - border-top: 1px solid transparent; - border-bottom: 1px solid transparent; - @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); - .box-shadow(@shadow); - - // Mixin behavior for optimum display - .form-inline(); - - .form-group { - @media (max-width: @grid-float-breakpoint-max) { - margin-bottom: 5px; - } - } - - // Vertically center in expanded, horizontal navbar - .navbar-vertical-align(@input-height-base); - - // Undo 100% width for pull classes - @media (min-width: @grid-float-breakpoint) { - width: auto; - border: 0; - margin-left: 0; - margin-right: 0; - padding-top: 0; - padding-bottom: 0; - .box-shadow(none); - - // Outdent the form if last child to line up with content down the page - &.navbar-right:last-child { - margin-right: -@navbar-padding-horizontal; - } - } + margin-left: -@navbar-padding-horizontal; + margin-right: -@navbar-padding-horizontal; + padding: 10px @navbar-padding-horizontal; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + @shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), + 0 1px 0 rgba(255, 255, 255, 0.1); + .box-shadow(@shadow); + + // Mixin behavior for optimum display + .form-inline(); + + .form-group { + @media (max-width: @grid-float-breakpoint-max) { + margin-bottom: 5px; + } + } + + // Vertically center in expanded, horizontal navbar + .navbar-vertical-align(@input-height-base); + + // Undo 100% width for pull classes + @media (min-width: @grid-float-breakpoint) { + width: auto; + border: 0; + margin-left: 0; + margin-right: 0; + padding-top: 0; + padding-bottom: 0; + .box-shadow(none); + + // Outdent the form if last child to line up with content down the page + &.navbar-right:last-child { + margin-right: -@navbar-padding-horizontal; + } + } } - // Dropdown menus // Menu position and menu carets .navbar-nav > li > .dropdown-menu { - margin-top: 0; - .border-top-radius(0); + margin-top: 0; + .border-top-radius(0); } // Menu position and menu caret support for dropups via extra dropup class .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { - .border-bottom-radius(0); + .border-bottom-radius(0); } - // Buttons in navbars // // Vertically center a button within a navbar (when *not* in a form). .navbar-btn { - .navbar-vertical-align(@input-height-base); - - &.btn-sm { - .navbar-vertical-align(@input-height-small); - } - &.btn-xs { - .navbar-vertical-align(22); - } + .navbar-vertical-align(@input-height-base); + + &.btn-sm { + .navbar-vertical-align(@input-height-small); + } + &.btn-xs { + .navbar-vertical-align(22); + } } - // Text in navbars // // Add a class to make any element properly align itself vertically within the navbars. .navbar-text { - .navbar-vertical-align(@line-height-computed); - - @media (min-width: @grid-float-breakpoint) { - float: left; - margin-left: @navbar-padding-horizontal; - margin-right: @navbar-padding-horizontal; - - // Outdent the form if last child to line up with content down the page - &.navbar-right:last-child { - margin-right: 0; - } - } + .navbar-vertical-align(@line-height-computed); + + @media (min-width: @grid-float-breakpoint) { + float: left; + margin-left: @navbar-padding-horizontal; + margin-right: @navbar-padding-horizontal; + + // Outdent the form if last child to line up with content down the page + &.navbar-right:last-child { + margin-right: 0; + } + } } // Alternate navbars @@ -383,240 +375,237 @@ // Default navbar .navbar-default { - background-color: @navbar-default-bg; - border-color: @navbar-default-border; - - .navbar-brand { - color: @navbar-default-brand-color; - &:hover, - &:focus { - color: @navbar-default-brand-hover-color; - background-color: @navbar-default-brand-hover-bg; - } - } - - .navbar-text { - color: @navbar-default-color; - } - - .navbar-nav { - > li > a { - color: @navbar-default-link-color; - - &:hover, - &:focus { - color: @navbar-default-link-hover-color; - background-color: @navbar-default-link-hover-bg; - } - } - > .active > a { - &, - &:hover, - &:focus { - color: @navbar-default-link-active-color; - background-color: @navbar-default-link-active-bg; - } - } - > .disabled > a { - &, - &:hover, - &:focus { - color: @navbar-default-link-disabled-color; - background-color: @navbar-default-link-disabled-bg; - } - } - } - - .navbar-toggle { - border-color: @navbar-default-toggle-border-color; - &:hover, - &:focus { - background-color: @navbar-default-toggle-hover-bg; - } - .icon-bar { - background-color: @navbar-default-toggle-icon-bar-bg; - } - } - - .navbar-collapse, - .navbar-form { - border-color: @navbar-default-border; - } - - // Dropdown menu items - .navbar-nav { - // Remove background color from open dropdown - > .open > a { - &, - &:hover, - &:focus { - background-color: @navbar-default-link-active-bg; - color: @navbar-default-link-active-color; - } - } - - @media (max-width: @grid-float-breakpoint-max) { - // Dropdowns get custom display when collapsed - .open .dropdown-menu { - > li > a { - color: @navbar-default-link-color; - &:hover, - &:focus { - color: @navbar-default-link-hover-color; - background-color: @navbar-default-link-hover-bg; - } - } - > .active > a { - &, - &:hover, - &:focus { - color: @navbar-default-link-active-color; - background-color: @navbar-default-link-active-bg; - } - } - > .disabled > a { - &, - &:hover, - &:focus { - color: @navbar-default-link-disabled-color; - background-color: @navbar-default-link-disabled-bg; - } - } - } - } - } - - - // Links in navbars - // - // Add a class to ensure links outside the navbar nav are colored correctly. - - .navbar-link { - color: @navbar-default-link-color; - &:hover { - color: @navbar-default-link-hover-color; - } - } - + background-color: @navbar-default-bg; + border-color: @navbar-default-border; + + .navbar-brand { + color: @navbar-default-brand-color; + &:hover, + &:focus { + color: @navbar-default-brand-hover-color; + background-color: @navbar-default-brand-hover-bg; + } + } + + .navbar-text { + color: @navbar-default-color; + } + + .navbar-nav { + > li > a { + color: @navbar-default-link-color; + + &:hover, + &:focus { + color: @navbar-default-link-hover-color; + background-color: @navbar-default-link-hover-bg; + } + } + > .active > a { + &, + &:hover, + &:focus { + color: @navbar-default-link-active-color; + background-color: @navbar-default-link-active-bg; + } + } + > .disabled > a { + &, + &:hover, + &:focus { + color: @navbar-default-link-disabled-color; + background-color: @navbar-default-link-disabled-bg; + } + } + } + + .navbar-toggle { + border-color: @navbar-default-toggle-border-color; + &:hover, + &:focus { + background-color: @navbar-default-toggle-hover-bg; + } + .icon-bar { + background-color: @navbar-default-toggle-icon-bar-bg; + } + } + + .navbar-collapse, + .navbar-form { + border-color: @navbar-default-border; + } + + // Dropdown menu items + .navbar-nav { + // Remove background color from open dropdown + > .open > a { + &, + &:hover, + &:focus { + background-color: @navbar-default-link-active-bg; + color: @navbar-default-link-active-color; + } + } + + @media (max-width: @grid-float-breakpoint-max) { + // Dropdowns get custom display when collapsed + .open .dropdown-menu { + > li > a { + color: @navbar-default-link-color; + &:hover, + &:focus { + color: @navbar-default-link-hover-color; + background-color: @navbar-default-link-hover-bg; + } + } + > .active > a { + &, + &:hover, + &:focus { + color: @navbar-default-link-active-color; + background-color: @navbar-default-link-active-bg; + } + } + > .disabled > a { + &, + &:hover, + &:focus { + color: @navbar-default-link-disabled-color; + background-color: @navbar-default-link-disabled-bg; + } + } + } + } + } + + // Links in navbars + // + // Add a class to ensure links outside the navbar nav are colored correctly. + + .navbar-link { + color: @navbar-default-link-color; + &:hover { + color: @navbar-default-link-hover-color; + } + } } // Inverse navbar .navbar-inverse { - background-color: @navbar-inverse-bg; - border-color: @navbar-inverse-border; - - .navbar-brand { - color: @navbar-inverse-brand-color; - &:hover, - &:focus { - color: @navbar-inverse-brand-hover-color; - background-color: @navbar-inverse-brand-hover-bg; - } - } - - .navbar-text { - color: @navbar-inverse-color; - } - - .navbar-nav { - > li > a { - color: @navbar-inverse-link-color; - - &:hover, - &:focus { - color: @navbar-inverse-link-hover-color; - background-color: @navbar-inverse-link-hover-bg; - } - } - > .active > a { - &, - &:hover, - &:focus { - color: @navbar-inverse-link-active-color; - background-color: @navbar-inverse-link-active-bg; - } - } - > .disabled > a { - &, - &:hover, - &:focus { - color: @navbar-inverse-link-disabled-color; - background-color: @navbar-inverse-link-disabled-bg; - } - } - } - - // Darken the responsive nav toggle - .navbar-toggle { - border-color: @navbar-inverse-toggle-border-color; - &:hover, - &:focus { - background-color: @navbar-inverse-toggle-hover-bg; - } - .icon-bar { - background-color: @navbar-inverse-toggle-icon-bar-bg; - } - } - - .navbar-collapse, - .navbar-form { - border-color: darken(@navbar-inverse-bg, 7%); - } - - // Dropdowns - .navbar-nav { - > .open > a { - &, - &:hover, - &:focus { - background-color: @navbar-inverse-link-active-bg; - color: @navbar-inverse-link-active-color; - } - } - - @media (max-width: @grid-float-breakpoint-max) { - // Dropdowns get custom display - .open .dropdown-menu { - > .dropdown-header { - border-color: @navbar-inverse-border; - } - .divider { - background-color: @navbar-inverse-border; - } - > li > a { - color: @navbar-inverse-link-color; - &:hover, - &:focus { - color: @navbar-inverse-link-hover-color; - background-color: @navbar-inverse-link-hover-bg; - } - } - > .active > a { - &, - &:hover, - &:focus { - color: @navbar-inverse-link-active-color; - background-color: @navbar-inverse-link-active-bg; - } - } - > .disabled > a { - &, - &:hover, - &:focus { - color: @navbar-inverse-link-disabled-color; - background-color: @navbar-inverse-link-disabled-bg; - } - } - } - } - } - - .navbar-link { - color: @navbar-inverse-link-color; - &:hover { - color: @navbar-inverse-link-hover-color; - } - } - + background-color: @navbar-inverse-bg; + border-color: @navbar-inverse-border; + + .navbar-brand { + color: @navbar-inverse-brand-color; + &:hover, + &:focus { + color: @navbar-inverse-brand-hover-color; + background-color: @navbar-inverse-brand-hover-bg; + } + } + + .navbar-text { + color: @navbar-inverse-color; + } + + .navbar-nav { + > li > a { + color: @navbar-inverse-link-color; + + &:hover, + &:focus { + color: @navbar-inverse-link-hover-color; + background-color: @navbar-inverse-link-hover-bg; + } + } + > .active > a { + &, + &:hover, + &:focus { + color: @navbar-inverse-link-active-color; + background-color: @navbar-inverse-link-active-bg; + } + } + > .disabled > a { + &, + &:hover, + &:focus { + color: @navbar-inverse-link-disabled-color; + background-color: @navbar-inverse-link-disabled-bg; + } + } + } + + // Darken the responsive nav toggle + .navbar-toggle { + border-color: @navbar-inverse-toggle-border-color; + &:hover, + &:focus { + background-color: @navbar-inverse-toggle-hover-bg; + } + .icon-bar { + background-color: @navbar-inverse-toggle-icon-bar-bg; + } + } + + .navbar-collapse, + .navbar-form { + border-color: darken(@navbar-inverse-bg, 7%); + } + + // Dropdowns + .navbar-nav { + > .open > a { + &, + &:hover, + &:focus { + background-color: @navbar-inverse-link-active-bg; + color: @navbar-inverse-link-active-color; + } + } + + @media (max-width: @grid-float-breakpoint-max) { + // Dropdowns get custom display + .open .dropdown-menu { + > .dropdown-header { + border-color: @navbar-inverse-border; + } + .divider { + background-color: @navbar-inverse-border; + } + > li > a { + color: @navbar-inverse-link-color; + &:hover, + &:focus { + color: @navbar-inverse-link-hover-color; + background-color: @navbar-inverse-link-hover-bg; + } + } + > .active > a { + &, + &:hover, + &:focus { + color: @navbar-inverse-link-active-color; + background-color: @navbar-inverse-link-active-bg; + } + } + > .disabled > a { + &, + &:hover, + &:focus { + color: @navbar-inverse-link-disabled-color; + background-color: @navbar-inverse-link-disabled-bg; + } + } + } + } + } + + .navbar-link { + color: @navbar-inverse-link-color; + &:hover { + color: @navbar-inverse-link-hover-color; + } + } } diff --git a/docs/src/css/less/twbs/navs.less b/docs/src/css/less/twbs/navs.less index 9e729b39..d6ff378c 100644 --- a/docs/src/css/less/twbs/navs.less +++ b/docs/src/css/less/twbs/navs.less @@ -2,155 +2,151 @@ // Navs // -------------------------------------------------- - // Base class // -------------------------------------------------- .nav { - margin-bottom: 0; - padding-left: 0; // Override default ul/ol - list-style: none; - &:extend(.clearfix all); - - > li { - position: relative; - display: block; - - > a { - position: relative; - display: block; - padding: @nav-link-padding; - &:hover, - &:focus { - text-decoration: none; - background-color: @nav-link-hover-bg; - } - } - - // Disabled state sets text to gray and nukes hover/tab effects - &.disabled > a { - color: @nav-disabled-link-color; - - &:hover, - &:focus { - color: @nav-disabled-link-hover-color; - text-decoration: none; - background-color: transparent; - cursor: not-allowed; - } - } - } - - // Open dropdowns - .open > a { - &, - &:hover, - &:focus { - background-color: @nav-link-hover-bg; - border-color: @link-color; - } - } - - // Nav dividers (deprecated with v3.0.1) - // - // This should have been removed in v3 with the dropping of `.nav-list`, but - // we missed it. We don't currently support this anywhere, but in the interest - // of maintaining backward compatibility in case you use it, it's deprecated. - .nav-divider { - .nav-divider(); - } - - // Prevent IE8 from misplacing imgs - // - // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989 - > li > a > img { - max-width: none; - } + margin-bottom: 0; + padding-left: 0; // Override default ul/ol + list-style: none; + &:extend(.clearfix all); + + > li { + position: relative; + display: block; + + > a { + position: relative; + display: block; + padding: @nav-link-padding; + &:hover, + &:focus { + text-decoration: none; + background-color: @nav-link-hover-bg; + } + } + + // Disabled state sets text to gray and nukes hover/tab effects + &.disabled > a { + color: @nav-disabled-link-color; + + &:hover, + &:focus { + color: @nav-disabled-link-hover-color; + text-decoration: none; + background-color: transparent; + cursor: not-allowed; + } + } + } + + // Open dropdowns + .open > a { + &, + &:hover, + &:focus { + background-color: @nav-link-hover-bg; + border-color: @link-color; + } + } + + // Nav dividers (deprecated with v3.0.1) + // + // This should have been removed in v3 with the dropping of `.nav-list`, but + // we missed it. We don't currently support this anywhere, but in the interest + // of maintaining backward compatibility in case you use it, it's deprecated. + .nav-divider { + .nav-divider(); + } + + // Prevent IE8 from misplacing imgs + // + // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989 + > li > a > img { + max-width: none; + } } - // Tabs // ------------------------- // Give the tabs something to sit on .nav-tabs { - border-bottom: 1px solid @nav-tabs-border-color; - > li { - float: left; - // Make the list-items overlay the bottom border - margin-bottom: -1px; - - // Actual tabs (as links) - > a { - margin-right: 2px; - line-height: @line-height-base; - border: 1px solid transparent; - border-radius: @border-radius-base @border-radius-base 0 0; - &:hover { - border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color; - } - } - - // Active state, and its :hover to override normal :hover - &.active > a { - &, - &:hover, - &:focus { - color: @nav-tabs-active-link-hover-color; - background-color: @nav-tabs-active-link-hover-bg; - border: 1px solid @nav-tabs-active-link-hover-border-color; - border-bottom-color: transparent; - cursor: default; - } - } - } - // pulling this in mainly for less shorthand - &.nav-justified { - .nav-justified(); - .nav-tabs-justified(); - } + border-bottom: 1px solid @nav-tabs-border-color; + > li { + float: left; + // Make the list-items overlay the bottom border + margin-bottom: -1px; + + // Actual tabs (as links) + > a { + margin-right: 2px; + line-height: @line-height-base; + border: 1px solid transparent; + border-radius: @border-radius-base @border-radius-base 0 0; + &:hover { + border-color: @nav-tabs-link-hover-border-color + @nav-tabs-link-hover-border-color @nav-tabs-border-color; + } + } + + // Active state, and its :hover to override normal :hover + &.active > a { + &, + &:hover, + &:focus { + color: @nav-tabs-active-link-hover-color; + background-color: @nav-tabs-active-link-hover-bg; + border: 1px solid @nav-tabs-active-link-hover-border-color; + border-bottom-color: transparent; + cursor: default; + } + } + } + // pulling this in mainly for less shorthand + &.nav-justified { + .nav-justified(); + .nav-tabs-justified(); + } } - // Pills // ------------------------- .nav-pills { - > li { - float: left; - - // Links rendered as pills - > a { - border-radius: @nav-pills-border-radius; - } - + li { - margin-left: 2px; - } - - // Active state - &.active > a { - &, - &:hover, - &:focus { - color: @nav-pills-active-link-hover-color; - background-color: @nav-pills-active-link-hover-bg; - } - } - } + > li { + float: left; + + // Links rendered as pills + > a { + border-radius: @nav-pills-border-radius; + } + + li { + margin-left: 2px; + } + + // Active state + &.active > a { + &, + &:hover, + &:focus { + color: @nav-pills-active-link-hover-color; + background-color: @nav-pills-active-link-hover-bg; + } + } + } } - // Stacked pills .nav-stacked { - > li { - float: none; - + li { - margin-top: 2px; - margin-left: 0; // no need for this gap between nav items - } - } + > li { + float: none; + + li { + margin-top: 2px; + margin-left: 0; // no need for this gap between nav items + } + } } - // Nav variations // -------------------------------------------------- @@ -158,85 +154,83 @@ // ------------------------- .nav-justified { - width: 100%; - - > li { - float: none; - > a { - text-align: center; - margin-bottom: 5px; - } - } - - > .dropdown .dropdown-menu { - top: auto; - left: auto; - } - - @media (min-width: @screen-sm-min) { - > li { - display: table-cell; - width: 1%; - > a { - margin-bottom: 0; - } - } - } + width: 100%; + + > li { + float: none; + > a { + text-align: center; + margin-bottom: 5px; + } + } + + > .dropdown .dropdown-menu { + top: auto; + left: auto; + } + + @media (min-width: @screen-sm-min) { + > li { + display: table-cell; + width: 1%; + > a { + margin-bottom: 0; + } + } + } } // Move borders to anchors instead of bottom of list // // Mixin for adding on top the shared `.nav-justified` styles for our tabs .nav-tabs-justified { - border-bottom: 0; - - > li > a { - // Override margin from .nav-tabs - margin-right: 0; - border-radius: @border-radius-base; - } - - > .active > a, - > .active > a:hover, - > .active > a:focus { - border: 1px solid @nav-tabs-justified-link-border-color; - } - - @media (min-width: @screen-sm-min) { - > li > a { - border-bottom: 1px solid @nav-tabs-justified-link-border-color; - border-radius: @border-radius-base @border-radius-base 0 0; - } - > .active > a, - > .active > a:hover, - > .active > a:focus { - border-bottom-color: @nav-tabs-justified-active-link-border-color; - } - } + border-bottom: 0; + + > li > a { + // Override margin from .nav-tabs + margin-right: 0; + border-radius: @border-radius-base; + } + + > .active > a, + > .active > a:hover, + > .active > a:focus { + border: 1px solid @nav-tabs-justified-link-border-color; + } + + @media (min-width: @screen-sm-min) { + > li > a { + border-bottom: 1px solid @nav-tabs-justified-link-border-color; + border-radius: @border-radius-base @border-radius-base 0 0; + } + > .active > a, + > .active > a:hover, + > .active > a:focus { + border-bottom-color: @nav-tabs-justified-active-link-border-color; + } + } } - // Tabbable tabs // ------------------------- // Hide tabbable panes to start, show them when `.active` .tab-content { - > .tab-pane { - display: none; - } - > .active { - display: block; - } + > .tab-pane { + display: none; + } + > .active { + display: block; + } } - // Dropdowns // ------------------------- // Specific dropdowns .nav-tabs .dropdown-menu { - // make dropdown border overlap tab border - margin-top: -1px; - // Remove the top rounded corners here since there is a hard edge above the menu - .border-top-radius(0); + // make dropdown border overlap tab border + margin-top: -1px; + // Remove the top rounded corners here since there is a hard edge above the menu + .border-top-radius(0); } diff --git a/docs/src/css/less/twbs/normalize.less b/docs/src/css/less/twbs/normalize.less index 42a393fc..fabe1e70 100644 --- a/docs/src/css/less/twbs/normalize.less +++ b/docs/src/css/less/twbs/normalize.less @@ -20,7 +20,7 @@ main, nav, section, summary { - display: block; + display: block; } // @@ -30,7 +30,7 @@ summary { audio, canvas, video { - display: inline-block; + display: inline-block; } // @@ -39,8 +39,8 @@ video { // audio:not([controls]) { - display: none; - height: 0; + display: none; + height: 0; } // @@ -50,7 +50,7 @@ audio:not([controls]) { [hidden], template { - display: none; + display: none; } // ========================================================================== @@ -64,9 +64,9 @@ template { // html { - font-family: sans-serif; // 1 - -ms-text-size-adjust: 100%; // 2 - -webkit-text-size-adjust: 100%; // 2 + font-family: sans-serif; // 1 + -ms-text-size-adjust: 100%; // 2 + -webkit-text-size-adjust: 100%; // 2 } // @@ -74,7 +74,7 @@ html { // body { - margin: 0; + margin: 0; } // ========================================================================== @@ -86,7 +86,7 @@ body { // a { - background: transparent; + background: transparent; } // @@ -94,7 +94,7 @@ a { // a:focus { - outline: thin dotted; + outline: thin dotted; } // @@ -103,7 +103,7 @@ a:focus { a:active, a:hover { - outline: 0; + outline: 0; } // ========================================================================== @@ -116,8 +116,8 @@ a:hover { // h1 { - font-size: 2em; - margin: 0.67em 0; + font-size: 2em; + margin: 0.67em 0; } // @@ -125,7 +125,7 @@ h1 { // abbr[title] { - border-bottom: 1px dotted; + border-bottom: 1px dotted; } // @@ -134,7 +134,7 @@ abbr[title] { b, strong { - font-weight: bold; + font-weight: bold; } // @@ -142,7 +142,7 @@ strong { // dfn { - font-style: italic; + font-style: italic; } // @@ -150,9 +150,9 @@ dfn { // hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; } // @@ -160,8 +160,8 @@ hr { // mark { - background: #ff0; - color: #000; + background: #ff0; + color: #000; } // @@ -172,8 +172,8 @@ code, kbd, pre, samp { - font-family: monospace, serif; - font-size: 1em; + font-family: monospace, serif; + font-size: 1em; } // @@ -181,7 +181,7 @@ samp { // pre { - white-space: pre-wrap; + white-space: pre-wrap; } // @@ -189,7 +189,7 @@ pre { // q { - quotes: "\201C" "\201D" "\2018" "\2019"; + quotes: '\201C''\201D''\2018''\2019'; } // @@ -197,7 +197,7 @@ q { // small { - font-size: 80%; + font-size: 80%; } // @@ -206,18 +206,18 @@ small { sub, sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } sup { - top: -0.5em; + top: -0.5em; } sub { - bottom: -0.25em; + bottom: -0.25em; } // ========================================================================== @@ -229,7 +229,7 @@ sub { // img { - border: 0; + border: 0; } // @@ -237,7 +237,7 @@ img { // svg:not(:root) { - overflow: hidden; + overflow: hidden; } // ========================================================================== @@ -249,7 +249,7 @@ svg:not(:root) { // figure { - margin: 0; + margin: 0; } // ========================================================================== @@ -261,9 +261,9 @@ figure { // fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; } // @@ -272,8 +272,8 @@ fieldset { // legend { - border: 0; // 1 - padding: 0; // 2 + border: 0; // 1 + padding: 0; // 2 } // @@ -286,9 +286,9 @@ button, input, select, textarea { - font-family: inherit; // 1 - font-size: 100%; // 2 - margin: 0; // 3 + font-family: inherit; // 1 + font-size: 100%; // 2 + margin: 0; // 3 } // @@ -298,7 +298,7 @@ textarea { button, input { - line-height: normal; + line-height: normal; } // @@ -310,7 +310,7 @@ input { button, select { - text-transform: none; + text-transform: none; } // @@ -325,8 +325,8 @@ button, html input[type="button"], // 1 input[type="reset"], input[type="submit"] { - -webkit-appearance: button; // 2 - cursor: pointer; // 3 + -webkit-appearance: button; // 2 + cursor: pointer; // 3 } // @@ -335,7 +335,7 @@ input[type="submit"] { button[disabled], html input[disabled] { - cursor: default; + cursor: default; } // @@ -343,10 +343,10 @@ html input[disabled] { // 2. Remove excess padding in IE 8/9/10. // -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; // 1 - padding: 0; // 2 +input[type='checkbox'], +input[type='radio'] { + box-sizing: border-box; // 1 + padding: 0; // 2 } // @@ -355,11 +355,11 @@ input[type="radio"] { // (include `-moz` to future-proof). // -input[type="search"] { - -webkit-appearance: textfield; // 1 - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; // 2 - box-sizing: content-box; +input[type='search'] { + -webkit-appearance: textfield; // 1 + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; // 2 + box-sizing: content-box; } // @@ -367,9 +367,9 @@ input[type="search"] { // on OS X. // -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; +input[type='search']::-webkit-search-cancel-button, +input[type='search']::-webkit-search-decoration { + -webkit-appearance: none; } // @@ -378,8 +378,8 @@ input[type="search"]::-webkit-search-decoration { button::-moz-focus-inner, input::-moz-focus-inner { - border: 0; - padding: 0; + border: 0; + padding: 0; } // @@ -388,8 +388,8 @@ input::-moz-focus-inner { // textarea { - overflow: auto; // 1 - vertical-align: top; // 2 + overflow: auto; // 1 + vertical-align: top; // 2 } // ========================================================================== @@ -401,6 +401,6 @@ textarea { // table { - border-collapse: collapse; - border-spacing: 0; + border-collapse: collapse; + border-spacing: 0; } diff --git a/docs/src/css/less/twbs/pager.less b/docs/src/css/less/twbs/pager.less index 59103f44..62074489 100644 --- a/docs/src/css/less/twbs/pager.less +++ b/docs/src/css/less/twbs/pager.less @@ -2,54 +2,52 @@ // Pager pagination // -------------------------------------------------- - .pager { - padding-left: 0; - margin: @line-height-computed 0; - list-style: none; - text-align: center; - &:extend(.clearfix all); - li { - display: inline; - > a, - > span { - display: inline-block; - padding: 5px 14px; - background-color: @pager-bg; - border: 1px solid @pager-border; - border-radius: @pager-border-radius; - } - - > a:hover, - > a:focus { - text-decoration: none; - background-color: @pager-hover-bg; - } - } + padding-left: 0; + margin: @line-height-computed 0; + list-style: none; + text-align: center; + &:extend(.clearfix all); + li { + display: inline; + > a, + > span { + display: inline-block; + padding: 5px 14px; + background-color: @pager-bg; + border: 1px solid @pager-border; + border-radius: @pager-border-radius; + } - .next { - > a, - > span { - float: right; - } - } + > a:hover, + > a:focus { + text-decoration: none; + background-color: @pager-hover-bg; + } + } - .previous { - > a, - > span { - float: left; - } - } + .next { + > a, + > span { + float: right; + } + } - .disabled { - > a, - > a:hover, - > a:focus, - > span { - color: @pager-disabled-color; - background-color: @pager-bg; - cursor: not-allowed; - } - } + .previous { + > a, + > span { + float: left; + } + } + .disabled { + > a, + > a:hover, + > a:focus, + > span { + color: @pager-disabled-color; + background-color: @pager-bg; + cursor: not-allowed; + } + } } diff --git a/docs/src/css/less/twbs/pagination.less b/docs/src/css/less/twbs/pagination.less index b2856ae6..e55cb31c 100644 --- a/docs/src/css/less/twbs/pagination.less +++ b/docs/src/css/less/twbs/pagination.less @@ -2,76 +2,76 @@ // Pagination (multiple pages) // -------------------------------------------------- .pagination { - display: inline-block; - padding-left: 0; - margin: @line-height-computed 0; - border-radius: @border-radius-base; + display: inline-block; + padding-left: 0; + margin: @line-height-computed 0; + border-radius: @border-radius-base; - > li { - display: inline; // Remove list-style and block-level defaults - > a, - > span { - position: relative; - float: left; // Collapse white-space - padding: @padding-base-vertical @padding-base-horizontal; - line-height: @line-height-base; - text-decoration: none; - color: @pagination-color; - background-color: @pagination-bg; - border: 1px solid @pagination-border; - margin-left: -1px; - } - &:first-child { - > a, - > span { - margin-left: 0; - .border-left-radius(@border-radius-base); - } - } - &:last-child { - > a, - > span { - .border-right-radius(@border-radius-base); - } - } - } + > li { + display: inline; // Remove list-style and block-level defaults + > a, + > span { + position: relative; + float: left; // Collapse white-space + padding: @padding-base-vertical @padding-base-horizontal; + line-height: @line-height-base; + text-decoration: none; + color: @pagination-color; + background-color: @pagination-bg; + border: 1px solid @pagination-border; + margin-left: -1px; + } + &:first-child { + > a, + > span { + margin-left: 0; + .border-left-radius(@border-radius-base); + } + } + &:last-child { + > a, + > span { + .border-right-radius(@border-radius-base); + } + } + } - > li > a, - > li > span { - &:hover, - &:focus { - color: @pagination-hover-color; - background-color: @pagination-hover-bg; - border-color: @pagination-hover-border; - } - } + > li > a, + > li > span { + &:hover, + &:focus { + color: @pagination-hover-color; + background-color: @pagination-hover-bg; + border-color: @pagination-hover-border; + } + } - > .active > a, - > .active > span { - &, - &:hover, - &:focus { - z-index: 2; - color: @pagination-active-color; - background-color: @pagination-active-bg; - border-color: @pagination-active-border; - cursor: default; - } - } + > .active > a, + > .active > span { + &, + &:hover, + &:focus { + z-index: 2; + color: @pagination-active-color; + background-color: @pagination-active-bg; + border-color: @pagination-active-border; + cursor: default; + } + } - > .disabled { - > span, - > span:hover, - > span:focus, - > a, - > a:hover, - > a:focus { - color: @pagination-disabled-color; - background-color: @pagination-disabled-bg; - border-color: @pagination-disabled-border; - cursor: not-allowed; - } - } + > .disabled { + > span, + > span:hover, + > span:focus, + > a, + > a:hover, + > a:focus { + color: @pagination-disabled-color; + background-color: @pagination-disabled-bg; + border-color: @pagination-disabled-border; + cursor: not-allowed; + } + } } // Sizing @@ -79,10 +79,10 @@ // Large .pagination-lg { - .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large); + .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large); } // Small .pagination-sm { - .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small); + .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small); } diff --git a/docs/src/css/less/twbs/panels.less b/docs/src/css/less/twbs/panels.less index e004d171..2366f892 100644 --- a/docs/src/css/less/twbs/panels.less +++ b/docs/src/css/less/twbs/panels.less @@ -2,229 +2,223 @@ // Panels // -------------------------------------------------- - // Base class .panel { - margin-bottom: @line-height-computed; - background-color: @panel-bg; - border: 1px solid transparent; - border-radius: @panel-border-radius; - .box-shadow(0 1px 1px rgba(0,0,0,.05)); + margin-bottom: @line-height-computed; + background-color: @panel-bg; + border: 1px solid transparent; + border-radius: @panel-border-radius; + .box-shadow(0 1px 1px rgba(0,0,0,0.05)); } // Panel contents .panel-body { - padding: @panel-body-padding; - &:extend(.clearfix all); + padding: @panel-body-padding; + &:extend(.clearfix all); } - // List groups in panels // // By default, space out list group content from panel headings to account for // any kind of custom content between the two. .panel { - > .list-group { - margin-bottom: 0; - .list-group-item { - border-width: 1px 0; - border-radius: 0; - &:first-child { - border-top: 0; - } - &:last-child { - border-bottom: 0; - } - } - // Add border top radius for first one - &:first-child { - .list-group-item:first-child { - .border-top-radius((@panel-border-radius - 1)); - } - } - // Add border bottom radius for last one - &:last-child { - .list-group-item:last-child { - .border-bottom-radius((@panel-border-radius - 1)); - } - } - } + > .list-group { + margin-bottom: 0; + .list-group-item { + border-width: 1px 0; + border-radius: 0; + &:first-child { + border-top: 0; + } + &:last-child { + border-bottom: 0; + } + } + // Add border top radius for first one + &:first-child { + .list-group-item:first-child { + .border-top-radius((@panel-border-radius - 1)); + } + } + // Add border bottom radius for last one + &:last-child { + .list-group-item:last-child { + .border-bottom-radius((@panel-border-radius - 1)); + } + } + } } // Collapse space between when there's no additional content. .panel-heading + .list-group { - .list-group-item:first-child { - border-top-width: 0; - } + .list-group-item:first-child { + border-top-width: 0; + } } - // Tables in panels // // Place a non-bordered `.table` within a panel (not within a `.panel-body`) and // watch it go full width. .panel { - > .table, - > .table-responsive > .table { - margin-bottom: 0; - } - // Add border top radius for first one - > .table:first-child, - > .table-responsive:first-child > .table:first-child { - > thead:first-child, - > tbody:first-child { - > tr:first-child { - td:first-child, - th:first-child { - border-top-left-radius: (@panel-border-radius - 1); - } - td:last-child, - th:last-child { - border-top-right-radius: (@panel-border-radius - 1); - } - } - } - } - // Add border bottom radius for last one - > .table:last-child, - > .table-responsive:last-child > .table:last-child { - > tbody:last-child, - > tfoot:last-child { - > tr:last-child { - td:first-child, - th:first-child { - border-bottom-left-radius: (@panel-border-radius - 1); - } - td:last-child, - th:last-child { - border-bottom-right-radius: (@panel-border-radius - 1); - } - } - } - } - > .panel-body + .table, - > .panel-body + .table-responsive { - border-top: 1px solid @table-border-color; - } - > .table > tbody:first-child th, - > .table > tbody:first-child td { - border-top: 0; - } - > .table-bordered, - > .table-responsive > .table-bordered { - border: 0; - > thead, - > tbody, - > tfoot { - > tr { - > th:first-child, - > td:first-child { - border-left: 0; - } - > th:last-child, - > td:last-child { - border-right: 0; - } - &:first-child > th, - &:first-child > td { - border-top: 0; - } - &:last-child > th, - &:last-child > td { - border-bottom: 0; - } - } - } - } - > .table-responsive { - border: 0; - margin-bottom: 0; - } + > .table, + > .table-responsive > .table { + margin-bottom: 0; + } + // Add border top radius for first one + > .table:first-child, + > .table-responsive:first-child > .table:first-child { + > thead:first-child, + > tbody:first-child { + > tr:first-child { + td:first-child, + th:first-child { + border-top-left-radius: (@panel-border-radius - 1); + } + td:last-child, + th:last-child { + border-top-right-radius: (@panel-border-radius - 1); + } + } + } + } + // Add border bottom radius for last one + > .table:last-child, + > .table-responsive:last-child > .table:last-child { + > tbody:last-child, + > tfoot:last-child { + > tr:last-child { + td:first-child, + th:first-child { + border-bottom-left-radius: (@panel-border-radius - 1); + } + td:last-child, + th:last-child { + border-bottom-right-radius: (@panel-border-radius - 1); + } + } + } + } + > .panel-body + .table, + > .panel-body + .table-responsive { + border-top: 1px solid @table-border-color; + } + > .table > tbody:first-child th, + > .table > tbody:first-child td { + border-top: 0; + } + > .table-bordered, + > .table-responsive > .table-bordered { + border: 0; + > thead, + > tbody, + > tfoot { + > tr { + > th:first-child, + > td:first-child { + border-left: 0; + } + > th:last-child, + > td:last-child { + border-right: 0; + } + &:first-child > th, + &:first-child > td { + border-top: 0; + } + &:last-child > th, + &:last-child > td { + border-bottom: 0; + } + } + } + } + > .table-responsive { + border: 0; + margin-bottom: 0; + } } - // Optional heading .panel-heading { - padding: 10px 15px; - border-bottom: 1px solid transparent; - .border-top-radius((@panel-border-radius - 1)); + padding: 10px 15px; + border-bottom: 1px solid transparent; + .border-top-radius((@panel-border-radius - 1)); - > .dropdown .dropdown-toggle { - color: inherit; - } + > .dropdown .dropdown-toggle { + color: inherit; + } } // Within heading, strip any `h*` tag of its default margins for spacing. .panel-title { - margin-top: 0; - margin-bottom: 0; - font-size: ceil((@font-size-base * 1.125)); - color: inherit; - - > a { - color: inherit; - } + margin-top: 0; + margin-bottom: 0; + font-size: ceil((@font-size-base * 1.125)); + color: inherit; + + > a { + color: inherit; + } } // Optional footer (stays gray in every modifier class) .panel-footer { - padding: 10px 15px; - background-color: @panel-footer-bg; - border-top: 1px solid @panel-inner-border; - .border-bottom-radius((@panel-border-radius - 1)); + padding: 10px 15px; + background-color: @panel-footer-bg; + border-top: 1px solid @panel-inner-border; + .border-bottom-radius((@panel-border-radius - 1)); } - // Collapsable panels (aka, accordion) // // Wrap a series of panels in `.panel-group` to turn them into an accordion with // the help of our collapse JavaScript plugin. .panel-group { - margin-bottom: @line-height-computed; - - // Tighten up margin so it's only between panels - .panel { - margin-bottom: 0; - border-radius: @panel-border-radius; - overflow: hidden; // crop contents when collapsed - + .panel { - margin-top: 5px; - } - } - - .panel-heading { - border-bottom: 0; - + .panel-collapse .panel-body { - border-top: 1px solid @panel-inner-border; - } - } - .panel-footer { - border-top: 0; - + .panel-collapse .panel-body { - border-bottom: 1px solid @panel-inner-border; - } - } + margin-bottom: @line-height-computed; + + // Tighten up margin so it's only between panels + .panel { + margin-bottom: 0; + border-radius: @panel-border-radius; + overflow: hidden; // crop contents when collapsed + + .panel { + margin-top: 5px; + } + } + + .panel-heading { + border-bottom: 0; + + .panel-collapse .panel-body { + border-top: 1px solid @panel-inner-border; + } + } + .panel-footer { + border-top: 0; + + .panel-collapse .panel-body { + border-bottom: 1px solid @panel-inner-border; + } + } } - // Contextual variations .panel-default { - .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border); + .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border); } .panel-primary { - .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border); + .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border); } .panel-success { - .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border); + .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border); } .panel-info { - .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border); + .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border); } .panel-warning { - .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border); + .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border); } .panel-danger { - .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border); + .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border); } diff --git a/docs/src/css/less/twbs/popovers.less b/docs/src/css/less/twbs/popovers.less index 345bb1a3..09054ae0 100644 --- a/docs/src/css/less/twbs/popovers.less +++ b/docs/src/css/less/twbs/popovers.less @@ -2,46 +2,53 @@ // Popovers // -------------------------------------------------- - .popover { - position: absolute; - top: 0; - left: 0; - z-index: @zindex-popover; - display: none; - max-width: @popover-max-width; - padding: 1px; - text-align: left; // Reset given new insertion method - background-color: @popover-bg; - background-clip: padding-box; - border: 1px solid @popover-fallback-border-color; - border: 1px solid @popover-border-color; - border-radius: @border-radius-large; - .box-shadow(0 5px 10px rgba(0,0,0,.2)); + position: absolute; + top: 0; + left: 0; + z-index: @zindex-popover; + display: none; + max-width: @popover-max-width; + padding: 1px; + text-align: left; // Reset given new insertion method + background-color: @popover-bg; + background-clip: padding-box; + border: 1px solid @popover-fallback-border-color; + border: 1px solid @popover-border-color; + border-radius: @border-radius-large; + .box-shadow(0 5px 10px rgba(0,0,0,0.2)); - // Overrides for proper insertion - white-space: normal; + // Overrides for proper insertion + white-space: normal; - // Offset the popover to account for the popover arrow - &.top { margin-top: -10px; } - &.right { margin-left: 10px; } - &.bottom { margin-top: 10px; } - &.left { margin-left: -10px; } + // Offset the popover to account for the popover arrow + &.top { + margin-top: -10px; + } + &.right { + margin-left: 10px; + } + &.bottom { + margin-top: 10px; + } + &.left { + margin-left: -10px; + } } .popover-title { - margin: 0; // reset heading margin - padding: 8px 14px; - font-size: @font-size-base; - font-weight: normal; - line-height: 18px; - background-color: @popover-title-bg; - border-bottom: 1px solid darken(@popover-title-bg, 5%); - border-radius: 5px 5px 0 0; + margin: 0; // reset heading margin + padding: 8px 14px; + font-size: @font-size-base; + font-weight: normal; + line-height: 18px; + background-color: @popover-title-bg; + border-bottom: 1px solid darken(@popover-title-bg, 5%); + border-radius: 5px 5px 0 0; } .popover-content { - padding: 9px 14px; + padding: 9px 14px; } // Arrows @@ -49,85 +56,84 @@ // .arrow is outer, .arrow:after is inner .popover .arrow { - &, - &:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - } + &, + &:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + } } .popover .arrow { - border-width: @popover-arrow-outer-width; + border-width: @popover-arrow-outer-width; } .popover .arrow:after { - border-width: @popover-arrow-width; - content: ""; + border-width: @popover-arrow-width; + content: ''; } .popover { - &.top .arrow { - left: 50%; - margin-left: -@popover-arrow-outer-width; - border-bottom-width: 0; - border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback - border-top-color: @popover-arrow-outer-color; - bottom: -@popover-arrow-outer-width; - &:after { - content: " "; - bottom: 1px; - margin-left: -@popover-arrow-width; - border-bottom-width: 0; - border-top-color: @popover-arrow-color; - } - } - &.right .arrow { - top: 50%; - left: -@popover-arrow-outer-width; - margin-top: -@popover-arrow-outer-width; - border-left-width: 0; - border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback - border-right-color: @popover-arrow-outer-color; - &:after { - content: " "; - left: 1px; - bottom: -@popover-arrow-width; - border-left-width: 0; - border-right-color: @popover-arrow-color; - } - } - &.bottom .arrow { - left: 50%; - margin-left: -@popover-arrow-outer-width; - border-top-width: 0; - border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback - border-bottom-color: @popover-arrow-outer-color; - top: -@popover-arrow-outer-width; - &:after { - content: " "; - top: 1px; - margin-left: -@popover-arrow-width; - border-top-width: 0; - border-bottom-color: @popover-arrow-color; - } - } - - &.left .arrow { - top: 50%; - right: -@popover-arrow-outer-width; - margin-top: -@popover-arrow-outer-width; - border-right-width: 0; - border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback - border-left-color: @popover-arrow-outer-color; - &:after { - content: " "; - right: 1px; - border-right-width: 0; - border-left-color: @popover-arrow-color; - bottom: -@popover-arrow-width; - } - } + &.top .arrow { + left: 50%; + margin-left: -@popover-arrow-outer-width; + border-bottom-width: 0; + border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback + border-top-color: @popover-arrow-outer-color; + bottom: -@popover-arrow-outer-width; + &:after { + content: ' '; + bottom: 1px; + margin-left: -@popover-arrow-width; + border-bottom-width: 0; + border-top-color: @popover-arrow-color; + } + } + &.right .arrow { + top: 50%; + left: -@popover-arrow-outer-width; + margin-top: -@popover-arrow-outer-width; + border-left-width: 0; + border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback + border-right-color: @popover-arrow-outer-color; + &:after { + content: ' '; + left: 1px; + bottom: -@popover-arrow-width; + border-left-width: 0; + border-right-color: @popover-arrow-color; + } + } + &.bottom .arrow { + left: 50%; + margin-left: -@popover-arrow-outer-width; + border-top-width: 0; + border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback + border-bottom-color: @popover-arrow-outer-color; + top: -@popover-arrow-outer-width; + &:after { + content: ' '; + top: 1px; + margin-left: -@popover-arrow-width; + border-top-width: 0; + border-bottom-color: @popover-arrow-color; + } + } + &.left .arrow { + top: 50%; + right: -@popover-arrow-outer-width; + margin-top: -@popover-arrow-outer-width; + border-right-width: 0; + border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback + border-left-color: @popover-arrow-outer-color; + &:after { + content: ' '; + right: 1px; + border-right-width: 0; + border-left-color: @popover-arrow-color; + bottom: -@popover-arrow-width; + } + } } diff --git a/docs/src/css/less/twbs/print.less b/docs/src/css/less/twbs/print.less index 07277a3c..999d288d 100644 --- a/docs/src/css/less/twbs/print.less +++ b/docs/src/css/less/twbs/print.less @@ -4,102 +4,100 @@ // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css @media print { - - * { - text-shadow: none !important; - color: #000 !important; // Black prints faster: h5bp.com/s - background: transparent !important; - box-shadow: none !important; - } - - a, - a:visited { - text-decoration: underline; - } - - a[href]:after { - content: " (" attr(href) ")"; - } - - abbr[title]:after { - content: " (" attr(title) ")"; - } - - // Don't show links for images, or javascript/internal links - a[href^="javascript:"]:after, - a[href^="#"]:after { - content: ""; - } - - pre, - blockquote { - border: 1px solid #999; - page-break-inside: avoid; - } - - thead { - display: table-header-group; // h5bp.com/t - } - - tr, - img { - page-break-inside: avoid; - } - - img { - max-width: 100% !important; - } - - @page { - margin: 2cm .5cm; - } - - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - - h2, - h3 { - page-break-after: avoid; - } - - // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245 - // Once fixed, we can just straight up remove this. - select { - background: #fff !important; - } - - // Bootstrap components - .navbar { - display: none; - } - .table { - td, - th { - background-color: #fff !important; - } - } - .btn, - .dropup > .btn { - > .caret { - border-top-color: #000 !important; - } - } - .label { - border: 1px solid #000; - } - - .table { - border-collapse: collapse !important; - } - .table-bordered { - th, - td { - border: 1px solid #ddd !important; - } - } - + * { + text-shadow: none !important; + color: #000 !important; // Black prints faster: h5bp.com/s + background: transparent !important; + box-shadow: none !important; + } + + a, + a:visited { + text-decoration: underline; + } + + a[href]:after { + content: ' (' attr(href) ')'; + } + + abbr[title]:after { + content: ' (' attr(title) ')'; + } + + // Don't show links for images, or javascript/internal links + a[href^='javascript:']:after, + a[href^='#']:after { + content: ''; + } + + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + + thead { + display: table-header-group; // h5bp.com/t + } + + tr, + img { + page-break-inside: avoid; + } + + img { + max-width: 100% !important; + } + + @page { + margin: 2cm 0.5cm; + } + + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + + h2, + h3 { + page-break-after: avoid; + } + + // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245 + // Once fixed, we can just straight up remove this. + select { + background: #fff !important; + } + + // Bootstrap components + .navbar { + display: none; + } + .table { + td, + th { + background-color: #fff !important; + } + } + .btn, + .dropup > .btn { + > .caret { + border-top-color: #000 !important; + } + } + .label { + border: 1px solid #000; + } + + .table { + border-collapse: collapse !important; + } + .table-bordered { + th, + td { + border: 1px solid #ddd !important; + } + } } diff --git a/docs/src/css/less/twbs/progress-bars.less b/docs/src/css/less/twbs/progress-bars.less index 76c87be1..341d06d9 100644 --- a/docs/src/css/less/twbs/progress-bars.less +++ b/docs/src/css/less/twbs/progress-bars.less @@ -2,79 +2,82 @@ // Progress bars // -------------------------------------------------- - // Bar animations // ------------------------- // WebKit @-webkit-keyframes progress-bar-stripes { - from { background-position: 40px 0; } - to { background-position: 0 0; } + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } } // Spec and IE10+ @keyframes progress-bar-stripes { - from { background-position: 40px 0; } - to { background-position: 0 0; } + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } } - - // Bar itself // ------------------------- // Outer container .progress { - overflow: hidden; - height: @line-height-computed; - margin-bottom: @line-height-computed; - background-color: @progress-bg; - border-radius: @border-radius-base; - .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); + overflow: hidden; + height: @line-height-computed; + margin-bottom: @line-height-computed; + background-color: @progress-bg; + border-radius: @border-radius-base; + .box-shadow(inset 0 1px 2px rgba(0,0,0,0.1)); } // Bar of progress .progress-bar { - float: left; - width: 0%; - height: 100%; - font-size: @font-size-small; - line-height: @line-height-computed; - color: @progress-bar-color; - text-align: center; - background-color: @progress-bar-bg; - .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); - .transition(width .6s ease); + float: left; + width: 0%; + height: 100%; + font-size: @font-size-small; + line-height: @line-height-computed; + color: @progress-bar-color; + text-align: center; + background-color: @progress-bar-bg; + .box-shadow(inset 0 -1px 0 rgba(0,0,0,0.15)); + .transition(width 0.6s ease); } // Striped bars .progress-striped .progress-bar { - #gradient > .striped(); - background-size: 40px 40px; + #gradient > .striped(); + background-size: 40px 40px; } // Call animation for the active one .progress.active .progress-bar { - .animation(progress-bar-stripes 2s linear infinite); + .animation(progress-bar-stripes 2s linear infinite); } - - // Variations // ------------------------- .progress-bar-success { - .progress-bar-variant(@progress-bar-success-bg); + .progress-bar-variant(@progress-bar-success-bg); } .progress-bar-info { - .progress-bar-variant(@progress-bar-info-bg); + .progress-bar-variant(@progress-bar-info-bg); } .progress-bar-warning { - .progress-bar-variant(@progress-bar-warning-bg); + .progress-bar-variant(@progress-bar-warning-bg); } .progress-bar-danger { - .progress-bar-variant(@progress-bar-danger-bg); + .progress-bar-variant(@progress-bar-danger-bg); } diff --git a/docs/src/css/less/twbs/responsive-utilities.less b/docs/src/css/less/twbs/responsive-utilities.less index 5a31816a..670beac2 100644 --- a/docs/src/css/less/twbs/responsive-utilities.less +++ b/docs/src/css/less/twbs/responsive-utilities.less @@ -2,7 +2,6 @@ // Responsive: Utility classes // -------------------------------------------------- - // IE10 in Windows (Phone) 8 // // Support for responsive views via media queries is kind of borked in IE10, for @@ -18,76 +17,74 @@ // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/ @-ms-viewport { - width: device-width; + width: device-width; } - // Visibility utilities .visible-xs { - .responsive-invisibility(); + .responsive-invisibility(); - @media (max-width: @screen-xs-max) { - .responsive-visibility(); - } + @media (max-width: @screen-xs-max) { + .responsive-visibility(); + } } .visible-sm { - .responsive-invisibility(); + .responsive-invisibility(); - @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { - .responsive-visibility(); - } + @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { + .responsive-visibility(); + } } .visible-md { - .responsive-invisibility(); + .responsive-invisibility(); - @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { - .responsive-visibility(); - } + @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { + .responsive-visibility(); + } } .visible-lg { - .responsive-invisibility(); + .responsive-invisibility(); - @media (min-width: @screen-lg-min) { - .responsive-visibility(); - } + @media (min-width: @screen-lg-min) { + .responsive-visibility(); + } } .hidden-xs { - @media (max-width: @screen-xs-max) { - .responsive-invisibility(); - } + @media (max-width: @screen-xs-max) { + .responsive-invisibility(); + } } .hidden-sm { - @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { - .responsive-invisibility(); - } + @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { + .responsive-invisibility(); + } } .hidden-md { - @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { - .responsive-invisibility(); - } + @media (min-width: @screen-md-min) and (max-width: @screen-md-max) { + .responsive-invisibility(); + } } .hidden-lg { - @media (min-width: @screen-lg-min) { - .responsive-invisibility(); - } + @media (min-width: @screen-lg-min) { + .responsive-invisibility(); + } } - // Print utilities // // Media queries are placed on the inside to be mixin-friendly. .visible-print { - .responsive-invisibility(); + .responsive-invisibility(); - @media print { - .responsive-visibility(); - } + @media print { + .responsive-visibility(); + } } .hidden-print { - @media print { - .responsive-invisibility(); - } + @media print { + .responsive-invisibility(); + } } diff --git a/docs/src/css/less/twbs/scaffolding.less b/docs/src/css/less/twbs/scaffolding.less index c4869139..f3cf77ad 100644 --- a/docs/src/css/less/twbs/scaffolding.less +++ b/docs/src/css/less/twbs/scaffolding.less @@ -2,31 +2,29 @@ // Scaffolding // -------------------------------------------------- - // Reset the box-sizing * { - .box-sizing(border-box); + .box-sizing(border-box); } *:before, *:after { - .box-sizing(border-box); + .box-sizing(border-box); } - // Body reset html { - font-size: 62.5%; - -webkit-tap-highlight-color: rgba(0,0,0,0); + font-size: 62.5%; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } body { - font-family: @font-family-base; - font-size: @font-size-base; - line-height: @line-height-base; - color: @text-color; - background-color: @body-bg; + font-family: @font-family-base; + font-size: @font-size-base; + line-height: @line-height-base; + color: @text-color; + background-color: @body-bg; } // Reset fonts for relevant elements @@ -34,88 +32,84 @@ input, button, select, textarea { - font-family: inherit; - font-size: inherit; - line-height: inherit; + font-family: inherit; + font-size: inherit; + line-height: inherit; } - // Links a { - color: @link-color; - text-decoration: none; - - &:hover, - &:focus { - color: @link-hover-color; - text-decoration: underline; - } - - &:focus { - .tab-focus(); - } + color: @link-color; + text-decoration: none; + + &:hover, + &:focus { + color: @link-hover-color; + text-decoration: underline; + } + + &:focus { + .tab-focus(); + } } - // Images img { - vertical-align: middle; + vertical-align: middle; } // Responsive images (ensure images don't scale beyond their parents) .img-responsive { - .img-responsive(); + .img-responsive(); } // Rounded corners .img-rounded { - border-radius: @border-radius-large; + border-radius: @border-radius-large; } // Image thumbnails // // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`. .img-thumbnail { - padding: @thumbnail-padding; - line-height: @line-height-base; - background-color: @thumbnail-bg; - border: 1px solid @thumbnail-border; - border-radius: @thumbnail-border-radius; - .transition(all .2s ease-in-out); - - // Keep them at most 100% wide - .img-responsive(inline-block); + padding: @thumbnail-padding; + line-height: @line-height-base; + background-color: @thumbnail-bg; + border: 1px solid @thumbnail-border; + border-radius: @thumbnail-border-radius; + .transition(all 0.2s ease-in-out); + + // Keep them at most 100% wide + .img-responsive(inline-block); } // Perfect circle .img-circle { - border-radius: 50%; // set radius in percents + border-radius: 50%; // set radius in percents } - // Horizontal rules hr { - margin-top: @line-height-computed; - margin-bottom: @line-height-computed; - border: 0; - border-top: 1px solid @hr-border; + margin-top: @line-height-computed; + margin-bottom: @line-height-computed; + border: 0; + border-top: 1px solid @hr-border; } - // Only display content to screen readers // // See: http://a11yproject.com/posts/how-to-hide-content/ .sr-only { - position: absolute; - width: 1px; - height: 1px; - margin: -1px; - padding: 0; - overflow: hidden; - clip: rect(0,0,0,0); - border: 0; + position: absolute; + width: 1px; + height: 1px; + margin: -1px; + padding: 0; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; } diff --git a/docs/src/css/less/twbs/tables.less b/docs/src/css/less/twbs/tables.less index c41989c0..b5777ee5 100644 --- a/docs/src/css/less/twbs/tables.less +++ b/docs/src/css/less/twbs/tables.less @@ -2,153 +2,145 @@ // Tables // -------------------------------------------------- - table { - max-width: 100%; - background-color: @table-bg; + max-width: 100%; + background-color: @table-bg; } th { - text-align: left; + text-align: left; } - // Baseline styles .table { - width: 100%; - margin-bottom: @line-height-computed; - // Cells - > thead, - > tbody, - > tfoot { - > tr { - > th, - > td { - padding: @table-cell-padding; - line-height: @line-height-base; - vertical-align: top; - border-top: 1px solid @table-border-color; - } - } - } - // Bottom align for column headings - > thead > tr > th { - vertical-align: bottom; - border-bottom: 2px solid @table-border-color; - } - // Remove top border from thead by default - > caption + thead, - > colgroup + thead, - > thead:first-child { - > tr:first-child { - > th, - > td { - border-top: 0; - } - } - } - // Account for multiple tbody instances - > tbody + tbody { - border-top: 2px solid @table-border-color; - } - - // Nesting - .table { - background-color: @body-bg; - } + width: 100%; + margin-bottom: @line-height-computed; + // Cells + > thead, + > tbody, + > tfoot { + > tr { + > th, + > td { + padding: @table-cell-padding; + line-height: @line-height-base; + vertical-align: top; + border-top: 1px solid @table-border-color; + } + } + } + // Bottom align for column headings + > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid @table-border-color; + } + // Remove top border from thead by default + > caption + thead, + > colgroup + thead, + > thead:first-child { + > tr:first-child { + > th, + > td { + border-top: 0; + } + } + } + // Account for multiple tbody instances + > tbody + tbody { + border-top: 2px solid @table-border-color; + } + + // Nesting + .table { + background-color: @body-bg; + } } - // Condensed table w/ half padding .table-condensed { - > thead, - > tbody, - > tfoot { - > tr { - > th, - > td { - padding: @table-condensed-cell-padding; - } - } - } + > thead, + > tbody, + > tfoot { + > tr { + > th, + > td { + padding: @table-condensed-cell-padding; + } + } + } } - // Bordered version // // Add borders all around the table and between all the columns. .table-bordered { - border: 1px solid @table-border-color; - > thead, - > tbody, - > tfoot { - > tr { - > th, - > td { - border: 1px solid @table-border-color; - } - } - } - > thead > tr { - > th, - > td { - border-bottom-width: 2px; - } - } + border: 1px solid @table-border-color; + > thead, + > tbody, + > tfoot { + > tr { + > th, + > td { + border: 1px solid @table-border-color; + } + } + } + > thead > tr { + > th, + > td { + border-bottom-width: 2px; + } + } } - // Zebra-striping // // Default zebra-stripe styles (alternating gray and transparent backgrounds) .table-striped { - > tbody > tr:nth-child(odd) { - > td, - > th { - background-color: @table-bg-accent; - } - } + > tbody > tr:nth-child(odd) { + > td, + > th { + background-color: @table-bg-accent; + } + } } - // Hover effect // // Placed here since it has to come after the potential zebra striping .table-hover { - > tbody > tr:hover { - > td, - > th { - background-color: @table-bg-hover; - } - } + > tbody > tr:hover { + > td, + > th { + background-color: @table-bg-hover; + } + } } - // Table cell sizing // // Reset default table behavior -table col[class*="col-"] { - position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623) - float: none; - display: table-column; +table col[class*='col-'] { + position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623) + float: none; + display: table-column; } table { - td, - th { - &[class*="col-"] { - position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623) - float: none; - display: table-cell; - } - } + td, + th { + &[class*='col-'] { + position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623) + float: none; + display: table-cell; + } + } } - // Table backgrounds // // Exact selectors below required to override `.table-striped` and prevent @@ -161,7 +153,6 @@ table { .table-row-variant(warning; @state-warning-bg); .table-row-variant(danger; @state-danger-bg); - // Responsive tables // // Wrap your tables in `.table-responsive` and we'll make them mobile friendly @@ -169,65 +160,64 @@ table { // will display normally. @media (max-width: @screen-xs-max) { - .table-responsive { - width: 100%; - margin-bottom: (@line-height-computed * 0.75); - overflow-y: hidden; - overflow-x: scroll; - -ms-overflow-style: -ms-autohiding-scrollbar; - border: 1px solid @table-border-color; - -webkit-overflow-scrolling: touch; - - // Tighten up spacing - > .table { - margin-bottom: 0; - - // Ensure the content doesn't wrap - > thead, - > tbody, - > tfoot { - > tr { - > th, - > td { - white-space: nowrap; - } - } - } - } - - // Special overrides for the bordered tables - > .table-bordered { - border: 0; - - // Nuke the appropriate borders so that the parent can handle them - > thead, - > tbody, - > tfoot { - > tr { - > th:first-child, - > td:first-child { - border-left: 0; - } - > th:last-child, - > td:last-child { - border-right: 0; - } - } - } - - // Only nuke the last row's bottom-border in `tbody` and `tfoot` since - // chances are there will be only one `tr` in a `thead` and that would - // remove the border altogether. - > tbody, - > tfoot { - > tr:last-child { - > th, - > td { - border-bottom: 0; - } - } - } - - } - } + .table-responsive { + width: 100%; + margin-bottom: (@line-height-computed * 0.75); + overflow-y: hidden; + overflow-x: scroll; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid @table-border-color; + -webkit-overflow-scrolling: touch; + + // Tighten up spacing + > .table { + margin-bottom: 0; + + // Ensure the content doesn't wrap + > thead, + > tbody, + > tfoot { + > tr { + > th, + > td { + white-space: nowrap; + } + } + } + } + + // Special overrides for the bordered tables + > .table-bordered { + border: 0; + + // Nuke the appropriate borders so that the parent can handle them + > thead, + > tbody, + > tfoot { + > tr { + > th:first-child, + > td:first-child { + border-left: 0; + } + > th:last-child, + > td:last-child { + border-right: 0; + } + } + } + + // Only nuke the last row's bottom-border in `tbody` and `tfoot` since + // chances are there will be only one `tr` in a `thead` and that would + // remove the border altogether. + > tbody, + > tfoot { + > tr:last-child { + > th, + > td { + border-bottom: 0; + } + } + } + } + } } diff --git a/docs/src/css/less/twbs/theme.less b/docs/src/css/less/twbs/theme.less index 6f957fb3..46812738 100644 --- a/docs/src/css/less/twbs/theme.less +++ b/docs/src/css/less/twbs/theme.less @@ -1,12 +1,9 @@ - // // Load core variables and mixins // -------------------------------------------------- -@import "variables.less"; -@import "mixins.less"; - - +@import 'variables.less'; +@import 'mixins.less'; // // Buttons @@ -19,55 +16,68 @@ .btn-info, .btn-warning, .btn-danger { - text-shadow: 0 -1px 0 rgba(0,0,0,.2); - @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075); - .box-shadow(@shadow); - - // Reset the shadow - &:active, - &.active { - .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); - } + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + @shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), + 0 1px 1px rgba(0, 0, 0, 0.075); + .box-shadow(@shadow); + + // Reset the shadow + &:active, + &.active { + .box-shadow(inset 0 3px 5px rgba(0,0,0,0.125)); + } } // Mixin for generating new styles .btn-styles(@btn-color: #555) { - #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%)); - .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners - background-repeat: repeat-x; - border-color: darken(@btn-color, 14%); - - &:hover, - &:focus { - background-color: darken(@btn-color, 12%); - background-position: 0 -15px; - } - - &:active, - &.active { - background-color: darken(@btn-color, 12%); - border-color: darken(@btn-color, 14%); - } + #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));; + .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners + background-repeat: repeat-x; + border-color: darken(@btn-color, 14%); + + &:hover, + &:focus { + background-color: darken(@btn-color, 12%); + background-position: 0 -15px; + } + + &:active, + &.active { + background-color: darken(@btn-color, 12%); + border-color: darken(@btn-color, 14%); + } } // Common styles .btn { - // Remove the gradient for the pressed/active state - &:active, - &.active { - background-image: none; - } + // Remove the gradient for the pressed/active state + &:active, + &.active { + background-image: none; + } } // Apply the mixin to the buttons -.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; } -.btn-primary { .btn-styles(@btn-primary-bg); } -.btn-success { .btn-styles(@btn-success-bg); } -.btn-info { .btn-styles(@btn-info-bg); } -.btn-warning { .btn-styles(@btn-warning-bg); } -.btn-danger { .btn-styles(@btn-danger-bg); } - - +.btn-default { + .btn-styles(@btn-default-bg); + text-shadow: 0 1px 0 #fff; + border-color: #ccc; +} +.btn-primary { + .btn-styles(@btn-primary-bg); +} +.btn-success { + .btn-styles(@btn-success-bg); +} +.btn-info { + .btn-styles(@btn-info-bg); +} +.btn-warning { + .btn-styles(@btn-warning-bg); +} +.btn-danger { + .btn-styles(@btn-danger-bg); +} // // Images @@ -75,100 +85,102 @@ .thumbnail, .img-thumbnail { - .box-shadow(0 1px 2px rgba(0,0,0,.075)); + .box-shadow(0 1px 2px rgba(0,0,0,0.075)); } - - // // Dropdowns // -------------------------------------------------- .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { - #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%)); - background-color: darken(@dropdown-link-hover-bg, 5%); + #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));; + background-color: darken(@dropdown-link-hover-bg, 5%); } .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { - #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%)); - background-color: darken(@dropdown-link-active-bg, 5%); + #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));; + background-color: darken(@dropdown-link-active-bg, 5%); } - - // // Navbar // -------------------------------------------------- // Default navbar .navbar-default { - #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg); - .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered - border-radius: @navbar-border-radius; - @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075); - .box-shadow(@shadow); - - .navbar-nav > .active > a { - #gradient > .vertical(@start-color: darken(@navbar-default-bg, 5%); @end-color: darken(@navbar-default-bg, 2%)); - .box-shadow(inset 0 3px 9px rgba(0,0,0,.075)); - } + #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);; + .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered + border-radius: @navbar-border-radius; + @shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), + 0 1px 5px rgba(0, 0, 0, 0.075); + .box-shadow(@shadow); + + .navbar-nav > .active > a { + #gradient > .vertical(@start-color: darken(@navbar-default-bg, 5%); @end-color: darken(@navbar-default-bg, 2%));; + .box-shadow(inset 0 3px 9px rgba(0,0,0,0.075)); + } } .navbar-brand, .navbar-nav > li > a { - text-shadow: 0 1px 0 rgba(255,255,255,.25); + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25); } // Inverted navbar .navbar-inverse { - #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg); - .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered - - .navbar-nav > .active > a { - #gradient > .vertical(@start-color: @navbar-inverse-bg; @end-color: lighten(@navbar-inverse-bg, 2.5%)); - .box-shadow(inset 0 3px 9px rgba(0,0,0,.25)); - } - - .navbar-brand, - .navbar-nav > li > a { - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - } + #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);; + .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered + + .navbar-nav > .active > a { + #gradient > .vertical(@start-color: @navbar-inverse-bg; @end-color: lighten(@navbar-inverse-bg, 2.5%));; + .box-shadow(inset 0 3px 9px rgba(0,0,0,0.25)); + } + + .navbar-brand, + .navbar-nav > li > a { + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + } } // Undo rounded corners in static and fixed navbars .navbar-static-top, .navbar-fixed-top, .navbar-fixed-bottom { - border-radius: 0; + border-radius: 0; } - - // // Alerts // -------------------------------------------------- // Common styles .alert { - text-shadow: 0 1px 0 rgba(255,255,255,.2); - @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05); - .box-shadow(@shadow); + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2); + @shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), + 0 1px 2px rgba(0, 0, 0, 0.05); + .box-shadow(@shadow); } // Mixin for generating new styles .alert-styles(@color) { - #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%)); - border-color: darken(@color, 15%); + #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));; + border-color: darken(@color, 15%); } // Apply the mixin to the alerts -.alert-success { .alert-styles(@alert-success-bg); } -.alert-info { .alert-styles(@alert-info-bg); } -.alert-warning { .alert-styles(@alert-warning-bg); } -.alert-danger { .alert-styles(@alert-danger-bg); } - - +.alert-success { + .alert-styles(@alert-success-bg); +} +.alert-info { + .alert-styles(@alert-info-bg); +} +.alert-warning { + .alert-styles(@alert-warning-bg); +} +.alert-danger { + .alert-styles(@alert-danger-bg); +} // // Progress bars @@ -176,72 +188,89 @@ // Give the progress background some depth .progress { - #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg) + #gradient + > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg); } // Mixin for generating new styles .progress-bar-styles(@color) { - #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%)); + #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));; } // Apply the mixin to the progress bars -.progress-bar { .progress-bar-styles(@progress-bar-bg); } -.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); } -.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); } -.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); } -.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); } - - +.progress-bar { + .progress-bar-styles(@progress-bar-bg); +} +.progress-bar-success { + .progress-bar-styles(@progress-bar-success-bg); +} +.progress-bar-info { + .progress-bar-styles(@progress-bar-info-bg); +} +.progress-bar-warning { + .progress-bar-styles(@progress-bar-warning-bg); +} +.progress-bar-danger { + .progress-bar-styles(@progress-bar-danger-bg); +} // // List groups // -------------------------------------------------- .list-group { - border-radius: @border-radius-base; - .box-shadow(0 1px 2px rgba(0,0,0,.075)); + border-radius: @border-radius-base; + .box-shadow(0 1px 2px rgba(0,0,0,0.075)); } .list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { - text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%); - #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%)); - border-color: darken(@list-group-active-border, 7.5%); + text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%); + #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));; + border-color: darken(@list-group-active-border, 7.5%); } - - // // Panels // -------------------------------------------------- // Common styles .panel { - .box-shadow(0 1px 2px rgba(0,0,0,.05)); + .box-shadow(0 1px 2px rgba(0,0,0,0.05)); } // Mixin for generating new styles .panel-heading-styles(@color) { - #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%)); + #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));; } // Apply the mixin to the panel headings only -.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); } -.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); } -.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); } -.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); } -.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); } -.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); } - - +.panel-default > .panel-heading { + .panel-heading-styles(@panel-default-heading-bg); +} +.panel-primary > .panel-heading { + .panel-heading-styles(@panel-primary-heading-bg); +} +.panel-success > .panel-heading { + .panel-heading-styles(@panel-success-heading-bg); +} +.panel-info > .panel-heading { + .panel-heading-styles(@panel-info-heading-bg); +} +.panel-warning > .panel-heading { + .panel-heading-styles(@panel-warning-heading-bg); +} +.panel-danger > .panel-heading { + .panel-heading-styles(@panel-danger-heading-bg); +} // // Wells // -------------------------------------------------- .well { - #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg); - border-color: darken(@well-bg, 10%); - @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1); - .box-shadow(@shadow); + #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);; + border-color: darken(@well-bg, 10%); + @shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1); + .box-shadow(@shadow); } diff --git a/docs/src/css/less/twbs/thumbnails.less b/docs/src/css/less/twbs/thumbnails.less index 11aa283a..49686550 100644 --- a/docs/src/css/less/twbs/thumbnails.less +++ b/docs/src/css/less/twbs/thumbnails.less @@ -2,35 +2,34 @@ // Thumbnails // -------------------------------------------------- - // Mixin and adjust the regular image class .thumbnail { - display: block; - padding: @thumbnail-padding; - margin-bottom: @line-height-computed; - line-height: @line-height-base; - background-color: @thumbnail-bg; - border: 1px solid @thumbnail-border; - border-radius: @thumbnail-border-radius; - .transition(all .2s ease-in-out); + display: block; + padding: @thumbnail-padding; + margin-bottom: @line-height-computed; + line-height: @line-height-base; + background-color: @thumbnail-bg; + border: 1px solid @thumbnail-border; + border-radius: @thumbnail-border-radius; + .transition(all 0.2s ease-in-out); - > img, - a > img { - .img-responsive(); - margin-left: auto; - margin-right: auto; - } + > img, + a > img { + .img-responsive(); + margin-left: auto; + margin-right: auto; + } - // Add a hover state for linked versions only - a&:hover, - a&:focus, - a&.active { - border-color: @link-color; - } + // Add a hover state for linked versions only + a&:hover, + a&:focus, + a&.active { + border-color: @link-color; + } - // Image captions - .caption { - padding: @thumbnail-caption-padding; - color: @thumbnail-caption-color; - } + // Image captions + .caption { + padding: @thumbnail-caption-padding; + color: @thumbnail-caption-color; + } } diff --git a/docs/src/css/less/twbs/tooltip.less b/docs/src/css/less/twbs/tooltip.less index bd626996..b711b597 100644 --- a/docs/src/css/less/twbs/tooltip.less +++ b/docs/src/css/less/twbs/tooltip.less @@ -2,94 +2,109 @@ // Tooltips // -------------------------------------------------- - // Base class .tooltip { - position: absolute; - z-index: @zindex-tooltip; - display: block; - visibility: visible; - font-size: @font-size-small; - line-height: 1.4; - .opacity(0); + position: absolute; + z-index: @zindex-tooltip; + display: block; + visibility: visible; + font-size: @font-size-small; + line-height: 1.4; + .opacity(0); - &.in { .opacity(@tooltip-opacity); } - &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; } - &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; } - &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; } - &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; } + &.in { + .opacity(@tooltip-opacity); + } + &.top { + margin-top: -3px; + padding: @tooltip-arrow-width 0; + } + &.right { + margin-left: 3px; + padding: 0 @tooltip-arrow-width; + } + &.bottom { + margin-top: 3px; + padding: @tooltip-arrow-width 0; + } + &.left { + margin-left: -3px; + padding: 0 @tooltip-arrow-width; + } } // Wrapper for the tooltip content .tooltip-inner { - max-width: @tooltip-max-width; - padding: 3px 8px; - color: @tooltip-color; - text-align: center; - text-decoration: none; - background-color: @tooltip-bg; - border-radius: @border-radius-base; + max-width: @tooltip-max-width; + padding: 3px 8px; + color: @tooltip-color; + text-align: center; + text-decoration: none; + background-color: @tooltip-bg; + border-radius: @border-radius-base; } // Arrows .tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; } .tooltip { - &.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -@tooltip-arrow-width; - border-width: @tooltip-arrow-width @tooltip-arrow-width 0; - border-top-color: @tooltip-arrow-color; - } - &.top-left .tooltip-arrow { - bottom: 0; - left: @tooltip-arrow-width; - border-width: @tooltip-arrow-width @tooltip-arrow-width 0; - border-top-color: @tooltip-arrow-color; - } - &.top-right .tooltip-arrow { - bottom: 0; - right: @tooltip-arrow-width; - border-width: @tooltip-arrow-width @tooltip-arrow-width 0; - border-top-color: @tooltip-arrow-color; - } - &.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -@tooltip-arrow-width; - border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0; - border-right-color: @tooltip-arrow-color; - } - &.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -@tooltip-arrow-width; - border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width; - border-left-color: @tooltip-arrow-color; - } - &.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -@tooltip-arrow-width; - border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; - border-bottom-color: @tooltip-arrow-color; - } - &.bottom-left .tooltip-arrow { - top: 0; - left: @tooltip-arrow-width; - border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; - border-bottom-color: @tooltip-arrow-color; - } - &.bottom-right .tooltip-arrow { - top: 0; - right: @tooltip-arrow-width; - border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; - border-bottom-color: @tooltip-arrow-color; - } + &.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -@tooltip-arrow-width; + border-width: @tooltip-arrow-width @tooltip-arrow-width 0; + border-top-color: @tooltip-arrow-color; + } + &.top-left .tooltip-arrow { + bottom: 0; + left: @tooltip-arrow-width; + border-width: @tooltip-arrow-width @tooltip-arrow-width 0; + border-top-color: @tooltip-arrow-color; + } + &.top-right .tooltip-arrow { + bottom: 0; + right: @tooltip-arrow-width; + border-width: @tooltip-arrow-width @tooltip-arrow-width 0; + border-top-color: @tooltip-arrow-color; + } + &.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -@tooltip-arrow-width; + border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width + 0; + border-right-color: @tooltip-arrow-color; + } + &.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -@tooltip-arrow-width; + border-width: @tooltip-arrow-width 0 @tooltip-arrow-width + @tooltip-arrow-width; + border-left-color: @tooltip-arrow-color; + } + &.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -@tooltip-arrow-width; + border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; + border-bottom-color: @tooltip-arrow-color; + } + &.bottom-left .tooltip-arrow { + top: 0; + left: @tooltip-arrow-width; + border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; + border-bottom-color: @tooltip-arrow-color; + } + &.bottom-right .tooltip-arrow { + top: 0; + right: @tooltip-arrow-width; + border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; + border-bottom-color: @tooltip-arrow-color; + } } diff --git a/docs/src/css/less/twbs/type.less b/docs/src/css/less/twbs/type.less index 315e7ead..11307617 100644 --- a/docs/src/css/less/twbs/type.less +++ b/docs/src/css/less/twbs/type.less @@ -2,195 +2,236 @@ // Typography // -------------------------------------------------- - // Headings // ------------------------- -h1, h2, h3, h4, h5, h6, -.h1, .h2, .h3, .h4, .h5, .h6 { - font-family: @headings-font-family; - font-weight: @headings-font-weight; - line-height: @headings-line-height; - color: @headings-color; - - small, - .small { - font-weight: normal; - line-height: 1; - color: @headings-small-color; - } +h1, +h2, +h3, +h4, +h5, +h6, +.h1, +.h2, +.h3, +.h4, +.h5, +.h6 { + font-family: @headings-font-family; + font-weight: @headings-font-weight; + line-height: @headings-line-height; + color: @headings-color; + + small, + .small { + font-weight: normal; + line-height: 1; + color: @headings-small-color; + } } -h1, .h1, -h2, .h2, -h3, .h3 { - margin-top: @line-height-computed; - margin-bottom: (@line-height-computed / 2); - - small, - .small { - font-size: 65%; - } +h1, +.h1, +h2, +.h2, +h3, +.h3 { + margin-top: @line-height-computed; + margin-bottom: (@line-height-computed / 2); + + small, + .small { + font-size: 65%; + } } -h4, .h4, -h5, .h5, -h6, .h6 { - margin-top: (@line-height-computed / 2); - margin-bottom: (@line-height-computed / 2); - - small, - .small { - font-size: 75%; - } +h4, +.h4, +h5, +.h5, +h6, +.h6 { + margin-top: (@line-height-computed / 2); + margin-bottom: (@line-height-computed / 2); + + small, + .small { + font-size: 75%; + } } -h1, .h1 { font-size: @font-size-h1; } -h2, .h2 { font-size: @font-size-h2; } -h3, .h3 { font-size: @font-size-h3; } -h4, .h4 { font-size: @font-size-h4; } -h5, .h5 { font-size: @font-size-h5; } -h6, .h6 { font-size: @font-size-h6; } - +h1, +.h1 { + font-size: @font-size-h1; +} +h2, +.h2 { + font-size: @font-size-h2; +} +h3, +.h3 { + font-size: @font-size-h3; +} +h4, +.h4 { + font-size: @font-size-h4; +} +h5, +.h5 { + font-size: @font-size-h5; +} +h6, +.h6 { + font-size: @font-size-h6; +} // Body text // ------------------------- p { - margin: 0 0 (@line-height-computed / 2); + margin: 0 0 (@line-height-computed / 2); } .lead { - margin-bottom: @line-height-computed; - font-size: floor((@font-size-base * 1.15)); - font-weight: 200; - line-height: 1.4; - - @media (min-width: @screen-sm-min) { - font-size: (@font-size-base * 1.5); - } + margin-bottom: @line-height-computed; + font-size: floor((@font-size-base * 1.15)); + font-weight: 200; + line-height: 1.4; + + @media (min-width: @screen-sm-min) { + font-size: (@font-size-base * 1.5); + } } - // Emphasis & misc // ------------------------- // Ex: 14px base font * 85% = about 12px small, -.small { font-size: 85%; } +.small { + font-size: 85%; +} // Undo browser default styling -cite { font-style: normal; } +cite { + font-style: normal; +} // Alignment -.text-left { text-align: left; } -.text-right { text-align: right; } -.text-center { text-align: center; } -.text-justify { text-align: justify; } +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +.text-justify { + text-align: justify; +} // Contextual colors .text-muted { - color: @text-muted; + color: @text-muted; } .text-primary { - .text-emphasis-variant(@brand-primary); + .text-emphasis-variant(@brand-primary); } .text-success { - .text-emphasis-variant(@state-success-text); + .text-emphasis-variant(@state-success-text); } .text-info { - .text-emphasis-variant(@state-info-text); + .text-emphasis-variant(@state-info-text); } .text-warning { - .text-emphasis-variant(@state-warning-text); + .text-emphasis-variant(@state-warning-text); } .text-danger { - .text-emphasis-variant(@state-danger-text); + .text-emphasis-variant(@state-danger-text); } // Contextual backgrounds // For now we'll leave these alongside the text classes until v4 when we can // safely shift things around (per SemVer rules). .bg-primary { - // Given the contrast here, this is the only class to have its color inverted - // automatically. - color: #fff; - .bg-variant(@brand-primary); + // Given the contrast here, this is the only class to have its color inverted + // automatically. + color: #fff; + .bg-variant(@brand-primary); } .bg-success { - .bg-variant(@state-success-bg); + .bg-variant(@state-success-bg); } .bg-info { - .bg-variant(@state-info-bg); + .bg-variant(@state-info-bg); } .bg-warning { - .bg-variant(@state-warning-bg); + .bg-variant(@state-warning-bg); } .bg-danger { - .bg-variant(@state-danger-bg); + .bg-variant(@state-danger-bg); } - // Page header // ------------------------- .page-header { - padding-bottom: ((@line-height-computed / 2) - 1); - margin: (@line-height-computed * 2) 0 @line-height-computed; - border-bottom: 1px solid @page-header-border-color; + padding-bottom: ((@line-height-computed / 2) - 1); + margin: (@line-height-computed * 2) 0 @line-height-computed; + border-bottom: 1px solid @page-header-border-color; } - // Lists // -------------------------------------------------- // Unordered and Ordered lists ul, ol { - margin-top: 0; - margin-bottom: (@line-height-computed / 2); - ul, - ol { - margin-bottom: 0; - } + margin-top: 0; + margin-bottom: (@line-height-computed / 2); + ul, + ol { + margin-bottom: 0; + } } // List options // Unstyled keeps list items block level, just removes default browser padding and list-style .list-unstyled { - padding-left: 0; - list-style: none; + padding-left: 0; + list-style: none; } // Inline turns list items into inline-block .list-inline { - .list-unstyled(); + .list-unstyled(); - > li { - display: inline-block; - padding-left: 5px; - padding-right: 5px; + > li { + display: inline-block; + padding-left: 5px; + padding-right: 5px; - &:first-child { - padding-left: 0; - } - } + &:first-child { + padding-left: 0; + } + } } // Description Lists dl { - margin-top: 0; // Remove browser default - margin-bottom: @line-height-computed; + margin-top: 0; // Remove browser default + margin-bottom: @line-height-computed; } dt, dd { - line-height: @line-height-base; + line-height: @line-height-base; } dt { - font-weight: bold; + font-weight: bold; } dd { - margin-left: 0; // Undo browser default + margin-left: 0; // Undo browser default } // Horizontal description lists @@ -199,19 +240,20 @@ dd { // grid breakpoint is reached (default of ~768px). @media (min-width: @grid-float-breakpoint) { - .dl-horizontal { - dt { - float: left; - width: (@component-offset-horizontal - 20); - clear: left; - text-align: right; - .text-overflow(); - } - dd { - margin-left: @component-offset-horizontal; - &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present - } - } + .dl-horizontal { + dt { + float: left; + width: (@component-offset-horizontal - 20); + clear: left; + text-align: right; + .text-overflow(); + } + dd { + margin-left: @component-offset-horizontal; + &:extend(.clearfix + all); // Clear the floated `dt` if an empty `dd` is present + } + } } // MISC @@ -221,43 +263,43 @@ dd { abbr[title], // Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257 abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted @abbr-border-color; + cursor: help; + border-bottom: 1px dotted @abbr-border-color; } .initialism { - font-size: 90%; - text-transform: uppercase; + font-size: 90%; + text-transform: uppercase; } // Blockquotes blockquote { - padding: (@line-height-computed / 2) @line-height-computed; - margin: 0 0 @line-height-computed; - font-size: (@font-size-base * 1.25); - border-left: 5px solid @blockquote-border-color; - - p, - ul, - ol { - &:last-child { - margin-bottom: 0; - } - } - - // Deprecating small and .small for v3.1 - // Context: https://github.com/twbs/bootstrap/issues/11660 - footer, - small, - .small { - display: block; - font-size: 80%; // back to default font-size - line-height: @line-height-base; - color: @blockquote-small-color; - - &:before { - content: '\2014 \00A0'; // em dash, nbsp - } - } + padding: (@line-height-computed / 2) @line-height-computed; + margin: 0 0 @line-height-computed; + font-size: (@font-size-base * 1.25); + border-left: 5px solid @blockquote-border-color; + + p, + ul, + ol { + &:last-child { + margin-bottom: 0; + } + } + + // Deprecating small and .small for v3.1 + // Context: https://github.com/twbs/bootstrap/issues/11660 + footer, + small, + .small { + display: block; + font-size: 80%; // back to default font-size + line-height: @line-height-base; + color: @blockquote-small-color; + + &:before { + content: '\2014 \00A0'; // em dash, nbsp + } + } } // Opposite alignment of blockquote @@ -265,32 +307,34 @@ blockquote { // Heads up: `blockquote.pull-right` has been deprecated as of v3.1. .blockquote-reverse, blockquote.pull-right { - padding-right: 15px; - padding-left: 0; - border-right: 5px solid @blockquote-border-color; - border-left: 0; - text-align: right; - - // Account for citation - footer, - small, - .small { - &:before { content: ''; } - &:after { - content: '\00A0 \2014'; // nbsp, em dash - } - } + padding-right: 15px; + padding-left: 0; + border-right: 5px solid @blockquote-border-color; + border-left: 0; + text-align: right; + + // Account for citation + footer, + small, + .small { + &:before { + content: ''; + } + &:after { + content: '\00A0 \2014'; // nbsp, em dash + } + } } // Quotes blockquote:before, blockquote:after { - content: ""; + content: ''; } // Addresses address { - margin-bottom: @line-height-computed; - font-style: normal; - line-height: @line-height-base; + margin-bottom: @line-height-computed; + font-style: normal; + line-height: @line-height-base; } diff --git a/docs/src/css/less/twbs/utilities.less b/docs/src/css/less/twbs/utilities.less index a2603121..4535b92a 100644 --- a/docs/src/css/less/twbs/utilities.less +++ b/docs/src/css/less/twbs/utilities.less @@ -2,55 +2,51 @@ // Utility classes // -------------------------------------------------- - // Floats // ------------------------- .clearfix { - .clearfix(); + .clearfix(); } .center-block { - .center-block(); + .center-block(); } .pull-right { - float: right !important; + float: right !important; } .pull-left { - float: left !important; + float: left !important; } - // Toggling content // ------------------------- // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 .hide { - display: none !important; + display: none !important; } .show { - display: block !important; + display: block !important; } .invisible { - visibility: hidden; + visibility: hidden; } .text-hide { - .text-hide(); + .text-hide(); } - // Hide from screenreaders and browsers // // Credit: HTML5 Boilerplate .hidden { - display: none !important; - visibility: hidden !important; + display: none !important; + visibility: hidden !important; } - // For Affix plugin // ------------------------- .affix { - position: fixed; + position: fixed; } diff --git a/docs/src/css/less/twbs/variables.less b/docs/src/css/less/twbs/variables.less index 41f5c9f1..cf828632 100644 --- a/docs/src/css/less/twbs/variables.less +++ b/docs/src/css/less/twbs/variables.less @@ -2,239 +2,236 @@ // Variables // -------------------------------------------------- - //== Colors // //## Gray and brand colors for use across Bootstrap. -@gray-darker: lighten(#000, 13.5%); // #222 -@gray-dark: lighten(#000, 20%); // #333 -@gray: lighten(#000, 33.5%); // #555 -@gray-light: lighten(#000, 60%); // #999 -@gray-lighter: lighten(#000, 93.5%); // #eee - -@brand-primary: #428bca; -@brand-success: #5cb85c; -@brand-info: #5bc0de; -@brand-warning: #f0ad4e; -@brand-danger: #d9534f; +@gray-darker: lighten(#000, 13.5%); // #222 +@gray-dark: lighten(#000, 20%); // #333 +@gray: lighten(#000, 33.5%); // #555 +@gray-light: lighten(#000, 60%); // #999 +@gray-lighter: lighten(#000, 93.5%); // #eee +@brand-primary: #428bca; +@brand-success: #5cb85c; +@brand-info: #5bc0de; +@brand-warning: #f0ad4e; +@brand-danger: #d9534f; //== Scaffolding // // ## Settings for some of the most global styles. //** Background color for `<body>`. -@body-bg: #fff; +@body-bg: #fff; //** Global text color on `<body>`. -@text-color: @gray; +@text-color: @gray; //** Global textual link color. -@link-color: @brand-primary; +@link-color: @brand-primary; //** Link hover color set via `darken()` function. -@link-hover-color: darken(@link-color, 15%); - +@link-hover-color: darken(@link-color, 15%); //== Typography // //## Font, line-height, and color for body text, headings, and more. -@font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif; -@font-family-serif: Georgia, "Times New Roman", Times, serif; +@font-family-sans-serif: 'Helvetica Neue', Helvetica, Arial, sans-serif; +@font-family-serif: Georgia, 'Times New Roman', Times, serif; //** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`. -@font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace; -@font-family-base: @font-family-sans-serif; +@font-family-monospace: Menlo, Monaco, Consolas, 'Courier New', monospace; +@font-family-base: @font-family-sans-serif; -@font-size-base: 14px; -@font-size-large: ceil((@font-size-base * 1.25)); // ~18px -@font-size-small: ceil((@font-size-base * 0.85)); // ~12px +@font-size-base: 14px; +@font-size-large: ceil((@font-size-base * 1.25)); // ~18px +@font-size-small: ceil((@font-size-base * 0.85)); // ~12px -@font-size-h1: floor((@font-size-base * 2.6)); // ~36px -@font-size-h2: floor((@font-size-base * 2.15)); // ~30px -@font-size-h3: ceil((@font-size-base * 1.7)); // ~24px -@font-size-h4: ceil((@font-size-base * 1.25)); // ~18px -@font-size-h5: @font-size-base; -@font-size-h6: ceil((@font-size-base * 0.85)); // ~12px +@font-size-h1: floor((@font-size-base * 2.6)); // ~36px +@font-size-h2: floor((@font-size-base * 2.15)); // ~30px +@font-size-h3: ceil((@font-size-base * 1.7)); // ~24px +@font-size-h4: ceil((@font-size-base * 1.25)); // ~18px +@font-size-h5: @font-size-base; +@font-size-h6: ceil((@font-size-base * 0.85)); // ~12px //** Unit-less `line-height` for use in components like buttons. -@line-height-base: 1.428571429; // 20/14 +@line-height-base: 1.428571429; // 20/14 //** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc. -@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px +@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px //** By default, this inherits from the `<body>`. -@headings-font-family: inherit; -@headings-font-weight: 500; -@headings-line-height: 1.1; -@headings-color: inherit; - +@headings-font-family: inherit; +@headings-font-weight: 500; +@headings-line-height: 1.1; +@headings-color: inherit; //-- Iconography // //## Specify custom locations of the include Glyphicons icon font. Useful for those including Bootstrap via Bower. -@icon-font-path: "../fonts/"; -@icon-font-name: "glyphicons-halflings-regular"; -@icon-font-svg-id: "glyphicons_halflingsregular"; +@icon-font-path: '../fonts/'; +@icon-font-name: 'glyphicons-halflings-regular'; +@icon-font-svg-id: 'glyphicons_halflingsregular'; //== Components // //## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start). -@padding-base-vertical: 6px; -@padding-base-horizontal: 12px; +@padding-base-vertical: 6px; +@padding-base-horizontal: 12px; -@padding-large-vertical: 10px; -@padding-large-horizontal: 16px; +@padding-large-vertical: 10px; +@padding-large-horizontal: 16px; -@padding-small-vertical: 5px; -@padding-small-horizontal: 10px; +@padding-small-vertical: 5px; +@padding-small-horizontal: 10px; -@padding-xs-vertical: 1px; -@padding-xs-horizontal: 5px; +@padding-xs-vertical: 1px; +@padding-xs-horizontal: 5px; -@line-height-large: 1.33; -@line-height-small: 1.5; +@line-height-large: 1.33; +@line-height-small: 1.5; -@border-radius-base: 4px; -@border-radius-large: 6px; -@border-radius-small: 3px; +@border-radius-base: 4px; +@border-radius-large: 6px; +@border-radius-small: 3px; //** Global color for active items (e.g., navs or dropdowns). -@component-active-color: #fff; +@component-active-color: #fff; //** Global background color for active items (e.g., navs or dropdowns). -@component-active-bg: @brand-primary; +@component-active-bg: @brand-primary; //** Width of the `border` for generating carets that indicator dropdowns. -@caret-width-base: 4px; +@caret-width-base: 4px; //** Carets increase slightly in size for larger components. -@caret-width-large: 5px; - +@caret-width-large: 5px; //== Tables // //## Customizes the `.table` component with basic values, each used across all table variations. //** Padding for `<th>`s and `<td>`s. -@table-cell-padding: 8px; +@table-cell-padding: 8px; //** Padding for cells in `.table-condensed`. -@table-condensed-cell-padding: 5px; +@table-condensed-cell-padding: 5px; //** Default background color used for all tables. -@table-bg: transparent; +@table-bg: transparent; //** Background color used for `.table-striped`. -@table-bg-accent: #f9f9f9; +@table-bg-accent: #f9f9f9; //** Background color used for `.table-hover`. -@table-bg-hover: #f5f5f5; -@table-bg-active: @table-bg-hover; +@table-bg-hover: #f5f5f5; +@table-bg-active: @table-bg-hover; //** Border color for table and cell borders. -@table-border-color: #ddd; - +@table-border-color: #ddd; //== Buttons // //## For each of Bootstrap's buttons, define text, background and border color. -@btn-font-weight: normal; - -@btn-default-color: #333; -@btn-default-bg: #fff; -@btn-default-border: #ccc; +@btn-font-weight: normal; -@btn-primary-color: #fff; -@btn-primary-bg: @brand-primary; -@btn-primary-border: darken(@btn-primary-bg, 5%); +@btn-default-color: #333; +@btn-default-bg: #fff; +@btn-default-border: #ccc; -@btn-success-color: #fff; -@btn-success-bg: @brand-success; -@btn-success-border: darken(@btn-success-bg, 5%); +@btn-primary-color: #fff; +@btn-primary-bg: @brand-primary; +@btn-primary-border: darken(@btn-primary-bg, 5%); -@btn-info-color: #fff; -@btn-info-bg: @brand-info; -@btn-info-border: darken(@btn-info-bg, 5%); +@btn-success-color: #fff; +@btn-success-bg: @brand-success; +@btn-success-border: darken(@btn-success-bg, 5%); -@btn-warning-color: #fff; -@btn-warning-bg: @brand-warning; -@btn-warning-border: darken(@btn-warning-bg, 5%); +@btn-info-color: #fff; +@btn-info-bg: @brand-info; +@btn-info-border: darken(@btn-info-bg, 5%); -@btn-danger-color: #fff; -@btn-danger-bg: @brand-danger; -@btn-danger-border: darken(@btn-danger-bg, 5%); +@btn-warning-color: #fff; +@btn-warning-bg: @brand-warning; +@btn-warning-border: darken(@btn-warning-bg, 5%); -@btn-link-disabled-color: @gray-light; +@btn-danger-color: #fff; +@btn-danger-bg: @brand-danger; +@btn-danger-border: darken(@btn-danger-bg, 5%); +@btn-link-disabled-color: @gray-light; //== Forms // //## //** `<input>` background color -@input-bg: #fff; +@input-bg: #fff; //** `<input disabled>` background color -@input-bg-disabled: @gray-lighter; +@input-bg-disabled: @gray-lighter; //** Text color for `<input>`s -@input-color: @gray; +@input-color: @gray; //** `<input>` border color -@input-border: #ccc; +@input-border: #ccc; //** `<input>` border radius -@input-border-radius: @border-radius-base; +@input-border-radius: @border-radius-base; //** Border color for inputs on focus -@input-border-focus: #66afe9; +@input-border-focus: #66afe9; //** Placeholder text color -@input-color-placeholder: @gray-light; +@input-color-placeholder: @gray-light; //** Default `.form-control` height -@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2); +@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2); //** Large `.form-control` height -@input-height-large: (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2); +@input-height-large: ( + ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + + 2 +); //** Small `.form-control` height -@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2); +@input-height-small: ( + floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + + 2 +); -@legend-color: @gray-dark; -@legend-border-color: #e5e5e5; +@legend-color: @gray-dark; +@legend-border-color: #e5e5e5; //** Background color for textual input addons -@input-group-addon-bg: @gray-lighter; +@input-group-addon-bg: @gray-lighter; //** Border color for textual input addons @input-group-addon-border-color: @input-border; - //== Dropdowns // //## Dropdown menu container and contents. //** Background for the dropdown menu. -@dropdown-bg: #fff; +@dropdown-bg: #fff; //** Dropdown menu `border-color`. -@dropdown-border: rgba(0,0,0,.15); +@dropdown-border: rgba(0, 0, 0, 0.15); //** Dropdown menu `border-color` **for IE8**. -@dropdown-fallback-border: #ccc; +@dropdown-fallback-border: #ccc; //** Divider color for between dropdown items. -@dropdown-divider-bg: #e5e5e5; +@dropdown-divider-bg: #e5e5e5; //** Dropdown link text color. -@dropdown-link-color: @gray-dark; +@dropdown-link-color: @gray-dark; //** Hover color for dropdown links. -@dropdown-link-hover-color: darken(@gray-dark, 5%); +@dropdown-link-hover-color: darken(@gray-dark, 5%); //** Hover background for dropdown links. -@dropdown-link-hover-bg: #f5f5f5; +@dropdown-link-hover-bg: #f5f5f5; //** Active dropdown menu item text color. -@dropdown-link-active-color: @component-active-color; +@dropdown-link-active-color: @component-active-color; //** Active dropdown menu item background color. -@dropdown-link-active-bg: @component-active-bg; +@dropdown-link-active-bg: @component-active-bg; //** Disabled dropdown menu item background color. -@dropdown-link-disabled-color: @gray-light; +@dropdown-link-disabled-color: @gray-light; //** Text color for headers within dropdown menus. -@dropdown-header-color: @gray-light; +@dropdown-header-color: @gray-light; // Note: Deprecated @dropdown-caret-color as of v3.1 -@dropdown-caret-color: #000; - +@dropdown-caret-color: #000; //-- Z-index master list // @@ -243,14 +240,13 @@ // // Note: These variables are not generated into the Customizer. -@zindex-navbar: 1000; -@zindex-dropdown: 1000; -@zindex-popover: 1010; -@zindex-tooltip: 1030; -@zindex-navbar-fixed: 1030; -@zindex-modal-background: 1040; -@zindex-modal: 1050; - +@zindex-navbar: 1000; +@zindex-dropdown: 1000; +@zindex-popover: 1010; +@zindex-tooltip: 1030; +@zindex-navbar-fixed: 1030; +@zindex-modal-background: 1040; +@zindex-modal: 1050; //== Media queries breakpoints // @@ -258,570 +254,544 @@ // Extra small screen / phone // Note: Deprecated @screen-xs and @screen-phone as of v3.0.1 -@screen-xs: 480px; -@screen-xs-min: @screen-xs; -@screen-phone: @screen-xs-min; +@screen-xs: 480px; +@screen-xs-min: @screen-xs; +@screen-phone: @screen-xs-min; // Small screen / tablet // Note: Deprecated @screen-sm and @screen-tablet as of v3.0.1 -@screen-sm: 768px; -@screen-sm-min: @screen-sm; -@screen-tablet: @screen-sm-min; +@screen-sm: 768px; +@screen-sm-min: @screen-sm; +@screen-tablet: @screen-sm-min; // Medium screen / desktop // Note: Deprecated @screen-md and @screen-desktop as of v3.0.1 -@screen-md: 992px; -@screen-md-min: @screen-md; -@screen-desktop: @screen-md-min; +@screen-md: 992px; +@screen-md-min: @screen-md; +@screen-desktop: @screen-md-min; // Large screen / wide desktop // Note: Deprecated @screen-lg and @screen-lg-desktop as of v3.0.1 -@screen-lg: 1200px; -@screen-lg-min: @screen-lg; -@screen-lg-desktop: @screen-lg-min; +@screen-lg: 1200px; +@screen-lg-min: @screen-lg; +@screen-lg-desktop: @screen-lg-min; // So media queries don't overlap when required, provide a maximum -@screen-xs-max: (@screen-sm-min - 1); -@screen-sm-max: (@screen-md-min - 1); -@screen-md-max: (@screen-lg-min - 1); - +@screen-xs-max: (@screen-sm-min - 1); +@screen-sm-max: (@screen-md-min - 1); +@screen-md-max: (@screen-lg-min - 1); //== Grid system // //## Define your custom responsive grid. //** Number of columns in the grid. -@grid-columns: 12; +@grid-columns: 12; //** Padding between columns. Gets divided in half for the left and right. -@grid-gutter-width: 30px; +@grid-gutter-width: 30px; // Navbar collapse //** Point at which the navbar becomes uncollapsed. -@grid-float-breakpoint: @screen-sm-min; +@grid-float-breakpoint: @screen-sm-min; //** Point at which the navbar begins collapsing. @grid-float-breakpoint-max: (@grid-float-breakpoint - 1); - //== Navbar // //## // Basics of a navbar -@navbar-height: 50px; -@navbar-margin-bottom: @line-height-computed; -@navbar-border-radius: @border-radius-base; -@navbar-padding-horizontal: floor((@grid-gutter-width / 2)); -@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2); -@navbar-collapse-max-height: 340px; +@navbar-height: 50px; +@navbar-margin-bottom: @line-height-computed; +@navbar-border-radius: @border-radius-base; +@navbar-padding-horizontal: floor((@grid-gutter-width / 2)); +@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2); +@navbar-collapse-max-height: 340px; -@navbar-default-color: #777; -@navbar-default-bg: #f8f8f8; -@navbar-default-border: darken(@navbar-default-bg, 6.5%); +@navbar-default-color: #777; +@navbar-default-bg: #f8f8f8; +@navbar-default-border: darken(@navbar-default-bg, 6.5%); // Navbar links -@navbar-default-link-color: #777; -@navbar-default-link-hover-color: #333; -@navbar-default-link-hover-bg: transparent; -@navbar-default-link-active-color: #555; -@navbar-default-link-active-bg: darken(@navbar-default-bg, 6.5%); -@navbar-default-link-disabled-color: #ccc; -@navbar-default-link-disabled-bg: transparent; +@navbar-default-link-color: #777; +@navbar-default-link-hover-color: #333; +@navbar-default-link-hover-bg: transparent; +@navbar-default-link-active-color: #555; +@navbar-default-link-active-bg: darken(@navbar-default-bg, 6.5%); +@navbar-default-link-disabled-color: #ccc; +@navbar-default-link-disabled-bg: transparent; // Navbar brand label -@navbar-default-brand-color: @navbar-default-link-color; -@navbar-default-brand-hover-color: darken(@navbar-default-brand-color, 10%); -@navbar-default-brand-hover-bg: transparent; +@navbar-default-brand-color: @navbar-default-link-color; +@navbar-default-brand-hover-color: darken(@navbar-default-brand-color, 10%); +@navbar-default-brand-hover-bg: transparent; // Navbar toggle -@navbar-default-toggle-hover-bg: #ddd; -@navbar-default-toggle-icon-bar-bg: #888; -@navbar-default-toggle-border-color: #ddd; - +@navbar-default-toggle-hover-bg: #ddd; +@navbar-default-toggle-icon-bar-bg: #888; +@navbar-default-toggle-border-color: #ddd; // Inverted navbar // Reset inverted navbar basics -@navbar-inverse-color: @gray-light; -@navbar-inverse-bg: #222; -@navbar-inverse-border: darken(@navbar-inverse-bg, 10%); +@navbar-inverse-color: @gray-light; +@navbar-inverse-bg: #222; +@navbar-inverse-border: darken(@navbar-inverse-bg, 10%); // Inverted navbar links -@navbar-inverse-link-color: @gray-light; -@navbar-inverse-link-hover-color: #fff; -@navbar-inverse-link-hover-bg: transparent; -@navbar-inverse-link-active-color: @navbar-inverse-link-hover-color; -@navbar-inverse-link-active-bg: darken(@navbar-inverse-bg, 10%); -@navbar-inverse-link-disabled-color: #444; -@navbar-inverse-link-disabled-bg: transparent; +@navbar-inverse-link-color: @gray-light; +@navbar-inverse-link-hover-color: #fff; +@navbar-inverse-link-hover-bg: transparent; +@navbar-inverse-link-active-color: @navbar-inverse-link-hover-color; +@navbar-inverse-link-active-bg: darken(@navbar-inverse-bg, 10%); +@navbar-inverse-link-disabled-color: #444; +@navbar-inverse-link-disabled-bg: transparent; // Inverted navbar brand label -@navbar-inverse-brand-color: @navbar-inverse-link-color; -@navbar-inverse-brand-hover-color: #fff; -@navbar-inverse-brand-hover-bg: transparent; +@navbar-inverse-brand-color: @navbar-inverse-link-color; +@navbar-inverse-brand-hover-color: #fff; +@navbar-inverse-brand-hover-bg: transparent; // Inverted navbar toggle -@navbar-inverse-toggle-hover-bg: #333; -@navbar-inverse-toggle-icon-bar-bg: #fff; -@navbar-inverse-toggle-border-color: #333; - +@navbar-inverse-toggle-hover-bg: #333; +@navbar-inverse-toggle-icon-bar-bg: #fff; +@navbar-inverse-toggle-border-color: #333; //== Navs // //## //=== Shared nav styles -@nav-link-padding: 10px 15px; -@nav-link-hover-bg: @gray-lighter; +@nav-link-padding: 10px 15px; +@nav-link-hover-bg: @gray-lighter; -@nav-disabled-link-color: @gray-light; -@nav-disabled-link-hover-color: @gray-light; +@nav-disabled-link-color: @gray-light; +@nav-disabled-link-hover-color: @gray-light; -@nav-open-link-hover-color: #fff; +@nav-open-link-hover-color: #fff; //== Tabs -@nav-tabs-border-color: #ddd; +@nav-tabs-border-color: #ddd; -@nav-tabs-link-hover-border-color: @gray-lighter; +@nav-tabs-link-hover-border-color: @gray-lighter; -@nav-tabs-active-link-hover-bg: @body-bg; -@nav-tabs-active-link-hover-color: @gray; -@nav-tabs-active-link-hover-border-color: #ddd; +@nav-tabs-active-link-hover-bg: @body-bg; +@nav-tabs-active-link-hover-color: @gray; +@nav-tabs-active-link-hover-border-color: #ddd; -@nav-tabs-justified-link-border-color: #ddd; -@nav-tabs-justified-active-link-border-color: @body-bg; +@nav-tabs-justified-link-border-color: #ddd; +@nav-tabs-justified-active-link-border-color: @body-bg; //== Pills -@nav-pills-border-radius: @border-radius-base; -@nav-pills-active-link-hover-bg: @component-active-bg; -@nav-pills-active-link-hover-color: @component-active-color; - +@nav-pills-border-radius: @border-radius-base; +@nav-pills-active-link-hover-bg: @component-active-bg; +@nav-pills-active-link-hover-color: @component-active-color; //== Pagination // //## -@pagination-color: @link-color; -@pagination-bg: #fff; -@pagination-border: #ddd; - -@pagination-hover-color: @link-hover-color; -@pagination-hover-bg: @gray-lighter; -@pagination-hover-border: #ddd; +@pagination-color: @link-color; +@pagination-bg: #fff; +@pagination-border: #ddd; -@pagination-active-color: #fff; -@pagination-active-bg: @brand-primary; -@pagination-active-border: @brand-primary; +@pagination-hover-color: @link-hover-color; +@pagination-hover-bg: @gray-lighter; +@pagination-hover-border: #ddd; -@pagination-disabled-color: @gray-light; -@pagination-disabled-bg: #fff; -@pagination-disabled-border: #ddd; +@pagination-active-color: #fff; +@pagination-active-bg: @brand-primary; +@pagination-active-border: @brand-primary; +@pagination-disabled-color: @gray-light; +@pagination-disabled-bg: #fff; +@pagination-disabled-border: #ddd; //== Pager // //## -@pager-bg: @pagination-bg; -@pager-border: @pagination-border; -@pager-border-radius: 15px; +@pager-bg: @pagination-bg; +@pager-border: @pagination-border; +@pager-border-radius: 15px; -@pager-hover-bg: @pagination-hover-bg; +@pager-hover-bg: @pagination-hover-bg; -@pager-active-bg: @pagination-active-bg; -@pager-active-color: @pagination-active-color; - -@pager-disabled-color: @pagination-disabled-color; +@pager-active-bg: @pagination-active-bg; +@pager-active-color: @pagination-active-color; +@pager-disabled-color: @pagination-disabled-color; //== Jumbotron // //## -@jumbotron-padding: 30px; -@jumbotron-color: inherit; -@jumbotron-bg: @gray-lighter; -@jumbotron-heading-color: inherit; -@jumbotron-font-size: ceil((@font-size-base * 1.5)); - +@jumbotron-padding: 30px; +@jumbotron-color: inherit; +@jumbotron-bg: @gray-lighter; +@jumbotron-heading-color: inherit; +@jumbotron-font-size: ceil((@font-size-base * 1.5)); //== Form states and alerts // //## Define colors for form feedback states and, by default, alerts. -@state-success-text: #3c763d; -@state-success-bg: #dff0d8; -@state-success-border: darken(spin(@state-success-bg, -10), 5%); +@state-success-text: #3c763d; +@state-success-bg: #dff0d8; +@state-success-border: darken(spin(@state-success-bg, -10), 5%); -@state-info-text: #31708f; -@state-info-bg: #d9edf7; -@state-info-border: darken(spin(@state-info-bg, -10), 7%); +@state-info-text: #31708f; +@state-info-bg: #d9edf7; +@state-info-border: darken(spin(@state-info-bg, -10), 7%); -@state-warning-text: #8a6d3b; -@state-warning-bg: #fcf8e3; -@state-warning-border: darken(spin(@state-warning-bg, -10), 5%); - -@state-danger-text: #a94442; -@state-danger-bg: #f2dede; -@state-danger-border: darken(spin(@state-danger-bg, -10), 5%); +@state-warning-text: #8a6d3b; +@state-warning-bg: #fcf8e3; +@state-warning-border: darken(spin(@state-warning-bg, -10), 5%); +@state-danger-text: #a94442; +@state-danger-bg: #f2dede; +@state-danger-border: darken(spin(@state-danger-bg, -10), 5%); //== Tooltips // //## //** Tooltip max width -@tooltip-max-width: 200px; +@tooltip-max-width: 200px; //** Tooltip text color -@tooltip-color: #fff; +@tooltip-color: #fff; //** Tooltip background color -@tooltip-bg: #000; -@tooltip-opacity: .9; +@tooltip-bg: #000; +@tooltip-opacity: 0.9; //** Tooltip arrow width -@tooltip-arrow-width: 5px; +@tooltip-arrow-width: 5px; //** Tooltip arrow color -@tooltip-arrow-color: @tooltip-bg; - +@tooltip-arrow-color: @tooltip-bg; //== Popovers // //## //** Popover body background color -@popover-bg: #fff; +@popover-bg: #fff; //** Popover maximum width -@popover-max-width: 276px; +@popover-max-width: 276px; //** Popover border color -@popover-border-color: rgba(0,0,0,.2); +@popover-border-color: rgba(0, 0, 0, 0.2); //** Popover fallback border color -@popover-fallback-border-color: #ccc; +@popover-fallback-border-color: #ccc; //** Popover title background color -@popover-title-bg: darken(@popover-bg, 3%); +@popover-title-bg: darken(@popover-bg, 3%); //** Popover arrow width -@popover-arrow-width: 10px; +@popover-arrow-width: 10px; //** Popover arrow color -@popover-arrow-color: #fff; +@popover-arrow-color: #fff; //** Popover outer arrow width -@popover-arrow-outer-width: (@popover-arrow-width + 1); +@popover-arrow-outer-width: (@popover-arrow-width + 1); //** Popover outer arrow color -@popover-arrow-outer-color: rgba(0,0,0,.25); +@popover-arrow-outer-color: rgba(0, 0, 0, 0.25); //** Popover outer arrow fallback color -@popover-arrow-outer-fallback-color: #999; - +@popover-arrow-outer-fallback-color: #999; //== Labels // //## //** Default label background color -@label-default-bg: @gray-light; +@label-default-bg: @gray-light; //** Primary label background color -@label-primary-bg: @brand-primary; +@label-primary-bg: @brand-primary; //** Success label background color -@label-success-bg: @brand-success; +@label-success-bg: @brand-success; //** Info label background color -@label-info-bg: @brand-info; +@label-info-bg: @brand-info; //** Warning label background color -@label-warning-bg: @brand-warning; +@label-warning-bg: @brand-warning; //** Danger label background color -@label-danger-bg: @brand-danger; +@label-danger-bg: @brand-danger; //** Default label text color -@label-color: #fff; +@label-color: #fff; //** Default text color of a linked label -@label-link-hover-color: #fff; - +@label-link-hover-color: #fff; //== Modals // //## //** Padding applied to the modal body -@modal-inner-padding: 20px; +@modal-inner-padding: 20px; //** Padding applied to the modal title -@modal-title-padding: 15px; +@modal-title-padding: 15px; //** Modal title line-height -@modal-title-line-height: @line-height-base; +@modal-title-line-height: @line-height-base; //** Background color of modal content area -@modal-content-bg: #fff; +@modal-content-bg: #fff; //** Modal content border color -@modal-content-border-color: rgba(0,0,0,.2); +@modal-content-border-color: rgba(0, 0, 0, 0.2); //** Modal content border color **for IE8** -@modal-content-fallback-border-color: #999; +@modal-content-fallback-border-color: #999; //** Modal backdrop background color -@modal-backdrop-bg: #000; +@modal-backdrop-bg: #000; //** Modal backdrop opacity -@modal-backdrop-opacity: .5; +@modal-backdrop-opacity: 0.5; //** Modal header border color -@modal-header-border-color: #e5e5e5; +@modal-header-border-color: #e5e5e5; //** Modal footer border color -@modal-footer-border-color: @modal-header-border-color; - -@modal-lg: 900px; -@modal-md: 600px; -@modal-sm: 300px; +@modal-footer-border-color: @modal-header-border-color; +@modal-lg: 900px; +@modal-md: 600px; +@modal-sm: 300px; //== Alerts // //## Define alert colors, border radius, and padding. -@alert-padding: 15px; -@alert-border-radius: @border-radius-base; -@alert-link-font-weight: bold; +@alert-padding: 15px; +@alert-border-radius: @border-radius-base; +@alert-link-font-weight: bold; -@alert-success-bg: @state-success-bg; -@alert-success-text: @state-success-text; -@alert-success-border: @state-success-border; +@alert-success-bg: @state-success-bg; +@alert-success-text: @state-success-text; +@alert-success-border: @state-success-border; -@alert-info-bg: @state-info-bg; -@alert-info-text: @state-info-text; -@alert-info-border: @state-info-border; +@alert-info-bg: @state-info-bg; +@alert-info-text: @state-info-text; +@alert-info-border: @state-info-border; -@alert-warning-bg: @state-warning-bg; -@alert-warning-text: @state-warning-text; -@alert-warning-border: @state-warning-border; - -@alert-danger-bg: @state-danger-bg; -@alert-danger-text: @state-danger-text; -@alert-danger-border: @state-danger-border; +@alert-warning-bg: @state-warning-bg; +@alert-warning-text: @state-warning-text; +@alert-warning-border: @state-warning-border; +@alert-danger-bg: @state-danger-bg; +@alert-danger-text: @state-danger-text; +@alert-danger-border: @state-danger-border; //== Progress bars // //## //** Background color of the whole progress component -@progress-bg: #f5f5f5; +@progress-bg: #f5f5f5; //** Progress bar text color -@progress-bar-color: #fff; +@progress-bar-color: #fff; //** Default progress bar color -@progress-bar-bg: @brand-primary; +@progress-bar-bg: @brand-primary; //** Success progress bar color -@progress-bar-success-bg: @brand-success; +@progress-bar-success-bg: @brand-success; //** Warning progress bar color -@progress-bar-warning-bg: @brand-warning; +@progress-bar-warning-bg: @brand-warning; //** Danger progress bar color -@progress-bar-danger-bg: @brand-danger; +@progress-bar-danger-bg: @brand-danger; //** Info progress bar color -@progress-bar-info-bg: @brand-info; - +@progress-bar-info-bg: @brand-info; //== List group // //## //** Background color on `.list-group-item` -@list-group-bg: #fff; +@list-group-bg: #fff; //** `.list-group-item` border color -@list-group-border: #ddd; +@list-group-border: #ddd; //** List group border radius -@list-group-border-radius: @border-radius-base; +@list-group-border-radius: @border-radius-base; //** Background color of single list elements on hover -@list-group-hover-bg: #f5f5f5; +@list-group-hover-bg: #f5f5f5; //** Text color of active list elements -@list-group-active-color: @component-active-color; +@list-group-active-color: @component-active-color; //** Background color of active list elements -@list-group-active-bg: @component-active-bg; +@list-group-active-bg: @component-active-bg; //** Border color of active list elements -@list-group-active-border: @list-group-active-bg; -@list-group-active-text-color: lighten(@list-group-active-bg, 40%); +@list-group-active-border: @list-group-active-bg; +@list-group-active-text-color: lighten(@list-group-active-bg, 40%); -@list-group-link-color: #555; +@list-group-link-color: #555; @list-group-link-heading-color: #333; - //== Panels // //## -@panel-bg: #fff; -@panel-body-padding: 15px; -@panel-border-radius: @border-radius-base; +@panel-bg: #fff; +@panel-body-padding: 15px; +@panel-border-radius: @border-radius-base; //** Border color for elements within panels -@panel-inner-border: #ddd; -@panel-footer-bg: #f5f5f5; - -@panel-default-text: @gray-dark; -@panel-default-border: #ddd; -@panel-default-heading-bg: #f5f5f5; +@panel-inner-border: #ddd; +@panel-footer-bg: #f5f5f5; -@panel-primary-text: #fff; -@panel-primary-border: @brand-primary; -@panel-primary-heading-bg: @brand-primary; +@panel-default-text: @gray-dark; +@panel-default-border: #ddd; +@panel-default-heading-bg: #f5f5f5; -@panel-success-text: @state-success-text; -@panel-success-border: @state-success-border; -@panel-success-heading-bg: @state-success-bg; +@panel-primary-text: #fff; +@panel-primary-border: @brand-primary; +@panel-primary-heading-bg: @brand-primary; -@panel-info-text: @state-info-text; -@panel-info-border: @state-info-border; -@panel-info-heading-bg: @state-info-bg; +@panel-success-text: @state-success-text; +@panel-success-border: @state-success-border; +@panel-success-heading-bg: @state-success-bg; -@panel-warning-text: @state-warning-text; -@panel-warning-border: @state-warning-border; -@panel-warning-heading-bg: @state-warning-bg; +@panel-info-text: @state-info-text; +@panel-info-border: @state-info-border; +@panel-info-heading-bg: @state-info-bg; -@panel-danger-text: @state-danger-text; -@panel-danger-border: @state-danger-border; -@panel-danger-heading-bg: @state-danger-bg; +@panel-warning-text: @state-warning-text; +@panel-warning-border: @state-warning-border; +@panel-warning-heading-bg: @state-warning-bg; +@panel-danger-text: @state-danger-text; +@panel-danger-border: @state-danger-border; +@panel-danger-heading-bg: @state-danger-bg; //== Thumbnails // //## //** Padding around the thumbnail image -@thumbnail-padding: 4px; +@thumbnail-padding: 4px; //** Thumbnail background color -@thumbnail-bg: @body-bg; +@thumbnail-bg: @body-bg; //** Thumbnail border color -@thumbnail-border: #ddd; +@thumbnail-border: #ddd; //** Thumbnail border radius -@thumbnail-border-radius: @border-radius-base; +@thumbnail-border-radius: @border-radius-base; //** Custom text color for thumbnail captions -@thumbnail-caption-color: @text-color; +@thumbnail-caption-color: @text-color; //** Padding around the thumbnail caption -@thumbnail-caption-padding: 9px; - +@thumbnail-caption-padding: 9px; //== Wells // //## -@well-bg: #f5f5f5; -@well-border: darken(@well-bg, 7%); - +@well-bg: #f5f5f5; +@well-border: darken(@well-bg, 7%); //== Badges // //## -@badge-color: #fff; +@badge-color: #fff; //** Linked badge text color on hover -@badge-link-hover-color: #fff; -@badge-bg: @gray-light; +@badge-link-hover-color: #fff; +@badge-bg: @gray-light; //** Badge text color in active nav link -@badge-active-color: @link-color; +@badge-active-color: @link-color; //** Badge background color in active nav link -@badge-active-bg: #fff; - -@badge-font-weight: bold; -@badge-line-height: 1; -@badge-border-radius: 10px; +@badge-active-bg: #fff; +@badge-font-weight: bold; +@badge-line-height: 1; +@badge-border-radius: 10px; //== Breadcrumbs // //## -@breadcrumb-padding-vertical: 8px; +@breadcrumb-padding-vertical: 8px; @breadcrumb-padding-horizontal: 15px; //** Breadcrumb background color -@breadcrumb-bg: #f5f5f5; +@breadcrumb-bg: #f5f5f5; //** Breadcrumb text color -@breadcrumb-color: #ccc; +@breadcrumb-color: #ccc; //** Text color of current page in the breadcrumb -@breadcrumb-active-color: @gray-light; +@breadcrumb-active-color: @gray-light; //** Textual separator for between breadcrumb elements -@breadcrumb-separator: "/"; - +@breadcrumb-separator: '/'; //== Carousel // //## -@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6); - -@carousel-control-color: #fff; -@carousel-control-width: 15%; -@carousel-control-opacity: .5; -@carousel-control-font-size: 20px; +@carousel-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); -@carousel-indicator-active-bg: #fff; -@carousel-indicator-border-color: #fff; +@carousel-control-color: #fff; +@carousel-control-width: 15%; +@carousel-control-opacity: 0.5; +@carousel-control-font-size: 20px; -@carousel-caption-color: #fff; +@carousel-indicator-active-bg: #fff; +@carousel-indicator-border-color: #fff; +@carousel-caption-color: #fff; //== Close // //## -@close-font-weight: bold; -@close-color: #000; -@close-text-shadow: 0 1px 0 #fff; - +@close-font-weight: bold; +@close-color: #000; +@close-text-shadow: 0 1px 0 #fff; //== Code // //## -@code-color: #c7254e; -@code-bg: #f9f2f4; - -@kbd-color: #fff; -@kbd-bg: #333; +@code-color: #c7254e; +@code-bg: #f9f2f4; -@pre-bg: #f5f5f5; -@pre-color: @gray-dark; -@pre-border-color: #ccc; -@pre-scrollable-max-height: 340px; +@kbd-color: #fff; +@kbd-bg: #333; +@pre-bg: #f5f5f5; +@pre-color: @gray-dark; +@pre-border-color: #ccc; +@pre-scrollable-max-height: 340px; //== Type // //## //** Text muted color -@text-muted: @gray-light; +@text-muted: @gray-light; //** Abbreviations and acronyms border color -@abbr-border-color: @gray-light; +@abbr-border-color: @gray-light; //** Headings small color -@headings-small-color: @gray-light; +@headings-small-color: @gray-light; //** Blockquote small color -@blockquote-small-color: @gray-light; +@blockquote-small-color: @gray-light; //** Blockquote border color -@blockquote-border-color: @gray-lighter; +@blockquote-border-color: @gray-lighter; //** Page header border color -@page-header-border-color: @gray-lighter; - +@page-header-border-color: @gray-lighter; //== Miscellaneous // //## //** Horizontal line color. -@hr-border: @gray-lighter; +@hr-border: @gray-lighter; //** Horizontal offset for forms and lists. @component-offset-horizontal: 180px; - //== Container sizes // //## Define the maximum width of `.container` for different screen sizes. // Small screen / tablet -@container-tablet: ((720px + @grid-gutter-width)); +@container-tablet: ((720px + @grid-gutter-width)); //** For `@screen-sm-min` and up. -@container-sm: @container-tablet; +@container-sm: @container-tablet; // Medium screen / desktop -@container-desktop: ((940px + @grid-gutter-width)); +@container-desktop: ((940px + @grid-gutter-width)); //** For `@screen-md-min` and up. -@container-md: @container-desktop; +@container-md: @container-desktop; // Large screen / wide desktop -@container-large-desktop: ((1140px + @grid-gutter-width)); +@container-large-desktop: ((1140px + @grid-gutter-width)); //** For `@screen-lg-min` and up. -@container-lg: @container-large-desktop; +@container-lg: @container-large-desktop; diff --git a/docs/src/css/less/twbs/wells.less b/docs/src/css/less/twbs/wells.less index 15d072b0..0a9449ce 100644 --- a/docs/src/css/less/twbs/wells.less +++ b/docs/src/css/less/twbs/wells.less @@ -2,28 +2,27 @@ // Wells // -------------------------------------------------- - // Base class .well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: @well-bg; - border: 1px solid @well-border; - border-radius: @border-radius-base; - .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); - blockquote { - border-color: #ddd; - border-color: rgba(0,0,0,.15); - } + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: @well-bg; + border: 1px solid @well-border; + border-radius: @border-radius-base; + .box-shadow(inset 0 1px 1px rgba(0,0,0,0.05)); + blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); + } } // Sizes .well-lg { - padding: 24px; - border-radius: @border-radius-large; + padding: 24px; + border-radius: @border-radius-large; } .well-sm { - padding: 9px; - border-radius: @border-radius-small; + padding: 9px; + border-radius: @border-radius-small; } diff --git a/docs/src/css/less/vars.less b/docs/src/css/less/vars.less index 493ba61c..b3719f48 100644 --- a/docs/src/css/less/vars.less +++ b/docs/src/css/less/vars.less @@ -1,93 +1,98 @@ @font-face { - font-family: 'titilliumlight'; - src: url('/fonts/titillium-light-webfont.eot?v=@{version}'); - src: local('☺︎'), - url('/fonts/titillium-light-webfont.eot?v=@{version}#iefix') format('embedded-opentype'), - url('/fonts/titillium-light-webfont.woff?v=@{version}') format('woff'), - url('/fonts/titillium-light-webfont.ttf?v=@{version}') format('truetype'), - url('/fonts/titillium-light-webfont.svg?v=@{version}#titilliumlight') format('svg'); - font-weight: normal; - font-style: normal; + font-family: 'titilliumlight'; + src: url('/fonts/titillium-light-webfont.eot?v=@{version}'); + src: local('☺︎'), + url('/fonts/titillium-light-webfont.eot?v=@{version}#iefix') + format('embedded-opentype'), + url('/fonts/titillium-light-webfont.woff?v=@{version}') format('woff'), + url('/fonts/titillium-light-webfont.ttf?v=@{version}') format('truetype'), + url('/fonts/titillium-light-webfont.svg?v=@{version}#titilliumlight') + format('svg'); + font-weight: normal; + font-style: normal; } @font-face { - font-family: 'titilliumregular'; - src: url('/fonts/titillium-regular-webfont.eot?v=@{version}'); - src: local('☺︎'), - url('/fonts/titillium-regular-webfont.eot?v=@{version}#iefix') format('embedded-opentype'), - url('/fonts/titillium-regular-webfont.woff?v=@{version}') format('woff'), - url('/fonts/titillium-regular-webfont.ttf?v=@{version}') format('truetype'), - url('/fonts/titillium-regular-webfont.svg?v=@{version}#titilliumregular') format('svg'); - font-weight: normal; - font-style: normal; + font-family: 'titilliumregular'; + src: url('/fonts/titillium-regular-webfont.eot?v=@{version}'); + src: local('☺︎'), + url('/fonts/titillium-regular-webfont.eot?v=@{version}#iefix') + format('embedded-opentype'), + url('/fonts/titillium-regular-webfont.woff?v=@{version}') format('woff'), + url('/fonts/titillium-regular-webfont.ttf?v=@{version}') format('truetype'), + url('/fonts/titillium-regular-webfont.svg?v=@{version}#titilliumregular') + format('svg'); + font-weight: normal; + font-style: normal; } @font-face { - font-family: 'titilliumthin'; - src: url('/fonts/titillium-thin-webfont.eot?v=@{version}'); - src: local('☺︎'), - url('/fonts/titillium-thin-webfont.eot?v=@{version}#iefix') format('embedded-opentype'), - url('/fonts/titillium-thin-webfont.woff?v=@{version}') format('woff'), - url('/fonts/titillium-thin-webfont.ttf?v=@{version}') format('truetype'), - url('/fonts/titillium-thin-webfont.svg?v=@{version}#titilliumthin') format('svg'); - font-weight: normal; - font-style: normal; + font-family: 'titilliumthin'; + src: url('/fonts/titillium-thin-webfont.eot?v=@{version}'); + src: local('☺︎'), + url('/fonts/titillium-thin-webfont.eot?v=@{version}#iefix') + format('embedded-opentype'), + url('/fonts/titillium-thin-webfont.woff?v=@{version}') format('woff'), + url('/fonts/titillium-thin-webfont.ttf?v=@{version}') format('truetype'), + url('/fonts/titillium-thin-webfont.svg?v=@{version}#titilliumthin') + format('svg'); + font-weight: normal; + font-style: normal; } -@imgPath: ''; //set in Webpack LESS compilation task +@imgPath: ''; //set in Webpack LESS compilation task //colors -@f2blue: #3d9cdc; -@f2blueDark: #3183bd; -@f2BlueLight: #a6d2ef; -@f2grey: #F1F1F4; -@f2greylight: #EEEEEE; -@f2greydark: #E3E3E3; -@f2greydarkAlt: #E9E9E9; -@headingGrey: #666666; -@headingBlue: #429DDA; -@greyBlue: #256794; -@devicegrey: #323A45; -@navbarSeparator: #65B0E1; -@footerBackground: #2a333b; -@footerText: #9DA1A5; -@footerTextLight: #414951; -@footerHexagon: #6A7176; - +@f2blue: #3d9cdc; +@f2blueDark: #3183bd; +@f2BlueLight: #a6d2ef; +@f2grey: #f1f1f4; +@f2greylight: #eeeeee; +@f2greydark: #e3e3e3; +@f2greydarkAlt: #e9e9e9; +@headingGrey: #666666; +@headingBlue: #429dda; +@greyBlue: #256794; +@devicegrey: #323a45; +@navbarSeparator: #65b0e1; +@footerBackground: #2a333b; +@footerText: #9da1a5; +@footerTextLight: #414951; +@footerHexagon: #6a7176; //overrides //brand -@brand-primary: @f2blue; +@brand-primary: @f2blue; //type -@text-color: #666; -@font-family-sans-serif: 'titilliumregular','Helvetica Neue', Helvetica, Arial, sans-serif; -@font-family-sans-serif-regular: @font-family-sans-serif; -@font-family-sans-serif-thin: 'titilliumthin','Helvetica Neue', Helvetica, Arial, sans-serif; +@text-color: #666; +@font-family-sans-serif: 'titilliumregular', 'Helvetica Neue', Helvetica, Arial, + sans-serif; +@font-family-sans-serif-regular: @font-family-sans-serif; +@font-family-sans-serif-thin: 'titilliumthin', 'Helvetica Neue', Helvetica, + Arial, sans-serif; -@headings-font-family: @font-family-sans-serif-thin; -@headings-font-weight: @font-weight-normal; +@headings-font-family: @font-family-sans-serif-thin; +@headings-font-weight: @font-weight-normal; //Normal 400Light 300Extra-Light 200Normal 400 ItalicSemi-Bold 600 -@font-weight-normal: 300; //400; -@font-weight-light: 300; -@font-weight-extra-light: 200; -@font-weight-bold: 600; -@icon-font-path: "/fonts/"; - +@font-weight-normal: 300; //400; +@font-weight-light: 300; +@font-weight-extra-light: 200; +@font-weight-bold: 600; +@icon-font-path: '/fonts/'; //navbar -@navbar-height: 54px; -@navbar-width: 99px; -@navbar-inverse-bg: @f2blue; //#2a333b; -@navbar-inverse-link-color: #fff; -@navbar-inverse-link-hover-color: #fff; -@navbar-inverse-link-active-color: #fff; -@navbar-inverse-link-active-bg: transparent; +@navbar-height: 54px; +@navbar-width: 99px; +@navbar-inverse-bg: @f2blue; //#2a333b; +@navbar-inverse-link-color: #fff; +@navbar-inverse-link-hover-color: #fff; +@navbar-inverse-link-active-color: #fff; +@navbar-inverse-link-active-bg: transparent; -@navbar-inverse-toggle-hover-bg: @navbar-inverse-bg; -@navbar-inverse-toggle-icon-bar-bg: #fff; +@navbar-inverse-toggle-hover-bg: @navbar-inverse-bg; +@navbar-inverse-toggle-icon-bar-bg: #fff; @navbar-inverse-toggle-border-color: @navbar-inverse-bg; - diff --git a/docs/src/examples.md b/docs/src/examples.md index 993404b3..3855b9f9 100644 --- a/docs/src/examples.md +++ b/docs/src/examples.md @@ -17,4 +17,4 @@ Press <code>a</code> to see the <a href="http://docs.openf2.org/app-development. <div class="col-md-6"> <div class="f2-autoload" data-f2-appid="com_openf2_examples_csharp_stocktwits" data-f2-manifestUrl="/apps/com_openf2_examples_csharp_stocktwits/manifest.js" data-f2-context='{"symbol":"AAPL"}'></div> </div> -</div> \ No newline at end of file +</div> diff --git a/docs/src/extending-f2.md b/docs/src/extending-f2.md index 786d8d23..d2f94aed 100644 --- a/docs/src/extending-f2.md +++ b/docs/src/extending-f2.md @@ -2,30 +2,33 @@ <p class="lead">At its core, F2 is an open framework. To create a truly open and flexible foundation with F2.js, F2 can be extended with custom plugins. Extending F2 with plugins provides direct access to F2.js SDK methods and can save your teams a lot of time.</p> -* * * * +--- ## Plugins -Now that you're comfortable with F2 and all the individual [components of the framework](about-f2.html#framework), you are ready to extend F2 and add your own custom logic in the form of an F2 plugin. +Now that you're comfortable with F2 and all the individual [components of the framework](about-f2.html#framework), you are ready to extend F2 and add your own custom logic in the form of an F2 plugin. There is a [separate repository on GitHub](https://github.com/OpenF2/F2Plugins) dedicated to F2 plugin development. If you write a plugin you'd like to contribute back to the community, commit it to [F2Plugins](https://github.com/OpenF2/F2Plugins). <a href="https://github.com/OpenF2/F2Plugins/zipball/master" class="btn btn-primary">Download F2 Plugins</a> <a href="https://github.com/OpenF2/F2Plugins/" class="btn" target="_blank">View on GitHub</a> -* * * * +--- ## Example Plugin -Plugins are encapsulated in JavaScript closures as demonstrated below. There are three arguments which can be passed into `F2.extend()`: `namespace`, `object`, and `overwrite`. For full details, [read the F2.js SDK documentation](../sdk/docs/classes/F2.html#method_extend). +Plugins are encapsulated in JavaScript closures as demonstrated below. There are three arguments which can be passed into `F2.extend()`: `namespace`, `object`, and `overwrite`. For full details, [read the F2.js SDK documentation](../sdk/docs/classes/F2.html#method_extend). ```javascript -F2.extend('YourPluginName', (function(){ - return { - doSomething: function(){ - F2.log("Something has been done."); - } - }; -})()); +F2.extend( + 'YourPluginName', + (function () { + return { + doSomething: function () { + F2.log('Something has been done.'); + } + }; + })() +); ``` To call your custom method shown above: @@ -36,21 +39,21 @@ F2.YourPluginName.doSomething(); ... ``` -This method call writes `Something has been done.` to the Console. +This method call writes `Something has been done.` to the Console. -* * * * +--- ## Best Practices The purpose of developing a plugin is to encapsulate clever logic in a single javascript function to save time and effort performing repetitive tasks. Here are some best practices to keep in mind: -* Always use `F2.extend()` and wrap your plugin in a closure. -* Follow the [module pattern](app-development.html#module-pattern) as shown in the example above or the [f2-storage.js example on GitHub](https://github.com/OpenF2/F2Plugins/blob/master/f2-storage.js). -* Adhere to F2's guidelines when it comes to [namespacing](app-development.html#namespacing). -* When passing options or data to the plugin, use data objects instead of _n_ arguments. Cleanliness is key. -* Don't overuse or clutter the `F2` namespace with more custom plugins than you need. +- Always use `F2.extend()` and wrap your plugin in a closure. +- Follow the [module pattern](app-development.html#module-pattern) as shown in the example above or the [f2-storage.js example on GitHub](https://github.com/OpenF2/F2Plugins/blob/master/f2-storage.js). +- Adhere to F2's guidelines when it comes to [namespacing](app-development.html#namespacing). +- When passing options or data to the plugin, use data objects instead of _n_ arguments. Cleanliness is key. +- Don't overuse or clutter the `F2` namespace with more custom plugins than you need. -* * * * +--- ## Forum @@ -58,4 +61,4 @@ Have a question? Ask it on the [F2 Google Group](https://groups.google.com/forum <OpenF2@googlegroups.com> -* * * * +--- diff --git a/docs/src/index.md b/docs/src/index.md index faccb95e..89085523 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -4,7 +4,7 @@ Below you'll find links to the various sections of the F2 development standard as well as F2.js API reference documentation. -* * * * +--- <div class="docs-3x"> <div class="row"> @@ -29,7 +29,7 @@ Below you'll find links to the various sections of the F2 development standard a </div> </div> -* * * * +--- ## Latest Version @@ -41,7 +41,7 @@ F2 v1.0 was originally open sourced in October 2012. A detailed [changelog](http <a href="https://github.com/OpenF2/F2/releases" class="btn btn-success">Download version {{version}}</a> -* * * * +--- ## Examples @@ -87,7 +87,7 @@ There are a few different types of examples available below. </div> </div> -* * * * +--- ## Resources & Help @@ -109,7 +109,7 @@ Have a question? Find a bug? Need help? </div> </div> -* * * * +--- ## Specification @@ -119,7 +119,7 @@ The F2 development standard will continuously evolve to bring the community the The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this spec are to be interpreted as described in [RFC 2119](http://tools.ietf.org/html/rfc2119). For readability, these words often do not appear in all uppercase letters. -* * * * +--- ## Contribute to F2 diff --git a/docs/src/js/docs-amd.js b/docs/src/js/docs-amd.js index f3cadc8b..e51d07be 100644 --- a/docs/src/js/docs-amd.js +++ b/docs/src/js/docs-amd.js @@ -5,13 +5,12 @@ define(['jquery', 'moment'], function ($, moment) { */ //F2 docs - var F2Docs = function(){ } + var F2Docs = function () {}; /** * Init */ - F2Docs.prototype.initialize = function() { - + F2Docs.prototype.initialize = function () { this.generateToc(); //scroll spy @@ -21,92 +20,122 @@ define(['jquery', 'moment'], function ($, moment) { }); //affix left nav - $('div.navs','#toc').affix({ + $('div.navs', '#toc').affix({ offset: { top: 189, bottom: function () { - return (this.bottom = $('footer').outerHeight(true) + 80) + return (this.bottom = $('footer').outerHeight(true) + 80); } } }); //ensure rwd images - $('img','#docs').addClass('img-responsive'); + $('img', '#docs').addClass('img-responsive'); //remove active state when going back to the top - $(window).on('scroll',function(e){ - var $activeNav = $('li','ul.sidebar-toc').eq(1);//get 1st nav item (not 1st <li>, that's the nav header) - if (document.body.scrollTop < 1 && $activeNav.hasClass('active')){ + $(window).on('scroll', function (e) { + var $activeNav = $('li', 'ul.sidebar-toc').eq(1); //get 1st nav item (not 1st <li>, that's the nav header) + if (document.body.scrollTop < 1 && $activeNav.hasClass('active')) { $activeNav.removeClass('active'); } }); - - } + }; /** * Build table of contents navigation */ - F2Docs.prototype.generateToc = function(){ - - var $docsContainer = $('#docs'), - file = location.pathname.split('/').pop(), - $sections = $('h2', $docsContainer), - $listContainer = $('ul.nav-stacked','#toc').eq(0); + F2Docs.prototype.generateToc = function () { + var $docsContainer = $('#docs'), + file = location.pathname.split('/').pop(), + $sections = $('h2', $docsContainer), + $listContainer = $('ul.nav-stacked', '#toc').eq(0); //build table of contents based on sections within generated markdown file if (!$sections.length) return; //loop over all sections, build nav based on <h2>'s inside the <section.level2> - $sections.each($.proxy(function(idx,item){ - - var $item = $(item), - sectionTitle = $item.text(), - //trim "#" from title - sectionTitle = sectionTitle.replace('#',''), - sectionId = $item.prop("id"), - isActive = (sectionId == String(location.hash.replace("#",""))) ? " class='active'" : "", - $li, - $level3Sections = $item.nextUntil('h2','h3');//find all <h3> els until next section (<h2>) - - //only headings with ID attrs should get corresponding left nav - if ($item.prop('id').length < 1){ - return true; - } - - //nav (level2) - $li = $("<li><a class='nav-toggle' href='#"+sectionId+"'"+isActive+">"+sectionTitle+"</a></li>"); - - //sub nav (level3) - if ($level3Sections.length){ - var $childUl = $('<ul class="nav nav-stacked" style="display:none;"/>'); - $level3Sections.each(function(jdx,ele){ - var $ele = $(ele); - sectionId = $ele.prop("id"); - sectionTitle = $ele.text(); + $sections.each( + $.proxy(function (idx, item) { + var $item = $(item), + sectionTitle = $item.text(), //trim "#" from title - sectionTitle = sectionTitle.replace('#',''); - isActive = (sectionId == String(location.hash.replace("#",""))) ? " class='active'" : ""; - $childUl.append( $("<li><a href='#"+sectionId+"'"+isActive+">"+sectionTitle+"</a></li>") ); - }); - $li.append($childUl); - } + sectionTitle = sectionTitle.replace('#', ''), + sectionId = $item.prop('id'), + isActive = + sectionId == String(location.hash.replace('#', '')) + ? " class='active'" + : '', + $li, + $level3Sections = $item.nextUntil('h2', 'h3'); //find all <h3> els until next section (<h2>) + + //only headings with ID attrs should get corresponding left nav + if ($item.prop('id').length < 1) { + return true; + } - $listContainer.append($li); - },this)); + //nav (level2) + $li = $( + "<li><a class='nav-toggle' href='#" + + sectionId + + "'" + + isActive + + '>' + + sectionTitle + + '</a></li>' + ); + + //sub nav (level3) + if ($level3Sections.length) { + var $childUl = $( + '<ul class="nav nav-stacked" style="display:none;"/>' + ); + $level3Sections.each(function (jdx, ele) { + var $ele = $(ele); + sectionId = $ele.prop('id'); + sectionTitle = $ele.text(); + //trim "#" from title + sectionTitle = sectionTitle.replace('#', ''); + isActive = + sectionId == String(location.hash.replace('#', '')) + ? " class='active'" + : ''; + $childUl.append( + $( + "<li><a href='#" + + sectionId + + "'" + + isActive + + '>' + + sectionTitle + + '</a></li>' + ) + ); + }); + $li.append($childUl); + } + + $listContainer.append($li); + }, this) + ); //watch to activate "active" nav item - $('li','#toc ul.sidebar-toc').on('activate.bs.scrollspy', function(){ + $('li', '#toc ul.sidebar-toc').on('activate.bs.scrollspy', function () { var $li = $(this), $toggle = $li.find('a.nav-toggle'); - if ($li.hasClass('active') && $toggle.length){ + if ($li.hasClass('active') && $toggle.length) { //close others - $li.parents('ul.nav-stacked').find('li').not($li).find('a.nav-toggle').next('ul').hide(); + $li + .parents('ul.nav-stacked') + .find('li') + .not($li) + .find('a.nav-toggle') + .next('ul') + .hide(); //open current $toggle.next('ul').show(); } }); - - } + }; return new F2Docs(); }); diff --git a/docs/src/js/docs.js b/docs/src/js/docs.js index 3f13de14..e4616fe7 100644 --- a/docs/src/js/docs.js +++ b/docs/src/js/docs.js @@ -4,13 +4,12 @@ */ //F2 docs -var F2Docs = function(){ } +var F2Docs = function () {}; /** * Init */ -F2Docs.prototype.initialize = function() { - +F2Docs.prototype.initialize = function () { this.generateToc(); //scroll spy @@ -18,91 +17,119 @@ F2Docs.prototype.initialize = function() { // offset: 100, target: '#toc .spy-container' }); - + //affix left nav - $('div.navs','#toc').affix({ + $('div.navs', '#toc').affix({ offset: { top: 189, bottom: function () { - return (this.bottom = $('footer').outerHeight(true) + 80) + return (this.bottom = $('footer').outerHeight(true) + 80); } } }); - //ensure rwd images - $('img','#docs').addClass('img-responsive'); + //ensure rwd images + $('img', '#docs').addClass('img-responsive'); //remove active state when going back to the top - $(window).on('scroll',function(e){ - var $activeNav = $('li','ul.sidebar-toc').eq(1);//get 1st nav item (not 1st <li>, that's the nav header) - if (document.body.scrollTop < 1 && $activeNav.hasClass('active')){ + $(window).on('scroll', function (e) { + var $activeNav = $('li', 'ul.sidebar-toc').eq(1); //get 1st nav item (not 1st <li>, that's the nav header) + if (document.body.scrollTop < 1 && $activeNav.hasClass('active')) { $activeNav.removeClass('active'); } }); - -} +}; /** * Build table of contents navigation */ -F2Docs.prototype.generateToc = function(){ - - var $docsContainer = $('#docs'), - file = location.pathname.split('/').pop(), - $sections = $('h2', $docsContainer), - $listContainer = $('ul.nav-stacked','#toc').eq(0); +F2Docs.prototype.generateToc = function () { + var $docsContainer = $('#docs'), + file = location.pathname.split('/').pop(), + $sections = $('h2', $docsContainer), + $listContainer = $('ul.nav-stacked', '#toc').eq(0); //build table of contents based on sections within generated markdown file if (!$sections.length) return; //loop over all sections, build nav based on <h2>'s inside the <section.level2> - $sections.each($.proxy(function(idx,item){ - - var $item = $(item), - sectionTitle = $item.text(), - //trim "#" from title - sectionTitle = sectionTitle.replace('#',''), - sectionId = $item.prop("id"), - isActive = (sectionId == String(location.hash.replace("#",""))) ? " class='active'" : "", - $li, - $level3Sections = $item.nextUntil('h2','h3');//find all <h3> els until next section (<h2>) - - //only headings with ID attrs should get corresponding left nav - if ($item.prop('id').length < 1){ - return true; - } - - //nav (level2) - $li = $("<li><a class='nav-toggle' href='#"+sectionId+"'"+isActive+">"+sectionTitle+"</a></li>"); - - //sub nav (level3) - if ($level3Sections.length){ - var $childUl = $('<ul class="nav nav-stacked" style="display:none;"/>'); - $level3Sections.each(function(jdx,ele){ - var $ele = $(ele); - sectionId = $ele.prop("id"); - sectionTitle = $ele.text(); + $sections.each( + $.proxy(function (idx, item) { + var $item = $(item), + sectionTitle = $item.text(), //trim "#" from title - sectionTitle = sectionTitle.replace('#',''); - isActive = (sectionId == String(location.hash.replace("#",""))) ? " class='active'" : ""; - $childUl.append( $("<li><a href='#"+sectionId+"'"+isActive+">"+sectionTitle+"</a></li>") ); - }); - $li.append($childUl); - } + sectionTitle = sectionTitle.replace('#', ''), + sectionId = $item.prop('id'), + isActive = + sectionId == String(location.hash.replace('#', '')) + ? " class='active'" + : '', + $li, + $level3Sections = $item.nextUntil('h2', 'h3'); //find all <h3> els until next section (<h2>) + + //only headings with ID attrs should get corresponding left nav + if ($item.prop('id').length < 1) { + return true; + } + + //nav (level2) + $li = $( + "<li><a class='nav-toggle' href='#" + + sectionId + + "'" + + isActive + + '>' + + sectionTitle + + '</a></li>' + ); + + //sub nav (level3) + if ($level3Sections.length) { + var $childUl = $('<ul class="nav nav-stacked" style="display:none;"/>'); + $level3Sections.each(function (jdx, ele) { + var $ele = $(ele); + sectionId = $ele.prop('id'); + sectionTitle = $ele.text(); + //trim "#" from title + sectionTitle = sectionTitle.replace('#', ''); + isActive = + sectionId == String(location.hash.replace('#', '')) + ? " class='active'" + : ''; + $childUl.append( + $( + "<li><a href='#" + + sectionId + + "'" + + isActive + + '>' + + sectionTitle + + '</a></li>' + ) + ); + }); + $li.append($childUl); + } - $listContainer.append($li); - },this)); + $listContainer.append($li); + }, this) + ); //watch to activate "active" nav item - $('li','#toc ul.sidebar-toc').on('activate.bs.scrollspy', function(){ - var $li = $(this), + $('li', '#toc ul.sidebar-toc').on('activate.bs.scrollspy', function () { + var $li = $(this), $toggle = $li.find('a.nav-toggle'); - if ($li.hasClass('active') && $toggle.length){ + if ($li.hasClass('active') && $toggle.length) { //close others - $li.parents('ul.nav-stacked').find('li').not($li).find('a.nav-toggle').next('ul').hide(); + $li + .parents('ul.nav-stacked') + .find('li') + .not($li) + .find('a.nav-toggle') + .next('ul') + .hide(); //open current $toggle.next('ul').show(); } }); - -} +}; diff --git a/docs/src/js/main.js b/docs/src/js/main.js index 1f56e6b1..e1c4bb71 100644 --- a/docs/src/js/main.js +++ b/docs/src/js/main.js @@ -1,41 +1,34 @@ require({ - basePath: '/js', - paths: { - 'bootstrap': '//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min', - 'F2': 'f2.min', - 'highlightjs': 'thirdparty/highlight.min', - 'jquery': '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min', - 'mousetrap': 'thirdparty/mousetrap', - 'moment': 'thirdparty/moment.min' - }, - shim: { - 'bootstrap': { - deps: ['jquery'], - exports: 'jquery' - } - } + basePath: '/js', + paths: { + bootstrap: '//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min', + F2: 'f2.min', + highlightjs: 'thirdparty/highlight.min', + jquery: '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min', + mousetrap: 'thirdparty/mousetrap', + moment: 'thirdparty/moment.min' }, - [ - 'jquery', - 'docs-amd', - 'bootstrap' - ], - function($, docs) { - var $pm = $('script[data-main][data-page]'); + shim: { + bootstrap: { + deps: ['jquery'], + exports: 'jquery' + } + } +}, ['jquery', 'docs-amd', 'bootstrap'], function ($, docs) { + var $pm = $('script[data-main][data-page]'); - if ($pm.length) { - var pageModule = $pm.data('page'); + if ($pm.length) { + var pageModule = $pm.data('page'); - // require page-specific js - $(function() { - require([pageModule], function(page) { - if (page && typeof page.initialize === 'function') { - page.initialize(); - } - }); + // require page-specific js + $(function () { + require([pageModule], function (page) { + if (page && typeof page.initialize === 'function') { + page.initialize(); + } }); - } - - docs.initialize(); + }); } -); \ No newline at end of file + + docs.initialize(); +}); diff --git a/docs/src/js/pages/app-development.js b/docs/src/js/pages/app-development.js index 33f0556b..7cb8e123 100644 --- a/docs/src/js/pages/app-development.js +++ b/docs/src/js/pages/app-development.js @@ -1,3 +1 @@ -define([], function() { - -}); \ No newline at end of file +define([], function () {}); diff --git a/docs/src/js/pages/container-development.js b/docs/src/js/pages/container-development.js index 33f0556b..7cb8e123 100644 --- a/docs/src/js/pages/container-development.js +++ b/docs/src/js/pages/container-development.js @@ -1,3 +1 @@ -define([], function() { - -}); \ No newline at end of file +define([], function () {}); diff --git a/docs/src/js/pages/examples.js b/docs/src/js/pages/examples.js index b5806745..3c98531e 100644 --- a/docs/src/js/pages/examples.js +++ b/docs/src/js/pages/examples.js @@ -1,39 +1,44 @@ -define(['jquery', 'F2', 'mousetrap', 'highlightjs'], function($, F2, Mousetrap, hljs) { - var examples = function(){ - - }; - - examples.prototype.initialize = function() { +define(['jquery', 'F2', 'mousetrap', 'highlightjs'], function ( + $, + F2, + Mousetrap, + hljs +) { + var examples = function () {}; + + examples.prototype.initialize = function () { //this.initExampleF2Apps(); this.initContainerEvents(); this.highlightCode(); //highlight all Apps - Mousetrap.bind('a', function() { + Mousetrap.bind('a', function () { $('div.f2-app').toggleClass('f2-mode-highlighted'); }); //highlight Container - Mousetrap.bind('c', function() { + Mousetrap.bind('c', function () { $('div.examples-container').toggleClass('f2-mode-highlighted'); }); }; - examples.prototype.initContainerEvents = function() { + examples.prototype.initContainerEvents = function () { //listen for app symbol change events and re-broadcast - F2.Events.on(F2.Constants.Events.APP_SYMBOL_CHANGE,function(data) { - F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { symbol: data.symbol, name: data.name || '' }); + F2.Events.on(F2.Constants.Events.APP_SYMBOL_CHANGE, function (data) { + F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { + symbol: data.symbol, + name: data.name || '' + }); }); }; - examples.prototype.highlightCode = function() { - - $('pre code','#registry').each(function(i, el) { + examples.prototype.highlightCode = function () { + $('pre code', '#registry').each(function (i, el) { try { hljs.highlightBlock(el); - }catch(e){} + } catch (e) {} }); }; return new examples(); -}); \ No newline at end of file +}); diff --git a/docs/src/js/pages/extending-f2.js b/docs/src/js/pages/extending-f2.js index 33f0556b..7cb8e123 100644 --- a/docs/src/js/pages/extending-f2.js +++ b/docs/src/js/pages/extending-f2.js @@ -1,3 +1 @@ -define([], function() { - -}); \ No newline at end of file +define([], function () {}); diff --git a/docs/src/js/pages/f2js-sdk.js b/docs/src/js/pages/f2js-sdk.js index 33f0556b..7cb8e123 100644 --- a/docs/src/js/pages/f2js-sdk.js +++ b/docs/src/js/pages/f2js-sdk.js @@ -1,3 +1 @@ -define([], function() { - -}); \ No newline at end of file +define([], function () {}); diff --git a/docs/src/js/pages/index.js b/docs/src/js/pages/index.js index 33f0556b..7cb8e123 100644 --- a/docs/src/js/pages/index.js +++ b/docs/src/js/pages/index.js @@ -1,3 +1 @@ -define([], function() { - -}); \ No newline at end of file +define([], function () {}); diff --git a/docs/src/js/pages/migrating-to-v2.js b/docs/src/js/pages/migrating-to-v2.js index 33f0556b..7cb8e123 100644 --- a/docs/src/js/pages/migrating-to-v2.js +++ b/docs/src/js/pages/migrating-to-v2.js @@ -1,3 +1 @@ -define([], function() { - -}); \ No newline at end of file +define([], function () {}); diff --git a/docs/src/js/thirdparty/highlight.min.js b/docs/src/js/thirdparty/highlight.min.js index d9ad21ff..9cf77f63 100644 --- a/docs/src/js/thirdparty/highlight.min.js +++ b/docs/src/js/thirdparty/highlight.min.js @@ -1,3 +1,1533 @@ //version 8.4 -!function(e){"undefined"!=typeof exports?e(exports):(window.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return window.hljs}))}(function(e){function t(e){return e.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function r(e){return e.nodeName.toLowerCase()}function n(e,t){var r=e&&e.exec(t);return r&&0==r.index}function a(e){var t=(e.className+" "+(e.parentNode?e.parentNode.className:"")).split(/\s+/);return t=t.map(function(e){return e.replace(/^lang(uage)?-/,"")}),t.filter(function(e){return N(e)||/no(-?)highlight/.test(e)})[0]}function i(e,t){var r={};for(var n in e)r[n]=e[n];if(t)for(var n in t)r[n]=t[n];return r}function s(e){var t=[];return function n(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(t.push({event:"start",offset:a,node:i}),a=n(i,a),r(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:a,node:i}));return a}(e,0),t}function c(e,n,a){function i(){return e.length&&n.length?e[0].offset!=n[0].offset?e[0].offset<n[0].offset?e:n:"start"==n[0].event?e:n:e.length?e:n}function s(e){function n(e){return" "+e.nodeName+'="'+t(e.value)+'"'}u+="<"+r(e)+Array.prototype.map.call(e.attributes,n).join("")+">"}function c(e){u+="</"+r(e)+">"}function o(e){("start"==e.event?s:c)(e.node)}for(var l=0,u="",d=[];e.length||n.length;){var b=i();if(u+=t(a.substr(l,b[0].offset-l)),l=b[0].offset,b==e){d.reverse().forEach(c);do o(b.splice(0,1)[0]),b=i();while(b==e&&b.length&&b[0].offset==l);d.reverse().forEach(s)}else"start"==b[0].event?d.push(b[0].node):d.pop(),o(b.splice(0,1)[0])}return u+t(a.substr(l))}function o(e){function t(e){return e&&e.source||e}function r(r,n){return RegExp(t(r),"m"+(e.cI?"i":"")+(n?"g":""))}function n(a,s){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var c={},o=function(t,r){e.cI&&(r=r.toLowerCase()),r.split(" ").forEach(function(e){var r=e.split("|");c[r[0]]=[t,r[1]?Number(r[1]):1]})};"string"==typeof a.k?o("keyword",a.k):Object.keys(a.k).forEach(function(e){o(e,a.k[e])}),a.k=c}a.lR=r(a.l||/\b[A-Za-z0-9_]+\b/,!0),s&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=r(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=r(a.e)),a.tE=t(a.e)||"",a.eW&&s.tE&&(a.tE+=(a.e?"|":"")+s.tE)),a.i&&(a.iR=r(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var l=[];a.c.forEach(function(e){e.v?e.v.forEach(function(t){l.push(i(e,t))}):l.push("self"==e?a:e)}),a.c=l,a.c.forEach(function(e){n(e,a)}),a.starts&&n(a.starts,s);var u=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(t).filter(Boolean);a.t=u.length?r(u.join("|"),!0):{exec:function(){return null}}}}n(e)}function l(e,r,a,i){function s(e,t){for(var r=0;r<t.c.length;r++)if(n(t.c[r].bR,e))return t.c[r]}function c(e,t){return n(e.eR,t)?e:e.eW?c(e.parent,t):void 0}function d(e,t){return!a&&n(t.iR,e)}function b(e,t){var r=y.cI?t[0].toLowerCase():t[0];return e.k.hasOwnProperty(r)&&e.k[r]}function p(e,t,r,n){var a=n?"":v.classPrefix,i='<span class="'+a,s=r?"":"</span>";return i+=e+'">',i+t+s}function f(){if(!k.k)return t(S);var e="",r=0;k.lR.lastIndex=0;for(var n=k.lR.exec(S);n;){e+=t(S.substr(r,n.index-r));var a=b(k,n);a?(E+=a[1],e+=p(a[0],t(n[0]))):e+=t(n[0]),r=k.lR.lastIndex,n=k.lR.exec(S)}return e+t(S.substr(r))}function m(){if(k.sL&&!w[k.sL])return t(S);var e=k.sL?l(k.sL,S,!0,x[k.sL]):u(S);return k.r>0&&(E+=e.r),"continuous"==k.subLanguageMode&&(x[k.sL]=e.top),p(e.language,e.value,!1,!0)}function g(){return void 0!==k.sL?m():f()}function _(e,r){var n=e.cN?p(e.cN,"",!0):"";e.rB?(M+=n,S=""):e.eB?(M+=t(r)+n,S=""):(M+=n,S=r),k=Object.create(e,{parent:{value:k}})}function h(e,r){if(S+=e,void 0===r)return M+=g(),0;var n=s(r,k);if(n)return M+=g(),_(n,r),n.rB?0:r.length;var a=c(k,r);if(a){var i=k;i.rE||i.eE||(S+=r),M+=g();do k.cN&&(M+="</span>"),E+=k.r,k=k.parent;while(k!=a.parent);return i.eE&&(M+=t(r)),S="",a.starts&&_(a.starts,""),i.rE?0:r.length}if(d(r,k))throw new Error('Illegal lexeme "'+r+'" for mode "'+(k.cN||"<unnamed>")+'"');return S+=r,r.length||1}var y=N(e);if(!y)throw new Error('Unknown language: "'+e+'"');o(y);for(var k=i||y,x={},M="",C=k;C!=y;C=C.parent)C.cN&&(M=p(C.cN,"",!0)+M);var S="",E=0;try{for(var B,I,L=0;;){if(k.t.lastIndex=L,B=k.t.exec(r),!B)break;I=h(r.substr(L,B.index-L),B[0]),L=B.index+I}h(r.substr(L));for(var C=k;C.parent;C=C.parent)C.cN&&(M+="</span>");return{r:E,value:M,language:e,top:k}}catch(R){if(-1!=R.message.indexOf("Illegal"))return{r:0,value:t(r)};throw R}}function u(e,r){r=r||v.languages||Object.keys(w);var n={r:0,value:t(e)},a=n;return r.forEach(function(t){if(N(t)){var r=l(t,e,!1);r.language=t,r.r>a.r&&(a=r),r.r>n.r&&(a=n,n=r)}}),a.language&&(n.second_best=a),n}function d(e){return v.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,t){return t.replace(/\t/g,v.tabReplace)})),v.useBR&&(e=e.replace(/\n/g,"<br>")),e}function b(e,t,r){var n=t?y[t]:r,a=[e.trim()];return e.match(/(\s|^)hljs(\s|$)/)||a.push("hljs"),n&&a.push(n),a.join(" ").trim()}function p(e){var t=a(e);if(!/no(-?)highlight/.test(t)){var r;v.useBR?(r=document.createElementNS("http://www.w3.org/1999/xhtml","div"),r.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):r=e;var n=r.textContent,i=t?l(t,n,!0):u(n),o=s(r);if(o.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=i.value,i.value=c(o,s(p),n)}i.value=d(i.value),e.innerHTML=i.value,e.className=b(e.className,t,i.language),e.result={language:i.language,re:i.r},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.r})}}function f(e){v=i(v,e)}function m(){if(!m.called){m.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function g(){addEventListener("DOMContentLoaded",m,!1),addEventListener("load",m,!1)}function _(t,r){var n=w[t]=r(e);n.aliases&&n.aliases.forEach(function(e){y[e]=t})}function h(){return Object.keys(w)}function N(e){return w[e]||w[y[e]]}var v={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},w={},y={};return e.highlight=l,e.highlightAuto=u,e.fixMarkup=d,e.highlightBlock=p,e.configure=f,e.initHighlighting=m,e.initHighlightingOnLoad=g,e.registerLanguage=_,e.listLanguages=h,e.getLanguage=N,e.inherit=i,e.IR="[a-zA-Z][a-zA-Z0-9_]*",e.UIR="[a-zA-Z_][a-zA-Z0-9_]*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/},e.CLCM={cN:"comment",b:"//",e:"$",c:[e.PWM]},e.CBCM={cN:"comment",b:"/\\*",e:"\\*/",c:[e.PWM]},e.HCM={cN:"comment",b:"#",e:"$",c:[e.PWM]},e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e}),hljs.registerLanguage("apache",function(e){var t={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"tag",b:"</?",e:">"},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",t]},t,e.QSM]}}],i:/\S/}}),hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]},r={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},n={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,e.NM,r,n,t]}}),hljs.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module global window document"},r="[A-Za-z$_][0-9A-Za-z$_]*",n={cN:"subst",b:/#\{/,e:/}/,k:t},a=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,n]},{b:/"/,e:/"/,c:[e.BE,n]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[n,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{cN:"property",b:"@"+r},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];n.c=a;var i=e.inherit(e.TM,{b:r}),s="(\\(.*\\))?\\s*\\B[-=]>",c={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(a)}]};return{aliases:["coffee","cson","iced"],k:t,i:/\/\*/,c:a.concat([{cN:"comment",b:"###",e:"###",c:[e.PWM]},e.HCM,{cN:"function",b:"^\\s*"+r+"\\s*=\\s*"+s,e:"[-=]>",rB:!0,c:[i,c]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:s,e:"[-=]>",rB:!0,c:[c]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{cN:"attribute",b:r+":",e:":",rB:!0,rE:!0,r:0}])}}),hljs.registerLanguage("cpp",function(e){var t={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginaryintmax_t uintmax_t int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_tint_least8_t uint_least8_t int_least16_t uint_least16_t int_least32_t uint_least32_tint_least64_t uint_least64_t int_fast8_t uint_fast8_t int_fast16_t uint_fast16_t int_fast32_tuint_fast32_t int_fast64_t uint_fast64_t intptr_t uintptr_t atomic_bool atomic_char atomic_scharatomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llongatomic_ullong atomic_wchar_t atomic_char16_t atomic_char32_t atomic_intmax_t atomic_uintmax_tatomic_intptr_t atomic_uintptr_t atomic_size_t atomic_ptrdiff_t atomic_int_least8_t atomic_int_least16_tatomic_int_least32_t atomic_int_least64_t atomic_uint_least8_t atomic_uint_least16_t atomic_uint_least32_tatomic_uint_least64_t atomic_int_fast8_t atomic_int_fast16_t atomic_int_fast32_t atomic_int_fast64_tatomic_uint_fast8_t atomic_uint_fast16_t atomic_uint_fast32_t atomic_uint_fast64_t",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c","h","c++","h++"],k:t,i:"</",c:[e.CLCM,e.CBCM,e.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},e.CNM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line pragma",c:[{b:'include\\s*[<"]',e:'[>"]',k:"include",i:"\\n"},e.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:t,c:["self"]},{b:e.IR+"::"},{bK:"new throw return",r:0},{cN:"function",b:"("+e.IR+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:t,r:0,c:[e.CBCM]},e.CLCM,e.CBCM]}]}}),hljs.registerLanguage("cs",function(e){var t="abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",r=e.IR+"(<"+e.IR+">)?";return{aliases:["csharp"],k:t,i:/::/,c:[{cN:"comment",b:"///",e:"$",rB:!0,c:[{cN:"xmlDocTag",v:[{b:"///",r:0},{b:"<!--|-->"},{b:"</?",e:">"}]}]},e.CLCM,e.CBCM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},e.ASM,e.QSM,e.CNM,{bK:"class namespace interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+r+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}}),hljs.registerLanguage("css",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={cN:"function",b:t+"\\(",rB:!0,eE:!0,e:"\\("};return{cI:!0,i:"[=/|']",c:[e.CBCM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[r,e.ASM,e.QSM,e.CSSNM]}]},{cN:"tag",b:t,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[e.CBCM,{cN:"rule",b:"[^\\s]",rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[r,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}}),hljs.registerLanguage("diff",function(){return{aliases:["patch"],c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}}),hljs.registerLanguage("http",function(){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:!0}}]}}),hljs.registerLanguage("ini",function(e){return{cI:!0,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:!0,k:"on off true false yes no",c:[e.QSM,e.NM],r:0}]}]}}),hljs.registerLanguage("java",function(e){var t=e.UIR+"(<"+e.UIR+">)?",r="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",n="(\\b(0b[01_]+)|\\b0[xX][a-fA-F0-9_]+|(\\b[\\d_]+(\\.[\\d_]*)?|\\.[\\d_]+)([eE][-+]?\\d+)?)[lLfF]?",a={cN:"number",b:n,r:0};return{aliases:["jsp"],k:r,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",r:0,c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}]},e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},a,{cN:"annotation",b:"@[A-Za-z]+"}]}}),hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document"},c:[{cN:"pi",r:10,v:[{b:/^\s*('|")use strict('|")/},{b:/^\s*('|")use asm('|")/}]},e.ASM,e.QSM,e.CLCM,e.CBCM,e.CNM,{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/</,e:/>;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[e.CLCM,e.CBCM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0}]}}),hljs.registerLanguage("json",function(e){var t={literal:"true false null"},r=[e.QSM,e.CNM],n={cN:"value",e:",",eW:!0,eE:!0,c:r,k:t},a={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:n}],i:"\\S"},i={b:"\\[",e:"\\]",c:[e.inherit(n,{cN:null})],i:"\\S"};return r.splice(r.length,0,a,i),{c:r,k:t,i:"\\S"}}),hljs.registerLanguage("makefile",function(e){var t={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[t]}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,t]}]}}),hljs.registerLanguage("xml",function(){var e="[A-Za-z0-9\\._:-]+",t={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"},r={eW:!0,i:/</,r:0,c:[t,{cN:"attribute",b:e,r:0},{b:"=",r:0,c:[{cN:"value",c:[t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[r],starts:{e:"</style>",rE:!0,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[r],starts:{e:"</script>",rE:!0,sL:"javascript"}},t,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:/[^ \/><\n\t]+/,r:0},r]}]}}),hljs.registerLanguage("markdown",function(){return{aliases:["md","mkdown","mkd"],c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",rB:!0,c:[{cN:"link_reference",b:"\\[",e:"\\]:",eB:!0,eE:!0,starts:{cN:"link_url",e:"$"}}]}]}}),hljs.registerLanguage("nginx",function(e){var t={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},r={eW:!0,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[t]},{cN:"regexp",c:[e.BE,t],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},t]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"title",b:e.UIR,starts:r}],r:0}],i:"[^\\s\\}]"}}),hljs.registerLanguage("objectivec",function(e){var t={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSData NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView NSView NSViewController NSWindow NSWindowController NSSet NSUUID NSIndexSet UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection NSURLSession NSURLSessionDataTask NSURLSessionDownloadTask NSURLSessionUploadTask NSURLResponseUIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["m","mm","objc","obj-c"],k:t,l:r,i:"</",c:[e.CLCM,e.CBCM,e.CNM,e.QSM,{cN:"string",v:[{b:'@"',e:'"',i:"\\n",c:[e.BE]},{b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"}]},{cN:"preprocessor",b:"#",e:"$",c:[{cN:"title",v:[{b:'"',e:'"'},{b:"<",e:">"}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:r,c:[e.UTM]},{cN:"variable",b:"\\."+e.UIR,r:0}]}}),hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},n={b:"->{",e:"}"},a={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@][^\s\w{]/,r:0}]},i={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5},s=[e.BE,r,a],c=[a,e.HCM,i,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:!0},n,{cN:"string",c:s,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,i,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];return r.c=c,n.c=c,{aliases:["pl"],k:t,c:c}}),hljs.registerLanguage("php",function(e){var t={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},r={cN:"preprocessor",b:/<\?(php)?|\?>/},n={cN:"string",c:[e.BE,r],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},a={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},r]},{cN:"comment",b:"__halt_compiler.+?;",eW:!0,k:"__halt_compiler",l:e.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[e.BE]},r,t,{b:/->+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBCM,n,a]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},n,a]}}),hljs.registerLanguage("python",function(e){var t={cN:"prompt",b:/^(>>>|\.\.\.) /},r={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[t],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[t],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},n={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},a={cN:"params",b:/\(/,e:/\)/,c:["self",t,n,r]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[t,n,r,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n]/,c:[e.UTM,a]},{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}}),hljs.registerLanguage("ruby",function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",n={cN:"yardoctag",b:"@[A-Za-z]+"},a={cN:"value",b:"#<",e:">"},i={cN:"comment",v:[{b:"#",e:"$",c:[n]},{b:"^\\=begin",e:"^\\=end",c:[n],r:10},{b:"^__END__",e:"\\n$"}]},s={cN:"subst",b:"#\\{",e:"}",k:r},c={cN:"string",c:[e.BE,s],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},o={cN:"params",b:"\\(",e:"\\)",k:r},l=[c,a,i,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]},i]},{cN:"function",bK:"def",e:" |$|;",r:0,c:[e.inherit(e.TM,{b:t}),o,i]},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":",c:[c,{b:t}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[a,i,{cN:"regexp",c:[e.BE,s],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];s.c=l,o.c=l;var u="[>?]>",d="[\\w#]+\\(\\w+\\):\\d+:\\d+>",b="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",p=[{b:/^\s*=>/,cN:"status",starts:{e:"$",c:l}},{cN:"prompt",b:"^("+u+"|"+d+"|"+b+")",starts:{e:"$",c:l}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,c:[i].concat(p).concat(l)}}),hljs.registerLanguage("sql",function(e){var t={cN:"comment",b:"--",e:"$"};return{cI:!0,i:/[<>]/,c:[{cN:"operator",bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate savepoint release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup",e:/;/,eW:!0,k:{keyword:"abs absolute acos action add adddate addtime aes_decrypt aes_encrypt after aggregate all allocate alter analyze and any are as asc ascii asin assertion at atan atan2 atn2 authorization authors avg backup before begin benchmark between bin binlog bit_and bit_count bit_length bit_or bit_xor both by cache call cascade cascaded case cast catalog ceil ceiling chain change changed char_length character_length charindex charset check checksum checksum_agg choose close coalesce coercibility collate collation collationproperty column columns columns_updated commit compress concat concat_ws concurrent connect connection connection_id consistent constraint constraints continue contributors conv convert convert_tz corresponding cos cot count count_big crc32 create cross cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime data database databases datalength date_add date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts datetimeoffsetfromparts day dayname dayofmonth dayofweek dayofyear deallocate declare decode default deferrable deferred degrees delayed delete des_decrypt des_encrypt des_key_file desc describe descriptor diagnostics difference disconnect distinct distinctrow div do domain double drop dumpfile each else elt enclosed encode encrypt end end-exec engine engines eomonth errors escape escaped event eventdata events except exception exec execute exists exp explain export_set extended external extract fast fetch field fields find_in_set first first_value floor flush for force foreign format found found_rows from from_base64 from_days from_unixtime full function get get_format get_lock getdate getutcdate global go goto grant grants greatest group group_concat grouping grouping_id gtid_subset gtid_subtract handler having help hex high_priority hosts hour ident_current ident_incr ident_seed identified identity if ifnull ignore iif ilike immediate in index indicator inet6_aton inet6_ntoa inet_aton inet_ntoa infile initially inner innodb input insert install instr intersect into is is_free_lock is_ipv4 is_ipv4_compat is_ipv4_mapped is_not is_not_null is_used_lock isdate isnull isolation join key kill language last last_day last_insert_id last_value lcase lead leading least leaves left len lenght level like limit lines ln load load_file local localtime localtimestamp locate lock log log10 log2 logfile logs low_priority lower lpad ltrim make_set makedate maketime master master_pos_wait match matched max md5 medium merge microsecond mid min minute mod mode module month monthname mutex name_const names national natural nchar next no no_write_to_binlog not now nullif nvarchar oct octet_length of old_password on only open optimize option optionally or ord order outer outfile output pad parse partial partition password patindex percent_rank percentile_cont percentile_disc period_add period_diff pi plugin position pow power pragma precision prepare preserve primary prior privileges procedure procedure_analyze processlist profile profiles public publishingservername purge quarter query quick quote quotename radians rand read references regexp relative relaylog release release_lock rename repair repeat replace replicate reset restore restrict return returns reverse revoke right rlike rollback rollup round row row_count rows rpad rtrim savepoint schema scroll sec_to_time second section select serializable server session session_user set sha sha1 sha2 share show sign sin size slave sleep smalldatetimefromparts snapshot some soname soundex sounds_like space sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sql_variant_property sqlstate sqrt square start starting status std stddev stddev_pop stddev_samp stdev stdevp stop str str_to_date straight_join strcmp string stuff subdate substr substring subtime subtring_index sum switchoffset sysdate sysdatetime sysdatetimeoffset system_user sysutcdatetime table tables tablespace tan temporary terminated tertiary_weights then time time_format time_to_sec timediff timefromparts timestamp timestampadd timestampdiff timezone_hour timezone_minute to to_base64 to_days to_seconds todatetimeoffset trailing transaction translation trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse ucase uncompress uncompressed_length unhex unicode uninstall union unique unix_timestamp unknown unlock update upgrade upped upper usage use user user_resources using utc_date utc_time utc_timestamp uuid uuid_short validate_password_strength value values var var_pop var_samp variables variance varp version view warnings week weekday weekofyear weight_string when whenever where with work write xml xor year yearweek zon",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int integer interval number numeric real serial smallint varchar varying int8 serial8 text"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]} -}); \ No newline at end of file +!(function (e) { + 'undefined' != typeof exports + ? e(exports) + : ((window.hljs = e({})), + 'function' == typeof define && + define.amd && + define([], function () { + return window.hljs; + })); +})(function (e) { + function t(e) { + return e + .replace(/&/gm, '&') + .replace(/</gm, '<') + .replace(/>/gm, '>'); + } + function r(e) { + return e.nodeName.toLowerCase(); + } + function n(e, t) { + var r = e && e.exec(t); + return r && 0 == r.index; + } + function a(e) { + var t = ( + e.className + + ' ' + + (e.parentNode ? e.parentNode.className : '') + ).split(/\s+/); + return ( + (t = t.map(function (e) { + return e.replace(/^lang(uage)?-/, ''); + })), + t.filter(function (e) { + return N(e) || /no(-?)highlight/.test(e); + })[0] + ); + } + function i(e, t) { + var r = {}; + for (var n in e) r[n] = e[n]; + if (t) for (var n in t) r[n] = t[n]; + return r; + } + function s(e) { + var t = []; + return ( + (function n(e, a) { + for (var i = e.firstChild; i; i = i.nextSibling) + 3 == i.nodeType + ? (a += i.nodeValue.length) + : 1 == i.nodeType && + (t.push({ event: 'start', offset: a, node: i }), + (a = n(i, a)), + r(i).match(/br|hr|img|input/) || + t.push({ event: 'stop', offset: a, node: i })); + return a; + })(e, 0), + t + ); + } + function c(e, n, a) { + function i() { + return e.length && n.length + ? e[0].offset != n[0].offset + ? e[0].offset < n[0].offset + ? e + : n + : 'start' == n[0].event + ? e + : n + : e.length + ? e + : n; + } + function s(e) { + function n(e) { + return ' ' + e.nodeName + '="' + t(e.value) + '"'; + } + u += + '<' + r(e) + Array.prototype.map.call(e.attributes, n).join('') + '>'; + } + function c(e) { + u += '</' + r(e) + '>'; + } + function o(e) { + ('start' == e.event ? s : c)(e.node); + } + for (var l = 0, u = '', d = []; e.length || n.length; ) { + var b = i(); + if (((u += t(a.substr(l, b[0].offset - l))), (l = b[0].offset), b == e)) { + d.reverse().forEach(c); + do o(b.splice(0, 1)[0]), (b = i()); + while (b == e && b.length && b[0].offset == l); + d.reverse().forEach(s); + } else + 'start' == b[0].event ? d.push(b[0].node) : d.pop(), + o(b.splice(0, 1)[0]); + } + return u + t(a.substr(l)); + } + function o(e) { + function t(e) { + return (e && e.source) || e; + } + function r(r, n) { + return RegExp(t(r), 'm' + (e.cI ? 'i' : '') + (n ? 'g' : '')); + } + function n(a, s) { + if (!a.compiled) { + if (((a.compiled = !0), (a.k = a.k || a.bK), a.k)) { + var c = {}, + o = function (t, r) { + e.cI && (r = r.toLowerCase()), + r.split(' ').forEach(function (e) { + var r = e.split('|'); + c[r[0]] = [t, r[1] ? Number(r[1]) : 1]; + }); + }; + 'string' == typeof a.k + ? o('keyword', a.k) + : Object.keys(a.k).forEach(function (e) { + o(e, a.k[e]); + }), + (a.k = c); + } + (a.lR = r(a.l || /\b[A-Za-z0-9_]+\b/, !0)), + s && + (a.bK && (a.b = '\\b(' + a.bK.split(' ').join('|') + ')\\b'), + a.b || (a.b = /\B|\b/), + (a.bR = r(a.b)), + a.e || a.eW || (a.e = /\B|\b/), + a.e && (a.eR = r(a.e)), + (a.tE = t(a.e) || ''), + a.eW && s.tE && (a.tE += (a.e ? '|' : '') + s.tE)), + a.i && (a.iR = r(a.i)), + void 0 === a.r && (a.r = 1), + a.c || (a.c = []); + var l = []; + a.c.forEach(function (e) { + e.v + ? e.v.forEach(function (t) { + l.push(i(e, t)); + }) + : l.push('self' == e ? a : e); + }), + (a.c = l), + a.c.forEach(function (e) { + n(e, a); + }), + a.starts && n(a.starts, s); + var u = a.c + .map(function (e) { + return e.bK ? '\\.?(' + e.b + ')\\.?' : e.b; + }) + .concat([a.tE, a.i]) + .map(t) + .filter(Boolean); + a.t = u.length + ? r(u.join('|'), !0) + : { + exec: function () { + return null; + } + }; + } + } + n(e); + } + function l(e, r, a, i) { + function s(e, t) { + for (var r = 0; r < t.c.length; r++) if (n(t.c[r].bR, e)) return t.c[r]; + } + function c(e, t) { + return n(e.eR, t) ? e : e.eW ? c(e.parent, t) : void 0; + } + function d(e, t) { + return !a && n(t.iR, e); + } + function b(e, t) { + var r = y.cI ? t[0].toLowerCase() : t[0]; + return e.k.hasOwnProperty(r) && e.k[r]; + } + function p(e, t, r, n) { + var a = n ? '' : v.classPrefix, + i = '<span class="' + a, + s = r ? '' : '</span>'; + return (i += e + '">'), i + t + s; + } + function f() { + if (!k.k) return t(S); + var e = '', + r = 0; + k.lR.lastIndex = 0; + for (var n = k.lR.exec(S); n; ) { + e += t(S.substr(r, n.index - r)); + var a = b(k, n); + a ? ((E += a[1]), (e += p(a[0], t(n[0])))) : (e += t(n[0])), + (r = k.lR.lastIndex), + (n = k.lR.exec(S)); + } + return e + t(S.substr(r)); + } + function m() { + if (k.sL && !w[k.sL]) return t(S); + var e = k.sL ? l(k.sL, S, !0, x[k.sL]) : u(S); + return ( + k.r > 0 && (E += e.r), + 'continuous' == k.subLanguageMode && (x[k.sL] = e.top), + p(e.language, e.value, !1, !0) + ); + } + function g() { + return void 0 !== k.sL ? m() : f(); + } + function _(e, r) { + var n = e.cN ? p(e.cN, '', !0) : ''; + e.rB + ? ((M += n), (S = '')) + : e.eB + ? ((M += t(r) + n), (S = '')) + : ((M += n), (S = r)), + (k = Object.create(e, { parent: { value: k } })); + } + function h(e, r) { + if (((S += e), void 0 === r)) return (M += g()), 0; + var n = s(r, k); + if (n) return (M += g()), _(n, r), n.rB ? 0 : r.length; + var a = c(k, r); + if (a) { + var i = k; + i.rE || i.eE || (S += r), (M += g()); + do k.cN && (M += '</span>'), (E += k.r), (k = k.parent); + while (k != a.parent); + return ( + i.eE && (M += t(r)), + (S = ''), + a.starts && _(a.starts, ''), + i.rE ? 0 : r.length + ); + } + if (d(r, k)) + throw new Error( + 'Illegal lexeme "' + r + '" for mode "' + (k.cN || '<unnamed>') + '"' + ); + return (S += r), r.length || 1; + } + var y = N(e); + if (!y) throw new Error('Unknown language: "' + e + '"'); + o(y); + for (var k = i || y, x = {}, M = '', C = k; C != y; C = C.parent) + C.cN && (M = p(C.cN, '', !0) + M); + var S = '', + E = 0; + try { + for (var B, I, L = 0; ; ) { + if (((k.t.lastIndex = L), (B = k.t.exec(r)), !B)) break; + (I = h(r.substr(L, B.index - L), B[0])), (L = B.index + I); + } + h(r.substr(L)); + for (var C = k; C.parent; C = C.parent) C.cN && (M += '</span>'); + return { r: E, value: M, language: e, top: k }; + } catch (R) { + if (-1 != R.message.indexOf('Illegal')) return { r: 0, value: t(r) }; + throw R; + } + } + function u(e, r) { + r = r || v.languages || Object.keys(w); + var n = { r: 0, value: t(e) }, + a = n; + return ( + r.forEach(function (t) { + if (N(t)) { + var r = l(t, e, !1); + (r.language = t), + r.r > a.r && (a = r), + r.r > n.r && ((a = n), (n = r)); + } + }), + a.language && (n.second_best = a), + n + ); + } + function d(e) { + return ( + v.tabReplace && + (e = e.replace(/^((<[^>]+>|\t)+)/gm, function (e, t) { + return t.replace(/\t/g, v.tabReplace); + })), + v.useBR && (e = e.replace(/\n/g, '<br>')), + e + ); + } + function b(e, t, r) { + var n = t ? y[t] : r, + a = [e.trim()]; + return ( + e.match(/(\s|^)hljs(\s|$)/) || a.push('hljs'), + n && a.push(n), + a.join(' ').trim() + ); + } + function p(e) { + var t = a(e); + if (!/no(-?)highlight/.test(t)) { + var r; + v.useBR + ? ((r = document.createElementNS( + 'http://www.w3.org/1999/xhtml', + 'div' + )), + (r.innerHTML = e.innerHTML + .replace(/\n/g, '') + .replace(/<br[ \/]*>/g, '\n'))) + : (r = e); + var n = r.textContent, + i = t ? l(t, n, !0) : u(n), + o = s(r); + if (o.length) { + var p = document.createElementNS('http://www.w3.org/1999/xhtml', 'div'); + (p.innerHTML = i.value), (i.value = c(o, s(p), n)); + } + (i.value = d(i.value)), + (e.innerHTML = i.value), + (e.className = b(e.className, t, i.language)), + (e.result = { language: i.language, re: i.r }), + i.second_best && + (e.second_best = { + language: i.second_best.language, + re: i.second_best.r + }); + } + } + function f(e) { + v = i(v, e); + } + function m() { + if (!m.called) { + m.called = !0; + var e = document.querySelectorAll('pre code'); + Array.prototype.forEach.call(e, p); + } + } + function g() { + addEventListener('DOMContentLoaded', m, !1), + addEventListener('load', m, !1); + } + function _(t, r) { + var n = (w[t] = r(e)); + n.aliases && + n.aliases.forEach(function (e) { + y[e] = t; + }); + } + function h() { + return Object.keys(w); + } + function N(e) { + return w[e] || w[y[e]]; + } + var v = { + classPrefix: 'hljs-', + tabReplace: null, + useBR: !1, + languages: void 0 + }, + w = {}, + y = {}; + return ( + (e.highlight = l), + (e.highlightAuto = u), + (e.fixMarkup = d), + (e.highlightBlock = p), + (e.configure = f), + (e.initHighlighting = m), + (e.initHighlightingOnLoad = g), + (e.registerLanguage = _), + (e.listLanguages = h), + (e.getLanguage = N), + (e.inherit = i), + (e.IR = '[a-zA-Z][a-zA-Z0-9_]*'), + (e.UIR = '[a-zA-Z_][a-zA-Z0-9_]*'), + (e.NR = '\\b\\d+(\\.\\d+)?'), + (e.CNR = + '(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'), + (e.BNR = '\\b(0b[01]+)'), + (e.RSR = + '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~'), + (e.BE = { b: '\\\\[\\s\\S]', r: 0 }), + (e.ASM = { cN: 'string', b: "'", e: "'", i: '\\n', c: [e.BE] }), + (e.QSM = { cN: 'string', b: '"', e: '"', i: '\\n', c: [e.BE] }), + (e.PWM = { + b: /\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/ + }), + (e.CLCM = { cN: 'comment', b: '//', e: '$', c: [e.PWM] }), + (e.CBCM = { cN: 'comment', b: '/\\*', e: '\\*/', c: [e.PWM] }), + (e.HCM = { cN: 'comment', b: '#', e: '$', c: [e.PWM] }), + (e.NM = { cN: 'number', b: e.NR, r: 0 }), + (e.CNM = { cN: 'number', b: e.CNR, r: 0 }), + (e.BNM = { cN: 'number', b: e.BNR, r: 0 }), + (e.CSSNM = { + cN: 'number', + b: + e.NR + + '(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?', + r: 0 + }), + (e.RM = { + cN: 'regexp', + b: /\//, + e: /\/[gimuy]*/, + i: /\n/, + c: [e.BE, { b: /\[/, e: /\]/, r: 0, c: [e.BE] }] + }), + (e.TM = { cN: 'title', b: e.IR, r: 0 }), + (e.UTM = { cN: 'title', b: e.UIR, r: 0 }), + e + ); +}), + hljs.registerLanguage('apache', function (e) { + var t = { cN: 'number', b: '[\\$%]\\d+' }; + return { + aliases: ['apacheconf'], + cI: !0, + c: [ + e.HCM, + { cN: 'tag', b: '</?', e: '>' }, + { + cN: 'keyword', + b: /\w+/, + r: 0, + k: { + common: + 'order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername' + }, + starts: { + e: /$/, + r: 0, + k: { literal: 'on off all' }, + c: [ + { cN: 'sqbracket', b: '\\s\\[', e: '\\]$' }, + { cN: 'cbracket', b: '[\\$%]\\{', e: '\\}', c: ['self', t] }, + t, + e.QSM + ] + } + } + ], + i: /\S/ + }; + }), + hljs.registerLanguage('bash', function (e) { + var t = { + cN: 'variable', + v: [{ b: /\$[\w\d#@][\w\d_]*/ }, { b: /\$\{(.*?)\}/ }] + }, + r = { + cN: 'string', + b: /"/, + e: /"/, + c: [e.BE, t, { cN: 'variable', b: /\$\(/, e: /\)/, c: [e.BE] }] + }, + n = { cN: 'string', b: /'/, e: /'/ }; + return { + aliases: ['sh', 'zsh'], + l: /-?[a-z\.]+/, + k: { + keyword: 'if then else elif fi for while in do done case esac function', + literal: 'true false', + built_in: + 'break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp', + operator: '-ne -eq -lt -gt -f -d -e -s -l -a' + }, + c: [ + { cN: 'shebang', b: /^#![^\n]+sh\s*$/, r: 10 }, + { + cN: 'function', + b: /\w[\w\d_]*\s*\(\s*\)\s*\{/, + rB: !0, + c: [e.inherit(e.TM, { b: /\w[\w\d_]*/ })], + r: 0 + }, + e.HCM, + e.NM, + r, + n, + t + ] + }; + }), + hljs.registerLanguage('coffeescript', function (e) { + var t = { + keyword: + 'in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not', + literal: 'true false null undefined yes no on off', + reserved: + 'case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf', + built_in: 'npm require console print module global window document' + }, + r = '[A-Za-z$_][0-9A-Za-z$_]*', + n = { cN: 'subst', b: /#\{/, e: /}/, k: t }, + a = [ + e.BNM, + e.inherit(e.CNM, { starts: { e: '(\\s*/)?', r: 0 } }), + { + cN: 'string', + v: [ + { b: /'''/, e: /'''/, c: [e.BE] }, + { b: /'/, e: /'/, c: [e.BE] }, + { b: /"""/, e: /"""/, c: [e.BE, n] }, + { b: /"/, e: /"/, c: [e.BE, n] } + ] + }, + { + cN: 'regexp', + v: [ + { b: '///', e: '///', c: [n, e.HCM] }, + { b: '//[gim]*', r: 0 }, + { b: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/ } + ] + }, + { cN: 'property', b: '@' + r }, + { b: '`', e: '`', eB: !0, eE: !0, sL: 'javascript' } + ]; + n.c = a; + var i = e.inherit(e.TM, { b: r }), + s = '(\\(.*\\))?\\s*\\B[-=]>', + c = { + cN: 'params', + b: '\\([^\\(]', + rB: !0, + c: [{ b: /\(/, e: /\)/, k: t, c: ['self'].concat(a) }] + }; + return { + aliases: ['coffee', 'cson', 'iced'], + k: t, + i: /\/\*/, + c: a.concat([ + { cN: 'comment', b: '###', e: '###', c: [e.PWM] }, + e.HCM, + { + cN: 'function', + b: '^\\s*' + r + '\\s*=\\s*' + s, + e: '[-=]>', + rB: !0, + c: [i, c] + }, + { + b: /[:\(,=]\s*/, + r: 0, + c: [{ cN: 'function', b: s, e: '[-=]>', rB: !0, c: [c] }] + }, + { + cN: 'class', + bK: 'class', + e: '$', + i: /[:="\[\]]/, + c: [{ bK: 'extends', eW: !0, i: /[:="\[\]]/, c: [i] }, i] + }, + { cN: 'attribute', b: r + ':', e: ':', rB: !0, rE: !0, r: 0 } + ]) + }; + }), + hljs.registerLanguage('cpp', function (e) { + var t = { + keyword: + 'false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginaryintmax_t uintmax_t int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_tint_least8_t uint_least8_t int_least16_t uint_least16_t int_least32_t uint_least32_tint_least64_t uint_least64_t int_fast8_t uint_fast8_t int_fast16_t uint_fast16_t int_fast32_tuint_fast32_t int_fast64_t uint_fast64_t intptr_t uintptr_t atomic_bool atomic_char atomic_scharatomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llongatomic_ullong atomic_wchar_t atomic_char16_t atomic_char32_t atomic_intmax_t atomic_uintmax_tatomic_intptr_t atomic_uintptr_t atomic_size_t atomic_ptrdiff_t atomic_int_least8_t atomic_int_least16_tatomic_int_least32_t atomic_int_least64_t atomic_uint_least8_t atomic_uint_least16_t atomic_uint_least32_tatomic_uint_least64_t atomic_int_fast8_t atomic_int_fast16_t atomic_int_fast32_t atomic_int_fast64_tatomic_uint_fast8_t atomic_uint_fast16_t atomic_uint_fast32_t atomic_uint_fast64_t', + built_in: + 'std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf' + }; + return { + aliases: ['c', 'h', 'c++', 'h++'], + k: t, + i: '</', + c: [ + e.CLCM, + e.CBCM, + e.QSM, + { cN: 'string', b: "'\\\\?.", e: "'", i: '.' }, + { cN: 'number', b: '\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)' }, + e.CNM, + { + cN: 'preprocessor', + b: '#', + e: '$', + k: 'if else elif endif define undef warning error line pragma', + c: [ + { b: 'include\\s*[<"]', e: '[>"]', k: 'include', i: '\\n' }, + e.CLCM + ] + }, + { + cN: 'stl_container', + b: '\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', + e: '>', + k: t, + c: ['self'] + }, + { b: e.IR + '::' }, + { bK: 'new throw return', r: 0 }, + { + cN: 'function', + b: '(' + e.IR + '\\s+)+' + e.IR + '\\s*\\(', + rB: !0, + e: /[{;=]/, + eE: !0, + k: t, + c: [ + { b: e.IR + '\\s*\\(', rB: !0, c: [e.TM], r: 0 }, + { cN: 'params', b: /\(/, e: /\)/, k: t, r: 0, c: [e.CBCM] }, + e.CLCM, + e.CBCM + ] + } + ] + }; + }), + hljs.registerLanguage('cs', function (e) { + var t = + 'abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield', + r = e.IR + '(<' + e.IR + '>)?'; + return { + aliases: ['csharp'], + k: t, + i: /::/, + c: [ + { + cN: 'comment', + b: '///', + e: '$', + rB: !0, + c: [ + { + cN: 'xmlDocTag', + v: [{ b: '///', r: 0 }, { b: '<!--|-->' }, { b: '</?', e: '>' }] + } + ] + }, + e.CLCM, + e.CBCM, + { + cN: 'preprocessor', + b: '#', + e: '$', + k: 'if else elif endif define undef warning error line region endregion pragma checksum' + }, + { cN: 'string', b: '@"', e: '"', c: [{ b: '""' }] }, + e.ASM, + e.QSM, + e.CNM, + { + bK: 'class namespace interface', + e: /[{;=]/, + i: /[^\s:]/, + c: [e.TM, e.CLCM, e.CBCM] + }, + { bK: 'new return throw await', r: 0 }, + { + cN: 'function', + b: '(' + r + '\\s+)+' + e.IR + '\\s*\\(', + rB: !0, + e: /[{;=]/, + eE: !0, + k: t, + c: [ + { b: e.IR + '\\s*\\(', rB: !0, c: [e.TM], r: 0 }, + { + cN: 'params', + b: /\(/, + e: /\)/, + k: t, + r: 0, + c: [e.ASM, e.QSM, e.CNM, e.CBCM] + }, + e.CLCM, + e.CBCM + ] + } + ] + }; + }), + hljs.registerLanguage('css', function (e) { + var t = '[a-zA-Z-][a-zA-Z0-9_-]*', + r = { cN: 'function', b: t + '\\(', rB: !0, eE: !0, e: '\\(' }; + return { + cI: !0, + i: "[=/|']", + c: [ + e.CBCM, + { cN: 'id', b: '\\#[A-Za-z0-9_-]+' }, + { cN: 'class', b: '\\.[A-Za-z0-9_-]+', r: 0 }, + { cN: 'attr_selector', b: '\\[', e: '\\]', i: '$' }, + { cN: 'pseudo', b: ':(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\"\\\']+' }, + { + cN: 'at_rule', + b: '@(font-face|page)', + l: '[a-z-]+', + k: 'font-face page' + }, + { + cN: 'at_rule', + b: '@', + e: '[{;]', + c: [ + { cN: 'keyword', b: /\S+/ }, + { b: /\s/, eW: !0, eE: !0, r: 0, c: [r, e.ASM, e.QSM, e.CSSNM] } + ] + }, + { cN: 'tag', b: t, r: 0 }, + { + cN: 'rules', + b: '{', + e: '}', + i: '[^\\s]', + r: 0, + c: [ + e.CBCM, + { + cN: 'rule', + b: '[^\\s]', + rB: !0, + e: ';', + eW: !0, + c: [ + { + cN: 'attribute', + b: '[A-Z\\_\\.\\-]+', + e: ':', + eE: !0, + i: '[^\\s]', + starts: { + cN: 'value', + eW: !0, + eE: !0, + c: [ + r, + e.CSSNM, + e.QSM, + e.ASM, + e.CBCM, + { cN: 'hexcolor', b: '#[0-9A-Fa-f]+' }, + { cN: 'important', b: '!important' } + ] + } + } + ] + } + ] + } + ] + }; + }), + hljs.registerLanguage('diff', function () { + return { + aliases: ['patch'], + c: [ + { + cN: 'chunk', + r: 10, + v: [ + { b: /^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/ }, + { b: /^\*\*\* +\d+,\d+ +\*\*\*\*$/ }, + { b: /^\-\-\- +\d+,\d+ +\-\-\-\-$/ } + ] + }, + { + cN: 'header', + v: [ + { b: /Index: /, e: /$/ }, + { b: /=====/, e: /=====$/ }, + { b: /^\-\-\-/, e: /$/ }, + { b: /^\*{3} /, e: /$/ }, + { b: /^\+\+\+/, e: /$/ }, + { b: /\*{5}/, e: /\*{5}$/ } + ] + }, + { cN: 'addition', b: '^\\+', e: '$' }, + { cN: 'deletion', b: '^\\-', e: '$' }, + { cN: 'change', b: '^\\!', e: '$' } + ] + }; + }), + hljs.registerLanguage('http', function () { + return { + i: '\\S', + c: [ + { + cN: 'status', + b: '^HTTP/[0-9\\.]+', + e: '$', + c: [{ cN: 'number', b: '\\b\\d{3}\\b' }] + }, + { + cN: 'request', + b: '^[A-Z]+ (.*?) HTTP/[0-9\\.]+$', + rB: !0, + e: '$', + c: [{ cN: 'string', b: ' ', e: ' ', eB: !0, eE: !0 }] + }, + { + cN: 'attribute', + b: '^\\w', + e: ': ', + eE: !0, + i: '\\n|\\s|=', + starts: { cN: 'string', e: '$' } + }, + { b: '\\n\\n', starts: { sL: '', eW: !0 } } + ] + }; + }), + hljs.registerLanguage('ini', function (e) { + return { + cI: !0, + i: /\S/, + c: [ + { cN: 'comment', b: ';', e: '$' }, + { cN: 'title', b: '^\\[', e: '\\]' }, + { + cN: 'setting', + b: '^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*', + e: '$', + c: [ + { + cN: 'value', + eW: !0, + k: 'on off true false yes no', + c: [e.QSM, e.NM], + r: 0 + } + ] + } + ] + }; + }), + hljs.registerLanguage('java', function (e) { + var t = e.UIR + '(<' + e.UIR + '>)?', + r = + 'false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private', + n = + '(\\b(0b[01_]+)|\\b0[xX][a-fA-F0-9_]+|(\\b[\\d_]+(\\.[\\d_]*)?|\\.[\\d_]+)([eE][-+]?\\d+)?)[lLfF]?', + a = { cN: 'number', b: n, r: 0 }; + return { + aliases: ['jsp'], + k: r, + i: /<\//, + c: [ + { + cN: 'javadoc', + b: '/\\*\\*', + e: '\\*/', + r: 0, + c: [{ cN: 'javadoctag', b: '(^|\\s)@[A-Za-z]+' }] + }, + e.CLCM, + e.CBCM, + e.ASM, + e.QSM, + { + cN: 'class', + bK: 'class interface', + e: /[{;=]/, + eE: !0, + k: 'class interface', + i: /[:"\[\]]/, + c: [{ bK: 'extends implements' }, e.UTM] + }, + { bK: 'new throw return', r: 0 }, + { + cN: 'function', + b: '(' + t + '\\s+)+' + e.UIR + '\\s*\\(', + rB: !0, + e: /[{;=]/, + eE: !0, + k: r, + c: [ + { b: e.UIR + '\\s*\\(', rB: !0, r: 0, c: [e.UTM] }, + { + cN: 'params', + b: /\(/, + e: /\)/, + k: r, + r: 0, + c: [e.ASM, e.QSM, e.CNM, e.CBCM] + }, + e.CLCM, + e.CBCM + ] + }, + a, + { cN: 'annotation', b: '@[A-Za-z]+' } + ] + }; + }), + hljs.registerLanguage('javascript', function (e) { + return { + aliases: ['js'], + k: { + keyword: + 'in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class', + literal: 'true false null undefined NaN Infinity', + built_in: + 'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document' + }, + c: [ + { + cN: 'pi', + r: 10, + v: [{ b: /^\s*('|")use strict('|")/ }, { b: /^\s*('|")use asm('|")/ }] + }, + e.ASM, + e.QSM, + e.CLCM, + e.CBCM, + e.CNM, + { + b: '(' + e.RSR + '|\\b(case|return|throw)\\b)\\s*', + k: 'return throw case', + c: [e.CLCM, e.CBCM, e.RM, { b: /</, e: />;/, r: 0, sL: 'xml' }], + r: 0 + }, + { + cN: 'function', + bK: 'function', + e: /\{/, + eE: !0, + c: [ + e.inherit(e.TM, { b: /[A-Za-z$_][0-9A-Za-z$_]*/ }), + { cN: 'params', b: /\(/, e: /\)/, c: [e.CLCM, e.CBCM], i: /["'\(]/ } + ], + i: /\[|%/ + }, + { b: /\$[(.]/ }, + { b: '\\.' + e.IR, r: 0 } + ] + }; + }), + hljs.registerLanguage('json', function (e) { + var t = { literal: 'true false null' }, + r = [e.QSM, e.CNM], + n = { cN: 'value', e: ',', eW: !0, eE: !0, c: r, k: t }, + a = { + b: '{', + e: '}', + c: [ + { + cN: 'attribute', + b: '\\s*"', + e: '"\\s*:\\s*', + eB: !0, + eE: !0, + c: [e.BE], + i: '\\n', + starts: n + } + ], + i: '\\S' + }, + i = { b: '\\[', e: '\\]', c: [e.inherit(n, { cN: null })], i: '\\S' }; + return r.splice(r.length, 0, a, i), { c: r, k: t, i: '\\S' }; + }), + hljs.registerLanguage('makefile', function (e) { + var t = { cN: 'variable', b: /\$\(/, e: /\)/, c: [e.BE] }; + return { + aliases: ['mk', 'mak'], + c: [ + e.HCM, + { + b: /^\w+\s*\W*=/, + rB: !0, + r: 0, + starts: { + cN: 'constant', + e: /\s*\W*=/, + eE: !0, + starts: { e: /$/, r: 0, c: [t] } + } + }, + { cN: 'title', b: /^[\w]+:\s*$/ }, + { cN: 'phony', b: /^\.PHONY:/, e: /$/, k: '.PHONY', l: /[\.\w]+/ }, + { b: /^\t+/, e: /$/, r: 0, c: [e.QSM, t] } + ] + }; + }), + hljs.registerLanguage('xml', function () { + var e = '[A-Za-z0-9\\._:-]+', + t = { + b: /<\?(php)?(?!\w)/, + e: /\?>/, + sL: 'php', + subLanguageMode: 'continuous' + }, + r = { + eW: !0, + i: /</, + r: 0, + c: [ + t, + { cN: 'attribute', b: e, r: 0 }, + { + b: '=', + r: 0, + c: [ + { + cN: 'value', + c: [t], + v: [{ b: /"/, e: /"/ }, { b: /'/, e: /'/ }, { b: /[^\s\/>]+/ }] + } + ] + } + ] + }; + return { + aliases: ['html', 'xhtml', 'rss', 'atom', 'xsl', 'plist'], + cI: !0, + c: [ + { + cN: 'doctype', + b: '<!DOCTYPE', + e: '>', + r: 10, + c: [{ b: '\\[', e: '\\]' }] + }, + { cN: 'comment', b: '<!--', e: '-->', r: 10 }, + { cN: 'cdata', b: '<\\!\\[CDATA\\[', e: '\\]\\]>', r: 10 }, + { + cN: 'tag', + b: '<style(?=\\s|>|$)', + e: '>', + k: { title: 'style' }, + c: [r], + starts: { e: '</style>', rE: !0, sL: 'css' } + }, + { + cN: 'tag', + b: '<script(?=\\s|>|$)', + e: '>', + k: { title: 'script' }, + c: [r], + starts: { e: '</script>', rE: !0, sL: 'javascript' } + }, + t, + { cN: 'pi', b: /<\?\w+/, e: /\?>/, r: 10 }, + { + cN: 'tag', + b: '</?', + e: '/?>', + c: [{ cN: 'title', b: /[^ \/><\n\t]+/, r: 0 }, r] + } + ] + }; + }), + hljs.registerLanguage('markdown', function () { + return { + aliases: ['md', 'mkdown', 'mkd'], + c: [ + { + cN: 'header', + v: [{ b: '^#{1,6}', e: '$' }, { b: '^.+?\\n[=-]{2,}$' }] + }, + { b: '<', e: '>', sL: 'xml', r: 0 }, + { cN: 'bullet', b: '^([*+-]|(\\d+\\.))\\s+' }, + { cN: 'strong', b: '[*_]{2}.+?[*_]{2}' }, + { cN: 'emphasis', v: [{ b: '\\*.+?\\*' }, { b: '_.+?_', r: 0 }] }, + { cN: 'blockquote', b: '^>\\s+', e: '$' }, + { cN: 'code', v: [{ b: '`.+?`' }, { b: '^( {4}| )', e: '$', r: 0 }] }, + { cN: 'horizontal_rule', b: '^[-\\*]{3,}', e: '$' }, + { + b: '\\[.+?\\][\\(\\[].*?[\\)\\]]', + rB: !0, + c: [ + { cN: 'link_label', b: '\\[', e: '\\]', eB: !0, rE: !0, r: 0 }, + { cN: 'link_url', b: '\\]\\(', e: '\\)', eB: !0, eE: !0 }, + { cN: 'link_reference', b: '\\]\\[', e: '\\]', eB: !0, eE: !0 } + ], + r: 10 + }, + { + b: '^\\[.+\\]:', + rB: !0, + c: [ + { + cN: 'link_reference', + b: '\\[', + e: '\\]:', + eB: !0, + eE: !0, + starts: { cN: 'link_url', e: '$' } + } + ] + } + ] + }; + }), + hljs.registerLanguage('nginx', function (e) { + var t = { + cN: 'variable', + v: [{ b: /\$\d+/ }, { b: /\$\{/, e: /}/ }, { b: '[\\$\\@]' + e.UIR }] + }, + r = { + eW: !0, + l: '[a-z/_]+', + k: { + built_in: + 'on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll' + }, + r: 0, + i: '=>', + c: [ + e.HCM, + { + cN: 'string', + c: [e.BE, t], + v: [ + { b: /"/, e: /"/ }, + { b: /'/, e: /'/ } + ] + }, + { cN: 'url', b: '([a-z]+):/', e: '\\s', eW: !0, eE: !0, c: [t] }, + { + cN: 'regexp', + c: [e.BE, t], + v: [ + { b: '\\s\\^', e: '\\s|{|;', rE: !0 }, + { b: '~\\*?\\s+', e: '\\s|{|;', rE: !0 }, + { b: '\\*(\\.[a-z\\-]+)+' }, + { b: '([a-z\\-]+\\.)+\\*' } + ] + }, + { + cN: 'number', + b: '\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b' + }, + { cN: 'number', b: '\\b\\d+[kKmMgGdshdwy]*\\b', r: 0 }, + t + ] + }; + return { + aliases: ['nginxconf'], + c: [ + e.HCM, + { + b: e.UIR + '\\s', + e: ';|{', + rB: !0, + c: [{ cN: 'title', b: e.UIR, starts: r }], + r: 0 + } + ], + i: '[^\\s\\}]' + }; + }), + hljs.registerLanguage('objectivec', function (e) { + var t = { + keyword: + 'int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required', + literal: 'false true FALSE TRUE nil YES NO NULL', + built_in: + 'NSString NSData NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView NSView NSViewController NSWindow NSWindowController NSSet NSUUID NSIndexSet UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection NSURLSession NSURLSessionDataTask NSURLSessionDownloadTask NSURLSessionUploadTask NSURLResponseUIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once' + }, + r = /[a-zA-Z@][a-zA-Z0-9_]*/, + n = '@interface @class @protocol @implementation'; + return { + aliases: ['m', 'mm', 'objc', 'obj-c'], + k: t, + l: r, + i: '</', + c: [ + e.CLCM, + e.CBCM, + e.CNM, + e.QSM, + { + cN: 'string', + v: [ + { b: '@"', e: '"', i: '\\n', c: [e.BE] }, + { b: "'", e: "[^\\\\]'", i: "[^\\\\][^']" } + ] + }, + { + cN: 'preprocessor', + b: '#', + e: '$', + c: [ + { + cN: 'title', + v: [ + { b: '"', e: '"' }, + { b: '<', e: '>' } + ] + } + ] + }, + { + cN: 'class', + b: '(' + n.split(' ').join('|') + ')\\b', + e: '({|$)', + eE: !0, + k: n, + l: r, + c: [e.UTM] + }, + { cN: 'variable', b: '\\.' + e.UIR, r: 0 } + ] + }; + }), + hljs.registerLanguage('perl', function (e) { + var t = + 'getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when', + r = { cN: 'subst', b: '[$@]\\{', e: '\\}', k: t }, + n = { b: '->{', e: '}' }, + a = { + cN: 'variable', + v: [ + { b: /\$\d/ }, + { b: /[\$\%\@](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/ }, + { b: /[\$\%\@][^\s\w{]/, r: 0 } + ] + }, + i = { cN: 'comment', b: '^(__END__|__DATA__)', e: '\\n$', r: 5 }, + s = [e.BE, r, a], + c = [ + a, + e.HCM, + i, + { cN: 'comment', b: '^\\=\\w', e: '\\=cut', eW: !0 }, + n, + { + cN: 'string', + c: s, + v: [ + { b: 'q[qwxr]?\\s*\\(', e: '\\)', r: 5 }, + { b: 'q[qwxr]?\\s*\\[', e: '\\]', r: 5 }, + { b: 'q[qwxr]?\\s*\\{', e: '\\}', r: 5 }, + { b: 'q[qwxr]?\\s*\\|', e: '\\|', r: 5 }, + { b: 'q[qwxr]?\\s*\\<', e: '\\>', r: 5 }, + { b: 'qw\\s+q', e: 'q', r: 5 }, + { b: "'", e: "'", c: [e.BE] }, + { b: '"', e: '"' }, + { b: '`', e: '`', c: [e.BE] }, + { b: '{\\w+}', c: [], r: 0 }, + { b: '-?\\w+\\s*\\=\\>', c: [], r: 0 } + ] + }, + { + cN: 'number', + b: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b', + r: 0 + }, + { + b: + '(\\/\\/|' + + e.RSR + + '|\\b(split|return|print|reverse|grep)\\b)\\s*', + k: 'split return print reverse grep', + r: 0, + c: [ + e.HCM, + i, + { + cN: 'regexp', + b: '(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*', + r: 10 + }, + { cN: 'regexp', b: '(m|qr)?/', e: '/[a-z]*', c: [e.BE], r: 0 } + ] + }, + { cN: 'sub', bK: 'sub', e: '(\\s*\\(.*?\\))?[;{]', r: 5 }, + { cN: 'operator', b: '-\\w\\b', r: 0 } + ]; + return (r.c = c), (n.c = c), { aliases: ['pl'], k: t, c: c }; + }), + hljs.registerLanguage('php', function (e) { + var t = { cN: 'variable', b: '\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*' }, + r = { cN: 'preprocessor', b: /<\?(php)?|\?>/ }, + n = { + cN: 'string', + c: [e.BE, r], + v: [ + { b: 'b"', e: '"' }, + { b: "b'", e: "'" }, + e.inherit(e.ASM, { i: null }), + e.inherit(e.QSM, { i: null }) + ] + }, + a = { v: [e.BNM, e.CNM] }; + return { + aliases: ['php3', 'php4', 'php5', 'php6'], + cI: !0, + k: 'and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally', + c: [ + e.CLCM, + e.HCM, + { + cN: 'comment', + b: '/\\*', + e: '\\*/', + c: [{ cN: 'phpdoc', b: '\\s@[A-Za-z]+' }, r] + }, + { + cN: 'comment', + b: '__halt_compiler.+?;', + eW: !0, + k: '__halt_compiler', + l: e.UIR + }, + { cN: 'string', b: '<<<[\'"]?\\w+[\'"]?$', e: '^\\w+;', c: [e.BE] }, + r, + t, + { b: /->+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ }, + { + cN: 'function', + bK: 'function', + e: /[;{]/, + eE: !0, + i: '\\$|\\[|%', + c: [ + e.UTM, + { cN: 'params', b: '\\(', e: '\\)', c: ['self', t, e.CBCM, n, a] } + ] + }, + { + cN: 'class', + bK: 'class interface', + e: '{', + eE: !0, + i: /[:\(\$"]/, + c: [{ bK: 'extends implements' }, e.UTM] + }, + { bK: 'namespace', e: ';', i: /[\.']/, c: [e.UTM] }, + { bK: 'use', e: ';', c: [e.UTM] }, + { b: '=>' }, + n, + a + ] + }; + }), + hljs.registerLanguage('python', function (e) { + var t = { cN: 'prompt', b: /^(>>>|\.\.\.) / }, + r = { + cN: 'string', + c: [e.BE], + v: [ + { b: /(u|b)?r?'''/, e: /'''/, c: [t], r: 10 }, + { b: /(u|b)?r?"""/, e: /"""/, c: [t], r: 10 }, + { b: /(u|r|ur)'/, e: /'/, r: 10 }, + { b: /(u|r|ur)"/, e: /"/, r: 10 }, + { b: /(b|br)'/, e: /'/ }, + { b: /(b|br)"/, e: /"/ }, + e.ASM, + e.QSM + ] + }, + n = { + cN: 'number', + r: 0, + v: [ + { b: e.BNR + '[lLjJ]?' }, + { b: '\\b(0o[0-7]+)[lLjJ]?' }, + { b: e.CNR + '[lLjJ]?' } + ] + }, + a = { cN: 'params', b: /\(/, e: /\)/, c: ['self', t, n, r] }; + return { + aliases: ['py', 'gyp'], + k: { + keyword: + 'and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False', + built_in: 'Ellipsis NotImplemented' + }, + i: /(<\/|->|\?)/, + c: [ + t, + n, + r, + e.HCM, + { + v: [ + { cN: 'function', bK: 'def', r: 10 }, + { cN: 'class', bK: 'class' } + ], + e: /:/, + i: /[${=;\n]/, + c: [e.UTM, a] + }, + { cN: 'decorator', b: /@/, e: /$/ }, + { b: /\b(print|exec)\(/ } + ] + }; + }), + hljs.registerLanguage('ruby', function (e) { + var t = + '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?', + r = + 'and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor', + n = { cN: 'yardoctag', b: '@[A-Za-z]+' }, + a = { cN: 'value', b: '#<', e: '>' }, + i = { + cN: 'comment', + v: [ + { b: '#', e: '$', c: [n] }, + { b: '^\\=begin', e: '^\\=end', c: [n], r: 10 }, + { b: '^__END__', e: '\\n$' } + ] + }, + s = { cN: 'subst', b: '#\\{', e: '}', k: r }, + c = { + cN: 'string', + c: [e.BE, s], + v: [ + { b: /'/, e: /'/ }, + { b: /"/, e: /"/ }, + { b: /`/, e: /`/ }, + { b: '%[qQwWx]?\\(', e: '\\)' }, + { b: '%[qQwWx]?\\[', e: '\\]' }, + { b: '%[qQwWx]?{', e: '}' }, + { b: '%[qQwWx]?<', e: '>' }, + { b: '%[qQwWx]?/', e: '/' }, + { b: '%[qQwWx]?%', e: '%' }, + { b: '%[qQwWx]?-', e: '-' }, + { b: '%[qQwWx]?\\|', e: '\\|' }, + { b: /\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/ } + ] + }, + o = { cN: 'params', b: '\\(', e: '\\)', k: r }, + l = [ + c, + a, + i, + { + cN: 'class', + bK: 'class module', + e: '$|;', + i: /=/, + c: [ + e.inherit(e.TM, { b: '[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?' }), + { + cN: 'inheritance', + b: '<\\s*', + c: [{ cN: 'parent', b: '(' + e.IR + '::)?' + e.IR }] + }, + i + ] + }, + { + cN: 'function', + bK: 'def', + e: ' |$|;', + r: 0, + c: [e.inherit(e.TM, { b: t }), o, i] + }, + { cN: 'constant', b: '(::)?(\\b[A-Z]\\w*(::)?)+', r: 0 }, + { cN: 'symbol', b: e.UIR + '(\\!|\\?)?:', r: 0 }, + { cN: 'symbol', b: ':', c: [c, { b: t }], r: 0 }, + { + cN: 'number', + b: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b', + r: 0 + }, + { cN: 'variable', b: '(\\$\\W)|((\\$|\\@\\@?)(\\w+))' }, + { + b: '(' + e.RSR + ')\\s*', + c: [ + a, + i, + { + cN: 'regexp', + c: [e.BE, s], + i: /\n/, + v: [ + { b: '/', e: '/[a-z]*' }, + { b: '%r{', e: '}[a-z]*' }, + { b: '%r\\(', e: '\\)[a-z]*' }, + { b: '%r!', e: '![a-z]*' }, + { b: '%r\\[', e: '\\][a-z]*' } + ] + } + ], + r: 0 + } + ]; + (s.c = l), (o.c = l); + var u = '[>?]>', + d = '[\\w#]+\\(\\w+\\):\\d+:\\d+>', + b = '(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>', + p = [ + { b: /^\s*=>/, cN: 'status', starts: { e: '$', c: l } }, + { + cN: 'prompt', + b: '^(' + u + '|' + d + '|' + b + ')', + starts: { e: '$', c: l } + } + ]; + return { + aliases: ['rb', 'gemspec', 'podspec', 'thor', 'irb'], + k: r, + c: [i].concat(p).concat(l) + }; + }), + hljs.registerLanguage('sql', function (e) { + var t = { cN: 'comment', b: '--', e: '$' }; + return { + cI: !0, + i: /[<>]/, + c: [ + { + cN: 'operator', + bK: 'begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate savepoint release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup', + e: /;/, + eW: !0, + k: { + keyword: + 'abs absolute acos action add adddate addtime aes_decrypt aes_encrypt after aggregate all allocate alter analyze and any are as asc ascii asin assertion at atan atan2 atn2 authorization authors avg backup before begin benchmark between bin binlog bit_and bit_count bit_length bit_or bit_xor both by cache call cascade cascaded case cast catalog ceil ceiling chain change changed char_length character_length charindex charset check checksum checksum_agg choose close coalesce coercibility collate collation collationproperty column columns columns_updated commit compress concat concat_ws concurrent connect connection connection_id consistent constraint constraints continue contributors conv convert convert_tz corresponding cos cot count count_big crc32 create cross cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime data database databases datalength date_add date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts datetimeoffsetfromparts day dayname dayofmonth dayofweek dayofyear deallocate declare decode default deferrable deferred degrees delayed delete des_decrypt des_encrypt des_key_file desc describe descriptor diagnostics difference disconnect distinct distinctrow div do domain double drop dumpfile each else elt enclosed encode encrypt end end-exec engine engines eomonth errors escape escaped event eventdata events except exception exec execute exists exp explain export_set extended external extract fast fetch field fields find_in_set first first_value floor flush for force foreign format found found_rows from from_base64 from_days from_unixtime full function get get_format get_lock getdate getutcdate global go goto grant grants greatest group group_concat grouping grouping_id gtid_subset gtid_subtract handler having help hex high_priority hosts hour ident_current ident_incr ident_seed identified identity if ifnull ignore iif ilike immediate in index indicator inet6_aton inet6_ntoa inet_aton inet_ntoa infile initially inner innodb input insert install instr intersect into is is_free_lock is_ipv4 is_ipv4_compat is_ipv4_mapped is_not is_not_null is_used_lock isdate isnull isolation join key kill language last last_day last_insert_id last_value lcase lead leading least leaves left len lenght level like limit lines ln load load_file local localtime localtimestamp locate lock log log10 log2 logfile logs low_priority lower lpad ltrim make_set makedate maketime master master_pos_wait match matched max md5 medium merge microsecond mid min minute mod mode module month monthname mutex name_const names national natural nchar next no no_write_to_binlog not now nullif nvarchar oct octet_length of old_password on only open optimize option optionally or ord order outer outfile output pad parse partial partition password patindex percent_rank percentile_cont percentile_disc period_add period_diff pi plugin position pow power pragma precision prepare preserve primary prior privileges procedure procedure_analyze processlist profile profiles public publishingservername purge quarter query quick quote quotename radians rand read references regexp relative relaylog release release_lock rename repair repeat replace replicate reset restore restrict return returns reverse revoke right rlike rollback rollup round row row_count rows rpad rtrim savepoint schema scroll sec_to_time second section select serializable server session session_user set sha sha1 sha2 share show sign sin size slave sleep smalldatetimefromparts snapshot some soname soundex sounds_like space sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sql_variant_property sqlstate sqrt square start starting status std stddev stddev_pop stddev_samp stdev stdevp stop str str_to_date straight_join strcmp string stuff subdate substr substring subtime subtring_index sum switchoffset sysdate sysdatetime sysdatetimeoffset system_user sysutcdatetime table tables tablespace tan temporary terminated tertiary_weights then time time_format time_to_sec timediff timefromparts timestamp timestampadd timestampdiff timezone_hour timezone_minute to to_base64 to_days to_seconds todatetimeoffset trailing transaction translation trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse ucase uncompress uncompressed_length unhex unicode uninstall union unique unix_timestamp unknown unlock update upgrade upped upper usage use user user_resources using utc_date utc_time utc_timestamp uuid uuid_short validate_password_strength value values var var_pop var_samp variables variance varp version view warnings week weekday weekofyear weight_string when whenever where with work write xml xor year yearweek zon', + literal: 'true false null', + built_in: + 'array bigint binary bit blob boolean char character date dec decimal float int integer interval number numeric real serial smallint varchar varying int8 serial8 text' + }, + c: [ + { cN: 'string', b: "'", e: "'", c: [e.BE, { b: "''" }] }, + { cN: 'string', b: '"', e: '"', c: [e.BE, { b: '""' }] }, + { cN: 'string', b: '`', e: '`', c: [e.BE] }, + e.CNM, + e.CBCM, + t + ] + }, + e.CBCM, + t + ] + }; + }); diff --git a/docs/src/js/thirdparty/moment.min.js b/docs/src/js/thirdparty/moment.min.js index 57cd2d4f..81476d43 100644 --- a/docs/src/js/thirdparty/moment.min.js +++ b/docs/src/js/thirdparty/moment.min.js @@ -1,2 +1,3347 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function f(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(m(e,t))return;return 1}function r(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){for(var n=[],s=0;s<e.length;++s)n.push(t(e[s],s));return n}function c(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function _(e,t,n,s){return xt(e,t,n,s,!0).utc()}function y(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=y(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function w(e){var t=_(NaN);return null!=e?c(y(t),e):y(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var p=f.momentProperties=[],t=!1;function v(e,t){var n,s,i;if(r(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),r(t._i)||(e._i=t._i),r(t._f)||(e._f=t._f),r(t._l)||(e._l=t._l),r(t._strict)||(e._strict=t._strict),r(t._tzm)||(e._tzm=t._tzm),r(t._isUTC)||(e._isUTC=t._isUTC),r(t._offset)||(e._offset=t._offset),r(t._pf)||(e._pf=y(t)),r(t._locale)||(e._locale=t._locale),0<p.length)for(n=0;n<p.length;n++)r(i=t[s=p[n]])||(e[s]=i);return e}function k(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,f.updateOffset(this),t=!1)}function M(e){return e instanceof k||null!=e&&null!=e._isAMomentObject}function D(e){!1===f.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return c(function(){if(null!=f.deprecationHandler&&f.deprecationHandler(null,i),a){for(var e,t,n=[],s=0;s<arguments.length;s++){if(e="","object"==typeof arguments[s]){for(t in e+="\n["+s+"] ",arguments[0])m(arguments[0],t)&&(e+=t+": "+arguments[0][t]+", ");e=e.slice(0,-2)}else e=arguments[s];n.push(e)}D(i+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,S={};function Y(e,t){null!=f.deprecationHandler&&f.deprecationHandler(e,t),S[e]||(D(t),S[e]=!0)}function O(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,s=c({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},c(s[n],e[n]),c(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=c({},s[n]));return s}function x(e){null!=e&&this.set(e)}f.suppressDeprecationWarnings=!1,f.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};function T(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,R={},W={};function C(e,t,n,s){var i="string"==typeof s?function(){return this[s]()}:s;e&&(W[e]=i),t&&(W[t[0]]=function(){return T(i.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=H(t,e.localeData()),R[t]=R[t]||function(s){for(var e,i=s.match(N),t=0,r=i.length;t<r;t++)W[i[t]]?i[t]=W[i[t]]:i[t]=(e=i[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"");return function(e){for(var t="",n=0;n<r;n++)t+=O(i[n])?i[n].call(e,s):i[n];return t}}(t),R[t](e)):e.localeData().invalidDate()}function H(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(P.lastIndex=0;0<=n&&P.test(e);)e=e.replace(P,s),P.lastIndex=0,--n;return e}var F={};function L(e,t){var n=e.toLowerCase();F[n]=F[n+"s"]=F[t]=e}function V(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function G(e){var t,n,s={};for(n in e)m(e,n)&&(t=V(n))&&(s[t]=e[n]);return s}var E={};function A(e,t){E[e]=t}function j(e){return e%4==0&&e%100!=0||e%400==0}function I(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Z(e){var t=+e,n=0;return 0!=t&&isFinite(t)&&(n=I(t)),n}function z(t,n){return function(e){return null!=e?(q(this,t,e),f.updateOffset(this,n),this):$(this,t)}}function $(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function q(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&j(e.year())&&1===e.month()&&29===e.date()?(n=Z(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),xe(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var B,J=/\d/,Q=/\d\d/,X=/\d{3}/,K=/\d{4}/,ee=/[+-]?\d{6}/,te=/\d\d?/,ne=/\d\d\d\d?/,se=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,re=/\d{1,4}/,ae=/[+-]?\d{1,6}/,oe=/\d+/,ue=/[+-]?\d+/,le=/Z|[+-]\d\d:?\d\d/gi,he=/Z|[+-]\d\d(?::?\d\d)?/gi,de=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function ce(e,n,s){B[e]=O(n)?n:function(e,t){return e&&s?s:n}}function fe(e,t){return m(B,e)?B[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}B={};var _e={};function ye(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),h(n)&&(s=function(e,t){t[n]=Z(e)}),t=0;t<e.length;t++)_e[e[t]]=s}function ge(e,i){ye(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var we,pe=0,ve=1,ke=2,Me=3,De=4,Se=5,Ye=6,Oe=7,be=8;function xe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1==s?j(e)?29:28:31-s%7%2}we=Array.prototype.indexOf?Array.prototype.indexOf:function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},C("M",["MM",2],"Mo",function(){return this.month()+1}),C("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),C("MMMM",0,0,function(e){return this.localeData().months(this,e)}),L("month","M"),A("month",8),ce("M",te),ce("MM",te,Q),ce("MMM",function(e,t){return t.monthsShortRegex(e)}),ce("MMMM",function(e,t){return t.monthsRegex(e)}),ye(["M","MM"],function(e,t){t[ve]=Z(e)-1}),ye(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[ve]=i:y(n).invalidMonth=e});var Te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ne="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Re=de,We=de;function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Z(t);else if(!h(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),xe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ue(e){return null!=e?(Ce(this,e),f.updateOffset(this,!0),this):$(this,"Month")}function He(){function e(e,t){return t.length-e.length}for(var t,n=[],s=[],i=[],r=0;r<12;r++)t=_([2e3,r]),n.push(this.monthsShort(t,"")),s.push(this.months(t,"")),i.push(this.months(t,"")),i.push(this.monthsShort(t,""));for(n.sort(e),s.sort(e),i.sort(e),r=0;r<12;r++)n[r]=me(n[r]),s[r]=me(s[r]);for(r=0;r<24;r++)i[r]=me(i[r]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Fe(e){return j(e)?366:365}C("Y",0,0,function(){var e=this.year();return e<=9999?T(e,4):"+"+e}),C(0,["YY",2],0,function(){return this.year()%100}),C(0,["YYYY",4],0,"year"),C(0,["YYYYY",5],0,"year"),C(0,["YYYYYY",6,!0],0,"year"),L("year","y"),A("year",1),ce("Y",ue),ce("YY",te,Q),ce("YYYY",re,K),ce("YYYYY",ae,ee),ce("YYYYYY",ae,ee),ye(["YYYYY","YYYYYY"],pe),ye("YYYY",function(e,t){t[pe]=2===e.length?f.parseTwoDigitYear(e):Z(e)}),ye("YY",function(e,t){t[pe]=f.parseTwoDigitYear(e)}),ye("Y",function(e,t){t[pe]=parseInt(e,10)}),f.parseTwoDigitYear=function(e){return Z(e)+(68<Z(e)?1900:2e3)};var Le=z("FullYear",!0);function Ve(e){var t,n;return e<100&&0<=e?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ge(e,t,n){var s=7+t-n;return s-(7+Ve(e,0,s).getUTCDay()-t)%7-1}function Ee(e,t,n,s,i){var r,a=1+7*(t-1)+(7+n-s)%7+Ge(e,s,i),o=a<=0?Fe(r=e-1)+a:a>Fe(e)?(r=e+1,a-Fe(e)):(r=e,a);return{year:r,dayOfYear:o}}function Ae(e,t,n){var s,i,r=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+je(i=e.year()-1,t,n):a>je(e.year(),t,n)?(s=a-je(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function je(e,t,n){var s=Ge(e,t,n),i=Ge(e+1,t,n);return(Fe(e)-s+i)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),A("week",5),A("isoWeek",5),ce("w",te),ce("ww",te,Q),ce("W",te),ce("WW",te,Q),ge(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=Z(e)});function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ce("d",te),ce("e",te),ce("E",te),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e}),ge(["d","e","E"],function(e,t,n,s){t[s]=Z(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qe=de,Be=de,Je=de;function Qe(){function e(e,t){return t.length-e.length}for(var t,n,s,i,r=[],a=[],o=[],u=[],l=0;l<7;l++)t=_([2e3,1]).day(l),n=me(this.weekdaysMin(t,"")),s=me(this.weekdaysShort(t,"")),i=me(this.weekdays(t,"")),r.push(n),a.push(s),o.push(i),u.push(n),u.push(s),u.push(i);r.sort(e),a.sort(e),o.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Xe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)}),C("hmmss",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),L("hour","h"),A("hour",13),ce("a",et),ce("A",et),ce("H",te),ce("h",te),ce("k",te),ce("HH",te,Q),ce("hh",te,Q),ce("kk",te,Q),ce("hmm",ne),ce("hmmss",se),ce("Hmm",ne),ce("Hmmss",se),ye(["H","HH"],Me),ye(["k","kk"],function(e,t,n){var s=Z(e);t[Me]=24===s?0:s}),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[Me]=Z(e),y(n).bigHour=!0}),ye("hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s)),y(n).bigHour=!0}),ye("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i)),y(n).bigHour=!0}),ye("Hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s))}),ye("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i))});var tt=z("Hours",!0);var nt,st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Ne,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=at(e[r]).split("-")).length,n=(n=at(e[r+1]))?n.split("-"):null;0<t;){if(s=ut(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return nt}function ut(t){var e;if(void 0===it[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=nt._abbr,require("./locale/"+t),lt(e)}catch(e){it[t]=null}return it[t]}function lt(e,t){var n;return e&&((n=r(t)?dt(e):ht(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function ht(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new x(b(s,t)),rt[e]&&rt[e].forEach(function(e){ht(e.name,e.config)}),lt(e),it[e]}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!o(e)){if(t=ut(e))return t;e=[e]}return ot(e)}function ct(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[ve]<0||11<n[ve]?ve:n[ke]<1||n[ke]>xe(n[pe],n[ve])?ke:n[Me]<0||24<n[Me]||24===n[Me]&&(0!==n[De]||0!==n[Se]||0!==n[Ye])?Me:n[De]<0||59<n[De]?De:n[Se]<0||59<n[Se]?Se:n[Ye]<0||999<n[Ye]?Ye:-1,y(e)._overflowDayOfYear&&(t<pe||ke<t)&&(t=ke),y(e)._overflowWeeks&&-1===t&&(t=Oe),y(e)._overflowWeekday&&-1===t&&(t=be),y(e).overflow=t),e}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],wt=/^\/?Date\((-?\d+)/i,pt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(y(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||" ")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),Ot(e)}else e._isValid=!1}function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Ne.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}function Dt(e){var t,n,s,i,r=pt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(r){if(t=Mt(r[4],r[3],r[2],r[5],r[6],r[7]),n=r[1],s=t,i=e,n&&ze.indexOf(n)!==new Date(s[0],s[1],s[2]).getDay()&&(y(i).weekdayMismatch=!0,!void(i._isValid=!1)))return;e._a=t,e._tzm=function(e,t,n){if(e)return vt[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return 60*((s-i)/100)+i}(r[8],r[9],r[10]),e._d=Ve.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),y(e).rfc2822=!0}else e._isValid=!1}function St(e,t,n){return null!=e?e:null!=t?t:n}function Yt(e){var t,n,s,i,r,a,o,u=[];if(!e._d){for(a=e,o=new Date(f.now()),s=a._useUTC?[o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()]:[o.getFullYear(),o.getMonth(),o.getDate()],e._w&&null==e._a[ke]&&null==e._a[ve]&&function(e){var t,n,s,i,r,a,o,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,a=4,n=St(t.GG,e._a[pe],Ae(Tt(),1,4).year),s=St(t.W,1),((i=St(t.E,1))<1||7<i)&&(u=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,l=Ae(Tt(),r,a),n=St(t.gg,e._a[pe],l.year),s=St(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r);s<1||s>je(n,r,a)?y(e)._overflowWeeks=!0:null!=u?y(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[pe]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=St(e._a[pe],s[pe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=Ve(r,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[ke]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=u[t]=s[t];for(;t<7;t++)e._a[t]=u[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Me]&&0===e._a[De]&&0===e._a[Se]&&0===e._a[Ye]&&(e._nextDay=!0,e._a[Me]=0),e._d=(e._useUTC?Ve:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,u),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Me]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==f.ISO_8601)if(e._f!==f.RFC_2822){e._a=[],y(e).empty=!0;for(var t,n,s,i,r,a,o,u=""+e._i,l=u.length,h=0,d=H(e._f,e._locale).match(N)||[],c=0;c<d.length;c++)n=d[c],(t=(u.match(fe(n,e))||[])[0])&&(0<(s=u.substr(0,u.indexOf(t))).length&&y(e).unusedInput.push(s),u=u.slice(u.indexOf(t)+t.length),h+=t.length),W[n]?(t?y(e).empty=!1:y(e).unusedTokens.push(n),r=n,o=e,null!=(a=t)&&m(_e,r)&&_e[r](a,o._a,o,r)):e._strict&&!t&&y(e).unusedTokens.push(n);y(e).charsLeftOver=l-h,0<u.length&&y(e).unusedInput.push(u),e._a[Me]<=12&&!0===y(e).bigHour&&0<e._a[Me]&&(y(e).bigHour=void 0),y(e).parsedDateParts=e._a.slice(0),y(e).meridiem=e._meridiem,e._a[Me]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[Me],e._meridiem),null!==(i=y(e).era)&&(e._a[pe]=e._locale.erasConvertYear(i,e._a[pe])),Yt(e),ct(e)}else Dt(e);else kt(e)}function bt(e){var t,n,s=e._i,i=e._f;return e._locale=e._locale||dt(e._l),null===s||void 0===i&&""===s?w({nullInput:!0}):("string"==typeof s&&(e._i=s=e._locale.preparse(s)),M(s)?new k(ct(s)):(a(s)?e._d=s:o(i)?function(e){var t,n,s,i,r,a,o=!1;if(0===e._f.length)return y(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,a=!1,t=v({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Ot(t),g(t)&&(a=!0),r+=y(t).charsLeftOver,r+=10*y(t).unusedTokens.length,y(t).score=r,o?r<s&&(s=r,n=t):(null==s||r<s||a)&&(s=r,n=t,a&&(o=!0));c(e,n||t)}(e):i?Ot(e):r(n=(t=e)._i)?t._d=new Date(f.now()):a(n)?t._d=new Date(n.valueOf()):"string"==typeof n?function(e){var t=wt.exec(e._i);null===t?(kt(e),!1===e._isValid&&(delete e._isValid,Dt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:f.createFromInputFallback(e)))):e._d=new Date(+t[1])}(t):o(n)?(t._a=d(n.slice(0),function(e){return parseInt(e,10)}),Yt(t)):u(n)?function(e){var t,n;e._d||(n=void 0===(t=G(e._i)).day?t.date:t.day,e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Yt(e))}(t):h(n)?t._d=new Date(n):f.createFromInputFallback(t),g(e)||(e._d=null),e))}function xt(e,t,n,s,i){var r,a={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&l(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new k(ct(bt(a))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Tt(e,t,n,s){return xt(e,t,n,s,!1)}f.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),f.ISO_8601=function(){},f.RFC_2822=function(){};var Nt=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:w()}),Pt=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:w()});function Rt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ct(e){var t=G(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,h=t.millisecond||0;this._isValid=function(e){var t,n,s=!1;for(t in e)if(m(e,t)&&(-1===we.call(Wt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<Wt.length;++n)if(e[Wt[n]]){if(s)return!1;parseFloat(e[Wt[n]])!==Z(e[Wt[n]])&&(s=!0)}return!0}(t),this._milliseconds=+h+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=dt(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){C(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+T(~~(e/60),2)+n+T(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),ce("Z",he),ce("ZZ",he),ye(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(he,e)});var Lt=/([\+\-]|\d\d)/gi;function Vt(e,t){var n,s,i=(t||"").match(e);return null===i?null:0===(s=60*(n=((i[i.length-1]||[])+"").match(Lt)||["-",0,0])[1]+Z(n[2]))?0:"+"===n[0]?s:-s}function Gt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(M(e)||a(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),f.updateOffset(n,!1),n):Tt(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}f.updateOffset=function(){};var jt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Zt(e,t){var n,s,i,r=e,a=null;return Ut(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:h(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(a=jt.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:Z(a[ke])*n,h:Z(a[Me])*n,m:Z(a[De])*n,s:Z(a[Se])*n,ms:Z(Ht(1e3*a[Ye]))*n}):(a=It.exec(e))?(n="-"===a[1]?-1:1,r={y:zt(a[2],n),M:zt(a[3],n),w:zt(a[4],n),d:zt(a[5],n),h:zt(a[6],n),m:zt(a[7],n),s:zt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=$t(e,t):((n=$t(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ct(r),Ut(e)&&m(e,"_locale")&&(s._locale=e._locale),Ut(e)&&m(e,"_isValid")&&(s._isValid=e._isValid),s}function zt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function $t(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=t-e.clone().add(n.months,"M"),n}function qt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Y(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),Bt(this,Zt(e,t),s),this}}function Bt(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),a=Ht(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,$(e,"Month")+a*n),r&&q(e,"Date",$(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&f.updateOffset(e,r||a))}Zt.fn=Ct.prototype,Zt.invalid=function(){return Zt(NaN)};var Jt=qt(1,"add"),Qt=qt(-1,"subtract");function Xt(e){return"string"==typeof e||e instanceof String}function Kt(e){return M(e)||a(e)||Xt(e)||h(e)||function(t){var e=o(t),n=!1;e&&(n=0===t.filter(function(e){return!h(e)&&Xt(t)}).length);return e&&n}(e)||function(e){var t,n,s=u(e)&&!l(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<r.length;t+=1)n=r[t],i=i||m(e,n);return s&&i}(e)||null==e}function en(e,t){if(e.date()<t.date())return-en(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months"),i=t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(1+n,"months")-s);return-(n+i)||0}function tn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=dt(e))&&(this._locale=t),this)}f.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",f.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var nn=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function sn(){return this._locale}var rn=126227808e5;function an(e,t){return(e%t+t)%t}function on(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-rn:new Date(e,t,n).valueOf()}function un(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-rn:Date.UTC(e,t,n)}function ln(e,t){return t.erasAbbrRegex(e)}function hn(){for(var e=[],t=[],n=[],s=[],i=this.eras(),r=0,a=i.length;r<a;++r)t.push(me(i[r].name)),e.push(me(i[r].abbr)),n.push(me(i[r].narrow)),s.push(me(i[r].name)),s.push(me(i[r].abbr)),s.push(me(i[r].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}function dn(e,t){C(0,[e,e.length],0,t)}function cn(e,t,n,s,i){var r;return null==e?Ae(this,s,i).year:((r=je(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ve(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}C("N",0,0,"eraAbbr"),C("NN",0,0,"eraAbbr"),C("NNN",0,0,"eraAbbr"),C("NNNN",0,0,"eraName"),C("NNNNN",0,0,"eraNarrow"),C("y",["y",1],"yo","eraYear"),C("y",["yy",2],0,"eraYear"),C("y",["yyy",3],0,"eraYear"),C("y",["yyyy",4],0,"eraYear"),ce("N",ln),ce("NN",ln),ce("NNN",ln),ce("NNNN",function(e,t){return t.erasNameRegex(e)}),ce("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),ye(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){var i=n._locale.erasParse(e,s,n._strict);i?y(n).era=i:y(n).invalidEra=e}),ce("y",oe),ce("yy",oe),ce("yyy",oe),ce("yyyy",oe),ce("yo",function(e,t){return t._eraYearOrdinalRegex||oe}),ye(["y","yy","yyy","yyyy"],pe),ye(["yo"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[pe]=n._locale.eraYearOrdinalParse(e,i):t[pe]=parseInt(e,10)}),C(0,["gg",2],0,function(){return this.weekYear()%100}),C(0,["GG",2],0,function(){return this.isoWeekYear()%100}),dn("gggg","weekYear"),dn("ggggg","weekYear"),dn("GGGG","isoWeekYear"),dn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),A("weekYear",1),A("isoWeekYear",1),ce("G",ue),ce("g",ue),ce("GG",te,Q),ce("gg",te,Q),ce("GGGG",re,K),ce("gggg",re,K),ce("GGGGG",ae,ee),ce("ggggg",ae,ee),ge(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=Z(e)}),ge(["gg","GG"],function(e,t,n,s){t[s]=f.parseTwoDigitYear(e)}),C("Q",0,"Qo","quarter"),L("quarter","Q"),A("quarter",7),ce("Q",J),ye("Q",function(e,t){t[ve]=3*(Z(e)-1)}),C("D",["DD",2],"Do","date"),L("date","D"),A("date",9),ce("D",te),ce("DD",te,Q),ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ye(["D","DD"],ke),ye("Do",function(e,t){t[ke]=Z(e.match(te)[0])});var fn=z("Date",!0);C("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),A("dayOfYear",4),ce("DDD",ie),ce("DDDD",X),ye(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Z(e)}),C("m",["mm",2],0,"minute"),L("minute","m"),A("minute",14),ce("m",te),ce("mm",te,Q),ye(["m","mm"],De);var mn=z("Minutes",!1);C("s",["ss",2],0,"second"),L("second","s"),A("second",15),ce("s",te),ce("ss",te,Q),ye(["s","ss"],Se);var _n,yn,gn=z("Seconds",!1);for(C("S",0,0,function(){return~~(this.millisecond()/100)}),C(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),C(0,["SSS",3],0,"millisecond"),C(0,["SSSS",4],0,function(){return 10*this.millisecond()}),C(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),C(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),C(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),C(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),C(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),A("millisecond",16),ce("S",ie,J),ce("SS",ie,Q),ce("SSS",ie,X),_n="SSSS";_n.length<=9;_n+="S")ce(_n,oe);function wn(e,t){t[Ye]=Z(1e3*("0."+e))}for(_n="S";_n.length<=9;_n+="S")ye(_n,wn);yn=z("Milliseconds",!1),C("z",0,0,"zoneAbbr"),C("zz",0,0,"zoneName");var pn=k.prototype;function vn(e){return e}pn.add=Jt,pn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Kt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=u(e)&&!l(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i=0;i<s.length;i+=1)n=n||m(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var n=e||Tt(),s=Gt(n,this).startOf("day"),i=f.calendarFormat(this,s)||"sameElse",r=t&&(O(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},pn.clone=function(){return new k(this)},pn.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=V(t)){case"year":r=en(this,s)/12;break;case"month":r=en(this,s);break;case"quarter":r=en(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:I(r)},pn.endOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?un:on,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-an(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-an(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-an(t,1e3)-1;break}return this._d.setTime(t),f.updateOffset(this,!0),this},pn.format=function(e){e=e||(this.isUtc()?f.defaultFormatUtc:f.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},pn.from=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Tt(e).isValid())?Zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.fromNow=function(e){return this.from(Tt(),e)},pn.to=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Tt(e).isValid())?Zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.toNow=function(e){return this.to(Tt(),e)},pn.get=function(e){return O(this[e=V(e)])?this[e]():this},pn.invalidAt=function(){return y(this).overflow},pn.isAfter=function(e,t){var n=M(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},pn.isBefore=function(e,t){var n=M(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},pn.isBetween=function(e,t,n,s){var i=M(e)?e:Tt(e),r=M(t)?t:Tt(t);return!!(this.isValid()&&i.isValid()&&r.isValid())&&(("("===(s=s||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===s[1]?this.isBefore(r,n):!this.isAfter(r,n)))},pn.isSame=function(e,t){var n,s=M(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},pn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},pn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},pn.isValid=function(){return g(this)},pn.lang=nn,pn.locale=tn,pn.localeData=sn,pn.max=Pt,pn.min=Nt,pn.parsingFlags=function(){return c({},y(this))},pn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t,n=[];for(t in e)m(e,t)&&n.push({unit:t,priority:E[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=G(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(O(this[e=V(e)]))return this[e](t);return this},pn.startOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?un:on,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=an(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=an(t,6e4);break;case"second":t=this._d.valueOf(),t-=an(t,1e3);break}return this._d.setTime(t),f.updateOffset(this,!0),this},pn.subtract=Qt,pn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},pn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},pn.toDate=function(){return new Date(this.valueOf())},pn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},pn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,s="moment",i="";return this.isLocal()||(s=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+s+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(pn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return""},pn.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return""},pn.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf("day").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return""},pn.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf("day").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-f(n[s].since).year())*e+n[s].offset;return this.year()},pn.year=Le,pn.isLeapYear=function(){return j(this.year())},pn.weekYear=function(e){return cn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},pn.isoWeekYear=function(e){return cn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},pn.quarter=pn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},pn.month=Ue,pn.daysInMonth=function(){return xe(this.year(),this.month())},pn.week=pn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},pn.isoWeek=pn.isoWeeks=function(e){var t=Ae(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},pn.weeksInYear=function(){var e=this.localeData()._week;return je(this.year(),e.dow,e.doy)},pn.weeksInWeekYear=function(){var e=this.localeData()._week;return je(this.weekYear(),e.dow,e.doy)},pn.isoWeeksInYear=function(){return je(this.year(),1,4)},pn.isoWeeksInISOWeekYear=function(){return je(this.isoWeekYear(),1,4)},pn.date=fn,pn.day=pn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},pn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},pn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null==e)return this.day()||7;var t,n,s=(t=e,n=this.localeData(),"string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t);return this.day(this.day()%7?s:s-7)},pn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},pn.hour=pn.hours=tt,pn.minute=pn.minutes=mn,pn.second=pn.seconds=gn,pn.millisecond=pn.milliseconds=yn,pn.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if("string"==typeof e){if(null===(e=Vt(he,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?Bt(this,Zt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,f.updateOffset(this,!0),this._changeInProgress=null)),this},pn.utc=function(e){return this.utcOffset(0,e)},pn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Et(this),"m")),this},pn.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Vt(le,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},pn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},pn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=At,pn.isUTC=At,pn.zoneAbbr=function(){return this._isUTC?"UTC":""},pn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},pn.dates=n("dates accessor is deprecated. Use date instead.",fn),pn.months=n("months accessor is deprecated. Use month instead",Ue),pn.years=n("years accessor is deprecated. Use year instead",Le),pn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),pn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=bt(t))._a?(e=(t._isUTC?_:Tt)(t._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&Z(e[a])!==Z(t[a]))&&r++;return r+i}(t._a,e.toArray())):this._isDSTShifted=!1,this._isDSTShifted});var kn=x.prototype;function Mn(e,t,n,s){var i=dt(),r=_().set(s,t);return i[n](r,e)}function Dn(e,t,n){if(h(e)&&(t=e,e=void 0),e=e||"",null!=t)return Mn(e,t,n,"month");for(var s=[],i=0;i<12;i++)s[i]=Mn(e,i,n,"month");return s}function Sn(e,t,n,s){t=("boolean"==typeof e?h(t)&&(n=t,t=void 0):(t=e,e=!1,h(n=t)&&(n=t,t=void 0)),t||"");var i,r=dt(),a=e?r._week.dow:0,o=[];if(null!=n)return Mn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=Mn(t,(i+a)%7,s,"day");return o}kn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return O(s)?s.call(t,n):s},kn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(N).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},kn.invalidDate=function(){return this._invalidDate},kn.ordinal=function(e){return this._ordinal.replace("%d",e)},kn.preparse=vn,kn.postformat=vn,kn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return O(i)?i(e,t,n,s):i.replace(/%d/i,e)},kn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)},kn.set=function(e){var t,n;for(n in e)m(e,n)&&(O(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},kn.eras=function(e,t){for(var n,s=this._eras||dt("en")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case"string":n=f(s[i].since).startOf("day"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=f(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf();break}}return s},kn.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s];break}else if(0<=[r,a,o].indexOf(e))return u[s]},kn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?f(e.since).year():f(e.since).year()+(t-e.offset)*n},kn.erasAbbrRegex=function(e){return m(this,"_erasAbbrRegex")||hn.call(this),e?this._erasAbbrRegex:this._erasRegex},kn.erasNameRegex=function(e){return m(this,"_erasNameRegex")||hn.call(this),e?this._erasNameRegex:this._erasRegex},kn.erasNarrowRegex=function(e){return m(this,"_erasNarrowRegex")||hn.call(this),e?this._erasNarrowRegex:this._erasRegex},kn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pe).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},kn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pe.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},kn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=_([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=we.call(this._shortMonthsParse,a))?i:null:-1!==(i=we.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=we.call(this._shortMonthsParse,a))||-1!==(i=we.call(this._longMonthsParse,a))?i:null:-1!==(i=we.call(this._longMonthsParse,a))||-1!==(i=we.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=_([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},kn.monthsRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||He.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=We),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},kn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||He.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=Re),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},kn.week=function(e){return Ae(e,this._week.dow,this._week.doy).week},kn.firstDayOfYear=function(){return this._week.doy},kn.firstDayOfWeek=function(){return this._week.dow},kn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ie(n,this._week.dow):e?n[e.day()]:n},kn.weekdaysMin=function(e){return!0===e?Ie(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},kn.weekdaysShort=function(e){return!0===e?Ie(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},kn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=_([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=we.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=we.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._shortWeekdaysParse,a))||-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=we.call(this._shortWeekdaysParse,a))||-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._minWeekdaysParse,a))?i:null:-1!==(i=we.call(this._minWeekdaysParse,a))||-1!==(i=we.call(this._weekdaysParse,a))||-1!==(i=we.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=_([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},kn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},kn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Be),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},kn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},kn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},kn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},lt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Z(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),f.lang=n("moment.lang is deprecated. Use moment.locale instead.",lt),f.langData=n("moment.langData is deprecated. Use moment.localeData instead.",dt);var Yn=Math.abs;function On(e,t,n,s){var i=Zt(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function bn(e){return e<0?Math.floor(e):Math.ceil(e)}function xn(e){return 4800*e/146097}function Tn(e){return 146097*e/4800}function Nn(e){return function(){return this.as(e)}}var Pn=Nn("ms"),Rn=Nn("s"),Wn=Nn("m"),Cn=Nn("h"),Un=Nn("d"),Hn=Nn("w"),Fn=Nn("M"),Ln=Nn("Q"),Vn=Nn("y");function Gn(e){return function(){return this.isValid()?this._data[e]:NaN}}var En=Gn("milliseconds"),An=Gn("seconds"),jn=Gn("minutes"),In=Gn("hours"),Zn=Gn("days"),zn=Gn("months"),$n=Gn("years");var qn=Math.round,Bn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Jn(e,t,n,s){var i=Zt(e).abs(),r=qn(i.as("s")),a=qn(i.as("m")),o=qn(i.as("h")),u=qn(i.as("d")),l=qn(i.as("M")),h=qn(i.as("w")),d=qn(i.as("y")),c=(r<=n.ss?["s",r]:r<n.s&&["ss",r])||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(c=c||h<=1&&["w"]||h<n.w&&["ww",h]),(c=c||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,c[3]=0<+e,c[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,c)}var Qn=Math.abs;function Xn(e){return(0<e)-(e<0)||+e}function Kn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,r,a,o,u=Qn(this._milliseconds)/1e3,l=Qn(this._days),h=Qn(this._months),d=this.asSeconds();return d?(e=I(u/60),t=I(e/60),u%=60,e%=60,n=I(h/12),h%=12,s=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",r=Xn(this._months)!==Xn(d)?"-":"",a=Xn(this._days)!==Xn(d)?"-":"",o=Xn(this._milliseconds)!==Xn(d)?"-":"",i+"P"+(n?r+n+"Y":"")+(h?r+h+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+s+"S":"")):"P0D"}var es=Ct.prototype;return es.isValid=function(){return this._isValid},es.abs=function(){var e=this._data;return this._milliseconds=Yn(this._milliseconds),this._days=Yn(this._days),this._months=Yn(this._months),e.milliseconds=Yn(e.milliseconds),e.seconds=Yn(e.seconds),e.minutes=Yn(e.minutes),e.hours=Yn(e.hours),e.months=Yn(e.months),e.years=Yn(e.years),this},es.add=function(e,t){return On(this,e,t,1)},es.subtract=function(e,t){return On(this,e,t,-1)},es.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=V(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+xn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Tn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},es.asMilliseconds=Pn,es.asSeconds=Rn,es.asMinutes=Wn,es.asHours=Cn,es.asDays=Un,es.asWeeks=Hn,es.asMonths=Fn,es.asQuarters=Ln,es.asYears=Vn,es.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*Z(this._months/12):NaN},es._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*bn(Tn(o)+a),o=a=0),u.milliseconds=r%1e3,e=I(r/1e3),u.seconds=e%60,t=I(e/60),u.minutes=t%60,n=I(t/60),u.hours=n%24,a+=I(n/24),o+=i=I(xn(a)),a-=bn(Tn(i)),s=I(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},es.clone=function(){return Zt(this)},es.get=function(e){return e=V(e),this.isValid()?this[e+"s"]():NaN},es.milliseconds=En,es.seconds=An,es.minutes=jn,es.hours=In,es.days=Zn,es.weeks=function(){return I(this.days()/7)},es.months=zn,es.years=$n,es.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,s,i=!1,r=Bn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(r=Object.assign({},Bn,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),n=this.localeData(),s=Jn(this,!i,r,n),i&&(s=n.pastFuture(+this,s)),n.postformat(s)},es.toISOString=Kn,es.toString=Kn,es.toJSON=Kn,es.locale=tn,es.localeData=sn,es.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Kn),es.lang=nn,C("X",0,0,"unix"),C("x",0,0,"valueOf"),ce("x",ue),ce("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),ye("x",function(e,t,n){n._d=new Date(Z(e))}),f.version="2.29.1",e=Tt,f.fn=pn,f.min=function(){return Rt("isBefore",[].slice.call(arguments,0))},f.max=function(){return Rt("isAfter",[].slice.call(arguments,0))},f.now=function(){return Date.now?Date.now():+new Date},f.utc=_,f.unix=function(e){return Tt(1e3*e)},f.months=function(e,t){return Dn(e,t,"months")},f.isDate=a,f.locale=lt,f.invalid=w,f.duration=Zt,f.isMoment=M,f.weekdays=function(e,t,n){return Sn(e,t,n,"weekdays")},f.parseZone=function(){return Tt.apply(null,arguments).parseZone()},f.localeData=dt,f.isDuration=Ut,f.monthsShort=function(e,t){return Dn(e,t,"monthsShort")},f.weekdaysMin=function(e,t,n){return Sn(e,t,n,"weekdaysMin")},f.defineLocale=ht,f.updateLocale=function(e,t){var n,s,i;return null!=t?(i=st,null!=it[e]&&null!=it[e].parentLocale?it[e].set(b(it[e]._config,t)):(null!=(s=ut(e))&&(i=s._config),t=b(i,t),null==s&&(t.abbr=e),(n=new x(t)).parentLocale=it[e],it[e]=n),lt(e)):null!=it[e]&&(null!=it[e].parentLocale?(it[e]=it[e].parentLocale,e===lt()&<(e)):null!=it[e]&&delete it[e]),it[e]},f.locales=function(){return s(it)},f.weekdaysShort=function(e,t,n){return Sn(e,t,n,"weekdaysShort")},f.normalizeUnits=V,f.relativeTimeRounding=function(e){return void 0===e?qn:"function"==typeof e&&(qn=e,!0)},f.relativeTimeThreshold=function(e,t){return void 0!==Bn[e]&&(void 0===t?Bn[e]:(Bn[e]=t,"s"===e&&(Bn.ss=t-1),!0))},f.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},f.prototype=pn,f.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},f}); -//# sourceMappingURL=moment.min.js.map \ No newline at end of file +!(function (e, t) { + 'object' == typeof exports && 'undefined' != typeof module + ? (module.exports = t()) + : 'function' == typeof define && define.amd + ? define(t) + : (e.moment = t()); +})(this, function () { + 'use strict'; + var e, i; + function f() { + return e.apply(null, arguments); + } + function o(e) { + return ( + e instanceof Array || + '[object Array]' === Object.prototype.toString.call(e) + ); + } + function u(e) { + return null != e && '[object Object]' === Object.prototype.toString.call(e); + } + function m(e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + } + function l(e) { + if (Object.getOwnPropertyNames) + return 0 === Object.getOwnPropertyNames(e).length; + for (var t in e) if (m(e, t)) return; + return 1; + } + function r(e) { + return void 0 === e; + } + function h(e) { + return ( + 'number' == typeof e || + '[object Number]' === Object.prototype.toString.call(e) + ); + } + function a(e) { + return ( + e instanceof Date || '[object Date]' === Object.prototype.toString.call(e) + ); + } + function d(e, t) { + for (var n = [], s = 0; s < e.length; ++s) n.push(t(e[s], s)); + return n; + } + function c(e, t) { + for (var n in t) m(t, n) && (e[n] = t[n]); + return ( + m(t, 'toString') && (e.toString = t.toString), + m(t, 'valueOf') && (e.valueOf = t.valueOf), + e + ); + } + function _(e, t, n, s) { + return xt(e, t, n, s, !0).utc(); + } + function y(e) { + return ( + null == e._pf && + (e._pf = { + empty: !1, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: !1, + invalidEra: null, + invalidMonth: null, + invalidFormat: !1, + userInvalidated: !1, + iso: !1, + parsedDateParts: [], + era: null, + meridiem: null, + rfc2822: !1, + weekdayMismatch: !1 + }), + e._pf + ); + } + function g(e) { + if (null == e._isValid) { + var t = y(e), + n = i.call(t.parsedDateParts, function (e) { + return null != e; + }), + s = + !isNaN(e._d.getTime()) && + t.overflow < 0 && + !t.empty && + !t.invalidEra && + !t.invalidMonth && + !t.invalidWeekday && + !t.weekdayMismatch && + !t.nullInput && + !t.invalidFormat && + !t.userInvalidated && + (!t.meridiem || (t.meridiem && n)); + if ( + (e._strict && + (s = + s && + 0 === t.charsLeftOver && + 0 === t.unusedTokens.length && + void 0 === t.bigHour), + null != Object.isFrozen && Object.isFrozen(e)) + ) + return s; + e._isValid = s; + } + return e._isValid; + } + function w(e) { + var t = _(NaN); + return null != e ? c(y(t), e) : (y(t).userInvalidated = !0), t; + } + i = Array.prototype.some + ? Array.prototype.some + : function (e) { + for (var t = Object(this), n = t.length >>> 0, s = 0; s < n; s++) + if (s in t && e.call(this, t[s], s, t)) return !0; + return !1; + }; + var p = (f.momentProperties = []), + t = !1; + function v(e, t) { + var n, s, i; + if ( + (r(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), + r(t._i) || (e._i = t._i), + r(t._f) || (e._f = t._f), + r(t._l) || (e._l = t._l), + r(t._strict) || (e._strict = t._strict), + r(t._tzm) || (e._tzm = t._tzm), + r(t._isUTC) || (e._isUTC = t._isUTC), + r(t._offset) || (e._offset = t._offset), + r(t._pf) || (e._pf = y(t)), + r(t._locale) || (e._locale = t._locale), + 0 < p.length) + ) + for (n = 0; n < p.length; n++) r((i = t[(s = p[n])])) || (e[s] = i); + return e; + } + function k(e) { + v(this, e), + (this._d = new Date(null != e._d ? e._d.getTime() : NaN)), + this.isValid() || (this._d = new Date(NaN)), + !1 === t && ((t = !0), f.updateOffset(this), (t = !1)); + } + function M(e) { + return e instanceof k || (null != e && null != e._isAMomentObject); + } + function D(e) { + !1 === f.suppressDeprecationWarnings && + 'undefined' != typeof console && + console.warn && + console.warn('Deprecation warning: ' + e); + } + function n(i, r) { + var a = !0; + return c(function () { + if ((null != f.deprecationHandler && f.deprecationHandler(null, i), a)) { + for (var e, t, n = [], s = 0; s < arguments.length; s++) { + if (((e = ''), 'object' == typeof arguments[s])) { + for (t in ((e += '\n[' + s + '] '), arguments[0])) + m(arguments[0], t) && (e += t + ': ' + arguments[0][t] + ', '); + e = e.slice(0, -2); + } else e = arguments[s]; + n.push(e); + } + D( + i + + '\nArguments: ' + + Array.prototype.slice.call(n).join('') + + '\n' + + new Error().stack + ), + (a = !1); + } + return r.apply(this, arguments); + }, r); + } + var s, + S = {}; + function Y(e, t) { + null != f.deprecationHandler && f.deprecationHandler(e, t), + S[e] || (D(t), (S[e] = !0)); + } + function O(e) { + return ( + ('undefined' != typeof Function && e instanceof Function) || + '[object Function]' === Object.prototype.toString.call(e) + ); + } + function b(e, t) { + var n, + s = c({}, e); + for (n in t) + m(t, n) && + (u(e[n]) && u(t[n]) + ? ((s[n] = {}), c(s[n], e[n]), c(s[n], t[n])) + : null != t[n] + ? (s[n] = t[n]) + : delete s[n]); + for (n in e) m(e, n) && !m(t, n) && u(e[n]) && (s[n] = c({}, s[n])); + return s; + } + function x(e) { + null != e && this.set(e); + } + (f.suppressDeprecationWarnings = !1), + (f.deprecationHandler = null), + (s = Object.keys + ? Object.keys + : function (e) { + var t, + n = []; + for (t in e) m(e, t) && n.push(t); + return n; + }); + function T(e, t, n) { + var s = '' + Math.abs(e), + i = t - s.length; + return ( + (0 <= e ? (n ? '+' : '') : '-') + + Math.pow(10, Math.max(0, i)).toString().substr(1) + + s + ); + } + var N = + /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, + P = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, + R = {}, + W = {}; + function C(e, t, n, s) { + var i = + 'string' == typeof s + ? function () { + return this[s](); + } + : s; + e && (W[e] = i), + t && + (W[t[0]] = function () { + return T(i.apply(this, arguments), t[1], t[2]); + }), + n && + (W[n] = function () { + return this.localeData().ordinal(i.apply(this, arguments), e); + }); + } + function U(e, t) { + return e.isValid() + ? ((t = H(t, e.localeData())), + (R[t] = + R[t] || + (function (s) { + for (var e, i = s.match(N), t = 0, r = i.length; t < r; t++) + W[i[t]] + ? (i[t] = W[i[t]]) + : (i[t] = (e = i[t]).match(/\[[\s\S]/) + ? e.replace(/^\[|\]$/g, '') + : e.replace(/\\/g, '')); + return function (e) { + for (var t = '', n = 0; n < r; n++) + t += O(i[n]) ? i[n].call(e, s) : i[n]; + return t; + }; + })(t)), + R[t](e)) + : e.localeData().invalidDate(); + } + function H(e, t) { + var n = 5; + function s(e) { + return t.longDateFormat(e) || e; + } + for (P.lastIndex = 0; 0 <= n && P.test(e); ) + (e = e.replace(P, s)), (P.lastIndex = 0), --n; + return e; + } + var F = {}; + function L(e, t) { + var n = e.toLowerCase(); + F[n] = F[n + 's'] = F[t] = e; + } + function V(e) { + return 'string' == typeof e ? F[e] || F[e.toLowerCase()] : void 0; + } + function G(e) { + var t, + n, + s = {}; + for (n in e) m(e, n) && (t = V(n)) && (s[t] = e[n]); + return s; + } + var E = {}; + function A(e, t) { + E[e] = t; + } + function j(e) { + return (e % 4 == 0 && e % 100 != 0) || e % 400 == 0; + } + function I(e) { + return e < 0 ? Math.ceil(e) || 0 : Math.floor(e); + } + function Z(e) { + var t = +e, + n = 0; + return 0 != t && isFinite(t) && (n = I(t)), n; + } + function z(t, n) { + return function (e) { + return null != e + ? (q(this, t, e), f.updateOffset(this, n), this) + : $(this, t); + }; + } + function $(e, t) { + return e.isValid() ? e._d['get' + (e._isUTC ? 'UTC' : '') + t]() : NaN; + } + function q(e, t, n) { + e.isValid() && + !isNaN(n) && + ('FullYear' === t && j(e.year()) && 1 === e.month() && 29 === e.date() + ? ((n = Z(n)), + e._d['set' + (e._isUTC ? 'UTC' : '') + t]( + n, + e.month(), + xe(n, e.month()) + )) + : e._d['set' + (e._isUTC ? 'UTC' : '') + t](n)); + } + var B, + J = /\d/, + Q = /\d\d/, + X = /\d{3}/, + K = /\d{4}/, + ee = /[+-]?\d{6}/, + te = /\d\d?/, + ne = /\d\d\d\d?/, + se = /\d\d\d\d\d\d?/, + ie = /\d{1,3}/, + re = /\d{1,4}/, + ae = /[+-]?\d{1,6}/, + oe = /\d+/, + ue = /[+-]?\d+/, + le = /Z|[+-]\d\d:?\d\d/gi, + he = /Z|[+-]\d\d(?::?\d\d)?/gi, + de = + /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; + function ce(e, n, s) { + B[e] = O(n) + ? n + : function (e, t) { + return e && s ? s : n; + }; + } + function fe(e, t) { + return m(B, e) + ? B[e](t._strict, t._locale) + : new RegExp( + me( + e + .replace('\\', '') + .replace( + /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, + function (e, t, n, s, i) { + return t || n || s || i; + } + ) + ) + ); + } + function me(e) { + return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + B = {}; + var _e = {}; + function ye(e, n) { + var t, + s = n; + for ( + 'string' == typeof e && (e = [e]), + h(n) && + (s = function (e, t) { + t[n] = Z(e); + }), + t = 0; + t < e.length; + t++ + ) + _e[e[t]] = s; + } + function ge(e, i) { + ye(e, function (e, t, n, s) { + (n._w = n._w || {}), i(e, n._w, n, s); + }); + } + var we, + pe = 0, + ve = 1, + ke = 2, + Me = 3, + De = 4, + Se = 5, + Ye = 6, + Oe = 7, + be = 8; + function xe(e, t) { + if (isNaN(e) || isNaN(t)) return NaN; + var n, + s = ((t % (n = 12)) + n) % n; + return (e += (t - s) / 12), 1 == s ? (j(e) ? 29 : 28) : 31 - ((s % 7) % 2); + } + (we = Array.prototype.indexOf + ? Array.prototype.indexOf + : function (e) { + for (var t = 0; t < this.length; ++t) if (this[t] === e) return t; + return -1; + }), + C('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }), + C('MMM', 0, 0, function (e) { + return this.localeData().monthsShort(this, e); + }), + C('MMMM', 0, 0, function (e) { + return this.localeData().months(this, e); + }), + L('month', 'M'), + A('month', 8), + ce('M', te), + ce('MM', te, Q), + ce('MMM', function (e, t) { + return t.monthsShortRegex(e); + }), + ce('MMMM', function (e, t) { + return t.monthsRegex(e); + }), + ye(['M', 'MM'], function (e, t) { + t[ve] = Z(e) - 1; + }), + ye(['MMM', 'MMMM'], function (e, t, n, s) { + var i = n._locale.monthsParse(e, s, n._strict); + null != i ? (t[ve] = i) : (y(n).invalidMonth = e); + }); + var Te = + 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + Ne = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + Pe = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, + Re = de, + We = de; + function Ce(e, t) { + var n; + if (!e.isValid()) return e; + if ('string' == typeof t) + if (/^\d+$/.test(t)) t = Z(t); + else if (!h((t = e.localeData().monthsParse(t)))) return e; + return ( + (n = Math.min(e.date(), xe(e.year(), t))), + e._d['set' + (e._isUTC ? 'UTC' : '') + 'Month'](t, n), + e + ); + } + function Ue(e) { + return null != e + ? (Ce(this, e), f.updateOffset(this, !0), this) + : $(this, 'Month'); + } + function He() { + function e(e, t) { + return t.length - e.length; + } + for (var t, n = [], s = [], i = [], r = 0; r < 12; r++) + (t = _([2e3, r])), + n.push(this.monthsShort(t, '')), + s.push(this.months(t, '')), + i.push(this.months(t, '')), + i.push(this.monthsShort(t, '')); + for (n.sort(e), s.sort(e), i.sort(e), r = 0; r < 12; r++) + (n[r] = me(n[r])), (s[r] = me(s[r])); + for (r = 0; r < 24; r++) i[r] = me(i[r]); + (this._monthsRegex = new RegExp('^(' + i.join('|') + ')', 'i')), + (this._monthsShortRegex = this._monthsRegex), + (this._monthsStrictRegex = new RegExp('^(' + s.join('|') + ')', 'i')), + (this._monthsShortStrictRegex = new RegExp( + '^(' + n.join('|') + ')', + 'i' + )); + } + function Fe(e) { + return j(e) ? 366 : 365; + } + C('Y', 0, 0, function () { + var e = this.year(); + return e <= 9999 ? T(e, 4) : '+' + e; + }), + C(0, ['YY', 2], 0, function () { + return this.year() % 100; + }), + C(0, ['YYYY', 4], 0, 'year'), + C(0, ['YYYYY', 5], 0, 'year'), + C(0, ['YYYYYY', 6, !0], 0, 'year'), + L('year', 'y'), + A('year', 1), + ce('Y', ue), + ce('YY', te, Q), + ce('YYYY', re, K), + ce('YYYYY', ae, ee), + ce('YYYYYY', ae, ee), + ye(['YYYYY', 'YYYYYY'], pe), + ye('YYYY', function (e, t) { + t[pe] = 2 === e.length ? f.parseTwoDigitYear(e) : Z(e); + }), + ye('YY', function (e, t) { + t[pe] = f.parseTwoDigitYear(e); + }), + ye('Y', function (e, t) { + t[pe] = parseInt(e, 10); + }), + (f.parseTwoDigitYear = function (e) { + return Z(e) + (68 < Z(e) ? 1900 : 2e3); + }); + var Le = z('FullYear', !0); + function Ve(e) { + var t, n; + return ( + e < 100 && 0 <= e + ? (((n = Array.prototype.slice.call(arguments))[0] = e + 400), + (t = new Date(Date.UTC.apply(null, n))), + isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e)) + : (t = new Date(Date.UTC.apply(null, arguments))), + t + ); + } + function Ge(e, t, n) { + var s = 7 + t - n; + return s - ((7 + Ve(e, 0, s).getUTCDay() - t) % 7) - 1; + } + function Ee(e, t, n, s, i) { + var r, + a = 1 + 7 * (t - 1) + ((7 + n - s) % 7) + Ge(e, s, i), + o = + a <= 0 + ? Fe((r = e - 1)) + a + : a > Fe(e) + ? ((r = e + 1), a - Fe(e)) + : ((r = e), a); + return { year: r, dayOfYear: o }; + } + function Ae(e, t, n) { + var s, + i, + r = Ge(e.year(), t, n), + a = Math.floor((e.dayOfYear() - r - 1) / 7) + 1; + return ( + a < 1 + ? (s = a + je((i = e.year() - 1), t, n)) + : a > je(e.year(), t, n) + ? ((s = a - je(e.year(), t, n)), (i = e.year() + 1)) + : ((i = e.year()), (s = a)), + { week: s, year: i } + ); + } + function je(e, t, n) { + var s = Ge(e, t, n), + i = Ge(e + 1, t, n); + return (Fe(e) - s + i) / 7; + } + C('w', ['ww', 2], 'wo', 'week'), + C('W', ['WW', 2], 'Wo', 'isoWeek'), + L('week', 'w'), + L('isoWeek', 'W'), + A('week', 5), + A('isoWeek', 5), + ce('w', te), + ce('ww', te, Q), + ce('W', te), + ce('WW', te, Q), + ge(['w', 'ww', 'W', 'WW'], function (e, t, n, s) { + t[s.substr(0, 1)] = Z(e); + }); + function Ie(e, t) { + return e.slice(t, 7).concat(e.slice(0, t)); + } + C('d', 0, 'do', 'day'), + C('dd', 0, 0, function (e) { + return this.localeData().weekdaysMin(this, e); + }), + C('ddd', 0, 0, function (e) { + return this.localeData().weekdaysShort(this, e); + }), + C('dddd', 0, 0, function (e) { + return this.localeData().weekdays(this, e); + }), + C('e', 0, 0, 'weekday'), + C('E', 0, 0, 'isoWeekday'), + L('day', 'd'), + L('weekday', 'e'), + L('isoWeekday', 'E'), + A('day', 11), + A('weekday', 11), + A('isoWeekday', 11), + ce('d', te), + ce('e', te), + ce('E', te), + ce('dd', function (e, t) { + return t.weekdaysMinRegex(e); + }), + ce('ddd', function (e, t) { + return t.weekdaysShortRegex(e); + }), + ce('dddd', function (e, t) { + return t.weekdaysRegex(e); + }), + ge(['dd', 'ddd', 'dddd'], function (e, t, n, s) { + var i = n._locale.weekdaysParse(e, s, n._strict); + null != i ? (t.d = i) : (y(n).invalidWeekday = e); + }), + ge(['d', 'e', 'E'], function (e, t, n, s) { + t[s] = Z(e); + }); + var Ze = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + ze = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + $e = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + qe = de, + Be = de, + Je = de; + function Qe() { + function e(e, t) { + return t.length - e.length; + } + for (var t, n, s, i, r = [], a = [], o = [], u = [], l = 0; l < 7; l++) + (t = _([2e3, 1]).day(l)), + (n = me(this.weekdaysMin(t, ''))), + (s = me(this.weekdaysShort(t, ''))), + (i = me(this.weekdays(t, ''))), + r.push(n), + a.push(s), + o.push(i), + u.push(n), + u.push(s), + u.push(i); + r.sort(e), + a.sort(e), + o.sort(e), + u.sort(e), + (this._weekdaysRegex = new RegExp('^(' + u.join('|') + ')', 'i')), + (this._weekdaysShortRegex = this._weekdaysRegex), + (this._weekdaysMinRegex = this._weekdaysRegex), + (this._weekdaysStrictRegex = new RegExp('^(' + o.join('|') + ')', 'i')), + (this._weekdaysShortStrictRegex = new RegExp( + '^(' + a.join('|') + ')', + 'i' + )), + (this._weekdaysMinStrictRegex = new RegExp( + '^(' + r.join('|') + ')', + 'i' + )); + } + function Xe() { + return this.hours() % 12 || 12; + } + function Ke(e, t) { + C(e, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), t); + }); + } + function et(e, t) { + return t._meridiemParse; + } + C('H', ['HH', 2], 0, 'hour'), + C('h', ['hh', 2], 0, Xe), + C('k', ['kk', 2], 0, function () { + return this.hours() || 24; + }), + C('hmm', 0, 0, function () { + return '' + Xe.apply(this) + T(this.minutes(), 2); + }), + C('hmmss', 0, 0, function () { + return '' + Xe.apply(this) + T(this.minutes(), 2) + T(this.seconds(), 2); + }), + C('Hmm', 0, 0, function () { + return '' + this.hours() + T(this.minutes(), 2); + }), + C('Hmmss', 0, 0, function () { + return '' + this.hours() + T(this.minutes(), 2) + T(this.seconds(), 2); + }), + Ke('a', !0), + Ke('A', !1), + L('hour', 'h'), + A('hour', 13), + ce('a', et), + ce('A', et), + ce('H', te), + ce('h', te), + ce('k', te), + ce('HH', te, Q), + ce('hh', te, Q), + ce('kk', te, Q), + ce('hmm', ne), + ce('hmmss', se), + ce('Hmm', ne), + ce('Hmmss', se), + ye(['H', 'HH'], Me), + ye(['k', 'kk'], function (e, t, n) { + var s = Z(e); + t[Me] = 24 === s ? 0 : s; + }), + ye(['a', 'A'], function (e, t, n) { + (n._isPm = n._locale.isPM(e)), (n._meridiem = e); + }), + ye(['h', 'hh'], function (e, t, n) { + (t[Me] = Z(e)), (y(n).bigHour = !0); + }), + ye('hmm', function (e, t, n) { + var s = e.length - 2; + (t[Me] = Z(e.substr(0, s))), + (t[De] = Z(e.substr(s))), + (y(n).bigHour = !0); + }), + ye('hmmss', function (e, t, n) { + var s = e.length - 4, + i = e.length - 2; + (t[Me] = Z(e.substr(0, s))), + (t[De] = Z(e.substr(s, 2))), + (t[Se] = Z(e.substr(i))), + (y(n).bigHour = !0); + }), + ye('Hmm', function (e, t, n) { + var s = e.length - 2; + (t[Me] = Z(e.substr(0, s))), (t[De] = Z(e.substr(s))); + }), + ye('Hmmss', function (e, t, n) { + var s = e.length - 4, + i = e.length - 2; + (t[Me] = Z(e.substr(0, s))), + (t[De] = Z(e.substr(s, 2))), + (t[Se] = Z(e.substr(i))); + }); + var tt = z('Hours', !0); + var nt, + st = { + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L' + }, + longDateFormat: { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A' + }, + invalidDate: 'Invalid date', + ordinal: '%d', + dayOfMonthOrdinalParse: /\d{1,2}/, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + w: 'a week', + ww: '%d weeks', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }, + months: Te, + monthsShort: Ne, + week: { dow: 0, doy: 6 }, + weekdays: Ze, + weekdaysMin: $e, + weekdaysShort: ze, + meridiemParse: /[ap]\.?m?\.?/i + }, + it = {}, + rt = {}; + function at(e) { + return e ? e.toLowerCase().replace('_', '-') : e; + } + function ot(e) { + for (var t, n, s, i, r = 0; r < e.length; ) { + for ( + t = (i = at(e[r]).split('-')).length, + n = (n = at(e[r + 1])) ? n.split('-') : null; + 0 < t; + + ) { + if ((s = ut(i.slice(0, t).join('-')))) return s; + if ( + n && + n.length >= t && + (function (e, t) { + for (var n = Math.min(e.length, t.length), s = 0; s < n; s += 1) + if (e[s] !== t[s]) return s; + return n; + })(i, n) >= + t - 1 + ) + break; + t--; + } + r++; + } + return nt; + } + function ut(t) { + var e; + if ( + void 0 === it[t] && + 'undefined' != typeof module && + module && + module.exports + ) + try { + (e = nt._abbr), require('./locale/' + t), lt(e); + } catch (e) { + it[t] = null; + } + return it[t]; + } + function lt(e, t) { + var n; + return ( + e && + ((n = r(t) ? dt(e) : ht(e, t)) + ? (nt = n) + : 'undefined' != typeof console && + console.warn && + console.warn( + 'Locale ' + e + ' not found. Did you forget to load it?' + )), + nt._abbr + ); + } + function ht(e, t) { + if (null === t) return delete it[e], null; + var n, + s = st; + if (((t.abbr = e), null != it[e])) + Y( + 'defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' + ), + (s = it[e]._config); + else if (null != t.parentLocale) + if (null != it[t.parentLocale]) s = it[t.parentLocale]._config; + else { + if (null == (n = ut(t.parentLocale))) + return ( + rt[t.parentLocale] || (rt[t.parentLocale] = []), + rt[t.parentLocale].push({ name: e, config: t }), + null + ); + s = n._config; + } + return ( + (it[e] = new x(b(s, t))), + rt[e] && + rt[e].forEach(function (e) { + ht(e.name, e.config); + }), + lt(e), + it[e] + ); + } + function dt(e) { + var t; + if ((e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e)) + return nt; + if (!o(e)) { + if ((t = ut(e))) return t; + e = [e]; + } + return ot(e); + } + function ct(e) { + var t, + n = e._a; + return ( + n && + -2 === y(e).overflow && + ((t = + n[ve] < 0 || 11 < n[ve] + ? ve + : n[ke] < 1 || n[ke] > xe(n[pe], n[ve]) + ? ke + : n[Me] < 0 || + 24 < n[Me] || + (24 === n[Me] && (0 !== n[De] || 0 !== n[Se] || 0 !== n[Ye])) + ? Me + : n[De] < 0 || 59 < n[De] + ? De + : n[Se] < 0 || 59 < n[Se] + ? Se + : n[Ye] < 0 || 999 < n[Ye] + ? Ye + : -1), + y(e)._overflowDayOfYear && (t < pe || ke < t) && (t = ke), + y(e)._overflowWeeks && -1 === t && (t = Oe), + y(e)._overflowWeekday && -1 === t && (t = be), + (y(e).overflow = t)), + e + ); + } + var ft = + /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + mt = + /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + _t = /Z|[+-]\d\d(?::?\d\d)?/, + yt = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, !1], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, !1], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, !1], + ['YYYYDDD', /\d{7}/], + ['YYYYMM', /\d{6}/, !1], + ['YYYY', /\d{4}/, !1] + ], + gt = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/] + ], + wt = /^\/?Date\((-?\d+)/i, + pt = + /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, + vt = { + UT: 0, + GMT: 0, + EDT: -240, + EST: -300, + CDT: -300, + CST: -360, + MDT: -360, + MST: -420, + PDT: -420, + PST: -480 + }; + function kt(e) { + var t, + n, + s, + i, + r, + a, + o = e._i, + u = ft.exec(o) || mt.exec(o); + if (u) { + for (y(e).iso = !0, t = 0, n = yt.length; t < n; t++) + if (yt[t][1].exec(u[1])) { + (i = yt[t][0]), (s = !1 !== yt[t][2]); + break; + } + if (null == i) return void (e._isValid = !1); + if (u[3]) { + for (t = 0, n = gt.length; t < n; t++) + if (gt[t][1].exec(u[3])) { + r = (u[2] || ' ') + gt[t][0]; + break; + } + if (null == r) return void (e._isValid = !1); + } + if (!s && null != r) return void (e._isValid = !1); + if (u[4]) { + if (!_t.exec(u[4])) return void (e._isValid = !1); + a = 'Z'; + } + (e._f = i + (r || '') + (a || '')), Ot(e); + } else e._isValid = !1; + } + function Mt(e, t, n, s, i, r) { + var a = [ + (function (e) { + var t = parseInt(e, 10); + { + if (t <= 49) return 2e3 + t; + if (t <= 999) return 1900 + t; + } + return t; + })(e), + Ne.indexOf(t), + parseInt(n, 10), + parseInt(s, 10), + parseInt(i, 10) + ]; + return r && a.push(parseInt(r, 10)), a; + } + function Dt(e) { + var t, + n, + s, + i, + r = pt.exec( + e._i + .replace(/\([^)]*\)|[\n\t]/g, ' ') + .replace(/(\s\s+)/g, ' ') + .replace(/^\s\s*/, '') + .replace(/\s\s*$/, '') + ); + if (r) { + if ( + ((t = Mt(r[4], r[3], r[2], r[5], r[6], r[7])), + (n = r[1]), + (s = t), + (i = e), + n && + ze.indexOf(n) !== new Date(s[0], s[1], s[2]).getDay() && + ((y(i).weekdayMismatch = !0), !void (i._isValid = !1))) + ) + return; + (e._a = t), + (e._tzm = (function (e, t, n) { + if (e) return vt[e]; + if (t) return 0; + var s = parseInt(n, 10), + i = s % 100; + return 60 * ((s - i) / 100) + i; + })(r[8], r[9], r[10])), + (e._d = Ve.apply(null, e._a)), + e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), + (y(e).rfc2822 = !0); + } else e._isValid = !1; + } + function St(e, t, n) { + return null != e ? e : null != t ? t : n; + } + function Yt(e) { + var t, + n, + s, + i, + r, + a, + o, + u = []; + if (!e._d) { + for ( + a = e, + o = new Date(f.now()), + s = a._useUTC + ? [o.getUTCFullYear(), o.getUTCMonth(), o.getUTCDate()] + : [o.getFullYear(), o.getMonth(), o.getDate()], + e._w && + null == e._a[ke] && + null == e._a[ve] && + (function (e) { + var t, n, s, i, r, a, o, u, l; + null != (t = e._w).GG || null != t.W || null != t.E + ? ((r = 1), + (a = 4), + (n = St(t.GG, e._a[pe], Ae(Tt(), 1, 4).year)), + (s = St(t.W, 1)), + ((i = St(t.E, 1)) < 1 || 7 < i) && (u = !0)) + : ((r = e._locale._week.dow), + (a = e._locale._week.doy), + (l = Ae(Tt(), r, a)), + (n = St(t.gg, e._a[pe], l.year)), + (s = St(t.w, l.week)), + null != t.d + ? ((i = t.d) < 0 || 6 < i) && (u = !0) + : null != t.e + ? ((i = t.e + r), (t.e < 0 || 6 < t.e) && (u = !0)) + : (i = r)); + s < 1 || s > je(n, r, a) + ? (y(e)._overflowWeeks = !0) + : null != u + ? (y(e)._overflowWeekday = !0) + : ((o = Ee(n, s, i, r, a)), + (e._a[pe] = o.year), + (e._dayOfYear = o.dayOfYear)); + })(e), + null != e._dayOfYear && + ((r = St(e._a[pe], s[pe])), + (e._dayOfYear > Fe(r) || 0 === e._dayOfYear) && + (y(e)._overflowDayOfYear = !0), + (n = Ve(r, 0, e._dayOfYear)), + (e._a[ve] = n.getUTCMonth()), + (e._a[ke] = n.getUTCDate())), + t = 0; + t < 3 && null == e._a[t]; + ++t + ) + e._a[t] = u[t] = s[t]; + for (; t < 7; t++) + e._a[t] = u[t] = null == e._a[t] ? (2 === t ? 1 : 0) : e._a[t]; + 24 === e._a[Me] && + 0 === e._a[De] && + 0 === e._a[Se] && + 0 === e._a[Ye] && + ((e._nextDay = !0), (e._a[Me] = 0)), + (e._d = ( + e._useUTC + ? Ve + : function (e, t, n, s, i, r, a) { + var o; + return ( + e < 100 && 0 <= e + ? ((o = new Date(e + 400, t, n, s, i, r, a)), + isFinite(o.getFullYear()) && o.setFullYear(e)) + : (o = new Date(e, t, n, s, i, r, a)), + o + ); + } + ).apply(null, u)), + (i = e._useUTC ? e._d.getUTCDay() : e._d.getDay()), + null != e._tzm && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), + e._nextDay && (e._a[Me] = 24), + e._w && + void 0 !== e._w.d && + e._w.d !== i && + (y(e).weekdayMismatch = !0); + } + } + function Ot(e) { + if (e._f !== f.ISO_8601) + if (e._f !== f.RFC_2822) { + (e._a = []), (y(e).empty = !0); + for ( + var t, + n, + s, + i, + r, + a, + o, + u = '' + e._i, + l = u.length, + h = 0, + d = H(e._f, e._locale).match(N) || [], + c = 0; + c < d.length; + c++ + ) + (n = d[c]), + (t = (u.match(fe(n, e)) || [])[0]) && + (0 < (s = u.substr(0, u.indexOf(t))).length && + y(e).unusedInput.push(s), + (u = u.slice(u.indexOf(t) + t.length)), + (h += t.length)), + W[n] + ? (t ? (y(e).empty = !1) : y(e).unusedTokens.push(n), + (r = n), + (o = e), + null != (a = t) && m(_e, r) && _e[r](a, o._a, o, r)) + : e._strict && !t && y(e).unusedTokens.push(n); + (y(e).charsLeftOver = l - h), + 0 < u.length && y(e).unusedInput.push(u), + e._a[Me] <= 12 && + !0 === y(e).bigHour && + 0 < e._a[Me] && + (y(e).bigHour = void 0), + (y(e).parsedDateParts = e._a.slice(0)), + (y(e).meridiem = e._meridiem), + (e._a[Me] = (function (e, t, n) { + var s; + if (null == n) return t; + return null != e.meridiemHour + ? e.meridiemHour(t, n) + : (null != e.isPM && + ((s = e.isPM(n)) && t < 12 && (t += 12), + s || 12 !== t || (t = 0)), + t); + })(e._locale, e._a[Me], e._meridiem)), + null !== (i = y(e).era) && + (e._a[pe] = e._locale.erasConvertYear(i, e._a[pe])), + Yt(e), + ct(e); + } else Dt(e); + else kt(e); + } + function bt(e) { + var t, + n, + s = e._i, + i = e._f; + return ( + (e._locale = e._locale || dt(e._l)), + null === s || (void 0 === i && '' === s) + ? w({ nullInput: !0 }) + : ('string' == typeof s && (e._i = s = e._locale.preparse(s)), + M(s) + ? new k(ct(s)) + : (a(s) + ? (e._d = s) + : o(i) + ? (function (e) { + var t, + n, + s, + i, + r, + a, + o = !1; + if (0 === e._f.length) + return (y(e).invalidFormat = !0), (e._d = new Date(NaN)); + for (i = 0; i < e._f.length; i++) + (r = 0), + (a = !1), + (t = v({}, e)), + null != e._useUTC && (t._useUTC = e._useUTC), + (t._f = e._f[i]), + Ot(t), + g(t) && (a = !0), + (r += y(t).charsLeftOver), + (r += 10 * y(t).unusedTokens.length), + (y(t).score = r), + o + ? r < s && ((s = r), (n = t)) + : (null == s || r < s || a) && + ((s = r), (n = t), a && (o = !0)); + c(e, n || t); + })(e) + : i + ? Ot(e) + : r((n = (t = e)._i)) + ? (t._d = new Date(f.now())) + : a(n) + ? (t._d = new Date(n.valueOf())) + : 'string' == typeof n + ? (function (e) { + var t = wt.exec(e._i); + null === t + ? (kt(e), + !1 === e._isValid && + (delete e._isValid, + Dt(e), + !1 === e._isValid && + (delete e._isValid, + e._strict + ? (e._isValid = !1) + : f.createFromInputFallback(e)))) + : (e._d = new Date(+t[1])); + })(t) + : o(n) + ? ((t._a = d(n.slice(0), function (e) { + return parseInt(e, 10); + })), + Yt(t)) + : u(n) + ? (function (e) { + var t, n; + e._d || + ((n = void 0 === (t = G(e._i)).day ? t.date : t.day), + (e._a = d( + [ + t.year, + t.month, + n, + t.hour, + t.minute, + t.second, + t.millisecond + ], + function (e) { + return e && parseInt(e, 10); + } + )), + Yt(e)); + })(t) + : h(n) + ? (t._d = new Date(n)) + : f.createFromInputFallback(t), + g(e) || (e._d = null), + e)) + ); + } + function xt(e, t, n, s, i) { + var r, + a = {}; + return ( + (!0 !== t && !1 !== t) || ((s = t), (t = void 0)), + (!0 !== n && !1 !== n) || ((s = n), (n = void 0)), + ((u(e) && l(e)) || (o(e) && 0 === e.length)) && (e = void 0), + (a._isAMomentObject = !0), + (a._useUTC = a._isUTC = i), + (a._l = n), + (a._i = e), + (a._f = t), + (a._strict = s), + (r = new k(ct(bt(a))))._nextDay && (r.add(1, 'd'), (r._nextDay = void 0)), + r + ); + } + function Tt(e, t, n, s) { + return xt(e, t, n, s, !1); + } + (f.createFromInputFallback = n( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (e) { + e._d = new Date(e._i + (e._useUTC ? ' UTC' : '')); + } + )), + (f.ISO_8601 = function () {}), + (f.RFC_2822 = function () {}); + var Nt = n( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var e = Tt.apply(null, arguments); + return this.isValid() && e.isValid() ? (e < this ? this : e) : w(); + } + ), + Pt = n( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var e = Tt.apply(null, arguments); + return this.isValid() && e.isValid() ? (this < e ? this : e) : w(); + } + ); + function Rt(e, t) { + var n, s; + if ((1 === t.length && o(t[0]) && (t = t[0]), !t.length)) return Tt(); + for (n = t[0], s = 1; s < t.length; ++s) + (t[s].isValid() && !t[s][e](n)) || (n = t[s]); + return n; + } + var Wt = [ + 'year', + 'quarter', + 'month', + 'week', + 'day', + 'hour', + 'minute', + 'second', + 'millisecond' + ]; + function Ct(e) { + var t = G(e), + n = t.year || 0, + s = t.quarter || 0, + i = t.month || 0, + r = t.week || t.isoWeek || 0, + a = t.day || 0, + o = t.hour || 0, + u = t.minute || 0, + l = t.second || 0, + h = t.millisecond || 0; + (this._isValid = (function (e) { + var t, + n, + s = !1; + for (t in e) + if (m(e, t) && (-1 === we.call(Wt, t) || (null != e[t] && isNaN(e[t])))) + return !1; + for (n = 0; n < Wt.length; ++n) + if (e[Wt[n]]) { + if (s) return !1; + parseFloat(e[Wt[n]]) !== Z(e[Wt[n]]) && (s = !0); + } + return !0; + })(t)), + (this._milliseconds = +h + 1e3 * l + 6e4 * u + 1e3 * o * 60 * 60), + (this._days = +a + 7 * r), + (this._months = +i + 3 * s + 12 * n), + (this._data = {}), + (this._locale = dt()), + this._bubble(); + } + function Ut(e) { + return e instanceof Ct; + } + function Ht(e) { + return e < 0 ? -1 * Math.round(-1 * e) : Math.round(e); + } + function Ft(e, n) { + C(e, 0, 0, function () { + var e = this.utcOffset(), + t = '+'; + return ( + e < 0 && ((e = -e), (t = '-')), + t + T(~~(e / 60), 2) + n + T(~~e % 60, 2) + ); + }); + } + Ft('Z', ':'), + Ft('ZZ', ''), + ce('Z', he), + ce('ZZ', he), + ye(['Z', 'ZZ'], function (e, t, n) { + (n._useUTC = !0), (n._tzm = Vt(he, e)); + }); + var Lt = /([\+\-]|\d\d)/gi; + function Vt(e, t) { + var n, + s, + i = (t || '').match(e); + return null === i + ? null + : 0 === + (s = + 60 * + (n = ((i[i.length - 1] || []) + '').match(Lt) || ['-', 0, 0])[1] + + Z(n[2])) + ? 0 + : '+' === n[0] + ? s + : -s; + } + function Gt(e, t) { + var n, s; + return t._isUTC + ? ((n = t.clone()), + (s = (M(e) || a(e) ? e.valueOf() : Tt(e).valueOf()) - n.valueOf()), + n._d.setTime(n._d.valueOf() + s), + f.updateOffset(n, !1), + n) + : Tt(e).local(); + } + function Et(e) { + return -Math.round(e._d.getTimezoneOffset()); + } + function At() { + return !!this.isValid() && this._isUTC && 0 === this._offset; + } + f.updateOffset = function () {}; + var jt = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, + It = + /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + function Zt(e, t) { + var n, + s, + i, + r = e, + a = null; + return ( + Ut(e) + ? (r = { ms: e._milliseconds, d: e._days, M: e._months }) + : h(e) || !isNaN(+e) + ? ((r = {}), t ? (r[t] = +e) : (r.milliseconds = +e)) + : (a = jt.exec(e)) + ? ((n = '-' === a[1] ? -1 : 1), + (r = { + y: 0, + d: Z(a[ke]) * n, + h: Z(a[Me]) * n, + m: Z(a[De]) * n, + s: Z(a[Se]) * n, + ms: Z(Ht(1e3 * a[Ye])) * n + })) + : (a = It.exec(e)) + ? ((n = '-' === a[1] ? -1 : 1), + (r = { + y: zt(a[2], n), + M: zt(a[3], n), + w: zt(a[4], n), + d: zt(a[5], n), + h: zt(a[6], n), + m: zt(a[7], n), + s: zt(a[8], n) + })) + : null == r + ? (r = {}) + : 'object' == typeof r && + ('from' in r || 'to' in r) && + ((i = (function (e, t) { + var n; + if (!e.isValid() || !t.isValid()) + return { milliseconds: 0, months: 0 }; + (t = Gt(t, e)), + e.isBefore(t) + ? (n = $t(e, t)) + : (((n = $t(t, e)).milliseconds = -n.milliseconds), + (n.months = -n.months)); + return n; + })(Tt(r.from), Tt(r.to))), + ((r = {}).ms = i.milliseconds), + (r.M = i.months)), + (s = new Ct(r)), + Ut(e) && m(e, '_locale') && (s._locale = e._locale), + Ut(e) && m(e, '_isValid') && (s._isValid = e._isValid), + s + ); + } + function zt(e, t) { + var n = e && parseFloat(e.replace(',', '.')); + return (isNaN(n) ? 0 : n) * t; + } + function $t(e, t) { + var n = {}; + return ( + (n.months = t.month() - e.month() + 12 * (t.year() - e.year())), + e.clone().add(n.months, 'M').isAfter(t) && --n.months, + (n.milliseconds = t - e.clone().add(n.months, 'M')), + n + ); + } + function qt(s, i) { + return function (e, t) { + var n; + return ( + null === t || + isNaN(+t) || + (Y( + i, + 'moment().' + + i + + '(period, number) is deprecated. Please use moment().' + + i + + '(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' + ), + (n = e), + (e = t), + (t = n)), + Bt(this, Zt(e, t), s), + this + ); + }; + } + function Bt(e, t, n, s) { + var i = t._milliseconds, + r = Ht(t._days), + a = Ht(t._months); + e.isValid() && + ((s = null == s || s), + a && Ce(e, $(e, 'Month') + a * n), + r && q(e, 'Date', $(e, 'Date') + r * n), + i && e._d.setTime(e._d.valueOf() + i * n), + s && f.updateOffset(e, r || a)); + } + (Zt.fn = Ct.prototype), + (Zt.invalid = function () { + return Zt(NaN); + }); + var Jt = qt(1, 'add'), + Qt = qt(-1, 'subtract'); + function Xt(e) { + return 'string' == typeof e || e instanceof String; + } + function Kt(e) { + return ( + M(e) || + a(e) || + Xt(e) || + h(e) || + (function (t) { + var e = o(t), + n = !1; + e && + (n = + 0 === + t.filter(function (e) { + return !h(e) && Xt(t); + }).length); + return e && n; + })(e) || + (function (e) { + var t, + n, + s = u(e) && !l(e), + i = !1, + r = [ + 'years', + 'year', + 'y', + 'months', + 'month', + 'M', + 'days', + 'day', + 'd', + 'dates', + 'date', + 'D', + 'hours', + 'hour', + 'h', + 'minutes', + 'minute', + 'm', + 'seconds', + 'second', + 's', + 'milliseconds', + 'millisecond', + 'ms' + ]; + for (t = 0; t < r.length; t += 1) (n = r[t]), (i = i || m(e, n)); + return s && i; + })(e) || + null == e + ); + } + function en(e, t) { + if (e.date() < t.date()) return -en(t, e); + var n = 12 * (t.year() - e.year()) + (t.month() - e.month()), + s = e.clone().add(n, 'months'), + i = + t - s < 0 + ? (t - s) / (s - e.clone().add(n - 1, 'months')) + : (t - s) / (e.clone().add(1 + n, 'months') - s); + return -(n + i) || 0; + } + function tn(e) { + var t; + return void 0 === e + ? this._locale._abbr + : (null != (t = dt(e)) && (this._locale = t), this); + } + (f.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'), + (f.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'); + var nn = n( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (e) { + return void 0 === e ? this.localeData() : this.locale(e); + } + ); + function sn() { + return this._locale; + } + var rn = 126227808e5; + function an(e, t) { + return ((e % t) + t) % t; + } + function on(e, t, n) { + return e < 100 && 0 <= e + ? new Date(e + 400, t, n) - rn + : new Date(e, t, n).valueOf(); + } + function un(e, t, n) { + return e < 100 && 0 <= e ? Date.UTC(e + 400, t, n) - rn : Date.UTC(e, t, n); + } + function ln(e, t) { + return t.erasAbbrRegex(e); + } + function hn() { + for ( + var e = [], t = [], n = [], s = [], i = this.eras(), r = 0, a = i.length; + r < a; + ++r + ) + t.push(me(i[r].name)), + e.push(me(i[r].abbr)), + n.push(me(i[r].narrow)), + s.push(me(i[r].name)), + s.push(me(i[r].abbr)), + s.push(me(i[r].narrow)); + (this._erasRegex = new RegExp('^(' + s.join('|') + ')', 'i')), + (this._erasNameRegex = new RegExp('^(' + t.join('|') + ')', 'i')), + (this._erasAbbrRegex = new RegExp('^(' + e.join('|') + ')', 'i')), + (this._erasNarrowRegex = new RegExp('^(' + n.join('|') + ')', 'i')); + } + function dn(e, t) { + C(0, [e, e.length], 0, t); + } + function cn(e, t, n, s, i) { + var r; + return null == e + ? Ae(this, s, i).year + : ((r = je(e, s, i)) < t && (t = r), + function (e, t, n, s, i) { + var r = Ee(e, t, n, s, i), + a = Ve(r.year, 0, r.dayOfYear); + return ( + this.year(a.getUTCFullYear()), + this.month(a.getUTCMonth()), + this.date(a.getUTCDate()), + this + ); + }.call(this, e, t, n, s, i)); + } + C('N', 0, 0, 'eraAbbr'), + C('NN', 0, 0, 'eraAbbr'), + C('NNN', 0, 0, 'eraAbbr'), + C('NNNN', 0, 0, 'eraName'), + C('NNNNN', 0, 0, 'eraNarrow'), + C('y', ['y', 1], 'yo', 'eraYear'), + C('y', ['yy', 2], 0, 'eraYear'), + C('y', ['yyy', 3], 0, 'eraYear'), + C('y', ['yyyy', 4], 0, 'eraYear'), + ce('N', ln), + ce('NN', ln), + ce('NNN', ln), + ce('NNNN', function (e, t) { + return t.erasNameRegex(e); + }), + ce('NNNNN', function (e, t) { + return t.erasNarrowRegex(e); + }), + ye(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (e, t, n, s) { + var i = n._locale.erasParse(e, s, n._strict); + i ? (y(n).era = i) : (y(n).invalidEra = e); + }), + ce('y', oe), + ce('yy', oe), + ce('yyy', oe), + ce('yyyy', oe), + ce('yo', function (e, t) { + return t._eraYearOrdinalRegex || oe; + }), + ye(['y', 'yy', 'yyy', 'yyyy'], pe), + ye(['yo'], function (e, t, n, s) { + var i; + n._locale._eraYearOrdinalRegex && + (i = e.match(n._locale._eraYearOrdinalRegex)), + n._locale.eraYearOrdinalParse + ? (t[pe] = n._locale.eraYearOrdinalParse(e, i)) + : (t[pe] = parseInt(e, 10)); + }), + C(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }), + C(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }), + dn('gggg', 'weekYear'), + dn('ggggg', 'weekYear'), + dn('GGGG', 'isoWeekYear'), + dn('GGGGG', 'isoWeekYear'), + L('weekYear', 'gg'), + L('isoWeekYear', 'GG'), + A('weekYear', 1), + A('isoWeekYear', 1), + ce('G', ue), + ce('g', ue), + ce('GG', te, Q), + ce('gg', te, Q), + ce('GGGG', re, K), + ce('gggg', re, K), + ce('GGGGG', ae, ee), + ce('ggggg', ae, ee), + ge(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (e, t, n, s) { + t[s.substr(0, 2)] = Z(e); + }), + ge(['gg', 'GG'], function (e, t, n, s) { + t[s] = f.parseTwoDigitYear(e); + }), + C('Q', 0, 'Qo', 'quarter'), + L('quarter', 'Q'), + A('quarter', 7), + ce('Q', J), + ye('Q', function (e, t) { + t[ve] = 3 * (Z(e) - 1); + }), + C('D', ['DD', 2], 'Do', 'date'), + L('date', 'D'), + A('date', 9), + ce('D', te), + ce('DD', te, Q), + ce('Do', function (e, t) { + return e + ? t._dayOfMonthOrdinalParse || t._ordinalParse + : t._dayOfMonthOrdinalParseLenient; + }), + ye(['D', 'DD'], ke), + ye('Do', function (e, t) { + t[ke] = Z(e.match(te)[0]); + }); + var fn = z('Date', !0); + C('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'), + L('dayOfYear', 'DDD'), + A('dayOfYear', 4), + ce('DDD', ie), + ce('DDDD', X), + ye(['DDD', 'DDDD'], function (e, t, n) { + n._dayOfYear = Z(e); + }), + C('m', ['mm', 2], 0, 'minute'), + L('minute', 'm'), + A('minute', 14), + ce('m', te), + ce('mm', te, Q), + ye(['m', 'mm'], De); + var mn = z('Minutes', !1); + C('s', ['ss', 2], 0, 'second'), + L('second', 's'), + A('second', 15), + ce('s', te), + ce('ss', te, Q), + ye(['s', 'ss'], Se); + var _n, + yn, + gn = z('Seconds', !1); + for ( + C('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }), + C(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }), + C(0, ['SSS', 3], 0, 'millisecond'), + C(0, ['SSSS', 4], 0, function () { + return 10 * this.millisecond(); + }), + C(0, ['SSSSS', 5], 0, function () { + return 100 * this.millisecond(); + }), + C(0, ['SSSSSS', 6], 0, function () { + return 1e3 * this.millisecond(); + }), + C(0, ['SSSSSSS', 7], 0, function () { + return 1e4 * this.millisecond(); + }), + C(0, ['SSSSSSSS', 8], 0, function () { + return 1e5 * this.millisecond(); + }), + C(0, ['SSSSSSSSS', 9], 0, function () { + return 1e6 * this.millisecond(); + }), + L('millisecond', 'ms'), + A('millisecond', 16), + ce('S', ie, J), + ce('SS', ie, Q), + ce('SSS', ie, X), + _n = 'SSSS'; + _n.length <= 9; + _n += 'S' + ) + ce(_n, oe); + function wn(e, t) { + t[Ye] = Z(1e3 * ('0.' + e)); + } + for (_n = 'S'; _n.length <= 9; _n += 'S') ye(_n, wn); + (yn = z('Milliseconds', !1)), + C('z', 0, 0, 'zoneAbbr'), + C('zz', 0, 0, 'zoneName'); + var pn = k.prototype; + function vn(e) { + return e; + } + (pn.add = Jt), + (pn.calendar = function (e, t) { + 1 === arguments.length && + (arguments[0] + ? Kt(arguments[0]) + ? ((e = arguments[0]), (t = void 0)) + : (function (e) { + for ( + var t = u(e) && !l(e), + n = !1, + s = [ + 'sameDay', + 'nextDay', + 'lastDay', + 'nextWeek', + 'lastWeek', + 'sameElse' + ], + i = 0; + i < s.length; + i += 1 + ) + n = n || m(e, s[i]); + return t && n; + })(arguments[0]) && ((t = arguments[0]), (e = void 0)) + : (t = e = void 0)); + var n = e || Tt(), + s = Gt(n, this).startOf('day'), + i = f.calendarFormat(this, s) || 'sameElse', + r = t && (O(t[i]) ? t[i].call(this, n) : t[i]); + return this.format(r || this.localeData().calendar(i, this, Tt(n))); + }), + (pn.clone = function () { + return new k(this); + }), + (pn.diff = function (e, t, n) { + var s, i, r; + if (!this.isValid()) return NaN; + if (!(s = Gt(e, this)).isValid()) return NaN; + switch (((i = 6e4 * (s.utcOffset() - this.utcOffset())), (t = V(t)))) { + case 'year': + r = en(this, s) / 12; + break; + case 'month': + r = en(this, s); + break; + case 'quarter': + r = en(this, s) / 3; + break; + case 'second': + r = (this - s) / 1e3; + break; + case 'minute': + r = (this - s) / 6e4; + break; + case 'hour': + r = (this - s) / 36e5; + break; + case 'day': + r = (this - s - i) / 864e5; + break; + case 'week': + r = (this - s - i) / 6048e5; + break; + default: + r = this - s; + } + return n ? r : I(r); + }), + (pn.endOf = function (e) { + var t, n; + if (void 0 === (e = V(e)) || 'millisecond' === e || !this.isValid()) + return this; + switch (((n = this._isUTC ? un : on), e)) { + case 'year': + t = n(this.year() + 1, 0, 1) - 1; + break; + case 'quarter': + t = n(this.year(), this.month() - (this.month() % 3) + 3, 1) - 1; + break; + case 'month': + t = n(this.year(), this.month() + 1, 1) - 1; + break; + case 'week': + t = + n(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + case 'isoWeek': + t = + n( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + 7 + ) - 1; + break; + case 'day': + case 'date': + t = n(this.year(), this.month(), this.date() + 1) - 1; + break; + case 'hour': + (t = this._d.valueOf()), + (t += + 36e5 - + an(t + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5) - + 1); + break; + case 'minute': + (t = this._d.valueOf()), (t += 6e4 - an(t, 6e4) - 1); + break; + case 'second': + (t = this._d.valueOf()), (t += 1e3 - an(t, 1e3) - 1); + break; + } + return this._d.setTime(t), f.updateOffset(this, !0), this; + }), + (pn.format = function (e) { + e = e || (this.isUtc() ? f.defaultFormatUtc : f.defaultFormat); + var t = U(this, e); + return this.localeData().postformat(t); + }), + (pn.from = function (e, t) { + return this.isValid() && ((M(e) && e.isValid()) || Tt(e).isValid()) + ? Zt({ to: this, from: e }).locale(this.locale()).humanize(!t) + : this.localeData().invalidDate(); + }), + (pn.fromNow = function (e) { + return this.from(Tt(), e); + }), + (pn.to = function (e, t) { + return this.isValid() && ((M(e) && e.isValid()) || Tt(e).isValid()) + ? Zt({ from: this, to: e }).locale(this.locale()).humanize(!t) + : this.localeData().invalidDate(); + }), + (pn.toNow = function (e) { + return this.to(Tt(), e); + }), + (pn.get = function (e) { + return O(this[(e = V(e))]) ? this[e]() : this; + }), + (pn.invalidAt = function () { + return y(this).overflow; + }), + (pn.isAfter = function (e, t) { + var n = M(e) ? e : Tt(e); + return ( + !(!this.isValid() || !n.isValid()) && + ('millisecond' === (t = V(t) || 'millisecond') + ? this.valueOf() > n.valueOf() + : n.valueOf() < this.clone().startOf(t).valueOf()) + ); + }), + (pn.isBefore = function (e, t) { + var n = M(e) ? e : Tt(e); + return ( + !(!this.isValid() || !n.isValid()) && + ('millisecond' === (t = V(t) || 'millisecond') + ? this.valueOf() < n.valueOf() + : this.clone().endOf(t).valueOf() < n.valueOf()) + ); + }), + (pn.isBetween = function (e, t, n, s) { + var i = M(e) ? e : Tt(e), + r = M(t) ? t : Tt(t); + return ( + !!(this.isValid() && i.isValid() && r.isValid()) && + ('(' === (s = s || '()')[0] + ? this.isAfter(i, n) + : !this.isBefore(i, n)) && + (')' === s[1] ? this.isBefore(r, n) : !this.isAfter(r, n)) + ); + }), + (pn.isSame = function (e, t) { + var n, + s = M(e) ? e : Tt(e); + return ( + !(!this.isValid() || !s.isValid()) && + ('millisecond' === (t = V(t) || 'millisecond') + ? this.valueOf() === s.valueOf() + : ((n = s.valueOf()), + this.clone().startOf(t).valueOf() <= n && + n <= this.clone().endOf(t).valueOf())) + ); + }), + (pn.isSameOrAfter = function (e, t) { + return this.isSame(e, t) || this.isAfter(e, t); + }), + (pn.isSameOrBefore = function (e, t) { + return this.isSame(e, t) || this.isBefore(e, t); + }), + (pn.isValid = function () { + return g(this); + }), + (pn.lang = nn), + (pn.locale = tn), + (pn.localeData = sn), + (pn.max = Pt), + (pn.min = Nt), + (pn.parsingFlags = function () { + return c({}, y(this)); + }), + (pn.set = function (e, t) { + if ('object' == typeof e) + for ( + var n = (function (e) { + var t, + n = []; + for (t in e) m(e, t) && n.push({ unit: t, priority: E[t] }); + return ( + n.sort(function (e, t) { + return e.priority - t.priority; + }), + n + ); + })((e = G(e))), + s = 0; + s < n.length; + s++ + ) + this[n[s].unit](e[n[s].unit]); + else if (O(this[(e = V(e))])) return this[e](t); + return this; + }), + (pn.startOf = function (e) { + var t, n; + if (void 0 === (e = V(e)) || 'millisecond' === e || !this.isValid()) + return this; + switch (((n = this._isUTC ? un : on), e)) { + case 'year': + t = n(this.year(), 0, 1); + break; + case 'quarter': + t = n(this.year(), this.month() - (this.month() % 3), 1); + break; + case 'month': + t = n(this.year(), this.month(), 1); + break; + case 'week': + t = n(this.year(), this.month(), this.date() - this.weekday()); + break; + case 'isoWeek': + t = n( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + ); + break; + case 'day': + case 'date': + t = n(this.year(), this.month(), this.date()); + break; + case 'hour': + (t = this._d.valueOf()), + (t -= an(t + (this._isUTC ? 0 : 6e4 * this.utcOffset()), 36e5)); + break; + case 'minute': + (t = this._d.valueOf()), (t -= an(t, 6e4)); + break; + case 'second': + (t = this._d.valueOf()), (t -= an(t, 1e3)); + break; + } + return this._d.setTime(t), f.updateOffset(this, !0), this; + }), + (pn.subtract = Qt), + (pn.toArray = function () { + var e = this; + return [ + e.year(), + e.month(), + e.date(), + e.hour(), + e.minute(), + e.second(), + e.millisecond() + ]; + }), + (pn.toObject = function () { + var e = this; + return { + years: e.year(), + months: e.month(), + date: e.date(), + hours: e.hours(), + minutes: e.minutes(), + seconds: e.seconds(), + milliseconds: e.milliseconds() + }; + }), + (pn.toDate = function () { + return new Date(this.valueOf()); + }), + (pn.toISOString = function (e) { + if (!this.isValid()) return null; + var t = !0 !== e, + n = t ? this.clone().utc() : this; + return n.year() < 0 || 9999 < n.year() + ? U( + n, + t + ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' + : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ' + ) + : O(Date.prototype.toISOString) + ? t + ? this.toDate().toISOString() + : new Date(this.valueOf() + 60 * this.utcOffset() * 1e3) + .toISOString() + .replace('Z', U(n, 'Z')) + : U( + n, + t ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ' + ); + }), + (pn.inspect = function () { + if (!this.isValid()) return 'moment.invalid(/* ' + this._i + ' */)'; + var e, + t, + n, + s = 'moment', + i = ''; + return ( + this.isLocal() || + ((s = 0 === this.utcOffset() ? 'moment.utc' : 'moment.parseZone'), + (i = 'Z')), + (e = '[' + s + '("]'), + (t = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'), + (n = i + '[")]'), + this.format(e + t + '-MM-DD[T]HH:mm:ss.SSS' + n) + ); + }), + 'undefined' != typeof Symbol && + null != Symbol.for && + (pn[Symbol.for('nodejs.util.inspect.custom')] = function () { + return 'Moment<' + this.format() + '>'; + }), + (pn.toJSON = function () { + return this.isValid() ? this.toISOString() : null; + }), + (pn.toString = function () { + return this.clone() + .locale('en') + .format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + }), + (pn.unix = function () { + return Math.floor(this.valueOf() / 1e3); + }), + (pn.valueOf = function () { + return this._d.valueOf() - 6e4 * (this._offset || 0); + }), + (pn.creationData = function () { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + }), + (pn.eraName = function () { + for ( + var e, t = this.localeData().eras(), n = 0, s = t.length; + n < s; + ++n + ) { + if ( + ((e = this.clone().startOf('day').valueOf()), + t[n].since <= e && e <= t[n].until) + ) + return t[n].name; + if (t[n].until <= e && e <= t[n].since) return t[n].name; + } + return ''; + }), + (pn.eraNarrow = function () { + for ( + var e, t = this.localeData().eras(), n = 0, s = t.length; + n < s; + ++n + ) { + if ( + ((e = this.clone().startOf('day').valueOf()), + t[n].since <= e && e <= t[n].until) + ) + return t[n].narrow; + if (t[n].until <= e && e <= t[n].since) return t[n].narrow; + } + return ''; + }), + (pn.eraAbbr = function () { + for ( + var e, t = this.localeData().eras(), n = 0, s = t.length; + n < s; + ++n + ) { + if ( + ((e = this.clone().startOf('day').valueOf()), + t[n].since <= e && e <= t[n].until) + ) + return t[n].abbr; + if (t[n].until <= e && e <= t[n].since) return t[n].abbr; + } + return ''; + }), + (pn.eraYear = function () { + for ( + var e, t, n = this.localeData().eras(), s = 0, i = n.length; + s < i; + ++s + ) + if ( + ((e = n[s].since <= n[s].until ? 1 : -1), + (t = this.clone().startOf('day').valueOf()), + (n[s].since <= t && t <= n[s].until) || + (n[s].until <= t && t <= n[s].since)) + ) + return (this.year() - f(n[s].since).year()) * e + n[s].offset; + return this.year(); + }), + (pn.year = Le), + (pn.isLeapYear = function () { + return j(this.year()); + }), + (pn.weekYear = function (e) { + return cn.call( + this, + e, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy + ); + }), + (pn.isoWeekYear = function (e) { + return cn.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4); + }), + (pn.quarter = pn.quarters = + function (e) { + return null == e + ? Math.ceil((this.month() + 1) / 3) + : this.month(3 * (e - 1) + (this.month() % 3)); + }), + (pn.month = Ue), + (pn.daysInMonth = function () { + return xe(this.year(), this.month()); + }), + (pn.week = pn.weeks = + function (e) { + var t = this.localeData().week(this); + return null == e ? t : this.add(7 * (e - t), 'd'); + }), + (pn.isoWeek = pn.isoWeeks = + function (e) { + var t = Ae(this, 1, 4).week; + return null == e ? t : this.add(7 * (e - t), 'd'); + }), + (pn.weeksInYear = function () { + var e = this.localeData()._week; + return je(this.year(), e.dow, e.doy); + }), + (pn.weeksInWeekYear = function () { + var e = this.localeData()._week; + return je(this.weekYear(), e.dow, e.doy); + }), + (pn.isoWeeksInYear = function () { + return je(this.year(), 1, 4); + }), + (pn.isoWeeksInISOWeekYear = function () { + return je(this.isoWeekYear(), 1, 4); + }), + (pn.date = fn), + (pn.day = pn.days = + function (e) { + if (!this.isValid()) return null != e ? this : NaN; + var t, + n, + s = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + return null != e + ? ((t = e), + (n = this.localeData()), + (e = + 'string' != typeof t + ? t + : isNaN(t) + ? 'number' == typeof (t = n.weekdaysParse(t)) + ? t + : null + : parseInt(t, 10)), + this.add(e - s, 'd')) + : s; + }), + (pn.weekday = function (e) { + if (!this.isValid()) return null != e ? this : NaN; + var t = (this.day() + 7 - this.localeData()._week.dow) % 7; + return null == e ? t : this.add(e - t, 'd'); + }), + (pn.isoWeekday = function (e) { + if (!this.isValid()) return null != e ? this : NaN; + if (null == e) return this.day() || 7; + var t, + n, + s = + ((t = e), + (n = this.localeData()), + 'string' == typeof t + ? n.weekdaysParse(t) % 7 || 7 + : isNaN(t) + ? null + : t); + return this.day(this.day() % 7 ? s : s - 7); + }), + (pn.dayOfYear = function (e) { + var t = + Math.round( + (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5 + ) + 1; + return null == e ? t : this.add(e - t, 'd'); + }), + (pn.hour = pn.hours = tt), + (pn.minute = pn.minutes = mn), + (pn.second = pn.seconds = gn), + (pn.millisecond = pn.milliseconds = yn), + (pn.utcOffset = function (e, t, n) { + var s, + i = this._offset || 0; + if (!this.isValid()) return null != e ? this : NaN; + if (null == e) return this._isUTC ? i : Et(this); + if ('string' == typeof e) { + if (null === (e = Vt(he, e))) return this; + } else Math.abs(e) < 16 && !n && (e *= 60); + return ( + !this._isUTC && t && (s = Et(this)), + (this._offset = e), + (this._isUTC = !0), + null != s && this.add(s, 'm'), + i !== e && + (!t || this._changeInProgress + ? Bt(this, Zt(e - i, 'm'), 1, !1) + : this._changeInProgress || + ((this._changeInProgress = !0), + f.updateOffset(this, !0), + (this._changeInProgress = null))), + this + ); + }), + (pn.utc = function (e) { + return this.utcOffset(0, e); + }), + (pn.local = function (e) { + return ( + this._isUTC && + (this.utcOffset(0, e), + (this._isUTC = !1), + e && this.subtract(Et(this), 'm')), + this + ); + }), + (pn.parseZone = function () { + var e; + return ( + null != this._tzm + ? this.utcOffset(this._tzm, !1, !0) + : 'string' == typeof this._i && + (null != (e = Vt(le, this._i)) + ? this.utcOffset(e) + : this.utcOffset(0, !0)), + this + ); + }), + (pn.hasAlignedHourOffset = function (e) { + return ( + !!this.isValid() && + ((e = e ? Tt(e).utcOffset() : 0), (this.utcOffset() - e) % 60 == 0) + ); + }), + (pn.isDST = function () { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); + }), + (pn.isLocal = function () { + return !!this.isValid() && !this._isUTC; + }), + (pn.isUtcOffset = function () { + return !!this.isValid() && this._isUTC; + }), + (pn.isUtc = At), + (pn.isUTC = At), + (pn.zoneAbbr = function () { + return this._isUTC ? 'UTC' : ''; + }), + (pn.zoneName = function () { + return this._isUTC ? 'Coordinated Universal Time' : ''; + }), + (pn.dates = n('dates accessor is deprecated. Use date instead.', fn)), + (pn.months = n('months accessor is deprecated. Use month instead', Ue)), + (pn.years = n('years accessor is deprecated. Use year instead', Le)), + (pn.zone = n( + 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', + function (e, t) { + return null != e + ? ('string' != typeof e && (e = -e), this.utcOffset(e, t), this) + : -this.utcOffset(); + } + )), + (pn.isDSTShifted = n( + 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', + function () { + if (!r(this._isDSTShifted)) return this._isDSTShifted; + var e, + t = {}; + return ( + v(t, this), + (t = bt(t))._a + ? ((e = (t._isUTC ? _ : Tt)(t._a)), + (this._isDSTShifted = + this.isValid() && + 0 < + (function (e, t, n) { + for ( + var s = Math.min(e.length, t.length), + i = Math.abs(e.length - t.length), + r = 0, + a = 0; + a < s; + a++ + ) + ((n && e[a] !== t[a]) || (!n && Z(e[a]) !== Z(t[a]))) && + r++; + return r + i; + })(t._a, e.toArray()))) + : (this._isDSTShifted = !1), + this._isDSTShifted + ); + } + )); + var kn = x.prototype; + function Mn(e, t, n, s) { + var i = dt(), + r = _().set(s, t); + return i[n](r, e); + } + function Dn(e, t, n) { + if ((h(e) && ((t = e), (e = void 0)), (e = e || ''), null != t)) + return Mn(e, t, n, 'month'); + for (var s = [], i = 0; i < 12; i++) s[i] = Mn(e, i, n, 'month'); + return s; + } + function Sn(e, t, n, s) { + t = + ('boolean' == typeof e + ? h(t) && ((n = t), (t = void 0)) + : ((t = e), (e = !1), h((n = t)) && ((n = t), (t = void 0))), + t || ''); + var i, + r = dt(), + a = e ? r._week.dow : 0, + o = []; + if (null != n) return Mn(t, (n + a) % 7, s, 'day'); + for (i = 0; i < 7; i++) o[i] = Mn(t, (i + a) % 7, s, 'day'); + return o; + } + (kn.calendar = function (e, t, n) { + var s = this._calendar[e] || this._calendar.sameElse; + return O(s) ? s.call(t, n) : s; + }), + (kn.longDateFormat = function (e) { + var t = this._longDateFormat[e], + n = this._longDateFormat[e.toUpperCase()]; + return t || !n + ? t + : ((this._longDateFormat[e] = n + .match(N) + .map(function (e) { + return 'MMMM' === e || 'MM' === e || 'DD' === e || 'dddd' === e + ? e.slice(1) + : e; + }) + .join('')), + this._longDateFormat[e]); + }), + (kn.invalidDate = function () { + return this._invalidDate; + }), + (kn.ordinal = function (e) { + return this._ordinal.replace('%d', e); + }), + (kn.preparse = vn), + (kn.postformat = vn), + (kn.relativeTime = function (e, t, n, s) { + var i = this._relativeTime[n]; + return O(i) ? i(e, t, n, s) : i.replace(/%d/i, e); + }), + (kn.pastFuture = function (e, t) { + var n = this._relativeTime[0 < e ? 'future' : 'past']; + return O(n) ? n(t) : n.replace(/%s/i, t); + }), + (kn.set = function (e) { + var t, n; + for (n in e) + m(e, n) && (O((t = e[n])) ? (this[n] = t) : (this['_' + n] = t)); + (this._config = e), + (this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + + '|' + + /\d{1,2}/.source + )); + }), + (kn.eras = function (e, t) { + for ( + var n, s = this._eras || dt('en')._eras, i = 0, r = s.length; + i < r; + ++i + ) { + switch (typeof s[i].since) { + case 'string': + (n = f(s[i].since).startOf('day')), (s[i].since = n.valueOf()); + break; + } + switch (typeof s[i].until) { + case 'undefined': + s[i].until = 1 / 0; + break; + case 'string': + (n = f(s[i].until).startOf('day').valueOf()), + (s[i].until = n.valueOf()); + break; + } + } + return s; + }), + (kn.erasParse = function (e, t, n) { + var s, + i, + r, + a, + o, + u = this.eras(); + for (e = e.toUpperCase(), s = 0, i = u.length; s < i; ++s) + if ( + ((r = u[s].name.toUpperCase()), + (a = u[s].abbr.toUpperCase()), + (o = u[s].narrow.toUpperCase()), + n) + ) + switch (t) { + case 'N': + case 'NN': + case 'NNN': + if (a === e) return u[s]; + break; + case 'NNNN': + if (r === e) return u[s]; + break; + case 'NNNNN': + if (o === e) return u[s]; + break; + } + else if (0 <= [r, a, o].indexOf(e)) return u[s]; + }), + (kn.erasConvertYear = function (e, t) { + var n = e.since <= e.until ? 1 : -1; + return void 0 === t + ? f(e.since).year() + : f(e.since).year() + (t - e.offset) * n; + }), + (kn.erasAbbrRegex = function (e) { + return ( + m(this, '_erasAbbrRegex') || hn.call(this), + e ? this._erasAbbrRegex : this._erasRegex + ); + }), + (kn.erasNameRegex = function (e) { + return ( + m(this, '_erasNameRegex') || hn.call(this), + e ? this._erasNameRegex : this._erasRegex + ); + }), + (kn.erasNarrowRegex = function (e) { + return ( + m(this, '_erasNarrowRegex') || hn.call(this), + e ? this._erasNarrowRegex : this._erasRegex + ); + }), + (kn.months = function (e, t) { + return e + ? o(this._months) + ? this._months[e.month()] + : this._months[ + (this._months.isFormat || Pe).test(t) ? 'format' : 'standalone' + ][e.month()] + : o(this._months) + ? this._months + : this._months.standalone; + }), + (kn.monthsShort = function (e, t) { + return e + ? o(this._monthsShort) + ? this._monthsShort[e.month()] + : this._monthsShort[Pe.test(t) ? 'format' : 'standalone'][e.month()] + : o(this._monthsShort) + ? this._monthsShort + : this._monthsShort.standalone; + }), + (kn.monthsParse = function (e, t, n) { + var s, i, r; + if (this._monthsParseExact) + return function (e, t, n) { + var s, + i, + r, + a = e.toLocaleLowerCase(); + if (!this._monthsParse) + for ( + this._monthsParse = [], + this._longMonthsParse = [], + this._shortMonthsParse = [], + s = 0; + s < 12; + ++s + ) + (r = _([2e3, s])), + (this._shortMonthsParse[s] = this.monthsShort( + r, + '' + ).toLocaleLowerCase()), + (this._longMonthsParse[s] = this.months( + r, + '' + ).toLocaleLowerCase()); + return n + ? 'MMM' === t + ? -1 !== (i = we.call(this._shortMonthsParse, a)) + ? i + : null + : -1 !== (i = we.call(this._longMonthsParse, a)) + ? i + : null + : 'MMM' === t + ? -1 !== (i = we.call(this._shortMonthsParse, a)) || + -1 !== (i = we.call(this._longMonthsParse, a)) + ? i + : null + : -1 !== (i = we.call(this._longMonthsParse, a)) || + -1 !== (i = we.call(this._shortMonthsParse, a)) + ? i + : null; + }.call(this, e, t, n); + for ( + this._monthsParse || + ((this._monthsParse = []), + (this._longMonthsParse = []), + (this._shortMonthsParse = [])), + s = 0; + s < 12; + s++ + ) { + if ( + ((i = _([2e3, s])), + n && + !this._longMonthsParse[s] && + ((this._longMonthsParse[s] = new RegExp( + '^' + this.months(i, '').replace('.', '') + '$', + 'i' + )), + (this._shortMonthsParse[s] = new RegExp( + '^' + this.monthsShort(i, '').replace('.', '') + '$', + 'i' + ))), + n || + this._monthsParse[s] || + ((r = '^' + this.months(i, '') + '|^' + this.monthsShort(i, '')), + (this._monthsParse[s] = new RegExp(r.replace('.', ''), 'i'))), + n && 'MMMM' === t && this._longMonthsParse[s].test(e)) + ) + return s; + if (n && 'MMM' === t && this._shortMonthsParse[s].test(e)) return s; + if (!n && this._monthsParse[s].test(e)) return s; + } + }), + (kn.monthsRegex = function (e) { + return this._monthsParseExact + ? (m(this, '_monthsRegex') || He.call(this), + e ? this._monthsStrictRegex : this._monthsRegex) + : (m(this, '_monthsRegex') || (this._monthsRegex = We), + this._monthsStrictRegex && e + ? this._monthsStrictRegex + : this._monthsRegex); + }), + (kn.monthsShortRegex = function (e) { + return this._monthsParseExact + ? (m(this, '_monthsRegex') || He.call(this), + e ? this._monthsShortStrictRegex : this._monthsShortRegex) + : (m(this, '_monthsShortRegex') || (this._monthsShortRegex = Re), + this._monthsShortStrictRegex && e + ? this._monthsShortStrictRegex + : this._monthsShortRegex); + }), + (kn.week = function (e) { + return Ae(e, this._week.dow, this._week.doy).week; + }), + (kn.firstDayOfYear = function () { + return this._week.doy; + }), + (kn.firstDayOfWeek = function () { + return this._week.dow; + }), + (kn.weekdays = function (e, t) { + var n = o(this._weekdays) + ? this._weekdays + : this._weekdays[ + e && !0 !== e && this._weekdays.isFormat.test(t) + ? 'format' + : 'standalone' + ]; + return !0 === e ? Ie(n, this._week.dow) : e ? n[e.day()] : n; + }), + (kn.weekdaysMin = function (e) { + return !0 === e + ? Ie(this._weekdaysMin, this._week.dow) + : e + ? this._weekdaysMin[e.day()] + : this._weekdaysMin; + }), + (kn.weekdaysShort = function (e) { + return !0 === e + ? Ie(this._weekdaysShort, this._week.dow) + : e + ? this._weekdaysShort[e.day()] + : this._weekdaysShort; + }), + (kn.weekdaysParse = function (e, t, n) { + var s, i, r; + if (this._weekdaysParseExact) + return function (e, t, n) { + var s, + i, + r, + a = e.toLocaleLowerCase(); + if (!this._weekdaysParse) + for ( + this._weekdaysParse = [], + this._shortWeekdaysParse = [], + this._minWeekdaysParse = [], + s = 0; + s < 7; + ++s + ) + (r = _([2e3, 1]).day(s)), + (this._minWeekdaysParse[s] = this.weekdaysMin( + r, + '' + ).toLocaleLowerCase()), + (this._shortWeekdaysParse[s] = this.weekdaysShort( + r, + '' + ).toLocaleLowerCase()), + (this._weekdaysParse[s] = this.weekdays( + r, + '' + ).toLocaleLowerCase()); + return n + ? 'dddd' === t + ? -1 !== (i = we.call(this._weekdaysParse, a)) + ? i + : null + : 'ddd' === t + ? -1 !== (i = we.call(this._shortWeekdaysParse, a)) + ? i + : null + : -1 !== (i = we.call(this._minWeekdaysParse, a)) + ? i + : null + : 'dddd' === t + ? -1 !== (i = we.call(this._weekdaysParse, a)) || + -1 !== (i = we.call(this._shortWeekdaysParse, a)) || + -1 !== (i = we.call(this._minWeekdaysParse, a)) + ? i + : null + : 'ddd' === t + ? -1 !== (i = we.call(this._shortWeekdaysParse, a)) || + -1 !== (i = we.call(this._weekdaysParse, a)) || + -1 !== (i = we.call(this._minWeekdaysParse, a)) + ? i + : null + : -1 !== (i = we.call(this._minWeekdaysParse, a)) || + -1 !== (i = we.call(this._weekdaysParse, a)) || + -1 !== (i = we.call(this._shortWeekdaysParse, a)) + ? i + : null; + }.call(this, e, t, n); + for ( + this._weekdaysParse || + ((this._weekdaysParse = []), + (this._minWeekdaysParse = []), + (this._shortWeekdaysParse = []), + (this._fullWeekdaysParse = [])), + s = 0; + s < 7; + s++ + ) { + if ( + ((i = _([2e3, 1]).day(s)), + n && + !this._fullWeekdaysParse[s] && + ((this._fullWeekdaysParse[s] = new RegExp( + '^' + this.weekdays(i, '').replace('.', '\\.?') + '$', + 'i' + )), + (this._shortWeekdaysParse[s] = new RegExp( + '^' + this.weekdaysShort(i, '').replace('.', '\\.?') + '$', + 'i' + )), + (this._minWeekdaysParse[s] = new RegExp( + '^' + this.weekdaysMin(i, '').replace('.', '\\.?') + '$', + 'i' + ))), + this._weekdaysParse[s] || + ((r = + '^' + + this.weekdays(i, '') + + '|^' + + this.weekdaysShort(i, '') + + '|^' + + this.weekdaysMin(i, '')), + (this._weekdaysParse[s] = new RegExp(r.replace('.', ''), 'i'))), + n && 'dddd' === t && this._fullWeekdaysParse[s].test(e)) + ) + return s; + if (n && 'ddd' === t && this._shortWeekdaysParse[s].test(e)) return s; + if (n && 'dd' === t && this._minWeekdaysParse[s].test(e)) return s; + if (!n && this._weekdaysParse[s].test(e)) return s; + } + }), + (kn.weekdaysRegex = function (e) { + return this._weekdaysParseExact + ? (m(this, '_weekdaysRegex') || Qe.call(this), + e ? this._weekdaysStrictRegex : this._weekdaysRegex) + : (m(this, '_weekdaysRegex') || (this._weekdaysRegex = qe), + this._weekdaysStrictRegex && e + ? this._weekdaysStrictRegex + : this._weekdaysRegex); + }), + (kn.weekdaysShortRegex = function (e) { + return this._weekdaysParseExact + ? (m(this, '_weekdaysRegex') || Qe.call(this), + e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) + : (m(this, '_weekdaysShortRegex') || (this._weekdaysShortRegex = Be), + this._weekdaysShortStrictRegex && e + ? this._weekdaysShortStrictRegex + : this._weekdaysShortRegex); + }), + (kn.weekdaysMinRegex = function (e) { + return this._weekdaysParseExact + ? (m(this, '_weekdaysRegex') || Qe.call(this), + e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) + : (m(this, '_weekdaysMinRegex') || (this._weekdaysMinRegex = Je), + this._weekdaysMinStrictRegex && e + ? this._weekdaysMinStrictRegex + : this._weekdaysMinRegex); + }), + (kn.isPM = function (e) { + return 'p' === (e + '').toLowerCase().charAt(0); + }), + (kn.meridiem = function (e, t, n) { + return 11 < e ? (n ? 'pm' : 'PM') : n ? 'am' : 'AM'; + }), + lt('en', { + eras: [ + { + since: '0001-01-01', + until: 1 / 0, + offset: 1, + name: 'Anno Domini', + narrow: 'AD', + abbr: 'AD' + }, + { + since: '0000-12-31', + until: -1 / 0, + offset: 1, + name: 'Before Christ', + narrow: 'BC', + abbr: 'BC' + } + ], + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (e) { + var t = e % 10; + return ( + e + + (1 === Z((e % 100) / 10) + ? 'th' + : 1 == t + ? 'st' + : 2 == t + ? 'nd' + : 3 == t + ? 'rd' + : 'th') + ); + } + }), + (f.lang = n('moment.lang is deprecated. Use moment.locale instead.', lt)), + (f.langData = n( + 'moment.langData is deprecated. Use moment.localeData instead.', + dt + )); + var Yn = Math.abs; + function On(e, t, n, s) { + var i = Zt(t, n); + return ( + (e._milliseconds += s * i._milliseconds), + (e._days += s * i._days), + (e._months += s * i._months), + e._bubble() + ); + } + function bn(e) { + return e < 0 ? Math.floor(e) : Math.ceil(e); + } + function xn(e) { + return (4800 * e) / 146097; + } + function Tn(e) { + return (146097 * e) / 4800; + } + function Nn(e) { + return function () { + return this.as(e); + }; + } + var Pn = Nn('ms'), + Rn = Nn('s'), + Wn = Nn('m'), + Cn = Nn('h'), + Un = Nn('d'), + Hn = Nn('w'), + Fn = Nn('M'), + Ln = Nn('Q'), + Vn = Nn('y'); + function Gn(e) { + return function () { + return this.isValid() ? this._data[e] : NaN; + }; + } + var En = Gn('milliseconds'), + An = Gn('seconds'), + jn = Gn('minutes'), + In = Gn('hours'), + Zn = Gn('days'), + zn = Gn('months'), + $n = Gn('years'); + var qn = Math.round, + Bn = { ss: 44, s: 45, m: 45, h: 22, d: 26, w: null, M: 11 }; + function Jn(e, t, n, s) { + var i = Zt(e).abs(), + r = qn(i.as('s')), + a = qn(i.as('m')), + o = qn(i.as('h')), + u = qn(i.as('d')), + l = qn(i.as('M')), + h = qn(i.as('w')), + d = qn(i.as('y')), + c = + (r <= n.ss ? ['s', r] : r < n.s && ['ss', r]) || + (a <= 1 && ['m']) || + (a < n.m && ['mm', a]) || + (o <= 1 && ['h']) || + (o < n.h && ['hh', o]) || + (u <= 1 && ['d']) || + (u < n.d && ['dd', u]); + return ( + null != n.w && (c = c || (h <= 1 && ['w']) || (h < n.w && ['ww', h])), + ((c = c || + (l <= 1 && ['M']) || + (l < n.M && ['MM', l]) || + (d <= 1 && ['y']) || ['yy', d])[2] = t), + (c[3] = 0 < +e), + (c[4] = s), + function (e, t, n, s, i) { + return i.relativeTime(t || 1, !!n, e, s); + }.apply(null, c) + ); + } + var Qn = Math.abs; + function Xn(e) { + return (0 < e) - (e < 0) || +e; + } + function Kn() { + if (!this.isValid()) return this.localeData().invalidDate(); + var e, + t, + n, + s, + i, + r, + a, + o, + u = Qn(this._milliseconds) / 1e3, + l = Qn(this._days), + h = Qn(this._months), + d = this.asSeconds(); + return d + ? ((e = I(u / 60)), + (t = I(e / 60)), + (u %= 60), + (e %= 60), + (n = I(h / 12)), + (h %= 12), + (s = u ? u.toFixed(3).replace(/\.?0+$/, '') : ''), + (i = d < 0 ? '-' : ''), + (r = Xn(this._months) !== Xn(d) ? '-' : ''), + (a = Xn(this._days) !== Xn(d) ? '-' : ''), + (o = Xn(this._milliseconds) !== Xn(d) ? '-' : ''), + i + + 'P' + + (n ? r + n + 'Y' : '') + + (h ? r + h + 'M' : '') + + (l ? a + l + 'D' : '') + + (t || e || u ? 'T' : '') + + (t ? o + t + 'H' : '') + + (e ? o + e + 'M' : '') + + (u ? o + s + 'S' : '')) + : 'P0D'; + } + var es = Ct.prototype; + return ( + (es.isValid = function () { + return this._isValid; + }), + (es.abs = function () { + var e = this._data; + return ( + (this._milliseconds = Yn(this._milliseconds)), + (this._days = Yn(this._days)), + (this._months = Yn(this._months)), + (e.milliseconds = Yn(e.milliseconds)), + (e.seconds = Yn(e.seconds)), + (e.minutes = Yn(e.minutes)), + (e.hours = Yn(e.hours)), + (e.months = Yn(e.months)), + (e.years = Yn(e.years)), + this + ); + }), + (es.add = function (e, t) { + return On(this, e, t, 1); + }), + (es.subtract = function (e, t) { + return On(this, e, t, -1); + }), + (es.as = function (e) { + if (!this.isValid()) return NaN; + var t, + n, + s = this._milliseconds; + if ('month' === (e = V(e)) || 'quarter' === e || 'year' === e) + switch (((t = this._days + s / 864e5), (n = this._months + xn(t)), e)) { + case 'month': + return n; + case 'quarter': + return n / 3; + case 'year': + return n / 12; + } + else + switch (((t = this._days + Math.round(Tn(this._months))), e)) { + case 'week': + return t / 7 + s / 6048e5; + case 'day': + return t + s / 864e5; + case 'hour': + return 24 * t + s / 36e5; + case 'minute': + return 1440 * t + s / 6e4; + case 'second': + return 86400 * t + s / 1e3; + case 'millisecond': + return Math.floor(864e5 * t) + s; + default: + throw new Error('Unknown unit ' + e); + } + }), + (es.asMilliseconds = Pn), + (es.asSeconds = Rn), + (es.asMinutes = Wn), + (es.asHours = Cn), + (es.asDays = Un), + (es.asWeeks = Hn), + (es.asMonths = Fn), + (es.asQuarters = Ln), + (es.asYears = Vn), + (es.valueOf = function () { + return this.isValid() + ? this._milliseconds + + 864e5 * this._days + + (this._months % 12) * 2592e6 + + 31536e6 * Z(this._months / 12) + : NaN; + }), + (es._bubble = function () { + var e, + t, + n, + s, + i, + r = this._milliseconds, + a = this._days, + o = this._months, + u = this._data; + return ( + (0 <= r && 0 <= a && 0 <= o) || + (r <= 0 && a <= 0 && o <= 0) || + ((r += 864e5 * bn(Tn(o) + a)), (o = a = 0)), + (u.milliseconds = r % 1e3), + (e = I(r / 1e3)), + (u.seconds = e % 60), + (t = I(e / 60)), + (u.minutes = t % 60), + (n = I(t / 60)), + (u.hours = n % 24), + (a += I(n / 24)), + (o += i = I(xn(a))), + (a -= bn(Tn(i))), + (s = I(o / 12)), + (o %= 12), + (u.days = a), + (u.months = o), + (u.years = s), + this + ); + }), + (es.clone = function () { + return Zt(this); + }), + (es.get = function (e) { + return (e = V(e)), this.isValid() ? this[e + 's']() : NaN; + }), + (es.milliseconds = En), + (es.seconds = An), + (es.minutes = jn), + (es.hours = In), + (es.days = Zn), + (es.weeks = function () { + return I(this.days() / 7); + }), + (es.months = zn), + (es.years = $n), + (es.humanize = function (e, t) { + if (!this.isValid()) return this.localeData().invalidDate(); + var n, + s, + i = !1, + r = Bn; + return ( + 'object' == typeof e && ((t = e), (e = !1)), + 'boolean' == typeof e && (i = e), + 'object' == typeof t && + ((r = Object.assign({}, Bn, t)), + null != t.s && null == t.ss && (r.ss = t.s - 1)), + (n = this.localeData()), + (s = Jn(this, !i, r, n)), + i && (s = n.pastFuture(+this, s)), + n.postformat(s) + ); + }), + (es.toISOString = Kn), + (es.toString = Kn), + (es.toJSON = Kn), + (es.locale = tn), + (es.localeData = sn), + (es.toIsoString = n( + 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', + Kn + )), + (es.lang = nn), + C('X', 0, 0, 'unix'), + C('x', 0, 0, 'valueOf'), + ce('x', ue), + ce('X', /[+-]?\d+(\.\d{1,3})?/), + ye('X', function (e, t, n) { + n._d = new Date(1e3 * parseFloat(e)); + }), + ye('x', function (e, t, n) { + n._d = new Date(Z(e)); + }), + (f.version = '2.29.1'), + (e = Tt), + (f.fn = pn), + (f.min = function () { + return Rt('isBefore', [].slice.call(arguments, 0)); + }), + (f.max = function () { + return Rt('isAfter', [].slice.call(arguments, 0)); + }), + (f.now = function () { + return Date.now ? Date.now() : +new Date(); + }), + (f.utc = _), + (f.unix = function (e) { + return Tt(1e3 * e); + }), + (f.months = function (e, t) { + return Dn(e, t, 'months'); + }), + (f.isDate = a), + (f.locale = lt), + (f.invalid = w), + (f.duration = Zt), + (f.isMoment = M), + (f.weekdays = function (e, t, n) { + return Sn(e, t, n, 'weekdays'); + }), + (f.parseZone = function () { + return Tt.apply(null, arguments).parseZone(); + }), + (f.localeData = dt), + (f.isDuration = Ut), + (f.monthsShort = function (e, t) { + return Dn(e, t, 'monthsShort'); + }), + (f.weekdaysMin = function (e, t, n) { + return Sn(e, t, n, 'weekdaysMin'); + }), + (f.defineLocale = ht), + (f.updateLocale = function (e, t) { + var n, s, i; + return ( + null != t + ? ((i = st), + null != it[e] && null != it[e].parentLocale + ? it[e].set(b(it[e]._config, t)) + : (null != (s = ut(e)) && (i = s._config), + (t = b(i, t)), + null == s && (t.abbr = e), + ((n = new x(t)).parentLocale = it[e]), + (it[e] = n)), + lt(e)) + : null != it[e] && + (null != it[e].parentLocale + ? ((it[e] = it[e].parentLocale), e === lt() && lt(e)) + : null != it[e] && delete it[e]), + it[e] + ); + }), + (f.locales = function () { + return s(it); + }), + (f.weekdaysShort = function (e, t, n) { + return Sn(e, t, n, 'weekdaysShort'); + }), + (f.normalizeUnits = V), + (f.relativeTimeRounding = function (e) { + return void 0 === e ? qn : 'function' == typeof e && ((qn = e), !0); + }), + (f.relativeTimeThreshold = function (e, t) { + return ( + void 0 !== Bn[e] && + (void 0 === t ? Bn[e] : ((Bn[e] = t), 's' === e && (Bn.ss = t - 1), !0)) + ); + }), + (f.calendarFormat = function (e, t) { + var n = e.diff(t, 'days', !0); + return n < -6 + ? 'sameElse' + : n < -1 + ? 'lastWeek' + : n < 0 + ? 'lastDay' + : n < 1 + ? 'sameDay' + : n < 2 + ? 'nextDay' + : n < 7 + ? 'nextWeek' + : 'sameElse'; + }), + (f.prototype = pn), + (f.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', + DATE: 'YYYY-MM-DD', + TIME: 'HH:mm', + TIME_SECONDS: 'HH:mm:ss', + TIME_MS: 'HH:mm:ss.SSS', + WEEK: 'GGGG-[W]WW', + MONTH: 'YYYY-MM' + }), + f + ); +}); +//# sourceMappingURL=moment.min.js.map diff --git a/docs/src/js/thirdparty/mousetrap.js b/docs/src/js/thirdparty/mousetrap.js index dad90acd..ee172f7f 100644 --- a/docs/src/js/thirdparty/mousetrap.js +++ b/docs/src/js/thirdparty/mousetrap.js @@ -20,912 +20,923 @@ * @version 1.4.5 * @url craig.is/killing/mice */ -(function(window, document, undefined) { - - /** - * mapping of special keycodes to their corresponding keys - * - * everything in this dictionary cannot use keypress events - * so it has to be here to map to the correct keycodes for - * keyup/keydown events - * - * @type {Object} - */ - var _MAP = { - 8: 'backspace', - 9: 'tab', - 13: 'enter', - 16: 'shift', - 17: 'ctrl', - 18: 'alt', - 20: 'capslock', - 27: 'esc', - 32: 'space', - 33: 'pageup', - 34: 'pagedown', - 35: 'end', - 36: 'home', - 37: 'left', - 38: 'up', - 39: 'right', - 40: 'down', - 45: 'ins', - 46: 'del', - 91: 'meta', - 93: 'meta', - 224: 'meta' - }, - - /** - * mapping for special characters so they can support - * - * this dictionary is only used incase you want to bind a - * keyup or keydown event to one of these keys - * - * @type {Object} - */ - _KEYCODE_MAP = { - 106: '*', - 107: '+', - 109: '-', - 110: '.', - 111 : '/', - 186: ';', - 187: '=', - 188: ',', - 189: '-', - 190: '.', - 191: '/', - 192: '`', - 219: '[', - 220: '\\', - 221: ']', - 222: '\'' - }, - - /** - * this is a mapping of keys that require shift on a US keypad - * back to the non shift equivelents - * - * this is so you can use keyup events with these keys - * - * note that this will only work reliably on US keyboards - * - * @type {Object} - */ - _SHIFT_MAP = { - '~': '`', - '!': '1', - '@': '2', - '#': '3', - '$': '4', - '%': '5', - '^': '6', - '&': '7', - '*': '8', - '(': '9', - ')': '0', - '_': '-', - '+': '=', - ':': ';', - '\"': '\'', - '<': ',', - '>': '.', - '?': '/', - '|': '\\' - }, - - /** - * this is a list of special strings you can use to map - * to modifier keys when you specify your keyboard shortcuts - * - * @type {Object} - */ - _SPECIAL_ALIASES = { - 'option': 'alt', - 'command': 'meta', - 'return': 'enter', - 'escape': 'esc', - 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl' - }, - - /** - * variable to store the flipped version of _MAP from above - * needed to check if we should use keypress or not when no action - * is specified - * - * @type {Object|undefined} - */ - _REVERSE_MAP, - - /** - * a list of all the callbacks setup via Mousetrap.bind() - * - * @type {Object} - */ - _callbacks = {}, - - /** - * direct map of string combinations to callbacks used for trigger() - * - * @type {Object} - */ - _directMap = {}, - - /** - * keeps track of what level each sequence is at since multiple - * sequences can start out with the same sequence - * - * @type {Object} - */ - _sequenceLevels = {}, - - /** - * variable to store the setTimeout call - * - * @type {null|number} - */ - _resetTimer, - - /** - * temporary state where we will ignore the next keyup - * - * @type {boolean|string} - */ - _ignoreNextKeyup = false, - - /** - * temporary state where we will ignore the next keypress - * - * @type {boolean} - */ - _ignoreNextKeypress = false, - - /** - * are we currently inside of a sequence? - * type of action ("keyup" or "keydown" or "keypress") or false - * - * @type {boolean|string} - */ - _nextExpectedAction = false; - - /** - * loop through the f keys, f1 to f19 and add them to the map - * programatically - */ - for (var i = 1; i < 20; ++i) { - _MAP[111 + i] = 'f' + i; - } - - /** - * loop through to map numbers on the numeric keypad - */ - for (i = 0; i <= 9; ++i) { - _MAP[i + 96] = i; - } - - /** - * cross browser add event method - * - * @param {Element|HTMLDocument} object - * @param {string} type - * @param {Function} callback - * @returns void - */ - function _addEvent(object, type, callback) { - if (object.addEventListener) { - object.addEventListener(type, callback, false); - return; - } - - object.attachEvent('on' + type, callback); - } - - /** - * takes the event and returns the key character - * - * @param {Event} e - * @return {string} - */ - function _characterFromEvent(e) { - - // for keypress events we should return the character as is - if (e.type == 'keypress') { - var character = String.fromCharCode(e.which); - - // if the shift key is not pressed then it is safe to assume - // that we want the character to be lowercase. this means if - // you accidentally have caps lock on then your key bindings - // will continue to work - // - // the only side effect that might not be desired is if you - // bind something like 'A' cause you want to trigger an - // event when capital A is pressed caps lock will no longer - // trigger the event. shift+a will though. - if (!e.shiftKey) { - character = character.toLowerCase(); - } - - return character; - } - - // for non keypress events the special maps are needed - if (_MAP[e.which]) { - return _MAP[e.which]; - } - - if (_KEYCODE_MAP[e.which]) { - return _KEYCODE_MAP[e.which]; - } - - // if it is not in the special map - - // with keydown and keyup events the character seems to always - // come in as an uppercase character whether you are pressing shift - // or not. we should make sure it is always lowercase for comparisons - return String.fromCharCode(e.which).toLowerCase(); - } - - /** - * checks if two arrays are equal - * - * @param {Array} modifiers1 - * @param {Array} modifiers2 - * @returns {boolean} - */ - function _modifiersMatch(modifiers1, modifiers2) { - return modifiers1.sort().join(',') === modifiers2.sort().join(','); - } - - /** - * resets all sequence counters except for the ones passed in - * - * @param {Object} doNotReset - * @returns void - */ - function _resetSequences(doNotReset) { - doNotReset = doNotReset || {}; - - var activeSequences = false, - key; - - for (key in _sequenceLevels) { - if (doNotReset[key]) { - activeSequences = true; - continue; - } - _sequenceLevels[key] = 0; - } - - if (!activeSequences) { - _nextExpectedAction = false; - } - } - - /** - * finds all callbacks that match based on the keycode, modifiers, - * and action - * - * @param {string} character - * @param {Array} modifiers - * @param {Event|Object} e - * @param {string=} sequenceName - name of the sequence we are looking for - * @param {string=} combination - * @param {number=} level - * @returns {Array} - */ - function _getMatches(character, modifiers, e, sequenceName, combination, level) { - var i, - callback, - matches = [], - action = e.type; - - // if there are no events related to this keycode - if (!_callbacks[character]) { - return []; - } - - // if a modifier key is coming up on its own we should allow it - if (action == 'keyup' && _isModifier(character)) { - modifiers = [character]; - } - - // loop through all callbacks for the key that was pressed - // and see if any of them match - for (i = 0; i < _callbacks[character].length; ++i) { - callback = _callbacks[character][i]; - - // if a sequence name is not specified, but this is a sequence at - // the wrong level then move onto the next match - if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) { - continue; - } - - // if the action we are looking for doesn't match the action we got - // then we should keep going - if (action != callback.action) { - continue; - } - - // if this is a keypress event and the meta key and control key - // are not pressed that means that we need to only look at the - // character, otherwise check the modifiers as well - // - // chrome will not fire a keypress if meta or control is down - // safari will fire a keypress if meta or meta+shift is down - // firefox will fire a keypress if meta or control is down - if ((action == 'keypress' && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) { - - // when you bind a combination or sequence a second time it - // should overwrite the first one. if a sequenceName or - // combination is specified in this call it does just that - // - // @todo make deleting its own method? - var deleteCombo = !sequenceName && callback.combo == combination; - var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level; - if (deleteCombo || deleteSequence) { - _callbacks[character].splice(i, 1); - } - - matches.push(callback); - } - } - - return matches; - } - - /** - * takes a key event and figures out what the modifiers are - * - * @param {Event} e - * @returns {Array} - */ - function _eventModifiers(e) { - var modifiers = []; - - if (e.shiftKey) { - modifiers.push('shift'); - } - - if (e.altKey) { - modifiers.push('alt'); - } - - if (e.ctrlKey) { - modifiers.push('ctrl'); - } - - if (e.metaKey) { - modifiers.push('meta'); - } - - return modifiers; - } - - /** - * actually calls the callback function - * - * if your callback function returns false this will use the jquery - * convention - prevent default and stop propogation on the event - * - * @param {Function} callback - * @param {Event} e - * @returns void - */ - function _fireCallback(callback, e, combo) { - - // if this event should not happen stop here - if (Mousetrap.stopCallback(e, e.target || e.srcElement, combo)) { - return; - } - - if (callback(e, combo) === false) { - if (e.preventDefault) { - e.preventDefault(); - } - - if (e.stopPropagation) { - e.stopPropagation(); - } - - e.returnValue = false; - e.cancelBubble = true; - } - } - - /** - * handles a character key event - * - * @param {string} character - * @param {Array} modifiers - * @param {Event} e - * @returns void - */ - function _handleKey(character, modifiers, e) { - var callbacks = _getMatches(character, modifiers, e), - i, - doNotReset = {}, - maxLevel = 0, - processedSequenceCallback = false; - - // Calculate the maxLevel for sequences so we can only execute the longest callback sequence - for (i = 0; i < callbacks.length; ++i) { - if (callbacks[i].seq) { - maxLevel = Math.max(maxLevel, callbacks[i].level); - } - } - - // loop through matching callbacks for this key event - for (i = 0; i < callbacks.length; ++i) { - - // fire for all sequence callbacks - // this is because if for example you have multiple sequences - // bound such as "g i" and "g t" they both need to fire the - // callback for matching g cause otherwise you can only ever - // match the first one - if (callbacks[i].seq) { - - // only fire callbacks for the maxLevel to prevent - // subsequences from also firing - // - // for example 'a option b' should not cause 'option b' to fire - // even though 'option b' is part of the other sequence - // - // any sequences that do not match here will be discarded - // below by the _resetSequences call - if (callbacks[i].level != maxLevel) { - continue; - } - - processedSequenceCallback = true; - - // keep a list of which sequences were matches for later - doNotReset[callbacks[i].seq] = 1; - _fireCallback(callbacks[i].callback, e, callbacks[i].combo); - continue; - } - - // if there were no sequence matches but we are still here - // that means this is a regular match so we should fire that - if (!processedSequenceCallback) { - _fireCallback(callbacks[i].callback, e, callbacks[i].combo); - } - } - - // if the key you pressed matches the type of sequence without - // being a modifier (ie "keyup" or "keypress") then we should - // reset all sequences that were not matched by this event - // - // this is so, for example, if you have the sequence "h a t" and you - // type "h e a r t" it does not match. in this case the "e" will - // cause the sequence to reset - // - // modifier keys are ignored because you can have a sequence - // that contains modifiers such as "enter ctrl+space" and in most - // cases the modifier key will be pressed before the next key - // - // also if you have a sequence such as "ctrl+b a" then pressing the - // "b" key will trigger a "keypress" and a "keydown" - // - // the "keydown" is expected when there is a modifier, but the - // "keypress" ends up matching the _nextExpectedAction since it occurs - // after and that causes the sequence to reset - // - // we ignore keypresses in a sequence that directly follow a keydown - // for the same character - var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress; - if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) { - _resetSequences(doNotReset); - } - - _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown'; - } - - /** - * handles a keydown event - * - * @param {Event} e - * @returns void - */ - function _handleKeyEvent(e) { - - // normalize e.which for key events - // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion - if (typeof e.which !== 'number') { - e.which = e.keyCode; - } - - var character = _characterFromEvent(e); - - // no character found then stop - if (!character) { - return; - } - - // need to use === for the character check because the character can be 0 - if (e.type == 'keyup' && _ignoreNextKeyup === character) { - _ignoreNextKeyup = false; - return; - } - - Mousetrap.handleKey(character, _eventModifiers(e), e); - } - - /** - * determines if the keycode specified is a modifier key or not - * - * @param {string} key - * @returns {boolean} - */ - function _isModifier(key) { - return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta'; - } - - /** - * called to set a 1 second timeout on the specified sequence - * - * this is so after each key press in the sequence you have 1 second - * to press the next key before you have to start over - * - * @returns void - */ - function _resetSequenceTimer() { - clearTimeout(_resetTimer); - _resetTimer = setTimeout(_resetSequences, 1000); - } - - /** - * reverses the map lookup so that we can look for specific keys - * to see what can and can't use keypress - * - * @return {Object} - */ - function _getReverseMap() { - if (!_REVERSE_MAP) { - _REVERSE_MAP = {}; - for (var key in _MAP) { - - // pull out the numeric keypad from here cause keypress should - // be able to detect the keys from the character - if (key > 95 && key < 112) { - continue; - } - - if (_MAP.hasOwnProperty(key)) { - _REVERSE_MAP[_MAP[key]] = key; - } - } - } - return _REVERSE_MAP; - } - - /** - * picks the best action based on the key combination - * - * @param {string} key - character for key - * @param {Array} modifiers - * @param {string=} action passed in - */ - function _pickBestAction(key, modifiers, action) { - - // if no action was picked in we should try to pick the one - // that we think would work best for this key - if (!action) { - action = _getReverseMap()[key] ? 'keydown' : 'keypress'; - } - - // modifier keys don't work as expected with keypress, - // switch to keydown - if (action == 'keypress' && modifiers.length) { - action = 'keydown'; - } - - return action; - } - - /** - * binds a key sequence to an event - * - * @param {string} combo - combo specified in bind call - * @param {Array} keys - * @param {Function} callback - * @param {string=} action - * @returns void - */ - function _bindSequence(combo, keys, callback, action) { - - // start off by adding a sequence level record for this combination - // and setting the level to 0 - _sequenceLevels[combo] = 0; - - /** - * callback to increase the sequence level for this sequence and reset - * all other sequences that were active - * - * @param {string} nextAction - * @returns {Function} - */ - function _increaseSequence(nextAction) { - return function() { - _nextExpectedAction = nextAction; - ++_sequenceLevels[combo]; - _resetSequenceTimer(); - }; - } - - /** - * wraps the specified callback inside of another function in order - * to reset all sequence counters as soon as this sequence is done - * - * @param {Event} e - * @returns void - */ - function _callbackAndReset(e) { - _fireCallback(callback, e, combo); - - // we should ignore the next key up if the action is key down - // or keypress. this is so if you finish a sequence and - // release the key the final key will not trigger a keyup - if (action !== 'keyup') { - _ignoreNextKeyup = _characterFromEvent(e); - } - - // weird race condition if a sequence ends with the key - // another sequence begins with - setTimeout(_resetSequences, 10); - } - - // loop through keys one at a time and bind the appropriate callback - // function. for any key leading up to the final one it should - // increase the sequence. after the final, it should reset all sequences - // - // if an action is specified in the original bind call then that will - // be used throughout. otherwise we will pass the action that the - // next key in the sequence should match. this allows a sequence - // to mix and match keypress and keydown events depending on which - // ones are better suited to the key provided - for (var i = 0; i < keys.length; ++i) { - var isFinal = i + 1 === keys.length; - var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action); - _bindSingle(keys[i], wrappedCallback, action, combo, i); - } - } - - /** - * Converts from a string key combination to an array - * - * @param {string} combination like "command+shift+l" - * @return {Array} - */ - function _keysFromString(combination) { - if (combination === '+') { - return ['+']; - } - - return combination.split('+'); - } - - /** - * Gets info for a specific key combination - * - * @param {string} combination key combination ("command+s" or "a" or "*") - * @param {string=} action - * @returns {Object} - */ - function _getKeyInfo(combination, action) { - var keys, - key, - i, - modifiers = []; - - // take the keys from this pattern and figure out what the actual - // pattern is all about - keys = _keysFromString(combination); - - for (i = 0; i < keys.length; ++i) { - key = keys[i]; - - // normalize key names - if (_SPECIAL_ALIASES[key]) { - key = _SPECIAL_ALIASES[key]; - } - - // if this is not a keypress event then we should - // be smart about using shift keys - // this will only work for US keyboards however - if (action && action != 'keypress' && _SHIFT_MAP[key]) { - key = _SHIFT_MAP[key]; - modifiers.push('shift'); - } - - // if this key is a modifier then add it to the list of modifiers - if (_isModifier(key)) { - modifiers.push(key); - } - } - - // depending on what the key combination is - // we will try to pick the best event for it - action = _pickBestAction(key, modifiers, action); - - return { - key: key, - modifiers: modifiers, - action: action - }; - } - - /** - * binds a single keyboard combination - * - * @param {string} combination - * @param {Function} callback - * @param {string=} action - * @param {string=} sequenceName - name of sequence if part of sequence - * @param {number=} level - what part of the sequence the command is - * @returns void - */ - function _bindSingle(combination, callback, action, sequenceName, level) { - - // store a direct mapped reference for use with Mousetrap.trigger - _directMap[combination + ':' + action] = callback; - - // make sure multiple spaces in a row become a single space - combination = combination.replace(/\s+/g, ' '); - - var sequence = combination.split(' '), - info; - - // if this pattern is a sequence of keys then run through this method - // to reprocess each pattern one key at a time - if (sequence.length > 1) { - _bindSequence(combination, sequence, callback, action); - return; - } - - info = _getKeyInfo(combination, action); - - // make sure to initialize array if this is the first time - // a callback is added for this key - _callbacks[info.key] = _callbacks[info.key] || []; - - // remove an existing match if there is one - _getMatches(info.key, info.modifiers, {type: info.action}, sequenceName, combination, level); - - // add this call back to the array - // if it is a sequence put it at the beginning - // if not put it at the end - // - // this is important because the way these are processed expects - // the sequence ones to come first - _callbacks[info.key][sequenceName ? 'unshift' : 'push']({ - callback: callback, - modifiers: info.modifiers, - action: info.action, - seq: sequenceName, - level: level, - combo: combination - }); - } - - /** - * binds multiple combinations to the same callback - * - * @param {Array} combinations - * @param {Function} callback - * @param {string|undefined} action - * @returns void - */ - function _bindMultiple(combinations, callback, action) { - for (var i = 0; i < combinations.length; ++i) { - _bindSingle(combinations[i], callback, action); - } - } - - // start! - _addEvent(document, 'keypress', _handleKeyEvent); - _addEvent(document, 'keydown', _handleKeyEvent); - _addEvent(document, 'keyup', _handleKeyEvent); - - var Mousetrap = { - - /** - * binds an event to mousetrap - * - * can be a single key, a combination of keys separated with +, - * an array of keys, or a sequence of keys separated by spaces - * - * be sure to list the modifier keys first to make sure that the - * correct key ends up getting bound (the last key in the pattern) - * - * @param {string|Array} keys - * @param {Function} callback - * @param {string=} action - 'keypress', 'keydown', or 'keyup' - * @returns void - */ - bind: function(keys, callback, action) { - keys = keys instanceof Array ? keys : [keys]; - _bindMultiple(keys, callback, action); - return this; - }, - - /** - * unbinds an event to mousetrap - * - * the unbinding sets the callback function of the specified key combo - * to an empty function and deletes the corresponding key in the - * _directMap dict. - * - * TODO: actually remove this from the _callbacks dictionary instead - * of binding an empty function - * - * the keycombo+action has to be exactly the same as - * it was defined in the bind method - * - * @param {string|Array} keys - * @param {string} action - * @returns void - */ - unbind: function(keys, action) { - return Mousetrap.bind(keys, function() {}, action); - }, - - /** - * triggers an event that has already been bound - * - * @param {string} keys - * @param {string=} action - * @returns void - */ - trigger: function(keys, action) { - if (_directMap[keys + ':' + action]) { - _directMap[keys + ':' + action]({}, keys); - } - return this; - }, - - /** - * resets the library back to its initial state. this is useful - * if you want to clear out the current keyboard shortcuts and bind - * new ones - for example if you switch to another page - * - * @returns void - */ - reset: function() { - _callbacks = {}; - _directMap = {}; - return this; - }, - - /** - * should we stop this event before firing off callbacks - * - * @param {Event} e - * @param {Element} element - * @return {boolean} - */ - stopCallback: function(e, element) { - - // if the element has the class "mousetrap" then no need to stop - if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) { - return false; - } - - // stop for input, select, and textarea - return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable; - }, - - /** - * exposes _handleKey publicly so it can be overwritten by extensions - */ - handleKey: _handleKey - }; - - // expose mousetrap to the global object - window.Mousetrap = Mousetrap; - - // expose mousetrap as an AMD module - if (typeof define === 'function' && define.amd) { - define(Mousetrap); - } -}) (window, document); +(function (window, document, undefined) { + /** + * mapping of special keycodes to their corresponding keys + * + * everything in this dictionary cannot use keypress events + * so it has to be here to map to the correct keycodes for + * keyup/keydown events + * + * @type {Object} + */ + var _MAP = { + 8: 'backspace', + 9: 'tab', + 13: 'enter', + 16: 'shift', + 17: 'ctrl', + 18: 'alt', + 20: 'capslock', + 27: 'esc', + 32: 'space', + 33: 'pageup', + 34: 'pagedown', + 35: 'end', + 36: 'home', + 37: 'left', + 38: 'up', + 39: 'right', + 40: 'down', + 45: 'ins', + 46: 'del', + 91: 'meta', + 93: 'meta', + 224: 'meta' + }, + /** + * mapping for special characters so they can support + * + * this dictionary is only used incase you want to bind a + * keyup or keydown event to one of these keys + * + * @type {Object} + */ + _KEYCODE_MAP = { + 106: '*', + 107: '+', + 109: '-', + 110: '.', + 111: '/', + 186: ';', + 187: '=', + 188: ',', + 189: '-', + 190: '.', + 191: '/', + 192: '`', + 219: '[', + 220: '\\', + 221: ']', + 222: "'" + }, + /** + * this is a mapping of keys that require shift on a US keypad + * back to the non shift equivelents + * + * this is so you can use keyup events with these keys + * + * note that this will only work reliably on US keyboards + * + * @type {Object} + */ + _SHIFT_MAP = { + '~': '`', + '!': '1', + '@': '2', + '#': '3', + $: '4', + '%': '5', + '^': '6', + '&': '7', + '*': '8', + '(': '9', + ')': '0', + _: '-', + '+': '=', + ':': ';', + '"': "'", + '<': ',', + '>': '.', + '?': '/', + '|': '\\' + }, + /** + * this is a list of special strings you can use to map + * to modifier keys when you specify your keyboard shortcuts + * + * @type {Object} + */ + _SPECIAL_ALIASES = { + option: 'alt', + command: 'meta', + return: 'enter', + escape: 'esc', + mod: /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl' + }, + /** + * variable to store the flipped version of _MAP from above + * needed to check if we should use keypress or not when no action + * is specified + * + * @type {Object|undefined} + */ + _REVERSE_MAP, + /** + * a list of all the callbacks setup via Mousetrap.bind() + * + * @type {Object} + */ + _callbacks = {}, + /** + * direct map of string combinations to callbacks used for trigger() + * + * @type {Object} + */ + _directMap = {}, + /** + * keeps track of what level each sequence is at since multiple + * sequences can start out with the same sequence + * + * @type {Object} + */ + _sequenceLevels = {}, + /** + * variable to store the setTimeout call + * + * @type {null|number} + */ + _resetTimer, + /** + * temporary state where we will ignore the next keyup + * + * @type {boolean|string} + */ + _ignoreNextKeyup = false, + /** + * temporary state where we will ignore the next keypress + * + * @type {boolean} + */ + _ignoreNextKeypress = false, + /** + * are we currently inside of a sequence? + * type of action ("keyup" or "keydown" or "keypress") or false + * + * @type {boolean|string} + */ + _nextExpectedAction = false; + + /** + * loop through the f keys, f1 to f19 and add them to the map + * programatically + */ + for (var i = 1; i < 20; ++i) { + _MAP[111 + i] = 'f' + i; + } + + /** + * loop through to map numbers on the numeric keypad + */ + for (i = 0; i <= 9; ++i) { + _MAP[i + 96] = i; + } + + /** + * cross browser add event method + * + * @param {Element|HTMLDocument} object + * @param {string} type + * @param {Function} callback + * @returns void + */ + function _addEvent(object, type, callback) { + if (object.addEventListener) { + object.addEventListener(type, callback, false); + return; + } + + object.attachEvent('on' + type, callback); + } + + /** + * takes the event and returns the key character + * + * @param {Event} e + * @return {string} + */ + function _characterFromEvent(e) { + // for keypress events we should return the character as is + if (e.type == 'keypress') { + var character = String.fromCharCode(e.which); + + // if the shift key is not pressed then it is safe to assume + // that we want the character to be lowercase. this means if + // you accidentally have caps lock on then your key bindings + // will continue to work + // + // the only side effect that might not be desired is if you + // bind something like 'A' cause you want to trigger an + // event when capital A is pressed caps lock will no longer + // trigger the event. shift+a will though. + if (!e.shiftKey) { + character = character.toLowerCase(); + } + + return character; + } + + // for non keypress events the special maps are needed + if (_MAP[e.which]) { + return _MAP[e.which]; + } + + if (_KEYCODE_MAP[e.which]) { + return _KEYCODE_MAP[e.which]; + } + + // if it is not in the special map + + // with keydown and keyup events the character seems to always + // come in as an uppercase character whether you are pressing shift + // or not. we should make sure it is always lowercase for comparisons + return String.fromCharCode(e.which).toLowerCase(); + } + + /** + * checks if two arrays are equal + * + * @param {Array} modifiers1 + * @param {Array} modifiers2 + * @returns {boolean} + */ + function _modifiersMatch(modifiers1, modifiers2) { + return modifiers1.sort().join(',') === modifiers2.sort().join(','); + } + + /** + * resets all sequence counters except for the ones passed in + * + * @param {Object} doNotReset + * @returns void + */ + function _resetSequences(doNotReset) { + doNotReset = doNotReset || {}; + + var activeSequences = false, + key; + + for (key in _sequenceLevels) { + if (doNotReset[key]) { + activeSequences = true; + continue; + } + _sequenceLevels[key] = 0; + } + + if (!activeSequences) { + _nextExpectedAction = false; + } + } + + /** + * finds all callbacks that match based on the keycode, modifiers, + * and action + * + * @param {string} character + * @param {Array} modifiers + * @param {Event|Object} e + * @param {string=} sequenceName - name of the sequence we are looking for + * @param {string=} combination + * @param {number=} level + * @returns {Array} + */ + function _getMatches( + character, + modifiers, + e, + sequenceName, + combination, + level + ) { + var i, + callback, + matches = [], + action = e.type; + + // if there are no events related to this keycode + if (!_callbacks[character]) { + return []; + } + + // if a modifier key is coming up on its own we should allow it + if (action == 'keyup' && _isModifier(character)) { + modifiers = [character]; + } + + // loop through all callbacks for the key that was pressed + // and see if any of them match + for (i = 0; i < _callbacks[character].length; ++i) { + callback = _callbacks[character][i]; + + // if a sequence name is not specified, but this is a sequence at + // the wrong level then move onto the next match + if ( + !sequenceName && + callback.seq && + _sequenceLevels[callback.seq] != callback.level + ) { + continue; + } + + // if the action we are looking for doesn't match the action we got + // then we should keep going + if (action != callback.action) { + continue; + } + + // if this is a keypress event and the meta key and control key + // are not pressed that means that we need to only look at the + // character, otherwise check the modifiers as well + // + // chrome will not fire a keypress if meta or control is down + // safari will fire a keypress if meta or meta+shift is down + // firefox will fire a keypress if meta or control is down + if ( + (action == 'keypress' && !e.metaKey && !e.ctrlKey) || + _modifiersMatch(modifiers, callback.modifiers) + ) { + // when you bind a combination or sequence a second time it + // should overwrite the first one. if a sequenceName or + // combination is specified in this call it does just that + // + // @todo make deleting its own method? + var deleteCombo = !sequenceName && callback.combo == combination; + var deleteSequence = + sequenceName && + callback.seq == sequenceName && + callback.level == level; + if (deleteCombo || deleteSequence) { + _callbacks[character].splice(i, 1); + } + + matches.push(callback); + } + } + + return matches; + } + + /** + * takes a key event and figures out what the modifiers are + * + * @param {Event} e + * @returns {Array} + */ + function _eventModifiers(e) { + var modifiers = []; + + if (e.shiftKey) { + modifiers.push('shift'); + } + + if (e.altKey) { + modifiers.push('alt'); + } + + if (e.ctrlKey) { + modifiers.push('ctrl'); + } + + if (e.metaKey) { + modifiers.push('meta'); + } + + return modifiers; + } + + /** + * actually calls the callback function + * + * if your callback function returns false this will use the jquery + * convention - prevent default and stop propogation on the event + * + * @param {Function} callback + * @param {Event} e + * @returns void + */ + function _fireCallback(callback, e, combo) { + // if this event should not happen stop here + if (Mousetrap.stopCallback(e, e.target || e.srcElement, combo)) { + return; + } + + if (callback(e, combo) === false) { + if (e.preventDefault) { + e.preventDefault(); + } + + if (e.stopPropagation) { + e.stopPropagation(); + } + + e.returnValue = false; + e.cancelBubble = true; + } + } + + /** + * handles a character key event + * + * @param {string} character + * @param {Array} modifiers + * @param {Event} e + * @returns void + */ + function _handleKey(character, modifiers, e) { + var callbacks = _getMatches(character, modifiers, e), + i, + doNotReset = {}, + maxLevel = 0, + processedSequenceCallback = false; + + // Calculate the maxLevel for sequences so we can only execute the longest callback sequence + for (i = 0; i < callbacks.length; ++i) { + if (callbacks[i].seq) { + maxLevel = Math.max(maxLevel, callbacks[i].level); + } + } + + // loop through matching callbacks for this key event + for (i = 0; i < callbacks.length; ++i) { + // fire for all sequence callbacks + // this is because if for example you have multiple sequences + // bound such as "g i" and "g t" they both need to fire the + // callback for matching g cause otherwise you can only ever + // match the first one + if (callbacks[i].seq) { + // only fire callbacks for the maxLevel to prevent + // subsequences from also firing + // + // for example 'a option b' should not cause 'option b' to fire + // even though 'option b' is part of the other sequence + // + // any sequences that do not match here will be discarded + // below by the _resetSequences call + if (callbacks[i].level != maxLevel) { + continue; + } + + processedSequenceCallback = true; + + // keep a list of which sequences were matches for later + doNotReset[callbacks[i].seq] = 1; + _fireCallback(callbacks[i].callback, e, callbacks[i].combo); + continue; + } + + // if there were no sequence matches but we are still here + // that means this is a regular match so we should fire that + if (!processedSequenceCallback) { + _fireCallback(callbacks[i].callback, e, callbacks[i].combo); + } + } + + // if the key you pressed matches the type of sequence without + // being a modifier (ie "keyup" or "keypress") then we should + // reset all sequences that were not matched by this event + // + // this is so, for example, if you have the sequence "h a t" and you + // type "h e a r t" it does not match. in this case the "e" will + // cause the sequence to reset + // + // modifier keys are ignored because you can have a sequence + // that contains modifiers such as "enter ctrl+space" and in most + // cases the modifier key will be pressed before the next key + // + // also if you have a sequence such as "ctrl+b a" then pressing the + // "b" key will trigger a "keypress" and a "keydown" + // + // the "keydown" is expected when there is a modifier, but the + // "keypress" ends up matching the _nextExpectedAction since it occurs + // after and that causes the sequence to reset + // + // we ignore keypresses in a sequence that directly follow a keydown + // for the same character + var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress; + if ( + e.type == _nextExpectedAction && + !_isModifier(character) && + !ignoreThisKeypress + ) { + _resetSequences(doNotReset); + } + + _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown'; + } + + /** + * handles a keydown event + * + * @param {Event} e + * @returns void + */ + function _handleKeyEvent(e) { + // normalize e.which for key events + // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion + if (typeof e.which !== 'number') { + e.which = e.keyCode; + } + + var character = _characterFromEvent(e); + + // no character found then stop + if (!character) { + return; + } + + // need to use === for the character check because the character can be 0 + if (e.type == 'keyup' && _ignoreNextKeyup === character) { + _ignoreNextKeyup = false; + return; + } + + Mousetrap.handleKey(character, _eventModifiers(e), e); + } + + /** + * determines if the keycode specified is a modifier key or not + * + * @param {string} key + * @returns {boolean} + */ + function _isModifier(key) { + return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta'; + } + + /** + * called to set a 1 second timeout on the specified sequence + * + * this is so after each key press in the sequence you have 1 second + * to press the next key before you have to start over + * + * @returns void + */ + function _resetSequenceTimer() { + clearTimeout(_resetTimer); + _resetTimer = setTimeout(_resetSequences, 1000); + } + + /** + * reverses the map lookup so that we can look for specific keys + * to see what can and can't use keypress + * + * @return {Object} + */ + function _getReverseMap() { + if (!_REVERSE_MAP) { + _REVERSE_MAP = {}; + for (var key in _MAP) { + // pull out the numeric keypad from here cause keypress should + // be able to detect the keys from the character + if (key > 95 && key < 112) { + continue; + } + + if (_MAP.hasOwnProperty(key)) { + _REVERSE_MAP[_MAP[key]] = key; + } + } + } + return _REVERSE_MAP; + } + + /** + * picks the best action based on the key combination + * + * @param {string} key - character for key + * @param {Array} modifiers + * @param {string=} action passed in + */ + function _pickBestAction(key, modifiers, action) { + // if no action was picked in we should try to pick the one + // that we think would work best for this key + if (!action) { + action = _getReverseMap()[key] ? 'keydown' : 'keypress'; + } + + // modifier keys don't work as expected with keypress, + // switch to keydown + if (action == 'keypress' && modifiers.length) { + action = 'keydown'; + } + + return action; + } + + /** + * binds a key sequence to an event + * + * @param {string} combo - combo specified in bind call + * @param {Array} keys + * @param {Function} callback + * @param {string=} action + * @returns void + */ + function _bindSequence(combo, keys, callback, action) { + // start off by adding a sequence level record for this combination + // and setting the level to 0 + _sequenceLevels[combo] = 0; + + /** + * callback to increase the sequence level for this sequence and reset + * all other sequences that were active + * + * @param {string} nextAction + * @returns {Function} + */ + function _increaseSequence(nextAction) { + return function () { + _nextExpectedAction = nextAction; + ++_sequenceLevels[combo]; + _resetSequenceTimer(); + }; + } + + /** + * wraps the specified callback inside of another function in order + * to reset all sequence counters as soon as this sequence is done + * + * @param {Event} e + * @returns void + */ + function _callbackAndReset(e) { + _fireCallback(callback, e, combo); + + // we should ignore the next key up if the action is key down + // or keypress. this is so if you finish a sequence and + // release the key the final key will not trigger a keyup + if (action !== 'keyup') { + _ignoreNextKeyup = _characterFromEvent(e); + } + + // weird race condition if a sequence ends with the key + // another sequence begins with + setTimeout(_resetSequences, 10); + } + + // loop through keys one at a time and bind the appropriate callback + // function. for any key leading up to the final one it should + // increase the sequence. after the final, it should reset all sequences + // + // if an action is specified in the original bind call then that will + // be used throughout. otherwise we will pass the action that the + // next key in the sequence should match. this allows a sequence + // to mix and match keypress and keydown events depending on which + // ones are better suited to the key provided + for (var i = 0; i < keys.length; ++i) { + var isFinal = i + 1 === keys.length; + var wrappedCallback = isFinal + ? _callbackAndReset + : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action); + _bindSingle(keys[i], wrappedCallback, action, combo, i); + } + } + + /** + * Converts from a string key combination to an array + * + * @param {string} combination like "command+shift+l" + * @return {Array} + */ + function _keysFromString(combination) { + if (combination === '+') { + return ['+']; + } + + return combination.split('+'); + } + + /** + * Gets info for a specific key combination + * + * @param {string} combination key combination ("command+s" or "a" or "*") + * @param {string=} action + * @returns {Object} + */ + function _getKeyInfo(combination, action) { + var keys, + key, + i, + modifiers = []; + + // take the keys from this pattern and figure out what the actual + // pattern is all about + keys = _keysFromString(combination); + + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + + // normalize key names + if (_SPECIAL_ALIASES[key]) { + key = _SPECIAL_ALIASES[key]; + } + + // if this is not a keypress event then we should + // be smart about using shift keys + // this will only work for US keyboards however + if (action && action != 'keypress' && _SHIFT_MAP[key]) { + key = _SHIFT_MAP[key]; + modifiers.push('shift'); + } + + // if this key is a modifier then add it to the list of modifiers + if (_isModifier(key)) { + modifiers.push(key); + } + } + + // depending on what the key combination is + // we will try to pick the best event for it + action = _pickBestAction(key, modifiers, action); + + return { + key: key, + modifiers: modifiers, + action: action + }; + } + + /** + * binds a single keyboard combination + * + * @param {string} combination + * @param {Function} callback + * @param {string=} action + * @param {string=} sequenceName - name of sequence if part of sequence + * @param {number=} level - what part of the sequence the command is + * @returns void + */ + function _bindSingle(combination, callback, action, sequenceName, level) { + // store a direct mapped reference for use with Mousetrap.trigger + _directMap[combination + ':' + action] = callback; + + // make sure multiple spaces in a row become a single space + combination = combination.replace(/\s+/g, ' '); + + var sequence = combination.split(' '), + info; + + // if this pattern is a sequence of keys then run through this method + // to reprocess each pattern one key at a time + if (sequence.length > 1) { + _bindSequence(combination, sequence, callback, action); + return; + } + + info = _getKeyInfo(combination, action); + + // make sure to initialize array if this is the first time + // a callback is added for this key + _callbacks[info.key] = _callbacks[info.key] || []; + + // remove an existing match if there is one + _getMatches( + info.key, + info.modifiers, + { type: info.action }, + sequenceName, + combination, + level + ); + + // add this call back to the array + // if it is a sequence put it at the beginning + // if not put it at the end + // + // this is important because the way these are processed expects + // the sequence ones to come first + _callbacks[info.key][sequenceName ? 'unshift' : 'push']({ + callback: callback, + modifiers: info.modifiers, + action: info.action, + seq: sequenceName, + level: level, + combo: combination + }); + } + + /** + * binds multiple combinations to the same callback + * + * @param {Array} combinations + * @param {Function} callback + * @param {string|undefined} action + * @returns void + */ + function _bindMultiple(combinations, callback, action) { + for (var i = 0; i < combinations.length; ++i) { + _bindSingle(combinations[i], callback, action); + } + } + + // start! + _addEvent(document, 'keypress', _handleKeyEvent); + _addEvent(document, 'keydown', _handleKeyEvent); + _addEvent(document, 'keyup', _handleKeyEvent); + + var Mousetrap = { + /** + * binds an event to mousetrap + * + * can be a single key, a combination of keys separated with +, + * an array of keys, or a sequence of keys separated by spaces + * + * be sure to list the modifier keys first to make sure that the + * correct key ends up getting bound (the last key in the pattern) + * + * @param {string|Array} keys + * @param {Function} callback + * @param {string=} action - 'keypress', 'keydown', or 'keyup' + * @returns void + */ + bind: function (keys, callback, action) { + keys = keys instanceof Array ? keys : [keys]; + _bindMultiple(keys, callback, action); + return this; + }, + + /** + * unbinds an event to mousetrap + * + * the unbinding sets the callback function of the specified key combo + * to an empty function and deletes the corresponding key in the + * _directMap dict. + * + * TODO: actually remove this from the _callbacks dictionary instead + * of binding an empty function + * + * the keycombo+action has to be exactly the same as + * it was defined in the bind method + * + * @param {string|Array} keys + * @param {string} action + * @returns void + */ + unbind: function (keys, action) { + return Mousetrap.bind(keys, function () {}, action); + }, + + /** + * triggers an event that has already been bound + * + * @param {string} keys + * @param {string=} action + * @returns void + */ + trigger: function (keys, action) { + if (_directMap[keys + ':' + action]) { + _directMap[keys + ':' + action]({}, keys); + } + return this; + }, + + /** + * resets the library back to its initial state. this is useful + * if you want to clear out the current keyboard shortcuts and bind + * new ones - for example if you switch to another page + * + * @returns void + */ + reset: function () { + _callbacks = {}; + _directMap = {}; + return this; + }, + + /** + * should we stop this event before firing off callbacks + * + * @param {Event} e + * @param {Element} element + * @return {boolean} + */ + stopCallback: function (e, element) { + // if the element has the class "mousetrap" then no need to stop + if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) { + return false; + } + + // stop for input, select, and textarea + return ( + element.tagName == 'INPUT' || + element.tagName == 'SELECT' || + element.tagName == 'TEXTAREA' || + element.isContentEditable + ); + }, + + /** + * exposes _handleKey publicly so it can be overwritten by extensions + */ + handleKey: _handleKey + }; + + // expose mousetrap to the global object + window.Mousetrap = Mousetrap; + + // expose mousetrap as an AMD module + if (typeof define === 'function' && define.amd) { + define(Mousetrap); + } +})(window, document); diff --git a/docs/src/js/thirdparty/polyfills/es5.js b/docs/src/js/thirdparty/polyfills/es5.js index 67e23f67..82fe7211 100644 --- a/docs/src/js/thirdparty/polyfills/es5.js +++ b/docs/src/js/thirdparty/polyfills/es5.js @@ -3,23 +3,1099 @@ * @license es5-shim Copyright 2009-2014 by contributors, MIT License * see https://github.com/es-shims/es5-shim/blob/v4.0.3/LICENSE */ -(function(t,e){if(typeof define==="function"&&define.amd){define(e)}else if(typeof exports==="object"){module.exports=e()}else{t.returnExports=e()}})(this,function(){var t=Array.prototype;var e=Object.prototype;var r=Function.prototype;var n=String.prototype;var i=Number.prototype;var a=t.slice;var o=t.splice;var l=t.push;var u=t.unshift;var s=r.call;var f=e.toString;var c=function(t){return e.toString.call(t)==="[object Function]"};var h=function(t){return e.toString.call(t)==="[object RegExp]"};var p=function ve(t){return f.call(t)==="[object Array]"};var v=function ge(t){return f.call(t)==="[object String]"};var g=function ye(t){var e=f.call(t);var r=e==="[object Arguments]";if(!r){r=!p(t)&&t!==null&&typeof t==="object"&&typeof t.length==="number"&&t.length>=0&&c(t.callee)}return r};var y=Object.defineProperty&&function(){try{Object.defineProperty({},"x",{});return true}catch(t){return false}}();var d;if(y){d=function(t,e,r,n){if(!n&&e in t){return}Object.defineProperty(t,e,{configurable:true,enumerable:false,writable:true,value:r})}}else{d=function(t,e,r,n){if(!n&&e in t){return}t[e]=r}}var m=function(t,r,n){for(var i in r){if(e.hasOwnProperty.call(r,i)){d(t,i,r[i],n)}}};function w(t){t=+t;if(t!==t){t=0}else if(t!==0&&t!==1/0&&t!==-(1/0)){t=(t>0||-1)*Math.floor(Math.abs(t))}return t}function b(t){var e=typeof t;return t===null||e==="undefined"||e==="boolean"||e==="number"||e==="string"}function x(t){var e,r,n;if(b(t)){return t}r=t.valueOf;if(c(r)){e=r.call(t);if(b(e)){return e}}n=t.toString;if(c(n)){e=n.call(t);if(b(e)){return e}}throw new TypeError}var S=function(t){if(t==null){throw new TypeError("can't convert "+t+" to object")}return Object(t)};var O=function de(t){return t>>>0};function T(){}m(r,{bind:function me(t){var e=this;if(!c(e)){throw new TypeError("Function.prototype.bind called on incompatible "+e)}var r=a.call(arguments,1);var n=function(){if(this instanceof u){var n=e.apply(this,r.concat(a.call(arguments)));if(Object(n)===n){return n}return this}else{return e.apply(t,r.concat(a.call(arguments)))}};var i=Math.max(0,e.length-r.length);var o=[];for(var l=0;l<i;l++){o.push("$"+l)}var u=Function("binder","return function ("+o.join(",")+"){return binder.apply(this,arguments)}")(n);if(e.prototype){T.prototype=e.prototype;u.prototype=new T;T.prototype=null}return u}});var j=s.bind(e.hasOwnProperty);var E;var N;var I;var D;var _;if(_=j(e,"__defineGetter__")){E=s.bind(e.__defineGetter__);N=s.bind(e.__defineSetter__);I=s.bind(e.__lookupGetter__);D=s.bind(e.__lookupSetter__)}var M=function(){var t=[1,2];var e=t.splice();return t.length===2&&p(e)&&e.length===0}();m(t,{splice:function we(t,e){if(arguments.length===0){return[]}else{return o.apply(this,arguments)}}},M);var F=function(){var e={};t.splice.call(e,0,0,1);return e.length===1}();m(t,{splice:function be(t,e){if(arguments.length===0){return[]}var r=arguments;this.length=Math.max(w(this.length),0);if(arguments.length>0&&typeof e!=="number"){r=a.call(arguments);if(r.length<2){r.push(this.length-t)}else{r[1]=w(e)}}return o.apply(this,r)}},!F);var R=[].unshift(0)!==1;m(t,{unshift:function(){u.apply(this,arguments);return this.length}},R);m(Array,{isArray:p});var k=Object("a");var C=k[0]!=="a"||!(0 in k);var U=function xe(t){var e=true;var r=true;if(t){t.call("foo",function(t,r,n){if(typeof n!=="object"){e=false}});t.call([1],function(){"use strict";r=typeof this==="string"},"x")}return!!t&&e&&r};m(t,{forEach:function Se(t){var e=S(this),r=C&&v(this)?this.split(""):e,n=arguments[1],i=-1,a=r.length>>>0;if(!c(t)){throw new TypeError}while(++i<a){if(i in r){t.call(n,r[i],i,e)}}}},!U(t.forEach));m(t,{map:function Oe(t){var e=S(this),r=C&&v(this)?this.split(""):e,n=r.length>>>0,i=Array(n),a=arguments[1];if(!c(t)){throw new TypeError(t+" is not a function")}for(var o=0;o<n;o++){if(o in r){i[o]=t.call(a,r[o],o,e)}}return i}},!U(t.map));m(t,{filter:function Te(t){var e=S(this),r=C&&v(this)?this.split(""):e,n=r.length>>>0,i=[],a,o=arguments[1];if(!c(t)){throw new TypeError(t+" is not a function")}for(var l=0;l<n;l++){if(l in r){a=r[l];if(t.call(o,a,l,e)){i.push(a)}}}return i}},!U(t.filter));m(t,{every:function je(t){var e=S(this),r=C&&v(this)?this.split(""):e,n=r.length>>>0,i=arguments[1];if(!c(t)){throw new TypeError(t+" is not a function")}for(var a=0;a<n;a++){if(a in r&&!t.call(i,r[a],a,e)){return false}}return true}},!U(t.every));m(t,{some:function Ee(t){var e=S(this),r=C&&v(this)?this.split(""):e,n=r.length>>>0,i=arguments[1];if(!c(t)){throw new TypeError(t+" is not a function")}for(var a=0;a<n;a++){if(a in r&&t.call(i,r[a],a,e)){return true}}return false}},!U(t.some));var A=false;if(t.reduce){A=typeof t.reduce.call("es5",function(t,e,r,n){return n})==="object"}m(t,{reduce:function Ne(t){var e=S(this),r=C&&v(this)?this.split(""):e,n=r.length>>>0;if(!c(t)){throw new TypeError(t+" is not a function")}if(!n&&arguments.length===1){throw new TypeError("reduce of empty array with no initial value")}var i=0;var a;if(arguments.length>=2){a=arguments[1]}else{do{if(i in r){a=r[i++];break}if(++i>=n){throw new TypeError("reduce of empty array with no initial value")}}while(true)}for(;i<n;i++){if(i in r){a=t.call(void 0,a,r[i],i,e)}}return a}},!A);var P=false;if(t.reduceRight){P=typeof t.reduceRight.call("es5",function(t,e,r,n){return n})==="object"}m(t,{reduceRight:function Ie(t){var e=S(this),r=C&&v(this)?this.split(""):e,n=r.length>>>0;if(!c(t)){throw new TypeError(t+" is not a function")}if(!n&&arguments.length===1){throw new TypeError("reduceRight of empty array with no initial value")}var i,a=n-1;if(arguments.length>=2){i=arguments[1]}else{do{if(a in r){i=r[a--];break}if(--a<0){throw new TypeError("reduceRight of empty array with no initial value")}}while(true)}if(a<0){return i}do{if(a in r){i=t.call(void 0,i,r[a],a,e)}}while(a--);return i}},!P);var Z=Array.prototype.indexOf&&[0,1].indexOf(1,2)!==-1;m(t,{indexOf:function De(t){var e=C&&v(this)?this.split(""):S(this),r=e.length>>>0;if(!r){return-1}var n=0;if(arguments.length>1){n=w(arguments[1])}n=n>=0?n:Math.max(0,r+n);for(;n<r;n++){if(n in e&&e[n]===t){return n}}return-1}},Z);var J=Array.prototype.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;m(t,{lastIndexOf:function _e(t){var e=C&&v(this)?this.split(""):S(this),r=e.length>>>0;if(!r){return-1}var n=r-1;if(arguments.length>1){n=Math.min(n,w(arguments[1]))}n=n>=0?n:r-Math.abs(n);for(;n>=0;n--){if(n in e&&t===e[n]){return n}}return-1}},J);var z=!{toString:null}.propertyIsEnumerable("toString"),$=function(){}.propertyIsEnumerable("prototype"),G=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],B=G.length;m(Object,{keys:function Me(t){var e=c(t),r=g(t),n=t!==null&&typeof t==="object",i=n&&v(t);if(!n&&!e&&!r){throw new TypeError("Object.keys called on a non-object")}var a=[];var o=$&&e;if(i||r){for(var l=0;l<t.length;++l){a.push(String(l))}}else{for(var u in t){if(!(o&&u==="prototype")&&j(t,u)){a.push(String(u))}}}if(z){var s=t.constructor,f=s&&s.prototype===t;for(var h=0;h<B;h++){var p=G[h];if(!(f&&p==="constructor")&&j(t,p)){a.push(p)}}}return a}});var H=Object.keys&&function(){return Object.keys(arguments).length===2}(1,2);var L=Object.keys;m(Object,{keys:function Fe(e){if(g(e)){return L(t.slice.call(e))}else{return L(e)}}},!H);var X=-621987552e5;var Y="-000001";var q=Date.prototype.toISOString&&new Date(X).toISOString().indexOf(Y)===-1;m(Date.prototype,{toISOString:function Re(){var t,e,r,n,i;if(!isFinite(this)){throw new RangeError("Date.prototype.toISOString called on non-finite value.")}n=this.getUTCFullYear();i=this.getUTCMonth();n+=Math.floor(i/12);i=(i%12+12)%12;t=[i+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];n=(n<0?"-":n>9999?"+":"")+("00000"+Math.abs(n)).slice(0<=n&&n<=9999?-4:-6);e=t.length;while(e--){r=t[e];if(r<10){t[e]="0"+r}}return n+"-"+t.slice(0,2).join("-")+"T"+t.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}},q);var K=false;try{K=Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(X).toJSON().indexOf(Y)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(Q){}if(!K){Date.prototype.toJSON=function ke(t){var e=Object(this),r=x(e),n;if(typeof r==="number"&&!isFinite(r)){return null}n=e.toISOString;if(typeof n!=="function"){throw new TypeError("toISOString property is not callable")}return n.call(e)}}var V=Date.parse("+033658-09-27T01:46:40.000Z")===1e15;var W=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"));var te=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(!Date.parse||te||W||!V){Date=function(t){function e(r,n,i,a,o,l,u){var s=arguments.length;if(this instanceof t){var f=s===1&&String(r)===r?new t(e.parse(r)):s>=7?new t(r,n,i,a,o,l,u):s>=6?new t(r,n,i,a,o,l):s>=5?new t(r,n,i,a,o):s>=4?new t(r,n,i,a):s>=3?new t(r,n,i):s>=2?new t(r,n):s>=1?new t(r):new t;f.constructor=e;return f}return t.apply(this,arguments)}var r=new RegExp("^"+"(\\d{4}|[+-]\\d{6})"+"(?:-(\\d{2})"+"(?:-(\\d{2})"+"(?:"+"T(\\d{2})"+":(\\d{2})"+"(?:"+":(\\d{2})"+"(?:(\\.\\d{1,}))?"+")?"+"("+"Z|"+"(?:"+"([-+])"+"(\\d{2})"+":(\\d{2})"+")"+")?)?)?)?"+"$");var n=[0,31,59,90,120,151,181,212,243,273,304,334,365];function i(t,e){var r=e>1?1:0;return n[e]+Math.floor((t-1969+r)/4)-Math.floor((t-1901+r)/100)+Math.floor((t-1601+r)/400)+365*(t-1970)}function a(e){return Number(new t(1970,0,1,0,0,0,e))}for(var o in t){e[o]=t[o]}e.now=t.now;e.UTC=t.UTC;e.prototype=t.prototype;e.prototype.constructor=e;e.parse=function l(e){var n=r.exec(e);if(n){var o=Number(n[1]),l=Number(n[2]||1)-1,u=Number(n[3]||1)-1,s=Number(n[4]||0),f=Number(n[5]||0),c=Number(n[6]||0),h=Math.floor(Number(n[7]||0)*1e3),p=Boolean(n[4]&&!n[8]),v=n[9]==="-"?1:-1,g=Number(n[10]||0),y=Number(n[11]||0),d;if(s<(f>0||c>0||h>0?24:25)&&f<60&&c<60&&h<1e3&&l>-1&&l<12&&g<24&&y<60&&u>-1&&u<i(o,l+1)-i(o,l)){d=((i(o,l)+u)*24+s+g*v)*60;d=((d+f+y*v)*60+c)*1e3+h;if(p){d=a(d)}if(-864e13<=d&&d<=864e13){return d}}return NaN}return t.parse.apply(this,arguments)};return e}(Date)}if(!Date.now){Date.now=function Ce(){return(new Date).getTime()}}var ee=i.toFixed&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||0xde0b6b3a7640080.toFixed(0)!=="1000000000000000128");var re={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function Ue(t,e){var r=-1;while(++r<re.size){e+=t*re.data[r];re.data[r]=e%re.base;e=Math.floor(e/re.base)}},divide:function Ae(t){var e=re.size,r=0;while(--e>=0){r+=re.data[e];re.data[e]=Math.floor(r/t);r=r%t*re.base}},numToString:function Pe(){var t=re.size;var e="";while(--t>=0){if(e!==""||t===0||re.data[t]!==0){var r=String(re.data[t]);if(e===""){e=r}else{e+="0000000".slice(0,7-r.length)+r}}}return e},pow:function Ze(t,e,r){return e===0?r:e%2===1?Ze(t,e-1,r*t):Ze(t*t,e/2,r)},log:function Je(t){var e=0;while(t>=4096){e+=12;t/=4096}while(t>=2){e+=1;t/=2}return e}};m(i,{toFixed:function ze(t){var e,r,n,i,a,o,l,u;e=Number(t);e=e!==e?0:Math.floor(e);if(e<0||e>20){throw new RangeError("Number.toFixed called with invalid number of decimals")}r=Number(this);if(r!==r){return"NaN"}if(r<=-1e21||r>=1e21){return String(r)}n="";if(r<0){n="-";r=-r}i="0";if(r>1e-21){a=re.log(r*re.pow(2,69,1))-69;o=a<0?r*re.pow(2,-a,1):r/re.pow(2,a,1);o*=4503599627370496;a=52-a;if(a>0){re.multiply(0,o);l=e;while(l>=7){re.multiply(1e7,0);l-=7}re.multiply(re.pow(10,l,1),0);l=a-1;while(l>=23){re.divide(1<<23);l-=23}re.divide(1<<l);re.multiply(1,1);re.divide(2);i=re.numToString()}else{re.multiply(0,o);re.multiply(1<<-a,0);i=re.numToString()+"0.00000000000000000000".slice(2,2+e)}}if(e>0){u=i.length;if(u<=e){i=n+"0.0000000000000000000".slice(0,e-u+2)+i}else{i=n+i.slice(0,u-e)+"."+i.slice(u-e)}}else{i=n+i}return i}},ee);var ne=n.split;if("ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||"tesst".split(/(s)*/)[1]==="t"||"test".split(/(?:)/,-1).length!==4||"".split(/.?/).length||".".split(/()()/).length>1){(function(){var e=/()??/.exec("")[1]===void 0;n.split=function(r,n){var i=this;if(r===void 0&&n===0){return[]}if(f.call(r)!=="[object RegExp]"){return ne.call(this,r,n)}var a=[],o=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.extended?"x":"")+(r.sticky?"y":""),l=0,u,s,c,h;r=new RegExp(r.source,o+"g");i+="";if(!e){u=new RegExp("^"+r.source+"$(?!\\s)",o)}n=n===void 0?-1>>>0:O(n);while(s=r.exec(i)){c=s.index+s[0].length;if(c>l){a.push(i.slice(l,s.index));if(!e&&s.length>1){s[0].replace(u,function(){for(var t=1;t<arguments.length-2;t++){if(arguments[t]===void 0){s[t]=void 0}}})}if(s.length>1&&s.index<i.length){t.push.apply(a,s.slice(1))}h=s[0].length;l=c;if(a.length>=n){break}}if(r.lastIndex===s.index){r.lastIndex++}}if(l===i.length){if(h||!r.test("")){a.push("")}}else{a.push(i.slice(l))}return a.length>n?a.slice(0,n):a}})()}else if("0".split(void 0,0).length){n.split=function $e(t,e){if(t===void 0&&e===0){return[]}return ne.call(this,t,e)}}var ie=n.replace;var ae=function(){var t=[];"x".replace(/x(.)?/g,function(e,r){t.push(r)});return t.length===1&&typeof t[0]==="undefined"}();if(!ae){n.replace=function Ge(t,e){var r=c(e);var n=h(t)&&/\)[*?]/.test(t.source);if(!r||!n){return ie.call(this,t,e)}else{var i=function(r){var n=arguments.length;var i=t.lastIndex;t.lastIndex=0;var a=t.exec(r);t.lastIndex=i;a.push(arguments[n-2],arguments[n-1]);return e.apply(this,a)};return ie.call(this,t,i)}}}var oe=n.substr;var le="".substr&&"0b".substr(-1)!=="b";m(n,{substr:function Be(t,e){return oe.call(this,t<0?(t=this.length+t)<0?0:t:t,e)}},le);var ue=" \n \f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003"+"\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028"+"\u2029\ufeff";var se="\u200b";var fe="["+ue+"]";var ce=new RegExp("^"+fe+fe+"*");var he=new RegExp(fe+fe+"*$");var pe=n.trim&&(ue.trim()||!se.trim());m(n,{trim:function He(){if(this===void 0||this===null){throw new TypeError("can't convert "+this+" to object")}return String(this).replace(ce,"").replace(he,"")}},pe);if(parseInt(ue+"08")!==8||parseInt(ue+"0x16")!==22){parseInt=function(t){var e=/^0[xX]/;return function r(n,i){n=String(n).trim();if(!Number(i)){i=e.test(n)?16:10}return t(n,i)}}(parseInt)}}); +(function (t, e) { + if (typeof define === 'function' && define.amd) { + define(e); + } else if (typeof exports === 'object') { + module.exports = e(); + } else { + t.returnExports = e(); + } +})(this, function () { + var t = Array.prototype; + var e = Object.prototype; + var r = Function.prototype; + var n = String.prototype; + var i = Number.prototype; + var a = t.slice; + var o = t.splice; + var l = t.push; + var u = t.unshift; + var s = r.call; + var f = e.toString; + var c = function (t) { + return e.toString.call(t) === '[object Function]'; + }; + var h = function (t) { + return e.toString.call(t) === '[object RegExp]'; + }; + var p = function ve(t) { + return f.call(t) === '[object Array]'; + }; + var v = function ge(t) { + return f.call(t) === '[object String]'; + }; + var g = function ye(t) { + var e = f.call(t); + var r = e === '[object Arguments]'; + if (!r) { + r = + !p(t) && + t !== null && + typeof t === 'object' && + typeof t.length === 'number' && + t.length >= 0 && + c(t.callee); + } + return r; + }; + var y = + Object.defineProperty && + (function () { + try { + Object.defineProperty({}, 'x', {}); + return true; + } catch (t) { + return false; + } + })(); + var d; + if (y) { + d = function (t, e, r, n) { + if (!n && e in t) { + return; + } + Object.defineProperty(t, e, { + configurable: true, + enumerable: false, + writable: true, + value: r + }); + }; + } else { + d = function (t, e, r, n) { + if (!n && e in t) { + return; + } + t[e] = r; + }; + } + var m = function (t, r, n) { + for (var i in r) { + if (e.hasOwnProperty.call(r, i)) { + d(t, i, r[i], n); + } + } + }; + function w(t) { + t = +t; + if (t !== t) { + t = 0; + } else if (t !== 0 && t !== 1 / 0 && t !== -(1 / 0)) { + t = (t > 0 || -1) * Math.floor(Math.abs(t)); + } + return t; + } + function b(t) { + var e = typeof t; + return ( + t === null || + e === 'undefined' || + e === 'boolean' || + e === 'number' || + e === 'string' + ); + } + function x(t) { + var e, r, n; + if (b(t)) { + return t; + } + r = t.valueOf; + if (c(r)) { + e = r.call(t); + if (b(e)) { + return e; + } + } + n = t.toString; + if (c(n)) { + e = n.call(t); + if (b(e)) { + return e; + } + } + throw new TypeError(); + } + var S = function (t) { + if (t == null) { + throw new TypeError("can't convert " + t + ' to object'); + } + return Object(t); + }; + var O = function de(t) { + return t >>> 0; + }; + function T() {} + m(r, { + bind: function me(t) { + var e = this; + if (!c(e)) { + throw new TypeError( + 'Function.prototype.bind called on incompatible ' + e + ); + } + var r = a.call(arguments, 1); + var n = function () { + if (this instanceof u) { + var n = e.apply(this, r.concat(a.call(arguments))); + if (Object(n) === n) { + return n; + } + return this; + } else { + return e.apply(t, r.concat(a.call(arguments))); + } + }; + var i = Math.max(0, e.length - r.length); + var o = []; + for (var l = 0; l < i; l++) { + o.push('$' + l); + } + var u = Function( + 'binder', + 'return function (' + + o.join(',') + + '){return binder.apply(this,arguments)}' + )(n); + if (e.prototype) { + T.prototype = e.prototype; + u.prototype = new T(); + T.prototype = null; + } + return u; + } + }); + var j = s.bind(e.hasOwnProperty); + var E; + var N; + var I; + var D; + var _; + if ((_ = j(e, '__defineGetter__'))) { + E = s.bind(e.__defineGetter__); + N = s.bind(e.__defineSetter__); + I = s.bind(e.__lookupGetter__); + D = s.bind(e.__lookupSetter__); + } + var M = (function () { + var t = [1, 2]; + var e = t.splice(); + return t.length === 2 && p(e) && e.length === 0; + })(); + m( + t, + { + splice: function we(t, e) { + if (arguments.length === 0) { + return []; + } else { + return o.apply(this, arguments); + } + } + }, + M + ); + var F = (function () { + var e = {}; + t.splice.call(e, 0, 0, 1); + return e.length === 1; + })(); + m( + t, + { + splice: function be(t, e) { + if (arguments.length === 0) { + return []; + } + var r = arguments; + this.length = Math.max(w(this.length), 0); + if (arguments.length > 0 && typeof e !== 'number') { + r = a.call(arguments); + if (r.length < 2) { + r.push(this.length - t); + } else { + r[1] = w(e); + } + } + return o.apply(this, r); + } + }, + !F + ); + var R = [].unshift(0) !== 1; + m( + t, + { + unshift: function () { + u.apply(this, arguments); + return this.length; + } + }, + R + ); + m(Array, { isArray: p }); + var k = Object('a'); + var C = k[0] !== 'a' || !(0 in k); + var U = function xe(t) { + var e = true; + var r = true; + if (t) { + t.call('foo', function (t, r, n) { + if (typeof n !== 'object') { + e = false; + } + }); + t.call( + [1], + function () { + 'use strict'; + r = typeof this === 'string'; + }, + 'x' + ); + } + return !!t && e && r; + }; + m( + t, + { + forEach: function Se(t) { + var e = S(this), + r = C && v(this) ? this.split('') : e, + n = arguments[1], + i = -1, + a = r.length >>> 0; + if (!c(t)) { + throw new TypeError(); + } + while (++i < a) { + if (i in r) { + t.call(n, r[i], i, e); + } + } + } + }, + !U(t.forEach) + ); + m( + t, + { + map: function Oe(t) { + var e = S(this), + r = C && v(this) ? this.split('') : e, + n = r.length >>> 0, + i = Array(n), + a = arguments[1]; + if (!c(t)) { + throw new TypeError(t + ' is not a function'); + } + for (var o = 0; o < n; o++) { + if (o in r) { + i[o] = t.call(a, r[o], o, e); + } + } + return i; + } + }, + !U(t.map) + ); + m( + t, + { + filter: function Te(t) { + var e = S(this), + r = C && v(this) ? this.split('') : e, + n = r.length >>> 0, + i = [], + a, + o = arguments[1]; + if (!c(t)) { + throw new TypeError(t + ' is not a function'); + } + for (var l = 0; l < n; l++) { + if (l in r) { + a = r[l]; + if (t.call(o, a, l, e)) { + i.push(a); + } + } + } + return i; + } + }, + !U(t.filter) + ); + m( + t, + { + every: function je(t) { + var e = S(this), + r = C && v(this) ? this.split('') : e, + n = r.length >>> 0, + i = arguments[1]; + if (!c(t)) { + throw new TypeError(t + ' is not a function'); + } + for (var a = 0; a < n; a++) { + if (a in r && !t.call(i, r[a], a, e)) { + return false; + } + } + return true; + } + }, + !U(t.every) + ); + m( + t, + { + some: function Ee(t) { + var e = S(this), + r = C && v(this) ? this.split('') : e, + n = r.length >>> 0, + i = arguments[1]; + if (!c(t)) { + throw new TypeError(t + ' is not a function'); + } + for (var a = 0; a < n; a++) { + if (a in r && t.call(i, r[a], a, e)) { + return true; + } + } + return false; + } + }, + !U(t.some) + ); + var A = false; + if (t.reduce) { + A = + typeof t.reduce.call('es5', function (t, e, r, n) { + return n; + }) === 'object'; + } + m( + t, + { + reduce: function Ne(t) { + var e = S(this), + r = C && v(this) ? this.split('') : e, + n = r.length >>> 0; + if (!c(t)) { + throw new TypeError(t + ' is not a function'); + } + if (!n && arguments.length === 1) { + throw new TypeError('reduce of empty array with no initial value'); + } + var i = 0; + var a; + if (arguments.length >= 2) { + a = arguments[1]; + } else { + do { + if (i in r) { + a = r[i++]; + break; + } + if (++i >= n) { + throw new TypeError( + 'reduce of empty array with no initial value' + ); + } + } while (true); + } + for (; i < n; i++) { + if (i in r) { + a = t.call(void 0, a, r[i], i, e); + } + } + return a; + } + }, + !A + ); + var P = false; + if (t.reduceRight) { + P = + typeof t.reduceRight.call('es5', function (t, e, r, n) { + return n; + }) === 'object'; + } + m( + t, + { + reduceRight: function Ie(t) { + var e = S(this), + r = C && v(this) ? this.split('') : e, + n = r.length >>> 0; + if (!c(t)) { + throw new TypeError(t + ' is not a function'); + } + if (!n && arguments.length === 1) { + throw new TypeError( + 'reduceRight of empty array with no initial value' + ); + } + var i, + a = n - 1; + if (arguments.length >= 2) { + i = arguments[1]; + } else { + do { + if (a in r) { + i = r[a--]; + break; + } + if (--a < 0) { + throw new TypeError( + 'reduceRight of empty array with no initial value' + ); + } + } while (true); + } + if (a < 0) { + return i; + } + do { + if (a in r) { + i = t.call(void 0, i, r[a], a, e); + } + } while (a--); + return i; + } + }, + !P + ); + var Z = Array.prototype.indexOf && [0, 1].indexOf(1, 2) !== -1; + m( + t, + { + indexOf: function De(t) { + var e = C && v(this) ? this.split('') : S(this), + r = e.length >>> 0; + if (!r) { + return -1; + } + var n = 0; + if (arguments.length > 1) { + n = w(arguments[1]); + } + n = n >= 0 ? n : Math.max(0, r + n); + for (; n < r; n++) { + if (n in e && e[n] === t) { + return n; + } + } + return -1; + } + }, + Z + ); + var J = Array.prototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1; + m( + t, + { + lastIndexOf: function _e(t) { + var e = C && v(this) ? this.split('') : S(this), + r = e.length >>> 0; + if (!r) { + return -1; + } + var n = r - 1; + if (arguments.length > 1) { + n = Math.min(n, w(arguments[1])); + } + n = n >= 0 ? n : r - Math.abs(n); + for (; n >= 0; n--) { + if (n in e && t === e[n]) { + return n; + } + } + return -1; + } + }, + J + ); + var z = !{ toString: null }.propertyIsEnumerable('toString'), + $ = function () {}.propertyIsEnumerable('prototype'), + G = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ], + B = G.length; + m(Object, { + keys: function Me(t) { + var e = c(t), + r = g(t), + n = t !== null && typeof t === 'object', + i = n && v(t); + if (!n && !e && !r) { + throw new TypeError('Object.keys called on a non-object'); + } + var a = []; + var o = $ && e; + if (i || r) { + for (var l = 0; l < t.length; ++l) { + a.push(String(l)); + } + } else { + for (var u in t) { + if (!(o && u === 'prototype') && j(t, u)) { + a.push(String(u)); + } + } + } + if (z) { + var s = t.constructor, + f = s && s.prototype === t; + for (var h = 0; h < B; h++) { + var p = G[h]; + if (!(f && p === 'constructor') && j(t, p)) { + a.push(p); + } + } + } + return a; + } + }); + var H = + Object.keys && + (function () { + return Object.keys(arguments).length === 2; + })(1, 2); + var L = Object.keys; + m( + Object, + { + keys: function Fe(e) { + if (g(e)) { + return L(t.slice.call(e)); + } else { + return L(e); + } + } + }, + !H + ); + var X = -621987552e5; + var Y = '-000001'; + var q = + Date.prototype.toISOString && new Date(X).toISOString().indexOf(Y) === -1; + m( + Date.prototype, + { + toISOString: function Re() { + var t, e, r, n, i; + if (!isFinite(this)) { + throw new RangeError( + 'Date.prototype.toISOString called on non-finite value.' + ); + } + n = this.getUTCFullYear(); + i = this.getUTCMonth(); + n += Math.floor(i / 12); + i = ((i % 12) + 12) % 12; + t = [ + i + 1, + this.getUTCDate(), + this.getUTCHours(), + this.getUTCMinutes(), + this.getUTCSeconds() + ]; + n = + (n < 0 ? '-' : n > 9999 ? '+' : '') + + ('00000' + Math.abs(n)).slice(0 <= n && n <= 9999 ? -4 : -6); + e = t.length; + while (e--) { + r = t[e]; + if (r < 10) { + t[e] = '0' + r; + } + } + return ( + n + + '-' + + t.slice(0, 2).join('-') + + 'T' + + t.slice(2).join(':') + + '.' + + ('000' + this.getUTCMilliseconds()).slice(-3) + + 'Z' + ); + } + }, + q + ); + var K = false; + try { + K = + Date.prototype.toJSON && + new Date(NaN).toJSON() === null && + new Date(X).toJSON().indexOf(Y) !== -1 && + Date.prototype.toJSON.call({ + toISOString: function () { + return true; + } + }); + } catch (Q) {} + if (!K) { + Date.prototype.toJSON = function ke(t) { + var e = Object(this), + r = x(e), + n; + if (typeof r === 'number' && !isFinite(r)) { + return null; + } + n = e.toISOString; + if (typeof n !== 'function') { + throw new TypeError('toISOString property is not callable'); + } + return n.call(e); + }; + } + var V = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15; + var W = + !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || + !isNaN(Date.parse('2012-11-31T23:59:59.000Z')); + var te = isNaN(Date.parse('2000-01-01T00:00:00.000Z')); + if (!Date.parse || te || W || !V) { + Date = (function (t) { + function e(r, n, i, a, o, l, u) { + var s = arguments.length; + if (this instanceof t) { + var f = + s === 1 && String(r) === r + ? new t(e.parse(r)) + : s >= 7 + ? new t(r, n, i, a, o, l, u) + : s >= 6 + ? new t(r, n, i, a, o, l) + : s >= 5 + ? new t(r, n, i, a, o) + : s >= 4 + ? new t(r, n, i, a) + : s >= 3 + ? new t(r, n, i) + : s >= 2 + ? new t(r, n) + : s >= 1 + ? new t(r) + : new t(); + f.constructor = e; + return f; + } + return t.apply(this, arguments); + } + var r = new RegExp( + '^' + + '(\\d{4}|[+-]\\d{6})' + + '(?:-(\\d{2})' + + '(?:-(\\d{2})' + + '(?:' + + 'T(\\d{2})' + + ':(\\d{2})' + + '(?:' + + ':(\\d{2})' + + '(?:(\\.\\d{1,}))?' + + ')?' + + '(' + + 'Z|' + + '(?:' + + '([-+])' + + '(\\d{2})' + + ':(\\d{2})' + + ')' + + ')?)?)?)?' + + '$' + ); + var n = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; + function i(t, e) { + var r = e > 1 ? 1 : 0; + return ( + n[e] + + Math.floor((t - 1969 + r) / 4) - + Math.floor((t - 1901 + r) / 100) + + Math.floor((t - 1601 + r) / 400) + + 365 * (t - 1970) + ); + } + function a(e) { + return Number(new t(1970, 0, 1, 0, 0, 0, e)); + } + for (var o in t) { + e[o] = t[o]; + } + e.now = t.now; + e.UTC = t.UTC; + e.prototype = t.prototype; + e.prototype.constructor = e; + e.parse = function l(e) { + var n = r.exec(e); + if (n) { + var o = Number(n[1]), + l = Number(n[2] || 1) - 1, + u = Number(n[3] || 1) - 1, + s = Number(n[4] || 0), + f = Number(n[5] || 0), + c = Number(n[6] || 0), + h = Math.floor(Number(n[7] || 0) * 1e3), + p = Boolean(n[4] && !n[8]), + v = n[9] === '-' ? 1 : -1, + g = Number(n[10] || 0), + y = Number(n[11] || 0), + d; + if ( + s < (f > 0 || c > 0 || h > 0 ? 24 : 25) && + f < 60 && + c < 60 && + h < 1e3 && + l > -1 && + l < 12 && + g < 24 && + y < 60 && + u > -1 && + u < i(o, l + 1) - i(o, l) + ) { + d = ((i(o, l) + u) * 24 + s + g * v) * 60; + d = ((d + f + y * v) * 60 + c) * 1e3 + h; + if (p) { + d = a(d); + } + if (-864e13 <= d && d <= 864e13) { + return d; + } + } + return NaN; + } + return t.parse.apply(this, arguments); + }; + return e; + })(Date); + } + if (!Date.now) { + Date.now = function Ce() { + return new Date().getTime(); + }; + } + var ee = + i.toFixed && + ((8e-5).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (0xde0b6b3a7640080).toFixed(0) !== '1000000000000000128'); + var re = { + base: 1e7, + size: 6, + data: [0, 0, 0, 0, 0, 0], + multiply: function Ue(t, e) { + var r = -1; + while (++r < re.size) { + e += t * re.data[r]; + re.data[r] = e % re.base; + e = Math.floor(e / re.base); + } + }, + divide: function Ae(t) { + var e = re.size, + r = 0; + while (--e >= 0) { + r += re.data[e]; + re.data[e] = Math.floor(r / t); + r = (r % t) * re.base; + } + }, + numToString: function Pe() { + var t = re.size; + var e = ''; + while (--t >= 0) { + if (e !== '' || t === 0 || re.data[t] !== 0) { + var r = String(re.data[t]); + if (e === '') { + e = r; + } else { + e += '0000000'.slice(0, 7 - r.length) + r; + } + } + } + return e; + }, + pow: function Ze(t, e, r) { + return e === 0 + ? r + : e % 2 === 1 + ? Ze(t, e - 1, r * t) + : Ze(t * t, e / 2, r); + }, + log: function Je(t) { + var e = 0; + while (t >= 4096) { + e += 12; + t /= 4096; + } + while (t >= 2) { + e += 1; + t /= 2; + } + return e; + } + }; + m( + i, + { + toFixed: function ze(t) { + var e, r, n, i, a, o, l, u; + e = Number(t); + e = e !== e ? 0 : Math.floor(e); + if (e < 0 || e > 20) { + throw new RangeError( + 'Number.toFixed called with invalid number of decimals' + ); + } + r = Number(this); + if (r !== r) { + return 'NaN'; + } + if (r <= -1e21 || r >= 1e21) { + return String(r); + } + n = ''; + if (r < 0) { + n = '-'; + r = -r; + } + i = '0'; + if (r > 1e-21) { + a = re.log(r * re.pow(2, 69, 1)) - 69; + o = a < 0 ? r * re.pow(2, -a, 1) : r / re.pow(2, a, 1); + o *= 4503599627370496; + a = 52 - a; + if (a > 0) { + re.multiply(0, o); + l = e; + while (l >= 7) { + re.multiply(1e7, 0); + l -= 7; + } + re.multiply(re.pow(10, l, 1), 0); + l = a - 1; + while (l >= 23) { + re.divide(1 << 23); + l -= 23; + } + re.divide(1 << l); + re.multiply(1, 1); + re.divide(2); + i = re.numToString(); + } else { + re.multiply(0, o); + re.multiply(1 << -a, 0); + i = re.numToString() + '0.00000000000000000000'.slice(2, 2 + e); + } + } + if (e > 0) { + u = i.length; + if (u <= e) { + i = n + '0.0000000000000000000'.slice(0, e - u + 2) + i; + } else { + i = n + i.slice(0, u - e) + '.' + i.slice(u - e); + } + } else { + i = n + i; + } + return i; + } + }, + ee + ); + var ne = n.split; + if ( + 'ab'.split(/(?:ab)*/).length !== 2 || + '.'.split(/(.?)(.?)/).length !== 4 || + 'tesst'.split(/(s)*/)[1] === 't' || + 'test'.split(/(?:)/, -1).length !== 4 || + ''.split(/.?/).length || + '.'.split(/()()/).length > 1 + ) { + (function () { + var e = /()??/.exec('')[1] === void 0; + n.split = function (r, n) { + var i = this; + if (r === void 0 && n === 0) { + return []; + } + if (f.call(r) !== '[object RegExp]') { + return ne.call(this, r, n); + } + var a = [], + o = + (r.ignoreCase ? 'i' : '') + + (r.multiline ? 'm' : '') + + (r.extended ? 'x' : '') + + (r.sticky ? 'y' : ''), + l = 0, + u, + s, + c, + h; + r = new RegExp(r.source, o + 'g'); + i += ''; + if (!e) { + u = new RegExp('^' + r.source + '$(?!\\s)', o); + } + n = n === void 0 ? -1 >>> 0 : O(n); + while ((s = r.exec(i))) { + c = s.index + s[0].length; + if (c > l) { + a.push(i.slice(l, s.index)); + if (!e && s.length > 1) { + s[0].replace(u, function () { + for (var t = 1; t < arguments.length - 2; t++) { + if (arguments[t] === void 0) { + s[t] = void 0; + } + } + }); + } + if (s.length > 1 && s.index < i.length) { + t.push.apply(a, s.slice(1)); + } + h = s[0].length; + l = c; + if (a.length >= n) { + break; + } + } + if (r.lastIndex === s.index) { + r.lastIndex++; + } + } + if (l === i.length) { + if (h || !r.test('')) { + a.push(''); + } + } else { + a.push(i.slice(l)); + } + return a.length > n ? a.slice(0, n) : a; + }; + })(); + } else if ('0'.split(void 0, 0).length) { + n.split = function $e(t, e) { + if (t === void 0 && e === 0) { + return []; + } + return ne.call(this, t, e); + }; + } + var ie = n.replace; + var ae = (function () { + var t = []; + 'x'.replace(/x(.)?/g, function (e, r) { + t.push(r); + }); + return t.length === 1 && typeof t[0] === 'undefined'; + })(); + if (!ae) { + n.replace = function Ge(t, e) { + var r = c(e); + var n = h(t) && /\)[*?]/.test(t.source); + if (!r || !n) { + return ie.call(this, t, e); + } else { + var i = function (r) { + var n = arguments.length; + var i = t.lastIndex; + t.lastIndex = 0; + var a = t.exec(r); + t.lastIndex = i; + a.push(arguments[n - 2], arguments[n - 1]); + return e.apply(this, a); + }; + return ie.call(this, t, i); + } + }; + } + var oe = n.substr; + var le = ''.substr && '0b'.substr(-1) !== 'b'; + m( + n, + { + substr: function Be(t, e) { + return oe.call( + this, + t < 0 ? ((t = this.length + t) < 0 ? 0 : t) : t, + e + ); + } + }, + le + ); + var ue = + ' \n \f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028' + + '\u2029\ufeff'; + var se = '\u200b'; + var fe = '[' + ue + ']'; + var ce = new RegExp('^' + fe + fe + '*'); + var he = new RegExp(fe + fe + '*$'); + var pe = n.trim && (ue.trim() || !se.trim()); + m( + n, + { + trim: function He() { + if (this === void 0 || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + return String(this).replace(ce, '').replace(he, ''); + } + }, + pe + ); + if (parseInt(ue + '08') !== 8 || parseInt(ue + '0x16') !== 22) { + parseInt = (function (t) { + var e = /^0[xX]/; + return function r(n, i) { + n = String(n).trim(); + if (!Number(i)) { + i = e.test(n) ? 16 : 10; + } + return t(n, i); + }; + })(parseInt); + } +}); //# sourceMappingURL=es5-shim.map if (typeof Object.create != 'function') { - Object.create = (function() { - var Object = function() {}; - return function (prototype) { - if (arguments.length > 1) { - throw Error('Second argument not supported'); - } - if (typeof prototype != 'object') { - throw TypeError('Argument must be an object'); - } - Object.prototype = prototype; - var result = new Object(); - Object.prototype = null; - return result; - }; - })(); -} \ No newline at end of file + Object.create = (function () { + var Object = function () {}; + return function (prototype) { + if (arguments.length > 1) { + throw Error('Second argument not supported'); + } + if (typeof prototype != 'object') { + throw TypeError('Argument must be an object'); + } + Object.prototype = prototype; + var result = new Object(); + Object.prototype = null; + return result; + }; + })(); +} diff --git a/docs/src/js/thirdparty/require.js b/docs/src/js/thirdparty/require.js index 9b94c16c..99e79c27 100644 --- a/docs/src/js/thirdparty/require.js +++ b/docs/src/js/thirdparty/require.js @@ -2,4 +2,1119 @@ * @license RequireJS 2.3.6 Copyright jQuery Foundation and other contributors. * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE */ - var requirejs,require,define;!function(global,setTimeout){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.6",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var i;if(e)for(i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}function eachReverse(e,t){var i;if(e)for(i=e.length-1;-1<i&&(!e[i]||!t(e[i],i,e));i-=1);}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(i,e,r,n){return e&&eachProp(e,function(e,t){!r&&hasProp(i,t)||(!n||"object"!=typeof e||!e||isArray(e)||isFunction(e)||e instanceof RegExp?i[t]=e:(i[t]||(i[t]={}),mixin(i[t],e,r,n)))}),i}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,i,r){var n=new Error(t+"\nhttps://requirejs.org/docs/errors.html#"+e);return n.requireType=e,n.requireModules=r,i&&(n.originalError=i),n}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,r){var n,o,a=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=i,i=r):e=[]),o&&o.context&&(a=o.context),(n=getOwn(contexts,a))||(n=contexts[a]=req.s.newContext(a)),o&&n.configure(o),n.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(t){req[t]=function(){var e=contexts[defContextName];return e.require[t].apply(e,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var r=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=e.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(t,i,r){var e,n=t&&t.config||{};if(isBrowser)return(e=req.createNode(n,i,r)).setAttribute("data-requirecontext",t.contextName),e.setAttribute("data-requiremodule",i),!e.attachEvent||e.attachEvent.toString&&e.attachEvent.toString().indexOf("[native code")<0||isOpera?(e.addEventListener("load",t.onScriptLoad,!1),e.addEventListener("error",t.onScriptError,!1)):(useInteractive=!0,e.attachEvent("onreadystatechange",t.onScriptLoad)),e.src=r,n.onNodeCreated&&n.onNodeCreated(e,n,i,r),currentlyAddingScript=e,baseElement?head.insertBefore(e,baseElement):head.appendChild(e),currentlyAddingScript=null,e;if(isWebWorker)try{setTimeout(function(){},0),importScripts(r),t.completeLoad(i)}catch(e){t.onError(makeError("importscripts","importScripts failed for "+i+" at "+r,e,[i]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(mainScript=(src=mainScript.split("/")).pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,i,t){var r,n;"string"!=typeof e&&(t=i,i=e,e=null),isArray(i)||(t=i,i=null),!i&&isFunction(t)&&(i=[],t.length&&(t.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,t){i.push(t)}),i=(1===t.length?["require"]:["require","exports","module"]).concat(i))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript())&&(e||(e=r.getAttribute("data-requiremodule")),n=contexts[r.getAttribute("data-requirecontext")]),n?(n.defQueue.push([e,i,t]),n.defQueueMap[e]=!0):globalDefQueue.push([e,i,t])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}function newContext(u){var i,e,l,c,d,g={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},p={},f={},r={},h=[],m={},n={},v={},x=1,b=1;function q(e,t,i){var r,n,o,a,s,u,c,d,p,f,l=t&&t.split("/"),h=g.map,m=h&&h["*"];if(e&&(u=(e=e.split("/")).length-1,g.nodeIdCompat&&jsSuffixRegExp.test(e[u])&&(e[u]=e[u].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&l&&(e=l.slice(0,l.length-1).concat(e)),function(e){var t,i;for(t=0;t<e.length;t++)if("."===(i=e[t]))e.splice(t,1),t-=1;else if(".."===i){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;0<t&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&h&&(l||m)){e:for(o=(n=e.split("/")).length;0<o;o-=1){if(s=n.slice(0,o).join("/"),l)for(a=l.length;0<a;a-=1)if((r=getOwn(h,l.slice(0,a).join("/")))&&(r=getOwn(r,s))){c=r,d=o;break e}!p&&m&&getOwn(m,s)&&(p=getOwn(m,s),f=o)}!c&&p&&(c=p,d=f),c&&(n.splice(0,d,c),e=n.join("/"))}return getOwn(g.pkgs,e)||e}function E(t){isBrowser&&each(scripts(),function(e){if(e.getAttribute("data-requiremodule")===t&&e.getAttribute("data-requirecontext")===l.contextName)return e.parentNode.removeChild(e),!0})}function w(e){var t=getOwn(g.paths,e);if(t&&isArray(t)&&1<t.length)return t.shift(),l.require.undef(e),l.makeRequire(null,{skipMap:!0})([e]),!0}function y(e){var t,i=e?e.indexOf("!"):-1;return-1<i&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function S(e,t,i,r){var n,o,a,s,u=null,c=t?t.name:null,d=e,p=!0,f="";return e||(p=!1,e="_@r"+(x+=1)),u=(s=y(e))[0],e=s[1],u&&(u=q(u,c,r),o=getOwn(m,u)),e&&(u?f=i?e:o&&o.normalize?o.normalize(e,function(e){return q(e,c,r)}):-1===e.indexOf("!")?q(e,c,r):e:(u=(s=y(f=q(e,c,r)))[0],f=s[1],i=!0,n=l.nameToUrl(f))),{prefix:u,name:f,parentMap:t,unnormalized:!!(a=!u||o||i?"":"_unnormalized"+(b+=1)),url:n,originalName:d,isDefine:p,id:(u?u+"!"+f:f)+a}}function k(e){var t=e.id,i=getOwn(p,t);return i||(i=p[t]=new l.Module(e)),i}function M(e,t,i){var r=e.id,n=getOwn(p,r);!hasProp(m,r)||n&&!n.defineEmitComplete?(n=k(e)).error&&"error"===t?i(n.error):n.on(t,i):"defined"===t&&i(m[r])}function O(i,e){var t=i.requireModules,r=!1;e?e(i):(each(t,function(e){var t=getOwn(p,e);t&&(t.error=i,t.events.error&&(r=!0,t.emit("error",i)))}),r||req.onError(i))}function j(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(l.defQueueMap[t]=!0),h.push(e)}),globalDefQueue=[])}function P(e){delete p[e],delete f[e]}function R(){var e,r,t=1e3*g.waitSeconds,n=t&&l.startTime+t<(new Date).getTime(),o=[],a=[],s=!1,u=!0;if(!i){if(i=!0,eachProp(f,function(e){var t=e.map,i=t.id;if(e.enabled&&(t.isDefine||a.push(e),!e.error))if(!e.inited&&n)w(i)?s=r=!0:(o.push(i),E(i));else if(!e.inited&&e.fetched&&t.isDefine&&(s=!0,!t.prefix))return u=!1}),n&&o.length)return(e=makeError("timeout","Load timeout for modules: "+o,null,o)).contextName=l.contextName,O(e);u&&each(a,function(e){!function n(o,a,s){var e=o.map.id;o.error?o.emit("error",o.error):(a[e]=!0,each(o.depMaps,function(e,t){var i=e.id,r=getOwn(p,i);!r||o.depMatched[t]||s[i]||(getOwn(a,i)?(o.defineDep(t,m[i]),o.check()):n(r,a,s))}),s[e]=!0)}(e,{},{})}),n&&!r||!s||!isBrowser&&!isWebWorker||d||(d=setTimeout(function(){d=0,R()},50)),i=!1}}function a(e){hasProp(m,e[0])||k(S(e[0],null,!0)).init(e[1],e[2])}function o(e,t,i,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(i,t,!1)}function s(e){var t=e.currentTarget||e.srcElement;return o(t,l.onScriptLoad,"load","onreadystatechange"),o(t,l.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function T(){var e;for(j();h.length;){if(null===(e=h.shift())[0])return O(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));a(e)}l.defQueueMap={}}return c={require:function(e){return e.require?e.require:e.require=l.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?m[e.map.id]=e.exports:e.exports=m[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(g.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},(e=function(e){this.events=getOwn(r,e.id)||{},this.map=e,this.shim=getOwn(g.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0}).prototype={init:function(e,t,i,r){r=r||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,l.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();l.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;n[e]||(n[e]=!0,l.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var t,e,i=this.map.id,r=this.depExports,n=this.exports,o=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{n=l.execCb(i,o,r,n)}catch(e){t=e}else n=l.execCb(i,o,r,n);if(this.map.isDefine&&void 0===n&&((e=this.module)?n=e.exports:this.usingExports&&(n=this.exports)),t)return t.requireMap=this.map,t.requireModules=this.map.isDefine?[this.map.id]:null,t.requireType=this.map.isDefine?"define":"require",O(this.error=t)}else n=o;if(this.exports=n,this.map.isDefine&&!this.ignore&&(m[i]=n,req.onResourceLoad)){var a=[];each(this.depMaps,function(e){a.push(e.normalizedMap||e)}),req.onResourceLoad(l,this.map,a)}P(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(l.defQueueMap,i)||this.fetch()}},callPlugin:function(){var u=this.map,c=u.id,e=S(u.prefix);this.depMaps.push(e),M(e,"defined",bind(this,function(e){var o,t,i,r=getOwn(v,this.map.id),n=this.map.name,a=this.map.parentMap?this.map.parentMap.name:null,s=l.makeRequire(u.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(e.normalize&&(n=e.normalize(n,function(e){return q(e,a,!0)})||""),M(t=S(u.prefix+"!"+n,this.map.parentMap,!0),"defined",bind(this,function(e){this.map.normalizedMap=t,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((i=getOwn(p,t.id))&&(this.depMaps.push(t),this.events.error&&i.on("error",bind(this,function(e){this.emit("error",e)})),i.enable()))):r?(this.map.url=l.nameToUrl(r),void this.load()):((o=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})})).error=bind(this,function(e){this.inited=!0,(this.error=e).requireModules=[c],eachProp(p,function(e){0===e.map.id.indexOf(c+"_unnormalized")&&P(e.map.id)}),O(e)}),o.fromText=bind(this,function(e,t){var i=u.name,r=S(i),n=useInteractive;t&&(e=t),n&&(useInteractive=!1),k(r),hasProp(g.config,c)&&(g.config[i]=g.config[c]);try{req.exec(e)}catch(e){return O(makeError("fromtexteval","fromText eval for "+c+" failed: "+e,e,[c]))}n&&(useInteractive=!0),this.depMaps.push(r),l.completeLoad(i),s([i],o)}),void e.load(u.name,s,o,g))})),l.enable(e,this),this.pluginMaps[e.id]=e},enable:function(){(f[this.map.id]=this).enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var i,r,n;if("string"==typeof e){if(e=S(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,n=getOwn(c,e.id))return void(this.depExports[t]=n(this));this.depCount+=1,M(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?M(e,"error",bind(this,this.errback)):this.events.error&&M(e,"error",bind(this,function(e){this.emit("error",e)}))}i=e.id,r=p[i],hasProp(c,i)||!r||r.enabled||l.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(p,e.id);t&&!t.enabled&&l.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},(l={config:g,contextName:u,registry:p,defined:m,urlFetched:n,defQueue:h,defQueueMap:{},Module:e,makeModuleMap:S,nextTick:req.nextTick,onError:O,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var i=e.urlArgs;e.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+i}}var r=g.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(g[t]||(g[t]={}),mixin(g[t],e,!0,!0)):g[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(v[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=l.makeShimExports(e)),r[t]=e}),g.shim=r),e.packages&&each(e.packages,function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(g.paths[t]=e.location),g.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(p,function(e,t){e.inited||e.map.unnormalized||(e.map=S(t,null,!0))}),(e.deps||e.callback)&&l.require(e.deps||[],e.callback)},makeShimExports:function(t){return function(){var e;return t.init&&(e=t.init.apply(global,arguments)),e||t.exports&&getGlobal(t.exports)}},makeRequire:function(o,a){function s(e,t,i){var r,n;return a.enableBuildCallback&&t&&isFunction(t)&&(t.__requireJsBuild=!0),"string"==typeof e?isFunction(t)?O(makeError("requireargs","Invalid require call"),i):o&&hasProp(c,e)?c[e](p[o.id]):req.get?req.get(l,e,o,s):(r=S(e,o,!1,!0).id,hasProp(m,r)?m[r]:O(makeError("notloaded",'Module name "'+r+'" has not been loaded yet for context: '+u+(o?"":". Use require([])")))):(T(),l.nextTick(function(){T(),(n=k(S(null,o))).skipMap=a.skipMap,n.init(e,t,i,{enabled:!0}),R()}),s)}return a=a||{},mixin(s,{isBrowser:isBrowser,toUrl:function(e){var t,i=e.lastIndexOf("."),r=e.split("/")[0];return-1!==i&&(!("."===r||".."===r)||1<i)&&(t=e.substring(i,e.length),e=e.substring(0,i)),l.nameToUrl(q(e,o&&o.id,!0),t,!0)},defined:function(e){return hasProp(m,S(e,o,!1,!0).id)},specified:function(e){return e=S(e,o,!1,!0).id,hasProp(m,e)||hasProp(p,e)}}),o||(s.undef=function(i){j();var e=S(i,o,!0),t=getOwn(p,i);t.undefed=!0,E(i),delete m[i],delete n[e.url],delete r[i],eachReverse(h,function(e,t){e[0]===i&&h.splice(t,1)}),delete l.defQueueMap[i],t&&(t.events.defined&&(r[i]=t.events),P(i))}),s},enable:function(e){getOwn(p,e.id)&&k(e).enable()},completeLoad:function(e){var t,i,r,n=getOwn(g.shim,e)||{},o=n.exports;for(j();h.length;){if(null===(i=h.shift())[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);a(i)}if(l.defQueueMap={},r=getOwn(p,e),!t&&!hasProp(m,e)&&r&&!r.inited){if(!(!g.enforceDefine||o&&getGlobal(o)))return w(e)?void 0:O(makeError("nodefine","No define call for "+e,null,[e]));a([e,n.deps||[],n.exportsFn])}R()},nameToUrl:function(e,t,i){var r,n,o,a,s,u,c=getOwn(g.pkgs,e);if(c&&(e=c),u=getOwn(v,e))return l.nameToUrl(u,t,i);if(req.jsExtRegExp.test(e))a=e+(t||"");else{for(r=g.paths,o=(n=e.split("/")).length;0<o;o-=1)if(s=getOwn(r,n.slice(0,o).join("/"))){isArray(s)&&(s=s[0]),n.splice(0,o,s);break}a=n.join("/"),a=("/"===(a+=t||(/^data\:|^blob\:|\?/.test(a)||i?"":".js")).charAt(0)||a.match(/^[\w\+\.\-]+:/)?"":g.baseUrl)+a}return g.urlArgs&&!/^blob\:/.test(a)?a+g.urlArgs(e,a):a},load:function(e,t){req.load(l,e,t)},execCb:function(e,t,i,r){return t.apply(r,i)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=s(e);l.completeLoad(t.id)}},onScriptError:function(e){var i=s(e);if(!w(i.id)){var r=[];return eachProp(p,function(e,t){0!==t.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===i.id)return r.push(t),!0})}),O(makeError("scripterror",'Script error for "'+i.id+(r.length?'", needed by: '+r.join(", "):'"'),e,[i.id]))}}}).require=l.makeRequire(),l}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState||eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript}}(this,"undefined"==typeof setTimeout?void 0:setTimeout); \ No newline at end of file +var requirejs, require, define; +!(function (global, setTimeout) { + var req, + s, + head, + baseElement, + dataMain, + src, + interactiveScript, + currentlyAddingScript, + mainScript, + subPath, + version = '2.3.6', + commentRegExp = /\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm, + cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, + jsSuffixRegExp = /\.js$/, + currDirRegExp = /^\.\//, + op = Object.prototype, + ostring = op.toString, + hasOwn = op.hasOwnProperty, + isBrowser = !( + 'undefined' == typeof window || + 'undefined' == typeof navigator || + !window.document + ), + isWebWorker = !isBrowser && 'undefined' != typeof importScripts, + readyRegExp = + isBrowser && 'PLAYSTATION 3' === navigator.platform + ? /^complete$/ + : /^(complete|loaded)$/, + defContextName = '_', + isOpera = + 'undefined' != typeof opera && '[object Opera]' === opera.toString(), + contexts = {}, + cfg = {}, + globalDefQueue = [], + useInteractive = !1; + function commentReplace(e, t) { + return t || ''; + } + function isFunction(e) { + return '[object Function]' === ostring.call(e); + } + function isArray(e) { + return '[object Array]' === ostring.call(e); + } + function each(e, t) { + var i; + if (e) for (i = 0; i < e.length && (!e[i] || !t(e[i], i, e)); i += 1); + } + function eachReverse(e, t) { + var i; + if (e) for (i = e.length - 1; -1 < i && (!e[i] || !t(e[i], i, e)); i -= 1); + } + function hasProp(e, t) { + return hasOwn.call(e, t); + } + function getOwn(e, t) { + return hasProp(e, t) && e[t]; + } + function eachProp(e, t) { + var i; + for (i in e) if (hasProp(e, i) && t(e[i], i)) break; + } + function mixin(i, e, r, n) { + return ( + e && + eachProp(e, function (e, t) { + (!r && hasProp(i, t)) || + (!n || + 'object' != typeof e || + !e || + isArray(e) || + isFunction(e) || + e instanceof RegExp + ? (i[t] = e) + : (i[t] || (i[t] = {}), mixin(i[t], e, r, n))); + }), + i + ); + } + function bind(e, t) { + return function () { + return t.apply(e, arguments); + }; + } + function scripts() { + return document.getElementsByTagName('script'); + } + function defaultOnError(e) { + throw e; + } + function getGlobal(e) { + if (!e) return e; + var t = global; + return ( + each(e.split('.'), function (e) { + t = t[e]; + }), + t + ); + } + function makeError(e, t, i, r) { + var n = new Error(t + '\nhttps://requirejs.org/docs/errors.html#' + e); + return ( + (n.requireType = e), (n.requireModules = r), i && (n.originalError = i), n + ); + } + if (void 0 === define) { + if (void 0 !== requirejs) { + if (isFunction(requirejs)) return; + (cfg = requirejs), (requirejs = void 0); + } + void 0 === require || + isFunction(require) || + ((cfg = require), (require = void 0)), + (req = requirejs = + function (e, t, i, r) { + var n, + o, + a = defContextName; + return ( + isArray(e) || + 'string' == typeof e || + ((o = e), isArray(t) ? ((e = t), (t = i), (i = r)) : (e = [])), + o && o.context && (a = o.context), + (n = getOwn(contexts, a)) || + (n = contexts[a] = req.s.newContext(a)), + o && n.configure(o), + n.require(e, t, i) + ); + }), + (req.config = function (e) { + return req(e); + }), + (req.nextTick = + void 0 !== setTimeout + ? function (e) { + setTimeout(e, 4); + } + : function (e) { + e(); + }), + require || (require = req), + (req.version = version), + (req.jsExtRegExp = /^\/|:|\?|\.js$/), + (req.isBrowser = isBrowser), + (s = req.s = { contexts: contexts, newContext: newContext }), + req({}), + each(['toUrl', 'undef', 'defined', 'specified'], function (t) { + req[t] = function () { + var e = contexts[defContextName]; + return e.require[t].apply(e, arguments); + }; + }), + isBrowser && + ((head = s.head = document.getElementsByTagName('head')[0]), + (baseElement = document.getElementsByTagName('base')[0]), + baseElement && (head = s.head = baseElement.parentNode)), + (req.onError = defaultOnError), + (req.createNode = function (e, t, i) { + var r = e.xhtml + ? document.createElementNS( + 'http://www.w3.org/1999/xhtml', + 'html:script' + ) + : document.createElement('script'); + return ( + (r.type = e.scriptType || 'text/javascript'), + (r.charset = 'utf-8'), + (r.async = !0), + r + ); + }), + (req.load = function (t, i, r) { + var e, + n = (t && t.config) || {}; + if (isBrowser) + return ( + (e = req.createNode(n, i, r)).setAttribute( + 'data-requirecontext', + t.contextName + ), + e.setAttribute('data-requiremodule', i), + !e.attachEvent || + (e.attachEvent.toString && + e.attachEvent.toString().indexOf('[native code') < 0) || + isOpera + ? (e.addEventListener('load', t.onScriptLoad, !1), + e.addEventListener('error', t.onScriptError, !1)) + : ((useInteractive = !0), + e.attachEvent('onreadystatechange', t.onScriptLoad)), + (e.src = r), + n.onNodeCreated && n.onNodeCreated(e, n, i, r), + (currentlyAddingScript = e), + baseElement + ? head.insertBefore(e, baseElement) + : head.appendChild(e), + (currentlyAddingScript = null), + e + ); + if (isWebWorker) + try { + setTimeout(function () {}, 0), importScripts(r), t.completeLoad(i); + } catch (e) { + t.onError( + makeError( + 'importscripts', + 'importScripts failed for ' + i + ' at ' + r, + e, + [i] + ) + ); + } + }), + isBrowser && + !cfg.skipDataMain && + eachReverse(scripts(), function (e) { + if ( + (head || (head = e.parentNode), + (dataMain = e.getAttribute('data-main'))) + ) + return ( + (mainScript = dataMain), + cfg.baseUrl || + -1 !== mainScript.indexOf('!') || + ((mainScript = (src = mainScript.split('/')).pop()), + (subPath = src.length ? src.join('/') + '/' : './'), + (cfg.baseUrl = subPath)), + (mainScript = mainScript.replace(jsSuffixRegExp, '')), + req.jsExtRegExp.test(mainScript) && (mainScript = dataMain), + (cfg.deps = cfg.deps + ? cfg.deps.concat(mainScript) + : [mainScript]), + !0 + ); + }), + (define = function (e, i, t) { + var r, n; + 'string' != typeof e && ((t = i), (i = e), (e = null)), + isArray(i) || ((t = i), (i = null)), + !i && + isFunction(t) && + ((i = []), + t.length && + (t + .toString() + .replace(commentRegExp, commentReplace) + .replace(cjsRequireRegExp, function (e, t) { + i.push(t); + }), + (i = ( + 1 === t.length ? ['require'] : ['require', 'exports', 'module'] + ).concat(i)))), + useInteractive && + (r = currentlyAddingScript || getInteractiveScript()) && + (e || (e = r.getAttribute('data-requiremodule')), + (n = contexts[r.getAttribute('data-requirecontext')])), + n + ? (n.defQueue.push([e, i, t]), (n.defQueueMap[e] = !0)) + : globalDefQueue.push([e, i, t]); + }), + (define.amd = { jQuery: !0 }), + (req.exec = function (text) { + return eval(text); + }), + req(cfg); + } + function newContext(u) { + var i, + e, + l, + c, + d, + g = { + waitSeconds: 7, + baseUrl: './', + paths: {}, + bundles: {}, + pkgs: {}, + shim: {}, + config: {} + }, + p = {}, + f = {}, + r = {}, + h = [], + m = {}, + n = {}, + v = {}, + x = 1, + b = 1; + function q(e, t, i) { + var r, + n, + o, + a, + s, + u, + c, + d, + p, + f, + l = t && t.split('/'), + h = g.map, + m = h && h['*']; + if ( + (e && + ((u = (e = e.split('/')).length - 1), + g.nodeIdCompat && + jsSuffixRegExp.test(e[u]) && + (e[u] = e[u].replace(jsSuffixRegExp, '')), + '.' === e[0].charAt(0) && + l && + (e = l.slice(0, l.length - 1).concat(e)), + (function (e) { + var t, i; + for (t = 0; t < e.length; t++) + if ('.' === (i = e[t])) e.splice(t, 1), (t -= 1); + else if ('..' === i) { + if (0 === t || (1 === t && '..' === e[2]) || '..' === e[t - 1]) + continue; + 0 < t && (e.splice(t - 1, 2), (t -= 2)); + } + })(e), + (e = e.join('/'))), + i && h && (l || m)) + ) { + e: for (o = (n = e.split('/')).length; 0 < o; o -= 1) { + if (((s = n.slice(0, o).join('/')), l)) + for (a = l.length; 0 < a; a -= 1) + if ( + (r = getOwn(h, l.slice(0, a).join('/'))) && + (r = getOwn(r, s)) + ) { + (c = r), (d = o); + break e; + } + !p && m && getOwn(m, s) && ((p = getOwn(m, s)), (f = o)); + } + !c && p && ((c = p), (d = f)), + c && (n.splice(0, d, c), (e = n.join('/'))); + } + return getOwn(g.pkgs, e) || e; + } + function E(t) { + isBrowser && + each(scripts(), function (e) { + if ( + e.getAttribute('data-requiremodule') === t && + e.getAttribute('data-requirecontext') === l.contextName + ) + return e.parentNode.removeChild(e), !0; + }); + } + function w(e) { + var t = getOwn(g.paths, e); + if (t && isArray(t) && 1 < t.length) + return ( + t.shift(), + l.require.undef(e), + l.makeRequire(null, { skipMap: !0 })([e]), + !0 + ); + } + function y(e) { + var t, + i = e ? e.indexOf('!') : -1; + return ( + -1 < i && ((t = e.substring(0, i)), (e = e.substring(i + 1, e.length))), + [t, e] + ); + } + function S(e, t, i, r) { + var n, + o, + a, + s, + u = null, + c = t ? t.name : null, + d = e, + p = !0, + f = ''; + return ( + e || ((p = !1), (e = '_@r' + (x += 1))), + (u = (s = y(e))[0]), + (e = s[1]), + u && ((u = q(u, c, r)), (o = getOwn(m, u))), + e && + (u + ? (f = i + ? e + : o && o.normalize + ? o.normalize(e, function (e) { + return q(e, c, r); + }) + : -1 === e.indexOf('!') + ? q(e, c, r) + : e) + : ((u = (s = y((f = q(e, c, r))))[0]), + (f = s[1]), + (i = !0), + (n = l.nameToUrl(f)))), + { + prefix: u, + name: f, + parentMap: t, + unnormalized: !!(a = !u || o || i ? '' : '_unnormalized' + (b += 1)), + url: n, + originalName: d, + isDefine: p, + id: (u ? u + '!' + f : f) + a + } + ); + } + function k(e) { + var t = e.id, + i = getOwn(p, t); + return i || (i = p[t] = new l.Module(e)), i; + } + function M(e, t, i) { + var r = e.id, + n = getOwn(p, r); + !hasProp(m, r) || (n && !n.defineEmitComplete) + ? (n = k(e)).error && 'error' === t + ? i(n.error) + : n.on(t, i) + : 'defined' === t && i(m[r]); + } + function O(i, e) { + var t = i.requireModules, + r = !1; + e + ? e(i) + : (each(t, function (e) { + var t = getOwn(p, e); + t && + ((t.error = i), t.events.error && ((r = !0), t.emit('error', i))); + }), + r || req.onError(i)); + } + function j() { + globalDefQueue.length && + (each(globalDefQueue, function (e) { + var t = e[0]; + 'string' == typeof t && (l.defQueueMap[t] = !0), h.push(e); + }), + (globalDefQueue = [])); + } + function P(e) { + delete p[e], delete f[e]; + } + function R() { + var e, + r, + t = 1e3 * g.waitSeconds, + n = t && l.startTime + t < new Date().getTime(), + o = [], + a = [], + s = !1, + u = !0; + if (!i) { + if ( + ((i = !0), + eachProp(f, function (e) { + var t = e.map, + i = t.id; + if (e.enabled && (t.isDefine || a.push(e), !e.error)) + if (!e.inited && n) w(i) ? (s = r = !0) : (o.push(i), E(i)); + else if ( + !e.inited && + e.fetched && + t.isDefine && + ((s = !0), !t.prefix) + ) + return (u = !1); + }), + n && o.length) + ) + return ( + ((e = makeError( + 'timeout', + 'Load timeout for modules: ' + o, + null, + o + )).contextName = l.contextName), + O(e) + ); + u && + each(a, function (e) { + !(function n(o, a, s) { + var e = o.map.id; + o.error + ? o.emit('error', o.error) + : ((a[e] = !0), + each(o.depMaps, function (e, t) { + var i = e.id, + r = getOwn(p, i); + !r || + o.depMatched[t] || + s[i] || + (getOwn(a, i) + ? (o.defineDep(t, m[i]), o.check()) + : n(r, a, s)); + }), + (s[e] = !0)); + })(e, {}, {}); + }), + (n && !r) || + !s || + (!isBrowser && !isWebWorker) || + d || + (d = setTimeout(function () { + (d = 0), R(); + }, 50)), + (i = !1); + } + } + function a(e) { + hasProp(m, e[0]) || k(S(e[0], null, !0)).init(e[1], e[2]); + } + function o(e, t, i, r) { + e.detachEvent && !isOpera + ? r && e.detachEvent(r, t) + : e.removeEventListener(i, t, !1); + } + function s(e) { + var t = e.currentTarget || e.srcElement; + return ( + o(t, l.onScriptLoad, 'load', 'onreadystatechange'), + o(t, l.onScriptError, 'error'), + { node: t, id: t && t.getAttribute('data-requiremodule') } + ); + } + function T() { + var e; + for (j(); h.length; ) { + if (null === (e = h.shift())[0]) + return O( + makeError( + 'mismatch', + 'Mismatched anonymous define() module: ' + e[e.length - 1] + ) + ); + a(e); + } + l.defQueueMap = {}; + } + return ( + (c = { + require: function (e) { + return e.require ? e.require : (e.require = l.makeRequire(e.map)); + }, + exports: function (e) { + if (((e.usingExports = !0), e.map.isDefine)) + return e.exports + ? (m[e.map.id] = e.exports) + : (e.exports = m[e.map.id] = {}); + }, + module: function (e) { + return e.module + ? e.module + : (e.module = { + id: e.map.id, + uri: e.map.url, + config: function () { + return getOwn(g.config, e.map.id) || {}; + }, + exports: e.exports || (e.exports = {}) + }); + } + }), + ((e = function (e) { + (this.events = getOwn(r, e.id) || {}), + (this.map = e), + (this.shim = getOwn(g.shim, e.id)), + (this.depExports = []), + (this.depMaps = []), + (this.depMatched = []), + (this.pluginMaps = {}), + (this.depCount = 0); + }).prototype = { + init: function (e, t, i, r) { + (r = r || {}), + this.inited || + ((this.factory = t), + i + ? this.on('error', i) + : this.events.error && + (i = bind(this, function (e) { + this.emit('error', e); + })), + (this.depMaps = e && e.slice(0)), + (this.errback = i), + (this.inited = !0), + (this.ignore = r.ignore), + r.enabled || this.enabled ? this.enable() : this.check()); + }, + defineDep: function (e, t) { + this.depMatched[e] || + ((this.depMatched[e] = !0), + (this.depCount -= 1), + (this.depExports[e] = t)); + }, + fetch: function () { + if (!this.fetched) { + (this.fetched = !0), (l.startTime = new Date().getTime()); + var e = this.map; + if (!this.shim) return e.prefix ? this.callPlugin() : this.load(); + l.makeRequire(this.map, { enableBuildCallback: !0 })( + this.shim.deps || [], + bind(this, function () { + return e.prefix ? this.callPlugin() : this.load(); + }) + ); + } + }, + load: function () { + var e = this.map.url; + n[e] || ((n[e] = !0), l.load(this.map.id, e)); + }, + check: function () { + if (this.enabled && !this.enabling) { + var t, + e, + i = this.map.id, + r = this.depExports, + n = this.exports, + o = this.factory; + if (this.inited) { + if (this.error) this.emit('error', this.error); + else if (!this.defining) { + if ( + ((this.defining = !0), this.depCount < 1 && !this.defined) + ) { + if (isFunction(o)) { + if ( + (this.events.error && this.map.isDefine) || + req.onError !== defaultOnError + ) + try { + n = l.execCb(i, o, r, n); + } catch (e) { + t = e; + } + else n = l.execCb(i, o, r, n); + if ( + (this.map.isDefine && + void 0 === n && + ((e = this.module) + ? (n = e.exports) + : this.usingExports && (n = this.exports)), + t) + ) + return ( + (t.requireMap = this.map), + (t.requireModules = this.map.isDefine + ? [this.map.id] + : null), + (t.requireType = this.map.isDefine + ? 'define' + : 'require'), + O((this.error = t)) + ); + } else n = o; + if ( + ((this.exports = n), + this.map.isDefine && + !this.ignore && + ((m[i] = n), req.onResourceLoad)) + ) { + var a = []; + each(this.depMaps, function (e) { + a.push(e.normalizedMap || e); + }), + req.onResourceLoad(l, this.map, a); + } + P(i), (this.defined = !0); + } + (this.defining = !1), + this.defined && + !this.defineEmitted && + ((this.defineEmitted = !0), + this.emit('defined', this.exports), + (this.defineEmitComplete = !0)); + } + } else hasProp(l.defQueueMap, i) || this.fetch(); + } + }, + callPlugin: function () { + var u = this.map, + c = u.id, + e = S(u.prefix); + this.depMaps.push(e), + M( + e, + 'defined', + bind(this, function (e) { + var o, + t, + i, + r = getOwn(v, this.map.id), + n = this.map.name, + a = this.map.parentMap ? this.map.parentMap.name : null, + s = l.makeRequire(u.parentMap, { enableBuildCallback: !0 }); + return this.map.unnormalized + ? (e.normalize && + (n = + e.normalize(n, function (e) { + return q(e, a, !0); + }) || ''), + M( + (t = S(u.prefix + '!' + n, this.map.parentMap, !0)), + 'defined', + bind(this, function (e) { + (this.map.normalizedMap = t), + this.init( + [], + function () { + return e; + }, + null, + { enabled: !0, ignore: !0 } + ); + }) + ), + void ( + (i = getOwn(p, t.id)) && + (this.depMaps.push(t), + this.events.error && + i.on( + 'error', + bind(this, function (e) { + this.emit('error', e); + }) + ), + i.enable()) + )) + : r + ? ((this.map.url = l.nameToUrl(r)), void this.load()) + : (((o = bind(this, function (e) { + this.init( + [], + function () { + return e; + }, + null, + { enabled: !0 } + ); + })).error = bind(this, function (e) { + (this.inited = !0), + ((this.error = e).requireModules = [c]), + eachProp(p, function (e) { + 0 === e.map.id.indexOf(c + '_unnormalized') && + P(e.map.id); + }), + O(e); + })), + (o.fromText = bind(this, function (e, t) { + var i = u.name, + r = S(i), + n = useInteractive; + t && (e = t), + n && (useInteractive = !1), + k(r), + hasProp(g.config, c) && (g.config[i] = g.config[c]); + try { + req.exec(e); + } catch (e) { + return O( + makeError( + 'fromtexteval', + 'fromText eval for ' + c + ' failed: ' + e, + e, + [c] + ) + ); + } + n && (useInteractive = !0), + this.depMaps.push(r), + l.completeLoad(i), + s([i], o); + })), + void e.load(u.name, s, o, g)); + }) + ), + l.enable(e, this), + (this.pluginMaps[e.id] = e); + }, + enable: function () { + ((f[this.map.id] = this).enabled = !0), + (this.enabling = !0), + each( + this.depMaps, + bind(this, function (e, t) { + var i, r, n; + if ('string' == typeof e) { + if ( + ((e = S( + e, + this.map.isDefine ? this.map : this.map.parentMap, + !1, + !this.skipMap + )), + (this.depMaps[t] = e), + (n = getOwn(c, e.id))) + ) + return void (this.depExports[t] = n(this)); + (this.depCount += 1), + M( + e, + 'defined', + bind(this, function (e) { + this.undefed || (this.defineDep(t, e), this.check()); + }) + ), + this.errback + ? M(e, 'error', bind(this, this.errback)) + : this.events.error && + M( + e, + 'error', + bind(this, function (e) { + this.emit('error', e); + }) + ); + } + (i = e.id), + (r = p[i]), + hasProp(c, i) || !r || r.enabled || l.enable(e, this); + }) + ), + eachProp( + this.pluginMaps, + bind(this, function (e) { + var t = getOwn(p, e.id); + t && !t.enabled && l.enable(e, this); + }) + ), + (this.enabling = !1), + this.check(); + }, + on: function (e, t) { + var i = this.events[e]; + i || (i = this.events[e] = []), i.push(t); + }, + emit: function (e, t) { + each(this.events[e], function (e) { + e(t); + }), + 'error' === e && delete this.events[e]; + } + }), + ((l = { + config: g, + contextName: u, + registry: p, + defined: m, + urlFetched: n, + defQueue: h, + defQueueMap: {}, + Module: e, + makeModuleMap: S, + nextTick: req.nextTick, + onError: O, + configure: function (e) { + if ( + (e.baseUrl && + '/' !== e.baseUrl.charAt(e.baseUrl.length - 1) && + (e.baseUrl += '/'), + 'string' == typeof e.urlArgs) + ) { + var i = e.urlArgs; + e.urlArgs = function (e, t) { + return (-1 === t.indexOf('?') ? '?' : '&') + i; + }; + } + var r = g.shim, + n = { paths: !0, bundles: !0, config: !0, map: !0 }; + eachProp(e, function (e, t) { + n[t] ? (g[t] || (g[t] = {}), mixin(g[t], e, !0, !0)) : (g[t] = e); + }), + e.bundles && + eachProp(e.bundles, function (e, t) { + each(e, function (e) { + e !== t && (v[e] = t); + }); + }), + e.shim && + (eachProp(e.shim, function (e, t) { + isArray(e) && (e = { deps: e }), + (!e.exports && !e.init) || + e.exportsFn || + (e.exportsFn = l.makeShimExports(e)), + (r[t] = e); + }), + (g.shim = r)), + e.packages && + each(e.packages, function (e) { + var t; + (t = (e = 'string' == typeof e ? { name: e } : e).name), + e.location && (g.paths[t] = e.location), + (g.pkgs[t] = + e.name + + '/' + + (e.main || 'main') + .replace(currDirRegExp, '') + .replace(jsSuffixRegExp, '')); + }), + eachProp(p, function (e, t) { + e.inited || e.map.unnormalized || (e.map = S(t, null, !0)); + }), + (e.deps || e.callback) && l.require(e.deps || [], e.callback); + }, + makeShimExports: function (t) { + return function () { + var e; + return ( + t.init && (e = t.init.apply(global, arguments)), + e || (t.exports && getGlobal(t.exports)) + ); + }; + }, + makeRequire: function (o, a) { + function s(e, t, i) { + var r, n; + return ( + a.enableBuildCallback && + t && + isFunction(t) && + (t.__requireJsBuild = !0), + 'string' == typeof e + ? isFunction(t) + ? O(makeError('requireargs', 'Invalid require call'), i) + : o && hasProp(c, e) + ? c[e](p[o.id]) + : req.get + ? req.get(l, e, o, s) + : ((r = S(e, o, !1, !0).id), + hasProp(m, r) + ? m[r] + : O( + makeError( + 'notloaded', + 'Module name "' + + r + + '" has not been loaded yet for context: ' + + u + + (o ? '' : '. Use require([])') + ) + )) + : (T(), + l.nextTick(function () { + T(), + ((n = k(S(null, o))).skipMap = a.skipMap), + n.init(e, t, i, { enabled: !0 }), + R(); + }), + s) + ); + } + return ( + (a = a || {}), + mixin(s, { + isBrowser: isBrowser, + toUrl: function (e) { + var t, + i = e.lastIndexOf('.'), + r = e.split('/')[0]; + return ( + -1 !== i && + (!('.' === r || '..' === r) || 1 < i) && + ((t = e.substring(i, e.length)), (e = e.substring(0, i))), + l.nameToUrl(q(e, o && o.id, !0), t, !0) + ); + }, + defined: function (e) { + return hasProp(m, S(e, o, !1, !0).id); + }, + specified: function (e) { + return (e = S(e, o, !1, !0).id), hasProp(m, e) || hasProp(p, e); + } + }), + o || + (s.undef = function (i) { + j(); + var e = S(i, o, !0), + t = getOwn(p, i); + (t.undefed = !0), + E(i), + delete m[i], + delete n[e.url], + delete r[i], + eachReverse(h, function (e, t) { + e[0] === i && h.splice(t, 1); + }), + delete l.defQueueMap[i], + t && (t.events.defined && (r[i] = t.events), P(i)); + }), + s + ); + }, + enable: function (e) { + getOwn(p, e.id) && k(e).enable(); + }, + completeLoad: function (e) { + var t, + i, + r, + n = getOwn(g.shim, e) || {}, + o = n.exports; + for (j(); h.length; ) { + if (null === (i = h.shift())[0]) { + if (((i[0] = e), t)) break; + t = !0; + } else i[0] === e && (t = !0); + a(i); + } + if ( + ((l.defQueueMap = {}), + (r = getOwn(p, e)), + !t && !hasProp(m, e) && r && !r.inited) + ) { + if (!(!g.enforceDefine || (o && getGlobal(o)))) + return w(e) + ? void 0 + : O( + makeError('nodefine', 'No define call for ' + e, null, [e]) + ); + a([e, n.deps || [], n.exportsFn]); + } + R(); + }, + nameToUrl: function (e, t, i) { + var r, + n, + o, + a, + s, + u, + c = getOwn(g.pkgs, e); + if ((c && (e = c), (u = getOwn(v, e)))) return l.nameToUrl(u, t, i); + if (req.jsExtRegExp.test(e)) a = e + (t || ''); + else { + for (r = g.paths, o = (n = e.split('/')).length; 0 < o; o -= 1) + if ((s = getOwn(r, n.slice(0, o).join('/')))) { + isArray(s) && (s = s[0]), n.splice(0, o, s); + break; + } + (a = n.join('/')), + (a = + ('/' === + (a += + t || + (/^data\:|^blob\:|\?/.test(a) || i ? '' : '.js')).charAt( + 0 + ) || a.match(/^[\w\+\.\-]+:/) + ? '' + : g.baseUrl) + a); + } + return g.urlArgs && !/^blob\:/.test(a) ? a + g.urlArgs(e, a) : a; + }, + load: function (e, t) { + req.load(l, e, t); + }, + execCb: function (e, t, i, r) { + return t.apply(r, i); + }, + onScriptLoad: function (e) { + if ( + 'load' === e.type || + readyRegExp.test((e.currentTarget || e.srcElement).readyState) + ) { + interactiveScript = null; + var t = s(e); + l.completeLoad(t.id); + } + }, + onScriptError: function (e) { + var i = s(e); + if (!w(i.id)) { + var r = []; + return ( + eachProp(p, function (e, t) { + 0 !== t.indexOf('_@r') && + each(e.depMaps, function (e) { + if (e.id === i.id) return r.push(t), !0; + }); + }), + O( + makeError( + 'scripterror', + 'Script error for "' + + i.id + + (r.length ? '", needed by: ' + r.join(', ') : '"'), + e, + [i.id] + ) + ) + ); + } + } + }).require = l.makeRequire()), + l + ); + } + function getInteractiveScript() { + return ( + (interactiveScript && 'interactive' === interactiveScript.readyState) || + eachReverse(scripts(), function (e) { + if ('interactive' === e.readyState) return (interactiveScript = e); + }), + interactiveScript + ); + } +})(this, 'undefined' == typeof setTimeout ? void 0 : setTimeout); diff --git a/docs/src/js/thirdparty/respond.min.js b/docs/src/js/thirdparty/respond.min.js index d505236a..b0e179d2 100644 --- a/docs/src/js/thirdparty/respond.min.js +++ b/docs/src/js/thirdparty/respond.min.js @@ -1,6 +1,213 @@ /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ /*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ -window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document); +window.matchMedia = + window.matchMedia || + (function (a) { + 'use strict'; + var c, + d = a.documentElement, + e = d.firstElementChild || d.firstChild, + f = a.createElement('body'), + g = a.createElement('div'); + return ( + (g.id = 'mq-test-1'), + (g.style.cssText = 'position:absolute;top:-100em'), + (f.style.background = 'none'), + f.appendChild(g), + function (a) { + return ( + (g.innerHTML = + '­<style media="' + + a + + '"> #mq-test-1 { width: 42px; }</style>'), + d.insertBefore(f, e), + (c = 42 === g.offsetWidth), + d.removeChild(f), + { matches: c, media: a } + ); + } + ); + })(document); /*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ -(function(a){"use strict";function x(){u(!0)}var b={};if(a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,!b.mediaQueriesSupported){var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var a=m.shift();v(a.href,function(b){p(b,a.href,a.media),h[a.href]=!0,setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(a){var b="clientWidth",h=d[b],k="CSS1Compat"===c.compatMode&&h||c.body[b]||h,m={},n=l[l.length-1],o=(new Date).getTime();if(a&&q&&i>o-q)return clearTimeout(r),r=setTimeout(u,i),void 0;q=o;for(var p in e)if(e.hasOwnProperty(p)){var v=e[p],w=v.minw,x=v.maxw,y=null===w,z=null===x,A="em";w&&(w=parseFloat(w)*(w.indexOf(A)>-1?t||s():1)),x&&(x=parseFloat(x)*(x.indexOf(A)>-1?t||s():1)),v.hasquery&&(y&&z||!(y||k>=w)||!(z||x>=k))||(m[v.media]||(m[v.media]=[]),m[v.media].push(f[v.rules]))}for(var B in g)g.hasOwnProperty(B)&&g[B]&&g[B].parentNode===j&&j.removeChild(g[B]);for(var C in m)if(m.hasOwnProperty(C)){var D=c.createElement("style"),E=m[C].join("\n");D.type="text/css",D.media=C,j.insertBefore(D,n.nextSibling),D.styleSheet?D.styleSheet.cssText=E:D.appendChild(c.createTextNode(E)),g.push(D)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)}})(this); +(function (a) { + 'use strict'; + function x() { + u(!0); + } + var b = {}; + if ( + ((a.respond = b), + (b.update = function () {}), + (b.mediaQueriesSupported = + a.matchMedia && a.matchMedia('only all').matches), + !b.mediaQueriesSupported) + ) { + var q, + r, + t, + c = a.document, + d = c.documentElement, + e = [], + f = [], + g = [], + h = {}, + i = 30, + j = c.getElementsByTagName('head')[0] || d, + k = c.getElementsByTagName('base')[0], + l = j.getElementsByTagName('link'), + m = [], + n = function () { + for (var b = 0; l.length > b; b++) { + var c = l[b], + d = c.href, + e = c.media, + f = c.rel && 'stylesheet' === c.rel.toLowerCase(); + d && + f && + !h[d] && + (c.styleSheet && c.styleSheet.rawCssText + ? (p(c.styleSheet.rawCssText, d, e), (h[d] = !0)) + : ((!/^([a-zA-Z:]*\/\/)/.test(d) && !k) || + d.replace(RegExp.$1, '').split('/')[0] === a.location.host) && + m.push({ href: d, media: e })); + } + o(); + }, + o = function () { + if (m.length) { + var a = m.shift(); + v(a.href, function (b) { + p(b, a.href, a.media), + (h[a.href] = !0), + setTimeout(function () { + o(); + }, 0); + }); + } + }, + p = function (a, b, c) { + var d = a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi), + g = (d && d.length) || 0; + b = b.substring(0, b.lastIndexOf('/')); + var h = function (a) { + return a.replace( + /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, + '$1' + b + '$2$3' + ); + }, + i = !g && c; + b.length && (b += '/'), i && (g = 1); + for (var j = 0; g > j; j++) { + var k, l, m, n; + i + ? ((k = c), f.push(h(a))) + : ((k = d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/) && RegExp.$1), + f.push(RegExp.$2 && h(RegExp.$2))), + (m = k.split(',')), + (n = m.length); + for (var o = 0; n > o; o++) + (l = m[o]), + e.push({ + media: + (l.split('(')[0].match(/(only\s+)?([a-zA-Z]+)\s?/) && + RegExp.$2) || + 'all', + rules: f.length - 1, + hasquery: l.indexOf('(') > -1, + minw: + l.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/) && + parseFloat(RegExp.$1) + (RegExp.$2 || ''), + maxw: + l.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/) && + parseFloat(RegExp.$1) + (RegExp.$2 || '') + }); + } + u(); + }, + s = function () { + var a, + b = c.createElement('div'), + e = c.body, + f = !1; + return ( + (b.style.cssText = 'position:absolute;font-size:1em;width:1em'), + e || + ((e = f = c.createElement('body')), (e.style.background = 'none')), + e.appendChild(b), + d.insertBefore(e, d.firstChild), + (a = b.offsetWidth), + f ? d.removeChild(e) : e.removeChild(b), + (a = t = parseFloat(a)) + ); + }, + u = function (a) { + var b = 'clientWidth', + h = d[b], + k = ('CSS1Compat' === c.compatMode && h) || c.body[b] || h, + m = {}, + n = l[l.length - 1], + o = new Date().getTime(); + if (a && q && i > o - q) + return clearTimeout(r), (r = setTimeout(u, i)), void 0; + q = o; + for (var p in e) + if (e.hasOwnProperty(p)) { + var v = e[p], + w = v.minw, + x = v.maxw, + y = null === w, + z = null === x, + A = 'em'; + w && (w = parseFloat(w) * (w.indexOf(A) > -1 ? t || s() : 1)), + x && (x = parseFloat(x) * (x.indexOf(A) > -1 ? t || s() : 1)), + (v.hasquery && ((y && z) || !(y || k >= w) || !(z || x >= k))) || + (m[v.media] || (m[v.media] = []), m[v.media].push(f[v.rules])); + } + for (var B in g) + g.hasOwnProperty(B) && + g[B] && + g[B].parentNode === j && + j.removeChild(g[B]); + for (var C in m) + if (m.hasOwnProperty(C)) { + var D = c.createElement('style'), + E = m[C].join('\n'); + (D.type = 'text/css'), + (D.media = C), + j.insertBefore(D, n.nextSibling), + D.styleSheet + ? (D.styleSheet.cssText = E) + : D.appendChild(c.createTextNode(E)), + g.push(D); + } + }, + v = function (a, b) { + var c = w(); + c && + (c.open('GET', a, !0), + (c.onreadystatechange = function () { + 4 !== c.readyState || + (200 !== c.status && 304 !== c.status) || + b(c.responseText); + }), + 4 !== c.readyState && c.send(null)); + }, + w = (function () { + var b = !1; + try { + b = new a.XMLHttpRequest(); + } catch (c) { + b = new a.ActiveXObject('Microsoft.XMLHTTP'); + } + return function () { + return b; + }; + })(); + n(), + (b.update = n), + a.addEventListener + ? a.addEventListener('resize', x, !1) + : a.attachEvent && a.attachEvent('onresize', x); + } +})(this); diff --git a/docs/src/migrating-to-v2.md b/docs/src/migrating-to-v2.md index 3c56c13a..8a05c4bc 100644 --- a/docs/src/migrating-to-v2.md +++ b/docs/src/migrating-to-v2.md @@ -1,18 +1,21 @@ # Migrating to v2 ## Secure Apps + In v1, F2 had the idea of "Secure Apps" where apps were loaded into iFrames in order to isolate them from the parent page. This feature added a lot of complexity and bloat to the codebase and was a feature that was unused in practice. For v2, this feature has been removed. ## F2.UI + F2 v1 provided some UI utility methods in the `F2.UI` namespace. These utilities provided for things like loading spinners, modals, and multiple "views" for an app. These features were built using jQuery, jQuery UI, and Bootstrap and were largely unused. In v2, these features have been removed. ## jQuery, jQuery UI, Bootstrap + v1 of F2 utilized jQuery for DOM manipulation. v2 utilizes native javascript or [domify](https://github.com/component/domify) instead. In addition to jQuery, jQuery UI and Bootstrap were bundled inside of F2 (in a closure). These extra @@ -20,7 +23,8 @@ libraries were utilized for `F2.UI`. For v2, all of these libraries were removed greatly reducing the overall file size and security posture of F2. ## Deprecated Functionality + In addition to the updates mentioned previously, there were parts of F2 v1 that were marked as deprecated. These parts have been removed in v2. For example, the `beforeAppRender`, `appRender`, `afterAppRender` callbacks that were replaced by -`F2.AppHandlers` had been deprecated and now removed. \ No newline at end of file +`F2.AppHandlers` had been deprecated and now removed. diff --git a/docs/src/sdk-template/assets/css/custom.css b/docs/src/sdk-template/assets/css/custom.css index c82fc21d..cdfb51b9 100755 --- a/docs/src/sdk-template/assets/css/custom.css +++ b/docs/src/sdk-template/assets/css/custom.css @@ -1,95 +1,94 @@ /** generic */ .label { - font-weight: 400; - font-family: 'titilliumregular'; - display: inline !important; + font-weight: 400; + font-family: 'titilliumregular'; + display: inline !important; } ul.inline { - display: inline; - margin: 0; - padding: 0; + display: inline; + margin: 0; + padding: 0; } ul.inline li { - list-style: none; - display: inline; + list-style: none; + display: inline; } - /** classes*/ .classDescription p:first-child { - font-size: 21px; - margin-bottom: 20px; - font-weight: 200; - line-height: 1.4; + font-size: 21px; + margin-bottom: 20px; + font-weight: 200; + line-height: 1.4; } td.name { - font-weight: 400; - font-family: 'titilliumregular'; - white-space: nowrap; + font-weight: 400; + font-family: 'titilliumregular'; + white-space: nowrap; } ul.params { - display: inline; - margin: 0; - padding: 0; + display: inline; + margin: 0; + padding: 0; } ul.params li { - list-style: none; - display: inline; - /*make it look like code*/ - font-family: Menlo,Monaco,Consolas,"Courier New",monospace; - padding: 1px 2px; - font-size: 90%; - color: #c7254e; - background-color: #f9f2f4; - border-radius: 4px; + list-style: none; + display: inline; + /*make it look like code*/ + font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; + padding: 1px 2px; + font-size: 90%; + color: #c7254e; + background-color: #f9f2f4; + border-radius: 4px; } ul.commas li:after { - content: ','; + content: ','; } ul.commas li:last-child:after { - content: ''; + content: ''; } /** methods*/ .method h3 { - font-weight: 400; - font-family: 'titilliumregular'; + font-weight: 400; + font-family: 'titilliumregular'; } h3 ul.params li { - font-size: 80%; - background-color: transparent; - color: inherit; - padding: 0; + font-size: 80%; + background-color: transparent; + color: inherit; + padding: 0; } .description p { - font-size: 16px; + font-size: 16px; } .returns-description .type { - font-weight: 600; - font-family: 'titilliumregular'; + font-weight: 600; + font-family: 'titilliumregular'; } .returns-description p { - display: inline-block; + display: inline-block; } .method .meta { - font-size: 14px; + font-size: 14px; } /** properties */ .property .meta { - font-size: 14px; -} \ No newline at end of file + font-size: 14px; +} diff --git a/docs/src/sdk-template/assets/css/main.css b/docs/src/sdk-template/assets/css/main.css index 77410410..0153e774 100755 --- a/docs/src/sdk-template/assets/css/main.css +++ b/docs/src/sdk-template/assets/css/main.css @@ -19,183 +19,247 @@ Here's a quick lookup table: */ html { - background: #fff; - color: #333; - overflow-y: scroll; + background: #fff; + color: #333; + overflow-y: scroll; } body { - /*font: 13px/1.4 'Lucida Grande', 'Lucida Sans Unicode', 'DejaVu Sans', 'Bitstream Vera Sans', 'Helvetica', 'Arial', sans-serif;*/ - margin: 0; - padding: 0; - padding-top: 40px; + /*font: 13px/1.4 'Lucida Grande', 'Lucida Sans Unicode', 'DejaVu Sans', 'Bitstream Vera Sans', 'Helvetica', 'Arial', sans-serif;*/ + margin: 0; + padding: 0; + padding-top: 40px; } /* -- Links ----------------------------------------------------------------- */ a { - color: #356de4; - text-decoration: none; + color: #356de4; + text-decoration: none; } .hidden { - display: none; + display: none; } -a:hover { text-decoration: underline; } +a:hover { + text-decoration: underline; +} /* "Jump to Table of Contents" link is shown to assistive tools, but hidden from sight until it's focused. */ .jump { - position: absolute; - padding: 3px 6px; - left: -99999px; - top: 0; + position: absolute; + padding: 3px 6px; + left: -99999px; + top: 0; } -.jump:focus { left: 40%; } +.jump:focus { + left: 40%; +} /* -- Paragraphs ------------------------------------------------------------ */ -p { margin: 1.3em 0; } -dd p, td p { margin-bottom: 0; } -dd p:first-child, td p:first-child { margin-top: 0; } +p { + margin: 1.3em 0; +} +dd p, +td p { + margin-bottom: 0; +} +dd p:first-child, +td p:first-child { + margin-top: 0; +} /* -- Headings -------------------------------------------------------------- */ -h1, h2, h3, h4, h5, h6 { - color: #D98527;/*was #f80*/ - font-family: 'Trebuchet MS', sans-serif; - font-weight: bold; - line-height: 1.1; - margin: 1.1em 0 0.5em; +h1, +h2, +h3, +h4, +h5, +h6 { + color: #d98527; /*was #f80*/ + font-family: 'Trebuchet MS', sans-serif; + font-weight: bold; + line-height: 1.1; + margin: 1.1em 0 0.5em; } h1 { - font-size: 184.6%; - color: #30418C; - margin: 0.75em 0 0.5em; + font-size: 184.6%; + color: #30418c; + margin: 0.75em 0 0.5em; } h2 { - font-size: 153.846%; - color: #E48A2B; + font-size: 153.846%; + color: #e48a2b; } -h3 { font-size: 138.462%; } - -h4 { - border-bottom: 1px solid #DBDFEA; - color: #E48A2B; - font-size: 115.385%; - font-weight: normal; - padding-bottom: 2px; +h3 { + font-size: 138.462%; } -h5, h6 { font-size: 107.692%; } - -/* -- Code and examples ----------------------------------------------------- */ -code, kbd, pre, samp { - font-family: Menlo, Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; - font-size: 92.308%; -} - -p code, p kbd, p samp { - background: #FCFBFA; - border: 1px solid #EFEEED; - padding: 0 3px; +h4 { + border-bottom: 1px solid #dbdfea; + color: #e48a2b; + font-size: 115.385%; + font-weight: normal; + padding-bottom: 2px; } -a code, a kbd, a samp, -pre code, pre kbd, pre samp, -table code, table kbd, table samp, -.intro code, .intro kbd, .intro samp, -.toc code, .toc kbd, .toc samp { - background: none; - border: none; - padding: 0; +h5, +h6 { + font-size: 107.692%; } -pre.code, pre.terminal, pre.cmd { - overflow-x: auto; - *overflow-x: scroll; - padding: 0.3em 0.6em; +/* -- Code and examples ----------------------------------------------------- */ +code, +kbd, +pre, +samp { + font-family: Menlo, Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', + 'Courier New', Courier, monospace; + font-size: 92.308%; +} + +p code, +p kbd, +p samp { + background: #fcfbfa; + border: 1px solid #efeeed; + padding: 0 3px; +} + +a code, +a kbd, +a samp, +pre code, +pre kbd, +pre samp, +table code, +table kbd, +table samp, +.intro code, +.intro kbd, +.intro samp, +.toc code, +.toc kbd, +.toc samp { + background: none; + border: none; + padding: 0; +} + +pre.code, +pre.terminal, +pre.cmd { + overflow-x: auto; + *overflow-x: scroll; + padding: 0.3em 0.6em; } pre.code { - background: #FCFBFA; - border: 1px solid #EFEEED; - border-left-width: 5px; + background: #fcfbfa; + border: 1px solid #efeeed; + border-left-width: 5px; } -pre.terminal, pre.cmd { - background: #F0EFFC; - border: 1px solid #D0CBFB; - border-left: 5px solid #D0CBFB; +pre.terminal, +pre.cmd { + background: #f0effc; + border: 1px solid #d0cbfb; + border-left: 5px solid #d0cbfb; } /* Don't reduce the font size of <code>/<kbd>/<samp> elements inside <pre> blocks. */ -pre code, pre kbd, pre samp { font-size: 100%; } +pre code, +pre kbd, +pre samp { + font-size: 100%; +} /* Used to denote text that shouldn't be selectable, such as line numbers or shell prompts. Guess which browser this doesn't work in. */ .noselect { - -moz-user-select: -moz-none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none; + -moz-user-select: -moz-none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + user-select: none; } /* -- Lists ----------------------------------------------------------------- */ -dd { margin: 0.2em 0 0.7em 1em; } -dl { margin: 1em 0; } -dt { font-weight: bold; } +dd { + margin: 0.2em 0 0.7em 1em; +} +dl { + margin: 1em 0; +} +dt { + font-weight: bold; +} /* -- Tables ---------------------------------------------------------------- */ -caption, th { text-align: left; } +caption, +th { + text-align: left; +} table { - border-collapse: collapse; - width: 100%; + border-collapse: collapse; + width: 100%; } -td, th { - border: 1px solid #fff; - padding: 5px 12px; - vertical-align: top; +td, +th { + border: 1px solid #fff; + padding: 5px 12px; + vertical-align: top; } -td { background: #E6E9F5; } -td dl { margin: 0; } -td dl dl { margin: 1em 0; } -td pre:first-child { margin-top: 0; } +td { + background: #e6e9f5; +} +td dl { + margin: 0; +} +td dl dl { + margin: 1em 0; +} +td pre:first-child { + margin-top: 0; +} th { - background: #D2D7E6;/*#97A0BF*/ - border-bottom: none; - border-top: none; - color: #000;/*#FFF1D5*/ - font-family: 'Trebuchet MS', sans-serif; - font-weight: bold; - line-height: 1.3; - white-space: nowrap; + background: #d2d7e6; /*#97A0BF*/ + border-bottom: none; + border-top: none; + color: #000; /*#FFF1D5*/ + font-family: 'Trebuchet MS', sans-serif; + font-weight: bold; + line-height: 1.3; + white-space: nowrap; } - /* -- Layout and Content ---------------------------------------------------- */ #doc { - margin: auto; - min-width: 1024px; + margin: auto; + min-width: 1024px; } -.content { padding: 0 20px 0 25px; } +.content { + padding: 0 20px 0 25px; +} .sidebar { - padding: 0 15px 0 10px; + padding: 0 15px 0 10px; } #bd { - padding: 7px 0 130px; - position: relative; - width: 99%; + padding: 7px 0 130px; + position: relative; + width: 99%; } /* -- Table of Contents ----------------------------------------------------- */ @@ -203,9 +267,17 @@ th { /* The #toc id refers to the single global table of contents, while the .toc class refers to generic TOC lists that could be used throughout the page. */ -.toc code, .toc kbd, .toc samp { font-size: 100%; } -.toc li { font-weight: bold; } -.toc li li { font-weight: normal; } +.toc code, +.toc kbd, +.toc samp { + font-size: 100%; +} +.toc li { + font-weight: bold; +} +.toc li li { + font-weight: normal; +} /* -- Intro and Example Boxes ----------------------------------------------- */ /* @@ -230,135 +302,170 @@ th { theme. */ .button { - border: 1px solid #dadada; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - color: #444; - display: inline-block; - font-family: Helvetica, Arial, sans-serif; - font-size: 92.308%; - font-weight: bold; - padding: 4px 13px 3px; - -moz-text-shadow: 1px 1px 0 #fff; - -webkit-text-shadow: 1px 1px 0 #fff; - text-shadow: 1px 1px 0 #fff; - white-space: nowrap; - - background: #EFEFEF; /* old browsers */ - background: -moz-linear-gradient(top, #f5f5f5 0%, #efefef 50%, #e5e5e5 51%, #dfdfdf 100%); /* firefox */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(50%,#efefef), color-stop(51%,#e5e5e5), color-stop(100%,#dfdfdf)); /* webkit */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#dfdfdf',GradientType=0 ); /* ie */ + border: 1px solid #dadada; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + color: #444; + display: inline-block; + font-family: Helvetica, Arial, sans-serif; + font-size: 92.308%; + font-weight: bold; + padding: 4px 13px 3px; + -moz-text-shadow: 1px 1px 0 #fff; + -webkit-text-shadow: 1px 1px 0 #fff; + text-shadow: 1px 1px 0 #fff; + white-space: nowrap; + + background: #efefef; /* old browsers */ + background: -moz-linear-gradient( + top, + #f5f5f5 0%, + #efefef 50%, + #e5e5e5 51%, + #dfdfdf 100% + ); /* firefox */ + background: -webkit-gradient( + linear, + left top, + left bottom, + color-stop(0%, #f5f5f5), + color-stop(50%, #efefef), + color-stop(51%, #e5e5e5), + color-stop(100%, #dfdfdf) + ); /* webkit */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#dfdfdf',GradientType=0 ); /* ie */ } .button:hover { - border-color: #466899; - color: #fff; - text-decoration: none; - -moz-text-shadow: 1px 1px 0 #222; - -webkit-text-shadow: 1px 1px 0 #222; - text-shadow: 1px 1px 0 #222; - - background: #6396D8; /* old browsers */ - background: -moz-linear-gradient(top, #6396D8 0%, #5A83BC 50%, #547AB7 51%, #466899 100%); /* firefox */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6396D8), color-stop(50%,#5A83BC), color-stop(51%,#547AB7), color-stop(100%,#466899)); /* webkit */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6396D8', endColorstr='#466899',GradientType=0 ); /* ie */ + border-color: #466899; + color: #fff; + text-decoration: none; + -moz-text-shadow: 1px 1px 0 #222; + -webkit-text-shadow: 1px 1px 0 #222; + text-shadow: 1px 1px 0 #222; + + background: #6396d8; /* old browsers */ + background: -moz-linear-gradient( + top, + #6396d8 0%, + #5a83bc 50%, + #547ab7 51%, + #466899 100% + ); /* firefox */ + background: -webkit-gradient( + linear, + left top, + left bottom, + color-stop(0%, #6396d8), + color-stop(50%, #5a83bc), + color-stop(51%, #547ab7), + color-stop(100%, #466899) + ); /* webkit */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6396D8', endColorstr='#466899',GradientType=0 ); /* ie */ +} + +.newwindow { + text-align: center; } -.newwindow { text-align: center; } - .header .version em { - display: block; - text-align: right; + display: block; + text-align: right; } - #classdocs .item { - border-bottom: 1px solid #466899; - margin: 1em 0; - padding: 1.5em; + border-bottom: 1px solid #466899; + margin: 1em 0; + padding: 1.5em; } #classdocs .item .params p, - #classdocs .item .returns p,{ - display: inline; +#classdocs .item .returns p { + display: inline; } -#classdocs .item em code, #classdocs .item em.comment { - color: green; +#classdocs .item em code, +#classdocs .item em.comment { + color: green; } #classdocs .item em.comment a { - color: green; - text-decoration: underline; + color: green; + text-decoration: underline; } #classdocs .foundat { - font-size: 11px; - font-style: normal; + font-size: 11px; + font-style: normal; } .attrs .emits { - margin-left: 2em; - padding: .5em; - border-left: 1px dashed #ccc; + margin-left: 2em; + padding: 0.5em; + border-left: 1px dashed #ccc; } abbr { - border-bottom: 1px dashed #ccc; - font-size: 80%; - cursor: help; -} - -.prettyprint li.L0, -.prettyprint li.L1, -.prettyprint li.L2, -.prettyprint li.L3, -.prettyprint li.L5, -.prettyprint li.L6, -.prettyprint li.L7, + border-bottom: 1px dashed #ccc; + font-size: 80%; + cursor: help; +} + +.prettyprint li.L0, +.prettyprint li.L1, +.prettyprint li.L2, +.prettyprint li.L3, +.prettyprint li.L5, +.prettyprint li.L6, +.prettyprint li.L7, .prettyprint li.L8 { - list-style: decimal; + list-style: decimal; } ul li p { - margin-top: 0; + margin-top: 0; } .method .name { - font-size: 110%; + font-size: 110%; } .apidocs .methods .extends .method, .apidocs .properties .extends .property, .apidocs .attrs .extends .attr, .apidocs .events .extends .event { - font-weight: bold; + font-weight: bold; } .apidocs .methods .extends .inherited, .apidocs .properties .extends .inherited, .apidocs .attrs .extends .inherited, .apidocs .events .extends .inherited { - font-weight: normal; + font-weight: normal; } #hd { - background: whiteSmoke; - background: -moz-linear-gradient(top,#DCDBD9 0,#F6F5F3 100%); - background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#DCDBD9),color-stop(100%,#F6F5F3)); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dcdbd9',endColorstr='#F6F5F3',GradientType=0); - border-bottom: 1px solid #DFDFDF; - padding: 0 15px 1px 20px; - margin-bottom: 15px; + background: whiteSmoke; + background: -moz-linear-gradient(top, #dcdbd9 0, #f6f5f3 100%); + background: -webkit-gradient( + linear, + left top, + left bottom, + color-stop(0%, #dcdbd9), + color-stop(100%, #f6f5f3) + ); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dcdbd9',endColorstr='#F6F5F3',GradientType=0); + border-bottom: 1px solid #dfdfdf; + padding: 0 15px 1px 20px; + margin-bottom: 15px; } #hd img { - margin-right: 10px; - vertical-align: middle; + margin-right: 10px; + vertical-align: middle; } - /* -- API Docs CSS ---------------------------------------------------------- */ /* @@ -376,109 +483,135 @@ specific tabview, see the other sections below. */ .yui3-js-enabled .apidocs .tabview { - visibility: hidden; /* Hide until the TabView finishes rendering. */ - _visibility: visible; + visibility: hidden; /* Hide until the TabView finishes rendering. */ + _visibility: visible; } -.apidocs .tabview.yui3-tabview-content { visibility: visible; } -.apidocs .tabview .yui3-tabview-panel { background: #fff; } +.apidocs .tabview.yui3-tabview-content { + visibility: visible; +} +.apidocs .tabview .yui3-tabview-panel { + background: #fff; +} /* -- Generic Content Styles ------------------------------------------------ */ /* Headings */ -h2, h3, h4, h5, h6 { - border: none; - color: #30418C; - font-weight: bold; - text-decoration: none; +h2, +h3, +h4, +h5, +h6 { + border: none; + color: #30418c; + font-weight: bold; + text-decoration: none; } .link-docs { - float: right; - font-size: 15px; - margin: 4px 4px 6px; - padding: 6px 30px 5px; + float: right; + font-size: 15px; + margin: 4px 4px 6px; + padding: 6px 30px 5px; } -.apidocs { zoom: 1; } +.apidocs { + zoom: 1; +} /* Generic box styles. */ .apidocs .box { - border: 1px solid; - border-radius: 3px; - margin: 1em 0; - padding: 0 1em; + border: 1px solid; + border-radius: 3px; + margin: 1em 0; + padding: 0 1em; } /* A flag is a compact, capsule-like indicator of some kind. It's used to indicate private and protected items, item return types, etc. in an attractive and unobtrusive way. */ .apidocs .flag { - background: #bababa; - border-radius: 3px; - color: #fff; - font-size: 11px; - margin: 0 0.5em; - padding: 2px 4px 1px; + background: #bababa; + border-radius: 3px; + color: #fff; + font-size: 11px; + margin: 0 0.5em; + padding: 2px 4px 1px; } /* Class/module metadata such as "Uses", "Extends", "Defined in", etc. */ .apidocs .meta { - background: #f9f9f9; - border-color: #efefef; - color: #555; - font-size: 11px; - padding: 3px 6px; + background: #f9f9f9; + border-color: #efefef; + color: #555; + font-size: 11px; + padding: 3px 6px; } -.apidocs .meta p { margin: 0; } +.apidocs .meta p { + margin: 0; +} /* Deprecation warning. */ .apidocs .box.deprecated, .apidocs .flag.deprecated { - background: #fdac9f; - border: 1px solid #fd7775; + background: #fdac9f; + border: 1px solid #fd7775; } -.apidocs .box.deprecated p { margin: 0.5em 0; } -.apidocs .flag.deprecated { color: #333; } +.apidocs .box.deprecated p { + margin: 0.5em 0; +} +.apidocs .flag.deprecated { + color: #333; +} /* Module/Class intro description. */ .apidocs .intro { - background: #f0f1f8; - border-color: #d4d8eb; + background: #f0f1f8; + border-color: #d4d8eb; } /* Loading spinners. */ #bd.loading .apidocs, #api-list.loading .yui3-tabview-panel { - background: #fff url(../img/spinner.gif) no-repeat center 70px; - min-height: 150px; + background: #fff url(../img/spinner.gif) no-repeat center 70px; + min-height: 150px; } #bd.loading .apidocs .content, #api-list.loading .yui3-tabview-panel .apis { - display: none; + display: none; } -.apidocs .no-visible-items { color: #666; } +.apidocs .no-visible-items { + color: #666; +} /* Generic inline list. */ .apidocs ul.inline { - display: inline; - list-style: none; - margin: 0; - padding: 0; + display: inline; + list-style: none; + margin: 0; + padding: 0; } -.apidocs ul.inline li { display: inline; } +.apidocs ul.inline li { + display: inline; +} /* Comma-separated list. */ -.apidocs ul.commas li:after { content: ','; } -.apidocs ul.commas li:last-child:after { content: ''; } +.apidocs ul.commas li:after { + content: ','; +} +.apidocs ul.commas li:last-child:after { + content: ''; +} /* Keyboard shortcuts. */ -kbd .cmd { font-family: Monaco, Helvetica; } +kbd .cmd { + font-family: Monaco, Helvetica; +} /* -- Generic Access Level styles ------------------------------------------- */ .apidocs .item.protected, @@ -486,7 +619,7 @@ kbd .cmd { font-family: Monaco, Helvetica; } .apidocs .index-item.protected, .apidocs .index-item.deprecated, .apidocs .index-item.private { - display: none; + display: none; } .show-deprecated .item.deprecated, @@ -495,181 +628,205 @@ kbd .cmd { font-family: Monaco, Helvetica; } .show-protected .index-item.protected, .show-private .item.private, .show-private .index-item.private { - display: block; + display: block; } .hide-inherited .item.inherited, .hide-inherited .index-item.inherited { - display: none; + display: none; } /* -- Generic Item Index styles --------------------------------------------- */ -.apidocs .index { margin: 1.5em 0 3em; } +.apidocs .index { + margin: 1.5em 0 3em; +} .apidocs .index h3 { - border-bottom: 1px solid #efefef; - color: #333; - font-size: 13px; - margin: 2em 0 0.6em; - padding-bottom: 2px; + border-bottom: 1px solid #efefef; + color: #333; + font-size: 13px; + margin: 2em 0 0.6em; + padding-bottom: 2px; } -.apidocs .index .no-visible-items { margin-top: 2em; } +.apidocs .index .no-visible-items { + margin-top: 2em; +} .apidocs .index-list { - border-color: #efefef; - font-size: 12px; - list-style: none; - margin: 0; - padding: 0; - -moz-column-count: 4; - -moz-column-gap: 10px; - -moz-column-width: 170px; - -ms-column-count: 4; - -ms-column-gap: 10px; - -ms-column-width: 170px; - -o-column-count: 4; - -o-column-gap: 10px; - -o-column-width: 170px; - -webkit-column-count: 4; - -webkit-column-gap: 10px; - -webkit-column-width: 170px; - column-count: 4; - column-gap: 10px; - column-width: 170px; + border-color: #efefef; + font-size: 12px; + list-style: none; + margin: 0; + padding: 0; + -moz-column-count: 4; + -moz-column-gap: 10px; + -moz-column-width: 170px; + -ms-column-count: 4; + -ms-column-gap: 10px; + -ms-column-width: 170px; + -o-column-count: 4; + -o-column-gap: 10px; + -o-column-width: 170px; + -webkit-column-count: 4; + -webkit-column-gap: 10px; + -webkit-column-width: 170px; + column-count: 4; + column-gap: 10px; + column-width: 170px; } .apidocs .no-columns .index-list { - -moz-column-count: 1; - -ms-column-count: 1; - -o-column-count: 1; - -webkit-column-count: 1; - column-count: 1; + -moz-column-count: 1; + -ms-column-count: 1; + -o-column-count: 1; + -webkit-column-count: 1; + column-count: 1; } -.apidocs .index-item { white-space: nowrap; } +.apidocs .index-item { + white-space: nowrap; +} .apidocs .index-item .flag { - background: none; - border: none; - color: #afafaf; - display: inline; - margin: 0 0 0 0.2em; - padding: 0; + background: none; + border: none; + color: #afafaf; + display: inline; + margin: 0 0 0 0.2em; + padding: 0; } /* -- Generic API item styles ----------------------------------------------- */ .apidocs .args { - display: inline; - margin: 0 0.5em; + display: inline; + margin: 0 0.5em; } -.apidocs .flag.chainable { background: #46ca3b; } -.apidocs .flag.protected { background: #9b86fc; } -.apidocs .flag.private { background: #fd6b1b; } -.apidocs .flag.async { background: #356de4; } -.apidocs .flag.required { background: #e60923; } +.apidocs .flag.chainable { + background: #46ca3b; +} +.apidocs .flag.protected { + background: #9b86fc; +} +.apidocs .flag.private { + background: #fd6b1b; +} +.apidocs .flag.async { + background: #356de4; +} +.apidocs .flag.required { + background: #e60923; +} .apidocs .item { - border-bottom: 1px solid #efefef; - padding-top: 10px; - padding-bottom: 10px; + border-bottom: 1px solid #efefef; + padding-top: 10px; + padding-bottom: 10px; } .apidocs .item h4, .apidocs .item h5, .apidocs .item h6 { - color: #333; - font-family: inherit; - font-size: 100%; + color: #333; + font-family: inherit; + font-size: 100%; } .apidocs .item .description p, .apidocs .item pre.code { - margin: 1em 0 0; + margin: 1em 0 0; } .apidocs .item .meta { - background: none; - border: none; - padding: 0; + background: none; + border: none; + padding: 0; } .apidocs .item .name { - display: inline; - font-size: 14px; + display: inline; + font-size: 14px; } .apidocs .item .type, .apidocs .item .type a, .apidocs .returns-inline { - color: #555; + color: #555; } .apidocs .item .type, .apidocs .returns-inline { - font-size: 11px; - margin: 0 0 0 0; + font-size: 11px; + margin: 0 0 0 0; } -.apidocs .item .type a { border-bottom: 1px dotted #afafaf; } -.apidocs .item .type a:hover { border: none; } +.apidocs .item .type a { + border-bottom: 1px dotted #afafaf; +} +.apidocs .item .type a:hover { + border: none; +} /* -- Item Parameter List --------------------------------------------------- */ .apidocs .params-list { - list-style: square; - margin: 1em 0 0 2em; - padding: 0; + list-style: square; + margin: 1em 0 0 2em; + padding: 0; } .apidocs .param .param-description { - padding-top: 2px; + padding-top: 2px; } -.apidocs .param { margin-bottom: 1em; } +.apidocs .param { + margin-bottom: 1em; +} .apidocs .param .type, .apidocs .param .type a { - color: #666; + color: #666; } .apidocs .param .type { - margin: 0 0 0 0.5em; - *margin-left: 0.5em; + margin: 0 0 0 0.5em; + *margin-left: 0.5em; } -.apidocs .param-name { font-weight: bold; } +.apidocs .param-name { + font-weight: bold; +} /* -- Item "Emits" block ---------------------------------------------------- */ .apidocs .item .emits { - background: #f9f9f9; - border-color: #eaeaea; + background: #f9f9f9; + border-color: #eaeaea; } /* -- Item "Returns" block -------------------------------------------------- */ .apidocs .item .returns .type, .apidocs .item .returns .type a { - font-size: 100%; - margin: 0; + font-size: 100%; + margin: 0; } /* -- Class Constructor block ----------------------------------------------- */ .apidocs .constructor .item { - border: none; - padding-bottom: 0; + border: none; + padding-bottom: 0; } .apidocs .constructor { - padding-bottom: 10px; + padding-bottom: 10px; } /* -- File Source View ------------------------------------------------------ */ .apidocs .file pre.code, #doc .apidocs .file pre.prettyprint { - background: inherit; - border: none; - overflow: visible; - padding: 0; + background: inherit; + border: none; + overflow: visible; + padding: 0; } .apidocs .L0, @@ -682,36 +839,46 @@ kbd .cmd { font-family: Monaco, Helvetica; } .apidocs .L7, .apidocs .L8, .apidocs .L9 { - background: inherit; + background: inherit; } /* -- Submodule List -------------------------------------------------------- */ .apidocs .module-submodule-description { - font-size: 12px; - margin: 0.3em 0 1em; + font-size: 12px; + margin: 0.3em 0 1em; } -.apidocs .module-submodule-description p:first-child { margin-top: 0; } +.apidocs .module-submodule-description p:first-child { + margin-top: 0; +} /* -- Sidebar TabView ------------------------------------------------------- */ -#api-tabview { margin-top: 0.6em; } +#api-tabview { + margin-top: 0.6em; +} #api-tabview-filter, #api-tabview-panel { - border: 1px solid #dfdfdf; + border: 1px solid #dfdfdf; } #api-tabview-filter { - border-bottom: none; - border-top: none; - padding: 0.6em 10px 0 10px; + border-bottom: none; + border-top: none; + padding: 0.6em 10px 0 10px; } -#api-tabview-panel { border-top: none; } -#api-filter { width: 97%; } +#api-tabview-panel { + border-top: none; +} +#api-filter { + width: 97%; +} /* -- Content TabView ------------------------------------------------------- */ -#classdocs .yui3-tabview-panel { border: none; } +#classdocs .yui3-tabview-panel { + border: none; +} /* -- Source File Contents -------------------------------------------------- */ .prettyprint li.L0, @@ -722,72 +889,82 @@ kbd .cmd { font-family: Monaco, Helvetica; } .prettyprint li.L6, .prettyprint li.L7, .prettyprint li.L8 { - list-style: decimal; + list-style: decimal; } /* -- API options ----------------------------------------------------------- */ #api-options { - font-size: 11px; - margin-top: 2.2em; - position: absolute; - right: 1.5em; + font-size: 11px; + margin-top: 2.2em; + position: absolute; + right: 1.5em; } /*#api-options label { margin-right: 0.6em; }*/ /* -- API list -------------------------------------------------------------- */ #api-list { - margin-top: 1.5em; - *zoom: 1; + margin-top: 1.5em; + *zoom: 1; } .apis { - font-size: 12px; - line-height: 1.4; - list-style: none; - margin: 0; - padding: 0.5em 0 0.5em 0.4em; + font-size: 12px; + line-height: 1.4; + list-style: none; + margin: 0; + padding: 0.5em 0 0.5em 0.4em; } .apis a { - border: 1px solid transparent; - display: block; - margin: 0 0 0 -4px; - padding: 1px 4px 0; - text-decoration: none; - _border: none; - _display: inline; + border: 1px solid transparent; + display: block; + margin: 0 0 0 -4px; + padding: 1px 4px 0; + text-decoration: none; + _border: none; + _display: inline; } .apis a:hover, .apis a:focus { - background: #E8EDFC; - background: -moz-linear-gradient(top, #e8edfc 0%, #becef7 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#E8EDFC), color-stop(100%,#BECEF7)); - border-color: #AAC0FA; - border-radius: 3px; - color: #333; - outline: none; + background: #e8edfc; + background: -moz-linear-gradient(top, #e8edfc 0%, #becef7 100%); + background: -webkit-gradient( + linear, + left top, + left bottom, + color-stop(0%, #e8edfc), + color-stop(100%, #becef7) + ); + border-color: #aac0fa; + border-radius: 3px; + color: #333; + outline: none; } .api-list-item a:hover, .api-list-item a:focus { - font-weight: bold; - text-shadow: 1px 1px 1px #fff; + font-weight: bold; + text-shadow: 1px 1px 1px #fff; } -.apis .message { color: #888; } -.apis .result a { padding: 3px 5px 2px; } +.apis .message { + color: #888; +} +.apis .result a { + padding: 3px 5px 2px; +} .apis .result .type { - right: 4px; - top: 7px; + right: 4px; + top: 7px; } .api-list-item .yui3-highlight { - font-weight: bold; + font-weight: bold; } .form-inline label { - line-height: 20px; + line-height: 20px; } diff --git a/docs/src/sdk-template/assets/css/prettify.css b/docs/src/sdk-template/assets/css/prettify.css index 9a5a887d..77706ba0 100644 --- a/docs/src/sdk-template/assets/css/prettify.css +++ b/docs/src/sdk-template/assets/css/prettify.css @@ -1,120 +1,121 @@ /* GitHub Theme */ .prettyprint { - } .pln { - color: #333333; + color: #333333; } @media screen { - .str { - color: #dd1144; - } + .str { + color: #dd1144; + } - .kwd { - color: #333333; - } + .kwd { + color: #333333; + } - .com { - color: #999988; - } + .com { + color: #999988; + } - .typ { - color: #445588; - } + .typ { + color: #445588; + } - .lit { - color: #445588; - } + .lit { + color: #445588; + } - .pun { - color: #333333; - } + .pun { + color: #333333; + } - .opn { - color: #333333; - } + .opn { + color: #333333; + } - .clo { - color: #333333; - } + .clo { + color: #333333; + } - .tag { - color: navy; - } + .tag { + color: navy; + } - .atn { - color: teal; - } + .atn { + color: teal; + } - .atv { - color: #dd1144; - } + .atv { + color: #dd1144; + } - .dec { - color: #333333; - } + .dec { + color: #333333; + } - .var { - color: teal; - } + .var { + color: teal; + } - .fun { - color: #990000; - } + .fun { + color: #990000; + } } @media print, projection { - .str { - color: #006600; - } - - .kwd { - color: #006; - font-weight: bold; - } - - .com { - color: #600; - font-style: italic; - } - - .typ { - color: #404; - font-weight: bold; - } - - .lit { - color: #004444; - } - - .pun, .opn, .clo { - color: #444400; - } - - .tag { - color: #006; - font-weight: bold; - } - - .atn { - color: #440044; - } - - .atv { - color: #006600; - } + .str { + color: #006600; + } + + .kwd { + color: #006; + font-weight: bold; + } + + .com { + color: #600; + font-style: italic; + } + + .typ { + color: #404; + font-weight: bold; + } + + .lit { + color: #004444; + } + + .pun, + .opn, + .clo { + color: #444400; + } + + .tag { + color: #006; + font-weight: bold; + } + + .atn { + color: #440044; + } + + .atv { + color: #006600; + } } /* Specify class=linenums on a pre to get line numbering */ ol.linenums { - margin: 0; + margin: 0; } ol.linenums li { - padding-left: 12px; - color: #bebec5; - line-height: 20px; - text-shadow: 0 1px 0 #fff; + padding-left: 12px; + color: #bebec5; + line-height: 20px; + text-shadow: 0 1px 0 #fff; } /* IE indents via margin-left */ @@ -128,7 +129,7 @@ li.L6, li.L7, li.L8, li.L9 { - /* */ + /* */ } /* Alternate shading for lines */ @@ -137,5 +138,5 @@ li.L3, li.L5, li.L7, li.L9 { - /* */ -} \ No newline at end of file + /* */ +} diff --git a/docs/src/sdk-template/assets/index.html b/docs/src/sdk-template/assets/index.html index 487fe15b..498c3647 100755 --- a/docs/src/sdk-template/assets/index.html +++ b/docs/src/sdk-template/assets/index.html @@ -1,10 +1,10 @@ -<!doctype html> +<!DOCTYPE html> <html> - <head> - <title>Redirector - - - - Click here to redirect - + + Redirector + + + + Click here to redirect + diff --git a/docs/src/sdk-template/assets/js/yuidoc-bootstrap.js b/docs/src/sdk-template/assets/js/yuidoc-bootstrap.js index 2039696e..a099beeb 100755 --- a/docs/src/sdk-template/assets/js/yuidoc-bootstrap.js +++ b/docs/src/sdk-template/assets/js/yuidoc-bootstrap.js @@ -1,130 +1,126 @@ /* global $:true */ -$(function() { - 'use strict'; - - //trim whitespace - $('li','ul.params').each(function(){ - $(this).text( $.trim( $(this).text() ) ); - }); - - //options radios - function setUpOptionsCheckboxes() { - if(localStorage.getItem('f2docsoptions')){ - var optionsArr = JSON.parse(localStorage.f2docsoptions), - optionsForm = $('#options-form'); - - for(var i=0;i li').eq(whichLi); - } - - $tabToActivate = $('[data-toggle=tab][href="'+ tabToActivate + '"]'); - if ($tabToActivate.length) { - $tabToActivate.trigger('click', { ignore: true }); - } - - if ($scroll.length) { - scrollToAnchor($scroll); - } - } - - // ************************************************************************* // - // Initializations + Event listeners - // ************************************************************************* // - - // - // Bind change events for options form checkboxes - $('#options-form input:checkbox').on('change', function(){ - setOptionDisplayState($(this)); - - // Update localstorage - var optionsArr = []; - $('#options-form input:checkbox').each(function(i,el) { - optionsArr.push($(el).is(':checked')); - }); - localStorage.f2docsoptions = JSON.stringify(optionsArr); - }); - - function setUpHashChange() { - $(window).on('hashchange', moveToWindowHash); - } - - // ************************************************************************* // - // Immediate function calls - // ************************************************************************* // - setUpOptionsCheckboxes(); - setUpHashChange(); - if (window.location.hash) { - moveToWindowHash(); - } - +$(function () { + 'use strict'; + + //trim whitespace + $('li', 'ul.params').each(function () { + $(this).text($.trim($(this).text())); + }); + + //options radios + function setUpOptionsCheckboxes() { + if (localStorage.getItem('f2docsoptions')) { + var optionsArr = JSON.parse(localStorage.f2docsoptions), + optionsForm = $('#options-form'); + + for (var i = 0; i < optionsArr.length; i++) { + var box = optionsForm.find('input:checkbox').eq(i); + box.prop('checked', optionsArr[i]); + setOptionDisplayState(box); + } + } else { + $('#options-form input:checkbox').each(function () { + setOptionDisplayState($(this)); + }); + } + } + + function setOptionDisplayState(box) { + var cssName = $.trim(box.parent('label').text()).toLowerCase(); + if (box.is(':checked')) { + $('.' + cssName).css('display', 'block'); + $('.' + cssName).css('display', 'block'); + $('tr.' + cssName).css('display', 'table-row'); + } else { + $('.' + cssName).css('display', 'none'); + } + } + + function scrollToAnchor($anchor) { + $(document).scrollTop($anchor.offset().top); + } + + $('[data-toggle=tab]').on('click', function (event, extraArgs) { + // Why? If responding to the click of a link or hashchange already, we really + // don't want to change window hash + if (extraArgs && extraArgs.ignore === true) { + return; + } + window.location.hash = $(this).attr('href'); + }); + + $('[data-tabid]').on('click', function (event) { + var tabToActivate = $(this).attr('data-tabid'), + anchor = $(this).attr('data-anchor'); + event.preventDefault(); + + $('[data-toggle=tab][href="' + tabToActivate + '"]').click(); + // ...huh? http://stackoverflow.com/a/9930611 + // otherwise, can't select an element by ID if the ID has a '.' in it + var scrollAnchor = anchor.replace(/\./g, '\\.'); + scrollToAnchor($(scrollAnchor)); + window.location.hash = anchor; + }); + + function moveToWindowHash() { + var hash = window.location.hash, + tabToActivate = hash, + $tabToActivate = false, + $scroll = $(hash); + + if (!hash) { + return; + } + + if (hash.match(/^#method_/)) { + tabToActivate = '#methods'; + } else if (hash.match(/^#property_/)) { + tabToActivate = '#properties'; + } else if (hash.match(/^#event_/)) { + tabToActivate = '#event'; + } else if (hash.match(/#l\d+/)) { + var lineNumber = /#l(\d+)/.exec(hash)[1]; + var whichLi = parseInt(lineNumber, 10) - 1; //e.g. line 1 is 0th element + $scroll = $('ol.linenums > li').eq(whichLi); + } + + $tabToActivate = $('[data-toggle=tab][href="' + tabToActivate + '"]'); + if ($tabToActivate.length) { + $tabToActivate.trigger('click', { ignore: true }); + } + + if ($scroll.length) { + scrollToAnchor($scroll); + } + } + + // ************************************************************************* // + // Initializations + Event listeners + // ************************************************************************* // + + // + // Bind change events for options form checkboxes + $('#options-form input:checkbox').on('change', function () { + setOptionDisplayState($(this)); + + // Update localstorage + var optionsArr = []; + $('#options-form input:checkbox').each(function (i, el) { + optionsArr.push($(el).is(':checked')); + }); + localStorage.f2docsoptions = JSON.stringify(optionsArr); + }); + + function setUpHashChange() { + $(window).on('hashchange', moveToWindowHash); + } + + // ************************************************************************* // + // Immediate function calls + // ************************************************************************* // + setUpOptionsCheckboxes(); + setUpHashChange(); + if (window.location.hash) { + moveToWindowHash(); + } }); diff --git a/docs/src/sdk-template/helpers/helpers.js b/docs/src/sdk-template/helpers/helpers.js index ffca6bb3..ad7ebe49 100755 --- a/docs/src/sdk-template/helpers/helpers.js +++ b/docs/src/sdk-template/helpers/helpers.js @@ -1,40 +1,40 @@ module.exports = { - publicClasses: function(context, options) { - 'use strict'; - var ret = ""; + publicClasses: function (context, options) { + 'use strict'; + var ret = ''; - for(var i=0; i < context.length; i++) { - if(!context[i].itemtype && context[i].access === 'public') { - ret = ret + options.fn(context[i]); - } else if (context[i].itemtype) { - ret = ret + options.fn(context[i]); - } - } + for (var i = 0; i < context.length; i++) { + if (!context[i].itemtype && context[i].access === 'public') { + ret = ret + options.fn(context[i]); + } else if (context[i].itemtype) { + ret = ret + options.fn(context[i]); + } + } - return ret; - }, - search : function(classes, modules) { - 'use strict'; - var ret = ''; + return ret; + }, + search: function (classes, modules) { + 'use strict'; + var ret = ''; - for(var i=0; i < classes.length; i++) { - if(i > 0) { - ret += ', '; - } - ret += "\"" + 'classes/' + classes[i].displayName + "\""; - } + for (var i = 0; i < classes.length; i++) { + if (i > 0) { + ret += ', '; + } + ret += '"' + 'classes/' + classes[i].displayName + '"'; + } - if(ret.length > 0 && modules.length > 0) { - ret += ', '; - } + if (ret.length > 0 && modules.length > 0) { + ret += ', '; + } - for(var j=0; j < modules.length; j++) { - if(j > 0) { - ret += ', '; - } - ret += "\"" + 'modules/' + modules[j].displayName + "\""; - } + for (var j = 0; j < modules.length; j++) { + if (j > 0) { + ret += ', '; + } + ret += '"' + 'modules/' + modules[j].displayName + '"'; + } - return ret; - } + return ret; + } }; diff --git a/docs/src/sdk-template/package.json b/docs/src/sdk-template/package.json index 2fb63a91..7e886f9e 100755 --- a/docs/src/sdk-template/package.json +++ b/docs/src/sdk-template/package.json @@ -1,22 +1,22 @@ { - "name": "yuidoc-bootstrap-theme", - "version": "1.0.4", - "description": "A revamped yuidoc theme with bootstrap", - "repository": { - "type": "git", - "url": "git://github.com/kevinlacotaco/yuidoc-bootstrap-theme.git" - }, - "keywords": [ - "yuidoc", - "bootstrap" - ], - "author": "Kevin Lakotko", - "contributors": [ - "Anthony Barone (http://anthonyb.me)" - ], - "bugs": { - "url": "https://github.com/kevinlacotaco/yuidoc-bootstrap-theme/issues" - }, - "homepage": "https://github.com/kevinlacotaco/yuidoc-bootstrap-theme", - "license": "MIT" + "name": "yuidoc-bootstrap-theme", + "version": "1.0.4", + "description": "A revamped yuidoc theme with bootstrap", + "repository": { + "type": "git", + "url": "git://github.com/kevinlacotaco/yuidoc-bootstrap-theme.git" + }, + "keywords": [ + "yuidoc", + "bootstrap" + ], + "author": "Kevin Lakotko", + "contributors": [ + "Anthony Barone (http://anthonyb.me)" + ], + "bugs": { + "url": "https://github.com/kevinlacotaco/yuidoc-bootstrap-theme/issues" + }, + "homepage": "https://github.com/kevinlacotaco/yuidoc-bootstrap-theme", + "license": "MIT" } diff --git a/docs/src/sdk-template/partials/files.handlebars b/docs/src/sdk-template/partials/files.handlebars index 056c519a..0d3615ff 100755 --- a/docs/src/sdk-template/partials/files.handlebars +++ b/docs/src/sdk-template/partials/files.handlebars @@ -1,7 +1,7 @@ -

{{fileName}} File

+

{{fileName}} File

-
-

-{{fileData}}
-    
-
+
+

+			{{fileData}}
+		
+
\ No newline at end of file diff --git a/docs/src/sdk-template/partials/index.handlebars b/docs/src/sdk-template/partials/index.handlebars index a406b8f6..9417fea6 100755 --- a/docs/src/sdk-template/partials/index.handlebars +++ b/docs/src/sdk-template/partials/index.handlebars @@ -1,60 +1,97 @@ -

API Reference

+

API Reference

-

-The goal of F2 is to define a development standard for the financial services industry that offers a cost saving, risk-reducing method for building innovative, multi-provider solutions. +

+ The goal of F2 is to define a development standard for the financial services + industry that offers a cost saving, risk-reducing method for building + innovative, multi-provider solutions.

Getting Started

-

To instantly F2-enable your solution, download and include F2.js on your web pages. It's only 7.6kb and works with jQuery, Angular, Dojo, ExtJS and other toolkits. You can use any backend you'd like; .NET, Java, Node.js, PHP and more are all supported.

+

To instantly F2-enable your solution, download and include F2.js on your web + pages. It's only 7.6kb and works with jQuery, Angular, Dojo, ExtJS and other + toolkits. You can use any backend you'd like; .NET, Java, Node.js, PHP and + more are all supported.

Latest Version

-

The latest version of F2 is {{projectVersion}}. Previous versions are available on GitHub.

+

The latest version of F2 is + {{projectVersion}}. Previous + versions are available on + GitHub.

- + -

Download version {{projectVersion}}

+

Download version {{projectVersion}}

Examples

There are a few different types of examples available below. -
- -
-

Examples

- Visit the [examples](../examples.html) page for a live demo of Apps in a basic Container. +
+ +
+

Examples

+ Visit the [examples](../examples.html) page for a live demo of Apps in a + basic Container.
-
- -
-

Download

- A variety of example Containers and Apps to download and run on your localhost. Most are "plain" javascript, others are written in .NET, PHP and Node.js. The examples source code is also on GitHub. +
+ +
+

Download

+ A variety of example Containers and Apps to + download + and run on your localhost. Most are "plain" javascript, others are written + in .NET, PHP and Node.js. The + examples source + code is also on GitHub.
-
- -
-

jsFiddle

- Review a collection of fiddles on jsfiddle.net/user/openF2js. +
+ +
+

jsFiddle

+ Review a collection of fiddles on + jsfiddle.net/user/openF2js.
-
- -
-

Codepen

- Review a collection of pens on codepen.io/openF2. +
+ +
+

Codepen

+ Review a collection of pens on + codepen.io/openF2.
-
- -
-

iOS Demo App

- An iOS app demonstrating F2 App integration using UIWebViews, a javascript bridge for F2 Context, and a native search control. +
+ +
+

iOS Demo App

+ An + iOS app + demonstrating F2 App integration using UIWebViews, a javascript bridge for + F2 Context, and a native + search control.
-
+
\ No newline at end of file diff --git a/docs/src/sdk-template/partials/options.handlebars b/docs/src/sdk-template/partials/options.handlebars index 0273dfc1..1e8cfe61 100755 --- a/docs/src/sdk-template/partials/options.handlebars +++ b/docs/src/sdk-template/partials/options.handlebars @@ -1,6 +1,6 @@ -
- Show: - -
- -
-
- -
+
+ +
+
+ +
\ No newline at end of file diff --git a/docs/src/sdk-template/theme.json b/docs/src/sdk-template/theme.json index e4c4ab71..11880fc4 100755 --- a/docs/src/sdk-template/theme.json +++ b/docs/src/sdk-template/theme.json @@ -1,3 +1,3 @@ { - "yuiSeedUrl": "http://yui.yahooapis.com/combo?3.7.0/build/yui/yui-min.js" + "yuiSeedUrl": "http://yui.yahooapis.com/combo?3.7.0/build/yui/yui-min.js" } diff --git a/docs/src/template/footer.html b/docs/src/template/footer.html index 4539253b..b17b93b8 100644 --- a/docs/src/template/footer.html +++ b/docs/src/template/footer.html @@ -1,44 +1,85 @@ - \ No newline at end of file +
+
+
+

F2

+ + + +
+ +
+
+ +
+
+ diff --git a/docs/src/template/head.html b/docs/src/template/head.html index 31288669..0b7cd7e9 100644 --- a/docs/src/template/head.html +++ b/docs/src/template/head.html @@ -1,39 +1,97 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file + (function () { + var ga = document.createElement('script'); + ga.type = 'text/javascript'; + ga.async = true; + ga.src = + ('https:' == document.location.protocol + ? 'https://ssl' + : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; + s.parentNode.insertBefore(ga, s); + })(); + } + diff --git a/docs/src/template/nav.html b/docs/src/template/nav.html index 93978fe4..31ab1fdc 100644 --- a/docs/src/template/nav.html +++ b/docs/src/template/nav.html @@ -1,14 +1,22 @@ - \ No newline at end of file +
+ + +
+
diff --git a/docs/src/webpack.config.js b/docs/src/webpack.config.js index ebce147a..9cb34623 100644 --- a/docs/src/webpack.config.js +++ b/docs/src/webpack.config.js @@ -1,4 +1,4 @@ -const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const path = require('path'); const pkg = require('../../package.json'); @@ -25,7 +25,10 @@ module.exports = { loader: 'less-loader', options: { lessOptions: { - banner: `/*! F2 v${pkg.version} ${new Date().toLocaleString('en', { dateStyle: 'short' })} Copyright IHS Markit Digital */\n`, + banner: `/*! F2 v${pkg.version} ${new Date().toLocaleString( + 'en', + { dateStyle: 'short' } + )} Copyright IHS Markit Digital */\n`, compress: true, modifyVars: { imgPath: '', @@ -45,4 +48,4 @@ module.exports = { filename: '[name].css' }) ] -} \ No newline at end of file +}; diff --git a/examples/apps/CSharp/Content/Scripts/HelloWorld/appclass.js b/examples/apps/CSharp/Content/Scripts/HelloWorld/appclass.js index b0113b12..59650594 100644 --- a/examples/apps/CSharp/Content/Scripts/HelloWorld/appclass.js +++ b/examples/apps/CSharp/Content/Scripts/HelloWorld/appclass.js @@ -1,5 +1,4 @@ -F2.Apps["com_openf2_examples_csharp_helloworld"] = (function() { - +F2.Apps['com_openf2_examples_csharp_helloworld'] = (function () { var App_Class = function (appConfig, appContent, root) { this.appConfig = appConfig; this.appContent = appContent; @@ -7,47 +6,52 @@ F2.Apps["com_openf2_examples_csharp_helloworld"] = (function() { }; App_Class.prototype.init = function () { - - $('a.testAlert', this.$root).on('click', $.proxy(function() { - alert("Hello World!"); - F2.log('callback fired!'); - }, this)); - - $('a.testConfirm', this.$root).on('click', $.proxy(function() { - let r = confirm('Hello World!'); - if (r == true) { - F2.log('ok callback fired!'); - } else { - F2.log('cancel callback fired!'); - } - }, this)); - + $('a.testAlert', this.$root).on( + 'click', + $.proxy(function () { + alert('Hello World!'); + F2.log('callback fired!'); + }, this) + ); + + $('a.testConfirm', this.$root).on( + 'click', + $.proxy(function () { + let r = confirm('Hello World!'); + if (r == true) { + F2.log('ok callback fired!'); + } else { + F2.log('cancel callback fired!'); + } + }, this) + ); // bind symbol change event - F2.Events.on(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, $.proxy(this._handleSymbolChange, this)); + F2.Events.on( + F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, + $.proxy(this._handleSymbolChange, this) + ); }; App_Class.prototype._handleSymbolChange = function (data) { - - var symbolAlert = $("div.symbolAlert", this.$root); - symbolAlert = (symbolAlert.length) - ? symbolAlert - : this._renderSymbolAlert(); - - $("span:first", symbolAlert).text("The symbol has been changed to " + data.symbol); + var symbolAlert = $('div.symbolAlert', this.$root); + symbolAlert = symbolAlert.length ? symbolAlert : this._renderSymbolAlert(); + $('span:first', symbolAlert).text( + 'The symbol has been changed to ' + data.symbol + ); }; - App_Class.prototype._renderSymbolAlert = function() { - - return $([ + App_Class.prototype._renderSymbolAlert = function () { + return $( + [ '
', - '', - '', + '', + '', '
' - ].join('')) - .prependTo($("." + F2.Constants.Css.APP_CONTAINER,this.$root)); + ].join('') + ).prependTo($('.' + F2.Constants.Css.APP_CONTAINER, this.$root)); }; return App_Class; -})(); \ No newline at end of file +})(); diff --git a/examples/apps/JavaScript/CDS/app.css b/examples/apps/JavaScript/CDS/app.css index a83c739a..03a84894 100644 --- a/examples/apps/JavaScript/CDS/app.css +++ b/examples/apps/JavaScript/CDS/app.css @@ -1,6 +1,11 @@ -.com_openf2_examples_javascript_cds h5 {margin-bottom: 0;} +.com_openf2_examples_javascript_cds h5 { + margin-bottom: 0; +} -.com_openf2_examples_javascript_cds .table th{white-space: nowrap; line-height: 13px;} +.com_openf2_examples_javascript_cds .table th { + white-space: nowrap; + line-height: 13px; +} .com_openf2_examples_javascript_cds .table th, .com_openf2_examples_javascript_cds .table td { text-align: right; @@ -12,11 +17,11 @@ } .com_openf2_examples_javascript_cds .pos { - color:green; + color: green; } .com_openf2_examples_javascript_cds .neg { - color:red; + color: red; } .com_openf2_examples_javascript_cds table table { @@ -26,4 +31,7 @@ .com_openf2_examples_javascript_cds table table tr { cursor: text; } -.com_openf2_examples_javascript_cds p {line-height: 13px; color: #8F8F8F;} \ No newline at end of file +.com_openf2_examples_javascript_cds p { + line-height: 13px; + color: #8f8f8f; +} diff --git a/examples/apps/JavaScript/CDS/appclass.js b/examples/apps/JavaScript/CDS/appclass.js index c44ab303..c003cfaa 100644 --- a/examples/apps/JavaScript/CDS/appclass.js +++ b/examples/apps/JavaScript/CDS/appclass.js @@ -1,126 +1,134 @@ -F2.Apps['com_openf2_examples_javascript_cds'] = (function (appConfig, appContent, root) { - - (function(){ +F2.Apps['com_openf2_examples_javascript_cds'] = (function ( + appConfig, + appContent, + root +) { + (function () { //http://javascript.crockford.com/remedial.html - String.prototype.supplant = function(o) { - return this.replace(/{([^{}]*)}/g, - function(a, b) { - var r = o[b]; - return typeof r === 'string' || typeof r === 'number' ? r : a; - } - ); + String.prototype.supplant = function (o) { + return this.replace(/{([^{}]*)}/g, function (a, b) { + var r = o[b]; + return typeof r === 'string' || typeof r === 'number' ? r : a; + }); }; })(); - var App = function(appConfig, appContent, root) { - this.appConfig = appConfig; - this.appContent = appContent; - this.root = root; - this.$root = $(root); - this.$settings = $('form[data-f2-view="settings"]', this.$root); - this.settings = { - allowExternalAdd: false - }; - }; - - App.prototype.init = function() { + var App = function (appConfig, appContent, root) { + this.appConfig = appConfig; + this.appContent = appContent; + this.root = root; + this.$root = $(root); + this.$settings = $('form[data-f2-view="settings"]', this.$root); + this.settings = { + allowExternalAdd: false + }; + }; + + App.prototype.init = function () { this.getData(); - this.initEvents(); - }; - - App.prototype.COOKIE_NAME = "F2_Examples_CDS"; - - App.prototype.ROW = [ - '', - '', - '{name}', - '', - '{spread}', - '{changePct}', + this.initEvents(); + }; + + App.prototype.COOKIE_NAME = 'F2_Examples_CDS'; + + App.prototype.ROW = [ + '', + "", + "{name}", + '', + '{spread}', + '{changePct}', '' ].join(''); App.prototype.data = []; - App.prototype.initEvents = function(){ - + App.prototype.initEvents = function () { // bind save settings - this.$root.on("click", "button.save", $.proxy(function(){ - this._saveSettings(); - },this)); - + this.$root.on( + 'click', + 'button.save', + $.proxy(function () { + this._saveSettings(); + }, this) + ); }; - App.prototype._saveSettings = function(){ - this.settings.allowExternalAdd = $('input[name=allowExternalAdd]', this.$settings).is(':checked'); + App.prototype._saveSettings = function () { + this.settings.allowExternalAdd = $( + 'input[name=allowExternalAdd]', + this.$settings + ).is(':checked'); }; - App.prototype._populateSettings = function(){ - $('input[name=allowExternalAdd]', this.$settings).attr('checked', this.settings.alltableswithkeys); - } + App.prototype._populateSettings = function () { + $('input[name=allowExternalAdd]', this.$settings).attr( + 'checked', + this.settings.alltableswithkeys + ); + }; - App.prototype._supportsLocalStorage = function(){ - return (typeof(Storage) !== "undefined"); - }; + App.prototype._supportsLocalStorage = function () { + return typeof Storage !== 'undefined'; + }; - App.prototype.drawTable = function(rTighteners, rWideners){ - var TightenerTable = [], WidenerTable = [], TableHeading = [], self = this; + App.prototype.drawTable = function (rTighteners, rWideners) { + var TightenerTable = [], + WidenerTable = [], + TableHeading = [], + self = this; TableHeading.push( - '', - '', - '', - '', - '', - '', - '', - '', - '' + "
NameSpread (bps)1 Day
% Change
", + '', + '', + "", + '', + '', + '', + '', + '' ); TightenerTable = TightenerTable.concat(TableHeading); - TightenerTable.push( - rTighteners, - '', - '
NameSpread (bps)1 Day
% Change
' - ); + TightenerTable.push(rTighteners, '', ''); WidenerTable = WidenerTable.concat(TableHeading); - WidenerTable.push( - rWideners, - '', - '' - ); - - $("div.cdsMovers", this.root).html([ - '
Global Daily Tighteners (five-year CDS)
', - TightenerTable.join(''), - '
Global Daily Wideners (five-year CDS)
', - WidenerTable.join('')].join('') + WidenerTable.push(rWideners, '', ''); + + $('div.cdsMovers', this.root).html( + [ + '
Global Daily Tighteners (five-year CDS)
', + TightenerTable.join(''), + '
Global Daily Wideners (five-year CDS)
', + WidenerTable.join('') + ].join('') ); - }; - App.prototype.drawCDSList = function(bTighteners, cdsData){ + App.prototype.drawCDSList = function (bTighteners, cdsData) { + var label = bTighteners ? 'Tightener' : 'Widener'; + var rRows = [], + self = this; - var label = bTighteners ? "Tightener" : "Widener"; - var rRows = [], self = this; - - if (cdsData.length < 1){ - rRows.push('CDS '+label+' data unavailable.') + if (cdsData.length < 1) { + rRows.push( + 'CDS ' + + label + + ' data unavailable.' + ); } else { - $.each(cdsData, function(idx,item){ - + $.each(cdsData, function (idx, item) { item = item || {}; - if(self.CloseDate == null && item.PrettyDate != null){ + if (self.CloseDate == null && item.PrettyDate != null) { self.CloseDate = item.PrettyDate; $('p.cdsDate span', self.root).html(self.CloseDate); } var cdsData = { - name: item.LongName, - spread: CDSAppFormat.bps(item.ConvSpread), - changePct: CDSAppFormat.addColorPercent(item.DailyPercentChange) + name: item.LongName, + spread: CDSAppFormat.bps(item.ConvSpread), + changePct: CDSAppFormat.addColorPercent(item.DailyPercentChange) }; rRows.push(self.ROW.supplant(cdsData)); @@ -128,56 +136,61 @@ F2.Apps['com_openf2_examples_javascript_cds'] = (function (appConfig, appContent } return rRows.join(''); - }; + }; App.prototype.CloseDate = null; - App.prototype.getData = function(){ - - var rTightenerData = [], rWidenerData = []; - var _url = "http://dev.markitondemand.com/Api/SovereignCDSMovers/jsonp"; + App.prototype.getData = function () { + var rTightenerData = [], + rWidenerData = []; + var _url = 'http://dev.markitondemand.com/Api/SovereignCDSMovers/jsonp'; $.ajax({ url: _url, data: { tightenersOnly: 1 }, - dataType: "jsonp", + dataType: 'jsonp', context: this - }).done(function(jqxhr){ - rTightenerData.push(this.drawCDSList(true, jqxhr.Data || [])); - $.ajax({ - url: _url, - data: { - tightenersOnly: 0 - }, - dataType: "jsonp", - context: this - }).done(function(jqxhr2){ - rWidenerData.push(this.drawCDSList(false, jqxhr2.Data || [])); - }).fail(function(jqxh2r){ - F2.log("OOPS. CDS Wideners data was unavailable."); + }) + .done(function (jqxhr) { + rTightenerData.push(this.drawCDSList(true, jqxhr.Data || [])); + $.ajax({ + url: _url, + data: { + tightenersOnly: 0 + }, + dataType: 'jsonp', + context: this + }) + .done(function (jqxhr2) { + rWidenerData.push(this.drawCDSList(false, jqxhr2.Data || [])); + }) + .fail(function (jqxh2r) { + F2.log('OOPS. CDS Wideners data was unavailable.'); + rWidenerData.push(this.drawCDSList(false, [])); + }) + .always(function () { + this.drawTable(rTightenerData, rWidenerData); + }); + }) + .fail(function (jqxhr) { + F2.log('OOPS. CDS Tighteners data was unavailable.'); + rTightenerData.push(this.drawCDSList(true, [])); rWidenerData.push(this.drawCDSList(false, [])); - }).always(function(){ - this.drawTable(rTightenerData,rWidenerData); + this.drawTable(rTightenerData, rWidenerData); }); - }).fail(function(jqxhr){ - F2.log("OOPS. CDS Tighteners data was unavailable."); - rTightenerData.push(this.drawCDSList(true,[])); - rWidenerData.push(this.drawCDSList(false, [])); - this.drawTable(rTightenerData,rWidenerData); - }); }; /** * Number format helpers */ - CDSAppFormat = function(){ + CDSAppFormat = function () { this.magnitudes = { - shortcap : ["", "K", "M", "B", "T"] + shortcap: ['', 'K', 'M', 'B', 'T'] }; - } + }; - CDSAppFormat.prototype.getMagnitude = function(numDigits,value,type) { + CDSAppFormat.prototype.getMagnitude = function (numDigits, value, type) { value = Math.abs(value); var c = 0; while (value >= 1000 && c < 4) { @@ -186,34 +199,34 @@ F2.Apps['com_openf2_examples_javascript_cds'] = (function (appConfig, appContent } value = value.toFixed(numDigits); return value + this.magnitudes[type][c]; - } + }; - CDSAppFormat.prototype.lastPrice = function(value){ + CDSAppFormat.prototype.lastPrice = function (value) { value = Number(value); value = value.toFixed(2); - return "$" + value; - } + return '$' + value; + }; - CDSAppFormat.prototype.bps = function(value){ + CDSAppFormat.prototype.bps = function (value) { value = Number(value); value = value.toFixed(2); return value; - } + }; - CDSAppFormat.prototype.addColorPercent = function(value){ - if(value && !isNaN(value) && isFinite(value)){ - if (value > 0){ - return "" + value.toFixed(2) + "%"; + CDSAppFormat.prototype.addColorPercent = function (value) { + if (value && !isNaN(value) && isFinite(value)) { + if (value > 0) { + return "" + value.toFixed(2) + '%'; } else { - return "" + value.toFixed(2) + "%"; + return "" + value.toFixed(2) + '%'; } } return value.toFixed(2) + '%'; - } + }; - CDSAppFormat.prototype.comma = function(value) { + CDSAppFormat.prototype.comma = function (value) { value = String(value); - if (value.length < 6 && value.indexOf(".") > -1) { + if (value.length < 6 && value.indexOf('.') > -1) { return value; } else { x = value.split('.'); @@ -225,13 +238,12 @@ F2.Apps['com_openf2_examples_javascript_cds'] = (function (appConfig, appContent } return x1 + x2; } - } + }; CDSAppFormat = new CDSAppFormat(); /** * end number formatting helpers */ - return App; - -})(); \ No newline at end of file + return App; +})(); diff --git a/examples/apps/JavaScript/CDS/manifest.js b/examples/apps/JavaScript/CDS/manifest.js index c2defcb2..81d18307 100644 --- a/examples/apps/JavaScript/CDS/manifest.js +++ b/examples/apps/JavaScript/CDS/manifest.js @@ -1,33 +1,29 @@ F2_jsonpCallback_com_openf2_examples_javascript_cds({ - "scripts":[ - "../apps/JavaScript/CDS/appclass.js" - ], - "styles":[ - "../apps/JavaScript/CDS/app.css" - ], - "apps":[ + scripts: ['../apps/JavaScript/CDS/appclass.js'], + styles: ['../apps/JavaScript/CDS/app.css'], + apps: [ { - "html":[ + html: [ '
', - '
', - '

', - '', - '

', - '
', - '

', - 'Falling (or narrowing) spreads indicate the perceived risk of default is falling. Rising (or widening) spreads indicate the perceived risk of default is rising.', - '

', - '

', - 'All CDS are denominated in U.S. Dollars except U.S. sovereigns, which are in Euros.', - '

', - '
', - '
', - '

About

', - '

CDS Sovereign Big Movers v 1.0

', - '

« Back', - '

', + '
', + '

', + '', + '

', + '
', + '

', + 'Falling (or narrowing) spreads indicate the perceived risk of default is falling. Rising (or widening) spreads indicate the perceived risk of default is rising.', + '

', + '

', + 'All CDS are denominated in U.S. Dollars except U.S. sovereigns, which are in Euros.', + '

', + '
', + '
', + '

About

', + '

CDS Sovereign Big Movers v 1.0

', + '

« Back', + '

', '
' - ].join("") + ].join('') } ] -}) \ No newline at end of file +}); diff --git a/examples/apps/JavaScript/Chart/app.css b/examples/apps/JavaScript/Chart/app.css index 33a63594..850503ab 100644 --- a/examples/apps/JavaScript/Chart/app.css +++ b/examples/apps/JavaScript/Chart/app.css @@ -3,5 +3,5 @@ } .com_openf2_examples_javascript_chart #f2-1year-chart { - height:234px; -} \ No newline at end of file + height: 234px; +} diff --git a/examples/apps/JavaScript/Chart/appclass.js b/examples/apps/JavaScript/Chart/appclass.js index 6068a44a..6c396624 100644 --- a/examples/apps/JavaScript/Chart/appclass.js +++ b/examples/apps/JavaScript/Chart/appclass.js @@ -1,156 +1,183 @@ -F2.Apps["com_openf2_examples_javascript_chart"] = (function(){ - +F2.Apps['com_openf2_examples_javascript_chart'] = (function () { var app = function (appConfig, appContent, root) { - this.symbol = "MSFT"; + this.symbol = 'MSFT'; this.appConfig = appConfig; this.appContent = appContent; this.root = root; this.$root = $(root); - this.$app = $("#f2-1year-chart", this.$root); + this.$app = $('#f2-1year-chart', this.$root); //set configuration this.config(); }; - app.prototype.config = function() { - + app.prototype.config = function () { var defaults = { - backgroundColor: '#fff', - lineColor: '#428bca', - lineWidth: 1.5, - gridColor: '#DDDDDD', - gridAltColor: '#F7F7F7', - fontColor: '#444444', - fontFamily: 'Arial, sans-serif', - fontSize: 12, - lineHeight: 1.2, - greenBar: '#2EA94F', - redBar: '#DB411C' - }, - styleImport = (this.appConfig.context && this.appConfig.context.style)?this.appConfig.context.style:{}; + backgroundColor: '#fff', + lineColor: '#428bca', + lineWidth: 1.5, + gridColor: '#DDDDDD', + gridAltColor: '#F7F7F7', + fontColor: '#444444', + fontFamily: 'Arial, sans-serif', + fontSize: 12, + lineHeight: 1.2, + greenBar: '#2EA94F', + redBar: '#DB411C' + }, + styleImport = + this.appConfig.context && this.appConfig.context.style + ? this.appConfig.context.style + : {}; /** for example purposes*/ console.group('Chart app'); - console.info('The chart app (com_openf2_examples_javascript_chart) has configuration options which can be overriden by using Context. Set a "style" property in the AppConfig\'s Context property. The current AppConfig is on the next line.'); + console.info( + 'The chart app (com_openf2_examples_javascript_chart) has configuration options which can be overriden by using Context. Set a "style" property in the AppConfig\'s Context property. The current AppConfig is on the next line.' + ); console.info(this.appConfig); - console.info('The chart\'s configuration parameters (defaults) are found in the following hash'); + console.info( + "The chart's configuration parameters (defaults) are found in the following hash" + ); console.info(defaults); console.groupEnd(); this.CHT_CONTAINER = 'f2-1year-chart'; - this.CHART_STYLES = $.extend({},defaults,styleImport); + this.CHART_STYLES = $.extend({}, defaults, styleImport); }; - app.prototype.redraw = function(data) { + app.prototype.redraw = function (data) { this.hc = null; this.symbol = data.symbol; this.getData(); }; - app.prototype.init = function() { - + app.prototype.init = function () { this.getData(); //setup container symbol change listener to draw new chart. - F2.Events.on(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, $.proxy(function(symbolData){ + F2.Events.on( + F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, + $.proxy(function (symbolData) { this.redraw(symbolData); - },this) + }, this) ); }; - app.prototype.getData = function() { - + app.prototype.getData = function () { $.ajax({ - data: { - symbol: this.symbol, - duration: 365 // Fixed to one year + data: { + symbol: this.symbol, + duration: 365 // Fixed to one year }, url: 'http://dev.markitondemand.com/Api/Timeseries/jsonp', dataType: 'jsonp', context: this - - }).done(function(jqxhr,txtStatus){ - //Catch errors - if ( !jqxhr.Data || jqxhr.Message ) { - if ( typeof console == 'object' ) console.error('Error: ', jqxhr.Message); + }) + .done(function (jqxhr, txtStatus) { + //Catch errors + if (!jqxhr.Data || jqxhr.Message) { + if (typeof console == 'object') + console.error('Error: ', jqxhr.Message); + this._chartError(jqxhr); + return; + } + this.HandleAPIData(jqxhr); + }) + .fail(function (jqxhr, txtStatus) { + F2.log('Could not generate chart.', jqxhr); this._chartError(jqxhr); - return; - } - this.HandleAPIData(jqxhr); - - }).fail(function(jqxhr,txtStatus){ - F2.log('Could not generate chart.', jqxhr); - this._chartError(jqxhr); - }); + }); }; - app.prototype._chartError = function(jqxhr) { - F2.log("Price Chart Error", jqxhr); + app.prototype._chartError = function (jqxhr) { + F2.log('Price Chart Error', jqxhr); - this.$app.html("

An error occurred loading price data for " +this.symbol+ ".

"); + this.$app.html( + '

An error occurred loading price data for ' + this.symbol + '.

' + ); }; - - - // Parses API data to provide HighCharts-ready data series for close values, + // Parses API data to provide HighCharts-ready data series for close values, // additionally deriving up/down month indicators. // app.prototype.HandleAPIData = function (json) { - $(this.CHT_CONTAINER).empty(); // Set up vars for first data series var apiDates = json.Data.SeriesDates, apiValues = json.Data.Series.close.values, - closeSeriesData = [ ]; - + closeSeriesData = []; + // Translate API JSON into a HighCharts-format data series - for ( var i = 0; i < apiDates.length; i++ ) { + for (var i = 0; i < apiDates.length; i++) { var dat = new Date(apiDates[i]); var dateIn = Date.UTC(dat.getFullYear(), dat.getMonth(), dat.getDate()); var val = apiValues[i]; - closeSeriesData.push([dateIn,val]); + closeSeriesData.push([dateIn, val]); } // Instantiate a new chart with base configuration options (everything but the data) var hcChartObj = new Highcharts.Chart(this.getBaselineOptions()); - hcChartObj.series[0].setData(closeSeriesData, true); // Set close-values series data + hcChartObj.series[0].setData(closeSeriesData, true); // Set close-values series data //hcChartObj.setTitle({ text: ('One-year price movement for ' + json.Data.Name).toUpperCase() }); // Set title - hcChartObj.setTitle({ text:'' }); + hcChartObj.setTitle({ text: '' }); + + // No options setting is available for this, so force the price line to be rounded + $('.highcharts-series path:first', this.root) + .attr('stroke-linejoin', 'round') + .attr('stroke-linecap', 'round'); - // No options setting is available for this, so force the price line to be rounded - $('.highcharts-series path:first', this.root).attr('stroke-linejoin', 'round').attr('stroke-linecap', 'round'); - // Set up vars for up/down month data series - var currentMonthName, currentJSDate, currentJSUTCDate, currentVal, - upSeriesData = [ ], - downSeriesData = [ ]; - var dataRanges = hcChartObj.yAxis[0].getExtremes(); // Will need to reset to this later - minVal = dataRanges.min, // Will set red/green indicators to this value - apiValues = json.Data.Series.close.values, - apiDates = json.Data.SeriesDates, - firstMonthName = apiDates[0].substr(4, 3), // First! - prevMonthName = firstMonthName, - prevJSDate = new Date(prevMonthName + ' 1, ' + apiDates[0].substr(-4)), - prevJSUTCDate = Date.UTC(prevJSDate.getFullYear(), prevJSDate.getMonth(), prevJSDate.getDate()), - prevVal = apiValues[0]; - - // Now walk through all data points again (had to do it once before to get the ranges), - // looking for month boundaries and deciding if the previous month ended up or down over + var currentMonthName, + currentJSDate, + currentJSUTCDate, + currentVal, + upSeriesData = [], + downSeriesData = []; + var dataRanges = hcChartObj.yAxis[0].getExtremes(); // Will need to reset to this later + (minVal = dataRanges.min), // Will set red/green indicators to this value + (apiValues = json.Data.Series.close.values), + (apiDates = json.Data.SeriesDates), + (firstMonthName = apiDates[0].substr(4, 3)), // First! + (prevMonthName = firstMonthName), + (prevJSDate = new Date(prevMonthName + ' 1, ' + apiDates[0].substr(-4))), + (prevJSUTCDate = Date.UTC( + prevJSDate.getFullYear(), + prevJSDate.getMonth(), + prevJSDate.getDate() + )), + (prevVal = apiValues[0]); + + // Now walk through all data points again (had to do it once before to get the ranges), + // looking for month boundaries and deciding if the previous month ended up or down over // the preceding month's close - for ( var i = 1; i < apiDates.length; i++ ) { + for (var i = 1; i < apiDates.length; i++) { currentMonthName = apiDates[i].substr(4, 3); - if ( currentMonthName != prevMonthName ) { // Into a new month in the data - currentVal = apiValues[i - 1]; // Last close in the preceding month - currentJSDate = new Date(currentMonthName + ' 1, ' + apiDates[i].substr(-4)); - currentJSUTCDate = Date.UTC(currentJSDate.getFullYear(), currentJSDate.getMonth(), currentJSDate.getDate()); - if ( prevMonthName != firstMonthName ) { // Skip the first month, it's incomplete - if ( currentVal >= prevVal ) { - upSeriesData.push( [ prevJSUTCDate, minVal ], [ currentJSUTCDate, minVal ] ); - downSeriesData.push( [ currentJSUTCDate, null ] ); - } - else { - downSeriesData.push( [ prevJSUTCDate, minVal ], [ currentJSUTCDate, minVal ] ); - upSeriesData.push( [ currentJSUTCDate, null ] ); + if (currentMonthName != prevMonthName) { + // Into a new month in the data + currentVal = apiValues[i - 1]; // Last close in the preceding month + currentJSDate = new Date( + currentMonthName + ' 1, ' + apiDates[i].substr(-4) + ); + currentJSUTCDate = Date.UTC( + currentJSDate.getFullYear(), + currentJSDate.getMonth(), + currentJSDate.getDate() + ); + if (prevMonthName != firstMonthName) { + // Skip the first month, it's incomplete + if (currentVal >= prevVal) { + upSeriesData.push( + [prevJSUTCDate, minVal], + [currentJSUTCDate, minVal] + ); + downSeriesData.push([currentJSUTCDate, null]); + } else { + downSeriesData.push( + [prevJSUTCDate, minVal], + [currentJSUTCDate, minVal] + ); + upSeriesData.push([currentJSUTCDate, null]); } } prevVal = currentVal; @@ -159,23 +186,33 @@ F2.Apps["com_openf2_examples_javascript_chart"] = (function(){ } } // Add one last interval for the partial month-to-date - currentVal = apiValues[i - 1]; // Last close value in the data + currentVal = apiValues[i - 1]; // Last close value in the data currentJSDate = new Date(apiDates[i - 1]); - currentJSUTCDate = Date.UTC(currentJSDate.getFullYear(), currentJSDate.getMonth(), currentJSDate.getDate()); - if ( currentVal >= prevVal ) upSeriesData.push( [ prevJSUTCDate, minVal ], [ currentJSUTCDate, minVal ] ); - else downSeriesData.push( [ prevJSUTCDate, minVal ], [ currentJSUTCDate, minVal ] ); + currentJSUTCDate = Date.UTC( + currentJSDate.getFullYear(), + currentJSDate.getMonth(), + currentJSDate.getDate() + ); + if (currentVal >= prevVal) + upSeriesData.push([prevJSUTCDate, minVal], [currentJSUTCDate, minVal]); + else + downSeriesData.push([prevJSUTCDate, minVal], [currentJSUTCDate, minVal]); // Add the up month/down month data to the chart's series - hcChartObj.series[1].setData(upSeriesData, false); - hcChartObj.series[2].setData(downSeriesData, false); - - hcChartObj.yAxis[0].setExtremes(dataRanges.dataMin, dataRanges.dataMax, true, false); + hcChartObj.series[1].setData(upSeriesData, false); + hcChartObj.series[2].setData(downSeriesData, false); + hcChartObj.yAxis[0].setExtremes( + dataRanges.dataMin, + dataRanges.dataMax, + true, + false + ); }; // Defines the HighCharts configuration options. // - app.prototype.getBaselineOptions = function () { + app.prototype.getBaselineOptions = function () { return { chart: { borderColor: 'rgba(255, 255, 255, 0.0)', @@ -210,20 +247,22 @@ F2.Apps["com_openf2_examples_javascript_chart"] = (function(){ } } }, - series: [{ - color: this.CHART_STYLES.lineColor, - name: 'Close price' - }, - { - color: this.CHART_STYLES.greenBar, - lineWidth: 6, - name: 'Up months' - }, - { - color: this.CHART_STYLES.redBar, - lineWidth: 6, - name: 'Down months' - }], + series: [ + { + color: this.CHART_STYLES.lineColor, + name: 'Close price' + }, + { + color: this.CHART_STYLES.greenBar, + lineWidth: 6, + name: 'Up months' + }, + { + color: this.CHART_STYLES.redBar, + lineWidth: 6, + name: 'Down months' + } + ], title: { align: 'left', style: { @@ -238,10 +277,15 @@ F2.Apps["com_openf2_examples_javascript_chart"] = (function(){ borderRadius: 1, crosshairs: true, formatter: function () { - if ( this.series.name == 'Close price' ) { - return '
' + Highcharts.dateFormat('%b %e %Y', this.x) + ': $' + Highcharts.numberFormat(this.y, 2) + '
'; - } - else return false; + if (this.series.name == 'Close price') { + return ( + '
' + + Highcharts.dateFormat('%b %e %Y', this.x) + + ': $' + + Highcharts.numberFormat(this.y, 2) + + '
' + ); + } else return false; }, style: { color: this.CHART_STYLES.fontColor, @@ -251,89 +295,96 @@ F2.Apps["com_openf2_examples_javascript_chart"] = (function(){ padding: this.CHART_STYLES.fontSize } }, - xAxis: [{ // Bottom datetime axis (short intervals) - dateTimeLabelFormats: { - minute: '%l:%M%P', - hour: '%l%P', - day: '%a', - day: '%b %e', - week: '%b %e', - month: '%b', - year: '%Y' - }, - gridLineDashStyle: 'shortdot', - gridLineColor: this.CHART_STYLES.gridAltColor, - gridLineWidth: 1, - labels: { - align: 'left', - style: { - color: this.CHART_STYLES.fontColor, - fontFamily: this.CHART_STYLES.fontFamily, - fontSize: this.CHART_STYLES.fontSize + xAxis: [ + { + // Bottom datetime axis (short intervals) + dateTimeLabelFormats: { + minute: '%l:%M%P', + hour: '%l%P', + day: '%a', + day: '%b %e', + week: '%b %e', + month: '%b', + year: '%Y' }, - x: (this.CHART_STYLES.fontSize / 2), - y: (this.CHART_STYLES.fontSize * this.CHART_STYLES.lineHeight * 1.5) - }, - lineColor: this.CHART_STYLES.gridColor, - tickColor: this.CHART_STYLES.gridColor, - tickInterval: (30 * 24 * 3600 * 1000), // One month - tickLength: (this.CHART_STYLES.fontSize * this.CHART_STYLES.lineHeight * 1.5), - type: 'datetime' - },{ // Top datetime axis (longer intervals) - dateTimeLabelFormats: { - day: '%a', // Default - week: '%a', - month: '%b %Y', - year: '%Y' - }, - gridLineWidth: 1, - gridLineColor: this.CHART_STYLES.gridColor, - labels: { - align: 'left', - style: { - color: this.CHART_STYLES.fontColor, - fontFamily: this.CHART_STYLES.fontFamily, - fontSize: this.CHART_STYLES.fontSize + gridLineDashStyle: 'shortdot', + gridLineColor: this.CHART_STYLES.gridAltColor, + gridLineWidth: 1, + labels: { + align: 'left', + style: { + color: this.CHART_STYLES.fontColor, + fontFamily: this.CHART_STYLES.fontFamily, + fontSize: this.CHART_STYLES.fontSize + }, + x: this.CHART_STYLES.fontSize / 2, + y: this.CHART_STYLES.fontSize * this.CHART_STYLES.lineHeight * 1.5 }, - x: (this.CHART_STYLES.fontSize / 2) + lineColor: this.CHART_STYLES.gridColor, + tickColor: this.CHART_STYLES.gridColor, + tickInterval: 30 * 24 * 3600 * 1000, // One month + tickLength: + this.CHART_STYLES.fontSize * this.CHART_STYLES.lineHeight * 1.5, + type: 'datetime' }, - lineColor: this.CHART_STYLES.gridColor, - linkedTo: 0, - opposite: true, - tickColor: this.CHART_STYLES.gridColor, - tickInterval: (365 * 24 * 3600 * 1000), // One year - tickLength: (this.CHART_STYLES.fontSize * this.CHART_STYLES.lineHeight), - type: 'datetime' - }], - yAxis: [{ - gridLineColor: this.CHART_STYLES.gridColor, - labels: { - align: 'left', - formatter: function () { - return Highcharts.numberFormat(this.value, 2); + { + // Top datetime axis (longer intervals) + dateTimeLabelFormats: { + day: '%a', // Default + week: '%a', + month: '%b %Y', + year: '%Y' }, - style: { - color: this.CHART_STYLES.fontColor, - fontFamily: this.CHART_STYLES.fontFamily, - fontSize: this.CHART_STYLES.fontSize + gridLineWidth: 1, + gridLineColor: this.CHART_STYLES.gridColor, + labels: { + align: 'left', + style: { + color: this.CHART_STYLES.fontColor, + fontFamily: this.CHART_STYLES.fontFamily, + fontSize: this.CHART_STYLES.fontSize + }, + x: this.CHART_STYLES.fontSize / 2 }, - x: 0, - y: (this.CHART_STYLES.fontSize + 3) - }, - maxPadding: 0, - minPadding: 0, - opposite: true, - showFirstLabel: false, - tickColor: this.CHART_STYLES.gridColor, - tickLength: 100, // Cropped at left of chart - tickWidth: 1, - title: { - text: '' + lineColor: this.CHART_STYLES.gridColor, + linkedTo: 0, + opposite: true, + tickColor: this.CHART_STYLES.gridColor, + tickInterval: 365 * 24 * 3600 * 1000, // One year + tickLength: this.CHART_STYLES.fontSize * this.CHART_STYLES.lineHeight, + type: 'datetime' } - }] + ], + yAxis: [ + { + gridLineColor: this.CHART_STYLES.gridColor, + labels: { + align: 'left', + formatter: function () { + return Highcharts.numberFormat(this.value, 2); + }, + style: { + color: this.CHART_STYLES.fontColor, + fontFamily: this.CHART_STYLES.fontFamily, + fontSize: this.CHART_STYLES.fontSize + }, + x: 0, + y: this.CHART_STYLES.fontSize + 3 + }, + maxPadding: 0, + minPadding: 0, + opposite: true, + showFirstLabel: false, + tickColor: this.CHART_STYLES.gridColor, + tickLength: 100, // Cropped at left of chart + tickWidth: 1, + title: { + text: '' + } + } + ] }; }; - return app; - -})(); \ No newline at end of file + return app; +})(); diff --git a/examples/apps/JavaScript/Chart/manifest.js b/examples/apps/JavaScript/Chart/manifest.js index f474085a..11357539 100644 --- a/examples/apps/JavaScript/Chart/manifest.js +++ b/examples/apps/JavaScript/Chart/manifest.js @@ -1,18 +1,18 @@ F2_jsonpCallback_com_openf2_examples_javascript_chart({ - "scripts":[ - "http://code.highcharts.com/highcharts.js", - "../apps/JavaScript/Chart/appclass.js" - ], - "styles":[ - "../apps/JavaScript/Chart/app.css" - ], - "apps":[{ - "html":[ - '
', + scripts: [ + 'http://code.highcharts.com/highcharts.js', + '../apps/JavaScript/Chart/appclass.js' + ], + styles: ['../apps/JavaScript/Chart/app.css'], + apps: [ + { + html: [ + '
', '
', - '
', + '
', '
', - '
' - ].join("") - }] -}) \ No newline at end of file + '
' + ].join('') + } + ] +}); diff --git a/examples/apps/JavaScript/CompareTool/appclass.js b/examples/apps/JavaScript/CompareTool/appclass.js index 25ed7dfd..1116a7c4 100644 --- a/examples/apps/JavaScript/CompareTool/appclass.js +++ b/examples/apps/JavaScript/CompareTool/appclass.js @@ -1,16 +1,14 @@ -F2.Apps["com_openf2_examples_javascript_compareTool"] = (function() { - - var App_Class = function(appConfig, appContent, root) { +F2.Apps['com_openf2_examples_javascript_compareTool'] = (function () { + var App_Class = function (appConfig, appContent, root) { this.appConfig = appConfig; this.appContent = appContent; this.$root = $(root); }; - App_Class.prototype.init = function() { + App_Class.prototype.init = function () { // Manually bootstrap angular - angular.bootstrap(this.$root, ["compareTool"]); + angular.bootstrap(this.$root, ['compareTool']); }; return App_Class; - -})(); \ No newline at end of file +})(); diff --git a/examples/apps/JavaScript/CompareTool/css/compare.css b/examples/apps/JavaScript/CompareTool/css/compare.css index 5f53e7be..2f4effba 100644 --- a/examples/apps/JavaScript/CompareTool/css/compare.css +++ b/examples/apps/JavaScript/CompareTool/css/compare.css @@ -7,52 +7,52 @@ margin-bottom: 10px; } - .compare th, - .compare td { - text-align: right; - } - - .compare th { - font-size: 14px; - font-weight: bold; - width: 17%; - } - - .compare th:first-child { - width: 15% - } - - .compare th span { - display: block; - } - - .compare th a { - font-size: 11px; - } - - .compare th input[type=text] { - font-size: 12px; - margin-bottom: 7px; - width: 85%; - } - - .compare th input[type=submit] { - cursor: pointer; - font-size: 12px; - line-height: 18px; - } - - .compare td { - border: 1px solid #ccc; - } - - .compare td:first-child { - font-weight: bold; - text-align: left; - } - -.compare input[type=text].loading { +.compare th, +.compare td { + text-align: right; +} + +.compare th { + font-size: 14px; + font-weight: bold; + width: 17%; +} + +.compare th:first-child { + width: 15%; +} + +.compare th span { + display: block; +} + +.compare th a { + font-size: 11px; +} + +.compare th input[type='text'] { + font-size: 12px; + margin-bottom: 7px; + width: 85%; +} + +.compare th input[type='submit'] { + cursor: pointer; + font-size: 12px; + line-height: 18px; +} + +.compare td { + border: 1px solid #ccc; +} + +.compare td:first-child { + font-weight: bold; + text-align: left; +} + +.compare input[type='text'].loading { background-image: url(../img/ajax_spinner.gif); background-position: 107px; background-repeat: no-repeat; -} \ No newline at end of file +} diff --git a/examples/apps/JavaScript/CompareTool/js/angular-resource.min.js b/examples/apps/JavaScript/CompareTool/js/angular-resource.min.js index f37559c7..b39513eb 100644 --- a/examples/apps/JavaScript/CompareTool/js/angular-resource.min.js +++ b/examples/apps/JavaScript/CompareTool/js/angular-resource.min.js @@ -3,8 +3,180 @@ (c) 2010-2012 Google, Inc. http://angularjs.org License: MIT */ -(function(C,d,w){'use strict';d.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(x,y){function s(b,e){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(e?null:/%20/g,"+")}function t(b,e){this.template=b+="#";this.defaults=e||{};var a=this.urlParams={};h(b.split(/\W/),function(f){f&&RegExp("(^|[^\\\\]):"+f+"\\W").test(b)&&(a[f]=!0)});this.template=b.replace(/\\:/g,":")}function u(b,e,a){function f(m,a){var b= -{},a=o({},e,a);h(a,function(a,z){var c;a.charAt&&a.charAt(0)=="@"?(c=a.substr(1),c=y(c)(m)):c=a;b[z]=c});return b}function g(a){v(a||{},this)}var k=new t(b),a=o({},A,a);h(a,function(a,b){a.method=d.uppercase(a.method);var e=a.method=="POST"||a.method=="PUT"||a.method=="PATCH";g[b]=function(b,c,d,B){var j={},i,l=p,q=null;switch(arguments.length){case 4:q=B,l=d;case 3:case 2:if(r(c)){if(r(b)){l=b;q=c;break}l=c;q=d}else{j=b;i=c;l=d;break}case 1:r(b)?l=b:e?i=b:j=b;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+ -arguments.length+" arguments.";}var n=this instanceof g?this:a.isArray?[]:new g(i);x({method:a.method,url:k.url(o({},f(i,a.params||{}),j)),data:i}).then(function(b){var c=b.data;if(c)a.isArray?(n.length=0,h(c,function(a){n.push(new g(a))})):v(c,n);(l||p)(n,b.headers)},q);return n};g.prototype["$"+b]=function(a,d,h){var m=f(this),j=p,i;switch(arguments.length){case 3:m=a;j=d;i=h;break;case 2:case 1:r(a)?(j=a,i=d):(m=a,j=d||p);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+ -arguments.length+" arguments.";}g[b].call(this,m,e?this:w,j,i)}});g.bind=function(d){return u(b,o({},e,d),a)};return g}var A={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},p=d.noop,h=d.forEach,o=d.extend,v=d.copy,r=d.isFunction;t.prototype={url:function(b){var e=this,a=this.template,f,g,b=b||{};h(this.urlParams,function(h,c){f=b.hasOwnProperty(c)?b[c]:e.defaults[c];d.isDefined(f)&&f!==null?(g=s(f,!0).replace(/%26/gi,"&").replace(/%3D/gi, -"=").replace(/%2B/gi,"+"),a=a.replace(RegExp(":"+c+"(\\W)","g"),g+"$1")):a=a.replace(RegExp("(/?):"+c+"(\\W)","g"),function(a,b,c){return c.charAt(0)=="/"?c:b+c})});var a=a.replace(/\/?#$/,""),k=[];h(b,function(a,b){e.urlParams[b]||k.push(s(b)+"="+s(a))});k.sort();a=a.replace(/\/*$/,"");return a+(k.length?"?"+k.join("&"):"")}};return u}])})(window,window.angular); +(function (C, d, w) { + 'use strict'; + d.module('ngResource', ['ng']).factory('$resource', [ + '$http', + '$parse', + function (x, y) { + function s(b, e) { + return encodeURIComponent(b) + .replace(/%40/gi, '@') + .replace(/%3A/gi, ':') + .replace(/%24/g, '$') + .replace(/%2C/gi, ',') + .replace(e ? null : /%20/g, '+'); + } + function t(b, e) { + this.template = b += '#'; + this.defaults = e || {}; + var a = (this.urlParams = {}); + h(b.split(/\W/), function (f) { + f && RegExp('(^|[^\\\\]):' + f + '\\W').test(b) && (a[f] = !0); + }); + this.template = b.replace(/\\:/g, ':'); + } + function u(b, e, a) { + function f(m, a) { + var b = {}, + a = o({}, e, a); + h(a, function (a, z) { + var c; + a.charAt && a.charAt(0) == '@' + ? ((c = a.substr(1)), (c = y(c)(m))) + : (c = a); + b[z] = c; + }); + return b; + } + function g(a) { + v(a || {}, this); + } + var k = new t(b), + a = o({}, A, a); + h(a, function (a, b) { + a.method = d.uppercase(a.method); + var e = + a.method == 'POST' || a.method == 'PUT' || a.method == 'PATCH'; + g[b] = function (b, c, d, B) { + var j = {}, + i, + l = p, + q = null; + switch (arguments.length) { + case 4: + (q = B), (l = d); + case 3: + case 2: + if (r(c)) { + if (r(b)) { + l = b; + q = c; + break; + } + l = c; + q = d; + } else { + j = b; + i = c; + l = d; + break; + } + case 1: + r(b) ? (l = b) : e ? (i = b) : (j = b); + break; + case 0: + break; + default: + throw ( + 'Expected between 0-4 arguments [params, data, success, error], got ' + + arguments.length + + ' arguments.' + ); + } + var n = this instanceof g ? this : a.isArray ? [] : new g(i); + x({ + method: a.method, + url: k.url(o({}, f(i, a.params || {}), j)), + data: i + }).then(function (b) { + var c = b.data; + if (c) + a.isArray + ? ((n.length = 0), + h(c, function (a) { + n.push(new g(a)); + })) + : v(c, n); + (l || p)(n, b.headers); + }, q); + return n; + }; + g.prototype['$' + b] = function (a, d, h) { + var m = f(this), + j = p, + i; + switch (arguments.length) { + case 3: + m = a; + j = d; + i = h; + break; + case 2: + case 1: + r(a) ? ((j = a), (i = d)) : ((m = a), (j = d || p)); + case 0: + break; + default: + throw ( + 'Expected between 1-3 arguments [params, success, error], got ' + + arguments.length + + ' arguments.' + ); + } + g[b].call(this, m, e ? this : w, j, i); + }; + }); + g.bind = function (d) { + return u(b, o({}, e, d), a); + }; + return g; + } + var A = { + get: { method: 'GET' }, + save: { method: 'POST' }, + query: { method: 'GET', isArray: !0 }, + remove: { method: 'DELETE' }, + delete: { method: 'DELETE' } + }, + p = d.noop, + h = d.forEach, + o = d.extend, + v = d.copy, + r = d.isFunction; + t.prototype = { + url: function (b) { + var e = this, + a = this.template, + f, + g, + b = b || {}; + h(this.urlParams, function (h, c) { + f = b.hasOwnProperty(c) ? b[c] : e.defaults[c]; + d.isDefined(f) && f !== null + ? ((g = s(f, !0) + .replace(/%26/gi, '&') + .replace(/%3D/gi, '=') + .replace(/%2B/gi, '+')), + (a = a.replace(RegExp(':' + c + '(\\W)', 'g'), g + '$1'))) + : (a = a.replace( + RegExp('(/?):' + c + '(\\W)', 'g'), + function (a, b, c) { + return c.charAt(0) == '/' ? c : b + c; + } + )); + }); + var a = a.replace(/\/?#$/, ''), + k = []; + h(b, function (a, b) { + e.urlParams[b] || k.push(s(b) + '=' + s(a)); + }); + k.sort(); + a = a.replace(/\/*$/, ''); + return a + (k.length ? '?' + k.join('&') : ''); + } + }; + return u; + } + ]); +})(window, window.angular); diff --git a/examples/apps/JavaScript/CompareTool/js/angular.min.js b/examples/apps/JavaScript/CompareTool/js/angular.min.js index 07ea01c5..a6a853e9 100644 --- a/examples/apps/JavaScript/CompareTool/js/angular.min.js +++ b/examples/apps/JavaScript/CompareTool/js/angular.min.js @@ -3,159 +3,5584 @@ (c) 2010-2012 Google, Inc. http://angularjs.org License: MIT */ -(function(X,Y,q){'use strict';function n(b,a,c){var d;if(b)if(H(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==n)b.forEach(a,c);else if(!b||typeof b.length!=="number"?0:typeof b.hasOwnProperty!="function"&&typeof b.constructor!="function"||b instanceof L||ca&&b instanceof ca||xa.call(b)!=="[object Object]"||typeof b.callee==="function")for(d=0;d=0&&b.splice(c,1);return a}function U(b,a){if(pa(b)|| -b&&b.$evalAsync&&b.$watch)throw Error("Can't copy Window or Scope");if(a){if(b===a)throw Error("Can't copy equivalent objects or arrays");if(B(b))for(var c=a.length=0;c2?ha.call(arguments,2):[];return H(a)&&!(a instanceof RegExp)?c.length?function(){return arguments.length?a.apply(b,c.concat(ha.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}:a}function ic(b,a){var c=a;/^\$+/.test(b)?c=q:pa(a)?c="$WINDOW":a&&Y===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function da(b,a){return JSON.stringify(b,ic,a?" ":null)}function ob(b){return A(b)?JSON.parse(b):b}function Va(b){b&&b.length!== -0?(b=y(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1;return b}function qa(b){b=u(b).clone();try{b.html("")}catch(a){}var c=u("
").append(b).html();try{return b[0].nodeType===3?y(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+y(b)})}catch(d){return y(c)}}function Wa(b){var a={},c,d;n((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),a[d]=x(c[1])?decodeURIComponent(c[1]):!0)});return a}function pb(b){var a=[];n(b,function(b, -d){a.push(Xa(d,!0)+(b===!0?"":"="+Xa(b,!0)))});return a.length?a.join("&"):""}function Ya(b){return Xa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Xa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(a?null:/%20/g,"+")}function jc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,h=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;n(h,function(a){h[a]=!0;c(Y.getElementById(a)); -a=a.replace(":","\\:");b.querySelectorAll&&(n(b.querySelectorAll("."+a),c),n(b.querySelectorAll("."+a+"\\:"),c),n(b.querySelectorAll("["+a+"]"),c))});n(d,function(a){if(!e){var b=f.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):n(a.attributes,function(b){if(!e&&h[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function qb(b,a){b=u(b);a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");var c=rb(a);c.invoke(["$rootScope","$rootElement","$compile","$injector", -function(a,b,c,h){a.$apply(function(){b.data("$injector",h);c(b)(a)})}]);return c}function Za(b,a){a=a||"_";return b.replace(kc,function(b,d){return(d?a:"")+b.toLowerCase()})}function $a(b,a,c){if(!b)throw Error("Argument '"+(a||"?")+"' is "+(c||"required"));return b}function ra(b,a,c){c&&B(b)&&(b=b[b.length-1]);$a(H(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function lc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object), -"module",function(){var b={};return function(d,e,g){e&&b.hasOwnProperty(d)&&(b[d]=null);return a(b,d,function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return k}}if(!e)throw Error("No module: "+d);var b=[],c=[],i=a("$injector","invoke"),k={_invokeQueue:b,_runBlocks:c,requires:e,name:d,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider", -"register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:i,run:function(a){c.push(a);return this}};g&&i(g);return k})}})}function sb(b){return b.replace(mc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(nc,"Moz$1")}function ab(b,a){function c(){var e;for(var b=[this],c=a,h,f,j,i,k,m;b.length;){h=b.shift();f=0;for(j=h.length;f 
"+b;a.removeChild(a.firstChild);bb(this,a.childNodes);this.remove()}else bb(this,b)}function cb(b){return b.cloneNode(!0)}function sa(b){tb(b);for(var a=0,b=b.childNodes||[];a-1}function wb(b,a){a&&n(a.split(" "),function(a){b.className=O((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+O(a)+" "," "))})}function xb(b,a){a&&n(a.split(" "),function(a){if(!Da(b,a))b.className=O(b.className+" "+O(a))})}function bb(b,a){if(a)for(var a=!a.nodeName&&x(a.length)&&!pa(a)?a:[a],c=0;c4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!")}else{if(j.cookie!== -$){$=j.cookie;d=$.split("; ");r={};for(f=0;f0&&(r[unescape(e.substring(0,i))]=unescape(e.substring(i+1)))}return r}};f.defer=function(a,b){var c;o++;c=m(function(){delete t[c];e(a)},b||0);t[c]=!0;return c};f.defer.cancel=function(a){return t[a]?(delete t[a],l(a),e(C),!0):!1}}function wc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new vc(b,d,a,c)}]}function xc(){this.$get=function(){function b(b,d){function e(a){if(a!=m){if(l){if(l== -a)l=a.n}else l=a;g(a.n,a.p);g(a,m);m=a;m.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw Error("cacheId "+b+" taken");var h=0,f=v({},d,{id:b}),j={},i=d&&d.capacity||Number.MAX_VALUE,k={},m=null,l=null;return a[b]={put:function(a,b){var c=k[a]||(k[a]={key:a});e(c);w(b)||(a in j||h++,j[a]=b,h>i&&this.remove(l.key))},get:function(a){var b=k[a];if(b)return e(b),j[a]},remove:function(a){var b=k[a];if(b){if(b==m)m=b.p;if(b==l)l=b.n;g(b.n,b.p);delete k[a];delete j[a];h--}},removeAll:function(){j= -{};h=0;k={};m=l=null},destroy:function(){k=f=j=null;delete a[b]},info:function(){return v({},f,{size:h})}}}var a={};b.info=function(){var b={};n(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function yc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Cb(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g="Template must have exactly one root element. was: ",h=/^\s*(https?|ftp|mailto):/; -this.directive=function j(d,e){A(d)?($a(e,"directive"),a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];n(a[d],function(a){try{var g=b.invoke(a);if(H(g))g={compile:I(g)};else if(!g.compile&&g.link)g.compile=I(g.link);g.priority=g.priority||0;g.name=g.name||d;g.require=g.require||g.controller&&g.name;g.restrict=g.restrict||"A";e.push(g)}catch(h){c(h)}});return e}])),a[d].push(e)):n(d,nb(j));return this};this.urlSanitizationWhitelist=function(a){return x(a)? -(h=a,this):h};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(b,i,k,m,l,t,o,p,s){function J(a,b,c){a instanceof u||(a=u(a));n(a,function(b,c){b.nodeType==3&&b.nodeValue.match(/\S+/)&&(a[c]=u(b).wrap("").parent()[0])});var d=z(a,b,a,c);return function(b,c){$a(b,"scope");for(var e=c?va.clone.call(a):a,g=0,i=e.length;gr.priority)break;if(W=r.scope)ua("isolated scope",K,r,D),M(W)&&(F(D,"ng-isolate-scope"),K=r),F(D,"ng-scope"),p=p||r;G=r.name;if(W=r.controller)x=x||{}, -ua("'"+G+"' controller",x[G],r,D),x[G]=r;if(W=r.transclude)ua("transclusion",ka,r,D),ka=r,l=r.priority,W=="element"?(S=u(b),D=c.$$element=u(Y.createComment(" "+G+": "+c[G]+" ")),b=D[0],C(e,u(S[0]),b),R=J(S,d,l)):(S=u(cb(b)).contents(),D.html(""),R=J(S,d));if(W=r.template)if(ua("template",z,r,D),z=r,W=Eb(W),r.replace){S=u("
"+O(W)+"
").contents();b=S[0];if(S.length!=1||b.nodeType!==1)throw Error(g+W);C(e,D,b);G={$attr:{}};a=a.concat(V(b,a.splice(v+1,a.length-(v+1)),G));$(c,G);y=a.length}else D.html(W); -if(r.templateUrl)ua("template",z,r,D),z=r,j=P(a.splice(v,a.length-v),j,D,c,e,r.replace,R),y=a.length;else if(r.compile)try{w=r.compile(D,c,R),H(w)?i(null,w):w&&i(w.pre,w.post)}catch(E){k(E,qa(D))}if(r.terminal)j.terminal=!0,l=Math.max(l,r.priority)}j.scope=p&&p.scope;j.transclude=ka&&R;return j}function r(d,e,i,g){var h=!1;if(a.hasOwnProperty(e))for(var l,e=b.get(e+c),o=0,m=e.length;ol.priority)&&l.restrict.indexOf(i)!=-1)d.push(l),h=!0}catch(t){k(t)}return h}function $(a, -b){var c=b.$attr,d=a.$attr,e=a.$$element;n(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});n(b,function(b,i){i=="class"?(F(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):i=="style"?e.attr("style",e.attr("style")+";"+b):i.charAt(0)!="$"&&!a.hasOwnProperty(i)&&(a[i]=b,d[i]=c[i])})}function P(a,b,c,d,e,i,h){var j=[],k,o,t=c[0],s=a.shift(),p=v({},s,{controller:null,templateUrl:null,transclude:null,scope:null});c.html("");m.get(s.templateUrl,{cache:l}).success(function(l){var m, -s,l=Eb(l);if(i){s=u("
"+O(l)+"
").contents();m=s[0];if(s.length!=1||m.nodeType!==1)throw Error(g+l);l={$attr:{}};C(e,c,m);V(m,a,l);$(d,l)}else m=t,c.html(l);a.unshift(p);k=K(a,m,d,h);for(o=z(c.contents(),h);j.length;){var ia=j.pop(),l=j.pop();s=j.pop();var r=j.pop(),D=m;s!==t&&(D=cb(m),C(l,u(s),D));k(function(){b(o,r,D,e,ia)},r,D,e,ia)}j=null}).error(function(a,b,c,d){throw Error("Failed to load template: "+d.url);});return function(a,c,d,e,i){j?(j.push(c),j.push(d),j.push(e),j.push(i)): -k(function(){b(o,c,d,e,i)},c,d,e,i)}}function G(a,b){return b.priority-a.priority}function ua(a,b,c,d){if(b)throw Error("Multiple directives ["+b.name+", "+c.name+"] asking for "+a+" on: "+qa(d));}function x(a,b){var c=i(b,!0);c&&a.push({priority:0,compile:I(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);F(d.data("$binding",e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function R(a,b,c,d){var e=i(c,!0);e&&b.push({priority:100,compile:I(function(a,b,c){b=c.$$observers|| -(c.$$observers={});d==="class"&&(e=i(c[d],!0));c[d]=q;(b[d]||(b[d]=[])).$$inter=!0;(c.$$observers&&c.$$observers[d].$$scope||a).$watch(e,function(a){c.$set(d,a)})})})}function C(a,b,c){var d=b[0],e=d.parentNode,i,g;if(a){i=0;for(g=a.length;i -0){var e=P[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,c,d,f){return(b=h(b,c,d,f))?(a&&!b.json&&e("is not valid json",b),P.shift(),b):!1}function j(a){f(a)||e("is unexpected, expecting ["+a+"]",h())}function i(a,b){return function(c,d){return a(c,d,b)}}function k(a,b,c){return function(d,e){return b(d,e,a,c)}}function m(){for(var a=[];;)if(P.length>0&&!h("}",")",";","]")&&a.push(w()),!f(";"))return a.length==1?a[0]:function(b,c){for(var d,e=0;e","<=",">="))a=k(a,b.fn,s());return a}function J(){for(var a=n(),b;b=f("*","/","%");)a=k(a,b.fn,n());return a}function n(){var a;return f("+")?z():(a=f("-"))?k(r,a.fn,n()):(a=f("!"))?i(a.fn,n()):z()}function z(){var a;if(f("("))a=w(),j(")");else if(f("["))a=V();else if(f("{"))a=K();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=x(a,c),c=null):b.text==="["?(c=a,a=R(a)):b.text==="."?(c=a,a=u(a)):e("IMPOSSIBLE");return a}function V(){var a= -[];if(g().text!="]"){do a.push(G());while(f(","))}j("]");return function(b,c){for(var d=[],e=0;e1;d++){var e=a.shift(),g=b[e];g||(g={},b[e]=g);b=g}return b[a.shift()]= -c}function gb(b,a,c){if(!a)return b;for(var a=a.split("."),d,e=b,g=a.length,h=0;h7),hasEvent:function(c){if(c=="input"&&Z==9)return!1;if(w(a[c])){var e=b.document.createElement("div");a[c]="on"+c in e}return a[c]},csp:!1}}]}function Uc(){this.$get=I(X)}function Nb(b){var a={},c,d,e;if(!b)return a;n(b.split("\n"),function(b){e=b.indexOf(":");c=y(O(b.substr(0, -e)));d=O(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Ob(b){var a=M(b)?b:q;return function(c){a||(a=Nb(b));return c?a[y(c)]||null:a}}function Pb(b,a,c){if(H(c))return c(b,a);n(c,function(c){b=c(b,a)});return b}function Vc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){A(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=ob(d,!0)));return d}],transformRequest:[function(a){return M(a)&&xa.apply(a)!=="[object File]"?da(a):a}], -headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,j,i,k){function m(a){function c(a){var b=v({},a,{data:Pb(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:i.reject(b)}a.method=ma(a.method);var e=a.transformRequest|| -d.transformRequest,f=a.transformResponse||d.transformResponse,g=d.headers,g=v({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},g.common,g[y(a.method)],a.headers),e=Pb(a.data,Ob(g),e),j;w(a.data)&&delete g["Content-Type"];j=l(a,e,g);j=j.then(c,c);n(p,function(a){j=a(j)});j.success=function(b){j.then(function(c){b(c.data,c.status,c.headers,a)});return j};j.error=function(b){j.then(null,function(c){b(c.data,c.status,c.headers,a)});return j};return j}function l(b,c,d){function e(a,b,c){n&&(200<=a&&a<300?n.put(q, -[a,b,Nb(c)]):n.remove(q));f(b,a,c);j.$apply()}function f(a,c,d){c=Math.max(c,0);(200<=c&&c<300?k.resolve:k.reject)({data:a,status:c,headers:Ob(d),config:b})}function h(){var a=Aa(m.pendingRequests,b);a!==-1&&m.pendingRequests.splice(a,1)}var k=i.defer(),l=k.promise,n,p,q=t(b.url,b.params);m.pendingRequests.push(b);l.then(h,h);b.cache&&b.method=="GET"&&(n=M(b.cache)?b.cache:o);if(n)if(p=n.get(q))if(p.then)return p.then(h,h),p;else B(p)?f(p[1],p[0],U(p[2])):f(p,200,{});else n.put(q,l);p||a(b.method, -q,c,e,d,b.timeout,b.withCredentials);return l}function t(a,b){if(!b)return a;var c=[];fc(b,function(a,b){a==null||a==q||(M(a)&&(a=da(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var o=c("$http"),p=[];n(e,function(a){p.push(A(a)?k.get(a):k.invoke(a))});m.pendingRequests=[];(function(a){n(arguments,function(a){m[a]=function(b,c){return m(v(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){n(arguments,function(a){m[a]= -function(b,c,d){return m(v(d||{},{method:a,url:b,data:c}))}})})("post","put");m.defaults=d;return m}]}function Wc(){this.$get=["$browser","$window","$document",function(b,a,c){return Xc(b,Yc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Xc(b,a,c,d,e,g){function h(a,b){var c=e.createElement("script"),d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;Z?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror= -d;e.body.appendChild(c)}return function(e,j,i,k,m,l,t){function o(a,c,d,e){c=(j.match(Gb)||["",g])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(C)}b.$$incOutstandingRequestCount();j=j||b.url();if(y(e)=="jsonp"){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a};h(j.replace("JSON_CALLBACK","angular.callbacks."+p),function(){d[p].data?o(k,200,d[p].data):o(k,-2);delete d[p]})}else{var s=new a;s.open(e,j,!0);n(m,function(a,b){a&&s.setRequestHeader(b,a)}); -var q;s.onreadystatechange=function(){if(s.readyState==4){var a=s.getAllResponseHeaders(),b=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];a||(a="",n(b,function(b){var c=s.getResponseHeader(b);c&&(a+=b+": "+c+"\n")}));o(k,q||s.status,s.responseText,a)}};if(t)s.withCredentials=!0;s.send(i||"");l>0&&c(function(){q=-1;s.abort()},l)}}}function Zc(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0, -maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","), -AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return b===1?"one":"other"}}}}function $c(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,f,j){var i=c.defer(),k=i.promise,m=x(j)&&!j,f=a.defer(function(){try{i.resolve(e())}catch(a){i.reject(a),d(a)}m||b.$apply()},f),j=function(){delete g[k.$$timeoutId]}; -k.$$timeoutId=f;g[f]=i;k.then(j,j);return k}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),a.defer.cancel(b.$$timeoutId)):!1};return e}]}function Qb(b){function a(a,e){return b.factory(a+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Rb);a("date",Sb);a("filter",ad);a("json",bd);a("limitTo",cd);a("lowercase",dd);a("number",Tb);a("orderBy",Ub);a("uppercase",ed)}function ad(){return function(b, -a){if(!B(b))return b;var c=[];c.check=function(a){for(var b=0;b-1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&d(a[c],b))return!0;return!1;case "array":for(c=0;ce+1?h="0":(f=h,i=!0)}if(!i){h=(h.split(Wb)[1]||"").length;w(e)&&(e=Math.min(Math.max(a.minFrac,h),a.maxFrac));var h=Math.pow(10,e),b=Math.round(b*h)/h,b=(""+b).split(Wb),h=b[0],b=b[1]||"",i=0,k=a.lgSize, -m=a.gSize;if(h.length>=k+m)for(var i=h.length-k,l=0;l0||e>-c)e+= -c;e===0&&c==-12&&(e=12);return jb(e,a,d)}}function Ka(b,a){return function(c,d){var e=c["get"+b](),g=ma(a?"SHORT"+b:b);return d[g][e]}}function Sb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),g=0,h=0;b[9]&&(g=E(b[9]+b[10]),h=E(b[9]+b[11]));a.setUTCFullYear(E(b[1]),E(b[2])-1,E(b[3]));a.setUTCHours(E(b[4]||0)-g,E(b[5]||0)-h,E(b[6]||0),E(b[7]||0))}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var g= -"",h=[],f,j,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;A(c)&&(c=fd.test(c)?E(c):a(c));Ra(c)&&(c=new Date(c));if(!oa(c))return c;for(;e;)(j=gd.exec(e))?(h=h.concat(ha.call(j,1)),e=h.pop()):(h.push(e),e=null);n(h,function(a){f=hd[a];g+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function bd(){return function(b){return da(b,!0)}}function cd(){return function(b,a){if(!(b instanceof Array))return b;var a=E(a),c=[],d,e;if(!b||!(b instanceof Array))return c;a>b.length? -a=b.length:a<-b.length&&(a=-b.length);a>0?(d=0,e=a):(d=b.length+a,e=b.length);for(;dm?(d.$setValidity("maxlength",!1),q):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function kb(b,a){b="ngClass"+b;return Q(function(c,d,e){function g(b){if(a===!0||c.$index%2===a)j&&b!==j&&h(j),f(b);j=b}function h(a){M(a)&&!B(a)&&(a=Sa(a,function(a,b){if(a)return b}));d.removeClass(B(a)? -a.join(" "):a)}function f(a){M(a)&&!B(a)&&(a=Sa(a,function(a,b){if(a)return b}));a&&d.addClass(B(a)?a.join(" "):a)}var j=q;c.$watch(e[b],g,!0);e.$observe("class",function(){var a=c.$eval(e[b]);g(a,a)});b!=="ngClass"&&c.$watch("$index",function(d,g){var j=d%2;j!==g%2&&(j==a?f(c.$eval(e[b])):h(c.$eval(e[b])))})})}var y=function(b){return A(b)?b.toLowerCase():b},ma=function(b){return A(b)?b.toUpperCase():b},Z=E((/msie (\d+)/.exec(y(navigator.userAgent))||[])[1]),u,ca,ha=[].slice,Qa=[].push,xa=Object.prototype.toString, -Zb=X.angular||(X.angular={}),ta,fb,aa=["0","0","0"];C.$inject=[];na.$inject=[];fb=Z<9?function(b){b=b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?ma(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var kc=/[A-Z]/g,id={full:"1.0.5",major:1,minor:0,dot:5,codeName:"flatulent-propulsion"},Ca=L.cache={},Ba=L.expando="ng-"+(new Date).getTime(),oc=1,$b=X.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+ -a,c)},db=X.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},mc=/([\:\-\_]+(.))/g,nc=/^moz([A-Z])/,va=L.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;this.bind("DOMContentLoaded",a);L(X).bind("load",a)},toString:function(){var b=[];n(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return b>=0?u(this[b]):u(this[this.length+b])},length:0,push:Qa,sort:[].sort,splice:[].splice},Fa={};n("multiple,selected,checked,disabled,readOnly,required".split(","), -function(b){Fa[y(b)]=b});var Ab={};n("input,select,option,textarea,button,form".split(","),function(b){Ab[ma(b)]=!0});n({data:vb,inheritedData:Ea,scope:function(b){return Ea(b,"$scope")},controller:yb,injector:function(b){return Ea(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Da,css:function(b,a,c){a=sb(a);if(x(c))b.style[a]=c;else{var d;Z<=8&&(d=b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];Z<=8&&(d=d===""?q:d);return d}},attr:function(b,a,c){var d= -y(a);if(Fa[d])if(x(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||C).specified?d:q;else if(x(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),b===null?q:b},prop:function(b,a,c){if(x(c))b[a]=c;else return b[a]},text:v(Z<9?function(b,a){if(b.nodeType==1){if(w(a))return b.innerText;b.innerText=a}else{if(w(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(w(a))return b.textContent;b.textContent=a},{$dv:""}), -val:function(b,a){if(w(a))return b.value;b.value=a},html:function(b,a){if(w(a))return b.innerHTML;for(var c=0,d=b.childNodes;c":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Lc= -{n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},ib={},Yc=X.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");};Qb.$inject=["$provide"];Rb.$inject=["$locale"];Tb.$inject=["$locale"];var Wb=".",hd={yyyy:N("FullYear",4),yy:N("FullYear",2,0,!0),y:N("FullYear",1),MMMM:Ka("Month"), -MMM:Ka("Month",!0),MM:N("Month",2,1),M:N("Month",1,1),dd:N("Date",2),d:N("Date",1),HH:N("Hours",2),H:N("Hours",1),hh:N("Hours",2,-12),h:N("Hours",1,-12),mm:N("Minutes",2),m:N("Minutes",1),ss:N("Seconds",2),s:N("Seconds",1),EEEE:Ka("Day"),EEE:Ka("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){var a=-1*a.getTimezoneOffset(),c=a>=0?"+":"";c+=jb(a/60,2)+jb(Math.abs(a%60),2);return c}},gd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/, -fd=/^\d+$/;Sb.$inject=["$locale"];var dd=I(y),ed=I(ma);Ub.$inject=["$parse"];var jd=I({restrict:"E",compile:function(a,c){Z<=8&&(!c.href&&!c.name&&c.$set("href",""),a.append(Y.createComment("IE fix")));return function(a,c){c.bind("click",function(a){c.attr("href")||a.preventDefault()})}}}),lb={};n(Fa,function(a,c){var d=ea("ng-"+c);lb[d]=function(){return{priority:100,compile:function(){return function(a,g,h){a.$watch(h[d],function(a){h.$set(c,!!a)})}}}}});n(["src","href"],function(a){var c=ea("ng-"+ -a);lb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),Z&&e.prop(a,g[a]))})}}}});var Na={$addControl:C,$removeControl:C,$setValidity:C,$setDirty:C};Xb.$inject=["$element","$attrs","$scope"];var Qa=function(a){return["$timeout",function(c){var d={name:"form",restrict:"E",controller:Xb,compile:function(){return{pre:function(a,d,h,f){if(!h.action){var j=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};$b(d[0],"submit",j);d.bind("$destroy", -function(){c(function(){db(d[0],"submit",j)},0,!1)})}var i=d.parent().controller("form"),k=h.name||h.ngForm;k&&(a[k]=f);i&&d.bind("$destroy",function(){i.$removeControl(f);k&&(a[k]=q);v(f,Na)})}}}};return a?v(U(d),{restrict:"EAC"}):d}]},kd=Qa(),ld=Qa(!0),md=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,nd=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,od=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,bc={text:Pa,number:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);e.$parsers.push(function(a){var c= -T(a);return c||od.test(a)?(e.$setValidity("number",!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number",!1),q)});e.$formatters.push(function(a){return T(a)?"":""+a});if(d.min){var f=parseFloat(d.min),a=function(a){return!T(a)&&aj?(e.$setValidity("max",!1),q):(e.$setValidity("max",!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return T(a)|| -Ra(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),q)})},url:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);a=function(a){return T(a)||md.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);a=function(a){return T(a)||nd.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){w(d.name)&&c.attr("name",ya());c.bind("click", -function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,h=d.ngFalseValue;A(g)||(g=!0);A(h)||(h=!1);c.bind("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:h})},hidden:C,button:C,submit:C,reset:C}, -cc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,h){h&&(bc[y(g.type)]||bc.text)(d,e,g,h,c,a)}}}],Ma="ng-valid",La="ng-invalid",Oa="ng-pristine",Yb="ng-dirty",pd=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,g){function h(a,c){c=c?"-"+Za(c,"-"):"";e.removeClass((a?La:Ma)+c).addClass((a?Ma:La)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine= -!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var f=g(d.ngModel),j=f.assign;if(!j)throw Error(Db+d.ngModel+" ("+qa(e)+")");this.$render=C;var i=e.inheritedData("$formController")||Na,k=0,m=this.$error={};e.addClass(Oa);h(!0);this.$setValidity=function(a,c){if(m[a]!==!c){if(c){if(m[a]&&k--,!k)h(!0),this.$valid=!0,this.$invalid=!1}else h(!1),this.$invalid=!0,this.$valid=!1,k++;m[a]=!c;h(c,a);i.$setValidity(a,c,this)}};this.$setViewValue=function(d){this.$viewValue=d;if(this.$pristine)this.$dirty= -!0,this.$pristine=!1,e.removeClass(Oa).addClass(Yb),i.$setDirty();n(this.$parsers,function(a){d=a(d)});if(this.$modelValue!==d)this.$modelValue=d,j(a,d),n(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};var l=this;a.$watch(function(){var c=f(a);if(l.$modelValue!==c){var d=l.$formatters,e=d.length;for(l.$modelValue=c;e--;)c=d[e](c);if(l.$viewValue!==c)l.$viewValue=c,l.$render()}})}],qd=function(){return{require:["ngModel","^?form"],controller:pd,link:function(a,c,d,e){var g=e[0],h= -e[1]||Na;h.$addControl(g);c.bind("$destroy",function(){h.$removeControl(g)})}}},rd=I({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),dc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var g=function(a){if(d.required&&(T(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},sd=function(){return{require:"ngModel", -link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){var c=[];a&&n(a.split(g),function(a){a&&c.push(O(a))});return c});e.$formatters.push(function(a){return B(a)?a.join(", "):q})}}},td=/^(true|false|\d+)$/,ud=function(){return{priority:100,compile:function(a,c){return td.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a,!1)})}}}},vd=Q(function(a,c,d){c.addClass("ng-binding").data("$binding", -d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==q?"":a)})}),wd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],xd=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,function(a){c.html(a||"")})}}],yd=kb("",!0),zd=kb("Odd",0),Ad=kb("Even",1),Bd=Q({compile:function(a,c){c.$set("ngCloak",q); -a.removeClass("ng-cloak")}}),Cd=[function(){return{scope:!0,controller:"@"}}],Dd=["$sniffer",function(a){return{priority:1E3,compile:function(){a.csp=!0}}}],ec={};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(a){var c=ea("ng-"+a);ec[c]=["$parse",function(d){return function(e,g,h){var f=d(h[c]);g.bind(y(a),function(a){e.$apply(function(){f(e,{$event:a})})})}}]});var Ed=Q(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}), -Fd=["$http","$templateCache","$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(g,h){var f=h.ngInclude||h.src,j=h.onload||"",i=h.autoscroll;return function(g,h){var l=0,n,o=function(){n&&(n.$destroy(),n=null);h.html("")};g.$watch(f,function(f){var s=++l;f?a.get(f,{cache:c}).success(function(a){s===l&&(n&&n.$destroy(),n=g.$new(),h.html(a),e(h.contents())(n),x(i)&&(!i||g.$eval(i))&&d(),n.$emit("$includeContentLoaded"),g.$eval(j))}).error(function(){s===l&& -o()}):o()})}}}}],Gd=Q({compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Hd=Q({terminal:!0,priority:1E3}),Id=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,h){var f=h.count,j=g.attr(h.$attr.when),i=h.offset||0,k=e.$eval(j),m={},l=c.startSymbol(),t=c.endSymbol();n(k,function(a,e){m[e]=c(a.replace(d,l+f+"-"+i+t))});e.$watch(function(){var c=parseFloat(e.$eval(f));return isNaN(c)?"":(k[c]||(c=a.pluralCat(c-i)),m[c](e,g,!0))},function(a){g.text(a)})}}}], -Jd=Q({transclude:"element",priority:1E3,terminal:!0,compile:function(a,c,d){return function(a,c,h){var f=h.ngRepeat,h=f.match(/^\s*(.+)\s+in\s+(.*)\s*$/),j,i,k;if(!h)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+f+"'.");f=h[1];j=h[2];h=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!h)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+f+"'.");i=h[3]||h[1];k=h[2];var m=new eb;a.$watch(function(a){var e,f,h=a.$eval(j), -n=c,q=new eb,x,z,u,w,r,v;if(B(h))r=h||[];else{r=[];for(u in h)h.hasOwnProperty(u)&&u.charAt(0)!="$"&&r.push(u);r.sort()}x=r.length;e=0;for(f=r.length;eA;)u.pop().element.remove()}for(;r.length>y;)r.pop()[0].element.remove()}var i;if(!(i=p.match(d)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+p+"'.");var j=c(i[2]||i[1]),k=i[4]||i[6],l=i[5],m=c(i[3]||""), -n=c(i[2]?i[1]:k),t=c(i[7]),r=[[{element:f,label:""}]];s&&(a(s)(e),s.removeClass("ng-scope"),s.remove());f.html("");f.bind("change",function(){e.$apply(function(){var a,c=t(e)||[],d={},h,i,j,m,p,s;if(o){i=[];m=0;for(s=r.length;m@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}'); +(function (X, Y, q) { + 'use strict'; + function n(b, a, c) { + var d; + if (b) + if (H(b)) + for (d in b) + d != 'prototype' && + d != 'length' && + d != 'name' && + b.hasOwnProperty(d) && + a.call(c, b[d], d); + else if (b.forEach && b.forEach !== n) b.forEach(a, c); + else if ( + !b || typeof b.length !== 'number' + ? 0 + : (typeof b.hasOwnProperty != 'function' && + typeof b.constructor != 'function') || + b instanceof L || + (ca && b instanceof ca) || + xa.call(b) !== '[object Object]' || + typeof b.callee === 'function' + ) + for (d = 0; d < b.length; d++) a.call(c, b[d], d); + else for (d in b) b.hasOwnProperty(d) && a.call(c, b[d], d); + return b; + } + function mb(b) { + var a = [], + c; + for (c in b) b.hasOwnProperty(c) && a.push(c); + return a.sort(); + } + function fc(b, a, c) { + for (var d = mb(b), e = 0; e < d.length; e++) a.call(c, b[d[e]], d[e]); + return d; + } + function nb(b) { + return function (a, c) { + b(c, a); + }; + } + function ya() { + for (var b = aa.length, a; b; ) { + b--; + a = aa[b].charCodeAt(0); + if (a == 57) return (aa[b] = 'A'), aa.join(''); + if (a == 90) aa[b] = '0'; + else return (aa[b] = String.fromCharCode(a + 1)), aa.join(''); + } + aa.unshift('0'); + return aa.join(''); + } + function v(b) { + n(arguments, function (a) { + a !== b && + n(a, function (a, d) { + b[d] = a; + }); + }); + return b; + } + function E(b) { + return parseInt(b, 10); + } + function za(b, a) { + return v(new (v(function () {}, { prototype: b }))(), a); + } + function C() {} + function na(b) { + return b; + } + function I(b) { + return function () { + return b; + }; + } + function w(b) { + return typeof b == 'undefined'; + } + function x(b) { + return typeof b != 'undefined'; + } + function M(b) { + return b != null && typeof b == 'object'; + } + function A(b) { + return typeof b == 'string'; + } + function Ra(b) { + return typeof b == 'number'; + } + function oa(b) { + return xa.apply(b) == '[object Date]'; + } + function B(b) { + return xa.apply(b) == '[object Array]'; + } + function H(b) { + return typeof b == 'function'; + } + function pa(b) { + return b && b.document && b.location && b.alert && b.setInterval; + } + function O(b) { + return A(b) ? b.replace(/^\s*/, '').replace(/\s*$/, '') : b; + } + function gc(b) { + return b && (b.nodeName || (b.bind && b.find)); + } + function Sa(b, a, c) { + var d = []; + n(b, function (b, g, h) { + d.push(a.call(c, b, g, h)); + }); + return d; + } + function Aa(b, a) { + if (b.indexOf) return b.indexOf(a); + for (var c = 0; c < b.length; c++) if (a === b[c]) return c; + return -1; + } + function Ta(b, a) { + var c = Aa(b, a); + c >= 0 && b.splice(c, 1); + return a; + } + function U(b, a) { + if (pa(b) || (b && b.$evalAsync && b.$watch)) + throw Error("Can't copy Window or Scope"); + if (a) { + if (b === a) throw Error("Can't copy equivalent objects or arrays"); + if (B(b)) for (var c = (a.length = 0); c < b.length; c++) a.push(U(b[c])); + else + for (c in (n(a, function (b, c) { + delete a[c]; + }), + b)) + a[c] = U(b[c]); + } else + (a = b) && + (B(b) + ? (a = U(b, [])) + : oa(b) + ? (a = new Date(b.getTime())) + : M(b) && (a = U(b, {}))); + return a; + } + function hc(b, a) { + var a = a || {}, + c; + for (c in b) + b.hasOwnProperty(c) && c.substr(0, 2) !== '$$' && (a[c] = b[c]); + return a; + } + function ga(b, a) { + if (b === a) return !0; + if (b === null || a === null) return !1; + if (b !== b && a !== a) return !0; + var c = typeof b, + d; + if (c == typeof a && c == 'object') + if (B(b)) { + if ((c = b.length) == a.length) { + for (d = 0; d < c; d++) if (!ga(b[d], a[d])) return !1; + return !0; + } + } else if (oa(b)) return oa(a) && b.getTime() == a.getTime(); + else { + if ( + (b && b.$evalAsync && b.$watch) || + (a && a.$evalAsync && a.$watch) || + pa(b) || + pa(a) + ) + return !1; + c = {}; + for (d in b) + if (!(d.charAt(0) === '$' || H(b[d]))) { + if (!ga(b[d], a[d])) return !1; + c[d] = !0; + } + for (d in a) + if (!c[d] && d.charAt(0) !== '$' && a[d] !== q && !H(a[d])) return !1; + return !0; + } + return !1; + } + function Ua(b, a) { + var c = arguments.length > 2 ? ha.call(arguments, 2) : []; + return H(a) && !(a instanceof RegExp) + ? c.length + ? function () { + return arguments.length + ? a.apply(b, c.concat(ha.call(arguments, 0))) + : a.apply(b, c); + } + : function () { + return arguments.length ? a.apply(b, arguments) : a.call(b); + } + : a; + } + function ic(b, a) { + var c = a; + /^\$+/.test(b) + ? (c = q) + : pa(a) + ? (c = '$WINDOW') + : a && Y === a + ? (c = '$DOCUMENT') + : a && a.$evalAsync && a.$watch && (c = '$SCOPE'); + return c; + } + function da(b, a) { + return JSON.stringify(b, ic, a ? ' ' : null); + } + function ob(b) { + return A(b) ? JSON.parse(b) : b; + } + function Va(b) { + b && b.length !== 0 + ? ((b = y('' + b)), + (b = !( + b == 'f' || + b == '0' || + b == 'false' || + b == 'no' || + b == 'n' || + b == '[]' + ))) + : (b = !1); + return b; + } + function qa(b) { + b = u(b).clone(); + try { + b.html(''); + } catch (a) {} + var c = u('
').append(b).html(); + try { + return b[0].nodeType === 3 + ? y(c) + : c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/, function (a, b) { + return '<' + y(b); + }); + } catch (d) { + return y(c); + } + } + function Wa(b) { + var a = {}, + c, + d; + n((b || '').split('&'), function (b) { + b && + ((c = b.split('=')), + (d = decodeURIComponent(c[0])), + (a[d] = x(c[1]) ? decodeURIComponent(c[1]) : !0)); + }); + return a; + } + function pb(b) { + var a = []; + n(b, function (b, d) { + a.push(Xa(d, !0) + (b === !0 ? '' : '=' + Xa(b, !0))); + }); + return a.length ? a.join('&') : ''; + } + function Ya(b) { + return Xa(b, !0) + .replace(/%26/gi, '&') + .replace(/%3D/gi, '=') + .replace(/%2B/gi, '+'); + } + function Xa(b, a) { + return encodeURIComponent(b) + .replace(/%40/gi, '@') + .replace(/%3A/gi, ':') + .replace(/%24/g, '$') + .replace(/%2C/gi, ',') + .replace(a ? null : /%20/g, '+'); + } + function jc(b, a) { + function c(a) { + a && d.push(a); + } + var d = [b], + e, + g, + h = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'], + f = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/; + n(h, function (a) { + h[a] = !0; + c(Y.getElementById(a)); + a = a.replace(':', '\\:'); + b.querySelectorAll && + (n(b.querySelectorAll('.' + a), c), + n(b.querySelectorAll('.' + a + '\\:'), c), + n(b.querySelectorAll('[' + a + ']'), c)); + }); + n(d, function (a) { + if (!e) { + var b = f.exec(' ' + a.className + ' '); + b + ? ((e = a), (g = (b[2] || '').replace(/\s+/g, ','))) + : n(a.attributes, function (b) { + if (!e && h[b.name]) (e = a), (g = b.value); + }); + } + }); + e && a(e, g ? [g] : []); + } + function qb(b, a) { + b = u(b); + a = a || []; + a.unshift([ + '$provide', + function (a) { + a.value('$rootElement', b); + } + ]); + a.unshift('ng'); + var c = rb(a); + c.invoke([ + '$rootScope', + '$rootElement', + '$compile', + '$injector', + function (a, b, c, h) { + a.$apply(function () { + b.data('$injector', h); + c(b)(a); + }); + } + ]); + return c; + } + function Za(b, a) { + a = a || '_'; + return b.replace(kc, function (b, d) { + return (d ? a : '') + b.toLowerCase(); + }); + } + function $a(b, a, c) { + if (!b) + throw Error("Argument '" + (a || '?') + "' is " + (c || 'required')); + return b; + } + function ra(b, a, c) { + c && B(b) && (b = b[b.length - 1]); + $a( + H(b), + a, + 'not a function, got ' + + (b && typeof b == 'object' ? b.constructor.name || 'Object' : typeof b) + ); + return b; + } + function lc(b) { + function a(a, b, e) { + return a[b] || (a[b] = e()); + } + return a(a(b, 'angular', Object), 'module', function () { + var b = {}; + return function (d, e, g) { + e && b.hasOwnProperty(d) && (b[d] = null); + return a(b, d, function () { + function a(c, d, e) { + return function () { + b[e || 'push']([c, d, arguments]); + return k; + }; + } + if (!e) throw Error('No module: ' + d); + var b = [], + c = [], + i = a('$injector', 'invoke'), + k = { + _invokeQueue: b, + _runBlocks: c, + requires: e, + name: d, + provider: a('$provide', 'provider'), + factory: a('$provide', 'factory'), + service: a('$provide', 'service'), + value: a('$provide', 'value'), + constant: a('$provide', 'constant', 'unshift'), + filter: a('$filterProvider', 'register'), + controller: a('$controllerProvider', 'register'), + directive: a('$compileProvider', 'directive'), + config: i, + run: function (a) { + c.push(a); + return this; + } + }; + g && i(g); + return k; + }); + }; + }); + } + function sb(b) { + return b + .replace(mc, function (a, b, d, e) { + return e ? d.toUpperCase() : d; + }) + .replace(nc, 'Moz$1'); + } + function ab(b, a) { + function c() { + var e; + for (var b = [this], c = a, h, f, j, i, k, m; b.length; ) { + h = b.shift(); + f = 0; + for (j = h.length; f < j; f++) { + i = u(h[f]); + c ? i.triggerHandler('$destroy') : (c = !c); + k = 0; + for (e = (m = i.children()).length, i = e; k < i; k++) + b.push(ca(m[k])); + } + } + return d.apply(this, arguments); + } + var d = ca.fn[b], + d = d.$original || d; + c.$original = d; + ca.fn[b] = c; + } + function L(b) { + if (b instanceof L) return b; + if (!(this instanceof L)) { + if (A(b) && b.charAt(0) != '<') throw Error('selectors not implemented'); + return new L(b); + } + if (A(b)) { + var a = Y.createElement('div'); + a.innerHTML = '
 
' + b; + a.removeChild(a.firstChild); + bb(this, a.childNodes); + this.remove(); + } else bb(this, b); + } + function cb(b) { + return b.cloneNode(!0); + } + function sa(b) { + tb(b); + for (var a = 0, b = b.childNodes || []; a < b.length; a++) sa(b[a]); + } + function ub(b, a, c) { + var d = ba(b, 'events'); + ba(b, 'handle') && + (w(a) + ? n(d, function (a, c) { + db(b, c, a); + delete d[c]; + }) + : w(c) + ? (db(b, a, d[a]), delete d[a]) + : Ta(d[a], c)); + } + function tb(b) { + var a = b[Ba], + c = Ca[a]; + c && + (c.handle && (c.events.$destroy && c.handle({}, '$destroy'), ub(b)), + delete Ca[a], + (b[Ba] = q)); + } + function ba(b, a, c) { + var d = b[Ba], + d = Ca[d || -1]; + if (x(c)) d || ((b[Ba] = d = ++oc), (d = Ca[d] = {})), (d[a] = c); + else return d && d[a]; + } + function vb(b, a, c) { + var d = ba(b, 'data'), + e = x(c), + g = !e && x(a), + h = g && !M(a); + !d && !h && ba(b, 'data', (d = {})); + if (e) d[a] = c; + else if (g) + if (h) return d && d[a]; + else v(d, a); + else return d; + } + function Da(b, a) { + return ( + (' ' + b.className + ' ').replace(/[\n\t]/g, ' ').indexOf(' ' + a + ' ') > + -1 + ); + } + function wb(b, a) { + a && + n(a.split(' '), function (a) { + b.className = O( + (' ' + b.className + ' ') + .replace(/[\n\t]/g, ' ') + .replace(' ' + O(a) + ' ', ' ') + ); + }); + } + function xb(b, a) { + a && + n(a.split(' '), function (a) { + if (!Da(b, a)) b.className = O(b.className + ' ' + O(a)); + }); + } + function bb(b, a) { + if (a) + for ( + var a = !a.nodeName && x(a.length) && !pa(a) ? a : [a], c = 0; + c < a.length; + c++ + ) + b.push(a[c]); + } + function yb(b, a) { + return Ea(b, '$' + (a || 'ngController') + 'Controller'); + } + function Ea(b, a, c) { + b = u(b); + for (b[0].nodeType == 9 && (b = b.find('html')); b.length; ) { + if ((c = b.data(a))) return c; + b = b.parent(); + } + } + function zb(b, a) { + var c = Fa[a.toLowerCase()]; + return c && Ab[b.nodeName] && c; + } + function pc(b, a) { + var c = function (c, e) { + if (!c.preventDefault) + c.preventDefault = function () { + c.returnValue = !1; + }; + if (!c.stopPropagation) + c.stopPropagation = function () { + c.cancelBubble = !0; + }; + if (!c.target) c.target = c.srcElement || Y; + if (w(c.defaultPrevented)) { + var g = c.preventDefault; + c.preventDefault = function () { + c.defaultPrevented = !0; + g.call(c); + }; + c.defaultPrevented = !1; + } + c.isDefaultPrevented = function () { + return c.defaultPrevented; + }; + n(a[e || c.type], function (a) { + a.call(b, c); + }); + Z <= 8 + ? ((c.preventDefault = null), + (c.stopPropagation = null), + (c.isDefaultPrevented = null)) + : (delete c.preventDefault, + delete c.stopPropagation, + delete c.isDefaultPrevented); + }; + c.elem = b; + return c; + } + function fa(b) { + var a = typeof b, + c; + if (a == 'object' && b !== null) + if (typeof (c = b.$$hashKey) == 'function') c = b.$$hashKey(); + else { + if (c === q) c = b.$$hashKey = ya(); + } + else c = b; + return a + ':' + c; + } + function Ga(b) { + n(b, this.put, this); + } + function eb() {} + function Bb(b) { + var a, c; + if (typeof b == 'function') { + if (!(a = b.$inject)) + (a = []), + (c = b.toString().replace(qc, '')), + (c = c.match(rc)), + n(c[1].split(sc), function (b) { + b.replace(tc, function (b, c, d) { + a.push(d); + }); + }), + (b.$inject = a); + } else + B(b) + ? ((c = b.length - 1), ra(b[c], 'fn'), (a = b.slice(0, c))) + : ra(b, 'fn', !0); + return a; + } + function rb(b) { + function a(a) { + return function (b, c) { + if (M(b)) n(b, nb(a)); + else return a(b, c); + }; + } + function c(a, b) { + if (H(b) || B(b)) b = m.instantiate(b); + if (!b.$get) + throw Error('Provider ' + a + ' must define $get factory method.'); + return (k[a + f] = b); + } + function d(a, b) { + return c(a, { $get: b }); + } + function e(a) { + var b = []; + n(a, function (a) { + if (!i.get(a)) + if ((i.put(a, !0), A(a))) { + var c = ta(a); + b = b.concat(e(c.requires)).concat(c._runBlocks); + try { + for (var d = c._invokeQueue, c = 0, f = d.length; c < f; c++) { + var g = d[c], + h = g[0] == '$injector' ? m : m.get(g[0]); + h[g[1]].apply(h, g[2]); + } + } catch (j) { + throw (j.message && (j.message += ' from ' + a), j); + } + } else if (H(a)) + try { + b.push(m.invoke(a)); + } catch (o) { + throw (o.message && (o.message += ' from ' + a), o); + } + else if (B(a)) + try { + b.push(m.invoke(a)); + } catch (k) { + throw ( + (k.message && (k.message += ' from ' + String(a[a.length - 1])), + k) + ); + } + else ra(a, 'module'); + }); + return b; + } + function g(a, b) { + function c(d) { + if (typeof d !== 'string') throw Error('Service name expected'); + if (a.hasOwnProperty(d)) { + if (a[d] === h) throw Error('Circular dependency: ' + j.join(' <- ')); + return a[d]; + } else + try { + return j.unshift(d), (a[d] = h), (a[d] = b(d)); + } finally { + j.shift(); + } + } + function d(a, b, e) { + var f = [], + i = Bb(a), + g, + h, + j; + h = 0; + for (g = i.length; h < g; h++) + (j = i[h]), f.push(e && e.hasOwnProperty(j) ? e[j] : c(j)); + a.$inject || (a = a[g]); + switch (b ? -1 : f.length) { + case 0: + return a(); + case 1: + return a(f[0]); + case 2: + return a(f[0], f[1]); + case 3: + return a(f[0], f[1], f[2]); + case 4: + return a(f[0], f[1], f[2], f[3]); + case 5: + return a(f[0], f[1], f[2], f[3], f[4]); + case 6: + return a(f[0], f[1], f[2], f[3], f[4], f[5]); + case 7: + return a(f[0], f[1], f[2], f[3], f[4], f[5], f[6]); + case 8: + return a(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]); + case 9: + return a(f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7], f[8]); + case 10: + return a( + f[0], + f[1], + f[2], + f[3], + f[4], + f[5], + f[6], + f[7], + f[8], + f[9] + ); + default: + return a.apply(b, f); + } + } + return { + invoke: d, + instantiate: function (a, b) { + var c = function () {}, + e; + c.prototype = (B(a) ? a[a.length - 1] : a).prototype; + c = new c(); + e = d(a, c, b); + return M(e) ? e : c; + }, + get: c, + annotate: Bb + }; + } + var h = {}, + f = 'Provider', + j = [], + i = new Ga(), + k = { + $provide: { + provider: a(c), + factory: a(d), + service: a(function (a, b) { + return d(a, [ + '$injector', + function (a) { + return a.instantiate(b); + } + ]); + }), + value: a(function (a, b) { + return d(a, I(b)); + }), + constant: a(function (a, b) { + k[a] = b; + l[a] = b; + }), + decorator: function (a, b) { + var c = m.get(a + f), + d = c.$get; + c.$get = function () { + var a = t.invoke(d, c); + return t.invoke(b, null, { $delegate: a }); + }; + } + } + }, + m = g(k, function () { + throw Error('Unknown provider: ' + j.join(' <- ')); + }), + l = {}, + t = (l.$injector = g(l, function (a) { + a = m.get(a + f); + return t.invoke(a.$get, a); + })); + n(e(b), function (a) { + t.invoke(a || C); + }); + return t; + } + function uc() { + var b = !0; + this.disableAutoScrolling = function () { + b = !1; + }; + this.$get = [ + '$window', + '$location', + '$rootScope', + function (a, c, d) { + function e(a) { + var b = null; + n(a, function (a) { + !b && y(a.nodeName) === 'a' && (b = a); + }); + return b; + } + function g() { + var b = c.hash(), + d; + b + ? (d = h.getElementById(b)) + ? d.scrollIntoView() + : (d = e(h.getElementsByName(b))) + ? d.scrollIntoView() + : b === 'top' && a.scrollTo(0, 0) + : a.scrollTo(0, 0); + } + var h = a.document; + b && + d.$watch( + function () { + return c.hash(); + }, + function () { + d.$evalAsync(g); + } + ); + return g; + } + ]; + } + function vc(b, a, c, d) { + function e(a) { + try { + a.apply(null, ha.call(arguments, 1)); + } finally { + if ((o--, o === 0)) + for (; p.length; ) + try { + p.pop()(); + } catch (b) { + c.error(b); + } + } + } + function g(a, b) { + (function R() { + n(s, function (a) { + a(); + }); + J = b(R, a); + })(); + } + function h() { + F != f.url() && + ((F = f.url()), + n(V, function (a) { + a(f.url()); + })); + } + var f = this, + j = a[0], + i = b.location, + k = b.history, + m = b.setTimeout, + l = b.clearTimeout, + t = {}; + f.isMock = !1; + var o = 0, + p = []; + f.$$completeOutstandingRequest = e; + f.$$incOutstandingRequestCount = function () { + o++; + }; + f.notifyWhenNoOutstandingRequests = function (a) { + n(s, function (a) { + a(); + }); + o === 0 ? a() : p.push(a); + }; + var s = [], + J; + f.addPollFn = function (a) { + w(J) && g(100, m); + s.push(a); + return a; + }; + var F = i.href, + z = a.find('base'); + f.url = function (a, b) { + if (a) { + if (F != a) + return ( + (F = a), + d.history + ? b + ? k.replaceState(null, '', a) + : (k.pushState(null, '', a), z.attr('href', z.attr('href'))) + : b + ? i.replace(a) + : (i.href = a), + f + ); + } else return i.href.replace(/%27/g, "'"); + }; + var V = [], + K = !1; + f.onUrlChange = function (a) { + K || + (d.history && u(b).bind('popstate', h), + d.hashchange ? u(b).bind('hashchange', h) : f.addPollFn(h), + (K = !0)); + V.push(a); + return a; + }; + f.baseHref = function () { + var a = z.attr('href'); + return a ? a.replace(/^https?\:\/\/[^\/]*/, '') : ''; + }; + var r = {}, + $ = '', + P = f.baseHref(); + f.cookies = function (a, b) { + var d, e, f, i; + if (a) + if (b === q) + j.cookie = + escape(a) + + '=;path=' + + P + + ';expires=Thu, 01 Jan 1970 00:00:00 GMT'; + else { + if (A(b)) + (d = + (j.cookie = escape(a) + '=' + escape(b) + ';path=' + P).length + + 1), + d > 4096 && + c.warn( + "Cookie '" + + a + + "' possibly not set or overflowed because it was too large (" + + d + + ' > 4096 bytes)!' + ); + } + else { + if (j.cookie !== $) { + $ = j.cookie; + d = $.split('; '); + r = {}; + for (f = 0; f < d.length; f++) + (e = d[f]), + (i = e.indexOf('=')), + i > 0 && + (r[unescape(e.substring(0, i))] = unescape(e.substring(i + 1))); + } + return r; + } + }; + f.defer = function (a, b) { + var c; + o++; + c = m(function () { + delete t[c]; + e(a); + }, b || 0); + t[c] = !0; + return c; + }; + f.defer.cancel = function (a) { + return t[a] ? (delete t[a], l(a), e(C), !0) : !1; + }; + } + function wc() { + this.$get = [ + '$window', + '$log', + '$sniffer', + '$document', + function (b, a, c, d) { + return new vc(b, d, a, c); + } + ]; + } + function xc() { + this.$get = function () { + function b(b, d) { + function e(a) { + if (a != m) { + if (l) { + if (l == a) l = a.n; + } else l = a; + g(a.n, a.p); + g(a, m); + m = a; + m.n = null; + } + } + function g(a, b) { + if (a != b) { + if (a) a.p = b; + if (b) b.n = a; + } + } + if (b in a) throw Error('cacheId ' + b + ' taken'); + var h = 0, + f = v({}, d, { id: b }), + j = {}, + i = (d && d.capacity) || Number.MAX_VALUE, + k = {}, + m = null, + l = null; + return (a[b] = { + put: function (a, b) { + var c = k[a] || (k[a] = { key: a }); + e(c); + w(b) || (a in j || h++, (j[a] = b), h > i && this.remove(l.key)); + }, + get: function (a) { + var b = k[a]; + if (b) return e(b), j[a]; + }, + remove: function (a) { + var b = k[a]; + if (b) { + if (b == m) m = b.p; + if (b == l) l = b.n; + g(b.n, b.p); + delete k[a]; + delete j[a]; + h--; + } + }, + removeAll: function () { + j = {}; + h = 0; + k = {}; + m = l = null; + }, + destroy: function () { + k = f = j = null; + delete a[b]; + }, + info: function () { + return v({}, f, { size: h }); + } + }); + } + var a = {}; + b.info = function () { + var b = {}; + n(a, function (a, e) { + b[e] = a.info(); + }); + return b; + }; + b.get = function (b) { + return a[b]; + }; + return b; + }; + } + function yc() { + this.$get = [ + '$cacheFactory', + function (b) { + return b('templates'); + } + ]; + } + function Cb(b) { + var a = {}, + c = 'Directive', + d = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/, + e = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/, + g = 'Template must have exactly one root element. was: ', + h = /^\s*(https?|ftp|mailto):/; + this.directive = function j(d, e) { + A(d) + ? ($a(e, 'directive'), + a.hasOwnProperty(d) || + ((a[d] = []), + b.factory(d + c, [ + '$injector', + '$exceptionHandler', + function (b, c) { + var e = []; + n(a[d], function (a) { + try { + var g = b.invoke(a); + if (H(g)) g = { compile: I(g) }; + else if (!g.compile && g.link) g.compile = I(g.link); + g.priority = g.priority || 0; + g.name = g.name || d; + g.require = g.require || (g.controller && g.name); + g.restrict = g.restrict || 'A'; + e.push(g); + } catch (h) { + c(h); + } + }); + return e; + } + ])), + a[d].push(e)) + : n(d, nb(j)); + return this; + }; + this.urlSanitizationWhitelist = function (a) { + return x(a) ? ((h = a), this) : h; + }; + this.$get = [ + '$injector', + '$interpolate', + '$exceptionHandler', + '$http', + '$templateCache', + '$parse', + '$controller', + '$rootScope', + '$document', + function (b, i, k, m, l, t, o, p, s) { + function J(a, b, c) { + a instanceof u || (a = u(a)); + n(a, function (b, c) { + b.nodeType == 3 && + b.nodeValue.match(/\S+/) && + (a[c] = u(b).wrap('').parent()[0]); + }); + var d = z(a, b, a, c); + return function (b, c) { + $a(b, 'scope'); + for ( + var e = c ? va.clone.call(a) : a, g = 0, i = e.length; + g < i; + g++ + ) { + var h = e[g]; + (h.nodeType == 1 || h.nodeType == 9) && e.eq(g).data('$scope', b); + } + F(e, 'ng-scope'); + c && c(e, b); + d && d(b, e, e); + return e; + }; + } + function F(a, b) { + try { + a.addClass(b); + } catch (c) {} + } + function z(a, b, c, d) { + function e(a, c, d, i) { + var h, + j, + k, + o, + l, + m, + t, + s = []; + l = 0; + for (m = c.length; l < m; l++) s.push(c[l]); + t = l = 0; + for (m = g.length; l < m; t++) + (j = s[t]), + (c = g[l++]), + (h = g[l++]), + c + ? (c.scope + ? ((k = a.$new(M(c.scope))), u(j).data('$scope', k)) + : (k = a), + (o = c.transclude) || (!i && b) + ? c( + h, + k, + j, + d, + (function (b) { + return function (c) { + var d = a.$new(); + d.$$transcluded = !0; + return b(d, c).bind( + '$destroy', + Ua(d, d.$destroy) + ); + }; + })(o || b) + ) + : c(h, k, j, q, i)) + : h && h(a, j.childNodes, q, i); + } + for (var g = [], i, h, j, k = 0; k < a.length; k++) + (h = new ia()), + (i = V(a[k], [], h, d)), + (h = + ((i = i.length ? K(i, a[k], h, b, c) : null) && i.terminal) || + !a[k].childNodes.length + ? null + : z(a[k].childNodes, i ? i.transclude : b)), + g.push(i), + g.push(h), + (j = j || i || h); + return j ? e : null; + } + function V(a, b, c, i) { + var g = c.$attr, + h; + switch (a.nodeType) { + case 1: + r(b, ea(fb(a).toLowerCase()), 'E', i); + var j, k, l; + h = a.attributes; + for (var o = 0, m = h && h.length; o < m; o++) + if (((j = h[o]), j.specified)) + (k = j.name), + (l = ea(k.toLowerCase())), + (g[l] = k), + (c[l] = j = + O( + Z && k == 'href' + ? decodeURIComponent(a.getAttribute(k, 2)) + : j.value + )), + zb(a, l) && (c[l] = !0), + R(a, b, j, l), + r(b, l, 'A', i); + a = a.className; + if (A(a) && a !== '') + for (; (h = e.exec(a)); ) + (l = ea(h[2])), + r(b, l, 'C', i) && (c[l] = O(h[3])), + (a = a.substr(h.index + h[0].length)); + break; + case 3: + x(b, a.nodeValue); + break; + case 8: + try { + if ((h = d.exec(a.nodeValue))) + (l = ea(h[1])), r(b, l, 'M', i) && (c[l] = O(h[2])); + } catch (t) {} + } + b.sort(G); + return b; + } + function K(a, b, c, d, e) { + function i(a, b) { + if (a) (a.require = r.require), m.push(a); + if (b) (b.require = r.require), s.push(b); + } + function h(a, b) { + var c, + d = 'data', + e = !1; + if (A(a)) { + for (; (c = a.charAt(0)) == '^' || c == '?'; ) + (a = a.substr(1)), + c == '^' && (d = 'inheritedData'), + (e = e || c == '?'); + c = b[d]('$' + a + 'Controller'); + if (!c && !e) throw Error('No controller: ' + a); + } else + B(a) && + ((c = []), + n(a, function (a) { + c.push(h(a, b)); + })); + return c; + } + function j(a, d, e, i, g) { + var l, p, r, D, F; + l = b === e ? c : hc(c, new ia(u(e), c.$attr)); + p = l.$$element; + if (K) { + var J = /^\s*([@=&])\s*(\w*)\s*$/, + ja = d.$parent || d; + n(K.scope, function (a, b) { + var c = a.match(J) || [], + e = c[2] || b, + c = c[1], + i, + g, + h; + d.$$isolateBindings[b] = c + e; + switch (c) { + case '@': + l.$observe(e, function (a) { + d[b] = a; + }); + l.$$observers[e].$$scope = ja; + break; + case '=': + g = t(l[e]); + h = + g.assign || + function () { + i = d[b] = g(ja); + throw Error(Db + l[e] + ' (directive: ' + K.name + ')'); + }; + i = d[b] = g(ja); + d.$watch(function () { + var a = g(ja); + a !== d[b] && + (a !== i ? (i = d[b] = a) : h(ja, (a = i = d[b]))); + return a; + }); + break; + case '&': + g = t(l[e]); + d[b] = function (a) { + return g(ja, a); + }; + break; + default: + throw Error( + 'Invalid isolate scope definition for directive ' + + K.name + + ': ' + + a + ); + } + }); + } + x && + n(x, function (a) { + var b = { $scope: d, $element: p, $attrs: l, $transclude: g }; + F = a.controller; + F == '@' && (F = l[a.name]); + p.data('$' + a.name + 'Controller', o(F, b)); + }); + i = 0; + for (r = m.length; i < r; i++) + try { + (D = m[i]), D(d, p, l, D.require && h(D.require, p)); + } catch (z) { + k(z, qa(p)); + } + a && a(d, e.childNodes, q, g); + i = 0; + for (r = s.length; i < r; i++) + try { + (D = s[i]), D(d, p, l, D.require && h(D.require, p)); + } catch (zc) { + k(zc, qa(p)); + } + } + for ( + var l = -Number.MAX_VALUE, + m = [], + s = [], + p = null, + K = null, + z = null, + D = (c.$$element = u(b)), + r, + G, + S, + ka, + R = d, + x, + w, + W, + v = 0, + y = a.length; + v < y; + v++ + ) { + r = a[v]; + S = q; + if (l > r.priority) break; + if ((W = r.scope)) + ua('isolated scope', K, r, D), + M(W) && (F(D, 'ng-isolate-scope'), (K = r)), + F(D, 'ng-scope'), + (p = p || r); + G = r.name; + if ((W = r.controller)) + (x = x || {}), + ua("'" + G + "' controller", x[G], r, D), + (x[G] = r); + if ((W = r.transclude)) + ua('transclusion', ka, r, D), + (ka = r), + (l = r.priority), + W == 'element' + ? ((S = u(b)), + (D = c.$$element = + u(Y.createComment(' ' + G + ': ' + c[G] + ' '))), + (b = D[0]), + C(e, u(S[0]), b), + (R = J(S, d, l))) + : ((S = u(cb(b)).contents()), D.html(''), (R = J(S, d))); + if ((W = r.template)) + if ((ua('template', z, r, D), (z = r), (W = Eb(W)), r.replace)) { + S = u('
' + O(W) + '
').contents(); + b = S[0]; + if (S.length != 1 || b.nodeType !== 1) throw Error(g + W); + C(e, D, b); + G = { $attr: {} }; + a = a.concat(V(b, a.splice(v + 1, a.length - (v + 1)), G)); + $(c, G); + y = a.length; + } else D.html(W); + if (r.templateUrl) + ua('template', z, r, D), + (z = r), + (j = P(a.splice(v, a.length - v), j, D, c, e, r.replace, R)), + (y = a.length); + else if (r.compile) + try { + (w = r.compile(D, c, R)), + H(w) ? i(null, w) : w && i(w.pre, w.post); + } catch (E) { + k(E, qa(D)); + } + if (r.terminal) (j.terminal = !0), (l = Math.max(l, r.priority)); + } + j.scope = p && p.scope; + j.transclude = ka && R; + return j; + } + function r(d, e, i, g) { + var h = !1; + if (a.hasOwnProperty(e)) + for (var l, e = b.get(e + c), o = 0, m = e.length; o < m; o++) + try { + if ( + ((l = e[o]), + (g === q || g > l.priority) && l.restrict.indexOf(i) != -1) + ) + d.push(l), (h = !0); + } catch (t) { + k(t); + } + return h; + } + function $(a, b) { + var c = b.$attr, + d = a.$attr, + e = a.$$element; + n(a, function (d, e) { + e.charAt(0) != '$' && + (b[e] && (d += (e === 'style' ? ';' : ' ') + b[e]), + a.$set(e, d, !0, c[e])); + }); + n(b, function (b, i) { + i == 'class' + ? (F(e, b), + (a['class'] = (a['class'] ? a['class'] + ' ' : '') + b)) + : i == 'style' + ? e.attr('style', e.attr('style') + ';' + b) + : i.charAt(0) != '$' && + !a.hasOwnProperty(i) && + ((a[i] = b), (d[i] = c[i])); + }); + } + function P(a, b, c, d, e, i, h) { + var j = [], + k, + o, + t = c[0], + s = a.shift(), + p = v({}, s, { + controller: null, + templateUrl: null, + transclude: null, + scope: null + }); + c.html(''); + m.get(s.templateUrl, { cache: l }) + .success(function (l) { + var m, + s, + l = Eb(l); + if (i) { + s = u('
' + O(l) + '
').contents(); + m = s[0]; + if (s.length != 1 || m.nodeType !== 1) throw Error(g + l); + l = { $attr: {} }; + C(e, c, m); + V(m, a, l); + $(d, l); + } else (m = t), c.html(l); + a.unshift(p); + k = K(a, m, d, h); + for (o = z(c.contents(), h); j.length; ) { + var ia = j.pop(), + l = j.pop(); + s = j.pop(); + var r = j.pop(), + D = m; + s !== t && ((D = cb(m)), C(l, u(s), D)); + k( + function () { + b(o, r, D, e, ia); + }, + r, + D, + e, + ia + ); + } + j = null; + }) + .error(function (a, b, c, d) { + throw Error('Failed to load template: ' + d.url); + }); + return function (a, c, d, e, i) { + j + ? (j.push(c), j.push(d), j.push(e), j.push(i)) + : k( + function () { + b(o, c, d, e, i); + }, + c, + d, + e, + i + ); + }; + } + function G(a, b) { + return b.priority - a.priority; + } + function ua(a, b, c, d) { + if (b) + throw Error( + 'Multiple directives [' + + b.name + + ', ' + + c.name + + '] asking for ' + + a + + ' on: ' + + qa(d) + ); + } + function x(a, b) { + var c = i(b, !0); + c && + a.push({ + priority: 0, + compile: I(function (a, b) { + var d = b.parent(), + e = d.data('$binding') || []; + e.push(c); + F(d.data('$binding', e), 'ng-binding'); + a.$watch(c, function (a) { + b[0].nodeValue = a; + }); + }) + }); + } + function R(a, b, c, d) { + var e = i(c, !0); + e && + b.push({ + priority: 100, + compile: I(function (a, b, c) { + b = c.$$observers || (c.$$observers = {}); + d === 'class' && (e = i(c[d], !0)); + c[d] = q; + (b[d] || (b[d] = [])).$$inter = !0; + ((c.$$observers && c.$$observers[d].$$scope) || a).$watch( + e, + function (a) { + c.$set(d, a); + } + ); + }) + }); + } + function C(a, b, c) { + var d = b[0], + e = d.parentNode, + i, + g; + if (a) { + i = 0; + for (g = a.length; i < g; i++) + if (a[i] == d) { + a[i] = c; + break; + } + } + e && e.replaceChild(c, d); + c[u.expando] = d[u.expando]; + b[0] = c; + } + var ia = function (a, b) { + this.$$element = a; + this.$attr = b || {}; + }; + ia.prototype = { + $normalize: ea, + $set: function (a, b, c, d) { + var e = zb(this.$$element[0], a), + i = this.$$observers; + e && (this.$$element.prop(a, b), (d = e)); + this[a] = b; + d + ? (this.$attr[a] = d) + : (d = this.$attr[a]) || (this.$attr[a] = d = Za(a, '-')); + if (fb(this.$$element[0]) === 'A' && a === 'href') + D.setAttribute('href', b), + (e = D.href), + e.match(h) || (this[a] = b = 'unsafe:' + e); + c !== !1 && + (b === null || b === q + ? this.$$element.removeAttr(d) + : this.$$element.attr(d, b)); + i && + n(i[a], function (a) { + try { + a(b); + } catch (c) { + k(c); + } + }); + }, + $observe: function (a, b) { + var c = this, + d = c.$$observers || (c.$$observers = {}), + e = d[a] || (d[a] = []); + e.push(b); + p.$evalAsync(function () { + e.$$inter || b(c[a]); + }); + return b; + } + }; + var D = s[0].createElement('a'), + S = i.startSymbol(), + ka = i.endSymbol(), + Eb = + S == '{{' || ka == '}}' + ? na + : function (a) { + return a.replace(/\{\{/g, S).replace(/}}/g, ka); + }; + return J; + } + ]; + } + function ea(b) { + return sb(b.replace(Ac, '')); + } + function Bc() { + var b = {}; + this.register = function (a, c) { + M(a) ? v(b, a) : (b[a] = c); + }; + this.$get = [ + '$injector', + '$window', + function (a, c) { + return function (d, e) { + if (A(d)) { + var g = d, + d = b.hasOwnProperty(g) + ? b[g] + : gb(e.$scope, g, !0) || gb(c, g, !0); + ra(d, g, !0); + } + return a.instantiate(d, e); + }; + } + ]; + } + function Cc() { + this.$get = [ + '$window', + function (b) { + return u(b.document); + } + ]; + } + function Dc() { + this.$get = [ + '$log', + function (b) { + return function (a, c) { + b.error.apply(b, arguments); + }; + } + ]; + } + function Ec() { + var b = '{{', + a = '}}'; + this.startSymbol = function (a) { + return a ? ((b = a), this) : b; + }; + this.endSymbol = function (b) { + return b ? ((a = b), this) : a; + }; + this.$get = [ + '$parse', + function (c) { + function d(d, f) { + for (var j, i, k = 0, m = [], l = d.length, t = !1, o = []; k < l; ) + (j = d.indexOf(b, k)) != -1 && (i = d.indexOf(a, j + e)) != -1 + ? (k != j && m.push(d.substring(k, j)), + m.push((k = c((t = d.substring(j + e, i))))), + (k.exp = t), + (k = i + g), + (t = !0)) + : (k != l && m.push(d.substring(k)), (k = l)); + if (!(l = m.length)) m.push(''), (l = 1); + if (!f || t) + return ( + (o.length = l), + (k = function (a) { + for (var b = 0, c = l, d; b < c; b++) { + if (typeof (d = m[b]) == 'function') + (d = d(a)), + d == null || d == q + ? (d = '') + : typeof d != 'string' && (d = da(d)); + o[b] = d; + } + return o.join(''); + }), + (k.exp = d), + (k.parts = m), + k + ); + } + var e = b.length, + g = a.length; + d.startSymbol = function () { + return b; + }; + d.endSymbol = function () { + return a; + }; + return d; + } + ]; + } + function Fb(b) { + for (var b = b.split('/'), a = b.length; a--; ) b[a] = Ya(b[a]); + return b.join('/'); + } + function wa(b, a) { + var c = Gb.exec(b), + c = { + protocol: c[1], + host: c[3], + port: E(c[5]) || Hb[c[1]] || null, + path: c[6] || '/', + search: c[8], + hash: c[10] + }; + if (a) + (a.$$protocol = c.protocol), (a.$$host = c.host), (a.$$port = c.port); + return c; + } + function la(b, a, c) { + return b + '://' + a + (c == Hb[b] ? '' : ':' + c); + } + function Fc(b, a, c) { + var d = wa(b); + return decodeURIComponent(d.path) != a || + w(d.hash) || + d.hash.indexOf(c) !== 0 + ? b + : la(d.protocol, d.host, d.port) + + a.substr(0, a.lastIndexOf('/')) + + d.hash.substr(c.length); + } + function Gc(b, a, c) { + var d = wa(b); + if (decodeURIComponent(d.path) == a) return b; + else { + var e = (d.search && '?' + d.search) || '', + g = (d.hash && '#' + d.hash) || '', + h = a.substr(0, a.lastIndexOf('/')), + f = d.path.substr(h.length); + if (d.path.indexOf(h) !== 0) + throw Error( + 'Invalid url "' + b + '", missing path prefix "' + h + '" !' + ); + return la(d.protocol, d.host, d.port) + a + '#' + c + f + e + g; + } + } + function hb(b, a, c) { + a = a || ''; + this.$$parse = function (b) { + var c = wa(b, this); + if (c.path.indexOf(a) !== 0) + throw Error( + 'Invalid url "' + b + '", missing path prefix "' + a + '" !' + ); + this.$$path = decodeURIComponent(c.path.substr(a.length)); + this.$$search = Wa(c.search); + this.$$hash = (c.hash && decodeURIComponent(c.hash)) || ''; + this.$$compose(); + }; + this.$$compose = function () { + var b = pb(this.$$search), + c = this.$$hash ? '#' + Ya(this.$$hash) : ''; + this.$$url = Fb(this.$$path) + (b ? '?' + b : '') + c; + this.$$absUrl = + la(this.$$protocol, this.$$host, this.$$port) + a + this.$$url; + }; + this.$$rewriteAppUrl = function (a) { + if (a.indexOf(c) == 0) return a; + }; + this.$$parse(b); + } + function Ha(b, a, c) { + var d; + this.$$parse = function (b) { + var c = wa(b, this); + if (c.hash && c.hash.indexOf(a) !== 0) + throw Error( + 'Invalid url "' + b + '", missing hash prefix "' + a + '" !' + ); + d = c.path + (c.search ? '?' + c.search : ''); + c = Hc.exec((c.hash || '').substr(a.length)); + this.$$path = c[1] + ? (c[1].charAt(0) == '/' ? '' : '/') + decodeURIComponent(c[1]) + : ''; + this.$$search = Wa(c[3]); + this.$$hash = (c[5] && decodeURIComponent(c[5])) || ''; + this.$$compose(); + }; + this.$$compose = function () { + var b = pb(this.$$search), + c = this.$$hash ? '#' + Ya(this.$$hash) : ''; + this.$$url = Fb(this.$$path) + (b ? '?' + b : '') + c; + this.$$absUrl = + la(this.$$protocol, this.$$host, this.$$port) + + d + + (this.$$url ? '#' + a + this.$$url : ''); + }; + this.$$rewriteAppUrl = function (a) { + if (a.indexOf(c) == 0) return a; + }; + this.$$parse(b); + } + function Ib(b, a, c, d) { + Ha.apply(this, arguments); + this.$$rewriteAppUrl = function (b) { + if (b.indexOf(c) == 0) return c + d + '#' + a + b.substr(c.length); + }; + } + function Ia(b) { + return function () { + return this[b]; + }; + } + function Jb(b, a) { + return function (c) { + if (w(c)) return this[b]; + this[b] = a(c); + this.$$compose(); + return this; + }; + } + function Ic() { + var b = '', + a = !1; + this.hashPrefix = function (a) { + return x(a) ? ((b = a), this) : b; + }; + this.html5Mode = function (b) { + return x(b) ? ((a = b), this) : a; + }; + this.$get = [ + '$rootScope', + '$browser', + '$sniffer', + '$rootElement', + function (c, d, e, g) { + function h(a) { + c.$broadcast('$locationChangeSuccess', f.absUrl(), a); + } + var f, + j, + i, + k = d.url(), + m = wa(k); + a + ? ((j = d.baseHref() || '/'), + (i = j.substr(0, j.lastIndexOf('/'))), + (m = la(m.protocol, m.host, m.port) + i + '/'), + (f = e.history + ? new hb(Fc(k, j, b), i, m) + : new Ib(Gc(k, j, b), b, m, j.substr(i.length + 1)))) + : ((m = + la(m.protocol, m.host, m.port) + + (m.path || '') + + (m.search ? '?' + m.search : '') + + '#' + + b + + '/'), + (f = new Ha(k, b, m))); + g.bind('click', function (a) { + if (!a.ctrlKey && !(a.metaKey || a.which == 2)) { + for (var b = u(a.target); y(b[0].nodeName) !== 'a'; ) + if (b[0] === g[0] || !(b = b.parent())[0]) return; + var d = b.prop('href'), + e = f.$$rewriteAppUrl(d); + d && + !b.attr('target') && + e && + (f.$$parse(e), + c.$apply(), + a.preventDefault(), + (X.angular['ff-684208-preventDefault'] = !0)); + } + }); + f.absUrl() != k && d.url(f.absUrl(), !0); + d.onUrlChange(function (a) { + f.absUrl() != a && + (c.$evalAsync(function () { + var b = f.absUrl(); + f.$$parse(a); + h(b); + }), + c.$$phase || c.$digest()); + }); + var l = 0; + c.$watch(function () { + var a = d.url(), + b = f.$$replace; + if (!l || a != f.absUrl()) + l++, + c.$evalAsync(function () { + c.$broadcast('$locationChangeStart', f.absUrl(), a) + .defaultPrevented + ? f.$$parse(a) + : (d.url(f.absUrl(), b), h(a)); + }); + f.$$replace = !1; + return l; + }); + return f; + } + ]; + } + function Jc() { + this.$get = [ + '$window', + function (b) { + function a(a) { + a instanceof Error && + (a.stack + ? (a = + a.message && a.stack.indexOf(a.message) === -1 + ? 'Error: ' + a.message + '\n' + a.stack + : a.stack) + : a.sourceURL && + (a = a.message + '\n' + a.sourceURL + ':' + a.line)); + return a; + } + function c(c) { + var e = b.console || {}, + g = e[c] || e.log || C; + return g.apply + ? function () { + var b = []; + n(arguments, function (c) { + b.push(a(c)); + }); + return g.apply(e, b); + } + : function (a, b) { + g(a, b); + }; + } + return { + log: c('log'), + warn: c('warn'), + info: c('info'), + error: c('error') + }; + } + ]; + } + function Kc(b, a) { + function c(a) { + return a.indexOf(s) != -1; + } + function d() { + return o + 1 < b.length ? b.charAt(o + 1) : !1; + } + function e(a) { + return '0' <= a && a <= '9'; + } + function g(a) { + return ( + a == ' ' || + a == '\r' || + a == '\t' || + a == '\n' || + a == '\u000b' || + a == '\u00a0' + ); + } + function h(a) { + return ( + ('a' <= a && a <= 'z') || ('A' <= a && a <= 'Z') || '_' == a || a == '$' + ); + } + function f(a) { + return a == '-' || a == '+' || e(a); + } + function j(a, c, d) { + d = d || o; + throw Error( + 'Lexer Error: ' + + a + + ' at column' + + (x(c) + ? 's ' + c + '-' + o + ' [' + b.substring(c, d) + ']' + : ' ' + d) + + ' in expression [' + + b + + '].' + ); + } + function i() { + for (var a = '', c = o; o < b.length; ) { + var i = y(b.charAt(o)); + if (i == '.' || e(i)) a += i; + else { + var g = d(); + if (i == 'e' && f(g)) a += i; + else if (f(i) && g && e(g) && a.charAt(a.length - 1) == 'e') a += i; + else if (f(i) && (!g || !e(g)) && a.charAt(a.length - 1) == 'e') + j('Invalid exponent'); + else break; + } + o++; + } + a *= 1; + l.push({ + index: c, + text: a, + json: !0, + fn: function () { + return a; + } + }); + } + function k() { + for (var c = '', d = o, f, i, j; o < b.length; ) { + var k = b.charAt(o); + if (k == '.' || h(k) || e(k)) k == '.' && (f = o), (c += k); + else break; + o++; + } + if (f) + for (i = o; i < b.length; ) { + k = b.charAt(i); + if (k == '(') { + j = c.substr(f - d + 1); + c = c.substr(0, f - d); + o = i; + break; + } + if (g(k)) i++; + else break; + } + d = { index: d, text: c }; + if (Ja.hasOwnProperty(c)) d.fn = d.json = Ja[c]; + else { + var m = Kb(c, a); + d.fn = v( + function (a, b) { + return m(a, b); + }, + { + assign: function (a, b) { + return Lb(a, c, b); + } + } + ); + } + l.push(d); + j && + (l.push({ index: f, text: '.', json: !1 }), + l.push({ index: f + 1, text: j, json: !1 })); + } + function m(a) { + var c = o; + o++; + for (var d = '', e = a, f = !1; o < b.length; ) { + var i = b.charAt(o); + e += i; + if (f) + i == 'u' + ? ((i = b.substring(o + 1, o + 5)), + i.match(/[\da-f]{4}/i) || + j('Invalid unicode escape [\\u' + i + ']'), + (o += 4), + (d += String.fromCharCode(parseInt(i, 16)))) + : ((f = Lc[i]), (d += f ? f : i)), + (f = !1); + else if (i == '\\') f = !0; + else if (i == a) { + o++; + l.push({ + index: c, + text: e, + string: d, + json: !0, + fn: function () { + return d; + } + }); + return; + } else d += i; + o++; + } + j('Unterminated quote', c); + } + for (var l = [], t, o = 0, p = [], s, J = ':'; o < b.length; ) { + s = b.charAt(o); + if (c('"\'')) m(s); + else if (e(s) || (c('.') && e(d()))) i(); + else if (h(s)) { + if ( + (k(), '{,'.indexOf(J) != -1 && p[0] == '{' && (t = l[l.length - 1])) + ) + t.json = t.text.indexOf('.') == -1; + } else if (c('(){}[].,;:')) + l.push({ + index: o, + text: s, + json: (':[,'.indexOf(J) != -1 && c('{[')) || c('}]:,') + }), + c('{[') && p.unshift(s), + c('}]') && p.shift(), + o++; + else if (g(s)) { + o++; + continue; + } else { + var n = s + d(), + z = Ja[s], + V = Ja[n]; + V + ? (l.push({ index: o, text: n, fn: V }), (o += 2)) + : z + ? (l.push({ + index: o, + text: s, + fn: z, + json: '[,:'.indexOf(J) != -1 && c('+-') + }), + (o += 1)) + : j('Unexpected next character ', o, o + 1); + } + J = s; + } + return l; + } + function Mc(b, a, c, d) { + function e(a, c) { + throw Error( + "Syntax Error: Token '" + + c.text + + "' " + + a + + ' at column ' + + (c.index + 1) + + ' of the expression [' + + b + + '] starting at [' + + b.substring(c.index) + + '].' + ); + } + function g() { + if (P.length === 0) throw Error('Unexpected end of expression: ' + b); + return P[0]; + } + function h(a, b, c, d) { + if (P.length > 0) { + var e = P[0], + f = e.text; + if (f == a || f == b || f == c || f == d || (!a && !b && !c && !d)) + return e; + } + return !1; + } + function f(b, c, d, f) { + return (b = h(b, c, d, f)) + ? (a && !b.json && e('is not valid json', b), P.shift(), b) + : !1; + } + function j(a) { + f(a) || e('is unexpected, expecting [' + a + ']', h()); + } + function i(a, b) { + return function (c, d) { + return a(c, d, b); + }; + } + function k(a, b, c) { + return function (d, e) { + return b(d, e, a, c); + }; + } + function m() { + for (var a = []; ; ) + if ((P.length > 0 && !h('}', ')', ';', ']') && a.push(w()), !f(';'))) + return a.length == 1 + ? a[0] + : function (b, c) { + for (var d, e = 0; e < a.length; e++) { + var f = a[e]; + f && (d = f(b, c)); + } + return d; + }; + } + function l() { + for (var a = f(), b = c(a.text), d = []; ; ) + if ((a = f(':'))) d.push(G()); + else { + var e = function (a, c, e) { + for (var e = [e], f = 0; f < d.length; f++) e.push(d[f](a, c)); + return b.apply(a, e); + }; + return function () { + return e; + }; + } + } + function t() { + for (var a = o(), b; ; ) + if ((b = f('||'))) a = k(a, b.fn, o()); + else return a; + } + function o() { + var a = p(), + b; + if ((b = f('&&'))) a = k(a, b.fn, o()); + return a; + } + function p() { + var a = s(), + b; + if ((b = f('==', '!='))) a = k(a, b.fn, p()); + return a; + } + function s() { + var a; + a = J(); + for (var b; (b = f('+', '-')); ) a = k(a, b.fn, J()); + if ((b = f('<', '>', '<=', '>='))) a = k(a, b.fn, s()); + return a; + } + function J() { + for (var a = n(), b; (b = f('*', '/', '%')); ) a = k(a, b.fn, n()); + return a; + } + function n() { + var a; + return f('+') + ? z() + : (a = f('-')) + ? k(r, a.fn, n()) + : (a = f('!')) + ? i(a.fn, n()) + : z(); + } + function z() { + var a; + if (f('(')) (a = w()), j(')'); + else if (f('[')) a = V(); + else if (f('{')) a = K(); + else { + var b = f(); + (a = b.fn) || e('not a primary expression', b); + } + for (var c; (b = f('(', '[', '.')); ) + b.text === '(' + ? ((a = x(a, c)), (c = null)) + : b.text === '[' + ? ((c = a), (a = R(a))) + : b.text === '.' + ? ((c = a), (a = u(a))) + : e('IMPOSSIBLE'); + return a; + } + function V() { + var a = []; + if (g().text != ']') { + do a.push(G()); + while (f(',')); + } + j(']'); + return function (b, c) { + for (var d = [], e = 0; e < a.length; e++) d.push(a[e](b, c)); + return d; + }; + } + function K() { + var a = []; + if (g().text != '}') { + do { + var b = f(), + b = b.string || b.text; + j(':'); + var c = G(); + a.push({ key: b, value: c }); + } while (f(',')); + } + j('}'); + return function (b, c) { + for (var d = {}, e = 0; e < a.length; e++) { + var f = a[e], + i = f.value(b, c); + d[f.key] = i; + } + return d; + }; + } + var r = I(0), + $, + P = Kc(b, d), + G = function () { + var a = t(), + c, + d; + return (d = f('=')) + ? (a.assign || + e( + 'implies assignment but [' + + b.substring(0, d.index) + + '] can not be assigned to', + d + ), + (c = t()), + function (b, d) { + return a.assign(b, c(b, d), d); + }) + : a; + }, + x = function (a, b) { + var c = []; + if (g().text != ')') { + do c.push(G()); + while (f(',')); + } + j(')'); + return function (d, e) { + for (var f = [], i = b ? b(d, e) : d, g = 0; g < c.length; g++) + f.push(c[g](d, e)); + g = a(d, e) || C; + return g.apply ? g.apply(i, f) : g(f[0], f[1], f[2], f[3], f[4]); + }; + }, + u = function (a) { + var b = f().text, + c = Kb(b, d); + return v( + function (b, d) { + return c(a(b, d), d); + }, + { + assign: function (c, d, e) { + return Lb(a(c, e), b, d); + } + } + ); + }, + R = function (a) { + var b = G(); + j(']'); + return v( + function (c, d) { + var e = a(c, d), + f = b(c, d), + i; + if (!e) return q; + if ((e = e[f]) && e.then) { + i = e; + if (!('$$v' in e)) + (i.$$v = q), + i.then(function (a) { + i.$$v = a; + }); + e = e.$$v; + } + return e; + }, + { + assign: function (c, d, e) { + return (a(c, e)[b(c, e)] = d); + } + } + ); + }, + w = function () { + for (var a = G(), b; ; ) + if ((b = f('|'))) a = k(a, b.fn, l()); + else return a; + }; + a + ? ((G = t), + (x = + u = + R = + w = + function () { + e('is not valid json', { text: b, index: 0 }); + }), + ($ = z())) + : ($ = m()); + P.length !== 0 && e('is an unexpected token', P[0]); + return $; + } + function Lb(b, a, c) { + for (var a = a.split('.'), d = 0; a.length > 1; d++) { + var e = a.shift(), + g = b[e]; + g || ((g = {}), (b[e] = g)); + b = g; + } + return (b[a.shift()] = c); + } + function gb(b, a, c) { + if (!a) return b; + for (var a = a.split('.'), d, e = b, g = a.length, h = 0; h < g; h++) + (d = a[h]), b && (b = (e = b)[d]); + return !c && H(b) ? Ua(e, b) : b; + } + function Mb(b, a, c, d, e) { + return function (g, h) { + var f = h && h.hasOwnProperty(b) ? h : g, + j; + if (f === null || f === q) return f; + if ((f = f[b]) && f.then) { + if (!('$$v' in f)) + (j = f), + (j.$$v = q), + j.then(function (a) { + j.$$v = a; + }); + f = f.$$v; + } + if (!a || f === null || f === q) return f; + if ((f = f[a]) && f.then) { + if (!('$$v' in f)) + (j = f), + (j.$$v = q), + j.then(function (a) { + j.$$v = a; + }); + f = f.$$v; + } + if (!c || f === null || f === q) return f; + if ((f = f[c]) && f.then) { + if (!('$$v' in f)) + (j = f), + (j.$$v = q), + j.then(function (a) { + j.$$v = a; + }); + f = f.$$v; + } + if (!d || f === null || f === q) return f; + if ((f = f[d]) && f.then) { + if (!('$$v' in f)) + (j = f), + (j.$$v = q), + j.then(function (a) { + j.$$v = a; + }); + f = f.$$v; + } + if (!e || f === null || f === q) return f; + if ((f = f[e]) && f.then) { + if (!('$$v' in f)) + (j = f), + (j.$$v = q), + j.then(function (a) { + j.$$v = a; + }); + f = f.$$v; + } + return f; + }; + } + function Kb(b, a) { + if (ib.hasOwnProperty(b)) return ib[b]; + var c = b.split('.'), + d = c.length, + e; + if (a) + e = + d < 6 + ? Mb(c[0], c[1], c[2], c[3], c[4]) + : function (a, b) { + var e = 0, + i; + do + (i = Mb(c[e++], c[e++], c[e++], c[e++], c[e++])(a, b)), + (b = q), + (a = i); + while (e < d); + return i; + }; + else { + var g = 'var l, fn, p;\n'; + n(c, function (a, b) { + g += + 'if(s === null || s === undefined) return s;\nl=s;\ns=' + + (b ? 's' : '((k&&k.hasOwnProperty("' + a + '"))?k:s)') + + '["' + + a + + '"];\nif (s && s.then) {\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n'; + }); + g += 'return s;'; + e = Function('s', 'k', g); + e.toString = function () { + return g; + }; + } + return (ib[b] = e); + } + function Nc() { + var b = {}; + this.$get = [ + '$filter', + '$sniffer', + function (a, c) { + return function (d) { + switch (typeof d) { + case 'string': + return b.hasOwnProperty(d) ? b[d] : (b[d] = Mc(d, !1, a, c.csp)); + case 'function': + return d; + default: + return C; + } + }; + } + ]; + } + function Oc() { + this.$get = [ + '$rootScope', + '$exceptionHandler', + function (b, a) { + return Pc(function (a) { + b.$evalAsync(a); + }, a); + } + ]; + } + function Pc(b, a) { + function c(a) { + return a; + } + function d(a) { + return h(a); + } + var e = function () { + var f = [], + j, + i; + return (i = { + resolve: function (a) { + if (f) { + var c = f; + f = q; + j = g(a); + c.length && + b(function () { + for (var a, b = 0, d = c.length; b < d; b++) + (a = c[b]), j.then(a[0], a[1]); + }); + } + }, + reject: function (a) { + i.resolve(h(a)); + }, + promise: { + then: function (b, i) { + var g = e(), + h = function (d) { + try { + g.resolve((b || c)(d)); + } catch (e) { + a(e), g.reject(e); + } + }, + o = function (b) { + try { + g.resolve((i || d)(b)); + } catch (c) { + a(c), g.reject(c); + } + }; + f ? f.push([h, o]) : j.then(h, o); + return g.promise; + } + } + }); + }, + g = function (a) { + return a && a.then + ? a + : { + then: function (c) { + var d = e(); + b(function () { + d.resolve(c(a)); + }); + return d.promise; + } + }; + }, + h = function (a) { + return { + then: function (c, i) { + var g = e(); + b(function () { + g.resolve((i || d)(a)); + }); + return g.promise; + } + }; + }; + return { + defer: e, + reject: h, + when: function (f, j, i) { + var k = e(), + m, + l = function (b) { + try { + return (j || c)(b); + } catch (d) { + return a(d), h(d); + } + }, + t = function (b) { + try { + return (i || d)(b); + } catch (c) { + return a(c), h(c); + } + }; + b(function () { + g(f).then( + function (a) { + m || ((m = !0), k.resolve(g(a).then(l, t))); + }, + function (a) { + m || ((m = !0), k.resolve(t(a))); + } + ); + }); + return k.promise; + }, + all: function (a) { + var b = e(), + c = a.length, + d = []; + c + ? n(a, function (a, e) { + g(a).then( + function (a) { + e in d || ((d[e] = a), --c || b.resolve(d)); + }, + function (a) { + e in d || b.reject(a); + } + ); + }) + : b.resolve(d); + return b.promise; + } + }; + } + function Qc() { + var b = {}; + this.when = function (a, c) { + b[a] = v({ reloadOnSearch: !0 }, c); + if (a) { + var d = a[a.length - 1] == '/' ? a.substr(0, a.length - 1) : a + '/'; + b[d] = { redirectTo: a }; + } + return this; + }; + this.otherwise = function (a) { + this.when(null, a); + return this; + }; + this.$get = [ + '$rootScope', + '$location', + '$routeParams', + '$q', + '$injector', + '$http', + '$templateCache', + function (a, c, d, e, g, h, f) { + function j(a, b) { + for ( + var b = '^' + b.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + '$', + c = '', + d = [], + e = {}, + f = /:(\w+)/g, + i, + g = 0; + (i = f.exec(b)) !== null; + + ) + (c += b.slice(g, i.index)), + (c += '([^\\/]*)'), + d.push(i[1]), + (g = f.lastIndex); + c += b.substr(g); + var h = a.match(RegExp(c)); + h && + n(d, function (a, b) { + e[a] = h[b + 1]; + }); + return h ? e : null; + } + function i() { + var b = k(), + i = t.current; + if ( + b && + i && + b.$route === i.$route && + ga(b.pathParams, i.pathParams) && + !b.reloadOnSearch && + !l + ) + (i.params = b.params), + U(i.params, d), + a.$broadcast('$routeUpdate', i); + else if (b || i) + (l = !1), + a.$broadcast('$routeChangeStart', b, i), + (t.current = b) && + b.redirectTo && + (A(b.redirectTo) + ? c.path(m(b.redirectTo, b.params)).search(b.params).replace() + : c + .url(b.redirectTo(b.pathParams, c.path(), c.search())) + .replace()), + e + .when(b) + .then(function () { + if (b) { + var a = [], + c = [], + d; + n(b.resolve || {}, function (b, d) { + a.push(d); + c.push(A(b) ? g.get(b) : g.invoke(b)); + }); + if (!x((d = b.template))) + if (x((d = b.templateUrl))) + d = h.get(d, { cache: f }).then(function (a) { + return a.data; + }); + x(d) && (a.push('$template'), c.push(d)); + return e.all(c).then(function (b) { + var c = {}; + n(b, function (b, d) { + c[a[d]] = b; + }); + return c; + }); + } + }) + .then( + function (c) { + if (b == t.current) { + if (b) (b.locals = c), U(b.params, d); + a.$broadcast('$routeChangeSuccess', b, i); + } + }, + function (c) { + b == t.current && + a.$broadcast('$routeChangeError', b, i, c); + } + ); + } + function k() { + var a, d; + n(b, function (b, e) { + if (!d && (a = j(c.path(), e))) + (d = za(b, { params: v({}, c.search(), a), pathParams: a })), + (d.$route = b); + }); + return d || (b[null] && za(b[null], { params: {}, pathParams: {} })); + } + function m(a, b) { + var c = []; + n((a || '').split(':'), function (a, d) { + if (d == 0) c.push(a); + else { + var e = a.match(/(\w+)(.*)/), + f = e[1]; + c.push(b[f]); + c.push(e[2] || ''); + delete b[f]; + } + }); + return c.join(''); + } + var l = !1, + t = { + routes: b, + reload: function () { + l = !0; + a.$evalAsync(i); + } + }; + a.$on('$locationChangeSuccess', i); + return t; + } + ]; + } + function Rc() { + this.$get = I({}); + } + function Sc() { + var b = 10; + this.digestTtl = function (a) { + arguments.length && (b = a); + return b; + }; + this.$get = [ + '$injector', + '$exceptionHandler', + '$parse', + function (a, c, d) { + function e() { + this.$id = ya(); + this.$$phase = + this.$parent = + this.$$watchers = + this.$$nextSibling = + this.$$prevSibling = + this.$$childHead = + this.$$childTail = + null; + this['this'] = this.$root = this; + this.$$destroyed = !1; + this.$$asyncQueue = []; + this.$$listeners = {}; + this.$$isolateBindings = {}; + } + function g(a) { + if (j.$$phase) throw Error(j.$$phase + ' already in progress'); + j.$$phase = a; + } + function h(a, b) { + var c = d(a); + ra(c, b); + return c; + } + function f() {} + e.prototype = { + $new: function (a) { + if (H(a)) + throw Error( + 'API-CHANGE: Use $controller to instantiate controllers.' + ); + a + ? ((a = new e()), (a.$root = this.$root)) + : ((a = function () {}), + (a.prototype = this), + (a = new a()), + (a.$id = ya())); + a['this'] = a; + a.$$listeners = {}; + a.$parent = this; + a.$$asyncQueue = []; + a.$$watchers = + a.$$nextSibling = + a.$$childHead = + a.$$childTail = + null; + a.$$prevSibling = this.$$childTail; + this.$$childHead + ? (this.$$childTail = this.$$childTail.$$nextSibling = a) + : (this.$$childHead = this.$$childTail = a); + return a; + }, + $watch: function (a, b, c) { + var d = h(a, 'watch'), + e = this.$$watchers, + g = { fn: b, last: f, get: d, exp: a, eq: !!c }; + if (!H(b)) { + var j = h(b || C, 'listener'); + g.fn = function (a, b, c) { + j(c); + }; + } + if (!e) e = this.$$watchers = []; + e.unshift(g); + return function () { + Ta(e, g); + }; + }, + $digest: function () { + var a, + d, + e, + h, + t, + o, + p, + s = b, + n, + F = [], + z, + q; + g('$digest'); + do { + p = !1; + n = this; + do { + for (t = n.$$asyncQueue; t.length; ) + try { + n.$eval(t.shift()); + } catch (K) { + c(K); + } + if ((h = n.$$watchers)) + for (o = h.length; o--; ) + try { + if ( + ((a = h[o]), + (d = a.get(n)) !== (e = a.last) && + !(a.eq + ? ga(d, e) + : typeof d == 'number' && + typeof e == 'number' && + isNaN(d) && + isNaN(e))) + ) + (p = !0), + (a.last = a.eq ? U(d) : d), + a.fn(d, e === f ? d : e, n), + s < 5 && + ((z = 4 - s), + F[z] || (F[z] = []), + (q = H(a.exp) + ? 'fn: ' + (a.exp.name || a.exp.toString()) + : a.exp), + (q += '; newVal: ' + da(d) + '; oldVal: ' + da(e)), + F[z].push(q)); + } catch (r) { + c(r); + } + if (!(h = n.$$childHead || (n !== this && n.$$nextSibling))) + for (; n !== this && !(h = n.$$nextSibling); ) n = n.$parent; + } while ((n = h)); + if (p && !s--) + throw ( + ((j.$$phase = null), + Error( + b + + ' $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: ' + + da(F) + )) + ); + } while (p || t.length); + j.$$phase = null; + }, + $destroy: function () { + if (!(j == this || this.$$destroyed)) { + var a = this.$parent; + this.$broadcast('$destroy'); + this.$$destroyed = !0; + if (a.$$childHead == this) a.$$childHead = this.$$nextSibling; + if (a.$$childTail == this) a.$$childTail = this.$$prevSibling; + if (this.$$prevSibling) + this.$$prevSibling.$$nextSibling = this.$$nextSibling; + if (this.$$nextSibling) + this.$$nextSibling.$$prevSibling = this.$$prevSibling; + this.$parent = + this.$$nextSibling = + this.$$prevSibling = + this.$$childHead = + this.$$childTail = + null; + } + }, + $eval: function (a, b) { + return d(a)(this, b); + }, + $evalAsync: function (a) { + this.$$asyncQueue.push(a); + }, + $apply: function (a) { + try { + return g('$apply'), this.$eval(a); + } catch (b) { + c(b); + } finally { + j.$$phase = null; + try { + j.$digest(); + } catch (d) { + throw (c(d), d); + } + } + }, + $on: function (a, b) { + var c = this.$$listeners[a]; + c || (this.$$listeners[a] = c = []); + c.push(b); + return function () { + c[Aa(c, b)] = null; + }; + }, + $emit: function (a, b) { + var d = [], + e, + f = this, + g = !1, + h = { + name: a, + targetScope: f, + stopPropagation: function () { + g = !0; + }, + preventDefault: function () { + h.defaultPrevented = !0; + }, + defaultPrevented: !1 + }, + j = [h].concat(ha.call(arguments, 1)), + n, + q; + do { + e = f.$$listeners[a] || d; + h.currentScope = f; + n = 0; + for (q = e.length; n < q; n++) + if (e[n]) + try { + if ((e[n].apply(null, j), g)) return h; + } catch (z) { + c(z); + } + else e.splice(n, 1), n--, q--; + f = f.$parent; + } while (f); + return h; + }, + $broadcast: function (a, b) { + var d = this, + e = this, + f = { + name: a, + targetScope: this, + preventDefault: function () { + f.defaultPrevented = !0; + }, + defaultPrevented: !1 + }, + g = [f].concat(ha.call(arguments, 1)), + h, + j; + do { + d = e; + f.currentScope = d; + e = d.$$listeners[a] || []; + h = 0; + for (j = e.length; h < j; h++) + if (e[h]) + try { + e[h].apply(null, g); + } catch (n) { + c(n); + } + else e.splice(h, 1), h--, j--; + if (!(e = d.$$childHead || (d !== this && d.$$nextSibling))) + for (; d !== this && !(e = d.$$nextSibling); ) d = d.$parent; + } while ((d = e)); + return f; + } + }; + var j = new e(); + return j; + } + ]; + } + function Tc() { + this.$get = [ + '$window', + function (b) { + var a = {}, + c = E((/android (\d+)/.exec(y(b.navigator.userAgent)) || [])[1]); + return { + history: !(!b.history || !b.history.pushState || c < 4), + hashchange: + 'onhashchange' in b && + (!b.document.documentMode || b.document.documentMode > 7), + hasEvent: function (c) { + if (c == 'input' && Z == 9) return !1; + if (w(a[c])) { + var e = b.document.createElement('div'); + a[c] = 'on' + c in e; + } + return a[c]; + }, + csp: !1 + }; + } + ]; + } + function Uc() { + this.$get = I(X); + } + function Nb(b) { + var a = {}, + c, + d, + e; + if (!b) return a; + n(b.split('\n'), function (b) { + e = b.indexOf(':'); + c = y(O(b.substr(0, e))); + d = O(b.substr(e + 1)); + c && (a[c] ? (a[c] += ', ' + d) : (a[c] = d)); + }); + return a; + } + function Ob(b) { + var a = M(b) ? b : q; + return function (c) { + a || (a = Nb(b)); + return c ? a[y(c)] || null : a; + }; + } + function Pb(b, a, c) { + if (H(c)) return c(b, a); + n(c, function (c) { + b = c(b, a); + }); + return b; + } + function Vc() { + var b = /^\s*(\[|\{[^\{])/, + a = /[\}\]]\s*$/, + c = /^\)\]\}',?\n/, + d = (this.defaults = { + transformResponse: [ + function (d) { + A(d) && + ((d = d.replace(c, '')), + b.test(d) && a.test(d) && (d = ob(d, !0))); + return d; + } + ], + transformRequest: [ + function (a) { + return M(a) && xa.apply(a) !== '[object File]' ? da(a) : a; + } + ], + headers: { + common: { + Accept: 'application/json, text/plain, */*', + 'X-Requested-With': 'XMLHttpRequest' + }, + post: { 'Content-Type': 'application/json;charset=utf-8' }, + put: { 'Content-Type': 'application/json;charset=utf-8' } + } + }), + e = (this.responseInterceptors = []); + this.$get = [ + '$httpBackend', + '$browser', + '$cacheFactory', + '$rootScope', + '$q', + '$injector', + function (a, b, c, j, i, k) { + function m(a) { + function c(a) { + var b = v({}, a, { data: Pb(a.data, a.headers, f) }); + return 200 <= a.status && a.status < 300 ? b : i.reject(b); + } + a.method = ma(a.method); + var e = a.transformRequest || d.transformRequest, + f = a.transformResponse || d.transformResponse, + g = d.headers, + g = v( + { 'X-XSRF-TOKEN': b.cookies()['XSRF-TOKEN'] }, + g.common, + g[y(a.method)], + a.headers + ), + e = Pb(a.data, Ob(g), e), + j; + w(a.data) && delete g['Content-Type']; + j = l(a, e, g); + j = j.then(c, c); + n(p, function (a) { + j = a(j); + }); + j.success = function (b) { + j.then(function (c) { + b(c.data, c.status, c.headers, a); + }); + return j; + }; + j.error = function (b) { + j.then(null, function (c) { + b(c.data, c.status, c.headers, a); + }); + return j; + }; + return j; + } + function l(b, c, d) { + function e(a, b, c) { + n && (200 <= a && a < 300 ? n.put(q, [a, b, Nb(c)]) : n.remove(q)); + f(b, a, c); + j.$apply(); + } + function f(a, c, d) { + c = Math.max(c, 0); + (200 <= c && c < 300 ? k.resolve : k.reject)({ + data: a, + status: c, + headers: Ob(d), + config: b + }); + } + function h() { + var a = Aa(m.pendingRequests, b); + a !== -1 && m.pendingRequests.splice(a, 1); + } + var k = i.defer(), + l = k.promise, + n, + p, + q = t(b.url, b.params); + m.pendingRequests.push(b); + l.then(h, h); + b.cache && b.method == 'GET' && (n = M(b.cache) ? b.cache : o); + if (n) + if ((p = n.get(q))) + if (p.then) return p.then(h, h), p; + else B(p) ? f(p[1], p[0], U(p[2])) : f(p, 200, {}); + else n.put(q, l); + p || a(b.method, q, c, e, d, b.timeout, b.withCredentials); + return l; + } + function t(a, b) { + if (!b) return a; + var c = []; + fc(b, function (a, b) { + a == null || + a == q || + (M(a) && (a = da(a)), + c.push(encodeURIComponent(b) + '=' + encodeURIComponent(a))); + }); + return a + (a.indexOf('?') == -1 ? '?' : '&') + c.join('&'); + } + var o = c('$http'), + p = []; + n(e, function (a) { + p.push(A(a) ? k.get(a) : k.invoke(a)); + }); + m.pendingRequests = []; + (function (a) { + n(arguments, function (a) { + m[a] = function (b, c) { + return m(v(c || {}, { method: a, url: b })); + }; + }); + })('get', 'delete', 'head', 'jsonp'); + (function (a) { + n(arguments, function (a) { + m[a] = function (b, c, d) { + return m(v(d || {}, { method: a, url: b, data: c })); + }; + }); + })('post', 'put'); + m.defaults = d; + return m; + } + ]; + } + function Wc() { + this.$get = [ + '$browser', + '$window', + '$document', + function (b, a, c) { + return Xc( + b, + Yc, + b.defer, + a.angular.callbacks, + c[0], + a.location.protocol.replace(':', '') + ); + } + ]; + } + function Xc(b, a, c, d, e, g) { + function h(a, b) { + var c = e.createElement('script'), + d = function () { + e.body.removeChild(c); + b && b(); + }; + c.type = 'text/javascript'; + c.src = a; + Z + ? (c.onreadystatechange = function () { + /loaded|complete/.test(c.readyState) && d(); + }) + : (c.onload = c.onerror = d); + e.body.appendChild(c); + } + return function (e, j, i, k, m, l, t) { + function o(a, c, d, e) { + c = (j.match(Gb) || ['', g])[1] == 'file' ? (d ? 200 : 404) : c; + a(c == 1223 ? 204 : c, d, e); + b.$$completeOutstandingRequest(C); + } + b.$$incOutstandingRequestCount(); + j = j || b.url(); + if (y(e) == 'jsonp') { + var p = '_' + (d.counter++).toString(36); + d[p] = function (a) { + d[p].data = a; + }; + h(j.replace('JSON_CALLBACK', 'angular.callbacks.' + p), function () { + d[p].data ? o(k, 200, d[p].data) : o(k, -2); + delete d[p]; + }); + } else { + var s = new a(); + s.open(e, j, !0); + n(m, function (a, b) { + a && s.setRequestHeader(b, a); + }); + var q; + s.onreadystatechange = function () { + if (s.readyState == 4) { + var a = s.getAllResponseHeaders(), + b = [ + 'Cache-Control', + 'Content-Language', + 'Content-Type', + 'Expires', + 'Last-Modified', + 'Pragma' + ]; + a || + ((a = ''), + n(b, function (b) { + var c = s.getResponseHeader(b); + c && (a += b + ': ' + c + '\n'); + })); + o(k, q || s.status, s.responseText, a); + } + }; + if (t) s.withCredentials = !0; + s.send(i || ''); + l > 0 && + c(function () { + q = -1; + s.abort(); + }, l); + } + }; + } + function Zc() { + this.$get = function () { + return { + id: 'en-us', + NUMBER_FORMATS: { + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PATTERNS: [ + { + minInt: 1, + minFrac: 0, + maxFrac: 3, + posPre: '', + posSuf: '', + negPre: '-', + negSuf: '', + gSize: 3, + lgSize: 3 + }, + { + minInt: 1, + minFrac: 2, + maxFrac: 2, + posPre: '\u00a4', + posSuf: '', + negPre: '(\u00a4', + negSuf: ')', + gSize: 3, + lgSize: 3 + } + ], + CURRENCY_SYM: '$' + }, + DATETIME_FORMATS: { + MONTH: + 'January,February,March,April,May,June,July,August,September,October,November,December'.split( + ',' + ), + SHORTMONTH: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split( + ',' + ), + DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split( + ',' + ), + SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','), + AMPMS: ['AM', 'PM'], + medium: 'MMM d, y h:mm:ss a', + short: 'M/d/yy h:mm a', + fullDate: 'EEEE, MMMM d, y', + longDate: 'MMMM d, y', + mediumDate: 'MMM d, y', + shortDate: 'M/d/yy', + mediumTime: 'h:mm:ss a', + shortTime: 'h:mm a' + }, + pluralCat: function (b) { + return b === 1 ? 'one' : 'other'; + } + }; + }; + } + function $c() { + this.$get = [ + '$rootScope', + '$browser', + '$q', + '$exceptionHandler', + function (b, a, c, d) { + function e(e, f, j) { + var i = c.defer(), + k = i.promise, + m = x(j) && !j, + f = a.defer(function () { + try { + i.resolve(e()); + } catch (a) { + i.reject(a), d(a); + } + m || b.$apply(); + }, f), + j = function () { + delete g[k.$$timeoutId]; + }; + k.$$timeoutId = f; + g[f] = i; + k.then(j, j); + return k; + } + var g = {}; + e.cancel = function (b) { + return b && b.$$timeoutId in g + ? (g[b.$$timeoutId].reject('canceled'), + a.defer.cancel(b.$$timeoutId)) + : !1; + }; + return e; + } + ]; + } + function Qb(b) { + function a(a, e) { + return b.factory(a + c, e); + } + var c = 'Filter'; + this.register = a; + this.$get = [ + '$injector', + function (a) { + return function (b) { + return a.get(b + c); + }; + } + ]; + a('currency', Rb); + a('date', Sb); + a('filter', ad); + a('json', bd); + a('limitTo', cd); + a('lowercase', dd); + a('number', Tb); + a('orderBy', Ub); + a('uppercase', ed); + } + function ad() { + return function (b, a) { + if (!B(b)) return b; + var c = []; + c.check = function (a) { + for (var b = 0; b < c.length; b++) if (!c[b](a)) return !1; + return !0; + }; + var d = function (a, b) { + if (b.charAt(0) === '!') return !d(a, b.substr(1)); + switch (typeof a) { + case 'boolean': + case 'number': + case 'string': + return ('' + a).toLowerCase().indexOf(b) > -1; + case 'object': + for (var c in a) if (c.charAt(0) !== '$' && d(a[c], b)) return !0; + return !1; + case 'array': + for (c = 0; c < a.length; c++) if (d(a[c], b)) return !0; + return !1; + default: + return !1; + } + }; + switch (typeof a) { + case 'boolean': + case 'number': + case 'string': + a = { $: a }; + case 'object': + for (var e in a) + e == '$' + ? (function () { + var b = ('' + a[e]).toLowerCase(); + b && + c.push(function (a) { + return d(a, b); + }); + })() + : (function () { + var b = e, + f = ('' + a[e]).toLowerCase(); + f && + c.push(function (a) { + return d(gb(a, b), f); + }); + })(); + break; + case 'function': + c.push(a); + break; + default: + return b; + } + for (var g = [], h = 0; h < b.length; h++) { + var f = b[h]; + c.check(f) && g.push(f); + } + return g; + }; + } + function Rb(b) { + var a = b.NUMBER_FORMATS; + return function (b, d) { + if (w(d)) d = a.CURRENCY_SYM; + return Vb(b, a.PATTERNS[1], a.GROUP_SEP, a.DECIMAL_SEP, 2).replace( + /\u00A4/g, + d + ); + }; + } + function Tb(b) { + var a = b.NUMBER_FORMATS; + return function (b, d) { + return Vb(b, a.PATTERNS[0], a.GROUP_SEP, a.DECIMAL_SEP, d); + }; + } + function Vb(b, a, c, d, e) { + if (isNaN(b) || !isFinite(b)) return ''; + var g = b < 0, + b = Math.abs(b), + h = b + '', + f = '', + j = [], + i = !1; + if (h.indexOf('e') !== -1) { + var k = h.match(/([\d\.]+)e(-?)(\d+)/); + k && k[2] == '-' && k[3] > e + 1 ? (h = '0') : ((f = h), (i = !0)); + } + if (!i) { + h = (h.split(Wb)[1] || '').length; + w(e) && (e = Math.min(Math.max(a.minFrac, h), a.maxFrac)); + var h = Math.pow(10, e), + b = Math.round(b * h) / h, + b = ('' + b).split(Wb), + h = b[0], + b = b[1] || '', + i = 0, + k = a.lgSize, + m = a.gSize; + if (h.length >= k + m) + for (var i = h.length - k, l = 0; l < i; l++) + (i - l) % m === 0 && l !== 0 && (f += c), (f += h.charAt(l)); + for (l = i; l < h.length; l++) + (h.length - l) % k === 0 && l !== 0 && (f += c), (f += h.charAt(l)); + for (; b.length < e; ) b += '0'; + e && e !== '0' && (f += d + b.substr(0, e)); + } + j.push(g ? a.negPre : a.posPre); + j.push(f); + j.push(g ? a.negSuf : a.posSuf); + return j.join(''); + } + function jb(b, a, c) { + var d = ''; + b < 0 && ((d = '-'), (b = -b)); + for (b = '' + b; b.length < a; ) b = '0' + b; + c && (b = b.substr(b.length - a)); + return d + b; + } + function N(b, a, c, d) { + return function (e) { + e = e['get' + b](); + if (c > 0 || e > -c) e += c; + e === 0 && c == -12 && (e = 12); + return jb(e, a, d); + }; + } + function Ka(b, a) { + return function (c, d) { + var e = c['get' + b](), + g = ma(a ? 'SHORT' + b : b); + return d[g][e]; + }; + } + function Sb(b) { + function a(a) { + var b; + if ((b = a.match(c))) { + var a = new Date(0), + g = 0, + h = 0; + b[9] && ((g = E(b[9] + b[10])), (h = E(b[9] + b[11]))); + a.setUTCFullYear(E(b[1]), E(b[2]) - 1, E(b[3])); + a.setUTCHours( + E(b[4] || 0) - g, + E(b[5] || 0) - h, + E(b[6] || 0), + E(b[7] || 0) + ); + } + return a; + } + var c = + /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; + return function (c, e) { + var g = '', + h = [], + f, + j, + e = e || 'mediumDate', + e = b.DATETIME_FORMATS[e] || e; + A(c) && (c = fd.test(c) ? E(c) : a(c)); + Ra(c) && (c = new Date(c)); + if (!oa(c)) return c; + for (; e; ) + (j = gd.exec(e)) + ? ((h = h.concat(ha.call(j, 1))), (e = h.pop())) + : (h.push(e), (e = null)); + n(h, function (a) { + f = hd[a]; + g += f + ? f(c, b.DATETIME_FORMATS) + : a.replace(/(^'|'$)/g, '').replace(/''/g, "'"); + }); + return g; + }; + } + function bd() { + return function (b) { + return da(b, !0); + }; + } + function cd() { + return function (b, a) { + if (!(b instanceof Array)) return b; + var a = E(a), + c = [], + d, + e; + if (!b || !(b instanceof Array)) return c; + a > b.length ? (a = b.length) : a < -b.length && (a = -b.length); + a > 0 ? ((d = 0), (e = a)) : ((d = b.length + a), (e = b.length)); + for (; d < e; d++) c.push(b[d]); + return c; + }; + } + function Ub(b) { + return function (a, c, d) { + function e(a, b) { + return Va(b) + ? function (b, c) { + return a(c, b); + } + : a; + } + if (!B(a)) return a; + if (!c) return a; + for ( + var c = B(c) ? c : [c], + c = Sa(c, function (a) { + var c = !1, + d = a || na; + if (A(a)) { + if (a.charAt(0) == '+' || a.charAt(0) == '-') + (c = a.charAt(0) == '-'), (a = a.substring(1)); + d = b(a); + } + return e(function (a, b) { + var c; + c = d(a); + var e = d(b), + f = typeof c, + g = typeof e; + f == g + ? (f == 'string' && (c = c.toLowerCase()), + f == 'string' && (e = e.toLowerCase()), + (c = c === e ? 0 : c < e ? -1 : 1)) + : (c = f < g ? -1 : 1); + return c; + }, c); + }), + g = [], + h = 0; + h < a.length; + h++ + ) + g.push(a[h]); + return g.sort( + e(function (a, b) { + for (var d = 0; d < c.length; d++) { + var e = c[d](a, b); + if (e !== 0) return e; + } + return 0; + }, d) + ); + }; + } + function Q(b) { + H(b) && (b = { link: b }); + b.restrict = b.restrict || 'AC'; + return I(b); + } + function Xb(b, a) { + function c(a, c) { + c = c ? '-' + Za(c, '-') : ''; + b.removeClass((a ? La : Ma) + c).addClass((a ? Ma : La) + c); + } + var d = this, + e = b.parent().controller('form') || Na, + g = 0, + h = (d.$error = {}); + d.$name = a.name; + d.$dirty = !1; + d.$pristine = !0; + d.$valid = !0; + d.$invalid = !1; + e.$addControl(d); + b.addClass(Oa); + c(!0); + d.$addControl = function (a) { + a.$name && !d.hasOwnProperty(a.$name) && (d[a.$name] = a); + }; + d.$removeControl = function (a) { + a.$name && d[a.$name] === a && delete d[a.$name]; + n(h, function (b, c) { + d.$setValidity(c, !0, a); + }); + }; + d.$setValidity = function (a, b, i) { + var k = h[a]; + if (b) { + if (k && (Ta(k, i), !k.length)) { + g--; + if (!g) c(b), (d.$valid = !0), (d.$invalid = !1); + h[a] = !1; + c(!0, a); + e.$setValidity(a, !0, d); + } + } else { + g || c(b); + if (k) { + if (Aa(k, i) != -1) return; + } else (h[a] = k = []), g++, c(!1, a), e.$setValidity(a, !1, d); + k.push(i); + d.$valid = !1; + d.$invalid = !0; + } + }; + d.$setDirty = function () { + b.removeClass(Oa).addClass(Yb); + d.$dirty = !0; + d.$pristine = !1; + e.$setDirty(); + }; + } + function T(b) { + return w(b) || b === '' || b === null || b !== b; + } + function Pa(b, a, c, d, e, g) { + var h = function () { + var c = O(a.val()); + d.$viewValue !== c && + b.$apply(function () { + d.$setViewValue(c); + }); + }; + if (e.hasEvent('input')) a.bind('input', h); + else { + var f; + a.bind('keydown', function (a) { + a = a.keyCode; + a === 91 || + (15 < a && a < 19) || + (37 <= a && a <= 40) || + f || + (f = g.defer(function () { + h(); + f = null; + })); + }); + a.bind('change', h); + } + d.$render = function () { + a.val(T(d.$viewValue) ? '' : d.$viewValue); + }; + var j = c.ngPattern, + i = function (a, b) { + return T(b) || a.test(b) + ? (d.$setValidity('pattern', !0), b) + : (d.$setValidity('pattern', !1), q); + }; + j && + (j.match(/^\/(.*)\/$/) + ? ((j = RegExp(j.substr(1, j.length - 2))), + (e = function (a) { + return i(j, a); + })) + : (e = function (a) { + var c = b.$eval(j); + if (!c || !c.test) + throw Error('Expected ' + j + ' to be a RegExp but was ' + c); + return i(c, a); + }), + d.$formatters.push(e), + d.$parsers.push(e)); + if (c.ngMinlength) { + var k = E(c.ngMinlength), + e = function (a) { + return !T(a) && a.length < k + ? (d.$setValidity('minlength', !1), q) + : (d.$setValidity('minlength', !0), a); + }; + d.$parsers.push(e); + d.$formatters.push(e); + } + if (c.ngMaxlength) { + var m = E(c.ngMaxlength), + c = function (a) { + return !T(a) && a.length > m + ? (d.$setValidity('maxlength', !1), q) + : (d.$setValidity('maxlength', !0), a); + }; + d.$parsers.push(c); + d.$formatters.push(c); + } + } + function kb(b, a) { + b = 'ngClass' + b; + return Q(function (c, d, e) { + function g(b) { + if (a === !0 || c.$index % 2 === a) j && b !== j && h(j), f(b); + j = b; + } + function h(a) { + M(a) && + !B(a) && + (a = Sa(a, function (a, b) { + if (a) return b; + })); + d.removeClass(B(a) ? a.join(' ') : a); + } + function f(a) { + M(a) && + !B(a) && + (a = Sa(a, function (a, b) { + if (a) return b; + })); + a && d.addClass(B(a) ? a.join(' ') : a); + } + var j = q; + c.$watch(e[b], g, !0); + e.$observe('class', function () { + var a = c.$eval(e[b]); + g(a, a); + }); + b !== 'ngClass' && + c.$watch('$index', function (d, g) { + var j = d % 2; + j !== g % 2 && (j == a ? f(c.$eval(e[b])) : h(c.$eval(e[b]))); + }); + }); + } + var y = function (b) { + return A(b) ? b.toLowerCase() : b; + }, + ma = function (b) { + return A(b) ? b.toUpperCase() : b; + }, + Z = E((/msie (\d+)/.exec(y(navigator.userAgent)) || [])[1]), + u, + ca, + ha = [].slice, + Qa = [].push, + xa = Object.prototype.toString, + Zb = X.angular || (X.angular = {}), + ta, + fb, + aa = ['0', '0', '0']; + C.$inject = []; + na.$inject = []; + fb = + Z < 9 + ? function (b) { + b = b.nodeName ? b : b[0]; + return b.scopeName && b.scopeName != 'HTML' + ? ma(b.scopeName + ':' + b.nodeName) + : b.nodeName; + } + : function (b) { + return b.nodeName ? b.nodeName : b[0].nodeName; + }; + var kc = /[A-Z]/g, + id = { + full: '1.0.5', + major: 1, + minor: 0, + dot: 5, + codeName: 'flatulent-propulsion' + }, + Ca = (L.cache = {}), + Ba = (L.expando = 'ng-' + new Date().getTime()), + oc = 1, + $b = X.document.addEventListener + ? function (b, a, c) { + b.addEventListener(a, c, !1); + } + : function (b, a, c) { + b.attachEvent('on' + a, c); + }, + db = X.document.removeEventListener + ? function (b, a, c) { + b.removeEventListener(a, c, !1); + } + : function (b, a, c) { + b.detachEvent('on' + a, c); + }, + mc = /([\:\-\_]+(.))/g, + nc = /^moz([A-Z])/, + va = (L.prototype = { + ready: function (b) { + function a() { + c || ((c = !0), b()); + } + var c = !1; + this.bind('DOMContentLoaded', a); + L(X).bind('load', a); + }, + toString: function () { + var b = []; + n(this, function (a) { + b.push('' + a); + }); + return '[' + b.join(', ') + ']'; + }, + eq: function (b) { + return b >= 0 ? u(this[b]) : u(this[this.length + b]); + }, + length: 0, + push: Qa, + sort: [].sort, + splice: [].splice + }), + Fa = {}; + n( + 'multiple,selected,checked,disabled,readOnly,required'.split(','), + function (b) { + Fa[y(b)] = b; + } + ); + var Ab = {}; + n('input,select,option,textarea,button,form'.split(','), function (b) { + Ab[ma(b)] = !0; + }); + n( + { + data: vb, + inheritedData: Ea, + scope: function (b) { + return Ea(b, '$scope'); + }, + controller: yb, + injector: function (b) { + return Ea(b, '$injector'); + }, + removeAttr: function (b, a) { + b.removeAttribute(a); + }, + hasClass: Da, + css: function (b, a, c) { + a = sb(a); + if (x(c)) b.style[a] = c; + else { + var d; + Z <= 8 && + ((d = b.currentStyle && b.currentStyle[a]), + d === '' && (d = 'auto')); + d = d || b.style[a]; + Z <= 8 && (d = d === '' ? q : d); + return d; + } + }, + attr: function (b, a, c) { + var d = y(a); + if (Fa[d]) + if (x(c)) + c + ? ((b[a] = !0), b.setAttribute(a, d)) + : ((b[a] = !1), b.removeAttribute(d)); + else + return b[a] || (b.attributes.getNamedItem(a) || C).specified + ? d + : q; + else if (x(c)) b.setAttribute(a, c); + else if (b.getAttribute) + return (b = b.getAttribute(a, 2)), b === null ? q : b; + }, + prop: function (b, a, c) { + if (x(c)) b[a] = c; + else return b[a]; + }, + text: v( + Z < 9 + ? function (b, a) { + if (b.nodeType == 1) { + if (w(a)) return b.innerText; + b.innerText = a; + } else { + if (w(a)) return b.nodeValue; + b.nodeValue = a; + } + } + : function (b, a) { + if (w(a)) return b.textContent; + b.textContent = a; + }, + { $dv: '' } + ), + val: function (b, a) { + if (w(a)) return b.value; + b.value = a; + }, + html: function (b, a) { + if (w(a)) return b.innerHTML; + for (var c = 0, d = b.childNodes; c < d.length; c++) sa(d[c]); + b.innerHTML = a; + } + }, + function (b, a) { + L.prototype[a] = function (a, d) { + var e, g; + if ((b.length == 2 && b !== Da && b !== yb ? a : d) === q) + if (M(a)) { + for (e = 0; e < this.length; e++) + if (b === vb) b(this[e], a); + else for (g in a) b(this[e], g, a[g]); + return this; + } else { + if (this.length) return b(this[0], a, d); + } + else { + for (e = 0; e < this.length; e++) b(this[e], a, d); + return this; + } + return b.$dv; + }; + } + ); + n( + { + removeData: tb, + dealoc: sa, + bind: function a(c, d, e) { + var g = ba(c, 'events'), + h = ba(c, 'handle'); + g || ba(c, 'events', (g = {})); + h || ba(c, 'handle', (h = pc(c, g))); + n(d.split(' '), function (d) { + var j = g[d]; + if (!j) { + if (d == 'mouseenter' || d == 'mouseleave') { + var i = 0; + g.mouseenter = []; + g.mouseleave = []; + a(c, 'mouseover', function (a) { + i++; + i == 1 && h(a, 'mouseenter'); + }); + a(c, 'mouseout', function (a) { + i--; + i == 0 && h(a, 'mouseleave'); + }); + } else $b(c, d, h), (g[d] = []); + j = g[d]; + } + j.push(e); + }); + }, + unbind: ub, + replaceWith: function (a, c) { + var d, + e = a.parentNode; + sa(a); + n(new L(c), function (c) { + d ? e.insertBefore(c, d.nextSibling) : e.replaceChild(c, a); + d = c; + }); + }, + children: function (a) { + var c = []; + n(a.childNodes, function (a) { + a.nodeType === 1 && c.push(a); + }); + return c; + }, + contents: function (a) { + return a.childNodes || []; + }, + append: function (a, c) { + n(new L(c), function (c) { + a.nodeType === 1 && a.appendChild(c); + }); + }, + prepend: function (a, c) { + if (a.nodeType === 1) { + var d = a.firstChild; + n(new L(c), function (c) { + d ? a.insertBefore(c, d) : (a.appendChild(c), (d = c)); + }); + } + }, + wrap: function (a, c) { + var c = u(c)[0], + d = a.parentNode; + d && d.replaceChild(c, a); + c.appendChild(a); + }, + remove: function (a) { + sa(a); + var c = a.parentNode; + c && c.removeChild(a); + }, + after: function (a, c) { + var d = a, + e = a.parentNode; + n(new L(c), function (a) { + e.insertBefore(a, d.nextSibling); + d = a; + }); + }, + addClass: xb, + removeClass: wb, + toggleClass: function (a, c, d) { + w(d) && (d = !Da(a, c)); + (d ? xb : wb)(a, c); + }, + parent: function (a) { + return (a = a.parentNode) && a.nodeType !== 11 ? a : null; + }, + next: function (a) { + if (a.nextElementSibling) return a.nextElementSibling; + for (a = a.nextSibling; a != null && a.nodeType !== 1; ) + a = a.nextSibling; + return a; + }, + find: function (a, c) { + return a.getElementsByTagName(c); + }, + clone: cb, + triggerHandler: function (a, c) { + var d = (ba(a, 'events') || {})[c]; + n(d, function (c) { + c.call(a, null); + }); + } + }, + function (a, c) { + L.prototype[c] = function (c, e) { + for (var g, h = 0; h < this.length; h++) + g == q + ? ((g = a(this[h], c, e)), g !== q && (g = u(g))) + : bb(g, a(this[h], c, e)); + return g == q ? this : g; + }; + } + ); + Ga.prototype = { + put: function (a, c) { + this[fa(a)] = c; + }, + get: function (a) { + return this[fa(a)]; + }, + remove: function (a) { + var c = this[(a = fa(a))]; + delete this[a]; + return c; + } + }; + eb.prototype = { + push: function (a, c) { + var d = this[(a = fa(a))]; + d ? d.push(c) : (this[a] = [c]); + }, + shift: function (a) { + var c = this[(a = fa(a))]; + if (c) return c.length == 1 ? (delete this[a], c[0]) : c.shift(); + }, + peek: function (a) { + if ((a = this[fa(a)])) return a[0]; + } + }; + var rc = /^function\s*[^\(]*\(\s*([^\)]*)\)/m, + sc = /,/, + tc = /^\s*(_?)(\S+?)\1\s*$/, + qc = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm, + Db = 'Non-assignable model expression: '; + Cb.$inject = ['$provide']; + var Ac = /^(x[\:\-_]|data[\:\-_])/i, + Gb = + /^([^:]+):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/, + ac = /^([^\?#]*)?(\?([^#]*))?(#(.*))?$/, + Hc = ac, + Hb = { http: 80, https: 443, ftp: 21 }; + hb.prototype = { + $$replace: !1, + absUrl: Ia('$$absUrl'), + url: function (a, c) { + if (w(a)) return this.$$url; + var d = ac.exec(a); + d[1] && this.path(decodeURIComponent(d[1])); + if (d[2] || d[1]) this.search(d[3] || ''); + this.hash(d[5] || '', c); + return this; + }, + protocol: Ia('$$protocol'), + host: Ia('$$host'), + port: Ia('$$port'), + path: Jb('$$path', function (a) { + return a.charAt(0) == '/' ? a : '/' + a; + }), + search: function (a, c) { + if (w(a)) return this.$$search; + x(c) + ? c === null + ? delete this.$$search[a] + : (this.$$search[a] = c) + : (this.$$search = A(a) ? Wa(a) : a); + this.$$compose(); + return this; + }, + hash: Jb('$$hash', na), + replace: function () { + this.$$replace = !0; + return this; + } + }; + Ha.prototype = za(hb.prototype); + Ib.prototype = za(Ha.prototype); + var Ja = { + null: function () { + return null; + }, + true: function () { + return !0; + }, + false: function () { + return !1; + }, + undefined: C, + '+': function (a, c, d, e) { + d = d(a, c); + e = e(a, c); + return x(d) ? (x(e) ? d + e : d) : x(e) ? e : q; + }, + '-': function (a, c, d, e) { + d = d(a, c); + e = e(a, c); + return (x(d) ? d : 0) - (x(e) ? e : 0); + }, + '*': function (a, c, d, e) { + return d(a, c) * e(a, c); + }, + '/': function (a, c, d, e) { + return d(a, c) / e(a, c); + }, + '%': function (a, c, d, e) { + return d(a, c) % e(a, c); + }, + '^': function (a, c, d, e) { + return d(a, c) ^ e(a, c); + }, + '=': C, + '==': function (a, c, d, e) { + return d(a, c) == e(a, c); + }, + '!=': function (a, c, d, e) { + return d(a, c) != e(a, c); + }, + '<': function (a, c, d, e) { + return d(a, c) < e(a, c); + }, + '>': function (a, c, d, e) { + return d(a, c) > e(a, c); + }, + '<=': function (a, c, d, e) { + return d(a, c) <= e(a, c); + }, + '>=': function (a, c, d, e) { + return d(a, c) >= e(a, c); + }, + '&&': function (a, c, d, e) { + return d(a, c) && e(a, c); + }, + '||': function (a, c, d, e) { + return d(a, c) || e(a, c); + }, + '&': function (a, c, d, e) { + return d(a, c) & e(a, c); + }, + '|': function (a, c, d, e) { + return e(a, c)(a, c, d(a, c)); + }, + '!': function (a, c, d) { + return !d(a, c); + } + }, + Lc = { + n: '\n', + f: '\u000c', + r: '\r', + t: '\t', + v: '\u000b', + "'": "'", + '"': '"' + }, + ib = {}, + Yc = + X.XMLHttpRequest || + function () { + try { + return new ActiveXObject('Msxml2.XMLHTTP.6.0'); + } catch (a) {} + try { + return new ActiveXObject('Msxml2.XMLHTTP.3.0'); + } catch (c) {} + try { + return new ActiveXObject('Msxml2.XMLHTTP'); + } catch (d) {} + throw Error('This browser does not support XMLHttpRequest.'); + }; + Qb.$inject = ['$provide']; + Rb.$inject = ['$locale']; + Tb.$inject = ['$locale']; + var Wb = '.', + hd = { + yyyy: N('FullYear', 4), + yy: N('FullYear', 2, 0, !0), + y: N('FullYear', 1), + MMMM: Ka('Month'), + MMM: Ka('Month', !0), + MM: N('Month', 2, 1), + M: N('Month', 1, 1), + dd: N('Date', 2), + d: N('Date', 1), + HH: N('Hours', 2), + H: N('Hours', 1), + hh: N('Hours', 2, -12), + h: N('Hours', 1, -12), + mm: N('Minutes', 2), + m: N('Minutes', 1), + ss: N('Seconds', 2), + s: N('Seconds', 1), + EEEE: Ka('Day'), + EEE: Ka('Day', !0), + a: function (a, c) { + return a.getHours() < 12 ? c.AMPMS[0] : c.AMPMS[1]; + }, + Z: function (a) { + var a = -1 * a.getTimezoneOffset(), + c = a >= 0 ? '+' : ''; + c += jb(a / 60, 2) + jb(Math.abs(a % 60), 2); + return c; + } + }, + gd = + /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/, + fd = /^\d+$/; + Sb.$inject = ['$locale']; + var dd = I(y), + ed = I(ma); + Ub.$inject = ['$parse']; + var jd = I({ + restrict: 'E', + compile: function (a, c) { + Z <= 8 && + (!c.href && !c.name && c.$set('href', ''), + a.append(Y.createComment('IE fix'))); + return function (a, c) { + c.bind('click', function (a) { + c.attr('href') || a.preventDefault(); + }); + }; + } + }), + lb = {}; + n(Fa, function (a, c) { + var d = ea('ng-' + c); + lb[d] = function () { + return { + priority: 100, + compile: function () { + return function (a, g, h) { + a.$watch(h[d], function (a) { + h.$set(c, !!a); + }); + }; + } + }; + }; + }); + n(['src', 'href'], function (a) { + var c = ea('ng-' + a); + lb[c] = function () { + return { + priority: 99, + link: function (d, e, g) { + g.$observe(c, function (c) { + c && (g.$set(a, c), Z && e.prop(a, g[a])); + }); + } + }; + }; + }); + var Na = { $addControl: C, $removeControl: C, $setValidity: C, $setDirty: C }; + Xb.$inject = ['$element', '$attrs', '$scope']; + var Qa = function (a) { + return [ + '$timeout', + function (c) { + var d = { + name: 'form', + restrict: 'E', + controller: Xb, + compile: function () { + return { + pre: function (a, d, h, f) { + if (!h.action) { + var j = function (a) { + a.preventDefault + ? a.preventDefault() + : (a.returnValue = !1); + }; + $b(d[0], 'submit', j); + d.bind('$destroy', function () { + c( + function () { + db(d[0], 'submit', j); + }, + 0, + !1 + ); + }); + } + var i = d.parent().controller('form'), + k = h.name || h.ngForm; + k && (a[k] = f); + i && + d.bind('$destroy', function () { + i.$removeControl(f); + k && (a[k] = q); + v(f, Na); + }); + } + }; + } + }; + return a ? v(U(d), { restrict: 'EAC' }) : d; + } + ]; + }, + kd = Qa(), + ld = Qa(!0), + md = + /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/, + nd = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/, + od = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/, + bc = { + text: Pa, + number: function (a, c, d, e, g, h) { + Pa(a, c, d, e, g, h); + e.$parsers.push(function (a) { + var c = T(a); + return c || od.test(a) + ? (e.$setValidity('number', !0), + a === '' ? null : c ? a : parseFloat(a)) + : (e.$setValidity('number', !1), q); + }); + e.$formatters.push(function (a) { + return T(a) ? '' : '' + a; + }); + if (d.min) { + var f = parseFloat(d.min), + a = function (a) { + return !T(a) && a < f + ? (e.$setValidity('min', !1), q) + : (e.$setValidity('min', !0), a); + }; + e.$parsers.push(a); + e.$formatters.push(a); + } + if (d.max) { + var j = parseFloat(d.max), + d = function (a) { + return !T(a) && a > j + ? (e.$setValidity('max', !1), q) + : (e.$setValidity('max', !0), a); + }; + e.$parsers.push(d); + e.$formatters.push(d); + } + e.$formatters.push(function (a) { + return T(a) || Ra(a) + ? (e.$setValidity('number', !0), a) + : (e.$setValidity('number', !1), q); + }); + }, + url: function (a, c, d, e, g, h) { + Pa(a, c, d, e, g, h); + a = function (a) { + return T(a) || md.test(a) + ? (e.$setValidity('url', !0), a) + : (e.$setValidity('url', !1), q); + }; + e.$formatters.push(a); + e.$parsers.push(a); + }, + email: function (a, c, d, e, g, h) { + Pa(a, c, d, e, g, h); + a = function (a) { + return T(a) || nd.test(a) + ? (e.$setValidity('email', !0), a) + : (e.$setValidity('email', !1), q); + }; + e.$formatters.push(a); + e.$parsers.push(a); + }, + radio: function (a, c, d, e) { + w(d.name) && c.attr('name', ya()); + c.bind('click', function () { + c[0].checked && + a.$apply(function () { + e.$setViewValue(d.value); + }); + }); + e.$render = function () { + c[0].checked = d.value == e.$viewValue; + }; + d.$observe('value', e.$render); + }, + checkbox: function (a, c, d, e) { + var g = d.ngTrueValue, + h = d.ngFalseValue; + A(g) || (g = !0); + A(h) || (h = !1); + c.bind('click', function () { + a.$apply(function () { + e.$setViewValue(c[0].checked); + }); + }); + e.$render = function () { + c[0].checked = e.$viewValue; + }; + e.$formatters.push(function (a) { + return a === g; + }); + e.$parsers.push(function (a) { + return a ? g : h; + }); + }, + hidden: C, + button: C, + submit: C, + reset: C + }, + cc = [ + '$browser', + '$sniffer', + function (a, c) { + return { + restrict: 'E', + require: '?ngModel', + link: function (d, e, g, h) { + h && (bc[y(g.type)] || bc.text)(d, e, g, h, c, a); + } + }; + } + ], + Ma = 'ng-valid', + La = 'ng-invalid', + Oa = 'ng-pristine', + Yb = 'ng-dirty', + pd = [ + '$scope', + '$exceptionHandler', + '$attrs', + '$element', + '$parse', + function (a, c, d, e, g) { + function h(a, c) { + c = c ? '-' + Za(c, '-') : ''; + e.removeClass((a ? La : Ma) + c).addClass((a ? Ma : La) + c); + } + this.$modelValue = this.$viewValue = Number.NaN; + this.$parsers = []; + this.$formatters = []; + this.$viewChangeListeners = []; + this.$pristine = !0; + this.$dirty = !1; + this.$valid = !0; + this.$invalid = !1; + this.$name = d.name; + var f = g(d.ngModel), + j = f.assign; + if (!j) throw Error(Db + d.ngModel + ' (' + qa(e) + ')'); + this.$render = C; + var i = e.inheritedData('$formController') || Na, + k = 0, + m = (this.$error = {}); + e.addClass(Oa); + h(!0); + this.$setValidity = function (a, c) { + if (m[a] !== !c) { + if (c) { + if ((m[a] && k--, !k)) + h(!0), (this.$valid = !0), (this.$invalid = !1); + } else h(!1), (this.$invalid = !0), (this.$valid = !1), k++; + m[a] = !c; + h(c, a); + i.$setValidity(a, c, this); + } + }; + this.$setViewValue = function (d) { + this.$viewValue = d; + if (this.$pristine) + (this.$dirty = !0), + (this.$pristine = !1), + e.removeClass(Oa).addClass(Yb), + i.$setDirty(); + n(this.$parsers, function (a) { + d = a(d); + }); + if (this.$modelValue !== d) + (this.$modelValue = d), + j(a, d), + n(this.$viewChangeListeners, function (a) { + try { + a(); + } catch (d) { + c(d); + } + }); + }; + var l = this; + a.$watch(function () { + var c = f(a); + if (l.$modelValue !== c) { + var d = l.$formatters, + e = d.length; + for (l.$modelValue = c; e--; ) c = d[e](c); + if (l.$viewValue !== c) (l.$viewValue = c), l.$render(); + } + }); + } + ], + qd = function () { + return { + require: ['ngModel', '^?form'], + controller: pd, + link: function (a, c, d, e) { + var g = e[0], + h = e[1] || Na; + h.$addControl(g); + c.bind('$destroy', function () { + h.$removeControl(g); + }); + } + }; + }, + rd = I({ + require: 'ngModel', + link: function (a, c, d, e) { + e.$viewChangeListeners.push(function () { + a.$eval(d.ngChange); + }); + } + }), + dc = function () { + return { + require: '?ngModel', + link: function (a, c, d, e) { + if (e) { + d.required = !0; + var g = function (a) { + if (d.required && (T(a) || a === !1)) + e.$setValidity('required', !1); + else return e.$setValidity('required', !0), a; + }; + e.$formatters.push(g); + e.$parsers.unshift(g); + d.$observe('required', function () { + g(e.$viewValue); + }); + } + } + }; + }, + sd = function () { + return { + require: 'ngModel', + link: function (a, c, d, e) { + var g = + ((a = /\/(.*)\//.exec(d.ngList)) && RegExp(a[1])) || + d.ngList || + ','; + e.$parsers.push(function (a) { + var c = []; + a && + n(a.split(g), function (a) { + a && c.push(O(a)); + }); + return c; + }); + e.$formatters.push(function (a) { + return B(a) ? a.join(', ') : q; + }); + } + }; + }, + td = /^(true|false|\d+)$/, + ud = function () { + return { + priority: 100, + compile: function (a, c) { + return td.test(c.ngValue) + ? function (a, c, g) { + g.$set('value', a.$eval(g.ngValue)); + } + : function (a, c, g) { + a.$watch(g.ngValue, function (a) { + g.$set('value', a, !1); + }); + }; + } + }; + }, + vd = Q(function (a, c, d) { + c.addClass('ng-binding').data('$binding', d.ngBind); + a.$watch(d.ngBind, function (a) { + c.text(a == q ? '' : a); + }); + }), + wd = [ + '$interpolate', + function (a) { + return function (c, d, e) { + c = a(d.attr(e.$attr.ngBindTemplate)); + d.addClass('ng-binding').data('$binding', c); + e.$observe('ngBindTemplate', function (a) { + d.text(a); + }); + }; + } + ], + xd = [ + function () { + return function (a, c, d) { + c.addClass('ng-binding').data('$binding', d.ngBindHtmlUnsafe); + a.$watch(d.ngBindHtmlUnsafe, function (a) { + c.html(a || ''); + }); + }; + } + ], + yd = kb('', !0), + zd = kb('Odd', 0), + Ad = kb('Even', 1), + Bd = Q({ + compile: function (a, c) { + c.$set('ngCloak', q); + a.removeClass('ng-cloak'); + } + }), + Cd = [ + function () { + return { scope: !0, controller: '@' }; + } + ], + Dd = [ + '$sniffer', + function (a) { + return { + priority: 1e3, + compile: function () { + a.csp = !0; + } + }; + } + ], + ec = {}; + n( + 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave'.split( + ' ' + ), + function (a) { + var c = ea('ng-' + a); + ec[c] = [ + '$parse', + function (d) { + return function (e, g, h) { + var f = d(h[c]); + g.bind(y(a), function (a) { + e.$apply(function () { + f(e, { $event: a }); + }); + }); + }; + } + ]; + } + ); + var Ed = Q(function (a, c, d) { + c.bind('submit', function () { + a.$apply(d.ngSubmit); + }); + }), + Fd = [ + '$http', + '$templateCache', + '$anchorScroll', + '$compile', + function (a, c, d, e) { + return { + restrict: 'ECA', + terminal: !0, + compile: function (g, h) { + var f = h.ngInclude || h.src, + j = h.onload || '', + i = h.autoscroll; + return function (g, h) { + var l = 0, + n, + o = function () { + n && (n.$destroy(), (n = null)); + h.html(''); + }; + g.$watch(f, function (f) { + var s = ++l; + f + ? a + .get(f, { cache: c }) + .success(function (a) { + s === l && + (n && n.$destroy(), + (n = g.$new()), + h.html(a), + e(h.contents())(n), + x(i) && (!i || g.$eval(i)) && d(), + n.$emit('$includeContentLoaded'), + g.$eval(j)); + }) + .error(function () { + s === l && o(); + }) + : o(); + }); + }; + } + }; + } + ], + Gd = Q({ + compile: function () { + return { + pre: function (a, c, d) { + a.$eval(d.ngInit); + } + }; + } + }), + Hd = Q({ terminal: !0, priority: 1e3 }), + Id = [ + '$locale', + '$interpolate', + function (a, c) { + var d = /{}/g; + return { + restrict: 'EA', + link: function (e, g, h) { + var f = h.count, + j = g.attr(h.$attr.when), + i = h.offset || 0, + k = e.$eval(j), + m = {}, + l = c.startSymbol(), + t = c.endSymbol(); + n(k, function (a, e) { + m[e] = c(a.replace(d, l + f + '-' + i + t)); + }); + e.$watch( + function () { + var c = parseFloat(e.$eval(f)); + return isNaN(c) + ? '' + : (k[c] || (c = a.pluralCat(c - i)), m[c](e, g, !0)); + }, + function (a) { + g.text(a); + } + ); + } + }; + } + ], + Jd = Q({ + transclude: 'element', + priority: 1e3, + terminal: !0, + compile: function (a, c, d) { + return function (a, c, h) { + var f = h.ngRepeat, + h = f.match(/^\s*(.+)\s+in\s+(.*)\s*$/), + j, + i, + k; + if (!h) + throw Error( + "Expected ngRepeat in form of '_item_ in _collection_' but got '" + + f + + "'." + ); + f = h[1]; + j = h[2]; + h = f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/); + if (!h) + throw Error( + "'item' in 'item in collection' should be identifier or (key, value) but got '" + + f + + "'." + ); + i = h[3] || h[1]; + k = h[2]; + var m = new eb(); + a.$watch(function (a) { + var e, + f, + h = a.$eval(j), + n = c, + q = new eb(), + x, + z, + u, + w, + r, + v; + if (B(h)) r = h || []; + else { + r = []; + for (u in h) + h.hasOwnProperty(u) && u.charAt(0) != '$' && r.push(u); + r.sort(); + } + x = r.length; + e = 0; + for (f = r.length; e < f; e++) { + u = h === r ? e : r[e]; + w = h[u]; + if ((v = m.shift(w))) { + z = v.scope; + q.push(w, v); + if (e !== v.index) (v.index = e), n.after(v.element); + n = v.element; + } else z = a.$new(); + z[i] = w; + k && (z[k] = u); + z.$index = e; + z.$first = e === 0; + z.$last = e === x - 1; + z.$middle = !(z.$first || z.$last); + v || + d(z, function (a) { + n.after(a); + v = { scope: z, element: (n = a), index: e }; + q.push(w, v); + }); + } + for (u in m) + if (m.hasOwnProperty(u)) + for (r = m[u]; r.length; ) + (w = r.pop()), w.element.remove(), w.scope.$destroy(); + m = q; + }); + }; + } + }), + Kd = Q(function (a, c, d) { + a.$watch(d.ngShow, function (a) { + c.css('display', Va(a) ? '' : 'none'); + }); + }), + Ld = Q(function (a, c, d) { + a.$watch(d.ngHide, function (a) { + c.css('display', Va(a) ? 'none' : ''); + }); + }), + Md = Q(function (a, c, d) { + a.$watch( + d.ngStyle, + function (a, d) { + d && + a !== d && + n(d, function (a, d) { + c.css(d, ''); + }); + a && c.css(a); + }, + !0 + ); + }), + Nd = I({ + restrict: 'EA', + require: 'ngSwitch', + controller: [ + '$scope', + function () { + this.cases = {}; + } + ], + link: function (a, c, d, e) { + var g, h, f; + a.$watch(d.ngSwitch || d.on, function (j) { + h && (f.$destroy(), h.remove(), (h = f = null)); + if ((g = e.cases['!' + j] || e.cases['?'])) + a.$eval(d.change), + (f = a.$new()), + g(f, function (a) { + h = a; + c.append(a); + }); + }); + } + }), + Od = Q({ + transclude: 'element', + priority: 500, + require: '^ngSwitch', + compile: function (a, c, d) { + return function (a, g, h, f) { + f.cases['!' + c.ngSwitchWhen] = d; + }; + } + }), + Pd = Q({ + transclude: 'element', + priority: 500, + require: '^ngSwitch', + compile: function (a, c, d) { + return function (a, c, h, f) { + f.cases['?'] = d; + }; + } + }), + Qd = Q({ + controller: [ + '$transclude', + '$element', + function (a, c) { + a(function (a) { + c.append(a); + }); + } + ] + }), + Rd = [ + '$http', + '$templateCache', + '$route', + '$anchorScroll', + '$compile', + '$controller', + function (a, c, d, e, g, h) { + return { + restrict: 'ECA', + terminal: !0, + link: function (a, c, i) { + function k() { + var i = d.current && d.current.locals, + k = i && i.$template; + if (k) { + c.html(k); + m && (m.$destroy(), (m = null)); + var k = g(c.contents()), + n = d.current; + m = n.scope = a.$new(); + if (n.controller) + (i.$scope = m), + (i = h(n.controller, i)), + c.children().data('$ngControllerController', i); + k(m); + m.$emit('$viewContentLoaded'); + m.$eval(l); + e(); + } else c.html(''), m && (m.$destroy(), (m = null)); + } + var m, + l = i.onload || ''; + a.$on('$routeChangeSuccess', k); + k(); + } + }; + } + ], + Sd = [ + '$templateCache', + function (a) { + return { + restrict: 'E', + terminal: !0, + compile: function (c, d) { + d.type == 'text/ng-template' && a.put(d.id, c[0].text); + } + }; + } + ], + Td = I({ terminal: !0 }), + Ud = [ + '$compile', + '$parse', + function (a, c) { + var d = + /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/, + e = { $setViewValue: C }; + return { + restrict: 'E', + require: ['select', '?ngModel'], + controller: [ + '$element', + '$scope', + '$attrs', + function (a, c, d) { + var j = this, + i = {}, + k = e, + m; + j.databound = d.ngModel; + j.init = function (a, c, d) { + k = a; + m = d; + }; + j.addOption = function (c) { + i[c] = !0; + k.$viewValue == c && (a.val(c), m.parent() && m.remove()); + }; + j.removeOption = function (a) { + this.hasOption(a) && + (delete i[a], + k.$viewValue == a && this.renderUnknownOption(a)); + }; + j.renderUnknownOption = function (c) { + c = '? ' + fa(c) + ' ?'; + m.val(c); + a.prepend(m); + a.val(c); + m.prop('selected', !0); + }; + j.hasOption = function (a) { + return i.hasOwnProperty(a); + }; + c.$on('$destroy', function () { + j.renderUnknownOption = C; + }); + } + ], + link: function (e, h, f, j) { + function i(a, c, d, e) { + d.$render = function () { + var a = d.$viewValue; + e.hasOption(a) + ? (y.parent() && y.remove(), + c.val(a), + a === '' && v.prop('selected', !0)) + : w(a) && v + ? c.val('') + : e.renderUnknownOption(a); + }; + c.bind('change', function () { + a.$apply(function () { + y.parent() && y.remove(); + d.$setViewValue(c.val()); + }); + }); + } + function k(a, c, d) { + var e; + d.$render = function () { + var a = new Ga(d.$viewValue); + n(c.find('option'), function (c) { + c.selected = x(a.get(c.value)); + }); + }; + a.$watch(function () { + ga(e, d.$viewValue) || ((e = U(d.$viewValue)), d.$render()); + }); + c.bind('change', function () { + a.$apply(function () { + var a = []; + n(c.find('option'), function (c) { + c.selected && a.push(c.value); + }); + d.$setViewValue(a); + }); + }); + } + function m(e, f, g) { + function h() { + var a = { '': [] }, + c = [''], + d, + i, + p, + u, + v; + p = g.$modelValue; + u = t(e) || []; + var w = l ? mb(u) : u, + x, + y, + A; + y = {}; + v = !1; + var B, E; + if (o) v = new Ga(p); + else if (p === null || s) + a[''].push({ selected: p === null, id: '', label: '' }), + (v = !0); + for (A = 0; (x = w.length), A < x; A++) { + y[k] = u[l ? (y[l] = w[A]) : A]; + d = m(e, y) || ''; + if (!(i = a[d])) (i = a[d] = []), c.push(d); + o + ? (d = v.remove(n(e, y)) != q) + : ((d = p === n(e, y)), (v = v || d)); + B = j(e, y); + B = B === q ? '' : B; + i.push({ id: l ? w[A] : A, label: B, selected: d }); + } + !o && !v && a[''].unshift({ id: '?', label: '', selected: !0 }); + y = 0; + for (w = c.length; y < w; y++) { + d = c[y]; + i = a[d]; + if (r.length <= y) + (p = { + element: z.clone().attr('label', d), + label: i.label + }), + (u = [p]), + r.push(u), + f.append(p.element); + else if (((u = r[y]), (p = u[0]), p.label != d)) + p.element.attr('label', (p.label = d)); + B = null; + A = 0; + for (x = i.length; A < x; A++) + if (((d = i[A]), (v = u[A + 1]))) { + B = v.element; + if (v.label !== d.label) B.text((v.label = d.label)); + if (v.id !== d.id) B.val((v.id = d.id)); + if (v.element.selected !== d.selected) + B.prop('selected', (v.selected = d.selected)); + } else + d.id === '' && s + ? (E = s) + : (E = C.clone()) + .val(d.id) + .attr('selected', d.selected) + .text(d.label), + u.push({ + element: E, + label: d.label, + id: d.id, + selected: d.selected + }), + B ? B.after(E) : p.element.append(E), + (B = E); + for (A++; u.length > A; ) u.pop().element.remove(); + } + for (; r.length > y; ) r.pop()[0].element.remove(); + } + var i; + if (!(i = p.match(d))) + throw Error( + "Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '" + + p + + "'." + ); + var j = c(i[2] || i[1]), + k = i[4] || i[6], + l = i[5], + m = c(i[3] || ''), + n = c(i[2] ? i[1] : k), + t = c(i[7]), + r = [[{ element: f, label: '' }]]; + s && (a(s)(e), s.removeClass('ng-scope'), s.remove()); + f.html(''); + f.bind('change', function () { + e.$apply(function () { + var a, + c = t(e) || [], + d = {}, + h, + i, + j, + m, + p, + s; + if (o) { + i = []; + m = 0; + for (s = r.length; m < s; m++) { + a = r[m]; + j = 1; + for (p = a.length; j < p; j++) + if ((h = a[j].element)[0].selected) + (h = h.val()), + l && (d[l] = h), + (d[k] = c[h]), + i.push(n(e, d)); + } + } else (h = f.val()), h == '?' ? (i = q) : h == '' ? (i = null) : ((d[k] = c[h]), l && (d[l] = h), (i = n(e, d))); + g.$setViewValue(i); + }); + }); + g.$render = h; + e.$watch(h); + } + if (j[1]) { + for ( + var l = j[0], + t = j[1], + o = f.multiple, + p = f.ngOptions, + s = !1, + v, + C = u(Y.createElement('option')), + z = u(Y.createElement('optgroup')), + y = C.clone(), + j = 0, + A = h.children(), + r = A.length; + j < r; + j++ + ) + if (A[j].value == '') { + v = s = A.eq(j); + break; + } + l.init(t, s, y); + if (o && (f.required || f.ngRequired)) { + var B = function (a) { + t.$setValidity('required', !f.required || (a && a.length)); + return a; + }; + t.$parsers.push(B); + t.$formatters.unshift(B); + f.$observe('required', function () { + B(t.$viewValue); + }); + } + p ? m(e, h, t) : o ? k(e, h, t) : i(e, h, t, l); + } + } + }; + } + ], + Vd = [ + '$interpolate', + function (a) { + var c = { addOption: C, removeOption: C }; + return { + restrict: 'E', + priority: 100, + compile: function (d, e) { + if (w(e.value)) { + var g = a(d.text(), !0); + g || e.$set('value', d.text()); + } + return function (a, d, e) { + var i = d.parent(), + k = + i.data('$selectController') || + i.parent().data('$selectController'); + k && k.databound ? d.prop('selected', !1) : (k = c); + g + ? a.$watch(g, function (a, c) { + e.$set('value', a); + a !== c && k.removeOption(c); + k.addOption(a); + }) + : k.addOption(e.value); + d.bind('$destroy', function () { + k.removeOption(e.value); + }); + }; + } + }; + } + ], + Wd = I({ restrict: 'E', terminal: !0 }); + (ca = X.jQuery) + ? ((u = ca), + v(ca.fn, { + scope: va.scope, + controller: va.controller, + injector: va.injector, + inheritedData: va.inheritedData + }), + ab('remove', !0), + ab('empty'), + ab('html')) + : (u = L); + Zb.element = u; + (function (a) { + v(a, { + bootstrap: qb, + copy: U, + extend: v, + equals: ga, + element: u, + forEach: n, + injector: rb, + noop: C, + bind: Ua, + toJson: da, + fromJson: ob, + identity: na, + isUndefined: w, + isDefined: x, + isString: A, + isFunction: H, + isObject: M, + isNumber: Ra, + isElement: gc, + isArray: B, + version: id, + isDate: oa, + lowercase: y, + uppercase: ma, + callbacks: { counter: 0 } + }); + ta = lc(X); + try { + ta('ngLocale'); + } catch (c) { + ta('ngLocale', []).provider('$locale', Zc); + } + ta( + 'ng', + ['ngLocale'], + [ + '$provide', + function (a) { + a.provider('$compile', Cb) + .directive({ + a: jd, + input: cc, + textarea: cc, + form: kd, + script: Sd, + select: Ud, + style: Wd, + option: Vd, + ngBind: vd, + ngBindHtmlUnsafe: xd, + ngBindTemplate: wd, + ngClass: yd, + ngClassEven: Ad, + ngClassOdd: zd, + ngCsp: Dd, + ngCloak: Bd, + ngController: Cd, + ngForm: ld, + ngHide: Ld, + ngInclude: Fd, + ngInit: Gd, + ngNonBindable: Hd, + ngPluralize: Id, + ngRepeat: Jd, + ngShow: Kd, + ngSubmit: Ed, + ngStyle: Md, + ngSwitch: Nd, + ngSwitchWhen: Od, + ngSwitchDefault: Pd, + ngOptions: Td, + ngView: Rd, + ngTransclude: Qd, + ngModel: qd, + ngList: sd, + ngChange: rd, + required: dc, + ngRequired: dc, + ngValue: ud + }) + .directive(lb) + .directive(ec); + a.provider({ + $anchorScroll: uc, + $browser: wc, + $cacheFactory: xc, + $controller: Bc, + $document: Cc, + $exceptionHandler: Dc, + $filter: Qb, + $interpolate: Ec, + $http: Vc, + $httpBackend: Wc, + $location: Ic, + $log: Jc, + $parse: Nc, + $route: Qc, + $routeParams: Rc, + $rootScope: Sc, + $q: Oc, + $sniffer: Tc, + $templateCache: yc, + $timeout: $c, + $window: Uc + }); + } + ] + ); + })(Zb); + u(Y).ready(function () { + jc(Y, qb); + }); +})(window, document); +angular + .element(document) + .find('head') + .append( + '' + ); diff --git a/examples/apps/JavaScript/CompareTool/js/compare.js b/examples/apps/JavaScript/CompareTool/js/compare.js index b92adf3b..644d1958 100644 --- a/examples/apps/JavaScript/CompareTool/js/compare.js +++ b/examples/apps/JavaScript/CompareTool/js/compare.js @@ -1,13 +1,13 @@ -(function() { - +(function () { // Filters // -------------------- - angular.module("filters", []). + angular + .module('filters', []) // Add a range of indexes to a collection // e.g., ng-repeat="indexes in [] | range:10" - filter("range", function() { - return function(input, num) { + .filter('range', function () { + return function (input, num) { for (var i = 0; i < num; i++) { input.push(i); } @@ -18,33 +18,37 @@ // Services // -------------------- - angular.module("services", ["ngResource"]). + angular + .module('services', ['ngResource']) // Retrieve quote data for a symbol - service("companyService", function($resource) { - var defaultCallbacks = { success: function() {}, error: function() {}, complete: function() {} }; + .service('companyService', function ($resource) { + var defaultCallbacks = { + success: function () {}, + error: function () {}, + complete: function () {} + }; return { - getBySymbol: function(symbol, cbs) { + getBySymbol: function (symbol, cbs) { cbs = angular.extend({}, defaultCallbacks, cbs); var query = $resource( - "http://dev.markitondemand.com/Api/Quote/:action", - { action: "jsonp", callback: "JSON_CALLBACK", symbol: symbol }, - { get: { method: "jsonp" } } + 'http://dev.markitondemand.com/Api/Quote/:action', + { action: 'jsonp', callback: 'JSON_CALLBACK', symbol: symbol }, + { get: { method: 'jsonp' } } ); query.get( - function(response) { + function (response) { if (response.Data) { cbs.success(response.Data); - } - else { - cbs.error("Invalid symbol"); + } else { + cbs.error('Invalid symbol'); } cbs.complete(); }, - function() { + function () { cbs.error(); cbs.complete(); } @@ -56,27 +60,26 @@ // Controller // -------------------- - var app = angular.module("compareTool", ["filters", "services"]); + var app = angular.module('compareTool', ['filters', 'services']); // Compare Controller - app.controller("CompareCtrl", function($scope, $filter, companyService) { - + app.controller('CompareCtrl', function ($scope, $filter, companyService) { // The max number of companies the user can compare var maxSymbols = 5; // Define what will be displayed $scope.dataPoints = [ - { label: "Last Price", field: "LastPrice", format: "currency" }, - { label: "High", field: "High", format: "currency" }, - { label: "Low", field: "Low", format: "currency" }, - { label: "Open", field: "Open", format: "currency" }, - { label: "Market Cap", field: "MarketCap", format: "number" }, - { label: "Volume", field: "Volume", format: "number" }, - { label: "Change", field: "Change", format: "currency" }, - { label: "Change %", field: "ChangePercent", format: "percent:2" }, - { label: "Change YTD", field: "ChangeYTD", format: "currency" }, - { label: "Change % YTD", field: "ChangePercentYTD", format: "percent:2" }, - { label: "Data Refreshed On", field: "Timestamp", format: "date" } + { label: 'Last Price', field: 'LastPrice', format: 'currency' }, + { label: 'High', field: 'High', format: 'currency' }, + { label: 'Low', field: 'Low', format: 'currency' }, + { label: 'Open', field: 'Open', format: 'currency' }, + { label: 'Market Cap', field: 'MarketCap', format: 'number' }, + { label: 'Volume', field: 'Volume', format: 'number' }, + { label: 'Change', field: 'Change', format: 'currency' }, + { label: 'Change %', field: 'ChangePercent', format: 'percent:2' }, + { label: 'Change YTD', field: 'ChangeYTD', format: 'currency' }, + { label: 'Change % YTD', field: 'ChangePercentYTD', format: 'percent:2' }, + { label: 'Data Refreshed On', field: 'Timestamp', format: 'date' } ]; // List of symbols we're comparing @@ -84,12 +87,12 @@ $scope.issues = []; // Get the number of empty compare slots - $scope.numRemaining = function() { + $scope.numRemaining = function () { return maxSymbols - $scope.issues.length; }; // Lookup the specified company - $scope.addCompany = function(ticker) { + $scope.addCompany = function (ticker) { if ($scope.issues.length < maxSymbols) { var self = this; @@ -99,26 +102,25 @@ // Grab the symbol data from the service companyService.getBySymbol(ticker, { - success: function(data) { + success: function (data) { $scope.issues.push(data); - self.searchSymbol = ""; + self.searchSymbol = ''; }, - error: function(msg) { + error: function (msg) { msg = msg || "Sorry, that didn't work for some reason"; alert(msg); }, - complete: function() { + complete: function () { self.isLoading = false; } }); - } - else { + } else { alert("You're already comparing the maximum number of companies"); } }; // Pull the company out of comparison - $scope.removeCompany = function(ticker) { + $scope.removeCompany = function (ticker) { // Remove the symbol for (var i = 0; i < $scope.issues.length; i++) { if ($scope.issues[i].Symbol === ticker) { @@ -129,22 +131,22 @@ }; // Multi-purpose format func - $scope.format = function(value, type) { + $scope.format = function (value, type) { var out = value; if (type) { - var params = type.split(":"); + var params = type.split(':'); type = params[0]; switch (type) { - case "percent": - out = value.toFixed(params[1] || 0) + "%"; + case 'percent': + out = value.toFixed(params[1] || 0) + '%'; break; - case "number": - out = value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); + case 'number': + out = value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); break; - case "date": - out = moment(value).format("M/DD/YYYY h:mm:ss A"); + case 'date': + out = moment(value).format('M/DD/YYYY h:mm:ss A'); break; default: // Use the default angular filter @@ -155,7 +157,5 @@ return out; }; - }); - -})(); \ No newline at end of file +})(); diff --git a/examples/apps/JavaScript/CompareTool/js/moment.min.js b/examples/apps/JavaScript/CompareTool/js/moment.min.js index 4e8497a9..0b40a856 100644 --- a/examples/apps/JavaScript/CompareTool/js/moment.min.js +++ b/examples/apps/JavaScript/CompareTool/js/moment.min.js @@ -3,4 +3,910 @@ // author : Tim Wood // license : MIT // momentjs.com -(function(e){function O(e,t){return function(n){return j(e.call(this,n),t)}}function M(e){return function(t){return this.lang().ordinal(e.call(this,t))}}function _(){}function D(e){H(this,e)}function P(e){var t=this._data={},n=e.years||e.year||e.y||0,r=e.months||e.month||e.M||0,i=e.weeks||e.week||e.w||0,s=e.days||e.day||e.d||0,o=e.hours||e.hour||e.h||0,u=e.minutes||e.minute||e.m||0,a=e.seconds||e.second||e.s||0,f=e.milliseconds||e.millisecond||e.ms||0;this._milliseconds=f+a*1e3+u*6e4+o*36e5,this._days=s+i*7,this._months=r+n*12,t.milliseconds=f%1e3,a+=B(f/1e3),t.seconds=a%60,u+=B(a/60),t.minutes=u%60,o+=B(u/60),t.hours=o%24,s+=B(o/24),s+=i*7,t.days=s%30,r+=B(s/30),t.months=r%12,n+=B(r/12),t.years=n}function H(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function B(e){return e<0?Math.ceil(e):Math.floor(e)}function j(e,t){var n=e+"";while(n.length68?1900:2e3);break;case"YYYY":case"YYYYY":s[0]=~~t;break;case"a":case"A":n._isPm=(t+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":s[3]=~~t;break;case"m":case"mm":s[4]=~~t;break;case"s":case"ss":s[5]=~~t;break;case"S":case"SS":case"SSS":s[6]=~~(("0."+t)*1e3);break;case"X":n._d=new Date(parseFloat(t)*1e3);break;case"Z":case"ZZ":n._useUTC=!0,r=(t+"").match(x),r&&r[1]&&(n._tzh=~~r[1]),r&&r[2]&&(n._tzm=~~r[2]),r&&r[0]==="+"&&(n._tzh=-n._tzh,n._tzm=-n._tzm)}t==null&&(n._isValid=!1)}function J(e){var t,n,r=[];if(e._d)return;for(t=0;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];r[3]+=e._tzh||0,r[4]+=e._tzm||0,n=new Date(0),e._useUTC?(n.setUTCFullYear(r[0],r[1],r[2]),n.setUTCHours(r[3],r[4],r[5],r[6])):(n.setFullYear(r[0],r[1],r[2]),n.setHours(r[3],r[4],r[5],r[6])),e._d=n}function K(e){var t=e._f.match(a),n=e._i,r,i;e._a=[];for(r=0;r0,f[4]=n,Z.apply({},f)}function tt(e,n,r){var i=r-n,s=r-e.day();return s>i&&(s-=7),s11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},calendar:function(e,t){var n=this._calendar[e];return typeof n=="function"?n.apply(t):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var i=this._relativeTime[n];return typeof i=="function"?i(e,t,n,r):i.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return typeof n=="function"?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",preparse:function(e){return e},postformat:function(e){return e},week:function(e){return tt(e,this._week.dow,this._week.doy)},_week:{dow:0,doy:6}},t=function(e,t,n){return nt({_i:e,_f:t,_l:n,_isUTC:!1})},t.utc=function(e,t,n){return nt({_useUTC:!0,_isUTC:!0,_l:n,_i:e,_f:t})},t.unix=function(e){return t(e*1e3)},t.duration=function(e,n){var r=t.isDuration(e),i=typeof e=="number",s=r?e._data:i?{}:e,o;return i&&(n?s[n]=e:s.milliseconds=e),o=new P(s),r&&e.hasOwnProperty("_lang")&&(o._lang=e._lang),o},t.version=n,t.defaultFormat=E,t.lang=function(e,n){var r;if(!e)return t.fn._lang._abbr;n?R(e,n):s[e]||U(e),t.duration.fn._lang=t.fn._lang=U(e)},t.langData=function(e){return e&&e._lang&&e._lang._abbr&&(e=e._lang._abbr),U(e)},t.isMoment=function(e){return e instanceof D},t.isDuration=function(e){return e instanceof P},t.fn=D.prototype={clone:function(){return t(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._d},toJSON:function(){return t.utc(this).format("YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return this._isValid==null&&(this._a?this._isValid=!q(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray()):this._isValid=!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(e){var n=X(this,e||t.defaultFormat);return this.lang().postformat(n)},add:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,1),this},subtract:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,-1),this},diff:function(e,n,r){var i=this._isUTC?t(e).utc():t(e).local(),s=(this.zone()-i.zone())*6e4,o,u;return n&&(n=n.replace(/s$/,"")),n==="year"||n==="month"?(o=(this.daysInMonth()+i.daysInMonth())*432e5,u=(this.year()-i.year())*12+(this.month()-i.month()),u+=(this-t(this).startOf("month")-(i-t(i).startOf("month")))/o,n==="year"&&(u/=12)):(o=this-i-s,u=n==="second"?o/1e3:n==="minute"?o/6e4:n==="hour"?o/36e5:n==="day"?o/864e5:n==="week"?o/6048e5:o),r?u:B(u)},from:function(e,n){return t.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!n)},fromNow:function(e){return this.from(t(),e)},calendar:function(){var e=this.diff(t().startOf("day"),"days",!0),n=e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(n,this))},isLeapYear:function(){var e=this.year();return e%4===0&&e%100!==0||e%400===0},isDST:function(){return this.zone()+t(e).startOf(n)},isBefore:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)<+t(e).startOf(n)},isSame:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)===+t(e).startOf(n)},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return t.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(e){var n=r((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return e==null?n:this.add("d",e-n)},isoWeek:function(e){var t=tt(this,1,4);return e==null?t:this.add("d",(e-t)*7)},week:function(e){var t=this.lang().week(this);return e==null?t:this.add("d",(e-t)*7)},lang:function(t){return t===e?this._lang:(this._lang=U(t),this)}};for(i=0;i 68 ? 1900 : 2e3); + break; + case 'YYYY': + case 'YYYYY': + s[0] = ~~t; + break; + case 'a': + case 'A': + n._isPm = (t + '').toLowerCase() === 'pm'; + break; + case 'H': + case 'HH': + case 'h': + case 'hh': + s[3] = ~~t; + break; + case 'm': + case 'mm': + s[4] = ~~t; + break; + case 's': + case 'ss': + s[5] = ~~t; + break; + case 'S': + case 'SS': + case 'SSS': + s[6] = ~~(('0.' + t) * 1e3); + break; + case 'X': + n._d = new Date(parseFloat(t) * 1e3); + break; + case 'Z': + case 'ZZ': + (n._useUTC = !0), + (r = (t + '').match(x)), + r && r[1] && (n._tzh = ~~r[1]), + r && r[2] && (n._tzm = ~~r[2]), + r && r[0] === '+' && ((n._tzh = -n._tzh), (n._tzm = -n._tzm)); + } + t == null && (n._isValid = !1); + } + function J(e) { + var t, + n, + r = []; + if (e._d) return; + for (t = 0; t < 7; t++) + e._a[t] = r[t] = e._a[t] == null ? (t === 2 ? 1 : 0) : e._a[t]; + (r[3] += e._tzh || 0), + (r[4] += e._tzm || 0), + (n = new Date(0)), + e._useUTC + ? (n.setUTCFullYear(r[0], r[1], r[2]), + n.setUTCHours(r[3], r[4], r[5], r[6])) + : (n.setFullYear(r[0], r[1], r[2]), n.setHours(r[3], r[4], r[5], r[6])), + (e._d = n); + } + function K(e) { + var t = e._f.match(a), + n = e._i, + r, + i; + e._a = []; + for (r = 0; r < t.length; r++) + (i = (V(t[r]).exec(n) || [])[0]), + i && (n = n.slice(n.indexOf(i) + i.length)), + A[t[r]] && $(t[r], i, e); + e._isPm && e._a[3] < 12 && (e._a[3] += 12), + e._isPm === !1 && e._a[3] === 12 && (e._a[3] = 0), + J(e); + } + function Q(e) { + var t, + n, + r, + i = 99, + s, + o, + u; + while (e._f.length) { + (t = H({}, e)), (t._f = e._f.pop()), K(t), (n = new D(t)); + if (n.isValid()) { + r = n; + break; + } + (u = q(t._a, n.toArray())), u < i && ((i = u), (r = n)); + } + H(e, r); + } + function G(e) { + var t, + n = e._i; + if (w.exec(n)) { + e._f = 'YYYY-MM-DDT'; + for (t = 0; t < 4; t++) + if (S[t][1].exec(n)) { + e._f += S[t][0]; + break; + } + g.exec(n) && (e._f += ' Z'), K(e); + } else e._d = new Date(n); + } + function Y(t) { + var n = t._i, + r = u.exec(n); + n === e + ? (t._d = new Date()) + : r + ? (t._d = new Date(+r[1])) + : typeof n == 'string' + ? G(t) + : I(n) + ? ((t._a = n.slice(0)), J(t)) + : (t._d = n instanceof Date ? new Date(+n) : new Date(n)); + } + function Z(e, t, n, r, i) { + return i.relativeTime(t || 1, !!n, e, r); + } + function et(e, t, n) { + var i = r(Math.abs(e) / 1e3), + s = r(i / 60), + o = r(s / 60), + u = r(o / 24), + a = r(u / 365), + f = (i < 45 && ['s', i]) || + (s === 1 && ['m']) || + (s < 45 && ['mm', s]) || + (o === 1 && ['h']) || + (o < 22 && ['hh', o]) || + (u === 1 && ['d']) || + (u <= 25 && ['dd', u]) || + (u <= 45 && ['M']) || + (u < 345 && ['MM', r(u / 30)]) || + (a === 1 && ['y']) || ['yy', a]; + return (f[2] = t), (f[3] = e > 0), (f[4] = n), Z.apply({}, f); + } + function tt(e, n, r) { + var i = r - n, + s = r - e.day(); + return ( + s > i && (s -= 7), + s < i - 7 && (s += 7), + Math.ceil(t(e).add('d', s).dayOfYear() / 7) + ); + } + function nt(e) { + var n = e._i, + r = e._f; + return n === null || n === '' + ? null + : (typeof n == 'string' && (e._i = n = U().preparse(n)), + t.isMoment(n) + ? ((e = H({}, n)), (e._d = new Date(+n._d))) + : r + ? I(r) + ? Q(e) + : K(e) + : Y(e), + new D(e)); + } + function rt(e, n) { + t.fn[e] = t.fn[e + 's'] = function (e) { + var t = this._isUTC ? 'UTC' : ''; + return e != null + ? (this._d['set' + t + n](e), this) + : this._d['get' + t + n](); + }; + } + function it(e) { + t.duration.fn[e] = function () { + return this._data[e]; + }; + } + function st(e, n) { + t.duration.fn['as' + e] = function () { + return +this / n; + }; + } + var t, + n = '2.0.0', + r = Math.round, + i, + s = {}, + o = typeof module != 'undefined' && module.exports, + u = /^\/?Date\((\-?\d+)/i, + a = + /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g, + f = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g, + l = /([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi, + c = /\d\d?/, + h = /\d{1,3}/, + p = /\d{3}/, + d = /\d{1,4}/, + v = /[+\-]?\d{1,6}/, + m = + /[0-9]*[a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF]+\s*?[\u0600-\u06FF]+/i, + g = /Z|[\+\-]\d\d:?\d\d/i, + y = /T/i, + b = /[\+\-]?\d+(\.\d{1,3})?/, + w = + /^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/, + E = 'YYYY-MM-DDTHH:mm:ssZ', + S = [ + ['HH:mm:ss.S', /(T| )\d\d:\d\d:\d\d\.\d{1,3}/], + ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/], + ['HH:mm', /(T| )\d\d:\d\d/], + ['HH', /(T| )\d\d/] + ], + x = /([\+\-]|\d\d)/gi, + T = 'Month|Date|Hours|Minutes|Seconds|Milliseconds'.split('|'), + N = { + Milliseconds: 1, + Seconds: 1e3, + Minutes: 6e4, + Hours: 36e5, + Days: 864e5, + Months: 2592e6, + Years: 31536e6 + }, + C = {}, + k = 'DDD w W M D d'.split(' '), + L = 'M D H h m s w W'.split(' '), + A = { + M: function () { + return this.month() + 1; + }, + MMM: function (e) { + return this.lang().monthsShort(this, e); + }, + MMMM: function (e) { + return this.lang().months(this, e); + }, + D: function () { + return this.date(); + }, + DDD: function () { + return this.dayOfYear(); + }, + d: function () { + return this.day(); + }, + dd: function (e) { + return this.lang().weekdaysMin(this, e); + }, + ddd: function (e) { + return this.lang().weekdaysShort(this, e); + }, + dddd: function (e) { + return this.lang().weekdays(this, e); + }, + w: function () { + return this.week(); + }, + W: function () { + return this.isoWeek(); + }, + YY: function () { + return j(this.year() % 100, 2); + }, + YYYY: function () { + return j(this.year(), 4); + }, + YYYYY: function () { + return j(this.year(), 5); + }, + a: function () { + return this.lang().meridiem(this.hours(), this.minutes(), !0); + }, + A: function () { + return this.lang().meridiem(this.hours(), this.minutes(), !1); + }, + H: function () { + return this.hours(); + }, + h: function () { + return this.hours() % 12 || 12; + }, + m: function () { + return this.minutes(); + }, + s: function () { + return this.seconds(); + }, + S: function () { + return ~~(this.milliseconds() / 100); + }, + SS: function () { + return j(~~(this.milliseconds() / 10), 2); + }, + SSS: function () { + return j(this.milliseconds(), 3); + }, + Z: function () { + var e = -this.zone(), + t = '+'; + return ( + e < 0 && ((e = -e), (t = '-')), + t + j(~~(e / 60), 2) + ':' + j(~~e % 60, 2) + ); + }, + ZZ: function () { + var e = -this.zone(), + t = '+'; + return e < 0 && ((e = -e), (t = '-')), t + j(~~((10 * e) / 6), 4); + }, + X: function () { + return this.unix(); + } + }; + while (k.length) (i = k.pop()), (A[i + 'o'] = M(A[i])); + while (L.length) (i = L.pop()), (A[i + i] = O(A[i], 2)); + (A.DDDD = O(A.DDD, 3)), + (_.prototype = { + set: function (e) { + var t, n; + for (n in e) + (t = e[n]), + typeof t == 'function' ? (this[n] = t) : (this['_' + n] = t); + }, + _months: + 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + months: function (e) { + return this._months[e.month()]; + }, + _monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split( + '_' + ), + monthsShort: function (e) { + return this._monthsShort[e.month()]; + }, + monthsParse: function (e) { + var n, r, i, s; + this._monthsParse || (this._monthsParse = []); + for (n = 0; n < 12; n++) { + this._monthsParse[n] || + ((r = t([2e3, n])), + (i = '^' + this.months(r, '') + '|^' + this.monthsShort(r, '')), + (this._monthsParse[n] = new RegExp(i.replace('.', ''), 'i'))); + if (this._monthsParse[n].test(e)) return n; + } + }, + _weekdays: + 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdays: function (e) { + return this._weekdays[e.day()]; + }, + _weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysShort: function (e) { + return this._weekdaysShort[e.day()]; + }, + _weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + weekdaysMin: function (e) { + return this._weekdaysMin[e.day()]; + }, + _longDateFormat: { + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D YYYY', + LLL: 'MMMM D YYYY LT', + LLLL: 'dddd, MMMM D YYYY LT' + }, + longDateFormat: function (e) { + var t = this._longDateFormat[e]; + return ( + !t && + this._longDateFormat[e.toUpperCase()] && + ((t = this._longDateFormat[e.toUpperCase()].replace( + /MMMM|MM|DD|dddd/g, + function (e) { + return e.slice(1); + } + )), + (this._longDateFormat[e] = t)), + t + ); + }, + meridiem: function (e, t, n) { + return e > 11 ? (n ? 'pm' : 'PM') : n ? 'am' : 'AM'; + }, + _calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[last] dddd [at] LT', + sameElse: 'L' + }, + calendar: function (e, t) { + var n = this._calendar[e]; + return typeof n == 'function' ? n.apply(t) : n; + }, + _relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }, + relativeTime: function (e, t, n, r) { + var i = this._relativeTime[n]; + return typeof i == 'function' ? i(e, t, n, r) : i.replace(/%d/i, e); + }, + pastFuture: function (e, t) { + var n = this._relativeTime[e > 0 ? 'future' : 'past']; + return typeof n == 'function' ? n(t) : n.replace(/%s/i, t); + }, + ordinal: function (e) { + return this._ordinal.replace('%d', e); + }, + _ordinal: '%d', + preparse: function (e) { + return e; + }, + postformat: function (e) { + return e; + }, + week: function (e) { + return tt(e, this._week.dow, this._week.doy); + }, + _week: { dow: 0, doy: 6 } + }), + (t = function (e, t, n) { + return nt({ _i: e, _f: t, _l: n, _isUTC: !1 }); + }), + (t.utc = function (e, t, n) { + return nt({ _useUTC: !0, _isUTC: !0, _l: n, _i: e, _f: t }); + }), + (t.unix = function (e) { + return t(e * 1e3); + }), + (t.duration = function (e, n) { + var r = t.isDuration(e), + i = typeof e == 'number', + s = r ? e._data : i ? {} : e, + o; + return ( + i && (n ? (s[n] = e) : (s.milliseconds = e)), + (o = new P(s)), + r && e.hasOwnProperty('_lang') && (o._lang = e._lang), + o + ); + }), + (t.version = n), + (t.defaultFormat = E), + (t.lang = function (e, n) { + var r; + if (!e) return t.fn._lang._abbr; + n ? R(e, n) : s[e] || U(e), (t.duration.fn._lang = t.fn._lang = U(e)); + }), + (t.langData = function (e) { + return e && e._lang && e._lang._abbr && (e = e._lang._abbr), U(e); + }), + (t.isMoment = function (e) { + return e instanceof D; + }), + (t.isDuration = function (e) { + return e instanceof P; + }), + (t.fn = D.prototype = + { + clone: function () { + return t(this); + }, + valueOf: function () { + return +this._d; + }, + unix: function () { + return Math.floor(+this._d / 1e3); + }, + toString: function () { + return this.format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + }, + toDate: function () { + return this._d; + }, + toJSON: function () { + return t.utc(this).format('YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); + }, + toArray: function () { + var e = this; + return [ + e.year(), + e.month(), + e.date(), + e.hours(), + e.minutes(), + e.seconds(), + e.milliseconds() + ]; + }, + isValid: function () { + return ( + this._isValid == null && + (this._a + ? (this._isValid = !q( + this._a, + (this._isUTC ? t.utc(this._a) : t(this._a)).toArray() + )) + : (this._isValid = !isNaN(this._d.getTime()))), + !!this._isValid + ); + }, + utc: function () { + return (this._isUTC = !0), this; + }, + local: function () { + return (this._isUTC = !1), this; + }, + format: function (e) { + var n = X(this, e || t.defaultFormat); + return this.lang().postformat(n); + }, + add: function (e, n) { + var r; + return ( + typeof e == 'string' + ? (r = t.duration(+n, e)) + : (r = t.duration(e, n)), + F(this, r, 1), + this + ); + }, + subtract: function (e, n) { + var r; + return ( + typeof e == 'string' + ? (r = t.duration(+n, e)) + : (r = t.duration(e, n)), + F(this, r, -1), + this + ); + }, + diff: function (e, n, r) { + var i = this._isUTC ? t(e).utc() : t(e).local(), + s = (this.zone() - i.zone()) * 6e4, + o, + u; + return ( + n && (n = n.replace(/s$/, '')), + n === 'year' || n === 'month' + ? ((o = (this.daysInMonth() + i.daysInMonth()) * 432e5), + (u = + (this.year() - i.year()) * 12 + (this.month() - i.month())), + (u += + (this - + t(this).startOf('month') - + (i - t(i).startOf('month'))) / + o), + n === 'year' && (u /= 12)) + : ((o = this - i - s), + (u = + n === 'second' + ? o / 1e3 + : n === 'minute' + ? o / 6e4 + : n === 'hour' + ? o / 36e5 + : n === 'day' + ? o / 864e5 + : n === 'week' + ? o / 6048e5 + : o)), + r ? u : B(u) + ); + }, + from: function (e, n) { + return t.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!n); + }, + fromNow: function (e) { + return this.from(t(), e); + }, + calendar: function () { + var e = this.diff(t().startOf('day'), 'days', !0), + n = + e < -6 + ? 'sameElse' + : e < -1 + ? 'lastWeek' + : e < 0 + ? 'lastDay' + : e < 1 + ? 'sameDay' + : e < 2 + ? 'nextDay' + : e < 7 + ? 'nextWeek' + : 'sameElse'; + return this.format(this.lang().calendar(n, this)); + }, + isLeapYear: function () { + var e = this.year(); + return (e % 4 === 0 && e % 100 !== 0) || e % 400 === 0; + }, + isDST: function () { + return ( + this.zone() < t([this.year()]).zone() || + this.zone() < t([this.year(), 5]).zone() + ); + }, + day: function (e) { + var t = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + return e == null ? t : this.add({ d: e - t }); + }, + startOf: function (e) { + e = e.replace(/s$/, ''); + switch (e) { + case 'year': + this.month(0); + case 'month': + this.date(1); + case 'week': + case 'day': + this.hours(0); + case 'hour': + this.minutes(0); + case 'minute': + this.seconds(0); + case 'second': + this.milliseconds(0); + } + return e === 'week' && this.day(0), this; + }, + endOf: function (e) { + return this.startOf(e) + .add(e.replace(/s?$/, 's'), 1) + .subtract('ms', 1); + }, + isAfter: function (e, n) { + return ( + (n = typeof n != 'undefined' ? n : 'millisecond'), + +this.clone().startOf(n) > +t(e).startOf(n) + ); + }, + isBefore: function (e, n) { + return ( + (n = typeof n != 'undefined' ? n : 'millisecond'), + +this.clone().startOf(n) < +t(e).startOf(n) + ); + }, + isSame: function (e, n) { + return ( + (n = typeof n != 'undefined' ? n : 'millisecond'), + +this.clone().startOf(n) === +t(e).startOf(n) + ); + }, + zone: function () { + return this._isUTC ? 0 : this._d.getTimezoneOffset(); + }, + daysInMonth: function () { + return t.utc([this.year(), this.month() + 1, 0]).date(); + }, + dayOfYear: function (e) { + var n = + r((t(this).startOf('day') - t(this).startOf('year')) / 864e5) + 1; + return e == null ? n : this.add('d', e - n); + }, + isoWeek: function (e) { + var t = tt(this, 1, 4); + return e == null ? t : this.add('d', (e - t) * 7); + }, + week: function (e) { + var t = this.lang().week(this); + return e == null ? t : this.add('d', (e - t) * 7); + }, + lang: function (t) { + return t === e ? this._lang : ((this._lang = U(t)), this); + } + }); + for (i = 0; i < T.length; i++) rt(T[i].toLowerCase().replace(/s$/, ''), T[i]); + rt('year', 'FullYear'), + (t.fn.days = t.fn.day), + (t.fn.weeks = t.fn.week), + (t.fn.isoWeeks = t.fn.isoWeek), + (t.duration.fn = P.prototype = + { + weeks: function () { + return B(this.days() / 7); + }, + valueOf: function () { + return ( + this._milliseconds + this._days * 864e5 + this._months * 2592e6 + ); + }, + humanize: function (e) { + var t = +this, + n = et(t, !e, this.lang()); + return ( + e && (n = this.lang().pastFuture(t, n)), this.lang().postformat(n) + ); + }, + lang: t.fn.lang + }); + for (i in N) N.hasOwnProperty(i) && (st(i, N[i]), it(i.toLowerCase())); + st('Weeks', 6048e5), + t.lang('en', { + ordinal: function (e) { + var t = e % 10, + n = + ~~((e % 100) / 10) === 1 + ? 'th' + : t === 1 + ? 'st' + : t === 2 + ? 'nd' + : t === 3 + ? 'rd' + : 'th'; + return e + n; + } + }), + o && (module.exports = t), + typeof ender == 'undefined' && (this.moment = t), + typeof define == 'function' && + define.amd && + define('moment', [], function () { + return t; + }); +}.call(this)); diff --git a/examples/apps/JavaScript/CompareTool/manifest.js b/examples/apps/JavaScript/CompareTool/manifest.js index b4ab9807..71ca6f86 100644 --- a/examples/apps/JavaScript/CompareTool/manifest.js +++ b/examples/apps/JavaScript/CompareTool/manifest.js @@ -1,52 +1,50 @@ F2_jsonpCallback_com_openf2_examples_javascript_compareTool({ - "scripts":[ - "../apps/JavaScript/CompareTool/js/angular.min.js", - "../apps/JavaScript/CompareTool/js/angular-resource.min.js", - "../apps/JavaScript/CompareTool/js/moment.min.js", - "../apps/JavaScript/CompareTool/js/compare.js", - "../apps/JavaScript/CompareTool/appclass.js" + scripts: [ + '../apps/JavaScript/CompareTool/js/angular.min.js', + '../apps/JavaScript/CompareTool/js/angular-resource.min.js', + '../apps/JavaScript/CompareTool/js/moment.min.js', + '../apps/JavaScript/CompareTool/js/compare.js', + '../apps/JavaScript/CompareTool/appclass.js' ], - "styles":[ - "../apps/JavaScript/CompareTool/css/compare.css" - ], - "apps":[ + styles: ['../apps/JavaScript/CompareTool/css/compare.css'], + apps: [ { - "html": [ + html: [ '
', - '

', - 'Examples: ', - '', - '{{symbol | uppercase}}{{$last && " " || ", "}}', - '', - '

', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '
', - '{{issue.Name}}', - '{{issue.Symbol}}', - 'Remove', - '', - '
', - '', - '', - '
', - '
{{point.label}}{{format(issue[point.field], point.format)}}
', - '

Quotes provided by http://dev.markitondemand.com/

', + '

', + 'Examples: ', + "", + '{{symbol | uppercase}}{{$last && " " || ", "}}', + '', + '

', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '
', + '{{issue.Name}}', + '{{issue.Symbol}}', + 'Remove', + '', + '
', + '', + '', + '
', + '
{{point.label}}{{format(issue[point.field], point.format)}}
', + '

Quotes provided by http://dev.markitondemand.com/

', '
' ].join('') } ] -}); \ No newline at end of file +}); diff --git a/examples/apps/JavaScript/HelloWorld/appclass.js b/examples/apps/JavaScript/HelloWorld/appclass.js index 6b7af6c4..fed27393 100644 --- a/examples/apps/JavaScript/HelloWorld/appclass.js +++ b/examples/apps/JavaScript/HelloWorld/appclass.js @@ -1,5 +1,4 @@ -F2.Apps["com_openf2_examples_javascript_helloworld"] = (function() { - +F2.Apps['com_openf2_examples_javascript_helloworld'] = (function () { var App_Class = function (appConfig, appContent, root) { this.appConfig = appConfig; this.appContent = appContent; @@ -7,48 +6,54 @@ F2.Apps["com_openf2_examples_javascript_helloworld"] = (function() { }; App_Class.prototype.init = function () { - this.$root - .on('click', 'a.testAlert', $.proxy(function() { - alert("Hello World!") - F2.log('callback fired!'); - }, this)) - .on('click', 'a.testConfirm', $.proxy(function() { - let r = confirm('Hello World!'); - if (r == true) { - F2.log('ok callback fired!'); - } else { - F2.log('cancel callback fired!'); - } - }, this)) - ; + .on( + 'click', + 'a.testAlert', + $.proxy(function () { + alert('Hello World!'); + F2.log('callback fired!'); + }, this) + ) + .on( + 'click', + 'a.testConfirm', + $.proxy(function () { + let r = confirm('Hello World!'); + if (r == true) { + F2.log('ok callback fired!'); + } else { + F2.log('cancel callback fired!'); + } + }, this) + ); - // bind symbol change event - F2.Events.on(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, $.proxy(this._handleSymbolChange, this)); + F2.Events.on( + F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, + $.proxy(this._handleSymbolChange, this) + ); }; App_Class.prototype._handleSymbolChange = function (data) { - - var symbolAlert = $("div.symbolAlert", this.$root); - symbolAlert = (symbolAlert.length) - ? symbolAlert - : this._renderSymbolAlert(); - - $("span:first", symbolAlert).text("The symbol has been changed to " + data.symbol); + var symbolAlert = $('div.symbolAlert', this.$root); + symbolAlert = symbolAlert.length ? symbolAlert : this._renderSymbolAlert(); + $('span:first', symbolAlert).text( + 'The symbol has been changed to ' + data.symbol + ); }; - App_Class.prototype._renderSymbolAlert = function() { - - return $([ + App_Class.prototype._renderSymbolAlert = function () { + return $( + [ '
', - '', - '', + '', + '', '
' - ].join('')) - .prependTo($("." + F2.Constants.Css.APP_CONTAINER,this.$root)); + ].join('') + ).prependTo($('.' + F2.Constants.Css.APP_CONTAINER, this.$root)); }; return App_Class; -})(); \ No newline at end of file +})(); diff --git a/examples/apps/JavaScript/HelloWorld/manifest.js b/examples/apps/JavaScript/HelloWorld/manifest.js index f1481522..240e81db 100644 --- a/examples/apps/JavaScript/HelloWorld/manifest.js +++ b/examples/apps/JavaScript/HelloWorld/manifest.js @@ -1,19 +1,17 @@ F2_jsonpCallback_com_openf2_examples_javascript_helloworld({ - "scripts":[ - "../apps/JavaScript/HelloWorld/appclass.js" - ], - "styles":[], - "apps":[ + scripts: ['../apps/JavaScript/HelloWorld/appclass.js'], + styles: [], + apps: [ { - "html":[ + html: [ '
', - '
', - '

Hello World! Test modals:

', - 'Alert Modal ', - 'Confirm Modal', - '
', + '
', + '

Hello World! Test modals:

', + 'Alert Modal ', + 'Confirm Modal', + '
', '
' - ].join("") + ].join('') } ] -}) \ No newline at end of file +}); diff --git a/examples/apps/JavaScript/HelloWorldLocale/appclass.js b/examples/apps/JavaScript/HelloWorldLocale/appclass.js index 7709f239..4361a968 100644 --- a/examples/apps/JavaScript/HelloWorldLocale/appclass.js +++ b/examples/apps/JavaScript/HelloWorldLocale/appclass.js @@ -1,5 +1,4 @@ -F2.Apps["com_openf2_examples_javascript_helloworldlocale"] = (function() { - +F2.Apps['com_openf2_examples_javascript_helloworldlocale'] = (function () { var App_Class = function (appConfig, appContent, root) { this.appConfig = appConfig; this.appContent = appContent; @@ -8,36 +7,46 @@ F2.Apps["com_openf2_examples_javascript_helloworldlocale"] = (function() { App_Class.prototype.init = function () { //set current locale - $('#current_locale',this.$root).html( this.appConfig.containerLocale || 'Not defined in F2.init()' ); - $('#current_locale_date',this.$root).text( this._setCurrentDate(this.appConfig.containerLocale) ); + $('#current_locale', this.$root).html( + this.appConfig.containerLocale || 'Not defined in F2.init()' + ); + $('#current_locale_date', this.$root).text( + this._setCurrentDate(this.appConfig.containerLocale) + ); // bind symbol change event - F2.Events.on(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, $.proxy(this._handleSymbolChange, this)); - F2.Events.on(F2.Constants.Events.CONTAINER_LOCALE_CHANGE, $.proxy(this._handleLocaleChange, this)); + F2.Events.on( + F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, + $.proxy(this._handleSymbolChange, this) + ); + F2.Events.on( + F2.Constants.Events.CONTAINER_LOCALE_CHANGE, + $.proxy(this._handleLocaleChange, this) + ); }; App_Class.prototype._handleSymbolChange = function (data) { - - var symbolAlert = $("div.symbolAlert", this.$root); - symbolAlert = (symbolAlert.length) - ? symbolAlert - : this._renderSymbolAlert(); - - $("span:first", symbolAlert).text("The symbol has been changed to " + data.symbol); + var symbolAlert = $('div.symbolAlert', this.$root); + symbolAlert = symbolAlert.length ? symbolAlert : this._renderSymbolAlert(); + $('span:first', symbolAlert).text( + 'The symbol has been changed to ' + data.symbol + ); }; App_Class.prototype._handleLocaleChange = function (data) { - //set current locale - $('#current_locale',this.$root).text( data.locale ); - - $('#current_locale_date',this.$root).text( this._setCurrentDate(data.locale) ); + $('#current_locale', this.$root).text(data.locale); + $('#current_locale_date', this.$root).text( + this._setCurrentDate(data.locale) + ); }; - App_Class.prototype._setCurrentDate = function(locale) { - var d = new Date(), formattedDate, month = []; + App_Class.prototype._setCurrentDate = function (locale) { + var d = new Date(), + formattedDate, + month = []; month[0] = 'January'; month[1] = 'February'; month[2] = 'March'; @@ -51,13 +60,15 @@ F2.Apps["com_openf2_examples_javascript_helloworldlocale"] = (function() { month[10] = 'November'; month[11] = 'December'; - if ('en-gb' == locale){ - formattedDate = d.getDate() + ' ' + month[ d.getMonth() ] + ' ' + d.getFullYear(); + if ('en-gb' == locale) { + formattedDate = + d.getDate() + ' ' + month[d.getMonth()] + ' ' + d.getFullYear(); } else { - formattedDate = month[ d.getMonth() ] + ' ' + d.getDate() + ', ' + d.getFullYear(); + formattedDate = + month[d.getMonth()] + ' ' + d.getDate() + ', ' + d.getFullYear(); } return formattedDate; }; return App_Class; -})(); \ No newline at end of file +})(); diff --git a/examples/apps/JavaScript/HelloWorldLocale/manifest.js b/examples/apps/JavaScript/HelloWorldLocale/manifest.js index 534b150a..982ee40d 100644 --- a/examples/apps/JavaScript/HelloWorldLocale/manifest.js +++ b/examples/apps/JavaScript/HelloWorldLocale/manifest.js @@ -1,21 +1,19 @@ F2_jsonpCallback_com_openf2_examples_javascript_helloworldlocale({ - "scripts":[ - "../apps/JavaScript/HelloWorldLocale/appclass.js" - ], - "styles":[], - "apps":[ + scripts: ['../apps/JavaScript/HelloWorldLocale/appclass.js'], + styles: [], + apps: [ { - "html":[ + html: [ '
', - '
', - '

A simple app demonstrating internationalization (i18n) support in F2.

', - '', - '

Today\'s date—properly formatted for the current locale—is:

', - '', - '

Change region in the "locale" dropdown in the menubar.

', - '
', + '
', + '

A simple app demonstrating internationalization (i18n) support in F2.

', + '', + "

Today's date—properly formatted for the current locale—is:

", + '', + '

Change region in the "locale" dropdown in the menubar.

', + '
', '
' - ].join("") + ].join('') } ] -}) \ No newline at end of file +}); diff --git a/examples/apps/JavaScript/Quote/app.css b/examples/apps/JavaScript/Quote/app.css index b0c632ae..e6be6000 100644 --- a/examples/apps/JavaScript/Quote/app.css +++ b/examples/apps/JavaScript/Quote/app.css @@ -1,5 +1,5 @@ .com_openf2_examples_javascript_quote table { - margin:0; + margin: 0; } .com_openf2_examples_javascript_quote .table th { width: 75px; @@ -9,10 +9,9 @@ white-space: nowrap; } .com_openf2_examples_javascript_quote .last { - } .com_openf2_examples_javascript_quote .last-change { - font-size:80%; + font-size: 80%; } .com_openf2_examples_javascript_quote .positive { color: green; @@ -22,6 +21,6 @@ } .com_openf2_examples_javascript_quote .input-append { - padding-bottom:7px; - padding-top:7px; -} \ No newline at end of file + padding-bottom: 7px; + padding-top: 7px; +} diff --git a/examples/apps/JavaScript/Quote/appclass.js b/examples/apps/JavaScript/Quote/appclass.js index 17f6ec09..9a02b0e5 100644 --- a/examples/apps/JavaScript/Quote/appclass.js +++ b/examples/apps/JavaScript/Quote/appclass.js @@ -1,5 +1,8 @@ -F2.Apps['com_openf2_examples_javascript_quote'] = function (appConfig, appContent, root) { - +F2.Apps['com_openf2_examples_javascript_quote'] = function ( + appConfig, + appContent, + root +) { var $root = $(root); var $caption = $('caption', $root); var $tbody = $('tbody', $root); @@ -11,16 +14,15 @@ F2.Apps['com_openf2_examples_javascript_quote'] = function (appConfig, appConten }; var _autoRefreshInterval = false; - var _getQuote = function(symbolData) { - + var _getQuote = function (symbolData) { appConfig.context = appConfig.context || {}; - if (!!symbolData){ + if (!!symbolData) { appConfig.context.symbol = symbolData.symbol; - } else if(appConfig.context.symbol) { + } else if (appConfig.context.symbol) { appConfig.context.symbol = appConfig.context.symbol; } else { - appConfig.context.symbol = 'MSFT';//default to Microsoft + appConfig.context.symbol = 'MSFT'; //default to Microsoft } $.ajax({ @@ -28,36 +30,35 @@ F2.Apps['com_openf2_examples_javascript_quote'] = function (appConfig, appConten data: { symbol: appConfig.context.symbol }, dataType: 'jsonp', success: _renderQuote, - error: function() { - - } + error: function () {} }); - _getWatchListSymbols() + _getWatchListSymbols(); }; - var _hasWatchListApp = function() { - return !!$("div.com_openf2_examples_javascript_watchlist").length; + var _hasWatchListApp = function () { + return !!$('div.com_openf2_examples_javascript_watchlist').length; }; - var _watchListHasSymbol = function(){ + var _watchListHasSymbol = function () { return F2.inArray(appConfig.context.symbol, _getWatchListSymbols()); }; - var _getWatchListSymbols = function(){ + var _getWatchListSymbols = function () { var list = []; - $('div.com_openf2_examples_javascript_watchlist tr[data-row]').each(function(idx,item){ - list.push($(item).attr('data-row')) - }); + $('div.com_openf2_examples_javascript_watchlist tr[data-row]').each( + function (idx, item) { + list.push($(item).attr('data-row')); + } + ); return list; - } - - var _initQuoteButton = function() { + }; - $('button.get-quote', $root).on('click', function(){ + var _initQuoteButton = function () { + $('button.get-quote', $root).on('click', function () { var symbol = $('.ui-autocomplete-input', $root).val(); - if(!symbol || !symbol.length){ + if (!symbol || !symbol.length) { return; } @@ -70,126 +71,173 @@ F2.Apps['com_openf2_examples_javascript_quote'] = function (appConfig, appConten input: symbol }, success: function (data) { - var result = $.grep(data, function(item){ - return item.Symbol == symbol; + var result = $.grep(data, function (item) { + return item.Symbol == symbol; }); - if(!result.length){ + if (!result.length) { return; } - _getQuote({symbol: symbol}); + _getQuote({ symbol: symbol }); } }); }); }; - var _initTypeahead = function() { - - $('input[name=lookup]', $root) - .autocomplete({ - autoFocus:true, - minLength: 0, - select: function (event, ui) { - //F2.Events.emit(F2.Constants.Events.APP_SYMBOL_CHANGE, { symbol: ui.item.value, name: ui.item.label }); - _getQuote({ symbol: ui.item.value }); - }, - source: function (request, response) { - - $.ajax({ - url: '//dev.markitondemand.com/api/Lookup/jsonp', - dataType: 'jsonp', - data: { - input: request.term - }, - success: function (data) { - response($.map(data, function (item) { + var _initTypeahead = function () { + $('input[name=lookup]', $root).autocomplete({ + autoFocus: true, + minLength: 0, + select: function (event, ui) { + //F2.Events.emit(F2.Constants.Events.APP_SYMBOL_CHANGE, { symbol: ui.item.value, name: ui.item.label }); + _getQuote({ symbol: ui.item.value }); + }, + source: function (request, response) { + $.ajax({ + url: '//dev.markitondemand.com/api/Lookup/jsonp', + dataType: 'jsonp', + data: { + input: request.term + }, + success: function (data) { + response( + $.map(data, function (item) { return { - label: item.Symbol + ' - ' + item.Name + ' (' + item.Exchange + ')', + label: + item.Symbol + + ' - ' + + item.Name + + ' (' + + item.Exchange + + ')', value: item.Symbol - } - })); - } - }); + }; + }) + ); + } + }); } }); }; - var _populateSettings = function() { - $('input[name=refreshMode][value=' + _config.refreshMode + ']', $settings).prop('checked', true); - $('input[name=autoRefresh]', $settings).prop('checked', _config.autoRefresh); + var _populateSettings = function () { + $( + 'input[name=refreshMode][value=' + _config.refreshMode + ']', + $settings + ).prop('checked', true); + $('input[name=autoRefresh]', $settings).prop( + 'checked', + _config.autoRefresh + ); }; - var _renderQuote = function(quoteData) { - - if (quoteData && quoteData.Data && quoteData.Data.Status == F2.Constants.AppStatus.SUCCESS) { - - $caption.promise().done(function() { + var _renderQuote = function (quoteData) { + if ( + quoteData && + quoteData.Data && + quoteData.Data.Status == F2.Constants.AppStatus.SUCCESS + ) { + $caption.promise().done(function () { $(this) .empty() - .append([ - '

', - '', Format.number(quoteData.Data.LastPrice, 2), '', - '', Format.number(quoteData.Data.Change, {precision:2, withColors:true}), ' ', Format.number(quoteData.Data.ChangePercent, {precision:2, withColors:true, prefix:'(', suffix:'%)'}), '', - '

' - ].join('')); + .append( + [ + '

', + '', + Format.number(quoteData.Data.LastPrice, 2), + '', + '', + Format.number(quoteData.Data.Change, { + precision: 2, + withColors: true + }), + ' ', + Format.number(quoteData.Data.ChangePercent, { + precision: 2, + withColors: true, + prefix: '(', + suffix: '%)' + }), + '', + '

' + ].join('') + ); }); - $tbody.promise().done(function() { + $tbody.promise().done(function () { $(this) .empty() - .append([ - '', + .append( + [ + '', 'Range', - '', Format.number(quoteData.Data.Low), ' - ', Format.number(quoteData.Data.High), '', - '', - '', + '', + Format.number(quoteData.Data.Low), + ' - ', + Format.number(quoteData.Data.High), + '', + '', + '', 'Open', - '', Format.number(quoteData.Data.Open), '', - '', - '', + '', + Format.number(quoteData.Data.Open), + '', + '', + '', 'Volume', - '', Format.number(quoteData.Data.Volume, {withMagnitude:true,precision:1}), '', - '', - '', + '', + Format.number(quoteData.Data.Volume, { + withMagnitude: true, + precision: 1 + }), + '', + '', + '', 'Market Cap', - '', Format.number(quoteData.Data.MarketCap, {withMagnitude:true,precision:1}), '', - '' - ].join('')); + '', + Format.number(quoteData.Data.MarketCap, { + withMagnitude: true, + precision: 1 + }), + '', + '' + ].join('') + ); }); $('span', $addToWatchlist).text(quoteData.Data.Symbol); $addToWatchlist .data('watchlist-add', quoteData.Data.Symbol) - .closest('tr').toggleClass('hide', (!_hasWatchListApp() || _watchListHasSymbol())); - + .closest('tr') + .toggleClass('hide', !_hasWatchListApp() || _watchListHasSymbol()); } else { F2.log('Un problemo!'); } }; - var _saveSettings = function() { - + var _saveSettings = function () { clearInterval(_autoRefreshInterval); _config.refreshMode = $('input[name=refreshMode]:checked', $settings).val(); - _config.autoRefresh = $('input[name=autoRefresh]', $settings).prop('checked'); + _config.autoRefresh = $('input[name=autoRefresh]', $settings).prop( + 'checked' + ); if (_config.autoRefresh) { F2.log('beginning refresh'); - _autoRefreshInterval = setInterval(function() { + _autoRefreshInterval = setInterval(function () { F2.log('refreshed'); _getQuote(); }, 30000); } - }; /** * @class Format * @static */ - var Format = (function() { + var Format = (function () { var _defaultOptions = { precision: 2, withColors: false, @@ -198,7 +246,7 @@ F2.Apps['com_openf2_examples_javascript_quote'] = function (appConfig, appConten suffix: '' }; var _magnitudes = { - 'shortcap': ['', 'K', 'M', 'B', 'T'] + shortcap: ['', 'K', 'M', 'B', 'T'] }; return { @@ -209,10 +257,13 @@ F2.Apps['com_openf2_examples_javascript_quote'] = function (appConfig, appConten * @param {object|int} [options] If int, formats to X precision. If * object, formats according to options passed */ - number:function(raw, options) { - if (!raw) { return '--'; } + number: function (raw, options) { + if (!raw) { + return '--'; + } - options = typeof options === 'number' ? { precision: options } : options; + options = + typeof options === 'number' ? { precision: options } : options; options = $.extend({}, _defaultOptions, options); var val; @@ -227,23 +278,27 @@ F2.Apps['com_openf2_examples_javascript_quote'] = function (appConfig, appConten options.magnitudeType = options.magnitudeType || 'shortcap'; options.suffix = _magnitudes[options.magnitudeType][c]; } - + val = raw.toFixed(options.precision); val = options.prefix + val + options.suffix; return !!options.withColors - ? ('' + val + '') + ? '' + + val + + '' : val; } }; })(); return { - init: function() { + init: function () { // bind container symbol change F2.Events.on( F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, - function(symbolData) { + function (symbolData) { if (_config.refreshMode == 'page') { _getQuote(symbolData); } @@ -253,36 +308,32 @@ F2.Apps['com_openf2_examples_javascript_quote'] = function (appConfig, appConten // bind app symbol change F2.Events.on( F2.Constants.Events.APP_SYMBOL_CHANGE, - function(symbolData) { + function (symbolData) { if (_config.refreshMode == 'app') { _getQuote(symbolData); } } ); - //Talk to External Watchlist App - $root.on("click", "a[data-watchlist-add]", function(e){ - - if (!_hasWatchListApp()){ - alert("The Watchlist App is not on this container."); + $root.on('click', 'a[data-watchlist-add]', function (e) { + if (!_hasWatchListApp()) { + alert('The Watchlist App is not on this container.'); } else { - - F2.Events.emit( - "F2_Examples_Watchlist_Add", - { symbol: $(this).data("watchlist-add") } - ); + F2.Events.emit('F2_Examples_Watchlist_Add', { + symbol: $(this).data('watchlist-add') + }); $(this).closest('tr').addClass('hide'); } - }); + }); // bind save settings - $root.on("click", "button.save", _saveSettings); + $root.on('click', 'button.save', _saveSettings); // init typeahead _initTypeahead(); - + // init quote button _initQuoteButton(); diff --git a/examples/apps/JavaScript/Quote/manifest.js b/examples/apps/JavaScript/Quote/manifest.js index 59a145ae..695aa60e 100644 --- a/examples/apps/JavaScript/Quote/manifest.js +++ b/examples/apps/JavaScript/Quote/manifest.js @@ -1,64 +1,60 @@ F2_jsonpCallback_com_openf2_examples_javascript_quote({ - "scripts":[ - "../apps/JavaScript/Quote/appclass.js" - ], - "styles":[ - "../apps/JavaScript/Quote/app.css" - ], - "apps":[ + scripts: ['../apps/JavaScript/Quote/appclass.js'], + styles: ['../apps/JavaScript/Quote/app.css'], + apps: [ { - "html":[ + html: [ '
', - '
', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '
', - '+Add to Watchlist', - '
', - '
', - '', - '', - '
', - '
', - '
', - '
', - '

Settings

', - 'This App can listen for symbol changes from nearby Apps or the page as a whole and automatically request a quote for the symbol.', - 'Symbol Change Mode', - '
', - '
', - '
', - 'This App can also refresh the quote every 30 seconds', - '
', - '
', - ' ', - '', - '
', - '
', - '
', - '

About

', - '

Quick Quote App v0.12.3

', - '

« Back', - '

', + '
', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '
', + '+Add to Watchlist', + '
', + '
', + '', + '', + '
', + '
', + '
', + '
', + '

Settings

', + 'This App can listen for symbol changes from nearby Apps or the page as a whole and automatically request a quote for the symbol.', + 'Symbol Change Mode', + '
', + '
', + '
', + 'This App can also refresh the quote every 30 seconds', + '
', + '
', + ' ', + '', + '
', + '
', + '
', + '

About

', + '

Quick Quote App v0.12.3

', + '

« Back', + '

', '
' - ].join("") + ].join('') } ] -}) \ No newline at end of file +}); diff --git a/examples/apps/JavaScript/Watchlist/appclass.js b/examples/apps/JavaScript/Watchlist/appclass.js index 6d0b380c..089097ca 100644 --- a/examples/apps/JavaScript/Watchlist/appclass.js +++ b/examples/apps/JavaScript/Watchlist/appclass.js @@ -1,163 +1,192 @@ -F2.Apps['com_openf2_examples_javascript_watchlist'] = (function (appConfig, appContent, root) { - - (function(){ +F2.Apps['com_openf2_examples_javascript_watchlist'] = (function ( + appConfig, + appContent, + root +) { + (function () { //http://javascript.crockford.com/remedial.html - String.prototype.supplant = function(o) { - return this.replace(/{([^{}]*)}/g, - function(a, b) { - var r = o[b]; - return typeof r === 'string' || typeof r === 'number' ? r : a; - } - ); + String.prototype.supplant = function (o) { + return this.replace(/{([^{}]*)}/g, function (a, b) { + var r = o[b]; + return typeof r === 'string' || typeof r === 'number' ? r : a; + }); }; })(); - var App = function(appConfig, appContent, root) { - this.appConfig = appConfig; - this.appContent = appContent; - this.root = root; - this.$root = $(root); - this.$settings = $('form[data-f2-view="settings"]', this.$root); - this.settings = { - allowExternalAdd: true - }; - } - - App.prototype.init = function() { + var App = function (appConfig, appContent, root) { + this.appConfig = appConfig; + this.appContent = appContent; + this.root = root; + this.$root = $(root); + this.$settings = $('form[data-f2-view="settings"]', this.$root); + this.settings = { + allowExternalAdd: true + }; + }; + + App.prototype.init = function () { this.initLocalStorage(); this.getData(); - this.initEvents(); - } - - App.prototype.DEFAULT_SYMBOLS = ["BA","BAC","GE","GS","INTC","CSCO"]; - App.prototype.COOKIE_NAME = "F2_Examples_Watchlist"; - - App.prototype.ROW = ["", - "", - "{symbol}", - "", - "{price}", - "{change} ({changePct})", - "{volume}", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "
BidAskMkt CapLast Trade
{bid}{ask}{cap}{asOfDate} {asOf}
", - "", - "" - ].join(""); + this.initEvents(); + }; - App.prototype.data = []; + App.prototype.DEFAULT_SYMBOLS = ['BA', 'BAC', 'GE', 'GS', 'INTC', 'CSCO']; + App.prototype.COOKIE_NAME = 'F2_Examples_Watchlist'; + + App.prototype.ROW = [ + "", + "", + "{symbol}", + '', + '{price}', + '{change} ({changePct})', + '{volume}', + "", + '', + "", + "", + "", + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '
BidAskMkt CapLast Trade
{bid}{ask}{cap}{asOfDate} {asOf}
', + '', + '' + ].join(''); - App.prototype.initEvents = function(){ + App.prototype.data = []; + App.prototype.initEvents = function () { //remove sym - this.$root.on("click", "a[data-remove]", $.proxy(function(e){ - e.preventDefault(); - this.deleteSymbol($(e.currentTarget).attr("data-remove")); - }, this)); + this.$root.on( + 'click', + 'a[data-remove]', + $.proxy(function (e) { + e.preventDefault(); + this.deleteSymbol($(e.currentTarget).attr('data-remove')); + }, this) + ); //add sym - this.$root.on("click", "button.add", $.proxy(function(e){ - this.addSymbol($("input[name='lookup']", this.$root).val()); - }, this)); + this.$root.on( + 'click', + 'button.add', + $.proxy(function (e) { + this.addSymbol($("input[name='lookup']", this.$root).val()); + }, this) + ); //expand row - this.$root.on("click", "tr[data-row]", $.proxy(function(e){ - var $this = $(e.currentTarget); - $this.next().toggle(); - }, this)); - - //change container context - this.$root.on("click", "a[data-context]", $.proxy(function(e){ - e.preventDefault(); - F2.Events.emit( - F2.Constants.Events.APP_SYMBOL_CHANGE, { - symbol: $(e.currentTarget).attr("data-context"), - name: $(e.currentTarget).attr("data-context-name") - } - ); - }, this)); - - //listen for this event from other apps who may send symbols - if (this.settings.allowExternalAdd){ - F2.Events.on("F2_Examples_Watchlist_Add", $.proxy(function(data){ - var symbolAlert = $("div.symbolAlert", this.$root); - symbolAlert = (symbolAlert.length) - ? symbolAlert - : this._renderSymbolAlert(); - - $("span:first", symbolAlert).text(data.symbol + " has been added."); - - this.addSymbol(data.symbol); - },this)); + this.$root.on( + 'click', + 'tr[data-row]', + $.proxy(function (e) { + var $this = $(e.currentTarget); + $this.next().toggle(); + }, this) + ); + + //change container context + this.$root.on( + 'click', + 'a[data-context]', + $.proxy(function (e) { + e.preventDefault(); + F2.Events.emit(F2.Constants.Events.APP_SYMBOL_CHANGE, { + symbol: $(e.currentTarget).attr('data-context'), + name: $(e.currentTarget).attr('data-context-name') + }); + }, this) + ); + + //listen for this event from other apps who may send symbols + if (this.settings.allowExternalAdd) { + F2.Events.on( + 'F2_Examples_Watchlist_Add', + $.proxy(function (data) { + var symbolAlert = $('div.symbolAlert', this.$root); + symbolAlert = symbolAlert.length + ? symbolAlert + : this._renderSymbolAlert(); + + $('span:first', symbolAlert).text(data.symbol + ' has been added.'); + + this.addSymbol(data.symbol); + }, this) + ); } // bind save settings - this.$root.on("click", "button.save", $.proxy(function(){ - this._saveSettings(); - },this)); - - } + this.$root.on( + 'click', + 'button.save', + $.proxy(function () { + this._saveSettings(); + }, this) + ); + }; - App.prototype._saveSettings = function(){ - this.settings.allowExternalAdd = $('input[name=allowExternalAdd]', this.$settings).is(':checked'); - } + App.prototype._saveSettings = function () { + this.settings.allowExternalAdd = $( + 'input[name=allowExternalAdd]', + this.$settings + ).is(':checked'); + }; - App.prototype._populateSettings = function(){ - $('input[name=allowExternalAdd]', this.$settings).attr('checked', this.settings.alltableswithkeys); - } + App.prototype._populateSettings = function () { + $('input[name=allowExternalAdd]', this.$settings).attr( + 'checked', + this.settings.alltableswithkeys + ); + }; - App.prototype.getSymbols = function(){ + App.prototype.getSymbols = function () { return this._retrieveStoredSymbols(); - } + }; - App.prototype.setSymbols = function(syms){ + App.prototype.setSymbols = function (syms) { this._storeSymbols(syms); - } + }; - App.prototype.addSymbol = function(sym){ - if (sym){ + App.prototype.addSymbol = function (sym) { + if (sym) { var s = this.getSymbols(); s.push(sym.toUpperCase()); this.setSymbols(s); - $("input[name='lookup']", this.$root).val("").focus(); + $("input[name='lookup']", this.$root).val('').focus(); this.getData(); } else { - alert("Please enter a symbol."); - } - } - - App.prototype.deleteSymbol = function(sym){ + alert('Please enter a symbol.'); + } + }; - var curr = this.getSymbols(), updated = []; - $.each(curr,function(idx,item){ - if (sym != item){ + App.prototype.deleteSymbol = function (sym) { + var curr = this.getSymbols(), + updated = []; + $.each(curr, function (idx, item) { + if (sym != item) { updated.push(item); } }); if (!updated.length) { - alert("You have deleted all the symbols in your watchlist. For the purposes of this example app, the default symbols have been re-added to your list.") + alert( + 'You have deleted all the symbols in your watchlist. For the purposes of this example app, the default symbols have been re-added to your list.' + ); updated = this.DEFAULT_SYMBOLS; } @@ -165,179 +194,183 @@ F2.Apps['com_openf2_examples_javascript_watchlist'] = (function (appConfig, appC this.data = []; this.getData(); - } - - App.prototype._supportsLocalStorage = function(){ - return (typeof(Storage) !== "undefined"); - } + }; - App.prototype.initLocalStorage = function(){ - if(this._supportsLocalStorage()){ + App.prototype._supportsLocalStorage = function () { + return typeof Storage !== 'undefined'; + }; - if (localStorage.F2_Examples_Watchlist == undefined || localStorage.F2_Examples_Watchlist == "" || !localStorage.F2_Examples_Watchlist){ - localStorage.F2_Examples_Watchlist = this.DEFAULT_SYMBOLS.join(","); + App.prototype.initLocalStorage = function () { + if (this._supportsLocalStorage()) { + if ( + localStorage.F2_Examples_Watchlist == undefined || + localStorage.F2_Examples_Watchlist == '' || + !localStorage.F2_Examples_Watchlist + ) { + localStorage.F2_Examples_Watchlist = this.DEFAULT_SYMBOLS.join(','); } - } else { - if (!$.cookie(this.COOKIE_NAME) || $.cookie(this.COOKIE_NAME) == undefined || $.cookie(this.COOKIE_NAME) == ""){ - $.cookie(this.COOKIE_NAME, this.DEFAULT_SYMBOLS.join(","), { expires: 10 }); + if ( + !$.cookie(this.COOKIE_NAME) || + $.cookie(this.COOKIE_NAME) == undefined || + $.cookie(this.COOKIE_NAME) == '' + ) { + $.cookie(this.COOKIE_NAME, this.DEFAULT_SYMBOLS.join(','), { + expires: 10 + }); } } + }; - } - - App.prototype._storeSymbols = function(syms){ - - if(this._supportsLocalStorage()){ - localStorage.F2_Examples_Watchlist = syms.join(","); + App.prototype._storeSymbols = function (syms) { + if (this._supportsLocalStorage()) { + localStorage.F2_Examples_Watchlist = syms.join(','); } else { - $.cookie(this.COOKIE_NAME, syms.join(","), { expires: 10 }); + $.cookie(this.COOKIE_NAME, syms.join(','), { expires: 10 }); } - } + }; - App.prototype._retrieveStoredSymbols = function(){ - if(this._supportsLocalStorage()){ - return localStorage.F2_Examples_Watchlist.split(",") || []; - } - else { - return $.cookie(this.COOKIE_NAME).split(",") || []; + App.prototype._retrieveStoredSymbols = function () { + if (this._supportsLocalStorage()) { + return localStorage.F2_Examples_Watchlist.split(',') || []; + } else { + return $.cookie(this.COOKIE_NAME).split(',') || []; } - } - - App.prototype.drawSymbolList = function(){ + }; + App.prototype.drawSymbolList = function () { var table = []; table.push( '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '' + '', + '', + '', + '', + '', + '', + '', + '', + '', + '' ); - if (this.data.length < 1){ - table.push('') + if (this.data.length < 1) { + table.push( + '' + ); } else { - $.each(this.data, $.proxy(function(idx,item){ - - item = item || {}; - - var quoteData = { - name: item.Name, - symbol: item.Symbol, - price: AppFormat.lastPrice(item.LastTradePriceOnly), - change: AppFormat.addColor(item.Change), - changePct: AppFormat.addColor(item.ChangeinPercent), - volume: AppFormat.getMagnitude(1,item.Volume,"shortcap"), - asOf: item.LastTradeTime, - asOfDate: item.LastTradeDate, - bid: AppFormat.lastPrice(item.BidRealtime), - ask: AppFormat.lastPrice(item.AskRealtime), - cap: item.MarketCapitalization - }; - - table.push(this.ROW.supplant(quoteData)); - - },this)); - } - - table.push( - '', - '
SymbolLastChange / PctVolume 
SymbolLastChange / PctVolume 
No symbols (or the Yahoo! API failed).
No symbols (or the Yahoo! API failed).
' - ); + $.each( + this.data, + $.proxy(function (idx, item) { + item = item || {}; + + var quoteData = { + name: item.Name, + symbol: item.Symbol, + price: AppFormat.lastPrice(item.LastTradePriceOnly), + change: AppFormat.addColor(item.Change), + changePct: AppFormat.addColor(item.ChangeinPercent), + volume: AppFormat.getMagnitude(1, item.Volume, 'shortcap'), + asOf: item.LastTradeTime, + asOfDate: item.LastTradeDate, + bid: AppFormat.lastPrice(item.BidRealtime), + ask: AppFormat.lastPrice(item.AskRealtime), + cap: item.MarketCapitalization + }; + + table.push(this.ROW.supplant(quoteData)); + }, this) + ); + } - $("div.watchlist", this.root).html(table.join('')); - } + table.push('', ''); - App.prototype._renderSymbolAlert = function() { + $('div.watchlist', this.root).html(table.join('')); + }; - return $([ + App.prototype._renderSymbolAlert = function () { + return $( + [ '
', - '', - '', + '', + '', '
' - ].join('')) - .prependTo($("." + F2.Constants.Css.APP_CONTAINER,this.root)); + ].join('') + ).prependTo($('.' + F2.Constants.Css.APP_CONTAINER, this.root)); }; - App.prototype.getData = function(){ - - var symInput = [], oData; + App.prototype.getData = function () { + var symInput = [], + oData; //no symbols? bail out. - if (!this.getSymbols().length){ + if (!this.getSymbols().length) { this.drawSymbolList(); return; } - $.each(this.getSymbols(),function(idx,item){ - symInput.push('"'+item+'"'); + $.each(this.getSymbols(), function (idx, item) { + symInput.push('"' + item + '"'); }); oData = { - q: 'select * from yahoo.finance.quotes where symbol in ('+ symInput.join(",") +')', + q: + 'select * from yahoo.finance.quotes where symbol in (' + + symInput.join(',') + + ')', format: 'json', env: 'store://datatables.org/alltableswithkeys' - } + }; //F2.log("data requested = ", oData); $.ajax({ - url: "http://query.yahooapis.com/v1/public/yql", + url: 'http://query.yahooapis.com/v1/public/yql', data: oData, - dataType: "jsonp", + dataType: 'jsonp', context: this - }).done(function(jqxhr,txtStatus){ - - //pretty bad response from yahoo when it fails. - //jqxhr = {"query":{"count":0,"created":"2012-10-15T21:23:19Z","lang":"en-US","results":null}}; - - //trap failed yahoo api - if (jqxhr.query.results === null){ - jqxhr.query.results = { - quote:{} + }) + .done(function (jqxhr, txtStatus) { + //pretty bad response from yahoo when it fails. + //jqxhr = {"query":{"count":0,"created":"2012-10-15T21:23:19Z","lang":"en-US","results":null}}; + + //trap failed yahoo api + if (jqxhr.query.results === null) { + jqxhr.query.results = { + quote: {} + }; } - } - this.data = []; - - //yahoo's API returns an array of objects if you ask for multiple symbols - //but a single object if you only ask for 1 symbol - if (jqxhr.query.count !== 0){ - if (jqxhr.query.count < 2){ - this.data = [jqxhr.query.results.quote] || this.data; - } else { - this.data = jqxhr.query.results.quote || this.data; - } - } + this.data = []; - this.drawSymbolList(); - - }).fail(function(jqxhr,txtStatus){ - - F2.log("OOPS. Yahoo! didn't work."); - alert("Your watchlist failed to load. Refresh."); - - }); - } + //yahoo's API returns an array of objects if you ask for multiple symbols + //but a single object if you only ask for 1 symbol + if (jqxhr.query.count !== 0) { + if (jqxhr.query.count < 2) { + this.data = [jqxhr.query.results.quote] || this.data; + } else { + this.data = jqxhr.query.results.quote || this.data; + } + } + this.drawSymbolList(); + }) + .fail(function (jqxhr, txtStatus) { + F2.log("OOPS. Yahoo! didn't work."); + alert('Your watchlist failed to load. Refresh.'); + }); + }; /** * Number format helpers */ - AppFormat = function(){ + AppFormat = function () { this.magnitudes = { - shortcap : ["", "K", "M", "B", "T"] + shortcap: ['', 'K', 'M', 'B', 'T'] }; - } + }; - AppFormat.prototype.getMagnitude = function(numDigits,value,type) { + AppFormat.prototype.getMagnitude = function (numDigits, value, type) { value = Math.abs(value); var c = 0; while (value >= 1000 && c < 4) { @@ -346,27 +379,27 @@ F2.Apps['com_openf2_examples_javascript_watchlist'] = (function (appConfig, appC } value = value.toFixed(numDigits); return value + this.magnitudes[type][c]; - } + }; - AppFormat.prototype.lastPrice = function(value){ + AppFormat.prototype.lastPrice = function (value) { value = Number(value); value = value.toFixed(2); - return "$" + value; - } - - AppFormat.prototype.addColor = function(value){ - if (value && value.length && value.charAt(0) == "+"){ - return "" + value + ""; - } else if (value && value.length && value.charAt(0) == "-"){ - return "" + value + ""; + return '$' + value; + }; + + AppFormat.prototype.addColor = function (value) { + if (value && value.length && value.charAt(0) == '+') { + return "" + value + ''; + } else if (value && value.length && value.charAt(0) == '-') { + return "" + value + ''; } else { return value; } - } + }; - AppFormat.prototype.comma = function(value) { + AppFormat.prototype.comma = function (value) { value = String(value); - if (value.length < 6 && value.indexOf(".") > -1) { + if (value.length < 6 && value.indexOf('.') > -1) { return value; } else { x = value.split('.'); @@ -378,13 +411,12 @@ F2.Apps['com_openf2_examples_javascript_watchlist'] = (function (appConfig, appC } return x1 + x2; } - } + }; AppFormat = new AppFormat(); /** * end number formatting helpers */ - return App; - -})(); \ No newline at end of file + return App; +})(); diff --git a/examples/apps/JavaScript/Watchlist/jquery.cookie.js b/examples/apps/JavaScript/Watchlist/jquery.cookie.js index 4bd3da19..745e1550 100644 --- a/examples/apps/JavaScript/Watchlist/jquery.cookie.js +++ b/examples/apps/JavaScript/Watchlist/jquery.cookie.js @@ -9,7 +9,6 @@ * http://www.opensource.org/licenses/GPL-2.0 */ (function ($, document, undefined) { - var pluses = /\+/g; function raw(s) { @@ -20,8 +19,7 @@ return decodeURIComponent(s.replace(pluses, ' ')); } - var config = $.cookie = function (key, value, options) { - + var config = ($.cookie = function (key, value, options) { // write if (value !== undefined) { options = $.extend({}, config.defaults, options); @@ -31,18 +29,21 @@ } if (typeof options.expires === 'number') { - var days = options.expires, t = options.expires = new Date(); + var days = options.expires, + t = (options.expires = new Date()); t.setDate(t.getDate() + days); } value = config.json ? JSON.stringify(value) : String(value); return (document.cookie = [ - encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value), + encodeURIComponent(key), + '=', + config.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE - options.path ? '; path=' + options.path : '', - options.domain ? '; domain=' + options.domain : '', - options.secure ? '; secure' : '' + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' ].join('')); } @@ -57,7 +58,7 @@ } return null; - }; + }); config.defaults = {}; @@ -68,5 +69,4 @@ } return false; }; - -})(jQuery, document); \ No newline at end of file +})(jQuery, document); diff --git a/examples/apps/JavaScript/Watchlist/manifest.js b/examples/apps/JavaScript/Watchlist/manifest.js index d0dedfec..00750ad4 100644 --- a/examples/apps/JavaScript/Watchlist/manifest.js +++ b/examples/apps/JavaScript/Watchlist/manifest.js @@ -1,45 +1,43 @@ F2_jsonpCallback_com_openf2_examples_javascript_watchlist({ - "scripts":[ - "../apps/JavaScript/Watchlist/jquery.cookie.js", - "../apps/JavaScript/Watchlist/moment.1.7.0.min.js", - "../apps/JavaScript/Watchlist/appclass.js" + scripts: [ + '../apps/JavaScript/Watchlist/jquery.cookie.js', + '../apps/JavaScript/Watchlist/moment.1.7.0.min.js', + '../apps/JavaScript/Watchlist/appclass.js' ], - "styles":[ - "../apps/JavaScript/Watchlist/watchlist.css" - ], - "apps":[ + styles: ['../apps/JavaScript/Watchlist/watchlist.css'], + apps: [ { - "html":[ + html: [ + '
', '
', - '
', - '
', - '
', - '', - '', - '
', - '

', - 'Market data delayed at least 15 minutes. By Yahoo!', - '

', - '
', - '
', - '

Settings

', - 'This App can listen for symbols from nearby Apps which allows other apps to add symbols to this watchlist.', - 'Allow Symbols from Nearby Apps', - '
', - '
', - ' ', - '', - '
', - '
', - '
', - '

About

', - '

Quick Quote App v0.12.3

', - '

« Back', - '

', + '
', + '
', + '', + '', + '
', + '

', + 'Market data delayed at least 15 minutes. By Yahoo!', + '

', + '
', + '
', + '

Settings

', + 'This App can listen for symbols from nearby Apps which allows other apps to add symbols to this watchlist.', + 'Allow Symbols from Nearby Apps', + '
', + '
', + ' ', + '', + '
', + '
', + '
', + '

About

', + '

Quick Quote App v0.12.3

', + '

« Back', + '

', '
' - ].join("") + ].join('') } ] -}) \ No newline at end of file +}); diff --git a/examples/apps/JavaScript/Watchlist/moment.1.7.0.min.js b/examples/apps/JavaScript/Watchlist/moment.1.7.0.min.js index 4c359231..cad336e1 100644 --- a/examples/apps/JavaScript/Watchlist/moment.1.7.0.min.js +++ b/examples/apps/JavaScript/Watchlist/moment.1.7.0.min.js @@ -3,4 +3,709 @@ // author : Tim Wood // license : MIT // momentjs.com -(function(a,b){function G(a,b,c){this._d=a,this._isUTC=!!b,this._a=a._a||null,a._a=null,this._lang=c||!1}function H(a){var b=this._data={},c=a.years||a.y||0,d=a.months||a.M||0,e=a.weeks||a.w||0,f=a.days||a.d||0,g=a.hours||a.h||0,h=a.minutes||a.m||0,i=a.seconds||a.s||0,j=a.milliseconds||a.ms||0;this._milliseconds=j+i*1e3+h*6e4+g*36e5,this._days=f+e*7,this._months=d+c*12,b.milliseconds=j%1e3,i+=I(j/1e3),b.seconds=i%60,h+=I(i/60),b.minutes=h%60,g+=I(h/60),b.hours=g%24,f+=I(g/24),f+=e*7,b.days=f%30,d+=I(f/30),b.months=d%12,c+=I(d/12),b.years=c,this._lang=!1}function I(a){return a<0?Math.ceil(a):Math.floor(a)}function J(a,b){var c=a+"";while(c.length70?1900:2e3);break;case"YYYY":c[0]=~~Math.abs(b);break;case"a":case"A":d.isPm=(b+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":c[3]=~~b;break;case"m":case"mm":c[4]=~~b;break;case"s":case"ss":c[5]=~~b;break;case"S":case"SS":case"SSS":c[6]=~~(("0."+b)*1e3);break;case"Z":case"ZZ":d.isUTC=!0,e=(b+"").match(z),e&&e[1]&&(d.tzh=~~e[1]),e&&e[2]&&(d.tzm=~~e[2]),e&&e[0]==="+"&&(d.tzh=-d.tzh,d.tzm=-d.tzm)}}function X(a,b){var c=[0,0,1,0,0,0,0],d={tzh:0,tzm:0},e=b.match(l),f,g;for(f=0;f0,j[4]=c,$.apply({},j)}function ab(a,b){c.fn[a]=function(a){var c=this._isUTC?"UTC":"";return a!=null?(this._d["set"+c+b](a),this):this._d["get"+c+b]()}}function bb(a){c.duration.fn[a]=function(){return this._data[a]}}function cb(a,b){c.duration.fn["as"+a]=function(){return+this/b}}var c,d="1.7.0",e=Math.round,f,g={},h="en",i=typeof module!="undefined"&&module.exports,j="months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"),k=/^\/?Date\((\-?\d+)/i,l=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?)/g,m=/(LT|LL?L?L?)/g,n=/(^\[)|(\\)|\]$/g,o=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,p=/\d\d?/,q=/\d{1,3}/,r=/\d{3}/,s=/\d{1,4}/,t=/[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i,u=/Z|[\+\-]\d\d:?\d\d/i,v=/T/i,w=/^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,x="YYYY-MM-DDTHH:mm:ssZ",y=[["HH:mm:ss.S",/T\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/T\d\d:\d\d:\d\d/],["HH:mm",/T\d\d:\d\d/],["HH",/T\d\d/]],z=/([\+\-]|\d\d)/gi,A="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),B={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},C={},D={M:"(a=t.month()+1)",MMM:'v("monthsShort",t.month())',MMMM:'v("months",t.month())',D:"(a=t.date())",DDD:"(a=new Date(t.year(),t.month(),t.date()),b=new Date(t.year(),0,1),a=~~(((a-b)/864e5)+1.5))",d:"(a=t.day())",dd:'v("weekdaysMin",t.day())',ddd:'v("weekdaysShort",t.day())',dddd:'v("weekdays",t.day())',w:"(a=new Date(t.year(),t.month(),t.date()-t.day()+5),b=new Date(a.getFullYear(),0,4),a=~~((a-b)/864e5/7+1.5))",YY:"p(t.year()%100,2)",YYYY:"p(t.year(),4)",a:"m(t.hours(),t.minutes(),!0)",A:"m(t.hours(),t.minutes(),!1)",H:"t.hours()",h:"t.hours()%12||12",m:"t.minutes()",s:"t.seconds()",S:"~~(t.milliseconds()/100)",SS:"p(~~(t.milliseconds()/10),2)",SSS:"p(t.milliseconds(),3)",Z:'((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(a/60),2)+":"+p(~~a%60,2)',ZZ:'((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(10*a/6),4)'},E="DDD w M D d".split(" "),F="M D H h m s w".split(" ");while(E.length)f=E.pop(),D[f+"o"]=D[f]+"+o(a)";while(F.length)f=F.pop(),D[f+f]="p("+D[f]+",2)";D.DDDD="p("+D.DDD+",3)",c=function(d,e){if(d===null||d==="")return null;var f,g;return c.isMoment(d)?new G(new a(+d._d),d._isUTC,d._lang):(e?L(e)?f=Y(d,e):f=X(d,e):(g=k.exec(d),f=d===b?new a:g?new a(+g[1]):d instanceof a?d:L(d)?N(d):typeof d=="string"?Z(d):new a(d)),new G(f))},c.utc=function(a,b){return L(a)?new G(N(a,!0),!0):(typeof a=="string"&&!u.exec(a)&&(a+=" +0000",b&&(b+=" Z")),c(a,b).utc())},c.unix=function(a){return c(a*1e3)},c.duration=function(a,b){var d=c.isDuration(a),e=typeof a=="number",f=d?a._data:e?{}:a,g;return e&&(b?f[b]=a:f.milliseconds=a),g=new H(f),d&&(g._lang=a._lang),g},c.humanizeDuration=function(a,b,d){return c.duration(a,b===!0?null:b).humanize(b===!0?!0:d)},c.version=d,c.defaultFormat=x,c.lang=function(a,b){var d;if(!a)return h;(b||!g[a])&&O(a,b);if(g[a]){for(d=0;d11?c?"pm":"PM":c?"am":"AM"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}}),c.fn=G.prototype={clone:function(){return c(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this._d.toString()},toDate:function(){return this._d},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds(),!!this._isUTC]},isValid:function(){return this._a?!M(this._a,(this._a[7]?c.utc(this):this).toArray()):!isNaN(this._d.getTime())},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(a){return U(this,a?a:c.defaultFormat)},add:function(a,b){var d=b?c.duration(+b,a):c.duration(a);return K(this,d,1),this},subtract:function(a,b){var d=b?c.duration(+b,a):c.duration(a);return K(this,d,-1),this},diff:function(a,b,d){var f=this._isUTC?c(a).utc():c(a).local(),g=(this.zone()-f.zone())*6e4,h=this._d-f._d-g,i=this.year()-f.year(),j=this.month()-f.month(),k=this.date()-f.date(),l;return b==="months"?l=i*12+j+k/30:b==="years"?l=i+(j+k/30)/12:l=b==="seconds"?h/1e3:b==="minutes"?h/6e4:b==="hours"?h/36e5:b==="days"?h/864e5:b==="weeks"?h/6048e5:h,d?l:e(l)},from:function(a,b){return c.duration(this.diff(a)).lang(this._lang).humanize(!b)},fromNow:function(a){return this.from(c(),a)},calendar:function(){var a=this.diff(c().sod(),"days",!0),b=this.lang().calendar,d=b.sameElse,e=a<-6?d:a<-1?b.lastWeek:a<0?b.lastDay:a<1?b.sameDay:a<2?b.nextDay:a<7?b.nextWeek:d;return this.format(typeof e=="function"?e.apply(this):e)},isLeapYear:function(){var a=this.year();return a%4===0&&a%100!==0||a%400===0},isDST:function(){return this.zone() 70 ? 1900 : 2e3)); + break; + case 'YYYY': + c[0] = ~~Math.abs(b); + break; + case 'a': + case 'A': + d.isPm = (b + '').toLowerCase() === 'pm'; + break; + case 'H': + case 'HH': + case 'h': + case 'hh': + c[3] = ~~b; + break; + case 'm': + case 'mm': + c[4] = ~~b; + break; + case 's': + case 'ss': + c[5] = ~~b; + break; + case 'S': + case 'SS': + case 'SSS': + c[6] = ~~(('0.' + b) * 1e3); + break; + case 'Z': + case 'ZZ': + (d.isUTC = !0), + (e = (b + '').match(z)), + e && e[1] && (d.tzh = ~~e[1]), + e && e[2] && (d.tzm = ~~e[2]), + e && e[0] === '+' && ((d.tzh = -d.tzh), (d.tzm = -d.tzm)); + } + } + function X(a, b) { + var c = [0, 0, 1, 0, 0, 0, 0], + d = { tzh: 0, tzm: 0 }, + e = b.match(l), + f, + g; + for (f = 0; f < e.length; f++) + (g = (V(e[f]).exec(a) || [])[0]), + (a = a.replace(V(e[f]), '')), + W(e[f], g, c, d); + return ( + d.isPm && c[3] < 12 && (c[3] += 12), + d.isPm === !1 && c[3] === 12 && (c[3] = 0), + (c[3] += d.tzh), + (c[4] += d.tzm), + N(c, d.isUTC) + ); + } + function Y(a, b) { + var c, + d = a.match(o) || [], + e, + f = 99, + g, + h, + i; + for (g = 0; g < b.length; g++) + (h = X(a, b[g])), + (e = U(new G(h), b[g]).match(o) || []), + (i = M(d, e)), + i < f && ((f = i), (c = h)); + return c; + } + function Z(b) { + var c = 'YYYY-MM-DDT', + d; + if (w.exec(b)) { + for (d = 0; d < 4; d++) + if (y[d][1].exec(b)) { + c += y[d][0]; + break; + } + return u.exec(b) ? X(b, c + ' Z') : X(b, c); + } + return new a(b); + } + function $(a, b, c, d, e) { + var f = e.relativeTime[a]; + return typeof f == 'function' + ? f(b || 1, !!c, a, d) + : f.replace(/%d/i, b || 1); + } + function _(a, b, c) { + var d = e(Math.abs(a) / 1e3), + f = e(d / 60), + g = e(f / 60), + h = e(g / 24), + i = e(h / 365), + j = (d < 45 && ['s', d]) || + (f === 1 && ['m']) || + (f < 45 && ['mm', f]) || + (g === 1 && ['h']) || + (g < 22 && ['hh', g]) || + (h === 1 && ['d']) || + (h <= 25 && ['dd', h]) || + (h <= 45 && ['M']) || + (h < 345 && ['MM', e(h / 30)]) || + (i === 1 && ['y']) || ['yy', i]; + return (j[2] = b), (j[3] = a > 0), (j[4] = c), $.apply({}, j); + } + function ab(a, b) { + c.fn[a] = function (a) { + var c = this._isUTC ? 'UTC' : ''; + return a != null + ? (this._d['set' + c + b](a), this) + : this._d['get' + c + b](); + }; + } + function bb(a) { + c.duration.fn[a] = function () { + return this._data[a]; + }; + } + function cb(a, b) { + c.duration.fn['as' + a] = function () { + return +this / b; + }; + } + var c, + d = '1.7.0', + e = Math.round, + f, + g = {}, + h = 'en', + i = typeof module != 'undefined' && module.exports, + j = + 'months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem'.split( + '|' + ), + k = /^\/?Date\((\-?\d+)/i, + l = + /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?)/g, + m = /(LT|LL?L?L?)/g, + n = /(^\[)|(\\)|\]$/g, + o = /([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi, + p = /\d\d?/, + q = /\d{1,3}/, + r = /\d{3}/, + s = /\d{1,4}/, + t = /[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i, + u = /Z|[\+\-]\d\d:?\d\d/i, + v = /T/i, + w = + /^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/, + x = 'YYYY-MM-DDTHH:mm:ssZ', + y = [ + ['HH:mm:ss.S', /T\d\d:\d\d:\d\d\.\d{1,3}/], + ['HH:mm:ss', /T\d\d:\d\d:\d\d/], + ['HH:mm', /T\d\d:\d\d/], + ['HH', /T\d\d/] + ], + z = /([\+\-]|\d\d)/gi, + A = 'Month|Date|Hours|Minutes|Seconds|Milliseconds'.split('|'), + B = { + Milliseconds: 1, + Seconds: 1e3, + Minutes: 6e4, + Hours: 36e5, + Days: 864e5, + Months: 2592e6, + Years: 31536e6 + }, + C = {}, + D = { + M: '(a=t.month()+1)', + MMM: 'v("monthsShort",t.month())', + MMMM: 'v("months",t.month())', + D: '(a=t.date())', + DDD: '(a=new Date(t.year(),t.month(),t.date()),b=new Date(t.year(),0,1),a=~~(((a-b)/864e5)+1.5))', + d: '(a=t.day())', + dd: 'v("weekdaysMin",t.day())', + ddd: 'v("weekdaysShort",t.day())', + dddd: 'v("weekdays",t.day())', + w: '(a=new Date(t.year(),t.month(),t.date()-t.day()+5),b=new Date(a.getFullYear(),0,4),a=~~((a-b)/864e5/7+1.5))', + YY: 'p(t.year()%100,2)', + YYYY: 'p(t.year(),4)', + a: 'm(t.hours(),t.minutes(),!0)', + A: 'm(t.hours(),t.minutes(),!1)', + H: 't.hours()', + h: 't.hours()%12||12', + m: 't.minutes()', + s: 't.seconds()', + S: '~~(t.milliseconds()/100)', + SS: 'p(~~(t.milliseconds()/10),2)', + SSS: 'p(t.milliseconds(),3)', + Z: '((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(a/60),2)+":"+p(~~a%60,2)', + ZZ: '((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(10*a/6),4)' + }, + E = 'DDD w M D d'.split(' '), + F = 'M D H h m s w'.split(' '); + while (E.length) (f = E.pop()), (D[f + 'o'] = D[f] + '+o(a)'); + while (F.length) (f = F.pop()), (D[f + f] = 'p(' + D[f] + ',2)'); + (D.DDDD = 'p(' + D.DDD + ',3)'), + (c = function (d, e) { + if (d === null || d === '') return null; + var f, g; + return c.isMoment(d) + ? new G(new a(+d._d), d._isUTC, d._lang) + : (e + ? L(e) + ? (f = Y(d, e)) + : (f = X(d, e)) + : ((g = k.exec(d)), + (f = + d === b + ? new a() + : g + ? new a(+g[1]) + : d instanceof a + ? d + : L(d) + ? N(d) + : typeof d == 'string' + ? Z(d) + : new a(d))), + new G(f)); + }), + (c.utc = function (a, b) { + return L(a) + ? new G(N(a, !0), !0) + : (typeof a == 'string' && + !u.exec(a) && + ((a += ' +0000'), b && (b += ' Z')), + c(a, b).utc()); + }), + (c.unix = function (a) { + return c(a * 1e3); + }), + (c.duration = function (a, b) { + var d = c.isDuration(a), + e = typeof a == 'number', + f = d ? a._data : e ? {} : a, + g; + return ( + e && (b ? (f[b] = a) : (f.milliseconds = a)), + (g = new H(f)), + d && (g._lang = a._lang), + g + ); + }), + (c.humanizeDuration = function (a, b, d) { + return c.duration(a, b === !0 ? null : b).humanize(b === !0 ? !0 : d); + }), + (c.version = d), + (c.defaultFormat = x), + (c.lang = function (a, b) { + var d; + if (!a) return h; + (b || !g[a]) && O(a, b); + if (g[a]) { + for (d = 0; d < j.length; d++) c[j[d]] = g[a][j[d]]; + (c.monthsParse = g[a].monthsParse), (h = a); + } + }), + (c.langData = P), + (c.isMoment = function (a) { + return a instanceof G; + }), + (c.isDuration = function (a) { + return a instanceof H; + }), + c.lang('en', { + months: + 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: + 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D YYYY', + LLL: 'MMMM D YYYY LT', + LLLL: 'dddd, MMMM D YYYY LT' + }, + meridiem: function (a, b, c) { + return a > 11 ? (c ? 'pm' : 'PM') : c ? 'am' : 'AM'; + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[last] dddd [at] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }, + ordinal: function (a) { + var b = a % 10; + return ~~((a % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + } + }), + (c.fn = G.prototype = + { + clone: function () { + return c(this); + }, + valueOf: function () { + return +this._d; + }, + unix: function () { + return Math.floor(+this._d / 1e3); + }, + toString: function () { + return this._d.toString(); + }, + toDate: function () { + return this._d; + }, + toArray: function () { + var a = this; + return [ + a.year(), + a.month(), + a.date(), + a.hours(), + a.minutes(), + a.seconds(), + a.milliseconds(), + !!this._isUTC + ]; + }, + isValid: function () { + return this._a + ? !M(this._a, (this._a[7] ? c.utc(this) : this).toArray()) + : !isNaN(this._d.getTime()); + }, + utc: function () { + return (this._isUTC = !0), this; + }, + local: function () { + return (this._isUTC = !1), this; + }, + format: function (a) { + return U(this, a ? a : c.defaultFormat); + }, + add: function (a, b) { + var d = b ? c.duration(+b, a) : c.duration(a); + return K(this, d, 1), this; + }, + subtract: function (a, b) { + var d = b ? c.duration(+b, a) : c.duration(a); + return K(this, d, -1), this; + }, + diff: function (a, b, d) { + var f = this._isUTC ? c(a).utc() : c(a).local(), + g = (this.zone() - f.zone()) * 6e4, + h = this._d - f._d - g, + i = this.year() - f.year(), + j = this.month() - f.month(), + k = this.date() - f.date(), + l; + return ( + b === 'months' + ? (l = i * 12 + j + k / 30) + : b === 'years' + ? (l = i + (j + k / 30) / 12) + : (l = + b === 'seconds' + ? h / 1e3 + : b === 'minutes' + ? h / 6e4 + : b === 'hours' + ? h / 36e5 + : b === 'days' + ? h / 864e5 + : b === 'weeks' + ? h / 6048e5 + : h), + d ? l : e(l) + ); + }, + from: function (a, b) { + return c.duration(this.diff(a)).lang(this._lang).humanize(!b); + }, + fromNow: function (a) { + return this.from(c(), a); + }, + calendar: function () { + var a = this.diff(c().sod(), 'days', !0), + b = this.lang().calendar, + d = b.sameElse, + e = + a < -6 + ? d + : a < -1 + ? b.lastWeek + : a < 0 + ? b.lastDay + : a < 1 + ? b.sameDay + : a < 2 + ? b.nextDay + : a < 7 + ? b.nextWeek + : d; + return this.format(typeof e == 'function' ? e.apply(this) : e); + }, + isLeapYear: function () { + var a = this.year(); + return (a % 4 === 0 && a % 100 !== 0) || a % 400 === 0; + }, + isDST: function () { + return ( + this.zone() < c([this.year()]).zone() || + this.zone() < c([this.year(), 5]).zone() + ); + }, + day: function (a) { + var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + return a == null ? b : this.add({ d: a - b }); + }, + startOf: function (a) { + switch (a.replace(/s$/, '')) { + case 'year': + this.month(0); + case 'month': + this.date(1); + case 'day': + this.hours(0); + case 'hour': + this.minutes(0); + case 'minute': + this.seconds(0); + case 'second': + this.milliseconds(0); + } + return this; + }, + endOf: function (a) { + return this.startOf(a) + .add(a.replace(/s?$/, 's'), 1) + .subtract('ms', 1); + }, + sod: function () { + return this.clone().startOf('day'); + }, + eod: function () { + return this.clone().endOf('day'); + }, + zone: function () { + return this._isUTC ? 0 : this._d.getTimezoneOffset(); + }, + daysInMonth: function () { + return c.utc([this.year(), this.month() + 1, 0]).date(); + }, + lang: function (a) { + return a === b ? P(this) : ((this._lang = a), this); + } + }); + for (f = 0; f < A.length; f++) ab(A[f].toLowerCase(), A[f]); + ab('year', 'FullYear'), + (c.duration.fn = H.prototype = + { + weeks: function () { + return I(this.days() / 7); + }, + valueOf: function () { + return ( + this._milliseconds + this._days * 864e5 + this._months * 2592e6 + ); + }, + humanize: function (a) { + var b = +this, + c = this.lang().relativeTime, + d = _(b, !a, this.lang()); + return a && (d = (b <= 0 ? c.past : c.future).replace(/%s/i, d)), d; + }, + lang: c.fn.lang + }); + for (f in B) B.hasOwnProperty(f) && (cb(f, B[f]), bb(f.toLowerCase())); + cb('Weeks', 6048e5), + i && (module.exports = c), + typeof ender == 'undefined' && (this.moment = c), + typeof define == 'function' && + define.amd && + define('moment', [], function () { + return c; + }); +}.call(this, Date)); diff --git a/examples/apps/JavaScript/Watchlist/watchlist.css b/examples/apps/JavaScript/Watchlist/watchlist.css index ed8da78f..02c780a5 100644 --- a/examples/apps/JavaScript/Watchlist/watchlist.css +++ b/examples/apps/JavaScript/Watchlist/watchlist.css @@ -9,11 +9,11 @@ } .com_openf2_examples_javascript_watchlist .pos { - color:green; + color: green; } .com_openf2_examples_javascript_watchlist .neg { - color:red; + color: red; } .com_openf2_examples_javascript_watchlist table table { @@ -26,4 +26,4 @@ .com_openf2_examples_javascript_watchlist table table tr { cursor: text; -} \ No newline at end of file +} diff --git a/examples/apps/PHP/F2wits/app.css b/examples/apps/PHP/F2wits/app.css index 45bfa5a6..e0137340 100644 --- a/examples/apps/PHP/F2wits/app.css +++ b/examples/apps/PHP/F2wits/app.css @@ -12,6 +12,6 @@ .com_openf2_examples_php_f2wits time { display: block; - font-size:12px; + font-size: 12px; color: #8f8f8f; -} \ No newline at end of file +} diff --git a/examples/apps/PHP/F2wits/app.js b/examples/apps/PHP/F2wits/app.js index 30250a63..31c5b655 100644 --- a/examples/apps/PHP/F2wits/app.js +++ b/examples/apps/PHP/F2wits/app.js @@ -1,125 +1,152 @@ -F2.Apps["com_openf2_examples_php_f2wits"] = (function() { - - var App_Class = function(appConfig, appContent, root) { +F2.Apps['com_openf2_examples_php_f2wits'] = (function () { + var App_Class = function (appConfig, appContent, root) { // constructor this.appConfig = appConfig; this.appContent = appContent; this.$root = $(root); //if you're using jQuery. this.$app = $("[data-f2-view='home']", this.$root); - this.symbol = "MSFT";//default to MSFT + this.symbol = 'MSFT'; //default to MSFT this.setupEvents(); - } + }; - App_Class.prototype.init = function() { + App_Class.prototype.init = function () { this.getTwits(); - } - - App_Class.prototype.setupEvents = function(){ + }; + App_Class.prototype.setupEvents = function () { F2.Events.on( - F2.Constants.Events.CONTAINER_SYMBOL_CHANGE,$.proxy(function(data){ + F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, + $.proxy(function (data) { this.symbol = data.symbol; this.init(); - },this) + }, this) ); - } + }; - App_Class.prototype.getTwits = function(){ + App_Class.prototype.getTwits = function () { $.ajax({ - url: "../apps/PHP/F2wits/stocktwits.php", + url: '../apps/PHP/F2wits/stocktwits.php', data: { symbol: this.symbol }, - type:"GET", - dataType: "JSON", + type: 'GET', + dataType: 'JSON', context: this - }).done(function(jqxhr,txtStatus){ - //F2.log(jqxhr) - this.data = jqxhr; - this.draw(); - }).fail(function(jqxhr,txtStatus){ - console.error("F2wits failed to load StockTwits data.", jqxhr, txtStatus); - this.$app.html("

An error occurred loading StockTwits data for " +this.symbol+ ".

"); - }); - } - - App_Class.prototype.draw = function(){ - + }) + .done(function (jqxhr, txtStatus) { + //F2.log(jqxhr) + this.data = jqxhr; + this.draw(); + }) + .fail(function (jqxhr, txtStatus) { + console.error( + 'F2wits failed to load StockTwits data.', + jqxhr, + txtStatus + ); + this.$app.html( + '

An error occurred loading StockTwits data for ' + + this.symbol + + '.

' + ); + }); + }; + App_Class.prototype.draw = function () { var html = []; html.push(''); - $.each(this.data.messages,$.proxy(function(idx, item){ - //body, created_at, source, symbols, user - - if (idx > 4) { return true; }//only show 5 - - var body = item.body, - created_at = moment(new Date(item.created_at)).startOf('hour').fromNow(), - id = item.id, - source = item.source, - symbols = item.symbols, - user = item.user, - symList = []; - - body = this.replaceURLWithHTMLLinks(body); - body = this.replaceDollarSigns(body); - - //build list of symbols - $.each(symbols,function(idx,item){ - symList.push( - '
  • ', + $.each( + this.data.messages, + $.proxy(function (idx, item) { + //body, created_at, source, symbols, user + + if (idx > 4) { + return true; + } //only show 5 + + var body = item.body, + created_at = moment(new Date(item.created_at)) + .startOf('hour') + .fromNow(), + id = item.id, + source = item.source, + symbols = item.symbols, + user = item.user, + symList = []; + + body = this.replaceURLWithHTMLLinks(body); + body = this.replaceDollarSigns(body); + + //build list of symbols + $.each(symbols, function (idx, item) { + symList.push( + '
  • ', //'$',item.symbol,'', //' | ', - '',item.symbol,'', - '
  • ' - ); - }); - - html.push( - '', - '', + '', + item.symbol, + '', + '' + ); + }); + + html.push( + '', + '', '', - '' - ); - },this)); + '' + ); + }, this) + ); html.push('
    ', - body, - '
    ', - '', - '
    ', + body, + '
    ', + '', + '
    ', '
    '); this.$app.html(html.join('')); //assign event to change container focus - $("a.focus",this.$app).click(function(){ - F2.Events.emit( - F2.Constants.Events.APP_SYMBOL_CHANGE, - { - symbol: $(this).attr("data-symbol"), - name: $(this).attr("data-symbol") - } - ); + $('a.focus', this.$app).click(function () { + F2.Events.emit(F2.Constants.Events.APP_SYMBOL_CHANGE, { + symbol: $(this).attr('data-symbol'), + name: $(this).attr('data-symbol') + }); }); - } + }; //http://stackoverflow.com/questions/37684/how-to-replace-plain-urls-with-links - App_Class.prototype.replaceURLWithHTMLLinks = function(text){ - var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; - return text.replace(exp,"$1"); - } - - App_Class.prototype.replaceDollarSigns = function(text){ - var exp = /\$([A-Za-z0-9_]+)/ig; + App_Class.prototype.replaceURLWithHTMLLinks = function (text) { + var exp = + /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi; + return text.replace(exp, "$1"); + }; + + App_Class.prototype.replaceDollarSigns = function (text) { + var exp = /\$([A-Za-z0-9_]+)/gi; //use this to link to StockTwits.com //return text.replace(exp,"$$$1"); //use this to apply focus to container - return text.replace(exp,"$$$1"); - } + return text.replace( + exp, + "$$$1" + ); + }; return App_Class; -})(); \ No newline at end of file +})(); diff --git a/examples/apps/PHP/F2wits/manifest.js b/examples/apps/PHP/F2wits/manifest.js index a3df8602..5ed497f1 100644 --- a/examples/apps/PHP/F2wits/manifest.js +++ b/examples/apps/PHP/F2wits/manifest.js @@ -1,14 +1,12 @@ F2_jsonpCallback_com_openf2_examples_php_f2wits({ - "scripts":[ - "../apps/PHP/F2wits/moment.1.7.0.min.js", - "../apps/PHP/F2wits/app.js" - ], - "styles":[ - "../apps/PHP/F2wits/app.css" - ], - "apps":[{ - "html":[ - '
    ' - ].join("") - }] -}) \ No newline at end of file + scripts: [ + '../apps/PHP/F2wits/moment.1.7.0.min.js', + '../apps/PHP/F2wits/app.js' + ], + styles: ['../apps/PHP/F2wits/app.css'], + apps: [ + { + html: ['
    '].join('') + } + ] +}); diff --git a/examples/apps/PHP/F2wits/moment.1.7.0.min.js b/examples/apps/PHP/F2wits/moment.1.7.0.min.js index 4c359231..cad336e1 100644 --- a/examples/apps/PHP/F2wits/moment.1.7.0.min.js +++ b/examples/apps/PHP/F2wits/moment.1.7.0.min.js @@ -3,4 +3,709 @@ // author : Tim Wood // license : MIT // momentjs.com -(function(a,b){function G(a,b,c){this._d=a,this._isUTC=!!b,this._a=a._a||null,a._a=null,this._lang=c||!1}function H(a){var b=this._data={},c=a.years||a.y||0,d=a.months||a.M||0,e=a.weeks||a.w||0,f=a.days||a.d||0,g=a.hours||a.h||0,h=a.minutes||a.m||0,i=a.seconds||a.s||0,j=a.milliseconds||a.ms||0;this._milliseconds=j+i*1e3+h*6e4+g*36e5,this._days=f+e*7,this._months=d+c*12,b.milliseconds=j%1e3,i+=I(j/1e3),b.seconds=i%60,h+=I(i/60),b.minutes=h%60,g+=I(h/60),b.hours=g%24,f+=I(g/24),f+=e*7,b.days=f%30,d+=I(f/30),b.months=d%12,c+=I(d/12),b.years=c,this._lang=!1}function I(a){return a<0?Math.ceil(a):Math.floor(a)}function J(a,b){var c=a+"";while(c.length70?1900:2e3);break;case"YYYY":c[0]=~~Math.abs(b);break;case"a":case"A":d.isPm=(b+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":c[3]=~~b;break;case"m":case"mm":c[4]=~~b;break;case"s":case"ss":c[5]=~~b;break;case"S":case"SS":case"SSS":c[6]=~~(("0."+b)*1e3);break;case"Z":case"ZZ":d.isUTC=!0,e=(b+"").match(z),e&&e[1]&&(d.tzh=~~e[1]),e&&e[2]&&(d.tzm=~~e[2]),e&&e[0]==="+"&&(d.tzh=-d.tzh,d.tzm=-d.tzm)}}function X(a,b){var c=[0,0,1,0,0,0,0],d={tzh:0,tzm:0},e=b.match(l),f,g;for(f=0;f0,j[4]=c,$.apply({},j)}function ab(a,b){c.fn[a]=function(a){var c=this._isUTC?"UTC":"";return a!=null?(this._d["set"+c+b](a),this):this._d["get"+c+b]()}}function bb(a){c.duration.fn[a]=function(){return this._data[a]}}function cb(a,b){c.duration.fn["as"+a]=function(){return+this/b}}var c,d="1.7.0",e=Math.round,f,g={},h="en",i=typeof module!="undefined"&&module.exports,j="months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"),k=/^\/?Date\((\-?\d+)/i,l=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?)/g,m=/(LT|LL?L?L?)/g,n=/(^\[)|(\\)|\]$/g,o=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,p=/\d\d?/,q=/\d{1,3}/,r=/\d{3}/,s=/\d{1,4}/,t=/[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i,u=/Z|[\+\-]\d\d:?\d\d/i,v=/T/i,w=/^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,x="YYYY-MM-DDTHH:mm:ssZ",y=[["HH:mm:ss.S",/T\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/T\d\d:\d\d:\d\d/],["HH:mm",/T\d\d:\d\d/],["HH",/T\d\d/]],z=/([\+\-]|\d\d)/gi,A="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),B={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},C={},D={M:"(a=t.month()+1)",MMM:'v("monthsShort",t.month())',MMMM:'v("months",t.month())',D:"(a=t.date())",DDD:"(a=new Date(t.year(),t.month(),t.date()),b=new Date(t.year(),0,1),a=~~(((a-b)/864e5)+1.5))",d:"(a=t.day())",dd:'v("weekdaysMin",t.day())',ddd:'v("weekdaysShort",t.day())',dddd:'v("weekdays",t.day())',w:"(a=new Date(t.year(),t.month(),t.date()-t.day()+5),b=new Date(a.getFullYear(),0,4),a=~~((a-b)/864e5/7+1.5))",YY:"p(t.year()%100,2)",YYYY:"p(t.year(),4)",a:"m(t.hours(),t.minutes(),!0)",A:"m(t.hours(),t.minutes(),!1)",H:"t.hours()",h:"t.hours()%12||12",m:"t.minutes()",s:"t.seconds()",S:"~~(t.milliseconds()/100)",SS:"p(~~(t.milliseconds()/10),2)",SSS:"p(t.milliseconds(),3)",Z:'((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(a/60),2)+":"+p(~~a%60,2)',ZZ:'((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(10*a/6),4)'},E="DDD w M D d".split(" "),F="M D H h m s w".split(" ");while(E.length)f=E.pop(),D[f+"o"]=D[f]+"+o(a)";while(F.length)f=F.pop(),D[f+f]="p("+D[f]+",2)";D.DDDD="p("+D.DDD+",3)",c=function(d,e){if(d===null||d==="")return null;var f,g;return c.isMoment(d)?new G(new a(+d._d),d._isUTC,d._lang):(e?L(e)?f=Y(d,e):f=X(d,e):(g=k.exec(d),f=d===b?new a:g?new a(+g[1]):d instanceof a?d:L(d)?N(d):typeof d=="string"?Z(d):new a(d)),new G(f))},c.utc=function(a,b){return L(a)?new G(N(a,!0),!0):(typeof a=="string"&&!u.exec(a)&&(a+=" +0000",b&&(b+=" Z")),c(a,b).utc())},c.unix=function(a){return c(a*1e3)},c.duration=function(a,b){var d=c.isDuration(a),e=typeof a=="number",f=d?a._data:e?{}:a,g;return e&&(b?f[b]=a:f.milliseconds=a),g=new H(f),d&&(g._lang=a._lang),g},c.humanizeDuration=function(a,b,d){return c.duration(a,b===!0?null:b).humanize(b===!0?!0:d)},c.version=d,c.defaultFormat=x,c.lang=function(a,b){var d;if(!a)return h;(b||!g[a])&&O(a,b);if(g[a]){for(d=0;d11?c?"pm":"PM":c?"am":"AM"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}}),c.fn=G.prototype={clone:function(){return c(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this._d.toString()},toDate:function(){return this._d},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds(),!!this._isUTC]},isValid:function(){return this._a?!M(this._a,(this._a[7]?c.utc(this):this).toArray()):!isNaN(this._d.getTime())},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(a){return U(this,a?a:c.defaultFormat)},add:function(a,b){var d=b?c.duration(+b,a):c.duration(a);return K(this,d,1),this},subtract:function(a,b){var d=b?c.duration(+b,a):c.duration(a);return K(this,d,-1),this},diff:function(a,b,d){var f=this._isUTC?c(a).utc():c(a).local(),g=(this.zone()-f.zone())*6e4,h=this._d-f._d-g,i=this.year()-f.year(),j=this.month()-f.month(),k=this.date()-f.date(),l;return b==="months"?l=i*12+j+k/30:b==="years"?l=i+(j+k/30)/12:l=b==="seconds"?h/1e3:b==="minutes"?h/6e4:b==="hours"?h/36e5:b==="days"?h/864e5:b==="weeks"?h/6048e5:h,d?l:e(l)},from:function(a,b){return c.duration(this.diff(a)).lang(this._lang).humanize(!b)},fromNow:function(a){return this.from(c(),a)},calendar:function(){var a=this.diff(c().sod(),"days",!0),b=this.lang().calendar,d=b.sameElse,e=a<-6?d:a<-1?b.lastWeek:a<0?b.lastDay:a<1?b.sameDay:a<2?b.nextDay:a<7?b.nextWeek:d;return this.format(typeof e=="function"?e.apply(this):e)},isLeapYear:function(){var a=this.year();return a%4===0&&a%100!==0||a%400===0},isDST:function(){return this.zone() 70 ? 1900 : 2e3)); + break; + case 'YYYY': + c[0] = ~~Math.abs(b); + break; + case 'a': + case 'A': + d.isPm = (b + '').toLowerCase() === 'pm'; + break; + case 'H': + case 'HH': + case 'h': + case 'hh': + c[3] = ~~b; + break; + case 'm': + case 'mm': + c[4] = ~~b; + break; + case 's': + case 'ss': + c[5] = ~~b; + break; + case 'S': + case 'SS': + case 'SSS': + c[6] = ~~(('0.' + b) * 1e3); + break; + case 'Z': + case 'ZZ': + (d.isUTC = !0), + (e = (b + '').match(z)), + e && e[1] && (d.tzh = ~~e[1]), + e && e[2] && (d.tzm = ~~e[2]), + e && e[0] === '+' && ((d.tzh = -d.tzh), (d.tzm = -d.tzm)); + } + } + function X(a, b) { + var c = [0, 0, 1, 0, 0, 0, 0], + d = { tzh: 0, tzm: 0 }, + e = b.match(l), + f, + g; + for (f = 0; f < e.length; f++) + (g = (V(e[f]).exec(a) || [])[0]), + (a = a.replace(V(e[f]), '')), + W(e[f], g, c, d); + return ( + d.isPm && c[3] < 12 && (c[3] += 12), + d.isPm === !1 && c[3] === 12 && (c[3] = 0), + (c[3] += d.tzh), + (c[4] += d.tzm), + N(c, d.isUTC) + ); + } + function Y(a, b) { + var c, + d = a.match(o) || [], + e, + f = 99, + g, + h, + i; + for (g = 0; g < b.length; g++) + (h = X(a, b[g])), + (e = U(new G(h), b[g]).match(o) || []), + (i = M(d, e)), + i < f && ((f = i), (c = h)); + return c; + } + function Z(b) { + var c = 'YYYY-MM-DDT', + d; + if (w.exec(b)) { + for (d = 0; d < 4; d++) + if (y[d][1].exec(b)) { + c += y[d][0]; + break; + } + return u.exec(b) ? X(b, c + ' Z') : X(b, c); + } + return new a(b); + } + function $(a, b, c, d, e) { + var f = e.relativeTime[a]; + return typeof f == 'function' + ? f(b || 1, !!c, a, d) + : f.replace(/%d/i, b || 1); + } + function _(a, b, c) { + var d = e(Math.abs(a) / 1e3), + f = e(d / 60), + g = e(f / 60), + h = e(g / 24), + i = e(h / 365), + j = (d < 45 && ['s', d]) || + (f === 1 && ['m']) || + (f < 45 && ['mm', f]) || + (g === 1 && ['h']) || + (g < 22 && ['hh', g]) || + (h === 1 && ['d']) || + (h <= 25 && ['dd', h]) || + (h <= 45 && ['M']) || + (h < 345 && ['MM', e(h / 30)]) || + (i === 1 && ['y']) || ['yy', i]; + return (j[2] = b), (j[3] = a > 0), (j[4] = c), $.apply({}, j); + } + function ab(a, b) { + c.fn[a] = function (a) { + var c = this._isUTC ? 'UTC' : ''; + return a != null + ? (this._d['set' + c + b](a), this) + : this._d['get' + c + b](); + }; + } + function bb(a) { + c.duration.fn[a] = function () { + return this._data[a]; + }; + } + function cb(a, b) { + c.duration.fn['as' + a] = function () { + return +this / b; + }; + } + var c, + d = '1.7.0', + e = Math.round, + f, + g = {}, + h = 'en', + i = typeof module != 'undefined' && module.exports, + j = + 'months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem'.split( + '|' + ), + k = /^\/?Date\((\-?\d+)/i, + l = + /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?)/g, + m = /(LT|LL?L?L?)/g, + n = /(^\[)|(\\)|\]$/g, + o = /([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi, + p = /\d\d?/, + q = /\d{1,3}/, + r = /\d{3}/, + s = /\d{1,4}/, + t = /[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i, + u = /Z|[\+\-]\d\d:?\d\d/i, + v = /T/i, + w = + /^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/, + x = 'YYYY-MM-DDTHH:mm:ssZ', + y = [ + ['HH:mm:ss.S', /T\d\d:\d\d:\d\d\.\d{1,3}/], + ['HH:mm:ss', /T\d\d:\d\d:\d\d/], + ['HH:mm', /T\d\d:\d\d/], + ['HH', /T\d\d/] + ], + z = /([\+\-]|\d\d)/gi, + A = 'Month|Date|Hours|Minutes|Seconds|Milliseconds'.split('|'), + B = { + Milliseconds: 1, + Seconds: 1e3, + Minutes: 6e4, + Hours: 36e5, + Days: 864e5, + Months: 2592e6, + Years: 31536e6 + }, + C = {}, + D = { + M: '(a=t.month()+1)', + MMM: 'v("monthsShort",t.month())', + MMMM: 'v("months",t.month())', + D: '(a=t.date())', + DDD: '(a=new Date(t.year(),t.month(),t.date()),b=new Date(t.year(),0,1),a=~~(((a-b)/864e5)+1.5))', + d: '(a=t.day())', + dd: 'v("weekdaysMin",t.day())', + ddd: 'v("weekdaysShort",t.day())', + dddd: 'v("weekdays",t.day())', + w: '(a=new Date(t.year(),t.month(),t.date()-t.day()+5),b=new Date(a.getFullYear(),0,4),a=~~((a-b)/864e5/7+1.5))', + YY: 'p(t.year()%100,2)', + YYYY: 'p(t.year(),4)', + a: 'm(t.hours(),t.minutes(),!0)', + A: 'm(t.hours(),t.minutes(),!1)', + H: 't.hours()', + h: 't.hours()%12||12', + m: 't.minutes()', + s: 't.seconds()', + S: '~~(t.milliseconds()/100)', + SS: 'p(~~(t.milliseconds()/10),2)', + SSS: 'p(t.milliseconds(),3)', + Z: '((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(a/60),2)+":"+p(~~a%60,2)', + ZZ: '((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(10*a/6),4)' + }, + E = 'DDD w M D d'.split(' '), + F = 'M D H h m s w'.split(' '); + while (E.length) (f = E.pop()), (D[f + 'o'] = D[f] + '+o(a)'); + while (F.length) (f = F.pop()), (D[f + f] = 'p(' + D[f] + ',2)'); + (D.DDDD = 'p(' + D.DDD + ',3)'), + (c = function (d, e) { + if (d === null || d === '') return null; + var f, g; + return c.isMoment(d) + ? new G(new a(+d._d), d._isUTC, d._lang) + : (e + ? L(e) + ? (f = Y(d, e)) + : (f = X(d, e)) + : ((g = k.exec(d)), + (f = + d === b + ? new a() + : g + ? new a(+g[1]) + : d instanceof a + ? d + : L(d) + ? N(d) + : typeof d == 'string' + ? Z(d) + : new a(d))), + new G(f)); + }), + (c.utc = function (a, b) { + return L(a) + ? new G(N(a, !0), !0) + : (typeof a == 'string' && + !u.exec(a) && + ((a += ' +0000'), b && (b += ' Z')), + c(a, b).utc()); + }), + (c.unix = function (a) { + return c(a * 1e3); + }), + (c.duration = function (a, b) { + var d = c.isDuration(a), + e = typeof a == 'number', + f = d ? a._data : e ? {} : a, + g; + return ( + e && (b ? (f[b] = a) : (f.milliseconds = a)), + (g = new H(f)), + d && (g._lang = a._lang), + g + ); + }), + (c.humanizeDuration = function (a, b, d) { + return c.duration(a, b === !0 ? null : b).humanize(b === !0 ? !0 : d); + }), + (c.version = d), + (c.defaultFormat = x), + (c.lang = function (a, b) { + var d; + if (!a) return h; + (b || !g[a]) && O(a, b); + if (g[a]) { + for (d = 0; d < j.length; d++) c[j[d]] = g[a][j[d]]; + (c.monthsParse = g[a].monthsParse), (h = a); + } + }), + (c.langData = P), + (c.isMoment = function (a) { + return a instanceof G; + }), + (c.isDuration = function (a) { + return a instanceof H; + }), + c.lang('en', { + months: + 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: + 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D YYYY', + LLL: 'MMMM D YYYY LT', + LLLL: 'dddd, MMMM D YYYY LT' + }, + meridiem: function (a, b, c) { + return a > 11 ? (c ? 'pm' : 'PM') : c ? 'am' : 'AM'; + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[last] dddd [at] LT', + sameElse: 'L' + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }, + ordinal: function (a) { + var b = a % 10; + return ~~((a % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + } + }), + (c.fn = G.prototype = + { + clone: function () { + return c(this); + }, + valueOf: function () { + return +this._d; + }, + unix: function () { + return Math.floor(+this._d / 1e3); + }, + toString: function () { + return this._d.toString(); + }, + toDate: function () { + return this._d; + }, + toArray: function () { + var a = this; + return [ + a.year(), + a.month(), + a.date(), + a.hours(), + a.minutes(), + a.seconds(), + a.milliseconds(), + !!this._isUTC + ]; + }, + isValid: function () { + return this._a + ? !M(this._a, (this._a[7] ? c.utc(this) : this).toArray()) + : !isNaN(this._d.getTime()); + }, + utc: function () { + return (this._isUTC = !0), this; + }, + local: function () { + return (this._isUTC = !1), this; + }, + format: function (a) { + return U(this, a ? a : c.defaultFormat); + }, + add: function (a, b) { + var d = b ? c.duration(+b, a) : c.duration(a); + return K(this, d, 1), this; + }, + subtract: function (a, b) { + var d = b ? c.duration(+b, a) : c.duration(a); + return K(this, d, -1), this; + }, + diff: function (a, b, d) { + var f = this._isUTC ? c(a).utc() : c(a).local(), + g = (this.zone() - f.zone()) * 6e4, + h = this._d - f._d - g, + i = this.year() - f.year(), + j = this.month() - f.month(), + k = this.date() - f.date(), + l; + return ( + b === 'months' + ? (l = i * 12 + j + k / 30) + : b === 'years' + ? (l = i + (j + k / 30) / 12) + : (l = + b === 'seconds' + ? h / 1e3 + : b === 'minutes' + ? h / 6e4 + : b === 'hours' + ? h / 36e5 + : b === 'days' + ? h / 864e5 + : b === 'weeks' + ? h / 6048e5 + : h), + d ? l : e(l) + ); + }, + from: function (a, b) { + return c.duration(this.diff(a)).lang(this._lang).humanize(!b); + }, + fromNow: function (a) { + return this.from(c(), a); + }, + calendar: function () { + var a = this.diff(c().sod(), 'days', !0), + b = this.lang().calendar, + d = b.sameElse, + e = + a < -6 + ? d + : a < -1 + ? b.lastWeek + : a < 0 + ? b.lastDay + : a < 1 + ? b.sameDay + : a < 2 + ? b.nextDay + : a < 7 + ? b.nextWeek + : d; + return this.format(typeof e == 'function' ? e.apply(this) : e); + }, + isLeapYear: function () { + var a = this.year(); + return (a % 4 === 0 && a % 100 !== 0) || a % 400 === 0; + }, + isDST: function () { + return ( + this.zone() < c([this.year()]).zone() || + this.zone() < c([this.year(), 5]).zone() + ); + }, + day: function (a) { + var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + return a == null ? b : this.add({ d: a - b }); + }, + startOf: function (a) { + switch (a.replace(/s$/, '')) { + case 'year': + this.month(0); + case 'month': + this.date(1); + case 'day': + this.hours(0); + case 'hour': + this.minutes(0); + case 'minute': + this.seconds(0); + case 'second': + this.milliseconds(0); + } + return this; + }, + endOf: function (a) { + return this.startOf(a) + .add(a.replace(/s?$/, 's'), 1) + .subtract('ms', 1); + }, + sod: function () { + return this.clone().startOf('day'); + }, + eod: function () { + return this.clone().endOf('day'); + }, + zone: function () { + return this._isUTC ? 0 : this._d.getTimezoneOffset(); + }, + daysInMonth: function () { + return c.utc([this.year(), this.month() + 1, 0]).date(); + }, + lang: function (a) { + return a === b ? P(this) : ((this._lang = a), this); + } + }); + for (f = 0; f < A.length; f++) ab(A[f].toLowerCase(), A[f]); + ab('year', 'FullYear'), + (c.duration.fn = H.prototype = + { + weeks: function () { + return I(this.days() / 7); + }, + valueOf: function () { + return ( + this._milliseconds + this._days * 864e5 + this._months * 2592e6 + ); + }, + humanize: function (a) { + var b = +this, + c = this.lang().relativeTime, + d = _(b, !a, this.lang()); + return a && (d = (b <= 0 ? c.past : c.future).replace(/%s/i, d)), d; + }, + lang: c.fn.lang + }); + for (f in B) B.hasOwnProperty(f) && (cb(f, B[f]), bb(f.toLowerCase())); + cb('Weeks', 6048e5), + i && (module.exports = c), + typeof ender == 'undefined' && (this.moment = c), + typeof define == 'function' && + define.amd && + define('moment', [], function () { + return c; + }); +}.call(this, Date)); diff --git a/examples/apps/PHP/HelloWorld/appclass.js b/examples/apps/PHP/HelloWorld/appclass.js index 4f520b13..eb59f6da 100644 --- a/examples/apps/PHP/HelloWorld/appclass.js +++ b/examples/apps/PHP/HelloWorld/appclass.js @@ -1,5 +1,4 @@ -F2.Apps["com_openf2_examples_php_helloworld"] = (function() { - +F2.Apps['com_openf2_examples_php_helloworld'] = (function () { var App_Class = function (appConfig, appContent, root) { this.appConfig = appConfig; this.appContent = appContent; @@ -7,45 +6,52 @@ F2.Apps["com_openf2_examples_php_helloworld"] = (function() { }; App_Class.prototype.init = function () { - - $('a.testAlert', this.$root).on('click', $.proxy(function() { - alert("Hello World!"); - F2.log('callback fired!'); - }, this)); - - $('a.testConfirm', this.$root).on('click', $.proxy(function() { - let r = confirm('Hello World!'); - if (r == true) { - F2.log('ok callback fired!'); - } else { - F2.log('cancel callback fired!'); - } - }, this)); + $('a.testAlert', this.$root).on( + 'click', + $.proxy(function () { + alert('Hello World!'); + F2.log('callback fired!'); + }, this) + ); + + $('a.testConfirm', this.$root).on( + 'click', + $.proxy(function () { + let r = confirm('Hello World!'); + if (r == true) { + F2.log('ok callback fired!'); + } else { + F2.log('cancel callback fired!'); + } + }, this) + ); // bind symbol change event - F2.Events.on(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, $.proxy(this._handleSymbolChange, this)); + F2.Events.on( + F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, + $.proxy(this._handleSymbolChange, this) + ); }; App_Class.prototype._handleSymbolChange = function (data) { - - var symbolAlert = $("div.symbolAlert", this.$root); - symbolAlert = (symbolAlert.length) - ? symbolAlert - : this._renderSymbolAlert(); + var symbolAlert = $('div.symbolAlert', this.$root); + symbolAlert = symbolAlert.length ? symbolAlert : this._renderSymbolAlert(); - $("span:first", symbolAlert).text("The symbol has been changed to " + data.symbol); + $('span:first', symbolAlert).text( + 'The symbol has been changed to ' + data.symbol + ); }; - App_Class.prototype._renderSymbolAlert = function() { - - return $([ + App_Class.prototype._renderSymbolAlert = function () { + return $( + [ '
    ', - '', - '', + '', + '', '
    ' - ].join('')) - .prependTo($("." + F2.Constants.Css.APP_CONTAINER,this.$root)); + ].join('') + ).prependTo($('.' + F2.Constants.Css.APP_CONTAINER, this.$root)); }; return App_Class; -})(); \ No newline at end of file +})(); diff --git a/examples/apps/PHP/MarketNews/app.css b/examples/apps/PHP/MarketNews/app.css index 7eb299cb..b6e38f16 100644 --- a/examples/apps/PHP/MarketNews/app.css +++ b/examples/apps/PHP/MarketNews/app.css @@ -1,29 +1,29 @@ .com_openf2_examples_php_marketnews li { - border-bottom:1px solid #DDD; - padding:0 3px 10px; + border-bottom: 1px solid #ddd; + padding: 0 3px 10px; } .com_openf2_examples_php_marketnews li + li { - padding-top:10px; + padding-top: 10px; } .com_openf2_examples_php_marketnews header a { - font-size:18px; - padding-bottom:10px; + font-size: 18px; + padding-bottom: 10px; } .com_openf2_examples_php_marketnews header time { - color:#8F8F8F; - display:block; - font-size:11px; + color: #8f8f8f; + display: block; + font-size: 11px; } .com_openf2_examples_php_marketnews summary { - margin-top:5px; + margin-top: 5px; } .com_openf2_examples_php_marketnews p { - margin-bottom:0; + margin-bottom: 0; } .com_openf2_examples_php_marketnews img { - padding-right:15px; + padding-right: 15px; } .com_openf2_examples_php_marketnews footer { - font-size:10px; - padding:0 3px 10px; + font-size: 10px; + padding: 0 3px 10px; } diff --git a/examples/apps/PHP/MarketNews/appclass.js b/examples/apps/PHP/MarketNews/appclass.js index cc9ffef8..425ab860 100644 --- a/examples/apps/PHP/MarketNews/appclass.js +++ b/examples/apps/PHP/MarketNews/appclass.js @@ -1,5 +1,4 @@ -F2.Apps["com_openf2_examples_php_marketnews"] = (function() { - +F2.Apps['com_openf2_examples_php_marketnews'] = (function () { var App_Class = function (appConfig, appContent, root) { this.appConfig = appConfig; this.appContent = appContent; @@ -7,24 +6,32 @@ F2.Apps["com_openf2_examples_php_marketnews"] = (function() { }; App_Class.prototype.init = function () { + $('button.save', this.$root).on( + 'click', + $.proxy(function (e) { + if ( + $('form.f2-app-view input[name="autoRefresh"]', this.$root).prop( + 'checked' + ) + ) { + alert('Auto refresh in 30 seconds enabled'); + } else alert('Auto refresh in 30 seconds disabled'); - $('button.save', this.$root).on('click', $.proxy(function(e) { - if($('form.f2-app-view input[name="autoRefresh"]', this.$root).prop('checked')) - { alert("Auto refresh in 30 seconds enabled") - } - else - alert('Auto refresh in 30 seconds disabled') - - this._handleSaveSettings(); - - }, this)); + this._handleSaveSettings(); + }, this) + ); }; - App_Class.prototype._handleSaveSettings = function() { - + App_Class.prototype._handleSaveSettings = function () { this.appConfig.context = this.appConfig.context || {}; - this.appConfig.context.autoRefresh = $('form.f2-app-view input[name="autoRefresh"]', this.$root).prop('checked'); - this.appConfig.context.provider = $('form.f2-app-view input[name="provider"]:checked', this.$root).val(); + this.appConfig.context.autoRefresh = $( + 'form.f2-app-view input[name="autoRefresh"]', + this.$root + ).prop('checked'); + this.appConfig.context.provider = $( + 'form.f2-app-view input[name="provider"]:checked', + this.$root + ).val(); clearInterval(this._refreshInterval); if (this.appConfig.context.autoRefresh) { @@ -35,25 +42,24 @@ F2.Apps["com_openf2_examples_php_marketnews"] = (function() { }; App_Class.prototype._refresh = function () { - - $.ajax({ url: this.appConfig.manifestUrl, data: { params: JSON.stringify([this.appConfig], F2.appConfigReplacer) }, - type: "post", - dataType: "jsonp", - jsonp:false, - jsonpCallback:F2.Constants.JSONP_CALLBACK + this.appConfig.appId, - context:this, - success:function (data) { - $("div.f2-app-view", this.$root).replaceWith($(data.apps[0].html).find("div.f2-app-view")); + type: 'post', + dataType: 'jsonp', + jsonp: false, + jsonpCallback: F2.Constants.JSONP_CALLBACK + this.appConfig.appId, + context: this, + success: function (data) { + $('div.f2-app-view', this.$root).replaceWith( + $(data.apps[0].html).find('div.f2-app-view') + ); }, - complete:function() { - } - }) + complete: function () {} + }); }; return App_Class; -})(); \ No newline at end of file +})(); diff --git a/examples/apps/PHP/News/app.css b/examples/apps/PHP/News/app.css index 037b3ee5..1138d583 100644 --- a/examples/apps/PHP/News/app.css +++ b/examples/apps/PHP/News/app.css @@ -1,16 +1,16 @@ .com_openf2_examples_php_news li { - border-bottom:1px solid #DDD; - padding:0 3px 10px; + border-bottom: 1px solid #ddd; + padding: 0 3px 10px; } .com_openf2_examples_php_news li + li { - padding-top:10px; + padding-top: 10px; } .com_openf2_examples_php_news li time { - color:#8F8F8F; - display:block; - font-size:11px; + color: #8f8f8f; + display: block; + font-size: 11px; } .com_openf2_examples_php_news footer { - font-size:10px; - padding:0 3px 10px; -} \ No newline at end of file + font-size: 10px; + padding: 0 3px 10px; +} diff --git a/examples/apps/PHP/News/appclass.js b/examples/apps/PHP/News/appclass.js index f3d007c4..fec9976e 100644 --- a/examples/apps/PHP/News/appclass.js +++ b/examples/apps/PHP/News/appclass.js @@ -1,7 +1,5 @@ -F2.Apps["com_openf2_examples_php_news"] = (function() { - +F2.Apps['com_openf2_examples_php_news'] = (function () { var App_Class = function (appConfig, appContent, root) { - this.appConfig = appConfig; this.appContent = appContent; this.$root = $(root); @@ -10,20 +8,29 @@ F2.Apps["com_openf2_examples_php_news"] = (function() { }; App_Class.prototype.init = function () { - // bind symbol change event - F2.Events.on(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, $.proxy(this._refresh, this)); - + F2.Events.on( + F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, + $.proxy(this._refresh, this) + ); // save settings - $(this.$root).on("click", "button.save", $.proxy(this._handleSaveSettings, this)); - + $(this.$root).on( + 'click', + 'button.save', + $.proxy(this._handleSaveSettings, this) + ); }; - App_Class.prototype._handleSaveSettings = function() { - - this.appConfig.context.autoRefresh = $('form.f2-app-view input[name="autoRefresh"]', this.$root).prop('checked'); - this.appConfig.context.provider = $('form.f2-app-view input[name="provider"]:checked', this.$root).val(); + App_Class.prototype._handleSaveSettings = function () { + this.appConfig.context.autoRefresh = $( + 'form.f2-app-view input[name="autoRefresh"]', + this.$root + ).prop('checked'); + this.appConfig.context.provider = $( + 'form.f2-app-view input[name="provider"]:checked', + this.$root + ).val(); clearInterval(this._refreshInterval); if (this.appConfig.context.autoRefresh) { @@ -34,37 +41,37 @@ F2.Apps["com_openf2_examples_php_news"] = (function() { }; App_Class.prototype._refresh = function (data) { - data = data || {}; - this.appConfig.context.symbol = data.symbol || this.appConfig.context.symbol; - + this.appConfig.context.symbol = + data.symbol || this.appConfig.context.symbol; $.ajax({ url: this.appConfig.manifestUrl, data: { params: JSON.stringify([this.appConfig], F2.appConfigReplacer) }, - type: "post", - dataType: "jsonp", - jsonp:false, - jsonpCallback:F2.Constants.JSONP_CALLBACK + this.appConfig.appId, - context:this, - success:function (data) { - $("div.f2-app-view", this.$root).replaceWith($(data.apps[0].html).find("div.f2-app-view")); + type: 'post', + dataType: 'jsonp', + jsonp: false, + jsonpCallback: F2.Constants.JSONP_CALLBACK + this.appConfig.appId, + context: this, + success: function (data) { + $('div.f2-app-view', this.$root).replaceWith( + $(data.apps[0].html).find('div.f2-app-view') + ); }, - complete:function() { - } - }) + complete: function () {} + }); }; - App_Class.prototype._populateSettings = function() { - - $.each(this.appConfig.context, $.proxy(function(key, value) { - - $('form.f2-app-view input[name="' + key + '"]', this.$root).val(value); - - }, this)); + App_Class.prototype._populateSettings = function () { + $.each( + this.appConfig.context, + $.proxy(function (key, value) { + $('form.f2-app-view input[name="' + key + '"]', this.$root).val(value); + }, this) + ); }; return App_Class; -})(); \ No newline at end of file +})(); diff --git a/examples/container-amd/css/README.md b/examples/container-amd/css/README.md index 45d10e38..7be5649c 100644 --- a/examples/container-amd/css/README.md +++ b/examples/container-amd/css/README.md @@ -4,7 +4,7 @@ F2 Containers can (and should) namespace their CSS so that the Container and App ```css .f2-example-container { - @import "bootstrap/bootstrap.less"; - @import "your-custom-css.less"; + @import 'bootstrap/bootstrap.less'; + @import 'your-custom-css.less'; } -``` \ No newline at end of file +``` diff --git a/examples/container-amd/css/container.css b/examples/container-amd/css/container.css index f7e03405..6841a6a7 100644 --- a/examples/container-amd/css/container.css +++ b/examples/container-amd/css/container.css @@ -1,5 +1,5 @@ .f2-app { - margin-bottom:20px; + margin-bottom: 20px; } .f2-app-wrapper { @@ -9,7 +9,7 @@ .f2-app-wrapper > header { padding: 10px; - background-color: #f8f8f8 + background-color: #f8f8f8; } .f2-app header .glyphicon { @@ -23,7 +23,7 @@ line-height: normal; } -.f2-app header .btn-group{ +.f2-app header .btn-group { padding: 5px; } @@ -35,4 +35,4 @@ .f2-app .f2-app-view h3 { margin-top: 0; -} \ No newline at end of file +} diff --git a/examples/container-amd/index.html b/examples/container-amd/index.html index 2ae32f37..d6e9945a 100644 --- a/examples/container-amd/index.html +++ b/examples/container-amd/index.html @@ -1,104 +1,149 @@ - - - - - - - - F2 - Container (AMD) Example - - - - - - - - - + + + + + + + + F2 - Container (AMD) Example + + + + + + + + + - + + - +
    -
    + - - - - - \ No newline at end of file + + + diff --git a/examples/container-amd/js/appSelector.js b/examples/container-amd/js/appSelector.js index 2a930184..1d0fb636 100644 --- a/examples/container-amd/js/appSelector.js +++ b/examples/container-amd/js/appSelector.js @@ -1,95 +1,88 @@ -define( - [ - 'jquery', - 'F2', - 'storage', - 'bootstrap' - ], - function($, F2, Storage) { - - return function() { +define(['jquery', 'F2', 'storage', 'bootstrap'], function ($, F2, Storage) { + return function () { + // grab apps from storage + var requestedApps = Storage.getItem('requestedApps') || []; + + // setup modal + var $modal = $('#languageSelect').modal({ + backdrop: 'static', + keyboard: false, + show: false + }); + + // bind select apps + $('#btnSelectApps').on('click', function () { + $modal.modal('show'); + }); + + // bind checkbox events + $modal.on('change', 'input:checkbox', function () { + if ($('input:checkbox:checked', $modal).length) { + $('button.btn-primary', $modal).removeClass('disabled'); + } else { + $('button.btn-primary', $modal).addClass('disabled'); + } + }); - // grab apps from storage - var requestedApps = Storage.getItem('requestedApps') || []; + // bind save button + $modal.on('click', 'button.btn-primary:not(.disabled)', function () { + var apps = []; + var storageItems = []; - // setup modal - var $modal = $('#languageSelect').modal({ - backdrop: 'static', - keyboard: false, - show: false + $('input:checked', $modal).map(function (i, el) { + apps.push($(el).data('f2-app')); + storageItems.push($(el).val()); }); - // bind select apps - $('#btnSelectApps').on('click', function() { - $modal.modal('show'); + $modal.modal('hide'); + + // save apps to storage + Storage.setItem('requestedApps', storageItems); + + // remove all apps and add only the selected ones + F2.removeAllApps(); + F2.registerApps(apps); + }); + + // show a loading mask and the modal if there were no requested apps + if (!requestedApps.length) { + $modal.modal('show'); + } + + // load in app json + $.getJSON('./js/sampleApps.json', function (allApps) { + $.each(allApps, function (language, apps) { + $('[data-language="' + language + '"]', $modal).append( + $.map(apps, function (app, i) { + var $d = $('
    '), + $lbl = $(''), + $ck = $( + '' + ).data('f2-app', app), + name = ' ' + app.name + (app.isSecure ? ' (Secure)' : ''); + $lbl.append($ck).append(name); + + return $d.append($lbl); + }) + ); }); - // bind checkbox events - $modal.on('change', 'input:checkbox', function() { - if ($('input:checkbox:checked', $modal).length) { - $('button.btn-primary', $modal).removeClass('disabled'); - } else { - $('button.btn-primary', $modal).addClass('disabled'); - } - }); - - // bind save button - $modal.on('click', 'button.btn-primary:not(.disabled)', function() { - var apps = []; - var storageItems = []; - - $('input:checked', $modal).map(function(i, el) { - apps.push($(el).data('f2-app')); - storageItems.push($(el).val()); + // if no requested apps, hide the loader, otherwise register the apps + if (requestedApps.length > 0) { + // check the appropriate boxes + $.each(requestedApps, function (i, a) { + $('input[name="app"][value="' + a + '"]', $modal).prop( + 'checked', + true + ); }); - $modal.modal('hide'); - - // save apps to storage - Storage.setItem('requestedApps', storageItems); - - // remove all apps and add only the selected ones - F2.removeAllApps(); - F2.registerApps(apps); - }); + // fire change event which should enable the Save button + $('input:checkbox:first', $modal).change(); - // show a loading mask and the modal if there were no requested apps - if (!requestedApps.length) { - $modal.modal('show'); + // click the Save button + $('button.btn-primary', $modal).click(); } - - // load in app json - $.getJSON('./js/sampleApps.js', function(allApps) { - $.each(allApps, function(language, apps) { - $('[data-language="' + language + '"]', $modal).append( - $.map(apps, function(app, i) { - var $d = $('
    '), - $lbl = $(''), - $ck = $('').data('f2-app', app), - name = ' ' + app.name + (app.isSecure ? ' (Secure)' : '') - ; - - $lbl.append($ck).append(name); - - return $d.append($lbl); - }) - ); - }) - - // if no requested apps, hide the loader, otherwise register the apps - if (requestedApps.length > 0) { - // check the appropriate boxes - $.each(requestedApps, function(i, a) { - $('input[name="app"][value="' + a + '"]', $modal).prop('checked', true); - }); - - // fire change event which should enable the Save button - $('input:checkbox:first', $modal).change(); - - // click the Save button - $('button.btn-primary', $modal).click(); - } - }); - }; - } -); \ No newline at end of file + }); + }; +}); diff --git a/examples/container-amd/js/main.js b/examples/container-amd/js/main.js index 5a0294ad..ffbf2b74 100644 --- a/examples/container-amd/js/main.js +++ b/examples/container-amd/js/main.js @@ -1,190 +1,215 @@ -require( - { - basePath: 'js', - paths: { - 'jquery': '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min', - 'jquery-ui': '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min', - 'bootstrap': '//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min', - 'F2': '../../../dist/f2' - }, - shim: { - 'bootstrap': ['jquery'], - 'jquery-ui': ['jquery'] - } +require({ + basePath: 'js', + paths: { + jquery: '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min', + 'jquery-ui': + '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min', + bootstrap: '//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min', + F2: '../../../dist/f2' }, - [ - 'jquery', - 'F2', - 'appSelector', - 'jquery-ui', - 'bootstrap' - ], - function($, F2, AppSelector) { - - //simple console log helper for IE - var log = $.noop; //function() { }; - if (!window["console"]) { - window.console = {}; - } - - var logFns = { - log: log, - warn: log, - error: log, - info: log, - group: log, - groupEnd: log - }; - - for (var i in logFns) { - if (!window.console[i]) { - window.console[i] = logFns[i]; - } - } - - // wait for DOM ready - $(function() { - - //can't run this container from a file:// protocol - if (location.protocol === "file:"){ - var $m = $("#notice").modal(); - // bind save button - $m.on('click', 'button.btn', function() { - $m.modal('hide'); - window.close(); - }); - return; - } + shim: { + bootstrap: ['jquery'], + 'jquery-ui': ['jquery'] + } +}, ['jquery', 'F2', 'appSelector', 'jquery-ui', 'bootstrap'], function ( + $, + F2, + AppSelector +) { + //simple console log helper for IE + var log = $.noop; //function() { }; + if (!window['console']) { + window.console = {}; + } - // init the app selector - new AppSelector(); + var logFns = { + log: log, + warn: log, + error: log, + info: log, + group: log, + groupEnd: log + }; + + for (var i in logFns) { + if (!window.console[i]) { + window.console[i] = logFns[i]; + } + } - var containerAppHandlerToken = F2.AppHandlers.getToken(); + // wait for DOM ready + $(function () { + //can't run this container from a file:// protocol + if (location.protocol === 'file:') { + var $m = $('#notice').modal(); + // bind save button + $m.on('click', 'button.btn', function () { + $m.modal('hide'); + window.close(); + }); + return; + } - var appCreateRootFunc = function(appConfig) { - var gridWidth = appConfig.minGridSize || 3; - appConfig.root = $([ - '
    ', - '
    ', - '
    ', - '

    ', appConfig.name, '

    ', - '
    ', - '
    ', + // init the app selector + new AppSelector(); + + var containerAppHandlerToken = F2.AppHandlers.getToken(); + + var appCreateRootFunc = function (appConfig) { + var gridWidth = appConfig.minGridSize || 3; + appConfig.root = $( + [ + '
    ', + '
    ', + '
    ', + '

    ', + appConfig.name, + '

    ', + '
    ', + '
    ', '
    ' - ].join('')).get(0); - }; - - var appRenderFunc = function(appConfig, app) { - - var gridWidth = appConfig.minGridSize || 3; - - // find a row that can fit this app - var row; - $('#mainContent div.row').each(function(i, el) { - var span = 0; - $('.f2-app', el).each(function(j, app) { - span += Number($(app).data('gridWidth')); - }); - if (span <= (12 - gridWidth)) { - row = el; - return false; - } + ].join('') + ).get(0); + }; + + var appRenderFunc = function (appConfig, app) { + var gridWidth = appConfig.minGridSize || 3; + + // find a row that can fit this app + var row; + $('#mainContent div.row').each(function (i, el) { + var span = 0; + $('.f2-app', el).each(function (j, app) { + span += Number($(app).data('gridWidth')); }); - // create a new row if one wasn't found - if (row === undefined) { - row = $('
    ').appendTo('#mainContent'); + if (span <= 12 - gridWidth) { + row = el; + return false; } + }); + // create a new row if one wasn't found + if (row === undefined) { + row = $('
    ').appendTo('#mainContent'); + } - // append app to app root and also to row - $(appConfig.root) - .addClass(F2.Constants.Css.APP) - .find('.f2-app-wrapper') - .append(app) - .parent() - .appendTo(row); - }; - - var appDestroyFunc = function(appInstance) { - if(!appInstance) { return; } - - // call the apps destroy method, if it has one - if(appInstance.app && appInstance.app.destroy && typeof(appInstance.app.destroy) == 'function'){ - appInstance.app.destroy(); - } - // warn the container developer/app developer that even though they have a destroy method it hasn't been called - else if(appInstance.app && appInstance.app.destroy){ - F2.log(appInstance.appId + ' has a Destroy property, but Destroy is not of type function and as such will not be executed.'); - } + // append app to app root and also to row + $(appConfig.root) + .addClass(F2.Constants.Css.APP) + .find('.f2-app-wrapper') + .append(app) + .parent() + .appendTo(row); + }; + + var appDestroyFunc = function (appInstance) { + if (!appInstance) { + return; + } - // fade out and remove the root - $(appInstance.config.root).fadeOut(250, function() { - $(this).remove(); - }); - }; - /** - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - */ - - /** - * Init Container - */ - F2.init(); - - // Define these prior to calling F2.registerApps - F2.AppHandlers - .on(containerAppHandlerToken, F2.Constants.AppHandlers.APP_CREATE_ROOT, appCreateRootFunc) - .on(containerAppHandlerToken, F2.Constants.AppHandlers.APP_RENDER, appRenderFunc) - .on(containerAppHandlerToken, F2.Constants.AppHandlers.APP_DESTROY, appDestroyFunc) - ; - - //listen for app symbol change events and re-broadcast - F2.Events.on( - F2.Constants.Events.APP_SYMBOL_CHANGE, - function(data){ - F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { symbol: data.symbol, name: data.name || "" }); - } + // call the apps destroy method, if it has one + if ( + appInstance.app && + appInstance.app.destroy && + typeof appInstance.app.destroy == 'function' + ) { + appInstance.app.destroy(); + } + // warn the container developer/app developer that even though they have a destroy method it hasn't been called + else if (appInstance.app && appInstance.app.destroy) { + F2.log( + appInstance.appId + + ' has a Destroy property, but Destroy is not of type function and as such will not be executed.' + ); + } + + // fade out and remove the root + $(appInstance.config.root).fadeOut(250, function () { + $(this).remove(); + }); + }; + /** + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ + + /** + * Init Container + */ + F2.init(); + + // Define these prior to calling F2.registerApps + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + appCreateRootFunc + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + appRenderFunc + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY, + appDestroyFunc ); - /** - * init symbol lookup in navbar - */ - $("#symbolLookup") - .on('keypress', function(event) { - if (event.keyCode == 13) { - event.preventDefault(); - } - }) - .autocomplete({ - autoFocus:true, - minLength: 0, - select: function (event, ui) { - F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { symbol: ui.item.value, name: ui.item.label }); - }, - source: function (request, response) { - - $.ajax({ - url: "http://dev.markitondemand.com/api/Lookup/jsonp", - dataType: "jsonp", - data: { - input: request.term - }, - success: function (data) { - response($.map(data, function (item) { + //listen for app symbol change events and re-broadcast + F2.Events.on(F2.Constants.Events.APP_SYMBOL_CHANGE, function (data) { + F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { + symbol: data.symbol, + name: data.name || '' + }); + }); + + /** + * init symbol lookup in navbar + */ + $('#symbolLookup') + .on('keypress', function (event) { + if (event.keyCode == 13) { + event.preventDefault(); + } + }) + .autocomplete({ + autoFocus: true, + minLength: 0, + select: function (event, ui) { + F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { + symbol: ui.item.value, + name: ui.item.label + }); + }, + source: function (request, response) { + $.ajax({ + url: 'http://dev.markitondemand.com/api/Lookup/jsonp', + dataType: 'jsonp', + data: { + input: request.term + }, + success: function (data) { + response( + $.map(data, function (item) { return { - label: item.Name + " (" + item.Exchange + ")", + label: item.Name + ' (' + item.Exchange + ')', value: item.Symbol - } - })); - }, - open: function() { - $(this).removeClass("ui-corner-all").addClass("ui-corner-top"); - }, - close: function() { - $(this).removeClass("ui-corner-top").addClass("ui-corner-all"); - } - }); - } - }); - }); - } -); + }; + }) + ); + }, + open: function () { + $(this).removeClass('ui-corner-all').addClass('ui-corner-top'); + }, + close: function () { + $(this).removeClass('ui-corner-top').addClass('ui-corner-all'); + } + }); + } + }); + }); +}); diff --git a/examples/container-amd/js/sampleApps.js b/examples/container-amd/js/sampleApps.json similarity index 98% rename from examples/container-amd/js/sampleApps.js rename to examples/container-amd/js/sampleApps.json index f56b3618..645f7cad 100644 --- a/examples/container-amd/js/sampleApps.js +++ b/examples/container-amd/js/sampleApps.json @@ -55,7 +55,7 @@ "minGridSize": 6, "manifestUrl": "../apps/PHP/F2wits/manifest.js", "name": "F2wits", - "views": ["home","about"] + "views": ["home", "about"] }, { "appId": "com_openf2_examples_php_news", @@ -76,4 +76,4 @@ "name": "Hello World (PHP)" } ] -} \ No newline at end of file +} diff --git a/examples/container-amd/js/storage.js b/examples/container-amd/js/storage.js index 324d3455..c4ca50ab 100644 --- a/examples/container-amd/js/storage.js +++ b/examples/container-amd/js/storage.js @@ -1,82 +1,86 @@ -define( +define(['F2'], function (F2) { + var _hasLocalStorage = + typeof Storage !== 'undefined' && !!window.localStorage; + var _getKey = function (key) { + return 'F2-' + key; + }; - [ - 'F2' - ], + return { + /** + * @method getItem + * @param {string} key The key of the item to retrieve + */ + getItem: function (key) { + var value = null; - function(F2) { - var _hasLocalStorage = typeof Storage !== 'undefined' && !!window.localStorage; - var _getKey = function(key) { - return 'F2-' + key; - }; - - return { - /** - * @method getItem - * @param {string} key The key of the item to retrieve - */ - getItem:function(key) { - - var value = null; - - if (!key) { return; } + if (!key) { + return; + } - key = _getKey(key); + key = _getKey(key); - if (_hasLocalStorage) { - value = localStorage.getItem(key); - } else { - var cookies = document.cookie.split(/\s*;\s*/); - for (var i = 0, len = cookies.length; i < len; i++) { - var parts = cookies[i].split(/\s*=\s*/); - if (parts.length > 1 && unescape(parts[0]) == key) { - value = unescape(parts[1]); - } + if (_hasLocalStorage) { + value = localStorage.getItem(key); + } else { + var cookies = document.cookie.split(/\s*;\s*/); + for (var i = 0, len = cookies.length; i < len; i++) { + var parts = cookies[i].split(/\s*=\s*/); + if (parts.length > 1 && unescape(parts[0]) == key) { + value = unescape(parts[1]); } } + } - if (!!value) { - value = F2.parse(value); - } - - return value; - }, - /** - * @method removeItem - * @param {string} key The key of the item to remove - */ - removeItem:function(key) { - - if (!key) { return; } + if (!!value) { + value = F2.parse(value); + } - key = _getKey(key); + return value; + }, + /** + * @method removeItem + * @param {string} key The key of the item to remove + */ + removeItem: function (key) { + if (!key) { + return; + } - if (_hasLocalStorage) { - localStorage.removeItem(key); - } else { - document.cookie = escape(key) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'; - } - }, - /** - * @method setItem - * @param {string} key The key of the item to set - * @param {object} value The value to be stored - */ - setItem:function(key, value) { + key = _getKey(key); - if (!key || !value) { return; } + if (_hasLocalStorage) { + localStorage.removeItem(key); + } else { + document.cookie = + escape(key) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'; + } + }, + /** + * @method setItem + * @param {string} key The key of the item to set + * @param {object} value The value to be stored + */ + setItem: function (key, value) { + if (!key || !value) { + return; + } - key = _getKey(key); - value = F2.stringify(value); + key = _getKey(key); + value = F2.stringify(value); - if (_hasLocalStorage) { - localStorage.setItem(key, value); - } else { - var exp = new Date(); - exp.setFullYear((new Date()).getFullYear() + 100); - document.cookie = escape(key) + '=' + escape(value) + '; expires=' + exp.toUTCString() + '; path=/'; - } + if (_hasLocalStorage) { + localStorage.setItem(key, value); + } else { + var exp = new Date(); + exp.setFullYear(new Date().getFullYear() + 100); + document.cookie = + escape(key) + + '=' + + escape(value) + + '; expires=' + + exp.toUTCString() + + '; path=/'; } - }; - } -); + } + }; +}); diff --git a/examples/container-autoload/index.html b/examples/container-autoload/index.html index ae440a9d..65a0026a 100644 --- a/examples/container-autoload/index.html +++ b/examples/container-autoload/index.html @@ -1,56 +1,85 @@ - - - - - - - - F2 - Container Autoload Example - - - - - - - - - + + + + + + + + F2 - Container Autoload Example + + + + + + + + + +
    + +
    +
    @@ -58,20 +87,32 @@

    Compare Tool

    -
    +
    - - + + - \ No newline at end of file + diff --git a/examples/container-locale/css/README.md b/examples/container-locale/css/README.md index 45d10e38..7be5649c 100644 --- a/examples/container-locale/css/README.md +++ b/examples/container-locale/css/README.md @@ -4,7 +4,7 @@ F2 Containers can (and should) namespace their CSS so that the Container and App ```css .f2-example-container { - @import "bootstrap/bootstrap.less"; - @import "your-custom-css.less"; + @import 'bootstrap/bootstrap.less'; + @import 'your-custom-css.less'; } -``` \ No newline at end of file +``` diff --git a/examples/container-locale/css/container.css b/examples/container-locale/css/container.css index f7e03405..6841a6a7 100644 --- a/examples/container-locale/css/container.css +++ b/examples/container-locale/css/container.css @@ -1,5 +1,5 @@ .f2-app { - margin-bottom:20px; + margin-bottom: 20px; } .f2-app-wrapper { @@ -9,7 +9,7 @@ .f2-app-wrapper > header { padding: 10px; - background-color: #f8f8f8 + background-color: #f8f8f8; } .f2-app header .glyphicon { @@ -23,7 +23,7 @@ line-height: normal; } -.f2-app header .btn-group{ +.f2-app header .btn-group { padding: 5px; } @@ -35,4 +35,4 @@ .f2-app .f2-app-view h3 { margin-top: 0; -} \ No newline at end of file +} diff --git a/examples/container-locale/index.html b/examples/container-locale/index.html index c33f0eb9..2fb43fa1 100644 --- a/examples/container-locale/index.html +++ b/examples/container-locale/index.html @@ -1,134 +1,195 @@ - - - - - - - - F2 - Container Example - - - - - - - - - + + + + + + + + F2 - Container Example + + + + + + + + + - + + - +
    +
    +
    + +
    +
    +
    -
    -
    -
    - -
    -
    -
    +
    -
    + - - - - - - - - - - + + + + + + + - - - - - + + + + + diff --git a/examples/container-locale/js/container.js b/examples/container-locale/js/container.js index 62a6fb6a..bde877f8 100644 --- a/examples/container-locale/js/container.js +++ b/examples/container-locale/js/container.js @@ -1,32 +1,31 @@ //simple console log helper for IE var log = $.noop; //function() { }; -if (!window["console"]) { - window.console = {}; +if (!window['console']) { + window.console = {}; } var logFns = { - log: log, - warn: log, - error: log, - info: log, - group: log, - groupEnd: log + log: log, + warn: log, + error: log, + info: log, + group: log, + groupEnd: log }; for (var i in logFns) { - if (!window.console[i]) { - window.console[i] = logFns[i]; - } + if (!window.console[i]) { + window.console[i] = logFns[i]; + } } -$(function() { - +$(function () { //locale switcher - $('#locale-switcher').on('click','a',function(e){ + $('#locale-switcher').on('click', 'a', function (e) { var locale = $(this).data('locale'); //emit standard event with new locale - F2.Events.emit(F2.Constants.Events.CONTAINER_LOCALE_CHANGE,{ + F2.Events.emit(F2.Constants.Events.CONTAINER_LOCALE_CHANGE, { locale: locale }); @@ -39,32 +38,41 @@ $(function() { var containerAppHandlerToken = F2.AppHandlers.getToken(); - var appCreateRootFunc = function(appConfig) { + var appCreateRootFunc = function (appConfig) { var gridWidth = appConfig.minGridSize || 3; - appConfig.root = $([ - '
    ', + appConfig.root = $( + [ + '
    ', '
    ', - '
    ', - '

    ', appConfig.name, '

    ', - '
    ', + '
    ', + '

    ', + appConfig.name, + '

    ', + '
    ', '
    ', - '
    ' - ].join('')).get(0); + '
    ' + ].join('') + ).get(0); }; - var appRenderFunc = function(appConfig, app) { - + var appRenderFunc = function (appConfig, app) { var gridWidth = appConfig.minGridSize || 3; // find a row that can fit this app var row; - $('#mainContent div.row').each(function(i, el) { + $('#mainContent div.row').each(function (i, el) { var span = 0; - $('.f2-app', el).each(function(j, app) { + $('.f2-app', el).each(function (j, app) { span += Number($(app).data('gridWidth')); }); - if (span <= (12 - gridWidth)) { + if (span <= 12 - gridWidth) { row = el; return false; } @@ -83,20 +91,29 @@ $(function() { .appendTo(row); }; - var appDestroyFunc = function(appInstance) { - if(!appInstance) { return; } + var appDestroyFunc = function (appInstance) { + if (!appInstance) { + return; + } // call the apps destroy method, if it has one - if(appInstance.app && appInstance.app.destroy && typeof(appInstance.app.destroy) == 'function'){ + if ( + appInstance.app && + appInstance.app.destroy && + typeof appInstance.app.destroy == 'function' + ) { appInstance.app.destroy(); } // warn the container developer/app developer that even though they have a destroy method it hasn't been called - else if(appInstance.app && appInstance.app.destroy){ - F2.log(appInstance.appId + ' has a Destroy property, but Destroy is not of type function and as such will not be executed.'); + else if (appInstance.app && appInstance.app.destroy) { + F2.log( + appInstance.appId + + ' has a Destroy property, but Destroy is not of type function and as such will not be executed.' + ); } // fade out and remove the root - jQuery(appInstance.config.root).fadeOut(250, function() { + jQuery(appInstance.config.root).fadeOut(250, function () { jQuery(this).remove(); }); }; @@ -109,36 +126,61 @@ $(function() { */ F2.init({ debugMode: true, - locale: "en-gb" + locale: 'en-gb' }); // Define these prior to calling F2.registerApps - F2.AppHandlers - .on(containerAppHandlerToken, F2.Constants.AppHandlers.APP_CREATE_ROOT, appCreateRootFunc) - .on(containerAppHandlerToken, F2.Constants.AppHandlers.APP_RENDER, appRenderFunc) - .on(containerAppHandlerToken, F2.Constants.AppHandlers.APP_DESTROY, appDestroyFunc) - ; + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + appCreateRootFunc + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + appRenderFunc + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY, + appDestroyFunc + ); //listen for app symbol change events and re-broadcast - F2.Events.on(F2.Constants.Events.APP_SYMBOL_CHANGE,function(data) { - F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { symbol: data.symbol, name: data.name || '' }); + F2.Events.on(F2.Constants.Events.APP_SYMBOL_CHANGE, function (data) { + F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { + symbol: data.symbol, + name: data.name || '' + }); }); //listen for any failed resources and display alert (demo purposes only) - F2.AppHandlers.on(F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, function(appConfig, data){ - var error = ['
    ', - '
    ', - '
    ', - 'A script resource defined in "'+appConfig.appId+'" failed to load.', - '
    ', - '
    ', - '
    ']; - $('#mainContent').prepend(error.join('')); - }); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, + function (appConfig, data) { + var error = [ + '
    ', + '
    ', + '
    ', + 'A script resource defined in "' + + appConfig.appId + + '" failed to load.', + '
    ', + '
    ', + '
    ' + ]; + $('#mainContent').prepend(error.join('')); + } + ); //set active state on selected locale in menubar - if (F2.getContainerLocale()){ - $('a[data-locale='+F2.getContainerLocale()+']','#locale-switcher').parent().addClass('active'); + if (F2.getContainerLocale()) { + $('a[data-locale=' + F2.getContainerLocale() + ']', '#locale-switcher') + .parent() + .addClass('active'); } /** @@ -149,19 +191,21 @@ $(function() { * init symbol lookup in navbar */ $('#symbolLookup') - .on('keypress', function(event) { + .on('keypress', function (event) { if (event.keyCode == 13) { event.preventDefault(); } }) .autocomplete({ - autoFocus:true, + autoFocus: true, minLength: 0, select: function (event, ui) { - F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { symbol: ui.item.value, name: ui.item.label }); + F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { + symbol: ui.item.value, + name: ui.item.label + }); }, source: function (request, response) { - $.ajax({ url: 'http://dev.markitondemand.com/api/Lookup/jsonp', dataType: 'jsonp', @@ -169,21 +213,22 @@ $(function() { input: request.term }, success: function (data) { - response($.map(data, function (item) { - return { - label: item.Name + ' (' + item.Exchange + ')', - value: item.Symbol - }; - })); + response( + $.map(data, function (item) { + return { + label: item.Name + ' (' + item.Exchange + ')', + value: item.Symbol + }; + }) + ); }, - open: function() { + open: function () { $(this).removeClass('ui-corner-all').addClass('ui-corner-top'); }, - close: function() { + close: function () { $(this).removeClass('ui-corner-top').addClass('ui-corner-all'); } }); } }); - -}); \ No newline at end of file +}); diff --git a/examples/container-locale/js/examples.js b/examples/container-locale/js/examples.js index 5bd2a061..1472cb80 100644 --- a/examples/container-locale/js/examples.js +++ b/examples/container-locale/js/examples.js @@ -1,7 +1,6 @@ -$(function(){ - +$(function () { //ensure this is run from http://localhost - if (location.protocol === "file:"){ + if (location.protocol === 'file:') { return; } @@ -11,17 +10,17 @@ $(function(){ // setup modal var $modal = $('#languageSelect').modal({ backdrop: 'static', - keyboard: false, + keyboard: false, show: false }); // bind select apps - $('#btnSelectApps').on('click', function() { + $('#btnSelectApps').on('click', function () { $modal.modal('show'); }); // bind checkbox events - $modal.on('change', 'input:checkbox', function() { + $modal.on('change', 'input:checkbox', function () { if ($('input:checkbox:checked', $modal).length) { $('button.btn-primary', $modal).removeClass('disabled'); } else { @@ -30,11 +29,11 @@ $(function(){ }); // bind save button - $modal.on('click', 'button.btn-primary:not(.disabled)', function() { + $modal.on('click', 'button.btn-primary:not(.disabled)', function () { var apps = []; var storageItems = []; - $('input:checked', $modal).map(function(i, el) { + $('input:checked', $modal).map(function (i, el) { apps.push($(el).data('f2-app')); storageItems.push($(el).val()); }); @@ -55,27 +54,27 @@ $(function(){ } // load in app json - $.getJSON('./js/sampleApps.js', function(allApps) { - $.each(allApps, function(language, apps) { + $.getJSON('./js/sampleApps.json', function (allApps) { + $.each(allApps, function (language, apps) { $('[data-language="' + language + '"]', $modal).append( - $.map(apps, function(app, i) { - var $d = $('
    '), + $.map(apps, function (app, i) { + var $d = $('
    '), $lbl = $(''), - $ck = $('').data('f2-app', app), - name = ' ' + app.name + (app.isSecure ? ' (Secure)' : '') - ; - + $ck = $( + '' + ).data('f2-app', app), + name = ' ' + app.name + (app.isSecure ? ' (Secure)' : ''); $lbl.append($ck).append(name); return $d.append($lbl); }) ); - }) + }); // if no requested apps, hide the loader, otherwise register the apps if (requestedApps.length > 0) { // check the appropriate boxes - $.each(requestedApps, function(i, a) { + $.each(requestedApps, function (i, a) { $('input[name="app"][value="' + a + '"]', $modal).prop('checked', true); }); @@ -86,5 +85,4 @@ $(function(){ $('button.btn-primary', $modal).click(); } }); - -}); \ No newline at end of file +}); diff --git a/examples/container-locale/js/sampleApps.js b/examples/container-locale/js/sampleApps.json similarity index 95% rename from examples/container-locale/js/sampleApps.js rename to examples/container-locale/js/sampleApps.json index c2950c97..869c99cc 100644 --- a/examples/container-locale/js/sampleApps.js +++ b/examples/container-locale/js/sampleApps.json @@ -22,7 +22,7 @@ "name": "Quote", "views": ["home", "settings", "about"], "minGridSize": 4, - "localeSupport": ["en-us","en-gb"] + "localeSupport": ["en-us", "en-gb"] }, { "appId": "com_openf2_examples_javascript_watchlist", @@ -52,7 +52,7 @@ "manifestUrl": "../apps/JavaScript/HelloWorldLocale/manifest.js", "name": "Hello World Locale (JS)", "minGridSize": 5, - "localeSupport": ["en-us","en-gb"] + "localeSupport": ["en-us", "en-gb"] } ], @@ -63,7 +63,7 @@ "minGridSize": 6, "manifestUrl": "../apps/PHP/F2wits/manifest.js", "name": "F2wits", - "views": ["home","about"] + "views": ["home", "about"] }, { "appId": "com_openf2_examples_php_news", @@ -84,4 +84,4 @@ "name": "Hello World (PHP)" } ] -} \ No newline at end of file +} diff --git a/examples/container-locale/js/storage.js b/examples/container-locale/js/storage.js index 231eea63..c9820a86 100644 --- a/examples/container-locale/js/storage.js +++ b/examples/container-locale/js/storage.js @@ -1,80 +1,93 @@ /** * */ -F2.extend('Storage', (function() { +F2.extend( + 'Storage', + (function () { + var _hasLocalStorage = + typeof Storage !== 'undefined' && !!window.localStorage; - var _hasLocalStorage = typeof Storage !== 'undefined' && !!window.localStorage; + var _getKey = function (key) { + return 'F2-' + key; + }; - var _getKey = function(key) { - return 'F2-' + key; - }; + return { + /** + * @method getItem + * @param {string} key The key of the item to retrieve + */ + getItem: function (key) { + var value = null; - return { - /** - * @method getItem - * @param {string} key The key of the item to retrieve - */ - getItem:function(key) { - - var value = null; - - if (!key) { return; } + if (!key) { + return; + } - key = _getKey(key); + key = _getKey(key); - if (_hasLocalStorage) { - value = localStorage.getItem(key); - } else { - var cookies = document.cookie.split(/\s*;\s*/); - for (var i = 0, len = cookies.length; i < len; i++) { - var parts = cookies[i].split(/\s*=\s*/); - if (parts.length > 1 && unescape(parts[0]) == key) { - value = unescape(parts[1]); + if (_hasLocalStorage) { + value = localStorage.getItem(key); + } else { + var cookies = document.cookie.split(/\s*;\s*/); + for (var i = 0, len = cookies.length; i < len; i++) { + var parts = cookies[i].split(/\s*=\s*/); + if (parts.length > 1 && unescape(parts[0]) == key) { + value = unescape(parts[1]); + } } } - } - - if (!!value) { - value = F2.parse(value); - } - - return value; - }, - /** - * @method removeItem - * @param {string} key The key of the item to remove - */ - removeItem:function(key) { - if (!key) { return; } + if (!!value) { + value = F2.parse(value); + } - key = _getKey(key); + return value; + }, + /** + * @method removeItem + * @param {string} key The key of the item to remove + */ + removeItem: function (key) { + if (!key) { + return; + } - if (_hasLocalStorage) { - localStorage.removeItem(key); - } else { - document.cookie = escape(key) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'; - } - }, - /** - * @method setItem - * @param {string} key The key of the item to set - * @param {object} value The value to be stored - */ - setItem:function(key, value) { + key = _getKey(key); - if (!key || !value) { return; } + if (_hasLocalStorage) { + localStorage.removeItem(key); + } else { + document.cookie = + escape(key) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'; + } + }, + /** + * @method setItem + * @param {string} key The key of the item to set + * @param {object} value The value to be stored + */ + setItem: function (key, value) { + if (!key || !value) { + return; + } - key = _getKey(key); - value = F2.stringify(value); + key = _getKey(key); + value = F2.stringify(value); - if (_hasLocalStorage) { - localStorage.setItem(key, value); - } else { - var exp = new Date(); - exp.setFullYear((new Date()).getFullYear() + 100); - document.cookie = escape(key) + '=' + escape(value) + '; expires=' + exp.toUTCString() + '; path=/'; + if (_hasLocalStorage) { + localStorage.setItem(key, value); + } else { + var exp = new Date(); + exp.setFullYear(new Date().getFullYear() + 100); + document.cookie = + escape(key) + + '=' + + escape(value) + + '; expires=' + + exp.toUTCString() + + '; path=/'; + } } - } - }; -})()); \ No newline at end of file + }; + })() +); diff --git a/examples/container/css/README.md b/examples/container/css/README.md index 45d10e38..7be5649c 100644 --- a/examples/container/css/README.md +++ b/examples/container/css/README.md @@ -4,7 +4,7 @@ F2 Containers can (and should) namespace their CSS so that the Container and App ```css .f2-example-container { - @import "bootstrap/bootstrap.less"; - @import "your-custom-css.less"; + @import 'bootstrap/bootstrap.less'; + @import 'your-custom-css.less'; } -``` \ No newline at end of file +``` diff --git a/examples/container/css/container.css b/examples/container/css/container.css index f7e03405..6841a6a7 100644 --- a/examples/container/css/container.css +++ b/examples/container/css/container.css @@ -1,5 +1,5 @@ .f2-app { - margin-bottom:20px; + margin-bottom: 20px; } .f2-app-wrapper { @@ -9,7 +9,7 @@ .f2-app-wrapper > header { padding: 10px; - background-color: #f8f8f8 + background-color: #f8f8f8; } .f2-app header .glyphicon { @@ -23,7 +23,7 @@ line-height: normal; } -.f2-app header .btn-group{ +.f2-app header .btn-group { padding: 5px; } @@ -35,4 +35,4 @@ .f2-app .f2-app-view h3 { margin-top: 0; -} \ No newline at end of file +} diff --git a/examples/container/index.html b/examples/container/index.html index b710bc62..35df1bd2 100644 --- a/examples/container/index.html +++ b/examples/container/index.html @@ -1,117 +1,168 @@ - - - - - - - - F2 - Container Example - - - - - - - - - + + + + + + + + F2 - Container Example + + + + + + + + + - + + - +
    -
    + - - - - - - - - - - + + + + + + + - - - - - + + + + + diff --git a/examples/container/js/container.js b/examples/container/js/container.js index f4b56bbb..5bcad1a2 100644 --- a/examples/container/js/container.js +++ b/examples/container/js/container.js @@ -1,53 +1,61 @@ //simple console log helper for IE var log = $.noop; //function() { }; -if (!window["console"]) { - window.console = {}; +if (!window['console']) { + window.console = {}; } var logFns = { - log: log, - warn: log, - error: log, - info: log, - group: log, - groupEnd: log + log: log, + warn: log, + error: log, + info: log, + group: log, + groupEnd: log }; for (var i in logFns) { - if (!window.console[i]) { - window.console[i] = logFns[i]; - } + if (!window.console[i]) { + window.console[i] = logFns[i]; + } } -$(function() { - +$(function () { var containerAppHandlerToken = F2.AppHandlers.getToken(); - var appCreateRootFunc = function(appConfig) { + var appCreateRootFunc = function (appConfig) { var gridWidth = appConfig.minGridSize || 3; - appConfig.root = $([ - '
    ', + appConfig.root = $( + [ + '
    ', '
    ', - '
    ', - '

    ', appConfig.name, '

    ', - '
    ', + '
    ', + '

    ', + appConfig.name, + '

    ', + '
    ', '
    ', - '
    ' - ].join('')).get(0); + '
    ' + ].join('') + ).get(0); }; - var appRenderFunc = function(appConfig, app) { - + var appRenderFunc = function (appConfig, app) { var gridWidth = appConfig.minGridSize || 3; // find a row that can fit this app var row; - $('#mainContent div.row').each(function(i, el) { + $('#mainContent div.row').each(function (i, el) { var span = 0; - $('.f2-app', el).each(function(j, app) { + $('.f2-app', el).each(function (j, app) { span += Number($(app).data('gridWidth')); }); - if (span <= (12 - gridWidth)) { + if (span <= 12 - gridWidth) { row = el; return false; } @@ -66,20 +74,29 @@ $(function() { .appendTo(row); }; - var appDestroyFunc = function(appInstance) { - if(!appInstance) { return; } + var appDestroyFunc = function (appInstance) { + if (!appInstance) { + return; + } // call the apps destroy method, if it has one - if(appInstance.app && appInstance.app.destroy && typeof(appInstance.app.destroy) == 'function'){ + if ( + appInstance.app && + appInstance.app.destroy && + typeof appInstance.app.destroy == 'function' + ) { appInstance.app.destroy(); } // warn the container developer/app developer that even though they have a destroy method it hasn't been called - else if(appInstance.app && appInstance.app.destroy){ - F2.log(appInstance.appId + ' has a Destroy property, but Destroy is not of type function and as such will not be executed.'); + else if (appInstance.app && appInstance.app.destroy) { + F2.log( + appInstance.appId + + ' has a Destroy property, but Destroy is not of type function and as such will not be executed.' + ); } // fade out and remove the root - jQuery(appInstance.config.root).fadeOut(250, function() { + jQuery(appInstance.config.root).fadeOut(250, function () { jQuery(this).remove(); }); }; @@ -95,28 +112,51 @@ $(function() { }); // Define these prior to calling F2.registerApps - F2.AppHandlers - .on(containerAppHandlerToken, F2.Constants.AppHandlers.APP_CREATE_ROOT, appCreateRootFunc) - .on(containerAppHandlerToken, F2.Constants.AppHandlers.APP_RENDER, appRenderFunc) - .on(containerAppHandlerToken, F2.Constants.AppHandlers.APP_DESTROY, appDestroyFunc) - ; + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + appCreateRootFunc + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + appRenderFunc + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY, + appDestroyFunc + ); //listen for app symbol change events and re-broadcast - F2.Events.on(F2.Constants.Events.APP_SYMBOL_CHANGE,function(data) { - F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { symbol: data.symbol, name: data.name || '' }); + F2.Events.on(F2.Constants.Events.APP_SYMBOL_CHANGE, function (data) { + F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { + symbol: data.symbol, + name: data.name || '' + }); }); //listen for any failed resources and display alert (demo purposes only) - F2.AppHandlers.on(F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, function(appConfig, data){ - var error = ['
    ', - '
    ', - '
    ', - 'A script resource defined in "'+appConfig.appId+'" failed to load.', - '
    ', - '
    ', - '
    ']; - $('#mainContent').prepend(error.join('')); - }); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, + function (appConfig, data) { + var error = [ + '
    ', + '
    ', + '
    ', + 'A script resource defined in "' + + appConfig.appId + + '" failed to load.', + '
    ', + '
    ', + '
    ' + ]; + $('#mainContent').prepend(error.join('')); + } + ); /** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -126,19 +166,21 @@ $(function() { * init symbol lookup in navbar */ $('#symbolLookup') - .on('keypress', function(event) { + .on('keypress', function (event) { if (event.keyCode == 13) { event.preventDefault(); } }) .autocomplete({ - autoFocus:true, + autoFocus: true, minLength: 0, select: function (event, ui) { - F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { symbol: ui.item.value, name: ui.item.label }); + F2.Events.emit(F2.Constants.Events.CONTAINER_SYMBOL_CHANGE, { + symbol: ui.item.value, + name: ui.item.label + }); }, source: function (request, response) { - $.ajax({ url: 'http://dev.markitondemand.com/api/Lookup/jsonp', dataType: 'jsonp', @@ -146,21 +188,22 @@ $(function() { input: request.term }, success: function (data) { - response($.map(data, function (item) { - return { - label: item.Name + ' (' + item.Exchange + ')', - value: item.Symbol - }; - })); + response( + $.map(data, function (item) { + return { + label: item.Name + ' (' + item.Exchange + ')', + value: item.Symbol + }; + }) + ); }, - open: function() { + open: function () { $(this).removeClass('ui-corner-all').addClass('ui-corner-top'); }, - close: function() { + close: function () { $(this).removeClass('ui-corner-top').addClass('ui-corner-all'); } }); } }); - -}); \ No newline at end of file +}); diff --git a/examples/container/js/examples.js b/examples/container/js/examples.js index 5bd2a061..1472cb80 100644 --- a/examples/container/js/examples.js +++ b/examples/container/js/examples.js @@ -1,7 +1,6 @@ -$(function(){ - +$(function () { //ensure this is run from http://localhost - if (location.protocol === "file:"){ + if (location.protocol === 'file:') { return; } @@ -11,17 +10,17 @@ $(function(){ // setup modal var $modal = $('#languageSelect').modal({ backdrop: 'static', - keyboard: false, + keyboard: false, show: false }); // bind select apps - $('#btnSelectApps').on('click', function() { + $('#btnSelectApps').on('click', function () { $modal.modal('show'); }); // bind checkbox events - $modal.on('change', 'input:checkbox', function() { + $modal.on('change', 'input:checkbox', function () { if ($('input:checkbox:checked', $modal).length) { $('button.btn-primary', $modal).removeClass('disabled'); } else { @@ -30,11 +29,11 @@ $(function(){ }); // bind save button - $modal.on('click', 'button.btn-primary:not(.disabled)', function() { + $modal.on('click', 'button.btn-primary:not(.disabled)', function () { var apps = []; var storageItems = []; - $('input:checked', $modal).map(function(i, el) { + $('input:checked', $modal).map(function (i, el) { apps.push($(el).data('f2-app')); storageItems.push($(el).val()); }); @@ -55,27 +54,27 @@ $(function(){ } // load in app json - $.getJSON('./js/sampleApps.js', function(allApps) { - $.each(allApps, function(language, apps) { + $.getJSON('./js/sampleApps.json', function (allApps) { + $.each(allApps, function (language, apps) { $('[data-language="' + language + '"]', $modal).append( - $.map(apps, function(app, i) { - var $d = $('
    '), + $.map(apps, function (app, i) { + var $d = $('
    '), $lbl = $(''), - $ck = $('').data('f2-app', app), - name = ' ' + app.name + (app.isSecure ? ' (Secure)' : '') - ; - + $ck = $( + '' + ).data('f2-app', app), + name = ' ' + app.name + (app.isSecure ? ' (Secure)' : ''); $lbl.append($ck).append(name); return $d.append($lbl); }) ); - }) + }); // if no requested apps, hide the loader, otherwise register the apps if (requestedApps.length > 0) { // check the appropriate boxes - $.each(requestedApps, function(i, a) { + $.each(requestedApps, function (i, a) { $('input[name="app"][value="' + a + '"]', $modal).prop('checked', true); }); @@ -86,5 +85,4 @@ $(function(){ $('button.btn-primary', $modal).click(); } }); - -}); \ No newline at end of file +}); diff --git a/examples/container/js/sampleApps.js b/examples/container/js/sampleApps.json similarity index 98% rename from examples/container/js/sampleApps.js rename to examples/container/js/sampleApps.json index f56b3618..645f7cad 100644 --- a/examples/container/js/sampleApps.js +++ b/examples/container/js/sampleApps.json @@ -55,7 +55,7 @@ "minGridSize": 6, "manifestUrl": "../apps/PHP/F2wits/manifest.js", "name": "F2wits", - "views": ["home","about"] + "views": ["home", "about"] }, { "appId": "com_openf2_examples_php_news", @@ -76,4 +76,4 @@ "name": "Hello World (PHP)" } ] -} \ No newline at end of file +} diff --git a/examples/container/js/storage.js b/examples/container/js/storage.js index 231eea63..c9820a86 100644 --- a/examples/container/js/storage.js +++ b/examples/container/js/storage.js @@ -1,80 +1,93 @@ /** * */ -F2.extend('Storage', (function() { +F2.extend( + 'Storage', + (function () { + var _hasLocalStorage = + typeof Storage !== 'undefined' && !!window.localStorage; - var _hasLocalStorage = typeof Storage !== 'undefined' && !!window.localStorage; + var _getKey = function (key) { + return 'F2-' + key; + }; - var _getKey = function(key) { - return 'F2-' + key; - }; + return { + /** + * @method getItem + * @param {string} key The key of the item to retrieve + */ + getItem: function (key) { + var value = null; - return { - /** - * @method getItem - * @param {string} key The key of the item to retrieve - */ - getItem:function(key) { - - var value = null; - - if (!key) { return; } + if (!key) { + return; + } - key = _getKey(key); + key = _getKey(key); - if (_hasLocalStorage) { - value = localStorage.getItem(key); - } else { - var cookies = document.cookie.split(/\s*;\s*/); - for (var i = 0, len = cookies.length; i < len; i++) { - var parts = cookies[i].split(/\s*=\s*/); - if (parts.length > 1 && unescape(parts[0]) == key) { - value = unescape(parts[1]); + if (_hasLocalStorage) { + value = localStorage.getItem(key); + } else { + var cookies = document.cookie.split(/\s*;\s*/); + for (var i = 0, len = cookies.length; i < len; i++) { + var parts = cookies[i].split(/\s*=\s*/); + if (parts.length > 1 && unescape(parts[0]) == key) { + value = unescape(parts[1]); + } } } - } - - if (!!value) { - value = F2.parse(value); - } - - return value; - }, - /** - * @method removeItem - * @param {string} key The key of the item to remove - */ - removeItem:function(key) { - if (!key) { return; } + if (!!value) { + value = F2.parse(value); + } - key = _getKey(key); + return value; + }, + /** + * @method removeItem + * @param {string} key The key of the item to remove + */ + removeItem: function (key) { + if (!key) { + return; + } - if (_hasLocalStorage) { - localStorage.removeItem(key); - } else { - document.cookie = escape(key) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'; - } - }, - /** - * @method setItem - * @param {string} key The key of the item to set - * @param {object} value The value to be stored - */ - setItem:function(key, value) { + key = _getKey(key); - if (!key || !value) { return; } + if (_hasLocalStorage) { + localStorage.removeItem(key); + } else { + document.cookie = + escape(key) + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'; + } + }, + /** + * @method setItem + * @param {string} key The key of the item to set + * @param {object} value The value to be stored + */ + setItem: function (key, value) { + if (!key || !value) { + return; + } - key = _getKey(key); - value = F2.stringify(value); + key = _getKey(key); + value = F2.stringify(value); - if (_hasLocalStorage) { - localStorage.setItem(key, value); - } else { - var exp = new Date(); - exp.setFullYear((new Date()).getFullYear() + 100); - document.cookie = escape(key) + '=' + escape(value) + '; expires=' + exp.toUTCString() + '; path=/'; + if (_hasLocalStorage) { + localStorage.setItem(key, value); + } else { + var exp = new Date(); + exp.setFullYear(new Date().getFullYear() + 100); + document.cookie = + escape(key) + + '=' + + escape(value) + + '; expires=' + + exp.toUTCString() + + '; path=/'; + } } - } - }; -})()); \ No newline at end of file + }; + })() +); diff --git a/examples/index.html b/examples/index.html index 1beb614c..ddcfa271 100644 --- a/examples/index.html +++ b/examples/index.html @@ -1,9 +1,8 @@ - - F2 - Examples - - - - - \ No newline at end of file + + F2 - Examples + + + + diff --git a/karma.conf.js b/karma.conf.js index 404845d6..a93f9fd7 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,49 +1,46 @@ -process.env.CHROME_BIN = require('puppeteer').executablePath() +process.env.CHROME_BIN = require('puppeteer').executablePath(); -module.exports = function(config) { - config.set({ - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: '', - browsers: ['Chrome'], - client: { - jasmine: { - failFast: true - } - }, - // enable / disable colors in the output (reporters and logs) - colors: true, - concurrency: Infinity, - customContextFile: 'tests/context.html', - customDebugFile: 'tests/debug.html', - exclude: [ - // TODO: need to figure out the best way to test AMD - perhaps separately - // from the rest of the tests - 'tests/spec/amd-spec.js' - ], - files: [ - 'tests/spec/spec-helpers.js', - 'tests/spec/**/*-spec.js' - ], - frameworks: ['jasmine'], - jasmineHtmlReporter: { - suppressAll: true - }, - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, - middleware: ['serve-static-map'], - // web server port - port: 3000, - proxies: { - '/F2/apps/test/http-post': 'http://localhost:8080/F2/apps/test/http-post' - }, - reporters: ['kjhtml'], - serveStaticMap: [ - { fsPath: './dist', baseURL: '/dist' }, - { fsPath: './tests', baseURL: '/tests' } - ], - singleRun: false - }) -} +module.exports = function (config) { + config.set({ + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', + browsers: ['Chrome'], + client: { + jasmine: { + failFast: true + } + }, + // enable / disable colors in the output (reporters and logs) + colors: true, + concurrency: Infinity, + customContextFile: 'tests/context.html', + customDebugFile: 'tests/debug.html', + exclude: [ + // TODO: need to figure out the best way to test AMD - perhaps separately + // from the rest of the tests + 'tests/spec/amd-spec.js' + ], + files: ['tests/spec/spec-helpers.js', 'tests/spec/**/*-spec.js'], + frameworks: ['jasmine'], + jasmineHtmlReporter: { + suppressAll: true + }, + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + middleware: ['serve-static-map'], + // web server port + port: 3000, + proxies: { + '/F2/apps/test/http-post': 'http://localhost:8080/F2/apps/test/http-post' + }, + reporters: ['kjhtml'], + serveStaticMap: [ + { fsPath: './dist', baseURL: '/dist' }, + { fsPath: './tests', baseURL: '/tests' } + ], + singleRun: false + }); +}; diff --git a/package-lock.json b/package-lock.json index 0a65f565..14cee5fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -88,6 +88,74 @@ "integrity": "sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g==", "dev": true }, + "@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, "@polka/url": { "version": "1.0.0-next.15", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.15.tgz", @@ -355,6 +423,18 @@ "negotiator": "0.6.2" } }, + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true + }, "acorn-walk": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.1.tgz", @@ -379,6 +459,18 @@ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -435,6 +527,12 @@ "dev": true, "optional": true }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, "async": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", @@ -764,6 +862,12 @@ "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", "dev": true }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, "caniuse-lite": { "version": "1.0.30001244", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001244.tgz", @@ -1083,6 +1187,28 @@ } } }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "cryptiles": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz", @@ -1157,6 +1283,12 @@ "ms": "2.0.0" } }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "delayed-stream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", @@ -1188,6 +1320,15 @@ "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=", "dev": true }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dom-serialize": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", @@ -1369,6 +1510,15 @@ "tapable": "^2.2.0" } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, "ent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", @@ -1420,6 +1570,92 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "7.31.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.31.0.tgz", + "integrity": "sha512-vafgJpSh2ia8tnTkNUkwxGmnumgckLh5aAbLa1xRmIn9+owi8qBNGKL+B881kNKNTy7FFqTEkpNkUvmw0n6PkA==", + "dev": true, + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "eslint-config-prettier": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", + "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "dev": true + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -1430,6 +1666,71 @@ "estraverse": "^4.1.1" } }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, "esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -1453,6 +1754,12 @@ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -1649,6 +1956,12 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, "fastest-levenshtein": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", @@ -1670,6 +1983,15 @@ "integrity": "sha1-nrnlhboIqvcAVjU40Xu+u81aPbI=", "dev": true }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -1704,6 +2026,24 @@ "path-exists": "^4.0.0" } }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "dependencies": { + "flatted": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.1.tgz", + "integrity": "sha512-OMQjaErSFHmHqZe+PSidH5n8j3O0F2DdnVh8JB4j4eUQ2k6KvB0qGfrKIhapvez5JerBbmWkaLYUYWISaESoXg==", + "dev": true + } + } + }, "flatted": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", @@ -1798,6 +2138,12 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -1833,6 +2179,15 @@ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "dev": true }, + "globals": { + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.10.0.tgz", + "integrity": "sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, "graceful-fs": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", @@ -2042,6 +2397,22 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, "import-local": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", @@ -2052,6 +2423,12 @@ "resolve-cwd": "^3.0.0" } }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -2104,6 +2481,12 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -2192,6 +2575,16 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "jshint": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.0.tgz", @@ -2234,6 +2627,12 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -2436,6 +2835,16 @@ "klona": "^2.0.4" } }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, "lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", @@ -2513,6 +2922,18 @@ "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", "dev": true }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, "lodash.union": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", @@ -2681,6 +3102,12 @@ "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", "dev": true }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", @@ -2800,6 +3227,20 @@ "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", "dev": true }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -2841,6 +3282,15 @@ "integrity": "sha1-iXz0XRHnLvbF195menwwM2xdNhs=", "dev": true }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -2871,6 +3321,12 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, "path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -3012,6 +3468,18 @@ "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", "dev": true }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prettier": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==", + "dev": true + }, "printj": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", @@ -3024,6 +3492,12 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -3226,6 +3700,12 @@ "resolve": "^1.9.0" } }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, "request": { "version": "2.40.0", "resolved": "https://registry.npmjs.org/request/-/request-2.40.0.tgz", @@ -3274,6 +3754,12 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -3307,6 +3793,12 @@ } } }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, "rfdc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", @@ -3451,6 +3943,21 @@ "kind-of": "^6.0.2" } }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, "shelljs": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", @@ -3482,6 +3989,17 @@ } } }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, "sntp": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz", @@ -3666,6 +4184,17 @@ } } }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -3682,12 +4211,27 @@ "dev": true, "optional": true }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -3697,6 +4241,40 @@ "has-flag": "^4.0.0" } }, + "table": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", + "dev": true, + "requires": { + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } + } + }, "tapable": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", @@ -3785,6 +4363,12 @@ "terser": "^5.7.0" } }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -3836,6 +4420,21 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -4107,6 +4706,12 @@ "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", "dev": true }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index 9c721bf1..b566b84e 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,9 @@ "build-dev": "webpack --config webpack.dev.js", "docs": "rm -rf ./docs/dist && webpack --config ./docs/src/webpack.config.js && node docs/bin/gen-docs && node docs/bin/yuidocs && rm docs/dist/css/site.js && cp -r docs/src/img docs/src/fonts docs/src/apps docs/src/js docs/dist && cp dist/* docs/dist/js", "docs-live": "http-server ./docs/dist", + "examples": "http-server ./ -o /examples/container/index.html", "gh-pages": "cp -r docs/dist/* ../gh-pages && cp dist/* ../gh-pages && npm run zip", - "lint": "jshint --verbose src/", + "lint": "eslint src/ && prettier --check .", "test": "npm run lint && concurrently -s first -k -r \"cross-env PORT=8080 node tests/server\" \"cross-env PORT=8081 node tests/server\" \"karma start --single-run --browsers ChromeHeadless --reporters nested\"", "test-debug": "npm run lint && concurrently -s first -k -r \"cross-env PORT=8080 node tests/server\" \"cross-env PORT=8081 node tests/server\" \"karma start --log-level debug --single-run --browsers ChromeHeadless --reporters nested\"", "test-live": "npm run lint && concurrently -s first -k -r \"cross-env PORT=8080 node tests/server\" \"cross-env PORT=8081 node tests/server\" \"karma start\"", @@ -36,6 +37,8 @@ "cross-env": "^7.0.3", "css-loader": "^5.2.7", "domify": "^1.4.1", + "eslint": "^7.31.0", + "eslint-config-prettier": "^8.3.0", "eventemitter2": "^6.4.4", "express": "^4.16.2", "fetch-jsonp": "^1.1.3", @@ -55,6 +58,7 @@ "mini-css-extract-plugin": "^2.1.0", "moment": "^2.20.1", "pandoc": "0.2.0", + "prettier": "^2.3.2", "puppeteer": "^10.1.0", "semver": "^7.3.5", "webpack": "^5.42.0", diff --git a/src/appHandlers.js b/src/appHandlers.js index 1b5abbce..ef651d9a 100644 --- a/src/appHandlers.js +++ b/src/appHandlers.js @@ -19,15 +19,11 @@ var _handlerCollection = { }; var _defaultMethods = { - appRender: function(appConfig, appHtml) - { + appRender: function (appConfig, appHtml) { // if no app root is defined use the app's outer most node - if(!dom.isNativeNode(appConfig.root)) - { + if (!dom.isNativeNode(appConfig.root)) { appConfig.root = domify(appHtml); - } - else - { + } else { // append the app html to the root appConfig.root.appendChild(domify(appHtml)); } @@ -35,17 +31,22 @@ var _defaultMethods = { // append the root to the body by default. document.body.appendChild(appConfig.root); }, - appDestroy: function(appInstance) - { + appDestroy: function (appInstance) { // call the apps destroy method, if it has one - if(appInstance && appInstance.app && appInstance.app.destroy && typeof(appInstance.app.destroy) == 'function') - { + if ( + appInstance && + appInstance.app && + appInstance.app.destroy && + typeof appInstance.app.destroy == 'function' + ) { appInstance.app.destroy(); } // warn the Container and App Developer that even though they have a destroy method it hasn't been - else if(appInstance && appInstance.app && appInstance.app.destroy) - { - utils.log(appInstance.config.appId + ' has a destroy property, but destroy is not of type function and as such will not be executed.'); + else if (appInstance && appInstance.app && appInstance.app.destroy) { + utils.log( + appInstance.config.appId + + ' has a destroy property, but destroy is not of type function and as such will not be executed.' + ); } // remove the root @@ -55,68 +56,66 @@ var _defaultMethods = { } }; -var _createHandler = function(token, sNamespace, func_or_element, bDomNodeAppropriate) -{ +var _createHandler = function ( + token, + sNamespace, + func_or_element, + bDomNodeAppropriate +) { // will throw an exception and stop execution if the token is invalid _validateToken(token); // create handler structure. Not all arguments properties will be populated/used. var handler = { - func: (typeof(func_or_element)) ? func_or_element : null, + func: func_or_element || null, namespace: sNamespace, - domNode: (dom.isNativeNode(func_or_element)) ? func_or_element : null + domNode: dom.isNativeNode(func_or_element) ? func_or_element : null }; - if(!handler.func && !handler.domNode) - { - throw ('Invalid or null argument passed. Handler will not be added to collection. A valid dom element or callback function is required.'); + if (!handler.func && !handler.domNode) { + throw 'Invalid or null argument passed. Handler will not be added to collection. A valid dom element or callback function is required.'; } - if(handler.domNode && !bDomNodeAppropriate) - { - throw ('Invalid argument passed. Handler will not be added to collection. A callback function is required for this event type.'); + if (handler.domNode && !bDomNodeAppropriate) { + throw 'Invalid argument passed. Handler will not be added to collection. A callback function is required for this event type.'; } return handler; }; -var _validateToken = function(sToken) -{ +var _validateToken = function (sToken) { // check token against F2 and container - if(_ct != sToken && _f2t != sToken) { throw ('Invalid token passed. Please verify that you have correctly received and stored token from F2.AppHandlers.getToken().'); } + if (_ct != sToken && _f2t != sToken) { + throw 'Invalid token passed. Please verify that you have correctly received and stored token from F2.AppHandlers.getToken().'; + } }; -var _removeHandler = function(sToken, eventKey, sNamespace) -{ +var _removeHandler = function (sToken, eventKey, sNamespace) { // will throw an exception and stop execution if the token is invalid _validateToken(sToken); - if(!sNamespace && !eventKey) - { + if (!sNamespace && !eventKey) { return; } // remove by event key - else if(!sNamespace && eventKey) - { + else if (!sNamespace && eventKey) { _handlerCollection[eventKey] = []; } // remove by namespace only - else if(sNamespace && !eventKey) - { + else if (sNamespace && !eventKey) { sNamespace = sNamespace.toLowerCase(); - for(var currentEventKey in _handlerCollection) - { + for (var currentEventKey in _handlerCollection) { var eventCollection = _handlerCollection[currentEventKey]; var newEvents = []; - for(var i = 0, ec = eventCollection.length; i < ec; i++) - { + for (var i = 0, ec = eventCollection.length; i < ec; i++) { var currentEventHandler = eventCollection[i]; - if(currentEventHandler) - { - if(!currentEventHandler.namespace || currentEventHandler.namespace.toLowerCase() != sNamespace) - { + if (currentEventHandler) { + if ( + !currentEventHandler.namespace || + currentEventHandler.namespace.toLowerCase() != sNamespace + ) { newEvents.push(currentEventHandler); } } @@ -124,20 +123,22 @@ var _removeHandler = function(sToken, eventKey, sNamespace) eventCollection = newEvents; } - } - else if(sNamespace && _handlerCollection[eventKey]) - { + } else if (sNamespace && _handlerCollection[eventKey]) { sNamespace = sNamespace.toLowerCase(); var newHandlerCollection = []; - for(var iCounter = 0, hc = _handlerCollection[eventKey].length; iCounter < hc; iCounter++) - { + for ( + var iCounter = 0, hc = _handlerCollection[eventKey].length; + iCounter < hc; + iCounter++ + ) { var currentHandler = _handlerCollection[eventKey][iCounter]; - if(currentHandler) - { - if(!currentHandler.namespace || currentHandler.namespace.toLowerCase() != sNamespace) - { + if (currentHandler) { + if ( + !currentHandler.namespace || + currentHandler.namespace.toLowerCase() != sNamespace + ) { newHandlerCollection.push(currentHandler); } } @@ -177,13 +178,12 @@ var _removeHandler = function(sToken, eventKey, sNamespace) */ export default { /** - * Allows Container Developer to retrieve a unique token which must be passed to - * all `on` and `off` methods. This function will self destruct and can only be called - * one time. Container Developers must store the return value inside of a closure. - * @method getToken - **/ - getToken: function() - { + * Allows Container Developer to retrieve a unique token which must be passed to + * all `on` and `off` methods. This function will self destruct and can only be called + * one time. Container Developers must store the return value inside of a closure. + * @method getToken + **/ + getToken: function () { // delete this method for security that way only the container has access to the token 1 time. // kind of Ethan Hunt-ish, this message will self destruct immediately. delete this.getToken; @@ -191,14 +191,13 @@ export default { return _ct; }, /** - * Allows F2 to get a token internally. Token is required to call {{#crossLink "F2.AppHandlers/\_\_trigger:method"}}{{/crossLink}}. - * This function will self destruct to eliminate other sources from using the {{#crossLink "F2.AppHandlers/\_\_trigger:method"}}{{/crossLink}} - * and additional internal methods. - * @method __f2GetToken - * @private - **/ - __f2GetToken: function() - { + * Allows F2 to get a token internally. Token is required to call {{#crossLink "F2.AppHandlers/\_\_trigger:method"}}{{/crossLink}}. + * This function will self destruct to eliminate other sources from using the {{#crossLink "F2.AppHandlers/\_\_trigger:method"}}{{/crossLink}} + * and additional internal methods. + * @method __f2GetToken + * @private + **/ + __f2GetToken: function () { // delete this method for security that way only the F2 internally has access to the token 1 time. // kind of Ethan Hunt-ish, this message will self destruct immediately. delete this.__f2GetToken; @@ -206,199 +205,191 @@ export default { return _f2t; }, /** - * Allows F2 to trigger specific events internally. - * @method __trigger - * @private - * @chainable - * @param {String} token The token received from {{#crossLink "F2.AppHandlers/\_\_f2GetToken:method"}}{{/crossLink}}. - * @param {String} eventKey The event to fire. The complete list of event keys is available in {{#crossLink "F2.Constants.AppHandlers"}}{{/crossLink}}. - **/ - __trigger: function(token, eventKey) // additional arguments will likely be passed - { + * Allows F2 to trigger specific events internally. + * @method __trigger + * @private + * @chainable + * @param {String} token The token received from {{#crossLink "F2.AppHandlers/\_\_f2GetToken:method"}}{{/crossLink}}. + * @param {String} eventKey The event to fire. The complete list of event keys is available in {{#crossLink "F2.Constants.AppHandlers"}}{{/crossLink}}. + **/ + __trigger: function ( + token, + eventKey // additional arguments will likely be passed + ) { // will throw an exception and stop execution if the token is invalid - if(token != _f2t) - { - throw ('Token passed is invalid. Only F2 is allowed to call F2.AppHandlers.__trigger().'); + if (token != _f2t) { + throw 'Token passed is invalid. Only F2 is allowed to call F2.AppHandlers.__trigger().'; } - if(_handlerCollection && _handlerCollection[eventKey]) - { + if (_handlerCollection && _handlerCollection[eventKey]) { // create a collection of arguments that are safe to pass to the callback. var passableArgs = []; // populate that collection with all arguments except token and eventKey - for(var i = 2, j = arguments.length; i < j; i++) - { + for (var i = 2, j = arguments.length; i < j; i++) { passableArgs.push(arguments[i]); } - if(_handlerCollection[eventKey].length === 0 && _defaultMethods[eventKey]) - { - _defaultMethods[eventKey].apply(F2, passableArgs); + if ( + _handlerCollection[eventKey].length === 0 && + _defaultMethods[eventKey] + ) { + _defaultMethods[eventKey].apply(this, passableArgs); return this; - } - else if(_handlerCollection[eventKey].length === 0 && !_handlerCollection[eventKey]) - { + } else if ( + _handlerCollection[eventKey].length === 0 && + !_handlerCollection[eventKey] + ) { return this; } // fire all event listeners in the order that they were added. - for(var iCounter = 0, hcl = _handlerCollection[eventKey].length; iCounter < hcl; iCounter++) - { + for ( + var iCounter = 0, hcl = _handlerCollection[eventKey].length; + iCounter < hcl; + iCounter++ + ) { var handler = _handlerCollection[eventKey][iCounter]; // appRender where root is already defined - if (handler.domNode && arguments[2] && arguments[2].root && arguments[3]) - { + if ( + handler.domNode && + arguments[2] && + arguments[2].root && + arguments[3] + ) { arguments[2].root.appendChild(domify(arguments[3])); handler.domNode.appendChild(arguments[2].root); - } - else if (handler.domNode && arguments[2] && !arguments[2].root && arguments[3]) - { + } else if ( + handler.domNode && + arguments[2] && + !arguments[2].root && + arguments[3] + ) { // set the root to the actual HTML of the app arguments[2].root = domify(arguments[3]); // appends the root to the dom node specified handler.domNode.appendChild(arguments[2].root); - } - else - { - handler.func.apply(F2, passableArgs); + } else { + handler.func.apply(this, passableArgs); } } - } - else - { - throw ('Invalid EventKey passed. Check your inputs and try again.'); + } else { + throw 'Invalid EventKey passed. Check your inputs and try again.'; } return this; }, /** - * Allows Container Developer to easily tell all apps to render in a specific location. Only valid for eventType `appRender`. - * @method on - * @chainable - * @param {String} token The token received from {{#crossLink "F2.AppHandlers/getToken:method"}}{{/crossLink}}. - * @param {String} eventKey{.namespace} The event key used to determine which event to attach the listener to. The namespace is useful for removal - * purposes. At this time it does not affect when an event is fired. Complete list of event keys available in - * {{#crossLink "F2.Constants.AppHandlers"}}{{/crossLink}}. - * @params {HTMLElement} element Specific DOM element to which app gets appended. - * @example - * var _token = F2.AppHandlers.getToken(); - * F2.AppHandlers.on( - * _token, - * 'appRender', - * document.getElementById('my_app') - * ); - * - * Or: - * @example - * F2.AppHandlers.on( - * _token, - * 'appRender.myNamespace', - * document.getElementById('my_app') - * ); - **/ + * Allows Container Developer to easily tell all apps to render in a specific location. Only valid for eventType `appRender`. + * @method on + * @chainable + * @param {String} token The token received from {{#crossLink "F2.AppHandlers/getToken:method"}}{{/crossLink}}. + * @param {String} eventKey{.namespace} The event key used to determine which event to attach the listener to. The namespace is useful for removal + * purposes. At this time it does not affect when an event is fired. Complete list of event keys available in + * {{#crossLink "F2.Constants.AppHandlers"}}{{/crossLink}}. + * @params {HTMLElement} element Specific DOM element to which app gets appended. + * @example + * var _token = F2.AppHandlers.getToken(); + * F2.AppHandlers.on( + * _token, + * 'appRender', + * document.getElementById('my_app') + * ); + * + * Or: + * @example + * F2.AppHandlers.on( + * _token, + * 'appRender.myNamespace', + * document.getElementById('my_app') + * ); + **/ /** - * Allows Container Developer to add listener method that will be triggered when a specific event occurs. - * @method on - * @chainable - * @param {String} token The token received from {{#crossLink "F2.AppHandlers/getToken:method"}}{{/crossLink}}. - * @param {String} eventKey{.namespace} The event key used to determine which event to attach the listener to. The namespace is useful for removal - * purposes. At this time it does not affect when an event is fired. Complete list of event keys available in - * {{#crossLink "F2.Constants.AppHandlers"}}{{/crossLink}}. - * @params {Function} listener A function that will be triggered when a specific event occurs. For detailed argument definition refer to {{#crossLink "F2.Constants.AppHandlers"}}{{/crossLink}}. - * @example - * var _token = F2.AppHandlers.getToken(); - * F2.AppHandlers.on( - * _token, - * 'appRenderBefore' - * function() { F2.log('before app rendered!'); } - * ); - * - * Or: - * @example - * F2.AppHandlers.on( - * _token, - * 'appRenderBefore.myNamespace', - * function() { F2.log('before app rendered!'); } - * ); - **/ - on: function(token, eventKey, func_or_element) - { + * Allows Container Developer to add listener method that will be triggered when a specific event occurs. + * @method on + * @chainable + * @param {String} token The token received from {{#crossLink "F2.AppHandlers/getToken:method"}}{{/crossLink}}. + * @param {String} eventKey{.namespace} The event key used to determine which event to attach the listener to. The namespace is useful for removal + * purposes. At this time it does not affect when an event is fired. Complete list of event keys available in + * {{#crossLink "F2.Constants.AppHandlers"}}{{/crossLink}}. + * @params {Function} listener A function that will be triggered when a specific event occurs. For detailed argument definition refer to {{#crossLink "F2.Constants.AppHandlers"}}{{/crossLink}}. + * @example + * var _token = F2.AppHandlers.getToken(); + * F2.AppHandlers.on( + * _token, + * 'appRenderBefore' + * function() { F2.log('before app rendered!'); } + * ); + * + * Or: + * @example + * F2.AppHandlers.on( + * _token, + * 'appRenderBefore.myNamespace', + * function() { F2.log('before app rendered!'); } + * ); + **/ + on: function (token, eventKey, func_or_element) { var sNamespace = null; - if(!eventKey) - { - throw ('eventKey must be of type string and not null. For available appHandlers check F2.Constants.AppHandlers.'); + if (!eventKey) { + throw 'eventKey must be of type string and not null. For available appHandlers check F2.Constants.AppHandlers.'; } // we need to check the key for a namespace - if(eventKey.indexOf('.') > -1) - { + if (eventKey.indexOf('.') > -1) { var arData = eventKey.split('.'); eventKey = arData[0]; sNamespace = arData[1]; } - if(_handlerCollection && _handlerCollection[eventKey]) - { + if (_handlerCollection && _handlerCollection[eventKey]) { _handlerCollection[eventKey].push( _createHandler( token, sNamespace, func_or_element, - (eventKey == 'appRender') + eventKey == 'appRender' ) ); - } - else - { - throw ('Invalid EventKey passed. Check your inputs and try again.'); + } else { + throw 'Invalid EventKey passed. Check your inputs and try again.'; } return this; }, /** - * Allows Container Developer to remove listener methods for specific events - * @method off - * @chainable - * @param {String} token The token received from {{#crossLink "F2.AppHandlers/getToken:method"}}{{/crossLink}}. - * @param {String} eventKey{.namespace} The event key used to determine which event to attach the listener to. If no namespace is provided all - * listeners for the specified event type will be removed. - * Complete list available in {{#crossLink "F2.Constants.AppHandlers"}}{{/crossLink}}. - * @example - * var _token = F2.AppHandlers.getToken(); - * F2.AppHandlers.off(_token,'appRenderBefore'); - * - **/ - off: function(token, eventKey) - { + * Allows Container Developer to remove listener methods for specific events + * @method off + * @chainable + * @param {String} token The token received from {{#crossLink "F2.AppHandlers/getToken:method"}}{{/crossLink}}. + * @param {String} eventKey{.namespace} The event key used to determine which event to attach the listener to. If no namespace is provided all + * listeners for the specified event type will be removed. + * Complete list available in {{#crossLink "F2.Constants.AppHandlers"}}{{/crossLink}}. + * @example + * var _token = F2.AppHandlers.getToken(); + * F2.AppHandlers.off(_token,'appRenderBefore'); + * + **/ + off: function (token, eventKey) { var sNamespace = null; - if(!eventKey) - { - throw ('eventKey must be of type string and not null. For available appHandlers check F2.Constants.AppHandlers.'); + if (!eventKey) { + throw 'eventKey must be of type string and not null. For available appHandlers check F2.Constants.AppHandlers.'; } // we need to check the key for a namespace - if(eventKey.indexOf('.') > -1) - { + if (eventKey.indexOf('.') > -1) { var arData = eventKey.split('.'); eventKey = arData[0]; sNamespace = arData[1]; } - if(_handlerCollection && _handlerCollection[eventKey]) - { - _removeHandler( - token, - eventKey, - sNamespace - ); - } - else - { - throw ('Invalid EventKey passed. Check your inputs and try again.'); + if (_handlerCollection && _handlerCollection[eventKey]) { + _removeHandler(token, eventKey, sNamespace); + } else { + throw 'Invalid EventKey passed. Check your inputs and try again.'; } return this; diff --git a/src/apps.js b/src/apps.js index 58b3463a..70b73ccf 100644 --- a/src/apps.js +++ b/src/apps.js @@ -33,4 +33,4 @@ * }; * @for F2 */ -export default {}; \ No newline at end of file +export default {}; diff --git a/src/autoload.js b/src/autoload.js index 53524afa..f1fc1b26 100644 --- a/src/autoload.js +++ b/src/autoload.js @@ -1,15 +1,18 @@ import container from './container'; -export default function() { - - var callback = function() { +export default function () { + var callback = function () { var autoloadEls = [], - add = function(e) { - if (!e) { return; } + add = function (e) { + if (!e) { + return; + } autoloadEls.push(e); }, - addAll = function(els) { - if (!els) { return; } + addAll = function (els) { + if (!els) { + return; + } for (var i = 0, len = els.length; i < len; i++) { add(els[i]); } @@ -33,9 +36,12 @@ export default function() { } }; - if (document.readyState === 'complete' || (document.readyState !== 'loading' && !document.documentElement.doScroll)) { + if ( + document.readyState === 'complete' || + (document.readyState !== 'loading' && !document.documentElement.doScroll) + ) { callback(); } else { document.addEventListener('DOMContentLoaded', callback); } -} \ No newline at end of file +} diff --git a/src/classes/app.js b/src/classes/app.js index 3387b0d6..113fa0d2 100644 --- a/src/classes/app.js +++ b/src/classes/app.js @@ -1,31 +1,33 @@ +/* eslint-disable no-unused-vars */ + /** -* The App Class is an optional class that can be namespaced onto the -* {{#crossLink "F2\Apps"}}{{/crossLink}} namespace. The -* [F2 Docs](../../app-development.html#app-class) -* has more information on the usage of the App Class. -* @class F2.App -* @constructor -* @param {F2.AppConfig} appConfig The F2.AppConfig object for the app -* @param {F2.AppManifest.AppContent} appContent The F2.AppManifest.AppContent -* object -* @param {Element} root The root DOM Element for the app -*/ -module.exports = function(appConfig, appContent, root) { - return { - /** - * An optional init function that will automatically be called when - *{{#crossLink "F2/registerApps"}}F2.registerApps(){{/crossLink}} is called. - * @method init - * @optional - */ - init:function() {}, - /** - * An optional destroy function that will automatically be called when - * {{#crossLink "F2/removeApp"}}F2.removeApp(){{/crossLink}} and subsequently - * the {{#crossLink "F2.Constants.AppHandlers/APP_DESTROY:property"}}F2.Constants.AppHandlers.APP_DESTROY{{/crossLink}} AppHandler. - * @method destroy - * @optional - */ - destroy:function() {} - }; -}; + * The App Class is an optional class that can be namespaced onto the + * {{#crossLink "F2\Apps"}}{{/crossLink}} namespace. The + * [F2 Docs](../../app-development.html#app-class) + * has more information on the usage of the App Class. + * @class F2.App + * @constructor + * @param {F2.AppConfig} appConfig The F2.AppConfig object for the app + * @param {F2.AppManifest.AppContent} appContent The F2.AppManifest.AppContent + * object + * @param {Element} root The root DOM Element for the app + */ +export default function (appConfig, appContent, root) { + return { + /** + * An optional init function that will automatically be called when + *{{#crossLink "F2/registerApps"}}F2.registerApps(){{/crossLink}} is called. + * @method init + * @optional + */ + init: function () {}, + /** + * An optional destroy function that will automatically be called when + * {{#crossLink "F2/removeApp"}}F2.removeApp(){{/crossLink}} and subsequently + * the {{#crossLink "F2.Constants.AppHandlers/APP_DESTROY:property"}}F2.Constants.AppHandlers.APP_DESTROY{{/crossLink}} AppHandler. + * @method destroy + * @optional + */ + destroy: function () {} + }; +} diff --git a/src/classes/appConfig.js b/src/classes/appConfig.js index 56ef1f88..d52e7ef1 100644 --- a/src/classes/appConfig.js +++ b/src/classes/appConfig.js @@ -2,7 +2,7 @@ * The AppConfig object represents an app's meta data * @class F2.AppConfig */ -module.exports = { +export default { /** * The unique ID of the app. More information can be found * [here](../../app-development.html#f2-appid) @@ -116,4 +116,4 @@ module.exports = { * @type Element */ root: undefined -}; \ No newline at end of file +}; diff --git a/src/classes/appContent.js b/src/classes/appContent.js index 404859f8..69e56f06 100644 --- a/src/classes/appContent.js +++ b/src/classes/appContent.js @@ -2,7 +2,7 @@ * The AppContent object * @class F2.AppManifest.AppContent **/ -module.exports = { +export default { /** * Arbitrary data to be passed along with the app * @property data @@ -24,4 +24,4 @@ module.exports = { * @optional */ status: '' -}; \ No newline at end of file +}; diff --git a/src/classes/appManifest.js b/src/classes/appManifest.js index 16c969e9..090aa21b 100644 --- a/src/classes/appManifest.js +++ b/src/classes/appManifest.js @@ -2,7 +2,7 @@ * The assets needed to render an app on the page * @class F2.AppManifest */ -module.exports = { +export default { /** * The array of {{#crossLink "F2.AppManifest.AppContent"}}{{/crossLink}} * objects @@ -32,4 +32,4 @@ module.exports = { * @optional */ styles: [] -}; \ No newline at end of file +}; diff --git a/src/classes/containerConfig.js b/src/classes/containerConfig.js index e4537187..f74c0a59 100644 --- a/src/classes/containerConfig.js +++ b/src/classes/containerConfig.js @@ -1,9 +1,11 @@ +/* eslint-disable no-unused-vars */ + /** * An object containing configuration information for the * [container](../../container-development.html) * @class F2.ContainerConfig */ -module.exports = { +export default { /** * True to enable debug mode in F2.js. Adds additional logging, resource cache busting, etc. * @property debugMode @@ -45,28 +47,28 @@ module.exports = { * finishes (after success and error callbacks have been executed) * @return {XMLHttpRequest} The XMLHttpRequest object * -  * @example -         *     F2.init({ -         *         xhr: function(url, appConfigs,successCallback, errorCallback, completeCallback) { -         *          var jsonpCallback = F2.Constants.JSONP_CALLBACK + appConfigs[0].appId, // Unique function name - * var fetchUrl = url + '?params=' + F2.stringify(appConfigs.apps, F2.appConfigReplacer); -         *          var fetchFunc = fetchJsonp(fetchUrl, { -         *                          timeout: 3000, -         *                          jsonpCallbackFunction: jsonpCallback -         *                          });                 -         *           fetchFunc.then(function(response) { -         *                          return response.json(); -         *                      }) -         *                      .then(function(data) { -         *                       successCallback(data); -         *                       completeCallback();                          -         *                  }) -         *                  .catch(function(error) { -         *                      F2.log('Failed to load app(s)', error.toString()); -         *                      errorCallback(); -         *                  }); -         *         } -         *     }); + * @example + *     F2.init({ + *         xhr: function(url, appConfigs,successCallback, errorCallback, completeCallback) { + *          var jsonpCallback = F2.Constants.JSONP_CALLBACK + appConfigs[0].appId, // Unique function name + * var fetchUrl = url + '?params=' + F2.stringify(appConfigs.apps, F2.appConfigReplacer); + *          var fetchFunc = fetchJsonp(fetchUrl, { + *                          timeout: 3000, + *                          jsonpCallbackFunction: jsonpCallback + *                          }); + *           fetchFunc.then(function(response) { + *                          return response.json(); + *                      }) + *                      .then(function(data) { + *                       successCallback(data); + *                       completeCallback(); + *                  }) + *                  .catch(function(error) { + *                      F2.log('Failed to load app(s)', error.toString()); + *                      errorCallback(); + *                  }); + *         } + *     }); * * @for F2.ContainerConfig */ @@ -108,7 +110,7 @@ module.exports = { * } * }); */ - dataType: function(url, appConfigs) {}, + dataType: function (url, appConfigs) {}, /** * Allows the container to override the request method that is used. * @method xhr.type @@ -129,7 +131,7 @@ module.exports = { * } * }); */ - type: function(url, appConfigs) {}, + type: function (url, appConfigs) {}, /** * Allows the container to override the url that is used to request an * app's F2.{{#crossLink "F2.AppManifest"}}{{/crossLink}} @@ -148,7 +150,7 @@ module.exports = { * } * }); */ - url: function(url, appConfigs) {} + url: function (url, appConfigs) {} }, /** * Allows the container to override the script loader which requests @@ -164,7 +166,7 @@ module.exports = { * } * }); */ - loadScripts: function(scripts,inlines,callback){}, + loadScripts: function (scripts, inlines, callback) {}, /** * Allows the container to override the stylesheet loader which requests * dependencies defined in the {{#crossLink "F2.AppManifest"}}{{/crossLink}}. @@ -179,5 +181,5 @@ module.exports = { * } * }); */ - loadStyles: function(styles,callback){} -}; \ No newline at end of file + loadStyles: function (styles, callback) {} +}; diff --git a/src/constants/appHandlers.js b/src/constants/appHandlers.js index 643562f8..0e67341d 100644 --- a/src/constants/appHandlers.js +++ b/src/constants/appHandlers.js @@ -3,48 +3,48 @@ * @class F2.Constants.AppHandlers * @static */ -module.exports = { +export default { /** - * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the - * following argument(s): ( {{#crossLink "F2.AppConfig"}}appConfig{{/crossLink}} ) - * @property APP_MANIFEST_REQUEST_FAIL - * @type string - * @static - * @final - * @example - * var _token = F2.AppHandlers.getToken(); - * F2.AppHandlers.on( - * _token, - * F2.Constants.AppHandlers.APP_MANIFEST_REQUEST_FAIL, - * function(appConfig) - * { - * You can use information from the appConfig to surface a custom error message in the dom - * Or display some kind of default error placeholder element rather than having a blank spot in the dom - * } - * ); - */ + * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the + * following argument(s): ( {{#crossLink "F2.AppConfig"}}appConfig{{/crossLink}} ) + * @property APP_MANIFEST_REQUEST_FAIL + * @type string + * @static + * @final + * @example + * var _token = F2.AppHandlers.getToken(); + * F2.AppHandlers.on( + * _token, + * F2.Constants.AppHandlers.APP_MANIFEST_REQUEST_FAIL, + * function(appConfig) + * { + * You can use information from the appConfig to surface a custom error message in the dom + * Or display some kind of default error placeholder element rather than having a blank spot in the dom + * } + * ); + */ APP_MANIFEST_REQUEST_FAIL: 'appManifestRequestFail', /** - * Identifies the create root method for use in AppHandlers.on/off. - * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the - * following argument(s): ( {{#crossLink "F2.AppConfig"}}appConfig{{/crossLink}} ) - * @property APP_CREATE_ROOT - * @type string - * @static - * @final - * @example - * var _token = F2.AppHandlers.getToken(); - * F2.AppHandlers.on( - * _token, - * F2.Constants.AppHandlers.APP_CREATE_ROOT, - * function(appConfig) - * { - * // If you want to create a custom root. By default F2 uses the app's outermost HTML element. - * // the app's html is not available until after the manifest is retrieved so this logic occurs in F2.Constants.AppHandlers.APP_RENDER - * appConfig.root = document.createElement('section'); - * } - * ); - */ + * Identifies the create root method for use in AppHandlers.on/off. + * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the + * following argument(s): ( {{#crossLink "F2.AppConfig"}}appConfig{{/crossLink}} ) + * @property APP_CREATE_ROOT + * @type string + * @static + * @final + * @example + * var _token = F2.AppHandlers.getToken(); + * F2.AppHandlers.on( + * _token, + * F2.Constants.AppHandlers.APP_CREATE_ROOT, + * function(appConfig) + * { + * // If you want to create a custom root. By default F2 uses the app's outermost HTML element. + * // the app's html is not available until after the manifest is retrieved so this logic occurs in F2.Constants.AppHandlers.APP_RENDER + * appConfig.root = document.createElement('section'); + * } + * ); + */ APP_CREATE_ROOT: 'appCreateRoot', /** * Identifies the before app render method for use in AppHandlers.on/off. @@ -67,145 +67,145 @@ module.exports = { */ APP_RENDER_BEFORE: 'appRenderBefore', /** - * Identifies the app render method for use in AppHandlers.on/off. - * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the - * following argument(s): ( {{#crossLink "F2.AppConfig"}}appConfig{{/crossLink}}, [appHtml](../../app-development.html#app-design) ) - * @property APP_RENDER - * @type string - * @static - * @final - * @example - *   var _token = F2.AppHandlers.getToken(); -            *   F2.AppHandlers.on( -            *       _token, -            *       F2.Constants.AppHandlers.APP_RENDER, -            *       function(appConfig, appHtml) -            *       { -            *           // if no app root is defined use the app's outer most node -            *           if(!appConfig.root) -            *           { -            *               appConfig.root = domify(appHtml);                                -            *           } -            *           else -            *           {                        -            *               // append the app html to the root -            *               appConfig.root.appendChild(domify(appHtml)); -            *           }            -            *            -            *           // append the root to the body by default. -            *           document.body.appendChild(appConfig.root); -            *       } -            *   ); -            */ + * Identifies the app render method for use in AppHandlers.on/off. + * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the + * following argument(s): ( {{#crossLink "F2.AppConfig"}}appConfig{{/crossLink}}, [appHtml](../../app-development.html#app-design) ) + * @property APP_RENDER + * @type string + * @static + * @final + * @example + *   var _token = F2.AppHandlers.getToken(); + *   F2.AppHandlers.on( + *       _token, + *       F2.Constants.AppHandlers.APP_RENDER, + *       function(appConfig, appHtml) + *       { + *           // if no app root is defined use the app's outer most node + *           if(!appConfig.root) + *           { + *               appConfig.root = domify(appHtml); + *           } + *           else + *           { + *               // append the app html to the root + *               appConfig.root.appendChild(domify(appHtml)); + *           } + * + *           // append the root to the body by default. + *           document.body.appendChild(appConfig.root); + *       } + *   ); + */ APP_RENDER: 'appRender', /** - * Identifies the after app render method for use in AppHandlers.on/off. - * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the - * following argument(s): ( {{#crossLink "F2.AppConfig"}}appConfig{{/crossLink}} ) - * @property APP_RENDER_AFTER - * @type string - * @static - * @final - * @example - * var _token = F2.AppHandlers.getToken(); - * F2.AppHandlers.on( - * _token, - * F2.Constants.AppHandlers.APP_RENDER_AFTER, - * function(appConfig) - * { - * F2.log(appConfig); - * } - * ); - */ + * Identifies the after app render method for use in AppHandlers.on/off. + * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the + * following argument(s): ( {{#crossLink "F2.AppConfig"}}appConfig{{/crossLink}} ) + * @property APP_RENDER_AFTER + * @type string + * @static + * @final + * @example + * var _token = F2.AppHandlers.getToken(); + * F2.AppHandlers.on( + * _token, + * F2.Constants.AppHandlers.APP_RENDER_AFTER, + * function(appConfig) + * { + * F2.log(appConfig); + * } + * ); + */ APP_RENDER_AFTER: 'appRenderAfter', /** - * Identifies the before app destroy method for use in AppHandlers.on/off. - * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the - * following argument(s): ( appInstance ) - * @property APP_DESTROY_BEFORE - * @type string - * @static - * @final - * @example - * var _token = F2.AppHandlers.getToken(); - * F2.AppHandlers.on( - * _token, - * F2.Constants.AppHandlers.APP_DESTROY_BEFORE, - * function(appInstance) - * { - * F2.log(appInstance); - * } - * ); - */ + * Identifies the before app destroy method for use in AppHandlers.on/off. + * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the + * following argument(s): ( appInstance ) + * @property APP_DESTROY_BEFORE + * @type string + * @static + * @final + * @example + * var _token = F2.AppHandlers.getToken(); + * F2.AppHandlers.on( + * _token, + * F2.Constants.AppHandlers.APP_DESTROY_BEFORE, + * function(appInstance) + * { + * F2.log(appInstance); + * } + * ); + */ APP_DESTROY_BEFORE: 'appDestroyBefore', /** - * Identifies the app destroy method for use in AppHandlers.on/off. - * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the - * following argument(s): ( appInstance ) - * @property APP_DESTROY - * @type string - * @static - * @final - * @example - *   var _token = F2.AppHandlers.getToken(); -            *   F2.AppHandlers.on( -            *       _token, -            *       F2.Constants.AppHandlers.APP_DESTROY, -            *       function(appInstance) -            *       { -            *           // call the apps destroy method, if it has one -            *           if(appInstance && appInstance.app && appInstance.app.destroy && typeof(appInstance.app.destroy) == 'function') -            *           { -            *               appInstance.app.destroy(); -            *           } -            *           else if(appInstance && appInstance.app && appInstance.app.destroy) -            *           { -            *               F2.log(appInstance.config.appId + ' has a destroy property, but destroy is not of type function and as such will not be executed.'); -            *           } -            *            -            *           // remove the root           -            *           appInstance.config.root.parentNode.removeChild(appInstance.config.root); -            *       } -            *   ); -            */ + * Identifies the app destroy method for use in AppHandlers.on/off. + * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the + * following argument(s): ( appInstance ) + * @property APP_DESTROY + * @type string + * @static + * @final + * @example + *   var _token = F2.AppHandlers.getToken(); + *   F2.AppHandlers.on( + *       _token, + *       F2.Constants.AppHandlers.APP_DESTROY, + *       function(appInstance) + *       { + *           // call the apps destroy method, if it has one + *           if(appInstance && appInstance.app && appInstance.app.destroy && typeof(appInstance.app.destroy) == 'function') + *           { + *               appInstance.app.destroy(); + *           } + *           else if(appInstance && appInstance.app && appInstance.app.destroy) + *           { + *               F2.log(appInstance.config.appId + ' has a destroy property, but destroy is not of type function and as such will not be executed.'); + *           } + * + *           // remove the root + *           appInstance.config.root.parentNode.removeChild(appInstance.config.root); + *       } + *   ); + */ APP_DESTROY: 'appDestroy', /** - * Identifies the after app destroy method for use in AppHandlers.on/off. - * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the - * following argument(s): ( appInstance ) - * @property APP_DESTROY_AFTER - * @type string - * @static - * @final - * @example - *   var _token = F2.AppHandlers.getToken(); -            *   F2.AppHandlers.on( -            *       _token, -            *       F2.Constants.AppHandlers.APP_DESTROY_AFTER, -            *       function(appInstance) -            *       { -            *           F2.log(appInstance); -            *       } -            *   ); -            */ + * Identifies the after app destroy method for use in AppHandlers.on/off. + * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the + * following argument(s): ( appInstance ) + * @property APP_DESTROY_AFTER + * @type string + * @static + * @final + * @example + *   var _token = F2.AppHandlers.getToken(); + *   F2.AppHandlers.on( + *       _token, + *       F2.Constants.AppHandlers.APP_DESTROY_AFTER, + *       function(appInstance) + *       { + *           F2.log(appInstance); + *       } + *   ); + */ APP_DESTROY_AFTER: 'appDestroyAfter', /** - * Identifies the app script load failed method for use in AppHandlers.on/off. - * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the - * following argument(s): ( {{#crossLink "F2.AppConfig"}}appConfig{{/crossLink}}, scriptInfo ) - * @property APP_SCRIPT_LOAD_FAILED - * @type string - * @static - * @final - * @example - * var _token = F2.AppHandlers.getToken(); - * F2.AppHandlers.on( - * _token, - * F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, - * function(appConfig, scriptInfo) { - * F2.log(appConfig.appId); - * } - * ); - */ + * Identifies the app script load failed method for use in AppHandlers.on/off. + * When bound using {{#crossLink "F2.AppHandlers/on"}}F2.AppHandlers.on(){{/crossLink}} the listener function passed will receive the + * following argument(s): ( {{#crossLink "F2.AppConfig"}}appConfig{{/crossLink}}, scriptInfo ) + * @property APP_SCRIPT_LOAD_FAILED + * @type string + * @static + * @final + * @example + * var _token = F2.AppHandlers.getToken(); + * F2.AppHandlers.on( + * _token, + * F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, + * function(appConfig, scriptInfo) { + * F2.log(appConfig.appId); + * } + * ); + */ APP_SCRIPT_LOAD_FAILED: 'appScriptLoadFailed' -}; \ No newline at end of file +}; diff --git a/src/constants/css.js b/src/constants/css.js index 66674e0e..8f5a9dcd 100644 --- a/src/constants/css.js +++ b/src/constants/css.js @@ -3,7 +3,7 @@ * @class F2.Constants.Css * @static */ -module.exports = { +export default { /** * The APP class should be applied to the DOM Element that surrounds the * entire app, including any extra html that surrounds the APP\_CONTAINER @@ -24,4 +24,4 @@ module.exports = { * @final */ APP_CONTAINER: 'f2-app-container' -}; \ No newline at end of file +}; diff --git a/src/constants/events.js b/src/constants/events.js index e40be4c9..ec707112 100644 --- a/src/constants/events.js +++ b/src/constants/events.js @@ -3,7 +3,7 @@ * @class F2.Constants.Events * @static */ -module.exports = { +export default { /** * The APP_SCRIPTS_LOADED event is fired when all the scripts defined in * the AppManifest have been loaded. diff --git a/src/container.js b/src/container.js index e44f18d8..5d2013f4 100644 --- a/src/container.js +++ b/src/container.js @@ -21,7 +21,7 @@ var _loadingScripts = {}; * @param {Array} array The array to search * @return {int} index of the value in the array, -1 if value not found */ -var _inArray = function(value, array) { +var _inArray = function (value, array) { if (Array.isArray(array)) { return array.indexOf(value); } @@ -43,8 +43,7 @@ var _inArray = function(value, array) { * @return {F2.AppConfig} The new F2.AppConfig object, prepopulated with * necessary properties */ -var _createAppConfig = function(appConfig) { - +var _createAppConfig = function (appConfig) { // make a copy of the app config to ensure that the original is not modified appConfig = cloneDeep(appConfig) || {}; @@ -52,7 +51,7 @@ var _createAppConfig = function(appConfig) { appConfig.instanceId = appConfig.instanceId || utils.guid(); //pass container-defined locale to each app - if (classes.ContainerConfig.locale){ + if (classes.ContainerConfig.locale) { appConfig.containerLocale = classes.ContainerConfig.locale; } @@ -66,7 +65,7 @@ var _createAppConfig = function(appConfig) { * @param {Element} node The DOM node from which to generate the F2.AppConfig object * @return {F2.AppConfig} The new F2.AppConfig object */ -var _getAppConfigFromElement = function(node) { +var _getAppConfigFromElement = function (node) { var appConfig; if (node) { @@ -87,9 +86,11 @@ var _getAppConfigFromElement = function(node) { if (contextJson) { try { appConfig.context = utils.parse(contextJson); - } - catch (e) { - console.warn('F2: "data-f2-context" of node is not valid JSON', '"' + e + '"'); + } catch (e) { + console.warn( + 'F2: "data-f2-context" of node is not valid JSON', + '"' + e + '"' + ); } } } @@ -105,7 +106,7 @@ var _getAppConfigFromElement = function(node) { * @param {Element} node The DOM node * @return {bool} True if there are non-text children */ -var _hasNonTextChildNodes = function(node) { +var _hasNonTextChildNodes = function (node) { var hasNodes = false; if (node.hasChildNodes()) { @@ -126,17 +127,17 @@ var _hasNonTextChildNodes = function(node) { * @private * @param {F2.ContainerConfig} containerConfig The F2.ContainerConfig object */ -var _hydrateContainerConfig = function(containerConfig) { - +var _hydrateContainerConfig = function (containerConfig) { if (!containerConfig.scriptErrorTimeout) { - containerConfig.scriptErrorTimeout = classes.ContainerConfig.scriptErrorTimeout; + containerConfig.scriptErrorTimeout = + classes.ContainerConfig.scriptErrorTimeout; } if (containerConfig.debugMode !== true) { containerConfig.debugMode = classes.ContainerConfig.debugMode; } - if (containerConfig.locale && typeof containerConfig.locale == 'string'){ + if (containerConfig.locale && typeof containerConfig.locale == 'string') { classes.ContainerConfig.locale = containerConfig.locale; } }; @@ -146,22 +147,21 @@ var _hydrateContainerConfig = function(containerConfig) { * @method _initContainerEvents * @private */ -var _initContainerEvents = function() { - +var _initContainerEvents = function () { var resizeTimeout; - var resizeHandler = function() { + var resizeHandler = function () { events.emit(constants.Events.CONTAINER_WIDTH_CHANGE); }; // TODO: remove this on destroy() - window.addEventListener('resize', function() { + window.addEventListener('resize', function () { clearTimeout(resizeTimeout); resizeTimeout = setTimeout(resizeHandler, 100); }); //listen for container-broadcasted locale changes - events.on(constants.Events.CONTAINER_LOCALE_CHANGE,function(data){ - if (data.locale && typeof data.locale == 'string'){ + events.on(constants.Events.CONTAINER_LOCALE_CHANGE, function (data) { + if (data.locale && typeof data.locale == 'string') { classes.ContainerConfig.locale = data.locale; } }); @@ -174,7 +174,7 @@ var _initContainerEvents = function() { * @param {Element} node The DOM element to check * @return {bool} True if the element is a placeholder */ -var _isPlaceholderElement = function(node) { +var _isPlaceholderElement = function (node) { return ( dom.isNativeNode(node) && !_hasNonTextChildNodes(node) && @@ -189,7 +189,7 @@ var _isPlaceholderElement = function(node) { * @private * @return {bool} True if the container has been init */ -var _isInit = function() { +var _isInit = function () { return !!_config; }; @@ -199,27 +199,36 @@ var _isInit = function() { * @private * @param {Array} appConfigs An array of {{#crossLink "F2.AppConfig"}}{{/crossLink}} objects */ -var _createAppInstance = function(appConfig, appContent) { +var _createAppInstance = function (appConfig, appContent) { // instantiate F2.App if (appClasses[appConfig.appId] !== undefined) { if (typeof appClasses[appConfig.appId] === 'function') { - // IE - setTimeout(function() { + setTimeout(function () { // #265 if (!_apps[appConfig.instanceId]) { - utils.log('Unable to create app (' + appConfig.instanceId + ') as it does not exist.'); + utils.log( + 'Unable to create app (' + + appConfig.instanceId + + ') as it does not exist.' + ); return; } - _apps[appConfig.instanceId].app = new appClasses[appConfig.appId](appConfig, appContent, appConfig.root); + _apps[appConfig.instanceId].app = new appClasses[appConfig.appId]( + appConfig, + appContent, + appConfig.root + ); if (_apps[appConfig.instanceId].app['init'] !== undefined) { _apps[appConfig.instanceId].app.init(); } }, 0); - - } - else { - utils.log('app initialization class is defined but not a function. (' + appConfig.appId + ')'); + } else { + utils.log( + 'app initialization class is defined but not a function. (' + + appConfig.appId + + ')' + ); } } }; @@ -232,31 +241,34 @@ var _createAppInstance = function(appConfig, appContent) { * {{#crossLink "F2.AppConfig"}}{{/crossLink}} objects * @param {F2.AppManifest} [appManifest] The AppManifest object */ -var _loadApps = function(appConfigs, appManifest) { +var _loadApps = function (appConfigs, appManifest) { appConfigs = [].concat(appConfigs); // check that the number of apps in manifest matches the number requested if (appConfigs.length != appManifest.apps.length) { - utils.log('The number of apps defined in the AppManifest do not match the number requested.', appManifest); + utils.log( + 'The number of apps defined in the AppManifest do not match the number requested.', + appManifest + ); return; } - var _findExistingScripts = function() { + var _findExistingScripts = function () { var scripts = document.querySelectorAll('script[src]') || []; var src = []; - for (var i = 0; i < scripts.length; i ++) { + for (var i = 0; i < scripts.length; i++) { src.push(scripts[i].src); } return src; }; - var _findExistingStyles = function() { + var _findExistingStyles = function () { var src = []; var styles = document.querySelectorAll('link[href]') || []; - for (var i = 0; i < styles.length; i ++) { + for (var i = 0; i < styles.length; i++) { src.push(styles[i].src); } @@ -264,7 +276,7 @@ var _loadApps = function(appConfigs, appManifest) { }; // Fn for loading manifest Styles - var _loadStyles = function(styles, cb) { + var _loadStyles = function (styles, cb) { // Reduce the list to styles that haven't been loaded var existingStyles = _findExistingStyles(); var filteredStyles = []; @@ -288,10 +300,13 @@ var _loadApps = function(appConfigs, appManifest) { for (var j = 0; j < filteredStyles.length; j++) { if (useCreateStyleSheet) { document.createStyleSheet(filteredStyles[j]); - } - else { + } else { stylesFragment = stylesFragment || []; - stylesFragment.push(''); + stylesFragment.push( + '' + ); } } @@ -305,7 +320,7 @@ var _loadApps = function(appConfigs, appManifest) { // For loading AppManifest.scripts // Parts derived from curljs, headjs, requirejs, dojo - var _loadScripts = function(scripts, cb) { + var _loadScripts = function (scripts, cb) { // Reduce the list to scripts that haven't been loaded var existingScripts = _findExistingScripts(); var loadingScripts = Object.keys(_loadingScripts); @@ -313,7 +328,11 @@ var _loadApps = function(appConfigs, appManifest) { for (var i = 0; i < scripts.length; i++) { var url = scripts[i]; - if (url && (_inArray(url, existingScripts) === -1 || _inArray(url, loadingScripts) !== -1)) { + if ( + url && + (_inArray(url, existingScripts) === -1 || + _inArray(url, loadingScripts) !== -1) + ) { filteredScripts.push(url); } } @@ -335,20 +354,27 @@ var _loadApps = function(appConfigs, appManifest) { var head = doc && (doc['head'] || doc.getElementsByTagName('head')[0]); // to keep IE from crying, we need to put scripts before any // elements, but after any . this should do it: - var insertBeforeEl = head && head.getElementsByTagName('base')[0] || null; + var insertBeforeEl = (head && head.getElementsByTagName('base')[0]) || null; // Check for IE10+ so that we don't rely on onreadystatechange, readyStates for IE6-9 - var readyStates = 'addEventListener' in window ? {} : { 'loaded': true, 'complete': true }; + var readyStates = + 'addEventListener' in window ? {} : { loaded: true, complete: true }; // Log and emit event for the failed (400,500) scripts - var _error = function(e) { - setTimeout(function() { + var _error = function (e) { + setTimeout(function () { var evtData = { src: e.target.src, appId: appConfigs[0].appId }; // Send error to console - utils.log('Script defined in \'' + evtData.appId + '\' failed to load \'' + evtData.src + '\''); + utils.log( + "Script defined in '" + + evtData.appId + + "' failed to load '" + + evtData.src + + "'" + ); appHandlers.__trigger( _sAppHandlerToken, @@ -359,13 +385,13 @@ var _loadApps = function(appConfigs, appManifest) { }, _config.scriptErrorTimeout); // Defaults to 7000 }; - var _checkComplete = function() { + var _checkComplete = function () { if (++scriptsLoaded === scriptCount) { cb(); } }; - var _emptyWaitlist = function(resourceKey, errorEvt) { + var _emptyWaitlist = function (resourceKey, errorEvt) { var waiting, waitlist = _loadingScripts[resourceKey]; @@ -373,8 +399,8 @@ var _loadApps = function(appConfigs, appManifest) { return; } - for (var i=0; iExample App!
    '], - * inlineScripts: [], - * scripts: ['http://www.domain.com/js/AppClass.js'], - * styles: ['http://www.domain.com/css/AppStyles.css'] - * }, - * { - * apps: ['
    Example App!
    '], - * inlineScripts: [], - * scripts: ['http://www.domain.com/js/AppClass.js'], - * styles: ['http://www.domain.com/css/AppStyles.css'] - * }, - * { - * apps: ['
    Example App 2!
    '], - * inlineScripts: [], - * scripts: ['http://www.domain.com/js/App2Class.js'], - * styles: ['http://www.domain.com/css/App2Styles.css'] - * } - * ]; - * - * F2.init(); - * F2.registerApps(arConfigs, arManifests); - */ - registerApps: function(appConfigs, appManifests) { - + * var arConfigs = [ + * { + * appId: 'com_externaldomain_example_app', + * context: {}, + * manifestUrl: 'http://www.externaldomain.com/F2/AppManifest' + * }, + * { + * appId: 'com_externaldomain_example_app', + * context: {}, + * manifestUrl: 'http://www.externaldomain.com/F2/AppManifest' + * }, + * { + * appId: 'com_externaldomain_example_app2', + * context: {}, + * manifestUrl: 'http://www.externaldomain.com/F2/AppManifest' + * } + * ]; + * + * F2.init(); + * F2.registerApps(arConfigs); + * + * @example + * Pre-loaded and tradition apps mixed. + * + * // Pre-loaded apps and traditional f2 app configs + * // you can preload the same app multiple times as long as you have a unique root for each + * var arConfigs = [ + * { + * appId: 'com_mydomain_example_app', + * context: {}, + * root: 'div#example-app-1', + * manifestUrl: '' + * }, + * { + * appId: 'com_mydomain_example_app', + * context: {}, + * root: 'div#example-app-2', + * manifestUrl: '' + * }, + * { + * appId: 'com_externaldomain_example_app', + * context: {}, + * manifestUrl: 'http://www.externaldomain.com/F2/AppManifest' + * } + * ]; + * + * F2.init(); + * F2.registerApps(arConfigs); + * + * @example + * Apps with predefined manifests. + * + * // Traditional f2 app configs + * var arConfigs = [ + * {appId: 'com_externaldomain_example_app', context: {}}, + * {appId: 'com_externaldomain_example_app', context: {}}, + * {appId: 'com_externaldomain_example_app2', context: {}} + * ]; + * + * // Pre requested manifest responses + * var arManifests = [ + * { + * apps: ['
    Example App!
    '], + * inlineScripts: [], + * scripts: ['http://www.domain.com/js/AppClass.js'], + * styles: ['http://www.domain.com/css/AppStyles.css'] + * }, + * { + * apps: ['
    Example App!
    '], + * inlineScripts: [], + * scripts: ['http://www.domain.com/js/AppClass.js'], + * styles: ['http://www.domain.com/css/AppStyles.css'] + * }, + * { + * apps: ['
    Example App 2!
    '], + * inlineScripts: [], + * scripts: ['http://www.domain.com/js/App2Class.js'], + * styles: ['http://www.domain.com/css/App2Styles.css'] + * } + * ]; + * + * F2.init(); + * F2.registerApps(arConfigs, arManifests); + */ + registerApps: function (appConfigs, appManifests) { if (!_isInit()) { utils.log('F2.init() must be called before F2.registerApps()'); return; - } - else if (!appConfigs) { - utils.log('At least one AppConfig must be passed when calling F2.registerApps()'); + } else if (!appConfigs) { + utils.log( + 'At least one AppConfig must be passed when calling F2.registerApps()' + ); return; } @@ -850,22 +894,29 @@ export default { var haveManifests = false; appConfigs = [].concat(appConfigs); appManifests = [].concat(appManifests || []); - haveManifests = !! appManifests.length; + haveManifests = !!appManifests.length; // appConfigs must have a length if (!appConfigs.length) { - utils.log('At least one AppConfig must be passed when calling F2.registerApps()'); + utils.log( + 'At least one AppConfig must be passed when calling F2.registerApps()' + ); return; // ensure that the array of apps and manifests are qual - } - else if (appConfigs.length && haveManifests && appConfigs.length != appManifests.length) { - utils.log('The length of "apps" does not equal the length of "appManifests"'); + } else if ( + appConfigs.length && + haveManifests && + appConfigs.length != appManifests.length + ) { + utils.log( + 'The length of "apps" does not equal the length of "appManifests"' + ); return; } // validate each app and assign it an instanceId // then determine which apps can be batched together - appConfigs.forEach(function(a, i) { + appConfigs.forEach(function (a, i) { // add properties and methods a = _createAppConfig(a); @@ -887,10 +938,12 @@ export default { // If the root property is defined then this app is considered to be preloaded and we will // run it through that logic. if (a.root && !_isPlaceholderElement(a.root)) { - if ((!a.root && typeof(a.root) != 'string') && !dom.isNativeNode(a.root)) { - utils.log('AppConfig invalid for pre-load, not a valid string and not dom node'); + if (!a.root && typeof a.root != 'string' && !dom.isNativeNode(a.root)) { + utils.log( + 'AppConfig invalid for pre-load, not a valid string and not dom node' + ); utils.log('AppConfig instance:', a); - throw ('Preloaded appConfig.root property must be a native dom node or a string representing a sizzle selector. Please check your inputs and try again.'); + throw 'Preloaded appConfig.root property must be a native dom node or a string representing a sizzle selector. Please check your inputs and try again.'; } // instantiate F2.App @@ -899,37 +952,35 @@ export default { status: constants.AppStatus.SUCCESS }); - // Continue on in the .each loop, no need to continue because the app is on the page // the js in initialized, and it is ready to role. return; // equivalent to continue in .each } if (!_isPlaceholderElement(a.root)) { - appHandlers.__trigger( - _sAppHandlerToken, - constants.AppHandlers.APP_CREATE_ROOT, - a // the app config - ); + appHandlers.__trigger( + _sAppHandlerToken, + constants.AppHandlers.APP_CREATE_ROOT, + a // the app config + ); - appHandlers.__trigger( - _sAppHandlerToken, - constants.AppHandlers.APP_RENDER_BEFORE, - a // the app config - ); + appHandlers.__trigger( + _sAppHandlerToken, + constants.AppHandlers.APP_RENDER_BEFORE, + a // the app config + ); } // if we have the manifest, go ahead and load the app if (haveManifests) { _loadApps(a, appManifests[i]); - } - else { + } else { // check if this app can be batched if (a.enableBatchRequests) { - batches[a.manifestUrl.toLowerCase()] = batches[a.manifestUrl.toLowerCase()] || []; + batches[a.manifestUrl.toLowerCase()] = + batches[a.manifestUrl.toLowerCase()] || []; batches[a.manifestUrl.toLowerCase()].push(a); - } - else { + } else { appStack.push({ apps: [a], url: a.manifestUrl @@ -954,7 +1005,7 @@ export default { // another request for the same app. We'll create a callbackStack // that will ensure that requests for the same app are loaded in order // rather than at the same time - appStack.forEach(function(req, i) { + appStack.forEach(function (req) { // define the callback function based on the first app's App ID var jsonpCallback = constants.JSONP_CALLBACK + req.apps[0].appId; @@ -969,7 +1020,7 @@ export default { for (var i in callbackStack) { /*jshint loopfunc: true */ var requests = callbackStack[i]; - var manifestRequest = function(jsonpCallback, req) { + var manifestRequest = function (jsonpCallback, req) { if (!req) { return; } @@ -978,11 +1029,11 @@ export default { var url = req.url, type = 'GET', dataType = 'jsonp', - completeFunc = function() { + completeFunc = function () { manifestRequest(i, requests.pop()); }, - errorFunc = function() { - req.apps.forEach(function(item, idx) { + errorFunc = function () { + req.apps.forEach(function (item) { item.name = item.name || item.appId; utils.log('Removed failed ' + item.name + ' app', item); appHandlers.__trigger( @@ -993,7 +1044,7 @@ export default { self.removeApp(item.instanceId); }); }, - successFunc = function(appManifest) { + successFunc = function (appManifest) { _loadApps(req.apps, appManifest); }; @@ -1001,32 +1052,41 @@ export default { if (_config.xhr && _config.xhr.dataType) { dataType = _config.xhr.dataType(req.url, req.apps); if (typeof dataType !== 'string') { - throw ('ContainerConfig.xhr.dataType should return a string'); + throw 'ContainerConfig.xhr.dataType should return a string'; } } if (_config.xhr && _config.xhr.type) { type = _config.xhr.type(req.url, req.apps); if (typeof type !== 'string') { - throw ('ContainerConfig.xhr.type should return a string'); + throw 'ContainerConfig.xhr.type should return a string'; } } if (_config.xhr && _config.xhr.url) { url = _config.xhr.url(req.url, req.apps); if (typeof url !== 'string') { - throw ('ContainerConfig.xhr.url should return a string'); + throw 'ContainerConfig.xhr.url should return a string'; } } // setup the default request function if an override is not present var requestFunc = _config.xhr; if (typeof requestFunc !== 'function') { - requestFunc = function(url, appConfigs, successCallback, errorCallback, completeCallback) { + requestFunc = function ( + url, + appConfigs, + successCallback, + errorCallback, + completeCallback + ) { if (!window.fetch) { - throw ('Browser does not support the Fetch API.'); + throw 'Browser does not support the Fetch API.'; } var fetchFunc, - fetchUrl = url + '?params=' + utils.stringify(req.apps, utils.appConfigReplacer); + fetchUrl = + url + + '?params=' + + utils.stringify(req.apps, utils.appConfigReplacer); // Fetch API does not support the JSONP calls so making JSON calls using Fetch API and // JSONP call using fetch-jsonp package (https://www.npmjs.com/package/fetch-jsonp) @@ -1051,17 +1111,18 @@ export default { }); } - fetchFunc.then(function(response) { - return response.json(); - }) - .then(function(data) { - successCallback(data); - completeCallback(); - }) - .catch(function(error) { - utils.log('Failed to load app(s)', error, req.apps); - errorCallback(); - }); + fetchFunc + .then(function (response) { + return response.json(); + }) + .then(function (data) { + successCallback(data); + completeCallback(); + }) + .catch(function (error) { + utils.log('Failed to load app(s)', error, req.apps); + errorCallback(); + }); }; } @@ -1070,15 +1131,13 @@ export default { manifestRequest(i, requests.pop()); } - } }, /** * Removes all apps from the container * @method removeAllApps */ - removeAllApps: function() { - + removeAllApps: function () { var self = this; if (!_isInit()) { @@ -1086,9 +1145,9 @@ export default { return; } - if(Object.keys(_apps).length > 0) { -  Object.keys(_apps).forEach(function(key) { -   self.removeApp(_apps[key].config.instanceId); + if (Object.keys(_apps).length > 0) { + Object.keys(_apps).forEach(function (key) { + self.removeApp(_apps[key].config.instanceId); }); } }, @@ -1097,8 +1156,7 @@ export default { * @method removeApp * @param {string} instanceId The app's instanceId */ - removeApp: function(instanceId) { - + removeApp: function (instanceId) { if (!_isInit()) { utils.log('F2.init() must be called before F2.removeApp()'); return; diff --git a/src/events.js b/src/events.js index 80ad25f8..084b205d 100644 --- a/src/events.js +++ b/src/events.js @@ -5,10 +5,10 @@ import EventEmitter2 from 'eventemitter2'; * containers to apps and apps to apps. * @class F2.Events */ -export default (function() { +export default (function () { // init EventEmitter var _events = new EventEmitter2({ - wildcard:true + wildcard: true }); // unlimited listeners, set to > 0 for debugging @@ -22,8 +22,11 @@ export default (function() { * @param {string} event The event name * @param {object} [arg]* The arguments to be passed */ - emit: function() { - return EventEmitter2.prototype.emit.apply(_events, [].slice.call(arguments)); + emit: function () { + return EventEmitter2.prototype.emit.apply( + _events, + [].slice.call(arguments) + ); }, /** * Adds a listener that will execute n times for the event before being @@ -36,7 +39,7 @@ export default (function() { * @param {function} listener The function to be fired when the event is * emitted */ - many: function(event, timesToListen, listener) { + many: function (event, timesToListen, listener) { return _events.many(event, timesToListen, listener); }, /** @@ -45,7 +48,7 @@ export default (function() { * @param {string} event The event name * @param {function} listener The function that will be removed */ - off: function(event, listener) { + off: function (event, listener) { return _events.off(event, listener); }, /** @@ -55,7 +58,7 @@ export default (function() { * @param {function} listener The function to be fired when the event is * emitted */ - on: function(event, listener){ + on: function (event, listener) { return _events.on(event, listener); }, /** @@ -66,7 +69,7 @@ export default (function() { * @param {function} listener The function to be fired when the event is * emitted */ - once: function(event, listener) { + once: function (event, listener) { return _events.once(event, listener); } }; diff --git a/src/index.js b/src/index.js index 59d778db..6eed3f0e 100644 --- a/src/index.js +++ b/src/index.js @@ -27,4 +27,4 @@ const lib = { // always export F2 as a global window.F2 = lib; -export default lib; \ No newline at end of file +export default lib; diff --git a/src/utils/dom.js b/src/utils/dom.js index 7693e041..a08f092b 100644 --- a/src/utils/dom.js +++ b/src/utils/dom.js @@ -5,19 +5,25 @@ * @return {bool} Returns true if the object passed is a native dom node. */ function isNativeNode(testObject) { - var bIsNode = ( - typeof Node === 'object' ? testObject instanceof Node : - testObject && typeof testObject === 'object' && typeof testObject.nodeType === 'number' && typeof testObject.nodeName === 'string' - ); + var bIsNode = + typeof Node === 'object' + ? testObject instanceof Node + : testObject && + typeof testObject === 'object' && + typeof testObject.nodeType === 'number' && + typeof testObject.nodeName === 'string'; - var bIsElement = ( - typeof HTMLElement === 'object' ? testObject instanceof HTMLElement : //DOM2 - testObject && typeof testObject === 'object' && testObject.nodeType === 1 && typeof testObject.nodeName === 'string' - ); + var bIsElement = + typeof HTMLElement === 'object' + ? testObject instanceof HTMLElement //DOM2 + : testObject && + typeof testObject === 'object' && + testObject.nodeType === 1 && + typeof testObject.nodeName === 'string'; - return (bIsNode || bIsElement); + return bIsNode || bIsElement; } export default { isNativeNode -}; \ No newline at end of file +}; diff --git a/src/utils/index.js b/src/utils/index.js index c0f67fd8..a903275b 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -6,7 +6,7 @@ export default { * reference errors when serializing objects * @method appConfigReplacer */ - appConfigReplacer: function(key, value) { + appConfigReplacer: function (key, value) { if (key == 'root' || key == 'ui' || key == 'height') { return undefined; } else { @@ -59,11 +59,24 @@ export default { * @return {string} A random id * @for F2 */ - guid: function() { - var S4 = function() { - return (((1+Math.random())*0x10000)|0).toString(16).substring(1); + guid: function () { + var S4 = function () { + return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); }; - return (S4()+S4()+'-'+S4()+'-'+S4()+'-'+S4()+'-'+S4()+S4()+S4()); + return ( + S4() + + S4() + + '-' + + S4() + + '-' + + S4() + + '-' + + S4() + + '-' + + S4() + + S4() + + S4() + ); }, /** * Tests a URL to see if it's on the same domain (local) or not @@ -86,16 +99,34 @@ export default { F2.log('info', 'The session ID is ' + sessionId); * Some code derived from [HTML5 Boilerplate console plugin](https://github.com/h5bp/html5-boilerplate/blob/master/js/plugins.js) */ - log: function() { + log: function () { var _log; var _logMethod = 'log'; var method; - var noop = function () { }; + var noop = function () {}; var methods = [ - 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', - 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', - 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', - 'timeStamp', 'trace', 'warn' + 'assert', + 'clear', + 'count', + 'debug', + 'dir', + 'dirxml', + 'error', + 'exception', + 'group', + 'groupCollapsed', + 'groupEnd', + 'info', + 'log', + 'markTimeline', + 'profile', + 'profileEnd', + 'table', + 'time', + 'timeEnd', + 'timeStamp', + 'trace', + 'warn' ]; var length = methods.length; var console = (window.console = window.console || {}); @@ -111,7 +142,7 @@ export default { //if first arg is a console function, use it. //defaults to console.log() - if (arguments && arguments.length > 1 && arguments[0] == method){ + if (arguments && arguments.length > 1 && arguments[0] == method) { _logMethod = method; //remove console func from args args = Array.prototype.slice.call(arguments, 1); @@ -121,12 +152,16 @@ export default { if (Function.prototype.bind) { _log = Function.prototype.bind.call(console[_logMethod], console); } else { - _log = function() { - Function.prototype.apply.call(console[_logMethod], console, (args || arguments)); + _log = function () { + Function.prototype.apply.call( + console[_logMethod], + console, + args || arguments + ); }; } - _log.apply(this, (args || arguments)); + _log.apply(this, args || arguments); }, /** * Wrapper to convert a JSON string to an object @@ -134,7 +169,7 @@ export default { * @param {string} str The JSON string to convert * @return {object} The parsed object */ - parse: function(str) { + parse: function (str) { return JSON.parse(str); }, /** @@ -155,7 +190,7 @@ export default { * or ' '), it contains the characters used to indent at each level. * @return {string} The JSON string */ - stringify: function(value, replacer, space) { + stringify: function (value, replacer, space) { return JSON.stringify(value, replacer, space); }, /** @@ -163,8 +198,8 @@ export default { * @method version * @return {string} F2 version number */ - version: function() { - /* jshint undef: false */ + version: function () { + /* eslint no-undef: 0 */ return VERSION; } }; diff --git a/src/utils/uri.js b/src/utils/uri.js index 15f0a743..1ce5a9c0 100644 --- a/src/utils/uri.js +++ b/src/utils/uri.js @@ -5,16 +5,16 @@ * @return {bool} Whether the URL is local or not * Derived from: https://github.com/jquery/jquery/blob/master/src/ajax.js */ -function isLocal(url){ - var rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, +function isLocal(url) { + var rurl = /^([\w.+-]+:)(?:\/\/([^/?#:]*)(?::(\d+)|)|)/, urlLower = url.toLowerCase(), - parts = rurl.exec( urlLower ), + parts = rurl.exec(urlLower), ajaxLocation, ajaxLocParts; try { ajaxLocation = location.href; - } catch( e ) { + } catch (e) { // Use the href attribute of an A element // since IE will modify it given document.location ajaxLocation = document.createElement('a'); @@ -26,19 +26,22 @@ function isLocal(url){ // uh oh, the url must be relative // make it fully qualified and re-regex url - if (!parts){ - urlLower = toAbsolute(ajaxLocation,urlLower).toLowerCase(); - parts = rurl.exec( urlLower ); + if (!parts) { + urlLower = toAbsolute(ajaxLocation, urlLower).toLowerCase(); + parts = rurl.exec(urlLower); } // Segment location into parts - ajaxLocParts = rurl.exec( ajaxLocation ) || []; + ajaxLocParts = rurl.exec(ajaxLocation) || []; // do hostname and protocol and port of manifest URL match location.href? (a "local" request on the same domain) - var matched = !(parts && - (parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || - (parts[ 3 ] || (parts[ 1 ] === 'http:' ? '80' : '443')) !== - (ajaxLocParts[ 3 ] || (ajaxLocParts[ 1 ] === 'http:' ? '80' : '443')))); + var matched = !( + parts && + (parts[1] !== ajaxLocParts[1] || + parts[2] !== ajaxLocParts[2] || + (parts[3] || (parts[1] === 'http:' ? '80' : '443')) !== + (ajaxLocParts[3] || (ajaxLocParts[1] === 'http:' ? '80' : '443'))) + ); return matched; } @@ -52,19 +55,25 @@ function isLocal(url){ * Tests: http://skew.org/uri/uri_tests.html */ function parse(url) { - var m = String(url).replace(/^\s+|\s+$/g, '').match(/^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/); + var m = String(url) + .replace(/^\s+|\s+$/g, '') + .match( + /^([^:/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/ + ); // authority = '//' + user + ':' + pass '@' + hostname + ':' port - return (m ? { - href : m[0] || '', - protocol : m[1] || '', - authority: m[2] || '', - host : m[3] || '', - hostname : m[4] || '', - port : m[5] || '', - pathname : m[6] || '', - search : m[7] || '', - hash : m[8] || '' - } : null); + return m + ? { + href: m[0] || '', + protocol: m[1] || '', + authority: m[2] || '', + host: m[3] || '', + hostname: m[4] || '', + port: m[5] || '', + pathname: m[6] || '', + search: m[7] || '', + hash: m[8] || '' + } + : null; } /** @@ -76,14 +85,16 @@ function parse(url) { * Source: https://gist.github.com/Yaffle/1088850 * Tests: http://skew.org/uri/uri_tests.html */ -function toAbsolute(base, href) {// RFC 3986 +function toAbsolute(base, href) { + // RFC 3986 function removeDotSegments(input) { var output = []; - input.replace(/^(\.\.?(\/|$))+/, '') + input + .replace(/^(\.\.?(\/|$))+/, '') .replace(/\/(\.(\/|$))+/g, '/') .replace(/\/\.\.$/, '/../') - .replace(/\/?[^\/]*/g, function (p) { + .replace(/\/?[^/]*/g, function (p) { if (p === '/..') { output.pop(); } else { @@ -96,15 +107,27 @@ function toAbsolute(base, href) {// RFC 3986 href = parse(href || ''); base = parse(base || ''); - return !href || !base ? null : (href.protocol || base.protocol) + - (href.protocol || href.authority ? href.authority : base.authority) + - removeDotSegments(href.protocol || href.authority || href.pathname.charAt(0) === '/' ? href.pathname : (href.pathname ? ((base.authority && !base.pathname ? '/' : '') + base.pathname.slice(0, base.pathname.lastIndexOf('/') + 1) + href.pathname) : base.pathname)) + - (href.protocol || href.authority || href.pathname ? href.search : (href.search || base.search)) + - href.hash; + return !href || !base + ? null + : (href.protocol || base.protocol) + + (href.protocol || href.authority ? href.authority : base.authority) + + removeDotSegments( + href.protocol || href.authority || href.pathname.charAt(0) === '/' + ? href.pathname + : href.pathname + ? (base.authority && !base.pathname ? '/' : '') + + base.pathname.slice(0, base.pathname.lastIndexOf('/') + 1) + + href.pathname + : base.pathname + ) + + (href.protocol || href.authority || href.pathname + ? href.search + : href.search || base.search) + + href.hash; } export default { isLocal, parse, toAbsolute -}; \ No newline at end of file +}; diff --git a/tests/README.md b/tests/README.md index 0b96ef8b..c9f0e46b 100644 --- a/tests/README.md +++ b/tests/README.md @@ -2,4 +2,4 @@ F2 tests are built with the behavior-driven framework [Jasmine](https://jasmine.github.io/). The test can be run via `npm test` or can be run in a browser by running `npm run test-live`. [Karma](https://karma-runner.github.io/) is used to assist with executing the tests in a browser (real or headless). -There is also a server component for the tests written in [Node.js](http://nodejs.org/) which can be found in `tests/server.js`. This server is used to provide F2 apps to the tests and allow for testing cross origin requests via JSONP. This server is automatically launched when `npm test` or `npm run test-live` is run. \ No newline at end of file +There is also a server component for the tests written in [Node.js](http://nodejs.org/) which can be found in `tests/server.js`. This server is used to provide F2 apps to the tests and allow for testing cross origin requests via JSONP. This server is automatically launched when `npm test` or `npm run test-live` is run. diff --git a/tests/apps/com_openf2_examples_nodejs_helloworld/app.css b/tests/apps/com_openf2_examples_nodejs_helloworld/app.css index 7f85d0cf..6fd785ad 100644 --- a/tests/apps/com_openf2_examples_nodejs_helloworld/app.css +++ b/tests/apps/com_openf2_examples_nodejs_helloworld/app.css @@ -1,3 +1,3 @@ .com_openf2_examples_nodejs_helloworld .f2-app-view { /* no styles needed */ -} \ No newline at end of file +} diff --git a/tests/apps/com_openf2_examples_nodejs_helloworld/appclass.js b/tests/apps/com_openf2_examples_nodejs_helloworld/appclass.js index 948aaa6b..42eb769f 100644 --- a/tests/apps/com_openf2_examples_nodejs_helloworld/appclass.js +++ b/tests/apps/com_openf2_examples_nodejs_helloworld/appclass.js @@ -1,25 +1,25 @@ -F2.Apps['com_openf2_examples_nodejs_helloworld'] = (function() { - var App = function(appConfig, appContent, root) { - this.appConfig = appConfig; - this.appContent = appContent; - this.root = root; - this.$root = root; - this.ui = this.appConfig.ui; - this.settings = { - allowExternalAdd: false - }; - }; - App.prototype.init = function() { - F2.log("Hello World app init()"); - F2.Events.emit('com_openf2_examples_nodejs_helloworld-init', { - testLocaleFromAppConfig: this.appConfig.containerLocale, - testLocaleSupportFromAppConfig: this.appConfig.localeSupport, - HightChartsIsDefined: window.Highcharts - }); - }; - App.prototype.destroy = function() { - // initially set to false by the spec/test - F2.destroyAppMethodCalled = true; - }; - return App; -})(); \ No newline at end of file +F2.Apps['com_openf2_examples_nodejs_helloworld'] = (function () { + var App = function (appConfig, appContent, root) { + this.appConfig = appConfig; + this.appContent = appContent; + this.root = root; + this.$root = root; + this.ui = this.appConfig.ui; + this.settings = { + allowExternalAdd: false + }; + }; + App.prototype.init = function () { + F2.log('Hello World app init()'); + F2.Events.emit('com_openf2_examples_nodejs_helloworld-init', { + testLocaleFromAppConfig: this.appConfig.containerLocale, + testLocaleSupportFromAppConfig: this.appConfig.localeSupport, + HightChartsIsDefined: window.Highcharts + }); + }; + App.prototype.destroy = function () { + // initially set to false by the spec/test + F2.destroyAppMethodCalled = true; + }; + return App; +})(); diff --git a/tests/apps/com_openf2_examples_nodejs_helloworld/highcharts-4.0.3.js b/tests/apps/com_openf2_examples_nodejs_helloworld/highcharts-4.0.3.js index 2a618964..2bf37935 100644 --- a/tests/apps/com_openf2_examples_nodejs_helloworld/highcharts-4.0.3.js +++ b/tests/apps/com_openf2_examples_nodejs_helloworld/highcharts-4.0.3.js @@ -5,303 +5,9005 @@ License: www.highcharts.com/license */ -(function(){function r(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function w(){var a,b=arguments,c,d={},e=function(a,b){var c,d;typeof a!=="object"&&(a={});for(d in b)b.hasOwnProperty(d)&&(c=b[d],a[d]=c&&typeof c==="object"&&Object.prototype.toString.call(c)!=="[object Array]"&&d!=="renderTo"&&typeof c.nodeType!=="number"?e(a[d]||{},c):b[d]);return a};b[0]===!0&&(d=b[1],b=Array.prototype.slice.call(b,2));c=b.length;for(a=0;a3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+Q(a-c).toFixed(f).slice(2):"")}function Ha(a,b){return Array((b||2)+1-String(a).length).join(0)+a}function Ma(a,b,c){var d=a[b];a[b]=function(){var a=Array.prototype.slice.call(arguments);a.unshift(d); - return c.apply(this,a)}}function Ia(a,b){for(var c="{",d=!1,e,f,g,h,i,j=[];(c=a.indexOf(c))!==-1;){e=a.slice(0,c);if(d){f=e.split(":");g=f.shift().split(".");i=g.length;e=b;for(h=0;h-1?h.thousandsSep:""))):e=bb(f,e)}j.push(e);a=a.slice(c+1);c=(d=!d)?"}":"{"}j.push(a);return j.join("")}function lb(a){return V.pow(10,U(V.log(a)/V.LN10))} - function mb(a,b,c,d){var e,c=p(c,1);e=a/c;b||(b=[1,2,2.5,5,10],d&&d.allowDecimals===!1&&(c===1?b=[1,2,5,10]:c<=0.1&&(b=[1/c])));for(d=0;dc&&(c=a[b]); - return c}function Oa(a,b){for(var c in a)a[c]&&a[c]!==b&&a[c].destroy&&a[c].destroy(),delete a[c]}function Pa(a){cb||(cb=$(Ja));a&&cb.appendChild(a);cb.innerHTML=""}function ea(a){return parseFloat(a.toPrecision(14))}function Qa(a,b){va=p(a,b.animation)}function Ab(){var a=L.global.useUTC,b=a?"getUTC":"get",c=a?"setUTC":"set";Ra=(a&&L.global.timezoneOffset||0)*6E4;db=a?Date.UTC:function(a,b,c,g,h,i){return(new Date(a,b,p(c,1),p(g,0),p(h,0),p(i,0))).getTime()};ob=b+"Minutes";pb=b+"Hours";qb=b+"Day"; - Wa=b+"Date";eb=b+"Month";fb=b+"FullYear";Bb=c+"Minutes";Cb=c+"Hours";rb=c+"Date";Db=c+"Month";Eb=c+"FullYear"}function G(){}function Sa(a,b,c,d){this.axis=a;this.pos=b;this.type=c||"";this.isNew=!0;!c&&!d&&this.addLabel()}function ma(){this.init.apply(this,arguments)}function Xa(){this.init.apply(this,arguments)}function Fb(a,b,c,d,e){var f=a.chart.inverted;this.axis=a;this.isNegative=c;this.options=b;this.x=d;this.total=null;this.points={};this.stack=e;this.alignOptions={align:b.align||(f?c?"left": - "right":"center"),verticalAlign:b.verticalAlign||(f?"middle":c?"bottom":"top"),y:p(b.y,f?4:c?14:-6),x:p(b.x,f?c?-6:6:0)};this.textAlign=b.textAlign||(f?c?"right":"left":"center")}var t,x=document,H=window,V=Math,v=V.round,U=V.floor,Ka=V.ceil,u=V.max,C=V.min,Q=V.abs,aa=V.cos,fa=V.sin,na=V.PI,Ca=na*2/360,wa=navigator.userAgent,Gb=H.opera,Aa=/msie/i.test(wa)&&!Gb,gb=x.documentMode===8,sb=/AppleWebKit/.test(wa),Ta=/Firefox/.test(wa),Hb=/(Mobile|Android|Windows Phone)/.test(wa),xa="http://www.w3.org/2000/svg", - ba=!!x.createElementNS&&!!x.createElementNS(xa,"svg").createSVGRect,Nb=Ta&&parseInt(wa.split("Firefox/")[1],10)<4,ga=!ba&&!Aa&&!!x.createElement("canvas").getContext,Ya,Za,Ib={},tb=0,cb,L,bb,va,ub,B,oa,sa=function(){return t},W=[],$a=0,Ja="div",P="none",Ob=/^[0-9]+$/,Pb="stroke-width",db,Ra,ob,pb,qb,Wa,eb,fb,Bb,Cb,rb,Db,Eb,J={},S;H.Highcharts?oa(16,!0):S=H.Highcharts={};bb=function(a,b,c){if(!s(b)||isNaN(b))return"Invalid date";var a=p(a,"%Y-%m-%d %H:%M:%S"),d=new Date(b-Ra),e,f=d[pb](),g=d[qb](), - h=d[Wa](),i=d[eb](),j=d[fb](),k=L.lang,l=k.weekdays,d=r({a:l[g].substr(0,3),A:l[g],d:Ha(h),e:h,b:k.shortMonths[i],B:k.months[i],m:Ha(i+1),y:j.toString().substr(2,2),Y:j,H:Ha(f),I:Ha(f%12||12),l:f%12||12,M:Ha(d[ob]()),p:f<12?"AM":"PM",P:f<12?"am":"pm",S:Ha(d.getSeconds()),L:Ha(v(b%1E3),3)},S.dateFormats);for(e in d)for(;a.indexOf("%"+e)!==-1;)a=a.replace("%"+e,typeof d[e]==="function"?d[e](b):d[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};oa=function(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+ - a;if(b)throw c;H.console&&console.log(c)};B={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:26784E5,year:31556952E3};ub={init:function(a,b,c){var b=b||"",d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g,b=b.split(" "),c=[].concat(c),h,i,j=function(a){for(g=a.length;g--;)a[g]==="M"&&a.splice(g+1,0,a[g+1],a[g+2],a[g+1],a[g+2])};e&&(j(b),j(c));a.isArea&&(h=b.splice(b.length-6,6),i=c.splice(c.length-6,6));if(d<=c.length/f&&b.length===c.length)for(;d--;)c=[].concat(c).splice(0,f).concat(c); - a.shift=0;if(b.length)for(a=c.length;b.length{point.key}
    ',pointFormat:' {series.name}: {point.y}
    ',shadow:!0,snap:Hb?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer", - color:"#909090",fontSize:"9px"}}};var ca=L.plotOptions,T=ca.line;Ab();var Tb=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,Ub=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,Vb=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,ya=function(a){var b=[],c,d;(function(a){a&&a.stops?d=Ua(a.stops,function(a){return ya(a[1])}):(c=Tb.exec(a))?b=[z(c[1]),z(c[2]),z(c[3]),parseFloat(c[4],10)]:(c=Ub.exec(a))?b=[z(c[1],16),z(c[2],16),z(c[3], - 16),1]:(c=Vb.exec(a))&&(b=[z(c[1]),z(c[2]),z(c[3]),1])})(a);return{get:function(c){var f;d?(f=w(a),f.stops=[].concat(f.stops),q(d,function(a,b){f.stops[b]=[f.stops[b][0],a.get(c)]})):f=b&&!isNaN(b[0])?c==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":c==="a"?b[3]:"rgba("+b.join(",")+")":a;return f},brighten:function(a){if(d)q(d,function(b){b.brighten(a)});else if(ia(a)&&a!==0){var c;for(c=0;c<3;c++)b[c]+=z(a*255),b[c]<0&&(b[c]=0),b[c]>255&&(b[c]=255)}return this},rgba:b,setOpacity:function(a){b[3]=a;return this}}}; - G.prototype={opacity:1,textProps:"fontSize,fontWeight,fontFamily,color,lineHeight,width,textDecoration,textShadow,HcTextStroke".split(","),init:function(a,b){this.element=b==="span"?$(b):x.createElementNS(xa,b);this.renderer=a},animate:function(a,b,c){b=p(b,va,!0);ab(this);if(b){b=w(b,{});if(c)b.complete=c;ib(this,a,b)}else this.attr(a),c&&c();return this},colorGradient:function(a,b,c){var d=this.renderer,e,f,g,h,i,j,k,l,m,n,o=[];a.linearGradient?f="linearGradient":a.radialGradient&&(f="radialGradient"); - if(f){g=a[f];h=d.gradients;j=a.stops;m=c.radialReference;La(g)&&(a[f]=g={x1:g[0],y1:g[1],x2:g[2],y2:g[3],gradientUnits:"userSpaceOnUse"});f==="radialGradient"&&m&&!s(g.gradientUnits)&&(g=w(g,{cx:m[0]-m[2]/2+g.cx*m[2],cy:m[1]-m[2]/2+g.cy*m[2],r:g.r*m[2],gradientUnits:"userSpaceOnUse"}));for(n in g)n!=="id"&&o.push(n,g[n]);for(n in j)o.push(j[n]);o=o.join(",");h[o]?a=h[o].attr("id"):(g.id=a="highcharts-"+tb++,h[o]=i=d.createElement(f).attr(g).add(d.defs),i.stops=[],q(j,function(a){a[1].indexOf("rgba")=== - 0?(e=ya(a[1]),k=e.get("rgb"),l=e.get("a")):(k=a[1],l=1);a=d.createElement("stop").attr({offset:a[0],"stop-color":k,"stop-opacity":l}).add(i);i.stops.push(a)}));c.setAttribute(b,"url("+d.url+"#"+a+")")}},attr:function(a,b){var c,d,e=this.element,f,g=this,h;typeof a==="string"&&b!==t&&(c=a,a={},a[c]=b);if(typeof a==="string")g=(this[a+"Getter"]||this._defaultGetter).call(this,a,e);else{for(c in a){d=a[c];h=!1;this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(c)&&(f||(this.symbolAttr(a), - f=!0),h=!0);if(this.rotation&&(c==="x"||c==="y"))this.doTransform=!0;h||(this[c+"Setter"]||this._defaultSetter).call(this,d,c,e);this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(c)&&this.updateShadows(c,d)}if(this.doTransform)this.updateTransform(),this.doTransform=!1}return g},updateShadows:function(a,b){for(var c=this.shadows,d=c.length;d--;)c[d].setAttribute(a,a==="height"?u(b-(c[d].cutHeight||0),0):a==="d"?this.d:b)},addClass:function(a){var b=this.element,c=F(b,"class")|| - "";c.indexOf(a)===-1&&F(b,"class",c+" "+a);return this},symbolAttr:function(a){var b=this;q("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(c){b[c]=p(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":P)},crisp:function(a){var b,c={},d,e=a.strokeWidth||this.strokeWidth||0;d=v(e)%2/2;a.x=U(a.x||this.x||0)+d;a.y=U(a.y||this.y||0)+d;a.width=U((a.width||this.width|| - 0)-2*d);a.height=U((a.height||this.height||0)-2*d);a.strokeWidth=e;for(b in a)this[b]!==a[b]&&(this[b]=c[b]=a[b]);return c},css:function(a){var b=this.styles,c={},d=this.element,e,f,g="";e=!b;if(a&&a.color)a.fill=a.color;if(b)for(f in a)a[f]!==b[f]&&(c[f]=a[f],e=!0);if(e){e=this.textWidth=a&&a.width&&d.nodeName.toLowerCase()==="text"&&z(a.width);b&&(a=r(b,c));this.styles=a;e&&(ga||!ba&&this.renderer.forExport)&&delete a.width;if(Aa&&!ba)A(this.element,a);else{b=function(a,b){return"-"+b.toLowerCase()}; - for(f in a)g+=f.replace(/([A-Z])/g,b)+":"+a[f]+";";F(d,"style",g)}e&&this.added&&this.renderer.buildText(this)}return this},on:function(a,b){var c=this,d=c.element;Za&&a==="click"?(d.ontouchstart=function(a){c.touchEventFired=Date.now();a.preventDefault();b.call(d,a)},d.onclick=function(a){(wa.indexOf("Android")===-1||Date.now()-(c.touchEventFired||0)>1100)&&b.call(d,a)}):d["on"+a]=b;return this},setRadialReference:function(a){this.element.radialReference=a;return this},translate:function(a,b){return this.attr({translateX:a, - translateY:b})},invert:function(){this.inverted=!0;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.scaleX,d=this.scaleY,e=this.inverted,f=this.rotation,g=this.element;e&&(a+=this.attr("width"),b+=this.attr("height"));a=["translate("+a+","+b+")"];e?a.push("rotate(90) scale(-1,1)"):f&&a.push("rotate("+f+" "+(g.getAttribute("x")||0)+" "+(g.getAttribute("y")||0)+")");(s(c)||s(d))&&a.push("scale("+p(c,1)+" "+p(d,1)+")");a.length&&g.setAttribute("transform", - a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){var d,e,f,g,h={};e=this.renderer;f=e.alignedObjects;if(a){if(this.alignOptions=a,this.alignByTranslate=b,!c||Fa(c))this.alignTo=d=c||"renderer",ka(f,this),f.push(this),c=null}else a=this.alignOptions,b=this.alignByTranslate,d=this.alignTo;c=p(c,e[d],e);d=a.align;e=a.verticalAlign;f=(c.x||0)+(a.x||0);g=(c.y||0)+(a.y||0);if(d==="right"||d==="center")f+=(c.width-(a.width||0))/{right:1,center:2}[d]; - h[b?"translateX":"x"]=v(f);if(e==="bottom"||e==="middle")g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=v(g);this[this.placed?"animate":"attr"](h);this.placed=!0;this.alignAttr=h;return this},getBBox:function(){var a=this.bBox,b=this.renderer,c,d,e=this.rotation;c=this.element;var f=this.styles,g=e*Ca;d=this.textStr;var h;if(d===""||Ob.test(d))h="num."+d.toString().length+(f?"|"+f.fontSize+"|"+f.fontFamily:"");h&&(a=b.cache[h]);if(!a){if(c.namespaceURI===xa||b.forExport){try{a= - c.getBBox?r({},c.getBBox()):{width:c.offsetWidth,height:c.offsetHeight}}catch(i){}if(!a||a.width<0)a={width:0,height:0}}else a=this.htmlGetBBox();if(b.isSVG){c=a.width;d=a.height;if(Aa&&f&&f.fontSize==="11px"&&d.toPrecision(3)==="16.9")a.height=d=14;if(e)a.width=Q(d*fa(g))+Q(c*aa(g)),a.height=Q(d*aa(g))+Q(c*fa(g))}this.bBox=a;h&&(b.cache[h]=a)}return a},show:function(a){return a&&this.element.namespaceURI===xa?(this.element.removeAttribute("visibility"),this):this.attr({visibility:a?"inherit":"visible"})}, - hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var b=this;b.animate({opacity:0},{duration:a||150,complete:function(){b.hide()}})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=this.element,f=this.zIndex,g,h;if(a)this.parentGroup=a;this.parentInverted=a&&a.inverted;this.textStr!==void 0&&b.buildText(this);if(f)c.handleZ=!0,f=z(f);if(c.handleZ){a=d.childNodes;for(g=0;gf||!s(f)&&s(c))){d.insertBefore(e, - b);h=!0;break}}h||d.appendChild(e);this.added=!0;if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},c=a.shadows,d=a.renderer.isSVG&&b.nodeName==="SPAN"&&a.parentGroup,e,f;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point=null;ab(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(f=0;f/,i=/<.*href="(http[^"]+)".*>/,l&&!a.added&&this.box.appendChild(b),e=f?e.replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,'').replace(//g,"").split(//g):[e],e[e.length-1]===""&&e.pop(),q(e,function(e,f){var g,m=0,e=e.replace(//g,"|||");g=e.split("|||");q(g,function(e){if(e!== - ""||g.length===1){var n={},o=x.createElementNS(xa,"tspan"),p;h.test(e)&&(p=e.match(h)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),F(o,"style",p));i.test(e)&&!d&&(F(o,"onclick",'location.href="'+e.match(i)[1]+'"'),A(o,{cursor:"pointer"}));e=(e.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">");if(e!==" "){o.appendChild(x.createTextNode(e));if(m)n.dx=0;else if(f&&j!==null)n.x=j;F(o,n);b.appendChild(o);!m&&f&&(!ba&&d&&A(o,{display:"block"}),F(o,"dy",Y(o)));if(l)for(var e=e.replace(/([^\^])-/g, - "$1- ").split(" "),n=g.length>1||e.length>1&&k.whiteSpace!=="nowrap",q,E,s=k.HcHeight,u=[],t=Y(o),Kb=1;n&&(e.length||u.length);)delete a.bBox,q=a.getBBox(),E=q.width,!ba&&c.forExport&&(E=c.measureSpanWidth(o.firstChild.data,a.styles)),q=E>l,!q||e.length===1?(e=u,u=[],e.length&&(Kb++,s&&Kb*t>s?(e=["..."],a.attr("title",a.textStr)):(o=x.createElementNS(xa,"tspan"),F(o,{dy:t,x:j}),p&&F(o,"style",p),b.appendChild(o))),E>l&&(l=E)):(o.removeChild(o.firstChild),u.unshift(e.pop())),e.length&&o.appendChild(x.createTextNode(e.join(" ").replace(/- /g, - "-")));m++}}})}))},button:function(a,b,c,d,e,f,g,h,i){var j=this.label(a,b,c,i,null,null,null,null,"button"),k=0,l,m,n,o,p,q,a={x1:0,y1:0,x2:0,y2:1},e=w({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:a,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},e);n=e.style;delete e.style;f=w(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#FFF"],[1,"#ACF"]]}},f);o=f.style;delete f.style;g=w(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#9BD"],[1,"#CDF"]]}},g);p=g.style; - delete g.style;h=w(e,{style:{color:"#CCC"}},h);q=h.style;delete h.style;N(j.element,Aa?"mouseover":"mouseenter",function(){k!==3&&j.attr(f).css(o)});N(j.element,Aa?"mouseout":"mouseleave",function(){k!==3&&(l=[e,f,g][k],m=[n,o,p][k],j.attr(l).css(m))});j.setState=function(a){(j.state=k=a)?a===2?j.attr(g).css(p):a===3&&j.attr(h).css(q):j.attr(e).css(n)};return j.on("click",function(){k!==3&&d.call(j)}).attr(e).css(r({cursor:"default"},n))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=v(a[1])-b% - 2/2);a[2]===a[5]&&(a[2]=a[5]=v(a[2])+b%2/2);return a},path:function(a){var b={fill:P};La(a)?b.d=a:da(a)&&r(b,a);return this.createElement("path").attr(b)},circle:function(a,b,c){a=da(a)?a:{x:a,y:b,r:c};b=this.createElement("circle");b.xSetter=function(a){this.element.setAttribute("cx",a)};b.ySetter=function(a){this.element.setAttribute("cy",a)};return b.attr(a)},arc:function(a,b,c,d,e,f){if(da(a))b=a.y,c=a.r,d=a.innerR,e=a.start,f=a.end,a=a.x;a=this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:e|| - 0,end:f||0});a.r=c;return a},rect:function(a,b,c,d,e,f){var e=da(a)?a.r:e,g=this.createElement("rect"),a=da(a)?a:a===t?{}:{x:a,y:b,width:u(c,0),height:u(d,0)};if(f!==t)a.strokeWidth=f,a=g.crisp(a);if(e)a.r=e;g.rSetter=function(a){F(this.element,{rx:a,ry:a})};return g.attr(a)},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[p(c,!0)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return s(a)? - b.attr({"class":"highcharts-"+a}):b},image:function(a,b,c,d,e){var f={preserveAspectRatio:P};arguments.length>1&&r(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e,f){var g,h=this.symbols[a],h=h&&h(v(b),v(c),d,e,f),i=/^url\((.*?)\)$/,j,k;if(h)g=this.path(h),r(g,{symbolName:a,x:b,y:c,width:d,height:e}),f&&r(g,f);else if(i.test(a))k= - function(a,b){a.element&&(a.attr({width:b[0],height:b[1]}),a.alignByTranslate||a.translate(v((d-b[0])/2),v((e-b[1])/2)))},j=a.match(i)[1],a=Ib[j],g=this.image(j).attr({x:b,y:c}),g.isImg=!0,a?k(g,a):(g.attr({width:0,height:0}),$("img",{onload:function(){k(g,Ib[j]=[this.width,this.height])},src:j}));return g},symbols:{circle:function(a,b,c,d){var e=0.166*c;return["M",a+c/2,b,"C",a+c+e,b,a+c+e,b+d,a+c/2,b+d,"C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c,b+d,a,b+ - d,"Z"]},triangle:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d,a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start,c=e.r||c||d,g=e.end-0.001,d=e.innerR,h=e.open,i=aa(f),j=fa(f),k=aa(g),g=fa(g),e=e.end-fc&&i>b+g&&ib+g&&id&&h>a+g&&ha+g&&hl&&/[ \-]/.test(b.textContent||b.innerText))A(b,{width:l+"px",display:"block",whiteSpace:"normal"}),i=l;this.getSpanCorrection(i,k,h,j,g)}A(b,{left:e+ - (this.xCorr||0)+"px",top:f+(this.yCorr||0)+"px"});if(sb)k=b.offsetHeight;this.cTT=m}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,c){var d={},e=Aa?"-ms-transform":sb?"-webkit-transform":Ta?"MozTransform":Gb?"-o-transform":"";d[e]=d.transform="rotate("+a+"deg)";d[e+(Ta?"Origin":"-origin")]=d.transformOrigin=b*100+"% "+c+"px";A(this.element,d)},getSpanCorrection:function(a,b,c){this.xCorr=-a*c;this.yCorr=-b}});r(ta.prototype,{html:function(a,b,c){var d=this.createElement("span"),e=d.element, - f=d.renderer;d.textSetter=function(a){a!==e.innerHTML&&delete this.bBox;e.innerHTML=this.textStr=a};d.xSetter=d.ySetter=d.alignSetter=d.rotationSetter=function(a,b){b==="align"&&(b="textAlign");d[b]=a;d.htmlUpdateTransform()};d.attr({text:a,x:v(b),y:v(c)}).css({position:"absolute",whiteSpace:"nowrap",fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});d.css=d.htmlCss;if(f.isSVG)d.add=function(a){var b,c=f.box.parentNode,j=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)j.push(a),a=a.parentGroup; - q(j.reverse(),function(a){var d;b=a.div=a.div||$(Ja,{className:F(a.element,"class")},{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px"},b||c);d=b.style;r(a,{translateXSetter:function(b,c){d.left=b+"px";a[c]=b;a.doTransform=!0},translateYSetter:function(b,c){d.top=b+"px";a[c]=b;a.doTransform=!0},visibilitySetter:function(a,b){d[b]=a}})})}}else b=c;b.appendChild(e);d.added=!0;d.alignOnAdd&&d.htmlUpdateTransform();return d};return d}});var Z;if(!ba&&!ga){Z={init:function(a, - b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ","absolute",";"],e=b===Ja;(b==="shape"||e)&&d.push("left:0;top:0;width:1px;height:1px;");d.push("visibility: ",e?"hidden":"visible");c.push(' style="',d.join(""),'"/>');if(b)c=e||b==="span"||b==="img"?c.join(""):a.prepVML(c),this.element=$(c);this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box,d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);d.appendChild(c);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&& - this.updateTransform();if(this.onAdd)this.onAdd();return this},updateTransform:G.prototype.htmlUpdateTransform,setSpanRotation:function(){var a=this.rotation,b=aa(a*Ca),c=fa(a*Ca);A(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11=",b,", M12=",-c,", M21=",c,", M22=",b,", sizingMethod='auto expand')"].join(""):P})},getSpanCorrection:function(a,b,c,d,e){var f=d?aa(d*Ca):1,g=d?fa(d*Ca):0,h=p(this.elemHeight,this.element.offsetHeight),i;this.xCorr=f<0&&-a;this.yCorr=g<0&&-h;i=f*g< - 0;this.xCorr+=g*b*(i?1-c:c);this.yCorr-=f*b*(d?i?c:1-c:1);e&&e!=="left"&&(this.xCorr-=a*c*(f<0?-1:1),d&&(this.yCorr-=h*c*(g<0?-1:1)),A(this.element,{textAlign:e}))},pathToVML:function(a){for(var b=a.length,c=[];b--;)if(ia(a[b]))c[b]=v(a[b]*10)-5;else if(a[b]==="Z")c[b]="x";else if(c[b]=a[b],a.isArc&&(a[b]==="wa"||a[b]==="at"))c[b+5]===c[b+7]&&(c[b+7]+=a[b+7]>a[b+5]?1:-1),c[b+6]===c[b+8]&&(c[b+8]+=a[b+8]>a[b+6]?1:-1);return c.join(" ")||"x"},clip:function(a){var b=this,c;a?(c=a.members,ka(c,b),c.push(b), - b.destroyClip=function(){ka(c,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:gb?"inherit":"rect(auto)"});return b.css(a)},css:G.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&Pa(a)},destroy:function(){this.destroyClip&&this.destroyClip();return G.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=H.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,b){var c,a=a.split(/[ ,]/);c=a.length;if(c===9||c===11)a[c-4]=a[c-2]=z(a[c- - 2])-10*b;return a.join(" ")},shadow:function(a,b,c){var d=[],e,f=this.element,g=this.renderer,h,i=f.style,j,k=f.path,l,m,n,o;k&&typeof k.value!=="string"&&(k="x");m=k;if(a){n=p(a.width,3);o=(a.opacity||0.15)/n;for(e=1;e<=3;e++){l=n*2+1-2*e;c&&(m=this.cutOffPath(k.value,l+0.5));j=[''];h=$(g.prepVML(j),null,{left:z(i.left)+p(a.offsetX,1),top:z(i.top)+p(a.offsetY,1)});if(c)h.cutOff= - l+1;j=[''];$(g.prepVML(j),null,null,h);b?b.element.appendChild(h):f.parentNode.insertBefore(h,f);d.push(h)}this.shadows=d}return this},updateShadows:sa,setAttr:function(a,b){gb?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){this.element.className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName("stroke")[0]||$(this.renderer.prepVML([""]),null,null,c))[b]=a||"solid";this[b]=a},dSetter:function(a,b, - c){var d=this.shadows,a=a||[];this.d=a.join&&a.join(" ");c.path=a=this.pathToVML(a);if(d)for(c=d.length;c--;)d[c].path=d[c].cutOff?this.cutOffPath(a,d[c].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var d=c.nodeName;if(d==="SPAN")c.style.color=a;else if(d!=="IMG")c.filled=a!==P,this.setAttr("fillcolor",this.renderer.color(a,c,b,this))},opacitySetter:sa,rotationSetter:function(a,b,c){c=c.style;this[b]=c[b]=a;c.left=-v(fa(a*Ca)+1)+"px";c.top=v(aa(a*Ca))+"px"},strokeSetter:function(a,b,c){this.setAttr("strokecolor", - this.renderer.color(a,c,b))},"stroke-widthSetter":function(a,b,c){c.stroked=!!a;this[b]=a;ia(a)&&(a+="px");this.setAttr("strokeweight",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,c){a==="inherit"&&(a="visible");this.shadows&&q(this.shadows,function(c){c.style[b]=a});c.nodeName==="DIV"&&(a=a==="hidden"?"-999em":0,gb||(c.style[b]=a?"visible":"hidden"),b="top");c.style[b]=a},xSetter:function(a,b,c){this[b]=a;b==="x"?b="left":b==="y"&&(b="top");this.updateClipping?(this[b]= - a,this.updateClipping()):c.style[b]=a},zIndexSetter:function(a,b,c){c.style[b]=a}};S.VMLElement=Z=la(G,Z);Z.prototype.ySetter=Z.prototype.widthSetter=Z.prototype.heightSetter=Z.prototype.xSetter;var ha={Element:Z,isIE8:wa.indexOf("MSIE 8.0")>-1,init:function(a,b,c,d){var e;this.alignedObjects=[];d=this.createElement(Ja).css(r(this.getStyle(d),{position:"relative"}));e=d.element;a.appendChild(d.element);this.isVML=!0;this.box=e;this.boxWrapper=d;this.cache={};this.setSize(b,c,!1);if(!x.namespaces.hcv){x.namespaces.add("hcv", - "urn:schemas-microsoft-com:vml");try{x.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(f){x.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,d){var e=this.createElement(),f=da(a);return r(e,{members:[],left:(f?a.x:a)+1,top:(f?a.y:b)+1,width:(f?a.width: - c)-1,height:(f?a.height:d)-1,getCSS:function(a){var b=a.element,c=b.nodeName,a=a.inverted,d=this.top-(c==="shape"?b.offsetTop:0),e=this.left,b=e+this.width,f=d+this.height,d={clip:"rect("+v(a?e:d)+"px,"+v(a?f:b)+"px,"+v(a?b:f)+"px,"+v(a?d:e)+"px)"};!a&&gb&&c==="DIV"&&r(d,{width:b+"px",height:f+"px"});return d},updateClipping:function(){q(e.members,function(a){a.element&&a.css(e.getCSS(a))})}})},color:function(a,b,c,d){var e=this,f,g=/^rgba/,h,i,j=P;a&&a.linearGradient?i="gradient":a&&a.radialGradient&& - (i="pattern");if(i){var k,l,m=a.linearGradient||a.radialGradient,n,o,p,E,I,D="",a=a.stops,u,s=[],t=function(){h=[''];$(e.prepVML(h),null,null,b)};n=a[0];u=a[a.length-1];n[0]>0&&a.unshift([0,n[1]]);u[0]<1&&a.push([1,u[1]]);q(a,function(a,b){g.test(a[1])?(f=ya(a[1]),k=f.get("rgb"),l=f.get("a")):(k=a[1],l=1);s.push(a[0]*100+"% "+k);b?(p=l,E=k):(o=l,I=k)});if(c==="fill")if(i==="gradient")c= - m.x1||m[0]||0,a=m.y1||m[1]||0,n=m.x2||m[2]||0,m=m.y2||m[3]||0,D='angle="'+(90-V.atan((m-a)/(n-c))*180/na)+'"',t();else{var j=m.r,r=j*2,v=j*2,x=m.cx,y=m.cy,R=b.radialReference,w,j=function(){R&&(w=d.getBBox(),x+=(R[0]-w.x)/w.width-0.5,y+=(R[1]-w.y)/w.height-0.5,r*=R[2]/w.width,v*=R[2]/w.height);D='src="'+L.global.VMLRadialGradientURL+'" size="'+r+","+v+'" origin="0.5,0.5" position="'+x+","+y+'" color2="'+I+'" ';t()};d.added?j():d.onAdd=j;j=E}else j=k}else if(g.test(a)&&b.tagName!=="IMG")f=ya(a),h= - ["<",c,' opacity="',f.get("a"),'"/>'],$(this.prepVML(h),null,null,b),j=f.get("rgb");else{j=b.getElementsByTagName(c);if(j.length)j[0].opacity=1,j[0].type="solid";j=a}return j},prepVML:function(a){var b=this.isIE8,a=a.join("");b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","1&&f.attr({x:b,y:c,width:d, - height:e});return f},createElement:function(a){return a==="rect"?this.symbol(a):ta.prototype.createElement.call(this,a)},invertChild:function(a,b){var c=this,d=b.style,e=a.tagName==="IMG"&&a.style;A(a,{flip:"x",left:z(d.width)-(e?z(e.top):1),top:z(d.height)-(e?z(e.left):1),rotation:-90});q(a.childNodes,function(b){c.invertChild(b,a)})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||d,c=e.innerR,d=aa(f),i=fa(f),j=aa(g),k=fa(g);if(g-f===0)return["x"];f=["wa",a-h,b-h,a+h,b+h,a+h*d, - b+h*i,a+h*j,b+h*k];e.open&&!c&&f.push("e","M",a,b);f.push("at",a-c,b-c,a+c,b+c,a+c*j,b+c*k,a+c*d,b+c*i,"x","e");f.isArc=!0;return f},circle:function(a,b,c,d,e){e&&(c=d=2*e.r);e&&e.isCircle&&(a-=c/2,b-=d/2);return["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){return ta.prototype.symbols[!s(e)||!e.r?"square":"callout"].call(0,a,b,c,d,e)}}};S.VMLRenderer=Z=function(){this.init.apply(this,arguments)};Z.prototype=w(ta.prototype,ha);Ya=Z}ta.prototype.measureSpanWidth=function(a,b){var c= - x.createElement("span"),d;d=x.createTextNode(a);c.appendChild(d);A(c,b);this.box.appendChild(c);d=c.offsetWidth;Pa(c);return d};var Lb;if(ga)S.CanVGRenderer=Z=function(){xa="http://www.w3.org/1999/xhtml"},Z.prototype.symbols={},Lb=function(){function a(){var a=b.length,d;for(d=0;dl[o]?l[o]=g+j:m||(c=!1);if(m){l=(m=d.justifyToPlot)?d.pos:0;m=m?l+d.len: - d.chart.chartWidth;do a+=e?1:-1,n=d.ticks[i[a]];while(i[a]&&(!n||!n.label||n.label.line!==o));d=n&&n.label.xy&&n.label.xy.x+n.getLabelSides()[e?0:1];e&&!h||f&&h?g+kd&&(c=!1)):g+j>m&&(g=m-j,n&&g+k0&&b.height>0){f=w({align:c&&k&&"center",x:c?!k&&4:10,verticalAlign:!c&&k&&"middle",y:c?k?16:10:k?6:-4,rotation:c&&!k&&90},f);if(!g){r={align:f.textAlign||f.align,rotation:f.rotation};if(s(I))r.zIndex=I;a.label=g=t.text(f.text,0,0,f.useHTML).attr(r).css(f.style).add()}b=[o[1],o[4],k?o[6]:o[1]];k=[o[2],o[5],k?o[7]:o[2]];o=Na(b);c=Na(k);g.align(f,!1,{x:o,y:c,width:Ba(b)-o,height:Ba(k)-c});g.show()}else g&&g.hide();return a},destroy:function(){ka(this.axis.plotLinesAndBands, - this);delete this.axis;Oa(this)}};ma.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:M,lineColor:"#C0D0E0",lineWidth:1,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:10, - tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#707070"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return Ga(this.total,-1)},style:M.style}},defaultLeftAxisOptions:{labels:{x:-15,y:null},title:{rotation:270}}, - defaultRightAxisOptions:{labels:{x:15,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:null},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-15},title:{rotation:0}},init:function(a,b){var c=b.isX;this.horiz=a.inverted?!c:c;this.coll=(this.isXAxis=c)?"xAxis":"yAxis";this.opposite=b.opposite;this.side=b.side||(this.horiz?this.opposite?0:2:this.opposite?1:3);this.setOptions(b);var d=this.options,e=d.type;this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter; - this.userOptions=b;this.minPixelPadding=0;this.chart=a;this.reversed=d.reversed;this.zoomEnabled=d.zoomEnabled!==!1;this.categories=d.categories||e==="category";this.names=[];this.isLog=e==="logarithmic";this.isDatetimeAxis=e==="datetime";this.isLinked=s(d.linkedTo);this.tickmarkOffset=this.categories&&d.tickmarkPlacement==="between"?0.5:0;this.ticks={};this.labelEdge=[];this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom; - this.range=d.range;this.offset=d.offset||0;this.stacks={};this.oldStacks={};this.min=this.max=null;this.crosshair=p(d.crosshair,ra(a.options.tooltip.crosshairs)[c?0:1],!1);var f,d=this.options.events;Da(this,a.axes)===-1&&(c&&!this.isColorAxis?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),a[this.coll].push(this));this.series=this.series||[];if(a.inverted&&c&&this.reversed===t)this.reversed=!0;this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(f in d)N(this,f,d[f]);if(this.isLog)this.val2lin= - za,this.lin2val=ja},setOptions:function(a){this.options=w(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],w(L[this.coll],a))},defaultLabelFormatter:function(){var a=this.axis,b=this.value,c=a.categories,d=this.dateTimeLabelFormat,e=L.lang.numericSymbols,f=e&&e.length,g,h=a.options.labels.format,a=a.isLog?b:a.tickInterval;if(h)g=Ia(h,this);else if(c)g=b;else if(d)g= - bb(d,b);else if(f&&a>=1E3)for(;f--&&g===t;)c=Math.pow(1E3,f+1),a>=c&&e[f]!==null&&(g=Ga(b/c,-1)+e[f]);g===t&&(g=Q(b)>=1E4?Ga(b,0):Ga(b,-1,t,""));return g},getSeriesExtremes:function(){var a=this,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=null;a.buildStacks&&a.buildStacks();q(a.series,function(c){if(c.visible||!b.options.chart.ignoreHiddenSeries){var d;d=c.options.threshold;var e;a.hasVisibleSeries=!0;a.isLog&&d<=0&&(d=null);if(a.isXAxis){if(d=c.xData,d.length)a.dataMin=C(p(a.dataMin,d[0]), - Na(d)),a.dataMax=u(p(a.dataMax,d[0]),Ba(d))}else{c.getExtremes();e=c.dataMax;c=c.dataMin;if(s(c)&&s(e))a.dataMin=C(p(a.dataMin,c),c),a.dataMax=u(p(a.dataMax,e),e);if(s(d))if(a.dataMin>=d)a.dataMin=d,a.ignoreMinPadding=!0;else if(a.dataMaxg+this.width)m=!0}else if(a=g,c=l-this.right,ih+this.height)m=!0;return m&&!d?null:f.renderer.crispLine(["M",a,i,"L",c,j],b||1)},getLinearTickPositions:function(a,b,c){var d,e=ea(U(b/a)*a),f=ea(Ka(c/a)*a),g=[];if(b===c&&ia(b))return[b];for(b=e;b<=f;){g.push(b);b=ea(b+a);if(b===d)break;d=b}return g},getMinorTickPositions:function(){var a= - this.options,b=this.tickPositions,c=this.minorTickInterval,d=[],e;if(this.isLog){e=b.length;for(a=1;a=this.minRange,f,g,h,i,j;if(this.isXAxis&&this.minRange===t&&!this.isLog)s(a.min)||s(a.max)?this.minRange=null:(q(this.series,function(a){i=a.xData;for(g=j=a.xIncrement?1:i.length-1;g>0;g--)if(h=i[g]-i[g-1],f===t||hc&&(h=0);d=u(d,h);f=u(f,Fa(j)?0:h/2);g=u(g,j==="on"?0:h);!a.noSharedTooltip&&s(n)&&(e=s(e)?C(e,n):n)}),h=b.ordinalSlope&&e?b.ordinalSlope/e:1,b.minPointOffset=f*=h,b.pointRangePadding= - g*=h,b.pointRange=C(d,c),b.closestPointRange=e;if(a)b.oldTransA=j;b.translationSlope=b.transA=j=b.len/(c+g||1);b.transB=b.horiz?b.left:b.bottom;b.minPixelPadding=j*f},setTickPositions:function(a){var b=this,c=b.chart,d=b.options,e=d.startOnTick,f=d.endOnTick,g=b.isLog,h=b.isDatetimeAxis,i=b.isXAxis,j=b.isLinked,k=b.options.tickPositioner,l=d.maxPadding,m=d.minPadding,n=d.tickInterval,o=d.minTickInterval,Y=d.tickPixelInterval,E,I=b.categories;j?(b.linkedParent=c[b.coll][d.linkedTo],c=b.linkedParent.getExtremes(), - b.min=p(c.min,c.dataMin),b.max=p(c.max,c.dataMax),d.type!==b.linkedParent.options.type&&oa(11,1)):(b.min=p(b.userMin,d.min,b.dataMin),b.max=p(b.userMax,d.max,b.dataMax));if(g)!a&&C(b.min,p(b.dataMin,b.min))<=0&&oa(10,1),b.min=ea(za(b.min)),b.max=ea(za(b.max));if(b.range&&s(b.max))b.userMin=b.min=u(b.min,b.max-b.range),b.userMax=b.max,b.range=null;b.beforePadding&&b.beforePadding();b.adjustForMinRange();if(!I&&!b.axisPointRange&&!b.usePercentage&&!j&&s(b.min)&&s(b.max)&&(c=b.max-b.min)){if(!s(d.min)&& - !s(b.userMin)&&m&&(b.dataMin<0||!b.ignoreMinPadding))b.min-=c*m;if(!s(d.max)&&!s(b.userMax)&&l&&(b.dataMax>0||!b.ignoreMaxPadding))b.max+=c*l}if(ia(d.floor))b.min=u(b.min,d.floor);if(ia(d.ceiling))b.max=C(b.max,d.ceiling);b.min===b.max||b.min===void 0||b.max===void 0?b.tickInterval=1:j&&!n&&Y===b.linkedParent.options.tickPixelInterval?b.tickInterval=b.linkedParent.tickInterval:(b.tickInterval=p(n,I?1:(b.max-b.min)*Y/u(b.len,Y)),!s(n)&&b.lenu(2*b.len,200)&&oa(19,!0),a=h?b.getTimeTicks(b.normalizeTimeTickInterval(b.tickInterval,d.units),b.min,b.max,d.startOfWeek,b.ordinalPositions,b.closestPointRange,!0):g?b.getLogTickPositions(b.tickInterval,b.min,b.max):b.getLinearTickPositions(b.tickInterval,b.min,b.max),E&&a.splice(1,a.length-2),b.tickPositions=a;if(!j)d=a[0],g=a[a.length- - 1],h=b.minPointOffset||0,!e&&!f&&!I&&a.length===2&&a.splice(1,0,(g+d)/2),e?b.min=d:b.min-h>d&&a.shift(),f?b.max=g:b.max+h1E13?1:0.001,b.min-=e,b.max+=e)},setMaxTicks:function(){var a=this.chart,b=a.maxTicks||{},c=this.tickPositions,d=this._maxTicksKey=[this.coll,this.pos,this.len].join("-");if(!this.isLinked&&!this.isDatetimeAxis&&c&&c.length>(b[d]||0)&&this.options.alignTicks!==!1)b[d]=c.length;a.maxTicks=b},adjustTickAmount:function(){var a=this._maxTicksKey, - b=this.tickPositions,c=this.chart.maxTicks;if(c&&c[a]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1&&this.min!==t){var d=this.tickAmount,e=b.length;this.tickAmount=a=c[a];if(e=u(d,p(e.max,d))&&(b=t));this.displayBtn=a!==t||b!==t;this.setExtremes(a,b,!1,t, - {trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=this.horiz,e=p(b.width,a.plotWidth-c+(b.offsetRight||0)),f=p(b.height,a.plotHeight),g=p(b.top,a.plotTop),b=p(b.left,a.plotLeft+c),c=/%$/;c.test(f)&&(f=parseInt(f,10)/100*a.plotHeight);c.test(g)&&(g=parseInt(g,10)/100*a.plotHeight+a.plotTop);this.left=b;this.top=g;this.width=e;this.height=f;this.bottom=a.chartHeight-f-g;this.right=a.chartWidth-e-b;this.len=u(d?e:f,0);this.pos=d?b:g},getExtremes:function(){var a= - this.isLog;return{min:a?ea(ja(this.min)):this.min,max:a?ea(ja(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=b?ja(this.min):this.min,b=b?ja(this.max):this.max;c>a||a===null?a=c:b15&&a<165?"right":a>195&&a<345?"left":"center"},getOffset:function(){var a=this,b=a.chart,c=b.renderer,d=a.options, - e=a.tickPositions,f=a.ticks,g=a.horiz,h=a.side,i=b.inverted?[1,0,3,2][h]:h,j,k,l=0,m,n=0,o=d.title,Y=d.labels,E=0,I=b.axisOffset,b=b.clipOffset,D=[-1,1,1,-1][h],r,v=1,w=p(Y.maxStaggerLines,5),x,z,C,y,R;a.hasData=j=a.hasVisibleSeries||s(a.min)&&s(a.max)&&!!e;a.showAxis=k=j||p(d.showEmpty,!0);a.staggerLines=a.horiz&&Y.staggerLines;if(!a.axisGroup)a.gridGroup=c.g("grid").attr({zIndex:d.gridZIndex||1}).add(),a.axisGroup=c.g("axis").attr({zIndex:d.zIndex||2}).add(),a.labelGroup=c.g("axis-labels").attr({zIndex:Y.zIndex|| - 7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels").add();if(j||a.isLinked){a.labelAlign=p(Y.align||a.autoLabelAlign(Y.rotation));q(e,function(b){f[b]?f[b].addLabel():f[b]=new Sa(a,b)});if(a.horiz&&!a.staggerLines&&w&&!Y.rotation){for(j=a.reversed?[].concat(e).reverse():e;v1)a.staggerLines=v}q(e,function(b){if(h=== - 0||h===2||{1:"left",3:"right"}[h]===a.labelAlign)E=u(f[b].getLabelSize(),E)});if(a.staggerLines)E*=a.staggerLines,a.labelOffset=E}else for(r in f)f[r].destroy(),delete f[r];if(o&&o.text&&o.enabled!==!1){if(!a.axisTitle)a.axisTitle=c.text(o.text,0,0,o.useHTML).attr({zIndex:7,rotation:o.rotation||0,align:o.textAlign||{low:"left",middle:"center",high:"right"}[o.align]}).addClass("highcharts-"+this.coll.toLowerCase()+"-title").css(o.style).add(a.axisGroup),a.axisTitle.isNew=!0;if(k)l=a.axisTitle.getBBox()[g? - "height":"width"],m=o.offset,n=s(m)?0:p(o.margin,g?5:10);a.axisTitle[k?"show":"hide"]()}a.offset=D*p(d.offset,I[h]);c=h===2?a.tickBaseline:0;g=E+n+(E&&D*(g?p(Y.y,a.tickBaseline+8):Y.x)-c);a.axisTitleMargin=p(m,g);I[h]=u(I[h],a.axisTitleMargin+l+D*a.offset,g);b[i]=u(b[i],U(d.lineWidth/2)*2)},getLinePath:function(a){var b=this.chart,c=this.opposite,d=this.offset,e=this.horiz,f=this.left+(c?this.width:0)+d,d=b.chartHeight-this.bottom-(c?this.height:0)+d;c&&(a*=-1);return b.renderer.crispLine(["M",e? - this.left:f,e?d:this.top,"L",e?b.chartWidth-this.right:f,e?d:b.chartHeight-this.bottom],a)},getTitlePosition:function(){var a=this.horiz,b=this.left,c=this.top,d=this.len,e=this.options.title,f=a?b:c,g=this.opposite,h=this.offset,i=z(e.style.fontSize||12),d={low:f+(a?0:d),middle:f+d/2,high:f+(a?d:0)}[e.align],b=(a?c+this.height:b)+(a?1:-1)*(g?-1:1)*this.axisTitleMargin+(this.side===2?i:0);return{x:a?d:b+(g?this.width:0)+h+(e.x||0),y:a?b-(g?this.height:0)+h:d+(e.y||0)}},render:function(){var a=this, - b=a.horiz,c=a.reversed,d=a.chart,e=d.renderer,f=a.options,g=a.isLog,h=a.isLinked,i=a.tickPositions,j,k=a.axisTitle,l=a.ticks,m=a.minorTicks,n=a.alternateBands,o=f.stackLabels,p=f.alternateGridColor,E=a.tickmarkOffset,I=f.lineWidth,D=d.hasRendered&&s(a.oldMin)&&!isNaN(a.oldMin),r=a.hasData,u=a.showAxis,v,w=f.labels.overflow,x=a.justifyLabels=b&&w!==!1,z;a.labelEdge.length=0;a.justifyToPlot=w==="justify";q([l,m,n],function(a){for(var b in a)a[b].isActive=!1});if(r||h)if(a.minorTickInterval&&!a.categories&& - q(a.getMinorTickPositions(),function(b){m[b]||(m[b]=new Sa(a,b,"minor"));D&&m[b].isNew&&m[b].render(null,!0);m[b].render(null,!1,1)}),i.length&&(j=i.slice(),(b&&c||!b&&!c)&&j.reverse(),x&&(j=j.slice(1).concat([j[0]])),q(j,function(b,c){x&&(c=c===j.length-1?0:c+1);if(!h||b>=a.min&&b<=a.max)l[b]||(l[b]=new Sa(a,b)),D&&l[b].isNew&&l[b].render(c,!0,0.1),l[b].render(c)}),E&&a.min===0&&(l[-1]||(l[-1]=new Sa(a,-1,null,!0)),l[-1].render(-1))),p&&q(i,function(b,c){if(c%2===0&&b=B.second&&(i.setMilliseconds(0),i.setSeconds(j>=B.minute?0:k*U(i.getSeconds()/k)));if(j>=B.minute)i[Bb](j>=B.hour?0:k*U(i[ob]()/k));if(j>=B.hour)i[Cb](j>= - B.day?0:k*U(i[pb]()/k));if(j>=B.day)i[rb](j>=B.month?1:k*U(i[Wa]()/k));j>=B.month&&(i[Db](j>=B.year?0:k*U(i[eb]()/k)),h=i[fb]());j>=B.year&&(h-=h%k,i[Eb](h));if(j===B.week)i[rb](i[Wa]()-i[qb]()+p(d,1));b=1;Ra&&(i=new Date(i.getTime()+Ra));h=i[fb]();for(var d=i.getTime(),l=i[eb](),m=i[Wa](),n=g?Ra:(864E5+i.getTimezoneOffset()*6E4)%864E5;d=0.5)a=v(a),g=this.getLinearTickPositions(a,b,c);else if(a>=0.08)for(var f=U(b),h,i,j,k,l,e=a>0.3?[1,2,4]:a>0.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];fb&&(!d||k<=c)&&k!==t&&g.push(k),k>c&&(l=!0),k=j}else if(b=ja(b), - c=ja(c),a=e[d?"minorTickInterval":"tickInterval"],a=p(a==="auto"?null:a,this._minorAutoInterval,(c-b)*(e.tickPixelInterval/(d?5:1))/((d?f/this.tickPositions.length:f)||1)),a=mb(a,null,lb(a)),g=Ua(this.getLinearTickPositions(a,b,c),za),!d)this._minorAutoInterval=a/5;if(!d)this.tickInterval=a;return g};var Mb=S.Tooltip=function(){this.init.apply(this,arguments)};Mb.prototype={init:function(a,b){var c=b.borderWidth,d=b.style,e=z(d.padding);this.chart=a;this.options=b;this.crosshairs=[];this.now={x:0, - y:0};this.isHidden=!0;this.label=a.renderer.label("",0,0,b.shape||"callout",null,null,b.useHTML,null,"tooltip").attr({padding:e,fill:b.backgroundColor,"stroke-width":c,r:b.borderRadius,zIndex:8}).css(d).css({padding:0}).add().attr({y:-9999});ga||this.label.shadow(b.shadow);this.shared=b.shared},destroy:function(){if(this.label)this.label=this.label.destroy();clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a,b,c,d){var e=this,f=e.now,g=e.options.animation!==!1&&!e.isHidden&& - (Q(a-f.x)>1||Q(b-f.y)>1),h=e.followPointer||e.len>1;r(f,{x:g?(2*f.x+a)/3:a,y:g?(f.y+b)/2:b,anchorX:h?t:g?(2*f.anchorX+c)/3:c,anchorY:h?t:g?(f.anchorY+d)/2:d});e.label.attr(f);if(g)clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,b,c,d)},32)},hide:function(){var a=this,b;clearTimeout(this.hideTimer);if(!this.isHidden)b=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){a.label.fadeOut();a.isHidden=!0},p(this.options.hideDelay,500)),b&&q(b,function(a){a.setState()}), - this.chart.hoverPoints=null},getAnchor:function(a,b){var c,d=this.chart,e=d.inverted,f=d.plotTop,g=0,h=0,i,a=ra(a);c=a[0].tooltipPos;this.followPointer&&b&&(b.chartX===t&&(b=d.pointer.normalize(b)),c=[b.chartX-d.plotLeft,b.chartY-f]);c||(q(a,function(a){i=a.series.yAxis;g+=a.plotX;h+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&i?i.top-f:0)}),g/=a.length,h/=a.length,c=[e?d.plotWidth-h:g,this.shared&&!e&&a.length>1&&b?b.chartY-f:e?d.plotHeight-g:h]);return Ua(c,v)},getPosition:function(a,b,c){var d= - this.chart,e=this.distance,f={},g,h=["y",d.chartHeight,b,c.plotY+d.plotTop],i=["x",d.chartWidth,a,c.plotX+d.plotLeft],j=c.ttBelow||d.inverted&&!c.negative||!d.inverted&&c.negative,k=function(a,b,c,d){var g=cb-e)return!1;else f[a]=db-c/2?b-c-2:d-c/2},m=function(a){var b=h;h=i;i=b;g=a},n=function(){k.apply(0,h)!==!1?l.apply(0,i)===!1&&!g&&(m(!0),n()): - g?f.x=f.y=0:(m(!0),n())};(d.inverted||this.len>1)&&m();n();return f},defaultFormatter:function(a){var b=this.points||ra(this),c=b[0].series,d;d=[a.tooltipHeaderFormatter(b[0])];q(b,function(a){c=a.series;d.push(c.tooltipFormatter&&c.tooltipFormatter(a)||a.point.tooltipFormatter(c.tooltipOptions.pointFormat))});d.push(a.options.footerFormat||"");return d.join("")},refresh:function(a,b){var c=this.chart,d=this.label,e=this.options,f,g,h={},i,j=[];i=e.formatter||this.defaultFormatter;var h=c.hoverPoints, - k,l=this.shared;clearTimeout(this.hideTimer);this.followPointer=ra(a)[0].series.tooltipOptions.followPointer;g=this.getAnchor(a,b);f=g[0];g=g[1];l&&(!a.series||!a.series.noSharedTooltip)?(c.hoverPoints=a,h&&q(h,function(a){a.setState()}),q(a,function(a){a.setState("hover");j.push(a.getLabelConfig())}),h={x:a[0].category,y:a[0].y},h.points=j,this.len=j.length,a=a[0]):h=a.getLabelConfig();i=i.call(h,this);h=a.series;this.distance=p(h.tooltipOptions.distance,16);i===!1?this.hide():(this.isHidden&&(ab(d), - d.attr("opacity",1).show()),d.attr({text:i}),k=e.borderColor||a.color||h.color||"#606060",d.attr({stroke:k}),this.updatePosition({plotX:f,plotY:g,negative:a.negative,ttBelow:a.ttBelow}),this.isHidden=!1);K(c,"tooltipRefresh",{text:i,x:f+c.plotLeft,y:g+c.plotTop,borderColor:k})},updatePosition:function(a){var b=this.chart,c=this.label,c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(v(c.x),v(c.y),a.plotX+b.plotLeft,a.plotY+b.plotTop)},tooltipHeaderFormatter:function(a){var b= - a.series,c=b.tooltipOptions,d=c.dateTimeLabelFormats,e=c.xDateFormat,f=b.xAxis,g=f&&f.options.type==="datetime"&&ia(a.key),c=c.headerFormat,f=f&&f.closestPointRange,h;if(g&&!e){if(f)for(h in B){if(B[h]>=f||B[h]<=B.day&&a.key%B[h]>0){e=d[h];break}}else e=d.day;e=e||d.year}g&&e&&(c=c.replace("{point.key}","{point.key:"+e+"}"));return Ia(c,{point:a,series:b})}};var pa;Za=x.documentElement.ontouchstart!==t;var Va=S.Pointer=function(a,b){this.init(a,b)};Va.prototype={init:function(a,b){var c=b.chart,d= - c.events,e=ga?"":c.zoomType,c=a.inverted,f;this.options=b;this.chart=a;this.zoomX=f=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=f&&!c||e&&c;this.zoomVert=e&&!c||f&&c;this.hasZoom=f||e;this.runChartClick=d&&!!d.click;this.pinchDown=[];this.lastValidTouch={};if(S.Tooltip&&b.tooltip.enabled)a.tooltip=new Mb(a,b.tooltip),this.followTouchMove=b.tooltip.followTouchMove;this.setDOMEvents()},normalize:function(a,b){var c,d,a=a||window.event,a=Sb(a);if(!a.target)a.target=a.srcElement;d=a.touches?a.touches.length? - a.touches.item(0):a.changedTouches[0]:a;if(!b)this.chartPosition=b=Rb(this.chart.container);d.pageX===t?(c=u(a.x,a.clientX-b.left),d=a.y):(c=d.pageX-b.left,d=d.pageY-b.top);return r(a,{chartX:v(c),chartY:v(d)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};q(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},getIndex:function(a){var b=this.chart;return b.inverted?b.plotHeight+b.plotTop-a.chartY:a.chartX-b.plotLeft}, - runPointActions:function(a){var b=this.chart,c=b.series,d=b.tooltip,e,f,g=b.hoverPoint,h=b.hoverSeries,i,j,k=b.chartWidth,l=this.getIndex(a);if(d&&this.options.tooltip.shared&&(!h||!h.noSharedTooltip)){f=[];i=c.length;for(j=0;jk&&f.splice(i,1);if(f.length&& - f[0].clientX!==this.hoverX)d.refresh(f,a),this.hoverX=f[0].clientX}c=h&&h.tooltipOptions.followPointer;if(h&&h.tracker&&!c){if((e=h.tooltipPoints[l])&&e!==g)e.onMouseOver(a)}else d&&c&&!d.isHidden&&(h=d.getAnchor([{}],a),d.updatePosition({plotX:h[0],plotY:h[1]}));if(d&&!this._onDocumentMouseMove)this._onDocumentMouseMove=function(a){if(W[pa])W[pa].pointer.onDocumentMouseMove(a)},N(x,"mousemove",this._onDocumentMouseMove);q(b.axes,function(b){b.drawCrosshair(a,p(e,g))})},reset:function(a){var b=this.chart, - c=b.hoverSeries,d=b.hoverPoint,e=b.tooltip,f=e&&e.shared?b.hoverPoints:d;(a=a&&e&&f)&&ra(f)[0].plotX===t&&(a=!1);if(a)e.refresh(f),d&&d.setState(d.state,!0);else{if(d)d.onMouseOut();if(c)c.onMouseOut();e&&e.hide();if(this._onDocumentMouseMove)X(x,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null;q(b.axes,function(a){a.hideCrosshair()});this.hoverX=null}},scaleGroups:function(a,b){var c=this.chart,d;q(c.series,function(e){d=a||e.getPlotBox();e.xAxis&&e.xAxis.zoomEnabled&&(e.group.attr(d), - e.markerGroup&&(e.markerGroup.attr(d),e.markerGroup.clip(b?c.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(d))});c.clipRect.attr(b||c.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,c=b.options.chart,d=a.chartX,e=a.chartY,f=this.zoomHor,g=this.zoomVert,h=b.plotLeft,i=b.plotTop,j=b.plotWidth,k=b.plotHeight,l,m=this.mouseDownX,n=this.mouseDownY, - o=c.panKey&&a[c.panKey+"Key"];dh+j&&(d=h+j);ei+k&&(e=i+k);this.hasDragged=Math.sqrt(Math.pow(m-d,2)+Math.pow(n-e,2));if(this.hasDragged>10){l=b.isInsidePlot(m-h,n-i);if(b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&l&&!o&&!this.selectionMarker)this.selectionMarker=b.renderer.rect(h,i,f?1:j,g?1:k,0).attr({fill:c.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add();this.selectionMarker&&f&&(d-=m,this.selectionMarker.attr({width:Q(d),x:(d>0?0:d)+m}));this.selectionMarker&& - g&&(d=e-n,this.selectionMarker.attr({height:Q(d),y:(d>0?0:d)+n}));l&&!this.selectionMarker&&c.panning&&b.pan(a,c.panning)}},drop:function(a){var b=this.chart,c=this.hasPinched;if(this.selectionMarker){var d={xAxis:[],yAxis:[],originalEvent:a.originalEvent||a},e=this.selectionMarker,f=e.attr?e.attr("x"):e.x,g=e.attr?e.attr("y"):e.y,h=e.attr?e.attr("width"):e.width,i=e.attr?e.attr("height"):e.height,j;if(this.hasDragged||c)q(b.axes,function(b){if(b.zoomEnabled){var c=b.horiz,e=a.type==="touchend"?b.minPixelPadding: - 0,n=b.toValue((c?f:g)+e),c=b.toValue((c?f+h:g+i)-e);!isNaN(n)&&!isNaN(c)&&(d[b.coll].push({axis:b,min:C(n,c),max:u(n,c)}),j=!0)}}),j&&K(b,"selection",d,function(a){b.zoom(r(a,c?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();c&&this.scaleGroups()}if(b)A(b.container,{cursor:b._cursor}),b.cancelClick=this.hasDragged>10,b.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[]},onContainerMouseDown:function(a){a=this.normalize(a);a.preventDefault&&a.preventDefault(); - this.dragStart(a)},onDocumentMouseUp:function(a){W[pa]&&W[pa].pointer.drop(a)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition,d=b.hoverSeries,a=this.normalize(a,c);c&&d&&!this.inClass(a.target,"highcharts-tracker")&&!b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&this.reset()},onContainerMouseLeave:function(){var a=W[pa];if(a)a.pointer.reset(),a.pointer.chartPosition=null},onContainerMouseMove:function(a){var b=this.chart;pa=b.index;a=this.normalize(a);a.returnValue= - !1;b.mouseIsDown==="mousedown"&&this.drag(a);(this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop))&&!b.openMenu&&this.runPointActions(a)},inClass:function(a,b){for(var c;a;){if(c=F(a,"class"))if(c.indexOf(b)!==-1)return!0;else if(c.indexOf("highcharts-container")!==-1)return!1;a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries,c=(a=a.relatedTarget||a.toElement)&&a.point&&a.point.series;if(b&&!b.options.stickyTracking&&!this.inClass(a, - "highcharts-tooltip")&&c!==b)b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,d=b.plotLeft,e=b.plotTop,a=this.normalize(a);a.cancelBubble=!0;b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(K(c.series,"click",r(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(r(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-d,a.chartY-e)&&K(b,"click",a)))},setDOMEvents:function(){var a=this,b=a.chart.container;b.onmousedown=function(b){a.onContainerMouseDown(b)}; - b.onmousemove=function(b){a.onContainerMouseMove(b)};b.onclick=function(b){a.onContainerClick(b)};N(b,"mouseleave",a.onContainerMouseLeave);$a===1&&N(x,"mouseup",a.onDocumentMouseUp);if(Za)b.ontouchstart=function(b){a.onContainerTouchStart(b)},b.ontouchmove=function(b){a.onContainerTouchMove(b)},$a===1&&N(x,"touchend",a.onDocumentTouchEnd)},destroy:function(){var a;X(this.chart.container,"mouseleave",this.onContainerMouseLeave);$a||(X(x,"mouseup",this.onDocumentMouseUp),X(x,"touchend",this.onDocumentTouchEnd)); - clearInterval(this.tooltipTimeout);for(a in this)this[a]=null}};r(S.Pointer.prototype,{pinchTranslate:function(a,b,c,d,e,f){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,a,b,c,d,e,f);(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,a,b,c,d,e,f)},pinchTranslateDirection:function(a,b,c,d,e,f,g,h){var i=this.chart,j=a?"x":"y",k=a?"X":"Y",l="chart"+k,m=a?"width":"height",n=i["plot"+(a?"Left":"Top")],o,p,q=h||1,r=i.inverted,D=i.bounds[a?"h":"v"],u=b.length===1,s=b[0][l], - v=c[0][l],t=!u&&b[1][l],w=!u&&c[1][l],x,c=function(){!u&&Q(s-t)>20&&(q=h||Q(v-w)/Q(s-t));p=(n-v)/q+s;o=i["plot"+(a?"Width":"Height")]/q};c();b=p;bD.max&&(b=D.max-o,x=!0);x?(v-=0.8*(v-g[j][0]),u||(w-=0.8*(w-g[j][1])),c()):g[j]=[v,w];r||(f[j]=p-n,f[m]=o);f=r?1/q:q;e[m]=o;e[j]=b;d[r?a?"scaleY":"scaleX":"scale"+k]=q;d["translate"+k]=f*n+(v-f*s)},pinch:function(a){var b=this,c=b.chart,d=b.pinchDown,e=b.followTouchMove,f=a.touches,g=f.length,h=b.lastValidTouch,i=b.hasZoom,j=b.selectionMarker, - k={},l=g===1&&(b.inClass(a.target,"highcharts-tracker")&&c.runTrackerClick||c.runChartClick),m={};(i||e)&&!l&&a.preventDefault();Ua(f,function(a){return b.normalize(a)});if(a.type==="touchstart")q(f,function(a,b){d[b]={chartX:a.chartX,chartY:a.chartY}}),h.x=[d[0].chartX,d[1]&&d[1].chartX],h.y=[d[0].chartY,d[1]&&d[1].chartY],q(c.axes,function(a){if(a.zoomEnabled){var b=c.bounds[a.horiz?"h":"v"],d=a.minPixelPadding,e=a.toPixels(p(a.options.min,a.dataMin)),f=a.toPixels(p(a.options.max,a.dataMax)),g= - C(e,f),e=u(e,f);b.min=C(a.pos,g-d);b.max=u(a.pos+a.len,e+d)}});else if(d.length){if(!j)b.selectionMarker=j=r({destroy:sa},c.plotBox);b.pinchTranslate(d,f,k,j,m,h);b.hasPinched=i;b.scaleGroups(k,m);!i&&e&&g===1&&this.runPointActions(b.normalize(a))}},onContainerTouchStart:function(a){var b=this.chart;pa=b.index;a.touches.length===1?(a=this.normalize(a),b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)?(this.runPointActions(a),this.pinch(a)):this.reset()):a.touches.length===2&&this.pinch(a)},onContainerTouchMove:function(a){(a.touches.length=== - 1||a.touches.length===2)&&this.pinch(a)},onDocumentTouchEnd:function(a){W[pa]&&W[pa].pointer.drop(a)}});if(H.PointerEvent||H.MSPointerEvent){var ua={},yb=!!H.PointerEvent,Wb=function(){var a,b=[];b.item=function(a){return this[a]};for(a in ua)ua.hasOwnProperty(a)&&b.push({pageX:ua[a].pageX,pageY:ua[a].pageY,target:ua[a].target});return b},zb=function(a,b,c,d){a=a.originalEvent||a;if((a.pointerType==="touch"||a.pointerType===a.MSPOINTER_TYPE_TOUCH)&&W[pa])d(a),d=W[pa].pointer,d[b]({type:c,target:a.currentTarget, - preventDefault:sa,touches:Wb()})};r(Va.prototype,{onContainerPointerDown:function(a){zb(a,"onContainerTouchStart","touchstart",function(a){ua[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){zb(a,"onContainerTouchMove","touchmove",function(a){ua[a.pointerId]={pageX:a.pageX,pageY:a.pageY};if(!ua[a.pointerId].target)ua[a.pointerId].target=a.currentTarget})},onDocumentPointerUp:function(a){zb(a,"onContainerTouchEnd","touchend",function(a){delete ua[a.pointerId]})}, - batchMSEvents:function(a){a(this.chart.container,yb?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,yb?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(x,yb?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});Ma(Va.prototype,"init",function(a,b,c){a.call(this,b,c);(this.hasZoom||this.followTouchMove)&&A(b.container,{"-ms-touch-action":P,"touch-action":P})});Ma(Va.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&& - this.batchMSEvents(N)});Ma(Va.prototype,"destroy",function(a){this.batchMSEvents(X);a.call(this)})}var kb=S.Legend=function(a,b){this.init(a,b)};kb.prototype={init:function(a,b){var c=this,d=b.itemStyle,e=p(b.padding,8),f=b.itemMarginTop||0;this.options=b;if(b.enabled)c.itemStyle=d,c.itemHiddenStyle=w(d,b.itemHiddenStyle),c.itemMarginTop=f,c.padding=e,c.initialItemX=e,c.initialItemY=e-5,c.maxItemWidth=0,c.chart=a,c.itemHeight=0,c.lastLineHeight=0,c.symbolWidth=p(b.symbolWidth,16),c.pages=[],c.render(), - N(c.chart,"endResize",function(){c.positionCheckboxes()})},colorizeItem:function(a,b){var c=this.options,d=a.legendItem,e=a.legendLine,f=a.legendSymbol,g=this.itemHiddenStyle.color,c=b?c.itemStyle.color:g,h=b?a.legendColor||a.color||"#CCC":g,g=a.options&&a.options.marker,i={fill:h},j;d&&d.css({fill:c,color:c});e&&e.attr({stroke:h});if(f){if(g&&f.isMarker)for(j in i.stroke=h,g=a.convertAttribs(g),g)d=g[j],d!==t&&(i[j]=d);f.attr(i)}},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl, - d=a._legendItemPos,e=d[0],d=d[1],f=a.checkbox;a.legendGroup&&a.legendGroup.translate(b?e:this.legendWidth-e-2*c-4,d);if(f)f.x=e,f.y=d},destroyItem:function(a){var b=a.checkbox;q(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&Pa(a.checkbox)},destroy:function(){var a=this.group,b=this.box;if(b)this.box=b.destroy();if(a)this.group=a.destroy()},positionCheckboxes:function(a){var b=this.group.alignAttr,c,d=this.clipHeight||this.legendHeight;if(b)c= - b.translateY,q(this.allItems,function(e){var f=e.checkbox,g;f&&(g=c+f.y+(a||0)+3,A(f,{left:b.translateX+e.checkboxOffset+f.x-20+"px",top:g+"px",display:g>c-6&&g(m||b.chartWidth-2*j-q-d.x))this.itemX=q,this.itemY+=o+this.lastLineHeight+n,this.lastLineHeight=0;this.maxItemWidth=u(this.maxItemWidth,f);this.lastItemY=o+this.itemY+n;this.lastLineHeight=u(g,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];e?this.itemX+=f:(this.itemY+=o+g+n,this.lastLineHeight=g);this.offsetWidth=m||u((e?this.itemX-q-k:f)+j,this.offsetWidth)},getAllItems:function(){var a=[];q(this.chart.series, - function(b){var c=b.options;if(p(c.showInLegend,!s(c.linkedTo)?t:!1,!0))a=a.concat(b.legendItems||(c.legendType==="point"?b.data:b))});return a},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.group,e,f,g,h,i=a.box,j=a.options,k=a.padding,l=j.borderWidth,m=j.backgroundColor;a.itemX=a.initialItemX;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;if(!d)a.group=d=c.g("legend").attr({zIndex:7}).add(),a.contentGroup=c.g().attr({zIndex:1}).add(d),a.scrollGroup=c.g().add(a.contentGroup);a.renderTitle(); - e=a.getAllItems();nb(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});j.reversed&&e.reverse();a.allItems=e;a.display=f=!!e.length;q(e,function(b){a.renderItem(b)});g=j.width||a.offsetWidth;h=a.lastItemY+a.lastLineHeight+a.titleHeight;h=a.handleOverflow(h);if(l||m){g+=k;h+=k;if(i){if(g>0&&h>0)i[i.isNew?"attr":"animate"](i.crisp({width:g,height:h})),i.isNew=!1}else a.box=i=c.rect(0,0,g,h,j.borderRadius,l||0).attr({stroke:j.borderColor,"stroke-width":l|| - 0,fill:m||P}).add(d).shadow(j.shadow),i.isNew=!0;i[f?"show":"hide"]()}a.legendWidth=g;a.legendHeight=h;q(e,function(b){a.positionItem(b)});f&&d.align(r({width:g,height:h},j),!0,"spacingBox");b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,c=this.chart,d=c.renderer,e=this.options,f=e.y,f=c.spacingBox.height+(e.verticalAlign==="top"?-f:f)-this.padding,g=e.maxHeight,h,i=this.clipRect,j=e.navigation,k=p(j.animation,!0),l=j.arrowSize||12,m=this.nav,n=this.pages,o,r=this.allItems; - e.layout==="horizontal"&&(f/=2);g&&(f=C(f,g));n.length=0;if(a>f&&!e.useHTML){this.clipHeight=h=u(f-20-this.titleHeight-this.padding,0);this.currentPage=p(this.currentPage,1);this.fullHeight=a;q(r,function(a,b){var c=a._legendItemPos[1],d=v(a.legendItem.getBBox().height),e=n.length;if(!e||c-n[e-1]>h&&(o||c)!==n[e-1])n.push(o||c),e++;b===r.length-1&&c+d-n[e-1]>h&&n.push(c);c!==o&&(o=c)});if(!i)i=b.clipRect=d.clipRect(0,this.padding,9999,0),b.contentGroup.clip(i);i.attr({height:h});if(!m)this.nav=m= - d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,l,l).on("click",function(){b.scroll(-1,k)}).add(m),this.pager=d.text("",15,10).css(j.style).add(m),this.down=d.symbol("triangle-down",0,0,l,l).on("click",function(){b.scroll(1,k)}).add(m);b.scroll(0);a=f}else if(m)i.attr({height:c.chartHeight}),m.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0;return a},scroll:function(a,b){var c=this.pages,d=c.length,e=this.currentPage+a,f=this.clipHeight,g=this.options.navigation, - h=g.activeColor,g=g.inactiveColor,i=this.pager,j=this.padding;e>d&&(e=d);if(e>0)b!==t&&Qa(b,this.chart),this.nav.attr({translateX:j,translateY:f+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:e===1?g:h}).css({cursor:e===1?"default":"pointer"}),i.attr({text:e+"/"+d}),this.down.attr({x:18+this.pager.getBBox().width,fill:e===d?g:h}).css({cursor:e===d?"default":"pointer"}),c=-c[e-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),this.currentPage=e,this.positionCheckboxes(c)}}; - M=S.LegendSymbolMixin={drawRectangle:function(a,b){var c=a.options.symbolHeight||12;b.legendSymbol=this.chart.renderer.rect(0,a.baseline-5-c/2,a.symbolWidth,c,a.options.symbolRadius||0).attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(a){var b=this.options,c=b.marker,d;d=a.symbolWidth;var e=this.chart.renderer,f=this.legendGroup,a=a.baseline-v(e.fontMetrics(a.options.itemStyle.fontSize,this.legendItem).b*0.3),g;if(b.lineWidth){g={"stroke-width":b.lineWidth};if(b.dashStyle)g.dashstyle= - b.dashStyle;this.legendLine=e.path(["M",0,a,"L",d,a]).attr(g).add(f)}if(c&&c.enabled!==!1)b=c.radius,this.legendSymbol=d=e.symbol(this.symbol,d/2-b,a-b,2*b,2*b).add(f),d.isMarker=!0}};(/Trident\/7\.0/.test(wa)||Ta)&&Ma(kb.prototype,"positionItem",function(a,b){var c=this,d=function(){b._legendItemPos&&a.call(c,b)};d();setTimeout(d)});Xa.prototype={init:function(a,b){var c,d=a.series;a.series=null;c=w(L,a);c.series=a.series=d;this.userOptions=a;d=c.chart;this.margin=this.splashArray("margin",d);this.spacing= - this.splashArray("spacing",d);var e=d.events;this.bounds={h:{},v:{}};this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.series=[];this.hasCartesianSeries=d.showAxes;var f=this,g;f.index=W.length;W.push(f);$a++;d.reflow!==!1&&N(f,"load",function(){f.initReflow()});if(e)for(g in e)N(f,g,e[g]);f.xAxis=[];f.yAxis=[];f.animation=ga?!1:p(d.animation,!0);f.pointCount=f.colorCounter=f.symbolCounter=0;f.firstRender()},initSeries:function(a){var b=this.options.chart;(b=J[a.type||b.type||b.defaultSeriesType])|| - oa(17,!0);b=new b;b.init(this,a);return b},isInsidePlot:function(a,b,c){var d=c?b:a,a=c?a:b;return d>=0&&d<=this.plotWidth&&a>=0&&a<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&q(this.axes,function(a){a.adjustTickAmount()});this.maxTicks=null},redraw:function(a){var b=this.axes,c=this.series,d=this.pointer,e=this.legend,f=this.isDirtyLegend,g,h,i=this.hasCartesianSeries,j=this.isDirtyBox,k=c.length,l=k,m=this.renderer,n=m.isHidden(),o=[];Qa(a,this);n&&this.cloneRenderTo(); - for(this.layOutTitles();l--;)if(a=c[l],a.options.stacking&&(g=!0,a.isDirty)){h=!0;break}if(h)for(l=k;l--;)if(a=c[l],a.options.stacking)a.isDirty=!0;q(c,function(a){a.isDirty&&a.options.legendType==="point"&&(f=!0)});if(f&&e.options.enabled)e.render(),this.isDirtyLegend=!1;g&&this.getStacks();if(i){if(!this.isResizing)this.maxTicks=null,q(b,function(a){a.setScale()});this.adjustTickAmounts()}this.getMargins();i&&(q(b,function(a){a.isDirty&&(j=!0)}),q(b,function(a){if(a.isDirtyExtremes)a.isDirtyExtremes= - !1,o.push(function(){K(a,"afterSetExtremes",r(a.eventArgs,a.getExtremes()));delete a.eventArgs});(j||g)&&a.redraw()}));j&&this.drawChartBox();q(c,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()});d&&d.reset(!0);m.draw();K(this,"redraw");n&&this.cloneRenderTo(!0);q(o,function(a){a.call()})},get:function(a){var b=this.axes,c=this.series,d,e;for(d=0;d - 19?this.containerHeight:400))},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&&(this.renderTo.appendChild(c),Pa(b),delete this.renderToClone):(c&&c.parentNode===this.renderTo&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),A(b,{position:"absolute",top:"-9999px",display:"block"}),b.style.setProperty&&b.style.setProperty("display","block","important"),x.body.appendChild(b),c&&b.appendChild(c))},getContainer:function(){var a,b=this.options.chart, - c,d,e;this.renderTo=a=b.renderTo;e="highcharts-"+tb++;if(Fa(a))this.renderTo=a=x.getElementById(a);a||oa(13,!0);c=z(F(a,"data-highcharts-chart"));!isNaN(c)&&W[c]&&W[c].hasRendered&&W[c].destroy();F(a,"data-highcharts-chart",this.index);a.innerHTML="";!b.skipClone&&!a.offsetWidth&&this.cloneRenderTo();this.getChartSize();c=this.chartWidth;d=this.chartHeight;this.container=a=$(Ja,{className:"highcharts-container"+(b.className?" "+b.className:""),id:e},r({position:"relative",overflow:"hidden",width:c+ - "px",height:d+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},b.style),this.renderToClone||a);this._cursor=a.style.cursor;this.renderer=b.forExport?new ta(a,c,d,b.style,!0):new Ya(a,c,d,b.style);ga&&this.renderer.create(this,a,c,d)},getMargins:function(){var a=this.spacing,b,c=this.legend,d=this.margin,e=this.options.legend,f=p(e.margin,20),g=e.x,h=e.y,i=e.align,j=e.verticalAlign,k=this.titleOffset;this.resetMargins();b=this.axisOffset;if(k&&!s(d[0]))this.plotTop= - u(this.plotTop,k+this.options.title.margin+a[0]);if(c.display&&!e.floating)if(i==="right"){if(!s(d[1]))this.marginRight=u(this.marginRight,c.legendWidth-g+f+a[1])}else if(i==="left"){if(!s(d[3]))this.plotLeft=u(this.plotLeft,c.legendWidth+g+f+a[3])}else if(j==="top"){if(!s(d[0]))this.plotTop=u(this.plotTop,c.legendHeight+h+f+a[0])}else if(j==="bottom"&&!s(d[2]))this.marginBottom=u(this.marginBottom,c.legendHeight-h+f+a[2]);this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin);this.extraTopMargin&& - (this.plotTop+=this.extraTopMargin);this.hasCartesianSeries&&q(this.axes,function(a){a.getOffset()});s(d[3])||(this.plotLeft+=b[3]);s(d[0])||(this.plotTop+=b[0]);s(d[2])||(this.marginBottom+=b[2]);s(d[1])||(this.marginRight+=b[1]);this.setChartSize()},reflow:function(a){var b=this,c=b.options.chart,d=b.renderTo,e=c.width||hb(d,"width"),f=c.height||hb(d,"height"),c=a?a.target:H,d=function(){if(b.container)b.setSize(e,f,!1),b.hasUserSize=null};if(!b.hasUserSize&&e&&f&&(c===H||c===x)){if(e!==b.containerWidth|| - f!==b.containerHeight)clearTimeout(b.reflowTimeout),a?b.reflowTimeout=setTimeout(d,100):d();b.containerWidth=e;b.containerHeight=f}},initReflow:function(){var a=this,b=function(b){a.reflow(b)};N(H,"resize",b);N(a,"destroy",function(){X(H,"resize",b)})},setSize:function(a,b,c){var d=this,e,f,g;d.isResizing+=1;g=function(){d&&K(d,"endResize",null,function(){d.isResizing-=1})};Qa(c,d);d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth;if(s(a))d.chartWidth=e=u(0,v(a)),d.hasUserSize=!!e;if(s(b))d.chartHeight= - f=u(0,v(b));(va?ib:A)(d.container,{width:e+"px",height:f+"px"},va);d.setChartSize(!0);d.renderer.setSize(e,f,c);d.maxTicks=null;q(d.axes,function(a){a.isDirty=!0;a.setScale()});q(d.series,function(a){a.isDirty=!0});d.isDirtyLegend=!0;d.isDirtyBox=!0;d.layOutTitles();d.getMargins();d.redraw(c);d.oldChartHeight=null;K(d,"resize");va===!1?g():setTimeout(g,va&&va.duration||500)},setChartSize:function(a){var b=this.inverted,c=this.renderer,d=this.chartWidth,e=this.chartHeight,f=this.options.chart,g=this.spacing, - h=this.clipOffset,i,j,k,l;this.plotLeft=i=v(this.plotLeft);this.plotTop=j=v(this.plotTop);this.plotWidth=k=u(0,v(d-i-this.marginRight));this.plotHeight=l=u(0,v(e-j-this.marginBottom));this.plotSizeX=b?l:k;this.plotSizeY=b?k:l;this.plotBorderWidth=f.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:g[3],y:g[0],width:d-g[3]-g[1],height:e-g[0]-g[2]};this.plotBox=c.plotBox={x:i,y:j,width:k,height:l};d=2*U(this.plotBorderWidth/2);b=Ka(u(d,h[3])/2);c=Ka(u(d,h[0])/2);this.clipBox={x:b,y:c,width:U(this.plotSizeX- - u(d,h[1])/2-b),height:u(0,U(this.plotSizeY-u(d,h[2])/2-c))};a||q(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this.spacing,b=this.margin;this.plotTop=p(b[0],a[0]);this.marginRight=p(b[1],a[1]);this.marginBottom=p(b[2],a[2]);this.plotLeft=p(b[3],a[3]);this.axisOffset=[0,0,0,0];this.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground,g= - this.plotBorder,h=this.plotBGImage,i=a.borderWidth||0,j=a.backgroundColor,k=a.plotBackgroundColor,l=a.plotBackgroundImage,m=a.plotBorderWidth||0,n,o=this.plotLeft,p=this.plotTop,q=this.plotWidth,r=this.plotHeight,u=this.plotBox,s=this.clipRect,v=this.clipBox;n=i+(a.shadow?8:0);if(i||j)if(e)e.animate(e.crisp({width:c-n,height:d-n}));else{e={fill:j||P};if(i)e.stroke=a.borderColor,e["stroke-width"]=i;this.chartBackground=b.rect(n/2,n/2,c-n,d-n,a.borderRadius,i).attr(e).addClass("highcharts-background").add().shadow(a.shadow)}if(k)f? - f.animate(u):this.plotBackground=b.rect(o,p,q,r,0).attr({fill:k}).add().shadow(a.plotShadow);if(l)h?h.animate(u):this.plotBGImage=b.image(l,o,p,q,r).add();s?s.animate({width:v.width,height:v.height}):this.clipRect=b.clipRect(v);if(m)g?g.animate(g.crisp({x:o,y:p,width:q,height:r})):this.plotBorder=b.rect(o,p,q,r,0,-m).attr({stroke:a.plotBorderColor,"stroke-width":m,fill:P,zIndex:1}).add();this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,e,f;q(["inverted", - "angular","polar"],function(g){c=J[b.type||b.defaultSeriesType];f=a[g]||b[g]||c&&c.prototype[g];for(e=d&&d.length;!f&&e--;)(c=J[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},linkSeries:function(){var a=this,b=a.series;q(b,function(a){a.linkedSeries.length=0});q(b,function(b){var d=b.options.linkedTo;if(Fa(d)&&(d=d===":previous"?a.series[b.index-1]:a.get(d)))d.linkedSeries.push(b),b.linkedParent=d})},renderSeries:function(){q(this.series,function(a){a.translate();a.setTooltipPoints&&a.setTooltipPoints(); - a.render()})},renderLabels:function(){var a=this,b=a.options.labels;b.items&&q(b.items,function(c){var d=r(b.style,c.style),e=z(d.left)+a.plotLeft,f=z(d.top)+a.plotTop+12;delete d.left;delete d.top;a.renderer.text(c.html,e,f).attr({zIndex:2}).css(d).add()})},render:function(){var a=this.axes,b=this.renderer,c=this.options;this.setTitle();this.legend=new kb(this,c.legend);this.getStacks();q(a,function(a){a.setScale()});this.getMargins();this.maxTicks=null;q(a,function(a){a.setTickPositions(!0);a.setMaxTicks()}); - this.adjustTickAmounts();this.getMargins();this.drawChartBox();this.hasCartesianSeries&&q(a,function(a){a.render()});if(!this.seriesGroup)this.seriesGroup=b.g("series-group").attr({zIndex:3}).add();this.renderSeries();this.renderLabels();this.showCredits(c.credits);this.hasRendered=!0},showCredits:function(a){if(a.enabled&&!this.credits)this.credits=this.renderer.text(a.text,0,0).on("click",function(){if(a.href)location.href=a.href}).attr({align:a.position.align,zIndex:8}).css(a.style).add().align(a.position)}, - destroy:function(){var a=this,b=a.axes,c=a.series,d=a.container,e,f=d&&d.parentNode;K(a,"destroy");W[a.index]=t;$a--;a.renderTo.removeAttribute("data-highcharts-chart");X(a);for(e=b.length;e--;)b[e]=b[e].destroy();for(e=c.length;e--;)c[e]=c[e].destroy();q("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(b){var c=a[b];c&&c.destroy&&(a[b]=c.destroy())});if(d)d.innerHTML= - "",X(d),f&&Pa(d);for(e in a)delete a[e]},isReadyToRender:function(){var a=this;return!ba&&H==H.top&&x.readyState!=="complete"||ga&&!H.canvg?(ga?Lb.push(function(){a.firstRender()},a.options.global.canvasToolsURL):x.attachEvent("onreadystatechange",function(){x.detachEvent("onreadystatechange",a.firstRender);x.readyState==="complete"&&a.firstRender()}),!1):!0},firstRender:function(){var a=this,b=a.options,c=a.callback;if(a.isReadyToRender()){a.getContainer();K(a,"init");a.resetMargins();a.setChartSize(); - a.propFromSeries();a.getAxes();q(b.series||[],function(b){a.initSeries(b)});a.linkSeries();K(a,"beforeRender");if(S.Pointer)a.pointer=new Va(a,b);a.render();a.renderer.draw();c&&c.apply(a,[a]);q(a.callbacks,function(b){b.apply(a,[a])});a.cloneRenderTo(!0);K(a,"load")}},splashArray:function(a,b){var c=b[a],c=da(c)?c:[c,c,c,c];return[p(b[a+"Top"],c[0]),p(b[a+"Right"],c[1]),p(b[a+"Bottom"],c[2]),p(b[a+"Left"],c[3])]}};Xa.prototype.callbacks=[];Z=S.CenteredSeriesMixin={getCenter:function(){var a=this.options, - b=this.chart,c=2*(a.slicedOffset||0),d,e=b.plotWidth-2*c,f=b.plotHeight-2*c,b=a.center,a=[p(b[0],"50%"),p(b[1],"50%"),a.size||"100%",a.innerSize||0],g=C(e,f),h;return Ua(a,function(a,b){h=/%$/.test(a);d=b<2||b===2&&h;return(h?[e,f,g,g][b]*z(a)/100:a)+(d?c:0)})}};var Ea=function(){};Ea.prototype={init:function(a,b,c){this.series=a;this.applyOptions(b,c);this.pointAttr={};if(a.options.colorByPoint&&(b=a.options.colors||a.chart.options.colors,this.color=this.color||b[a.colorCounter++],a.colorCounter=== - b.length))a.colorCounter=0;a.chart.pointCount++;return this},applyOptions:function(a,b){var c=this.series,d=c.options.pointValKey||c.pointValKey,a=Ea.prototype.optionsToObject.call(this,a);r(this,a);this.options=this.options?r(this.options,a):a;if(d)this.y=this[d];if(this.x===t&&c)this.x=b===t?c.autoIncrement():b;return this},optionsToObject:function(a){var b={},c=this.series,d=c.pointArrayMap||["y"],e=d.length,f=0,g=0;if(typeof a==="number"||a===null)b[d[0]]=a;else if(La(a)){if(a.length>e){c=typeof a[0]; - if(c==="string")b.name=a[0];else if(c==="number")b.x=a[0];f++}for(;ga+1&&b.push(d.slice(a+1,g)),a=g):g===e-1&&b.push(d.slice(a+1,g+1))});this.segments=b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},d=b.plotOptions||{},e=c[this.type];this.userOptions=a;c=w(e,c.series, - a);this.tooltipOptions=w(L.tooltip,L.plotOptions[this.type].tooltip,b.tooltip,d.series&&d.series.tooltip,d[this.type]&&d[this.type].tooltip,a.tooltip);e.marker===null&&delete c.marker;return c},getCyclic:function(a,b,c){var d=this.userOptions,e="_"+a+"Index",f=a+"Counter";b||(s(d[e])?b=d[e]:(d[e]=b=this.chart[f]%c.length,this.chart[f]+=1),b=c[b]);this[a]=b},getColor:function(){this.options.colorByPoint||this.getCyclic("color",this.options.color||ca[this.type].color,this.chart.options.colors)},getSymbol:function(){var a= - this.options.marker;this.getCyclic("symbol",a.symbol,this.chart.options.symbols);if(/^url/.test(this.symbol))a.radius=0},drawLegendSymbol:M.drawLineMarker,setData:function(a,b,c,d){var e=this,f=e.points,g=f&&f.length||0,h,i=e.options,j=e.chart,k=null,l=e.xAxis,m=l&&!!l.categories,n=e.tooltipPoints,o=i.turboThreshold,r=this.xData,u=this.yData,s=(h=e.pointArrayMap)&&h.length,a=a||[];h=a.length;b=p(b,!0);if(d!==!1&&h&&g===h&&!e.cropped&&!e.hasGroupedData)q(a,function(a,b){f[b].update(a,!1)});else{e.xIncrement= - null;e.pointRange=m?1:i.pointRange;e.colorCounter=0;q(this.parallelArrays,function(a){e[a+"Data"].length=0});if(o&&h>o){for(c=0;k===null&&cj||this.forceCrop))if(m= - h.getExtremes(),n=m.min,m=m.max,b[d-1]m)b=[],c=[];else if(b[0]m)e=this.cropData(this.xData,this.yData,n,m),b=e.xData,c=e.yData,e=e.start,f=!0,k=b.length;for(a=b.length-1;a>=0;a--)d=b[a]-b[a-1],!f&&b[a]>n&&b[a]0&&(g===t||d=c){f=u(0,i-h);break}for(;id){g=i+h;break}return{xData:a.slice(f,g),yData:b.slice(f,g),start:f,end:g}},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,e=this.processedYData,f=this.pointClass,g=d.length,h=this.cropStart||0,i,j=this.hasGroupedData,k,l=[],m;if(!b&&!j)b=[],b.length=a.length,b=this.data=b;for(m=0;m0),j=this.getExtremesFromAll||this.cropped||(c[l+1]||j)>=g&& - (c[l-1]||j)<=h,i&&j)if(i=k.length)for(;i--;)k[i]!==null&&(e[f++]=k[i]);else e[f++]=k;this.dataMin=p(void 0,Na(e));this.dataMax=p(void 0,Ba(e))},translate:function(){this.processedXData||this.processData();this.generatePoints();for(var a=this.options,b=a.stacking,c=this.xAxis,d=c.categories,e=this.yAxis,f=this.points,g=f.length,h=!!this.modifyValue,i=a.pointPlacement,j=i==="between"||ia(i),k=a.threshold,a=0;a0||j))g.graphic=c.renderer.symbol(i,d-h,e-h,2*h,2*h).attr(a).add(n)}else if(k)g.graphic=k.destroy()},convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={},a=a||{},b=b||{},c=c||{},d=d||{};for(f in e)g=e[f],h[f]=p(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var a=this,b=a.options,c=ca[a.type].marker?b.marker:b,d=c.states,e=d.hover,f,g=a.color;f={stroke:g,fill:g};var h=a.points||[],i,j=[],k,l=a.pointAttrToOptions; - k=a.hasPointSpecificOptions;var m=b.negativeColor,n=c.lineColor,o=c.fillColor;i=b.turboThreshold;var p;b.marker?(e.radius=e.radius||c.radius+e.radiusPlus,e.lineWidth=e.lineWidth||c.lineWidth+e.lineWidthPlus):e.color=e.color||ya(e.color||g).brighten(e.brightness).get();j[""]=a.convertAttribs(c,f);q(["hover","select"],function(b){j[b]=a.convertAttribs(d[b],j[""])});a.pointAttr=j;g=h.length;if(!i||g - 1?b=b.concat(c):d.push(e[0])});a.singlePoints=d;return a.graphPath=b},drawGraph:function(){var a=this,b=this.options,c=[["graph",b.lineColor||this.color]],d=b.lineWidth,e=b.dashStyle,f=b.linecap!=="square",g=this.getGraphPath(),h=b.negativeColor;h&&c.push(["graphNeg",h]);q(c,function(c,h){var k=c[0],l=a[k];if(l)ab(l),l.animate({d:g});else if(d&&g.length)l={stroke:c[1],"stroke-width":d,fill:P,zIndex:1},e?l.dashstyle=e:f&&(l["stroke-linecap"]=l["stroke-linejoin"]="round"),a[k]=a.chart.renderer.path(g).attr(l).add(a.group).shadow(!h&& - b.shadow)})},clipNeg:function(){var a=this.options,b=this.chart,c=b.renderer,d=a.negativeColor||a.negativeFillColor,e,f=this.graph,g=this.area,h=this.posClip,i=this.negClip;e=b.chartWidth;var j=b.chartHeight,k=u(e,j),l=this.yAxis;if(d&&(f||g)){d=v(l.toPixels(a.threshold||0,!0));d<0&&(k-=d);a={x:0,y:0,width:k,height:d};k={x:0,y:d,width:k,height:k};if(b.inverted)a.height=k.y=b.plotWidth-d,c.isVML&&(a={x:b.plotWidth-d-b.plotLeft,y:0,width:e,height:j},k={x:d+b.plotLeft-e,y:0,width:b.plotLeft+d,height:e}); - l.reversed?(b=k,e=a):(b=a,e=k);h?(h.animate(b),i.animate(e)):(this.posClip=h=c.clipRect(b),this.negClip=i=c.clipRect(e),f&&this.graphNeg&&(f.clip(h),this.graphNeg.clip(i)),g&&(g.clip(h),this.areaNeg.clip(i)))}},invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};q(["group","markerGroup"],function(c){b[c]&&b[c].attr(a).invert()})}var b=this,c=b.chart;if(b.xAxis)N(c,"resize",a),N(b,"destroy",function(){X(c,"resize",a)}),a(),b.invertGroups=a},plotGroup:function(a,b,c,d, - e){var f=this[a],g=!f;g&&(this[a]=f=this.chart.renderer.g(b).attr({visibility:c,zIndex:d||0.1}).add(e));f[g?"attr":"animate"](this.getPlotBox());return f},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;if(a.inverted)b=c,c=this.xAxis;return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,d=a.options,e=(c=d.animation)&&!!a.animate&&b.renderer.isSVG&&p(c.duration,500)||0,f=a.visible?"visible":"hidden",g=d.zIndex, - h=a.hasRendered,i=b.seriesGroup;c=a.plotGroup("group","series",f,g,i);a.markerGroup=a.plotGroup("markerGroup","markers",f,g,i);e&&a.animate(!0);a.getAttribs();c.inverted=a.isCartesian?b.inverted:!1;a.drawGraph&&(a.drawGraph(),a.clipNeg());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&a.options.enableMouseTracking!==!1&&a.drawTracker();b.inverted&&a.invertGroups();d.clip!==!1&&!a.sharedClipKey&&!h&&c.clip(b.clipRect);e&&a.animate();if(!h)e?a.animationTimeout=setTimeout(function(){a.afterAnimate()}, - e):a.afterAnimate();a.isDirty=a.isDirtyData=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirtyData,c=this.group,d=this.xAxis,e=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:p(d&&d.left,a.plotLeft),translateY:p(e&&e.top,a.plotTop)}));this.translate();this.setTooltipPoints&&this.setTooltipPoints(!0);this.render();b&&K(this,"updatedData")}};Fb.prototype={destroy:function(){Oa(this,this.axis)},render:function(a){var b=this.options, - c=b.format,c=c?Ia(c,this):b.formatter.call(this);this.label?this.label.attr({text:c,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(c,null,null,b.useHTML).css(b.style).attr({align:this.textAlign,rotation:b.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,b){var c=this.axis,d=c.chart,e=d.inverted,f=this.isNegative,g=c.translate(c.usePercentage?100:this.total,0,0,0,1),c=c.translate(0),c=Q(g-c),h=d.xAxis[0].translate(this.x)+a,i=d.plotHeight,f={x:e?f?g:g-c:h,y:e?i-h-b:f?i-g- - c:i-g,width:e?c:b,height:e?b:c};if(e=this.label)e.align(this.alignOptions,null,f),f=e.alignAttr,e[this.options.crop===!1||d.isInsidePlot(f.x,f.y)?"show":"hide"](!0)}};ma.prototype.buildStacks=function(){var a=this.series,b=p(this.options.reversedStacks,!0),c=a.length;if(!this.isXAxis){for(this.usePercentage=!1;c--;)a[b?c:a.length-c-1].setStackedPoints();if(this.usePercentage)for(c=0;cg;)h--;this.updateParallelArrays(d,"splice",h,0,0);this.updateParallelArrays(d,h);if(j)j[g]=d.name;l.splice(h,0,a);m&&(this.data.splice(h,0,null),this.processData());e.legendType==="point"&&this.generatePoints();c&&(f[0]&&f[0].remove?f[0].remove(!1):(f.shift(),this.updateParallelArrays(d,"shift"),l.shift()));this.isDirtyData=this.isDirty= - !0;b&&(this.getAttribs(),i.redraw())},remove:function(a,b){var c=this,d=c.chart,a=p(a,!0);if(!c.isRemoving)c.isRemoving=!0,K(c,"remove",null,function(){c.destroy();d.isDirtyLegend=d.isDirtyBox=!0;d.linkSeries();a&&d.redraw(b)});c.isRemoving=!1},update:function(a,b){var c=this,d=this.chart,e=this.userOptions,f=this.type,g=J[f].prototype,h=["group","markerGroup","dataLabelsGroup"],i;q(h,function(a){h[a]=c[a];delete c[a]});a=w(e,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data}, - a);this.remove(!1);for(i in g)g.hasOwnProperty(i)&&(this[i]=t);r(this,J[a.type||f].prototype);q(h,function(a){c[a]=h[a]});this.init(d,a);d.linkSeries();p(b,!0)&&d.redraw(!1)}});r(ma.prototype,{update:function(a,b){var c=this.chart,a=c.options[this.coll][this.options.index]=w(this.userOptions,a);this.destroy(!0);this._addedPlotLB=t;this.init(c,r(a,{events:t}));c.isDirtyBox=!0;p(b,!0)&&c.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,d=this.series,e=d.length;e--;)d[e]&&d[e].remove(!1); - ka(b.axes,this);ka(b[c],this);b.options[c].splice(this.options.index,1);q(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=!0;p(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}});ha=la(O);J.line=ha;ca.area=w(T,{threshold:0});var qa=la(O,{type:"area",getSegments:function(){var a=this,b=[],c=[],d=[],e=this.xAxis,f=this.yAxis,g=f.stacks[this.stackKey],h={},i,j,k=this.points,l=this.options.connectNulls,m,n; - if(this.options.stacking&&!this.cropped){for(m=0;m=0;d--)g=p(a[d].yBottom,f),da&&i>e?(i=u(a,e),k=2*e-i):ig&&k>e?(k=u(g,e),i=2*e-k):k0.5*a.xAxis.len?0:1),e=a.yAxis,f=a.translatedThreshold=e.getThreshold(c.threshold),g=p(c.minPointLength,5),h=a.getColumnMetrics(),i=h.width,j=a.barW=u(i,1+2*d),k=a.pointXOffset=h.offset,l=-(d%2?0.5:0),m=d%2?0.5:1;b.renderer.isVML&&b.inverted&&(m+=1);c.pointPadding&&(j=Ka(j));O.prototype.translate.apply(a);q(a.points,function(c){var d=p(c.yBottom,f),h=C(u(-999-d,c.plotY),e.len+999+d),q=c.plotX+k,r=j,s=C(h,d),t;t=u(h,d)-s;Q(t)g?d-g:f-(e.translate(c.y, - 0,1,0,1)<=f?g:0)));c.barX=q;c.pointWidth=i;c.tooltipPos=b.inverted?[e.len-h,a.xAxis.len-q-r/2]:[q+r/2,h];r=v(q+r)+l;q=v(q)+l;r-=q;d=Q(s)<0.5;t=v(s+t)+m;s=v(s)+m;t-=s;d&&(s-=1,t+=1);c.shapeType="rect";c.shapeArgs={x:q,y:s,width:r,height:t}})},getSymbol:sa,drawLegendSymbol:M.drawRectangle,drawGraph:sa,drawPoints:function(){var a=this,b=this.chart,c=a.options,d=b.renderer,e=c.animationLimit||250,f,g;q(a.points,function(h){var i=h.plotY,j=h.graphic;if(i!==t&&!isNaN(i)&&h.y!==null)f=h.shapeArgs,i=s(a.borderWidth)? - {"stroke-width":a.borderWidth}:{},g=h.pointAttr[h.selected?"select":""]||a.pointAttr[""],j?(ab(j),j.attr(i)[b.pointCount {series.name}
    ',pointFormat:"x: {point.x}
    y: {point.y}
    "}, - stickyTracking:!1});qa=la(O,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,singularTooltips:!0,drawGraph:function(){this.options.lineWidth&&O.prototype.drawGraph.call(this)}});J.scatter=qa;ca.pie=w(T,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null, - showInLegend:!1,slicedOffset:10,states:{hover:{brightness:0.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}});T={type:"pie",isCartesian:!1,pointClass:la(Ea,{init:function(){Ea.prototype.init.apply(this,arguments);var a=this,b;if(a.y<0)a.y=null;r(a,{visible:a.visible!==!1,name:p(a.name,"Slice")});b=function(b){a.slice(b.type==="select")};N(a,"select",b);N(a,"unselect",b);return a},setVisible:function(a){var b=this,c=b.series,d=c.chart;b.visible=b.options.visible=a=a===t?!b.visible:a;c.options.data[Da(b, - c.data)]=b.options;q(["graphic","dataLabel","connector","shadowGroup"],function(c){if(b[c])b[c][a?"show":"hide"](!0)});b.legendItem&&d.legend.colorizeItem(b,a);if(!c.isDirty&&c.options.ignoreHiddenPoint)c.isDirty=!0,d.redraw()},slice:function(a,b,c){var d=this.series;Qa(c,d.chart);p(b,!0);this.sliced=this.options.sliced=a=s(a)?a:!this.sliced;d.options.data[Da(this,d.data)]=this.options;a=a?this.slicedTranslation:{translateX:0,translateY:0};this.graphic.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}, - haloPath:function(a){var b=this.shapeArgs,c=this.series.chart;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.plotLeft+b.x,c.plotTop+b.y,b.r+a,b.r+a,{innerR:this.shapeArgs.r,start:b.start,end:b.end})}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},singularTooltips:!0,getColor:sa,animate:function(a){var b=this,c=b.points,d=b.startAngleRad; - if(!a)q(c,function(a){var c=a.graphic,a=a.shapeArgs;c&&(c.attr({r:b.center[3]/2,start:d,end:d}),c.animate({r:a.r,start:a.start,end:a.end},b.options.animation))}),b.animate=null},setData:function(a,b,c,d){O.prototype.setData.call(this,a,!1,c,d);this.processData();this.generatePoints();p(b,!0)&&this.chart.redraw(c)},generatePoints:function(){var a,b=0,c,d,e,f=this.options.ignoreHiddenPoint;O.prototype.generatePoints.call(this);c=this.points;d=c.length;for(a=0;a0?e.y/b*100:0,e.total=b},translate:function(a){this.generatePoints();var b=0,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f,g,h,i=c.startAngle||0,j=this.startAngleRad=na/180*(i-90),i=(this.endAngleRad=na/180*(p(c.endAngle,i+360)-90))-j,k=this.points,l=c.dataLabels.distance,c=c.ignoreHiddenPoint,m,n=k.length,o;if(!a)this.center=a=this.getCenter();this.getX=function(b,c){h=V.asin(C((b-a[1])/(a[2]/2+l),1));return a[0]+(c?-1:1)*aa(h)*(a[2]/2+l)};for(m=0;m< - n;m++){o=k[m];f=j+b*i;if(!c||o.visible)b+=o.percentage/100;g=j+b*i;o.shapeType="arc";o.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:v(f*1E3)/1E3,end:v(g*1E3)/1E3};h=(g+f)/2;h>1.5*na?h-=2*na:h<-na/2&&(h+=2*na);o.slicedTranslation={translateX:v(aa(h)*d),translateY:v(fa(h)*d)};f=aa(h)*a[2]/2;g=fa(h)*a[2]/2;o.tooltipPos=[a[0]+f*0.7,a[1]+g*0.7];o.half=h<-na/2||h>na/2?1:0;o.angle=h;e=C(e,l/2);o.labelPos=[a[0]+f+aa(h)*l,a[1]+g+fa(h)*l,a[0]+f+aa(h)*e,a[1]+g+fa(h)*e,a[0]+f,a[1]+g,l<0?"center":o.half? - "right":"left",h]}},drawGraph:null,drawPoints:function(){var a=this,b=a.chart.renderer,c,d,e=a.options.shadow,f,g;if(e&&!a.shadowGroup)a.shadowGroup=b.g("shadow").add(a.group);q(a.points,function(h){d=h.graphic;g=h.shapeArgs;f=h.shadowGroup;if(e&&!f)f=h.shadowGroup=b.g("shadow").add(a.shadowGroup);c=h.sliced?h.slicedTranslation:{translateX:0,translateY:0};f&&f.attr(c);d?d.animate(r(g,c)):h.graphic=d=b[h.shapeType](g).setRadialReference(a.center).attr(h.pointAttr[h.selected?"select":""]).attr({"stroke-linejoin":"round"}).attr(c).add(a.group).shadow(e, - f);h.visible!==void 0&&h.setVisible(h.visible)})},sortByAngle:function(a,b){a.sort(function(a,d){return a.angle!==void 0&&(d.angle-a.angle)*b})},drawLegendSymbol:M.drawRectangle,getCenter:Z.getCenter,getSymbol:sa};T=la(O,T);J.pie=T;O.prototype.drawDataLabels=function(){var a=this,b=a.options,c=b.cursor,d=b.dataLabels,e=a.points,f,g,h,i;if(d.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(d),i=a.plotGroup("dataLabelsGroup","data-labels",d.defer?"hidden":"visible",d.zIndex||6),!a.hasRendered&& - p(d.defer,!0)&&(i.attr({opacity:0}),N(a,"afterAnimate",function(){a.visible&&i.show();i[b.animation?"animate":"attr"]({opacity:1},{duration:200})})),g=d,q(e,function(b){var e,l=b.dataLabel,m,n,o=b.connector,q=!0;f=b.options&&b.options.dataLabels;e=p(f&&f.enabled,g.enabled);if(l&&!e)b.dataLabel=l.destroy();else if(e){d=w(g,f);e=d.rotation;m=b.getLabelConfig();h=d.format?Ia(d.format,m):d.formatter.call(m,d);d.style.color=p(d.color,d.style.color,a.color,"black");if(l)if(s(h))l.attr({text:h}),q=!1;else{if(b.dataLabel= - l=l.destroy(),o)b.connector=o.destroy()}else if(s(h)){l={fill:d.backgroundColor,stroke:d.borderColor,"stroke-width":d.borderWidth,r:d.borderRadius||0,rotation:e,padding:d.padding,zIndex:1};for(n in l)l[n]===t&&delete l[n];l=b.dataLabel=a.chart.renderer[e?"text":"label"](h,0,-999,null,null,null,d.useHTML).attr(l).css(r(d.style,c&&{cursor:c})).add(i).shadow(d.shadow)}l&&a.alignDataLabel(b,l,d,null,q)}})};O.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=p(a.plotX,-999), - i=p(a.plotY,-999),j=b.getBBox();if(a=this.visible&&(a.series.forceDL||f.isInsidePlot(h,v(i),g)||d&&f.isInsidePlot(h,g?d.x+1:d.y+d.height-1,g)))d=r({x:g?f.plotWidth-i:h,y:v(g?f.plotHeight-h:i),width:0,height:0},d),r(c,{width:j.width,height:j.height}),c.rotation?b[e?"attr":"animate"]({x:d.x+c.x+d.width/2,y:d.y+c.y+d.height/2}).attr({align:c.align}):(b.align(c,null,d),g=b.alignAttr,p(c.overflow,"justify")==="justify"?this.justifyDataLabel(b,c,g,j,d,e):p(c.crop,!0)&&(a=f.isInsidePlot(g.x,g.y)&&f.isInsidePlot(g.x+ - j.width,g.y+j.height)));if(!a)b.attr({y:-999}),b.placed=!1};O.prototype.justifyDataLabel=function(a,b,c,d,e,f){var g=this.chart,h=b.align,i=b.verticalAlign,j,k;j=c.x;if(j<0)h==="right"?b.align="left":b.x=-j,k=!0;j=c.x+d.width;if(j>g.plotWidth)h==="left"?b.align="right":b.x=g.plotWidth-j,k=!0;j=c.y;if(j<0)i==="bottom"?b.verticalAlign="top":b.y=-j,k=!0;j=c.y+d.height;if(j>g.plotHeight)i==="top"?b.verticalAlign="bottom":b.y=g.plotHeight-j,k=!0;if(k)a.placed=!f,a.align(b,null,e)};if(J.pie)J.pie.prototype.drawDataLabels= - function(){var a=this,b=a.data,c,d=a.chart,e=a.options.dataLabels,f=p(e.connectorPadding,10),g=p(e.connectorWidth,1),h=d.plotWidth,i=d.plotHeight,j,k,l=p(e.softConnector,!0),m=e.distance,n=a.center,o=n[2]/2,r=n[1],s=m>0,t,w,x,z=[[],[]],B,A,K,J,y,R=[0,0,0,0],N=function(a,b){return b.y-a.y};if(a.visible&&(e.enabled||a._hasPointLabels)){O.prototype.drawDataLabels.apply(a);q(b,function(a){a.dataLabel&&a.visible&&z[a.half].push(a)});for(J=2;J--;){var H=[],M=[],F=z[J],L=F.length,G;if(L){a.sortByAngle(F, - J-0.5);for(y=b=0;!b&&F[y];)b=F[y]&&F[y].dataLabel&&(F[y].dataLabel.getBBox().height||21),y++;if(m>0){w=C(r+o+m,d.plotHeight);for(y=u(0,r-o-m);y<=w;y+=b)H.push(y);w=H.length;if(L>w){c=[].concat(F);c.sort(N);for(y=L;y--;)c[y].rank=y;for(y=L;y--;)F[y].rank>=w&&F.splice(y,1);L=F.length}for(y=0;y0){if(w=M.pop(),G=w.i,A=w.y,c>A&&H[G+1]!==null||ch-f&&(R[1]=u(v(B+w-h+f),R[1])),A-b/2<0?R[0]=u(v(-A+b/2),R[0]): - A+b/2>i&&(R[2]=u(v(A+b/2-i),R[2]))}}}if(Ba(R)===0||this.verifyDataLabelOverflow(R))this.placeDataLabels(),s&&g&&q(this.points,function(b){j=b.connector;x=b.labelPos;if((t=b.dataLabel)&&t._pos)K=t._attr.visibility,B=t.connX,A=t.connY,k=l?["M",B+(x[6]==="left"?5:-5),A,"C",B,A,2*x[2]-x[4],2*x[3]-x[5],x[2],x[3],"L",x[4],x[5]]:["M",B+(x[6]==="left"?5:-5),A,"L",x[2],x[3],"L",x[4],x[5]],j?(j.animate({d:k}),j.attr("visibility",K)):b.connector=j=a.chart.renderer.path(k).attr({"stroke-width":g,stroke:e.connectorColor|| - b.color||"#606060",visibility:K}).add(a.dataLabelsGroup);else if(j)b.connector=j.destroy()})}},J.pie.prototype.placeDataLabels=function(){q(this.points,function(a){var a=a.dataLabel,b;if(a)(b=a._pos)?(a.attr(a._attr),a[a.moved?"animate":"attr"](b),a.moved=!0):a&&a.attr({y:-999})})},J.pie.prototype.alignDataLabel=sa,J.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,d=c.center,e=c=c.minSize||80,f;d[0]!==null?e=u(b[2]-u(a[1],a[3]),c):(e=u(b[2]-a[1]-a[3],c),b[0]+=(a[3]- - a[1])/2);d[1]!==null?e=u(C(e,b[2]-u(a[0],a[2])),c):(e=u(C(e,b[2]-a[0]-a[2]),c),b[1]+=(a[0]-a[2])/2);ep(this.translatedThreshold,f.plotSizeY),j=p(c.inside,!!this.options.stacking);if(h&&(d=w(h),g&&(d={x:f.plotWidth- - d.y-d.height,y:f.plotHeight-d.x-d.width,width:d.height,height:d.width}),!j))g?(d.x+=i?0:d.width,d.width=0):(d.y+=i?d.height:0,d.height=0);c.align=p(c.align,!g||j?"center":i?"right":"left");c.verticalAlign=p(c.verticalAlign,g||j?"middle":i?"top":"bottom");O.prototype.alignDataLabel.call(this,a,b,c,d,e)};T=S.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,c=b.pointer,d=a.options.cursor,e=d&&{cursor:d},f=function(c){var d=c.target,e;if(b.hoverSeries!==a)a.onMouseOver();for(;d&&!e;)e=d.point, - d=d.parentNode;if(e!==t&&e!==b.hoverPoint)e.onMouseOver(c)};q(a.points,function(a){if(a.graphic)a.graphic.element.point=a;if(a.dataLabel)a.dataLabel.element.point=a});if(!a._hasTracking)q(a.trackerGroups,function(b){if(a[b]&&(a[b].addClass("highcharts-tracker").on("mouseover",f).on("mouseout",function(a){c.onTrackerMouseOut(a)}).css(e),Za))a[b].on("touchstart",f)}),a._hasTracking=!0},drawTrackerGraph:function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length, - f=a.chart,g=f.pointer,h=f.renderer,i=f.options.tooltip.snap,j=a.tracker,k=b.cursor,l=k&&{cursor:k},k=a.singlePoints,m,n=function(){if(f.hoverSeries!==a)a.onMouseOver()},o="rgba(192,192,192,"+(ba?1.0E-4:0.002)+")";if(e&&!c)for(m=e+1;m--;)d[m]==="M"&&d.splice(m+1,0,d[m+1]-i,d[m+2],"L"),(m&&d[m]==="M"||m===e)&&d.splice(m,0,"L",d[m-2]+i,d[m-1]);for(m=0;mC(k.dataMin,k.min)&&i=f.min&&c<=f.max){h=b[i+1];c=d===t?0:d+1;for(d=b[i+1]?C(u(0, - U((e.clientX+(h?h.wrappedClientX||h.clientX:g))/2)),g):g;c>=0&&c<=d;)j[c++]=e}this.tooltipPoints=j}},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=a===t?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;K(this,a?"select":"unselect")},drawTracker:T.drawTrackerGraph});r(S,{Axis:ma,Chart:Xa,Color:ya,Point:Ea,Tick:Sa,Renderer:Ya,Series:O,SVGElement:G,SVGRenderer:ta,arrayMin:Na,arrayMax:Ba,charts:W,dateFormat:bb,format:Ia,pathAnim:ub, - getOptions:function(){return L},hasBidiBug:Nb,isTouchDevice:Hb,numberFormat:Ga,seriesTypes:J,setOptions:function(a){L=w(!0,L,a);Ab();return L},addEvent:N,removeEvent:X,createElement:$,discardElement:Pa,css:A,each:q,extend:r,map:Ua,merge:w,pick:p,splat:ra,extendClass:la,pInt:z,wrap:Ma,svg:ba,canvas:ga,vml:!ba&&!ga,product:"Highcharts",version:"4.0.3"})})(); \ No newline at end of file +(function () { + function r(a, b) { + var c; + a || (a = {}); + for (c in b) a[c] = b[c]; + return a; + } + function w() { + var a, + b = arguments, + c, + d = {}, + e = function (a, b) { + var c, d; + typeof a !== 'object' && (a = {}); + for (d in b) + b.hasOwnProperty(d) && + ((c = b[d]), + (a[d] = + c && + typeof c === 'object' && + Object.prototype.toString.call(c) !== '[object Array]' && + d !== 'renderTo' && + typeof c.nodeType !== 'number' + ? e(a[d] || {}, c) + : b[d])); + return a; + }; + b[0] === !0 && ((d = b[1]), (b = Array.prototype.slice.call(b, 2))); + c = b.length; + for (a = 0; a < c; a++) d = e(d, b[a]); + return d; + } + function z(a, b) { + return parseInt(a, b || 10); + } + function Fa(a) { + return typeof a === 'string'; + } + function da(a) { + return a && typeof a === 'object'; + } + function La(a) { + return Object.prototype.toString.call(a) === '[object Array]'; + } + function ia(a) { + return typeof a === 'number'; + } + function za(a) { + return V.log(a) / V.LN10; + } + function ja(a) { + return V.pow(10, a); + } + function ka(a, b) { + for (var c = a.length; c--; ) + if (a[c] === b) { + a.splice(c, 1); + break; + } + } + function s(a) { + return a !== t && a !== null; + } + function F(a, b, c) { + var d, e; + if (Fa(b)) + s(c) + ? a.setAttribute(b, c) + : a && a.getAttribute && (e = a.getAttribute(b)); + else if (s(b) && da(b)) for (d in b) a.setAttribute(d, b[d]); + return e; + } + function ra(a) { + return La(a) ? a : [a]; + } + function p() { + var a = arguments, + b, + c, + d = a.length; + for (b = 0; b < d; b++) if (((c = a[b]), c !== t && c !== null)) return c; + } + function A(a, b) { + if (Aa && !ba && b && b.opacity !== t) + b.filter = 'alpha(opacity=' + b.opacity * 100 + ')'; + r(a.style, b); + } + function $(a, b, c, d, e) { + a = x.createElement(a); + b && r(a, b); + e && A(a, { padding: 0, border: P, margin: 0 }); + c && A(a, c); + d && d.appendChild(a); + return a; + } + function la(a, b) { + var c = function () { + return t; + }; + c.prototype = new a(); + r(c.prototype, b); + return c; + } + function Ga(a, b, c, d) { + var e = L.lang, + a = +a || 0, + f = + b === -1 + ? (a.toString().split('.')[1] || '').length + : isNaN((b = Q(b))) + ? 2 + : b, + b = c === void 0 ? e.decimalPoint : c, + d = d === void 0 ? e.thousandsSep : d, + e = a < 0 ? '-' : '', + c = String(z((a = Q(a).toFixed(f)))), + g = c.length > 3 ? c.length % 3 : 0; + return ( + e + + (g ? c.substr(0, g) + d : '') + + c.substr(g).replace(/(\d{3})(?=\d)/g, '$1' + d) + + (f + ? b + + Q(a - c) + .toFixed(f) + .slice(2) + : '') + ); + } + function Ha(a, b) { + return Array((b || 2) + 1 - String(a).length).join(0) + a; + } + function Ma(a, b, c) { + var d = a[b]; + a[b] = function () { + var a = Array.prototype.slice.call(arguments); + a.unshift(d); + return c.apply(this, a); + }; + } + function Ia(a, b) { + for ( + var c = '{', d = !1, e, f, g, h, i, j = []; + (c = a.indexOf(c)) !== -1; + + ) { + e = a.slice(0, c); + if (d) { + f = e.split(':'); + g = f.shift().split('.'); + i = g.length; + e = b; + for (h = 0; h < i; h++) e = e[g[h]]; + if (f.length) + (f = f.join(':')), + (g = /\.([0-9])/), + (h = L.lang), + (i = void 0), + /f$/.test(f) + ? ((i = (i = f.match(g)) ? i[1] : -1), + e !== null && + (e = Ga( + e, + i, + h.decimalPoint, + f.indexOf(',') > -1 ? h.thousandsSep : '' + ))) + : (e = bb(f, e)); + } + j.push(e); + a = a.slice(c + 1); + c = (d = !d) ? '}' : '{'; + } + j.push(a); + return j.join(''); + } + function lb(a) { + return V.pow(10, U(V.log(a) / V.LN10)); + } + function mb(a, b, c, d) { + var e, + c = p(c, 1); + e = a / c; + b || + ((b = [1, 2, 2.5, 5, 10]), + d && + d.allowDecimals === !1 && + (c === 1 ? (b = [1, 2, 5, 10]) : c <= 0.1 && (b = [1 / c]))); + for (d = 0; d < b.length; d++) + if (((a = b[d]), e <= (b[d] + (b[d + 1] || b[d])) / 2)) break; + a *= c; + return a; + } + function nb(a, b) { + var c = a.length, + d, + e; + for (e = 0; e < c; e++) a[e].ss_i = e; + a.sort(function (a, c) { + d = b(a, c); + return d === 0 ? a.ss_i - c.ss_i : d; + }); + for (e = 0; e < c; e++) delete a[e].ss_i; + } + function Na(a) { + for (var b = a.length, c = a[0]; b--; ) a[b] < c && (c = a[b]); + return c; + } + function Ba(a) { + for (var b = a.length, c = a[0]; b--; ) a[b] > c && (c = a[b]); + return c; + } + function Oa(a, b) { + for (var c in a) + a[c] && a[c] !== b && a[c].destroy && a[c].destroy(), delete a[c]; + } + function Pa(a) { + cb || (cb = $(Ja)); + a && cb.appendChild(a); + cb.innerHTML = ''; + } + function ea(a) { + return parseFloat(a.toPrecision(14)); + } + function Qa(a, b) { + va = p(a, b.animation); + } + function Ab() { + var a = L.global.useUTC, + b = a ? 'getUTC' : 'get', + c = a ? 'setUTC' : 'set'; + Ra = ((a && L.global.timezoneOffset) || 0) * 6e4; + db = a + ? Date.UTC + : function (a, b, c, g, h, i) { + return new Date(a, b, p(c, 1), p(g, 0), p(h, 0), p(i, 0)).getTime(); + }; + ob = b + 'Minutes'; + pb = b + 'Hours'; + qb = b + 'Day'; + Wa = b + 'Date'; + eb = b + 'Month'; + fb = b + 'FullYear'; + Bb = c + 'Minutes'; + Cb = c + 'Hours'; + rb = c + 'Date'; + Db = c + 'Month'; + Eb = c + 'FullYear'; + } + function G() {} + function Sa(a, b, c, d) { + this.axis = a; + this.pos = b; + this.type = c || ''; + this.isNew = !0; + !c && !d && this.addLabel(); + } + function ma() { + this.init.apply(this, arguments); + } + function Xa() { + this.init.apply(this, arguments); + } + function Fb(a, b, c, d, e) { + var f = a.chart.inverted; + this.axis = a; + this.isNegative = c; + this.options = b; + this.x = d; + this.total = null; + this.points = {}; + this.stack = e; + this.alignOptions = { + align: b.align || (f ? (c ? 'left' : 'right') : 'center'), + verticalAlign: b.verticalAlign || (f ? 'middle' : c ? 'bottom' : 'top'), + y: p(b.y, f ? 4 : c ? 14 : -6), + x: p(b.x, f ? (c ? -6 : 6) : 0) + }; + this.textAlign = b.textAlign || (f ? (c ? 'right' : 'left') : 'center'); + } + var t, + x = document, + H = window, + V = Math, + v = V.round, + U = V.floor, + Ka = V.ceil, + u = V.max, + C = V.min, + Q = V.abs, + aa = V.cos, + fa = V.sin, + na = V.PI, + Ca = (na * 2) / 360, + wa = navigator.userAgent, + Gb = H.opera, + Aa = /msie/i.test(wa) && !Gb, + gb = x.documentMode === 8, + sb = /AppleWebKit/.test(wa), + Ta = /Firefox/.test(wa), + Hb = /(Mobile|Android|Windows Phone)/.test(wa), + xa = 'http://www.w3.org/2000/svg', + ba = !!x.createElementNS && !!x.createElementNS(xa, 'svg').createSVGRect, + Nb = Ta && parseInt(wa.split('Firefox/')[1], 10) < 4, + ga = !ba && !Aa && !!x.createElement('canvas').getContext, + Ya, + Za, + Ib = {}, + tb = 0, + cb, + L, + bb, + va, + ub, + B, + oa, + sa = function () { + return t; + }, + W = [], + $a = 0, + Ja = 'div', + P = 'none', + Ob = /^[0-9]+$/, + Pb = 'stroke-width', + db, + Ra, + ob, + pb, + qb, + Wa, + eb, + fb, + Bb, + Cb, + rb, + Db, + Eb, + J = {}, + S; + H.Highcharts ? oa(16, !0) : (S = H.Highcharts = {}); + bb = function (a, b, c) { + if (!s(b) || isNaN(b)) return 'Invalid date'; + var a = p(a, '%Y-%m-%d %H:%M:%S'), + d = new Date(b - Ra), + e, + f = d[pb](), + g = d[qb](), + h = d[Wa](), + i = d[eb](), + j = d[fb](), + k = L.lang, + l = k.weekdays, + d = r( + { + a: l[g].substr(0, 3), + A: l[g], + d: Ha(h), + e: h, + b: k.shortMonths[i], + B: k.months[i], + m: Ha(i + 1), + y: j.toString().substr(2, 2), + Y: j, + H: Ha(f), + I: Ha(f % 12 || 12), + l: f % 12 || 12, + M: Ha(d[ob]()), + p: f < 12 ? 'AM' : 'PM', + P: f < 12 ? 'am' : 'pm', + S: Ha(d.getSeconds()), + L: Ha(v(b % 1e3), 3) + }, + S.dateFormats + ); + for (e in d) + for (; a.indexOf('%' + e) !== -1; ) + a = a.replace('%' + e, typeof d[e] === 'function' ? d[e](b) : d[e]); + return c ? a.substr(0, 1).toUpperCase() + a.substr(1) : a; + }; + oa = function (a, b) { + var c = 'Highcharts error #' + a + ': www.highcharts.com/errors/' + a; + if (b) throw c; + H.console && console.log(c); + }; + B = { + millisecond: 1, + second: 1e3, + minute: 6e4, + hour: 36e5, + day: 864e5, + week: 6048e5, + month: 26784e5, + year: 31556952e3 + }; + ub = { + init: function (a, b, c) { + var b = b || '', + d = a.shift, + e = b.indexOf('C') > -1, + f = e ? 7 : 3, + g, + b = b.split(' '), + c = [].concat(c), + h, + i, + j = function (a) { + for (g = a.length; g--; ) + a[g] === 'M' && + a.splice(g + 1, 0, a[g + 1], a[g + 2], a[g + 1], a[g + 2]); + }; + e && (j(b), j(c)); + a.isArea && + ((h = b.splice(b.length - 6, 6)), (i = c.splice(c.length - 6, 6))); + if (d <= c.length / f && b.length === c.length) + for (; d--; ) c = [].concat(c).splice(0, f).concat(c); + a.shift = 0; + if (b.length) + for (a = c.length; b.length < a; ) + (d = [].concat(b).splice(b.length - f, f)), + e && ((d[f - 6] = d[f - 2]), (d[f - 5] = d[f - 1])), + (b = b.concat(d)); + h && ((b = b.concat(h)), (c = c.concat(i))); + return [b, c]; + }, + step: function (a, b, c, d) { + var e = [], + f = a.length; + if (c === 1) e = d; + else if (f === b.length && c < 1) + for (; f--; ) + (d = parseFloat(a[f])), + (e[f] = isNaN(d) ? a[f] : c * parseFloat(b[f] - d) + d); + else e = b; + return e; + } + }; + (function (a) { + H.HighchartsAdapter = + H.HighchartsAdapter || + (a && { + init: function (b) { + var c = a.fx, + d = c.step, + e, + f = a.Tween, + g = f && f.propHooks; + e = a.cssHooks.opacity; + a.extend(a.easing, { + easeOutQuad: function (a, b, c, d, e) { + return -d * (b /= e) * (b - 2) + c; + } + }); + a.each( + ['cur', '_default', 'width', 'height', 'opacity'], + function (a, b) { + var e = d, + k; + b === 'cur' + ? (e = c.prototype) + : b === '_default' && f && ((e = g[b]), (b = 'set')); + (k = e[b]) && + (e[b] = function (c) { + var d, + c = a ? c : this; + if (c.prop !== 'align') + return ( + (d = c.elem), + d.attr + ? d.attr(c.prop, b === 'cur' ? t : c.now) + : k.apply(this, arguments) + ); + }); + } + ); + Ma(e, 'get', function (a, b, c) { + return b.attr ? b.opacity || 0 : a.call(this, b, c); + }); + e = function (a) { + var c = a.elem, + d; + if (!a.started) + (d = b.init(c, c.d, c.toD)), + (a.start = d[0]), + (a.end = d[1]), + (a.started = !0); + c.attr('d', b.step(a.start, a.end, a.pos, c.toD)); + }; + f ? (g.d = { set: e }) : (d.d = e); + this.each = Array.prototype.forEach + ? function (a, b) { + return Array.prototype.forEach.call(a, b); + } + : function (a, b) { + var c, + d = a.length; + for (c = 0; c < d; c++) + if (b.call(a[c], a[c], c, a) === !1) return c; + }; + a.fn.highcharts = function () { + var a = 'Chart', + b = arguments, + c, + d; + if (this[0]) { + Fa(b[0]) && ((a = b[0]), (b = Array.prototype.slice.call(b, 1))); + c = b[0]; + if (c !== t) + (c.chart = c.chart || {}), + (c.chart.renderTo = this[0]), + new S[a](c, b[1]), + (d = this); + c === t && (d = W[F(this[0], 'data-highcharts-chart')]); + } + return d; + }; + }, + getScript: a.getScript, + inArray: a.inArray, + adapterRun: function (b, c) { + return a(b)[c](); + }, + grep: a.grep, + map: function (a, c) { + for (var d = [], e = 0, f = a.length; e < f; e++) + d[e] = c.call(a[e], a[e], e, a); + return d; + }, + offset: function (b) { + return a(b).offset(); + }, + addEvent: function (b, c, d) { + a(b).bind(c, d); + }, + removeEvent: function (b, c, d) { + var e = x.removeEventListener ? 'removeEventListener' : 'detachEvent'; + x[e] && b && !b[e] && (b[e] = function () {}); + a(b).unbind(c, d); + }, + fireEvent: function (b, c, d, e) { + var f = a.Event(c), + g = 'detached' + c, + h; + !Aa && d && (delete d.layerX, delete d.layerY, delete d.returnValue); + r(f, d); + b[c] && ((b[g] = b[c]), (b[c] = null)); + a.each(['preventDefault', 'stopPropagation'], function (a, b) { + var c = f[b]; + f[b] = function () { + try { + c.call(f); + } catch (a) { + b === 'preventDefault' && (h = !0); + } + }; + }); + a(b).trigger(f); + b[g] && ((b[c] = b[g]), (b[g] = null)); + e && !f.isDefaultPrevented() && !h && e(f); + }, + washMouseEvent: function (a) { + var c = a.originalEvent || a; + if (c.pageX === t) (c.pageX = a.pageX), (c.pageY = a.pageY); + return c; + }, + animate: function (b, c, d) { + var e = a(b); + if (!b.style) b.style = {}; + if (c.d) (b.toD = c.d), (c.d = 1); + e.stop(); + c.opacity !== t && b.attr && (c.opacity += 'px'); + e.animate(c, d); + }, + stop: function (b) { + a(b).stop(); + } + }); + })(H.jQuery); + var T = H.HighchartsAdapter, + M = T || {}; + T && T.init.call(T, ub); + var hb = M.adapterRun, + Qb = M.getScript, + Da = M.inArray, + q = M.each, + vb = M.grep, + Rb = M.offset, + Ua = M.map, + N = M.addEvent, + X = M.removeEvent, + K = M.fireEvent, + Sb = M.washMouseEvent, + ib = M.animate, + ab = M.stop, + M = { + enabled: !0, + x: 0, + y: 15, + style: { color: '#606060', cursor: 'default', fontSize: '11px' } + }; + L = { + colors: + '#7cb5ec,#434348,#90ed7d,#f7a35c,#8085e9,#f15c80,#e4d354,#8085e8,#8d4653,#91e8e1'.split( + ',' + ), + symbols: ['circle', 'diamond', 'square', 'triangle', 'triangle-down'], + lang: { + loading: 'Loading...', + months: + 'January,February,March,April,May,June,July,August,September,October,November,December'.split( + ',' + ), + shortMonths: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','), + weekdays: + 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','), + decimalPoint: '.', + numericSymbols: 'k,M,G,T,P,E'.split(','), + resetZoom: 'Reset zoom', + resetZoomTitle: 'Reset zoom level 1:1', + thousandsSep: ',' + }, + global: { + useUTC: !0, + canvasToolsURL: + 'http://code.highcharts.com/4.0.3/modules/canvas-tools.js', + VMLRadialGradientURL: + 'http://code.highcharts.com/4.0.3/gfx/vml-radial-gradient.png' + }, + chart: { + borderColor: '#4572A7', + borderRadius: 0, + defaultSeriesType: 'line', + ignoreHiddenSeries: !0, + spacing: [10, 10, 15, 10], + backgroundColor: '#FFFFFF', + plotBorderColor: '#C0C0C0', + resetZoomButton: { + theme: { zIndex: 20 }, + position: { align: 'right', x: -10, y: 10 } + } + }, + title: { + text: 'Chart title', + align: 'center', + margin: 15, + style: { color: '#333333', fontSize: '18px' } + }, + subtitle: { text: '', align: 'center', style: { color: '#555555' } }, + plotOptions: { + line: { + allowPointSelect: !1, + showCheckbox: !1, + animation: { duration: 1e3 }, + events: {}, + lineWidth: 2, + marker: { + lineWidth: 0, + radius: 4, + lineColor: '#FFFFFF', + states: { + hover: { enabled: !0, lineWidthPlus: 1, radiusPlus: 2 }, + select: { fillColor: '#FFFFFF', lineColor: '#000000', lineWidth: 2 } + } + }, + point: { events: {} }, + dataLabels: w(M, { + align: 'center', + enabled: !1, + formatter: function () { + return this.y === null ? '' : Ga(this.y, -1); + }, + verticalAlign: 'bottom', + y: 0 + }), + cropThreshold: 300, + pointRange: 0, + states: { + hover: { + lineWidthPlus: 1, + marker: {}, + halo: { size: 10, opacity: 0.25 } + }, + select: { marker: {} } + }, + stickyTracking: !0, + turboThreshold: 1e3 + } + }, + labels: { style: { position: 'absolute', color: '#3E576F' } }, + legend: { + enabled: !0, + align: 'center', + layout: 'horizontal', + labelFormatter: function () { + return this.name; + }, + borderColor: '#909090', + borderRadius: 0, + navigation: { activeColor: '#274b6d', inactiveColor: '#CCC' }, + shadow: !1, + itemStyle: { color: '#333333', fontSize: '12px', fontWeight: 'bold' }, + itemHoverStyle: { color: '#000' }, + itemHiddenStyle: { color: '#CCC' }, + itemCheckboxStyle: { + position: 'absolute', + width: '13px', + height: '13px' + }, + symbolPadding: 5, + verticalAlign: 'bottom', + x: 0, + y: 0, + title: { style: { fontWeight: 'bold' } } + }, + loading: { + labelStyle: { fontWeight: 'bold', position: 'relative', top: '45%' }, + style: { + position: 'absolute', + backgroundColor: 'white', + opacity: 0.5, + textAlign: 'center' + } + }, + tooltip: { + enabled: !0, + animation: ba, + backgroundColor: 'rgba(249, 249, 249, .85)', + borderWidth: 1, + borderRadius: 3, + dateTimeLabelFormats: { + millisecond: '%A, %b %e, %H:%M:%S.%L', + second: '%A, %b %e, %H:%M:%S', + minute: '%A, %b %e, %H:%M', + hour: '%A, %b %e, %H:%M', + day: '%A, %b %e, %Y', + week: 'Week from %A, %b %e, %Y', + month: '%B %Y', + year: '%Y' + }, + headerFormat: '{point.key}
    ', + pointFormat: + ' {series.name}: {point.y}
    ', + shadow: !0, + snap: Hb ? 25 : 10, + style: { + color: '#333333', + cursor: 'default', + fontSize: '12px', + padding: '8px', + whiteSpace: 'nowrap' + } + }, + credits: { + enabled: !0, + text: 'Highcharts.com', + href: 'http://www.highcharts.com', + position: { align: 'right', x: -10, verticalAlign: 'bottom', y: -5 }, + style: { cursor: 'pointer', color: '#909090', fontSize: '9px' } + } + }; + var ca = L.plotOptions, + T = ca.line; + Ab(); + var Tb = + /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/, + Ub = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/, + Vb = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, + ya = function (a) { + var b = [], + c, + d; + (function (a) { + a && a.stops + ? (d = Ua(a.stops, function (a) { + return ya(a[1]); + })) + : (c = Tb.exec(a)) + ? (b = [z(c[1]), z(c[2]), z(c[3]), parseFloat(c[4], 10)]) + : (c = Ub.exec(a)) + ? (b = [z(c[1], 16), z(c[2], 16), z(c[3], 16), 1]) + : (c = Vb.exec(a)) && (b = [z(c[1]), z(c[2]), z(c[3]), 1]); + })(a); + return { + get: function (c) { + var f; + d + ? ((f = w(a)), + (f.stops = [].concat(f.stops)), + q(d, function (a, b) { + f.stops[b] = [f.stops[b][0], a.get(c)]; + })) + : (f = + b && !isNaN(b[0]) + ? c === 'rgb' + ? 'rgb(' + b[0] + ',' + b[1] + ',' + b[2] + ')' + : c === 'a' + ? b[3] + : 'rgba(' + b.join(',') + ')' + : a); + return f; + }, + brighten: function (a) { + if (d) + q(d, function (b) { + b.brighten(a); + }); + else if (ia(a) && a !== 0) { + var c; + for (c = 0; c < 3; c++) + (b[c] += z(a * 255)), + b[c] < 0 && (b[c] = 0), + b[c] > 255 && (b[c] = 255); + } + return this; + }, + rgba: b, + setOpacity: function (a) { + b[3] = a; + return this; + } + }; + }; + G.prototype = { + opacity: 1, + textProps: + 'fontSize,fontWeight,fontFamily,color,lineHeight,width,textDecoration,textShadow,HcTextStroke'.split( + ',' + ), + init: function (a, b) { + this.element = b === 'span' ? $(b) : x.createElementNS(xa, b); + this.renderer = a; + }, + animate: function (a, b, c) { + b = p(b, va, !0); + ab(this); + if (b) { + b = w(b, {}); + if (c) b.complete = c; + ib(this, a, b); + } else this.attr(a), c && c(); + return this; + }, + colorGradient: function (a, b, c) { + var d = this.renderer, + e, + f, + g, + h, + i, + j, + k, + l, + m, + n, + o = []; + a.linearGradient + ? (f = 'linearGradient') + : a.radialGradient && (f = 'radialGradient'); + if (f) { + g = a[f]; + h = d.gradients; + j = a.stops; + m = c.radialReference; + La(g) && + (a[f] = g = + { + x1: g[0], + y1: g[1], + x2: g[2], + y2: g[3], + gradientUnits: 'userSpaceOnUse' + }); + f === 'radialGradient' && + m && + !s(g.gradientUnits) && + (g = w(g, { + cx: m[0] - m[2] / 2 + g.cx * m[2], + cy: m[1] - m[2] / 2 + g.cy * m[2], + r: g.r * m[2], + gradientUnits: 'userSpaceOnUse' + })); + for (n in g) n !== 'id' && o.push(n, g[n]); + for (n in j) o.push(j[n]); + o = o.join(','); + h[o] + ? (a = h[o].attr('id')) + : ((g.id = a = 'highcharts-' + tb++), + (h[o] = i = d.createElement(f).attr(g).add(d.defs)), + (i.stops = []), + q(j, function (a) { + a[1].indexOf('rgba') === 0 + ? ((e = ya(a[1])), (k = e.get('rgb')), (l = e.get('a'))) + : ((k = a[1]), (l = 1)); + a = d + .createElement('stop') + .attr({ offset: a[0], 'stop-color': k, 'stop-opacity': l }) + .add(i); + i.stops.push(a); + })); + c.setAttribute(b, 'url(' + d.url + '#' + a + ')'); + } + }, + attr: function (a, b) { + var c, + d, + e = this.element, + f, + g = this, + h; + typeof a === 'string' && b !== t && ((c = a), (a = {}), (a[c] = b)); + if (typeof a === 'string') + g = (this[a + 'Getter'] || this._defaultGetter).call(this, a, e); + else { + for (c in a) { + d = a[c]; + h = !1; + this.symbolName && + /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(c) && + (f || (this.symbolAttr(a), (f = !0)), (h = !0)); + if (this.rotation && (c === 'x' || c === 'y')) this.doTransform = !0; + h || (this[c + 'Setter'] || this._defaultSetter).call(this, d, c, e); + this.shadows && + /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(c) && + this.updateShadows(c, d); + } + if (this.doTransform) this.updateTransform(), (this.doTransform = !1); + } + return g; + }, + updateShadows: function (a, b) { + for (var c = this.shadows, d = c.length; d--; ) + c[d].setAttribute( + a, + a === 'height' + ? u(b - (c[d].cutHeight || 0), 0) + : a === 'd' + ? this.d + : b + ); + }, + addClass: function (a) { + var b = this.element, + c = F(b, 'class') || ''; + c.indexOf(a) === -1 && F(b, 'class', c + ' ' + a); + return this; + }, + symbolAttr: function (a) { + var b = this; + q( + 'x,y,r,start,end,width,height,innerR,anchorX,anchorY'.split(','), + function (c) { + b[c] = p(a[c], b[c]); + } + ); + b.attr({ + d: b.renderer.symbols[b.symbolName](b.x, b.y, b.width, b.height, b) + }); + }, + clip: function (a) { + return this.attr( + 'clip-path', + a ? 'url(' + this.renderer.url + '#' + a.id + ')' : P + ); + }, + crisp: function (a) { + var b, + c = {}, + d, + e = a.strokeWidth || this.strokeWidth || 0; + d = (v(e) % 2) / 2; + a.x = U(a.x || this.x || 0) + d; + a.y = U(a.y || this.y || 0) + d; + a.width = U((a.width || this.width || 0) - 2 * d); + a.height = U((a.height || this.height || 0) - 2 * d); + a.strokeWidth = e; + for (b in a) this[b] !== a[b] && (this[b] = c[b] = a[b]); + return c; + }, + css: function (a) { + var b = this.styles, + c = {}, + d = this.element, + e, + f, + g = ''; + e = !b; + if (a && a.color) a.fill = a.color; + if (b) for (f in a) a[f] !== b[f] && ((c[f] = a[f]), (e = !0)); + if (e) { + e = this.textWidth = + a && a.width && d.nodeName.toLowerCase() === 'text' && z(a.width); + b && (a = r(b, c)); + this.styles = a; + e && (ga || (!ba && this.renderer.forExport)) && delete a.width; + if (Aa && !ba) A(this.element, a); + else { + b = function (a, b) { + return '-' + b.toLowerCase(); + }; + for (f in a) g += f.replace(/([A-Z])/g, b) + ':' + a[f] + ';'; + F(d, 'style', g); + } + e && this.added && this.renderer.buildText(this); + } + return this; + }, + on: function (a, b) { + var c = this, + d = c.element; + Za && a === 'click' + ? ((d.ontouchstart = function (a) { + c.touchEventFired = Date.now(); + a.preventDefault(); + b.call(d, a); + }), + (d.onclick = function (a) { + (wa.indexOf('Android') === -1 || + Date.now() - (c.touchEventFired || 0) > 1100) && + b.call(d, a); + })) + : (d['on' + a] = b); + return this; + }, + setRadialReference: function (a) { + this.element.radialReference = a; + return this; + }, + translate: function (a, b) { + return this.attr({ translateX: a, translateY: b }); + }, + invert: function () { + this.inverted = !0; + this.updateTransform(); + return this; + }, + updateTransform: function () { + var a = this.translateX || 0, + b = this.translateY || 0, + c = this.scaleX, + d = this.scaleY, + e = this.inverted, + f = this.rotation, + g = this.element; + e && ((a += this.attr('width')), (b += this.attr('height'))); + a = ['translate(' + a + ',' + b + ')']; + e + ? a.push('rotate(90) scale(-1,1)') + : f && + a.push( + 'rotate(' + + f + + ' ' + + (g.getAttribute('x') || 0) + + ' ' + + (g.getAttribute('y') || 0) + + ')' + ); + (s(c) || s(d)) && a.push('scale(' + p(c, 1) + ' ' + p(d, 1) + ')'); + a.length && g.setAttribute('transform', a.join(' ')); + }, + toFront: function () { + var a = this.element; + a.parentNode.appendChild(a); + return this; + }, + align: function (a, b, c) { + var d, + e, + f, + g, + h = {}; + e = this.renderer; + f = e.alignedObjects; + if (a) { + if (((this.alignOptions = a), (this.alignByTranslate = b), !c || Fa(c))) + (this.alignTo = d = c || 'renderer'), + ka(f, this), + f.push(this), + (c = null); + } else + (a = this.alignOptions), + (b = this.alignByTranslate), + (d = this.alignTo); + c = p(c, e[d], e); + d = a.align; + e = a.verticalAlign; + f = (c.x || 0) + (a.x || 0); + g = (c.y || 0) + (a.y || 0); + if (d === 'right' || d === 'center') + f += (c.width - (a.width || 0)) / { right: 1, center: 2 }[d]; + h[b ? 'translateX' : 'x'] = v(f); + if (e === 'bottom' || e === 'middle') + g += (c.height - (a.height || 0)) / ({ bottom: 1, middle: 2 }[e] || 1); + h[b ? 'translateY' : 'y'] = v(g); + this[this.placed ? 'animate' : 'attr'](h); + this.placed = !0; + this.alignAttr = h; + return this; + }, + getBBox: function () { + var a = this.bBox, + b = this.renderer, + c, + d, + e = this.rotation; + c = this.element; + var f = this.styles, + g = e * Ca; + d = this.textStr; + var h; + if (d === '' || Ob.test(d)) + h = + 'num.' + + d.toString().length + + (f ? '|' + f.fontSize + '|' + f.fontFamily : ''); + h && (a = b.cache[h]); + if (!a) { + if (c.namespaceURI === xa || b.forExport) { + try { + a = c.getBBox + ? r({}, c.getBBox()) + : { width: c.offsetWidth, height: c.offsetHeight }; + } catch (i) {} + if (!a || a.width < 0) a = { width: 0, height: 0 }; + } else a = this.htmlGetBBox(); + if (b.isSVG) { + c = a.width; + d = a.height; + if (Aa && f && f.fontSize === '11px' && d.toPrecision(3) === '16.9') + a.height = d = 14; + if (e) + (a.width = Q(d * fa(g)) + Q(c * aa(g))), + (a.height = Q(d * aa(g)) + Q(c * fa(g))); + } + this.bBox = a; + h && (b.cache[h] = a); + } + return a; + }, + show: function (a) { + return a && this.element.namespaceURI === xa + ? (this.element.removeAttribute('visibility'), this) + : this.attr({ visibility: a ? 'inherit' : 'visible' }); + }, + hide: function () { + return this.attr({ visibility: 'hidden' }); + }, + fadeOut: function (a) { + var b = this; + b.animate( + { opacity: 0 }, + { + duration: a || 150, + complete: function () { + b.hide(); + } + } + ); + }, + add: function (a) { + var b = this.renderer, + c = a || b, + d = c.element || b.box, + e = this.element, + f = this.zIndex, + g, + h; + if (a) this.parentGroup = a; + this.parentInverted = a && a.inverted; + this.textStr !== void 0 && b.buildText(this); + if (f) (c.handleZ = !0), (f = z(f)); + if (c.handleZ) { + a = d.childNodes; + for (g = 0; g < a.length; g++) + if ( + ((b = a[g]), + (c = F(b, 'zIndex')), + b !== e && (z(c) > f || (!s(f) && s(c)))) + ) { + d.insertBefore(e, b); + h = !0; + break; + } + } + h || d.appendChild(e); + this.added = !0; + if (this.onAdd) this.onAdd(); + return this; + }, + safeRemoveChild: function (a) { + var b = a.parentNode; + b && b.removeChild(a); + }, + destroy: function () { + var a = this, + b = a.element || {}, + c = a.shadows, + d = a.renderer.isSVG && b.nodeName === 'SPAN' && a.parentGroup, + e, + f; + b.onclick = b.onmouseout = b.onmouseover = b.onmousemove = b.point = null; + ab(a); + if (a.clipPath) a.clipPath = a.clipPath.destroy(); + if (a.stops) { + for (f = 0; f < a.stops.length; f++) a.stops[f] = a.stops[f].destroy(); + a.stops = null; + } + a.safeRemoveChild(b); + for ( + c && + q(c, function (b) { + a.safeRemoveChild(b); + }); + d && d.div && d.div.childNodes.length === 0; + + ) + (b = d.parentGroup), a.safeRemoveChild(d.div), delete d.div, (d = b); + a.alignTo && ka(a.renderer.alignedObjects, a); + for (e in a) delete a[e]; + return null; + }, + shadow: function (a, b, c) { + var d = [], + e, + f, + g = this.element, + h, + i, + j, + k; + if (a) { + i = p(a.width, 3); + j = (a.opacity || 0.15) / i; + k = this.parentInverted + ? '(-1,-1)' + : '(' + p(a.offsetX, 1) + ', ' + p(a.offsetY, 1) + ')'; + for (e = 1; e <= i; e++) { + f = g.cloneNode(0); + h = i * 2 + 1 - 2 * e; + F(f, { + isShadow: 'true', + stroke: a.color || 'black', + 'stroke-opacity': j * e, + 'stroke-width': h, + transform: 'translate' + k, + fill: P + }); + if (c) F(f, 'height', u(F(f, 'height') - h, 0)), (f.cutHeight = h); + b ? b.element.appendChild(f) : g.parentNode.insertBefore(f, g); + d.push(f); + } + this.shadows = d; + } + return this; + }, + xGetter: function (a) { + this.element.nodeName === 'circle' && (a = { x: 'cx', y: 'cy' }[a] || a); + return this._defaultGetter(a); + }, + _defaultGetter: function (a) { + a = p(this[a], this.element ? this.element.getAttribute(a) : null, 0); + /^[\-0-9\.]+$/.test(a) && (a = parseFloat(a)); + return a; + }, + dSetter: function (a, b, c) { + a && a.join && (a = a.join(' ')); + /(NaN| {2}|^$)/.test(a) && (a = 'M 0 0'); + c.setAttribute(b, a); + this[b] = a; + }, + dashstyleSetter: function (a) { + var b; + if ((a = a && a.toLowerCase())) { + a = a + .replace('shortdashdotdot', '3,1,1,1,1,1,') + .replace('shortdashdot', '3,1,1,1') + .replace('shortdot', '1,1,') + .replace('shortdash', '3,1,') + .replace('longdash', '8,3,') + .replace(/dot/g, '1,3,') + .replace('dash', '4,3,') + .replace(/,$/, '') + .replace('solid', 1) + .split(','); + for (b = a.length; b--; ) a[b] = z(a[b]) * this['stroke-width']; + a = a.join(','); + this.element.setAttribute('stroke-dasharray', a); + } + }, + alignSetter: function (a) { + this.element.setAttribute( + 'text-anchor', + { left: 'start', center: 'middle', right: 'end' }[a] + ); + }, + opacitySetter: function (a, b, c) { + this[b] = a; + c.setAttribute(b, a); + }, + titleSetter: function (a) { + var b = this.element.getElementsByTagName('title')[0]; + b || ((b = x.createElementNS(xa, 'title')), this.element.appendChild(b)); + b.textContent = a; + }, + textSetter: function (a) { + if (a !== this.textStr) + delete this.bBox, + (this.textStr = a), + this.added && this.renderer.buildText(this); + }, + fillSetter: function (a, b, c) { + typeof a === 'string' + ? c.setAttribute(b, a) + : a && this.colorGradient(a, b, c); + }, + zIndexSetter: function (a, b, c) { + c.setAttribute(b, a); + this[b] = a; + }, + _defaultSetter: function (a, b, c) { + c.setAttribute(b, a); + } + }; + G.prototype.yGetter = G.prototype.xGetter; + G.prototype.translateXSetter = + G.prototype.translateYSetter = + G.prototype.rotationSetter = + G.prototype.verticalAlignSetter = + G.prototype.scaleXSetter = + G.prototype.scaleYSetter = + function (a, b) { + this[b] = a; + this.doTransform = !0; + }; + G.prototype['stroke-widthSetter'] = G.prototype.strokeSetter = function ( + a, + b, + c + ) { + this[b] = a; + if (this.stroke && this['stroke-width']) + (this.strokeWidth = this['stroke-width']), + G.prototype.fillSetter.call(this, this.stroke, 'stroke', c), + c.setAttribute('stroke-width', this['stroke-width']), + (this.hasStroke = !0); + else if (b === 'stroke-width' && a === 0 && this.hasStroke) + c.removeAttribute('stroke'), (this.hasStroke = !1); + }; + var ta = function () { + this.init.apply(this, arguments); + }; + ta.prototype = { + Element: G, + init: function (a, b, c, d, e) { + var f = location, + g, + d = this.createElement('svg') + .attr({ version: '1.1' }) + .css(this.getStyle(d)); + g = d.element; + a.appendChild(g); + a.innerHTML.indexOf('xmlns') === -1 && F(g, 'xmlns', xa); + this.isSVG = !0; + this.box = g; + this.boxWrapper = d; + this.alignedObjects = []; + this.url = + (Ta || sb) && x.getElementsByTagName('base').length + ? f.href + .replace(/#.*?$/, '') + .replace(/([\('\)])/g, '\\$1') + .replace(/ /g, '%20') + : ''; + this.createElement('desc') + .add() + .element.appendChild(x.createTextNode('Created with Highcharts 4.0.3')); + this.defs = this.createElement('defs').add(); + this.forExport = e; + this.gradients = {}; + this.cache = {}; + this.setSize(b, c, !1); + var h; + if (Ta && a.getBoundingClientRect) + (this.subPixelFix = b = + function () { + A(a, { left: 0, top: 0 }); + h = a.getBoundingClientRect(); + A(a, { + left: Ka(h.left) - h.left + 'px', + top: Ka(h.top) - h.top + 'px' + }); + }), + b(), + N(H, 'resize', b); + }, + getStyle: function (a) { + return (this.style = r( + { + fontFamily: + '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', + fontSize: '12px' + }, + a + )); + }, + isHidden: function () { + return !this.boxWrapper.getBBox().width; + }, + destroy: function () { + var a = this.defs; + this.box = null; + this.boxWrapper = this.boxWrapper.destroy(); + Oa(this.gradients || {}); + this.gradients = null; + if (a) this.defs = a.destroy(); + this.subPixelFix && X(H, 'resize', this.subPixelFix); + return (this.alignedObjects = null); + }, + createElement: function (a) { + var b = new this.Element(); + b.init(this, a); + return b; + }, + draw: function () {}, + buildText: function (a) { + for ( + var b = a.element, + c = this, + d = c.forExport, + e = p(a.textStr, '').toString(), + f = e.indexOf('<') !== -1, + g = b.childNodes, + h, + i, + j = F(b, 'x'), + k = a.styles, + l = a.textWidth, + m = k && k.lineHeight, + n = k && k.HcTextStroke, + o = g.length, + Y = function (a) { + return m + ? z(m) + : c.fontMetrics( + /(px|em)$/.test(a && a.style.fontSize) + ? a.style.fontSize + : (k && k.fontSize) || c.style.fontSize || 12, + a + ).h; + }; + o--; + + ) + b.removeChild(g[o]); + !f && !n && e.indexOf(' ') === -1 + ? b.appendChild(x.createTextNode(e)) + : ((h = /<.*style="([^"]+)".*>/), + (i = /<.*href="(http[^"]+)".*>/), + l && !a.added && this.box.appendChild(b), + (e = f + ? e + .replace(/<(b|strong)>/g, '') + .replace(/<(i|em)>/g, '') + .replace(/
    /g, '') + .split(//g) + : [e]), + e[e.length - 1] === '' && e.pop(), + q(e, function (e, f) { + var g, + m = 0, + e = e + .replace(//g, '|||'); + g = e.split('|||'); + q(g, function (e) { + if (e !== '' || g.length === 1) { + var n = {}, + o = x.createElementNS(xa, 'tspan'), + p; + h.test(e) && + ((p = e + .match(h)[1] + .replace(/(;| |^)color([ :])/, '$1fill$2')), + F(o, 'style', p)); + i.test(e) && + !d && + (F(o, 'onclick', 'location.href="' + e.match(i)[1] + '"'), + A(o, { cursor: 'pointer' })); + e = (e.replace(/<(.|\n)*?>/g, '') || ' ') + .replace(/</g, '<') + .replace(/>/g, '>'); + if (e !== ' ') { + o.appendChild(x.createTextNode(e)); + if (m) n.dx = 0; + else if (f && j !== null) n.x = j; + F(o, n); + b.appendChild(o); + !m && + f && + (!ba && d && A(o, { display: 'block' }), F(o, 'dy', Y(o))); + if (l) + for ( + var e = e.replace(/([^\^])-/g, '$1- ').split(' '), + n = + g.length > 1 || + (e.length > 1 && k.whiteSpace !== 'nowrap'), + q, + E, + s = k.HcHeight, + u = [], + t = Y(o), + Kb = 1; + n && (e.length || u.length); + + ) + delete a.bBox, + (q = a.getBBox()), + (E = q.width), + !ba && + c.forExport && + (E = c.measureSpanWidth(o.firstChild.data, a.styles)), + (q = E > l), + !q || e.length === 1 + ? ((e = u), + (u = []), + e.length && + (Kb++, + s && Kb * t > s + ? ((e = ['...']), a.attr('title', a.textStr)) + : ((o = x.createElementNS(xa, 'tspan')), + F(o, { dy: t, x: j }), + p && F(o, 'style', p), + b.appendChild(o))), + E > l && (l = E)) + : (o.removeChild(o.firstChild), u.unshift(e.pop())), + e.length && + o.appendChild( + x.createTextNode(e.join(' ').replace(/- /g, '-')) + ); + m++; + } + } + }); + })); + }, + button: function (a, b, c, d, e, f, g, h, i) { + var j = this.label(a, b, c, i, null, null, null, null, 'button'), + k = 0, + l, + m, + n, + o, + p, + q, + a = { x1: 0, y1: 0, x2: 0, y2: 1 }, + e = w( + { + 'stroke-width': 1, + stroke: '#CCCCCC', + fill: { + linearGradient: a, + stops: [ + [0, '#FEFEFE'], + [1, '#F6F6F6'] + ] + }, + r: 2, + padding: 5, + style: { color: 'black' } + }, + e + ); + n = e.style; + delete e.style; + f = w( + e, + { + stroke: '#68A', + fill: { + linearGradient: a, + stops: [ + [0, '#FFF'], + [1, '#ACF'] + ] + } + }, + f + ); + o = f.style; + delete f.style; + g = w( + e, + { + stroke: '#68A', + fill: { + linearGradient: a, + stops: [ + [0, '#9BD'], + [1, '#CDF'] + ] + } + }, + g + ); + p = g.style; + delete g.style; + h = w(e, { style: { color: '#CCC' } }, h); + q = h.style; + delete h.style; + N(j.element, Aa ? 'mouseover' : 'mouseenter', function () { + k !== 3 && j.attr(f).css(o); + }); + N(j.element, Aa ? 'mouseout' : 'mouseleave', function () { + k !== 3 && ((l = [e, f, g][k]), (m = [n, o, p][k]), j.attr(l).css(m)); + }); + j.setState = function (a) { + (j.state = k = a) + ? a === 2 + ? j.attr(g).css(p) + : a === 3 && j.attr(h).css(q) + : j.attr(e).css(n); + }; + return j + .on('click', function () { + k !== 3 && d.call(j); + }) + .attr(e) + .css(r({ cursor: 'default' }, n)); + }, + crispLine: function (a, b) { + a[1] === a[4] && (a[1] = a[4] = v(a[1]) - (b % 2) / 2); + a[2] === a[5] && (a[2] = a[5] = v(a[2]) + (b % 2) / 2); + return a; + }, + path: function (a) { + var b = { fill: P }; + La(a) ? (b.d = a) : da(a) && r(b, a); + return this.createElement('path').attr(b); + }, + circle: function (a, b, c) { + a = da(a) ? a : { x: a, y: b, r: c }; + b = this.createElement('circle'); + b.xSetter = function (a) { + this.element.setAttribute('cx', a); + }; + b.ySetter = function (a) { + this.element.setAttribute('cy', a); + }; + return b.attr(a); + }, + arc: function (a, b, c, d, e, f) { + if (da(a)) + (b = a.y), + (c = a.r), + (d = a.innerR), + (e = a.start), + (f = a.end), + (a = a.x); + a = this.symbol('arc', a || 0, b || 0, c || 0, c || 0, { + innerR: d || 0, + start: e || 0, + end: f || 0 + }); + a.r = c; + return a; + }, + rect: function (a, b, c, d, e, f) { + var e = da(a) ? a.r : e, + g = this.createElement('rect'), + a = da(a) + ? a + : a === t + ? {} + : { x: a, y: b, width: u(c, 0), height: u(d, 0) }; + if (f !== t) (a.strokeWidth = f), (a = g.crisp(a)); + if (e) a.r = e; + g.rSetter = function (a) { + F(this.element, { rx: a, ry: a }); + }; + return g.attr(a); + }, + setSize: function (a, b, c) { + var d = this.alignedObjects, + e = d.length; + this.width = a; + this.height = b; + for ( + this.boxWrapper[p(c, !0) ? 'animate' : 'attr']({ width: a, height: b }); + e--; + + ) + d[e].align(); + }, + g: function (a) { + var b = this.createElement('g'); + return s(a) ? b.attr({ class: 'highcharts-' + a }) : b; + }, + image: function (a, b, c, d, e) { + var f = { preserveAspectRatio: P }; + arguments.length > 1 && r(f, { x: b, y: c, width: d, height: e }); + f = this.createElement('image').attr(f); + f.element.setAttributeNS + ? f.element.setAttributeNS('http://www.w3.org/1999/xlink', 'href', a) + : f.element.setAttribute('hc-svg-href', a); + return f; + }, + symbol: function (a, b, c, d, e, f) { + var g, + h = this.symbols[a], + h = h && h(v(b), v(c), d, e, f), + i = /^url\((.*?)\)$/, + j, + k; + if (h) + (g = this.path(h)), + r(g, { symbolName: a, x: b, y: c, width: d, height: e }), + f && r(g, f); + else if (i.test(a)) + (k = function (a, b) { + a.element && + (a.attr({ width: b[0], height: b[1] }), + a.alignByTranslate || + a.translate(v((d - b[0]) / 2), v((e - b[1]) / 2))); + }), + (j = a.match(i)[1]), + (a = Ib[j]), + (g = this.image(j).attr({ x: b, y: c })), + (g.isImg = !0), + a + ? k(g, a) + : (g.attr({ width: 0, height: 0 }), + $('img', { + onload: function () { + k(g, (Ib[j] = [this.width, this.height])); + }, + src: j + })); + return g; + }, + symbols: { + circle: function (a, b, c, d) { + var e = 0.166 * c; + return [ + 'M', + a + c / 2, + b, + 'C', + a + c + e, + b, + a + c + e, + b + d, + a + c / 2, + b + d, + 'C', + a - e, + b + d, + a - e, + b, + a + c / 2, + b, + 'Z' + ]; + }, + square: function (a, b, c, d) { + return ['M', a, b, 'L', a + c, b, a + c, b + d, a, b + d, 'Z']; + }, + triangle: function (a, b, c, d) { + return ['M', a + c / 2, b, 'L', a + c, b + d, a, b + d, 'Z']; + }, + 'triangle-down': function (a, b, c, d) { + return ['M', a, b, 'L', a + c, b, a + c / 2, b + d, 'Z']; + }, + diamond: function (a, b, c, d) { + return [ + 'M', + a + c / 2, + b, + 'L', + a + c, + b + d / 2, + a + c / 2, + b + d, + a, + b + d / 2, + 'Z' + ]; + }, + arc: function (a, b, c, d, e) { + var f = e.start, + c = e.r || c || d, + g = e.end - 0.001, + d = e.innerR, + h = e.open, + i = aa(f), + j = fa(f), + k = aa(g), + g = fa(g), + e = e.end - f < na ? 0 : 1; + return [ + 'M', + a + c * i, + b + c * j, + 'A', + c, + c, + 0, + e, + 1, + a + c * k, + b + c * g, + h ? 'M' : 'L', + a + d * k, + b + d * g, + 'A', + d, + d, + 0, + e, + 0, + a + d * i, + b + d * j, + h ? '' : 'Z' + ]; + }, + callout: function (a, b, c, d, e) { + var f = C((e && e.r) || 0, c, d), + g = f + 6, + h = e && e.anchorX, + i = e && e.anchorY, + e = (v(e.strokeWidth || 0) % 2) / 2; + a += e; + b += e; + e = [ + 'M', + a + f, + b, + 'L', + a + c - f, + b, + 'C', + a + c, + b, + a + c, + b, + a + c, + b + f, + 'L', + a + c, + b + d - f, + 'C', + a + c, + b + d, + a + c, + b + d, + a + c - f, + b + d, + 'L', + a + f, + b + d, + 'C', + a, + b + d, + a, + b + d, + a, + b + d - f, + 'L', + a, + b + f, + 'C', + a, + b, + a, + b, + a + f, + b + ]; + h && h > c && i > b + g && i < b + d - g + ? e.splice( + 13, + 3, + 'L', + a + c, + i - 6, + a + c + 6, + i, + a + c, + i + 6, + a + c, + b + d - f + ) + : h && h < 0 && i > b + g && i < b + d - g + ? e.splice(33, 3, 'L', a, i + 6, a - 6, i, a, i - 6, a, b + f) + : i && i > d && h > a + g && h < a + c - g + ? e.splice( + 23, + 3, + 'L', + h + 6, + b + d, + h, + b + d + 6, + h - 6, + b + d, + a + f, + b + d + ) + : i && + i < 0 && + h > a + g && + h < a + c - g && + e.splice(3, 3, 'L', h - 6, b, h, b - 6, h + 6, b, c - f, b); + return e; + } + }, + clipRect: function (a, b, c, d) { + var e = 'highcharts-' + tb++, + f = this.createElement('clipPath').attr({ id: e }).add(this.defs), + a = this.rect(a, b, c, d, 0).add(f); + a.id = e; + a.clipPath = f; + return a; + }, + text: function (a, b, c, d) { + var e = ga || (!ba && this.forExport), + f = {}; + if (d && !this.forExport) return this.html(a, b, c); + f.x = Math.round(b || 0); + if (c) f.y = Math.round(c); + if (a || a === 0) f.text = a; + a = this.createElement('text').attr(f); + e && a.css({ position: 'absolute' }); + if (!d) + a.xSetter = function (a, b, c) { + var d = c.getElementsByTagName('tspan'), + e, + f = c.getAttribute(b), + m; + for (m = 0; m < d.length; m++) + (e = d[m]), e.getAttribute(b) === f && e.setAttribute(b, a); + c.setAttribute(b, a); + }; + return a; + }, + fontMetrics: function (a, b) { + a = a || this.style.fontSize; + if (b && H.getComputedStyle) + (b = b.element || b), (a = H.getComputedStyle(b, '').fontSize); + var a = /px/.test(a) ? z(a) : /em/.test(a) ? parseFloat(a) * 12 : 12, + c = a < 24 ? a + 4 : v(a * 1.2), + d = v(c * 0.8); + return { h: c, b: d, f: a }; + }, + label: function (a, b, c, d, e, f, g, h, i) { + function j() { + var a, b; + a = o.element.style; + E = + (u === void 0 || wb === void 0 || n.styles.textAlign) && + o.textStr && + o.getBBox(); + n.width = (u || E.width || 0) + 2 * D + jb; + n.height = (wb || E.height || 0) + 2 * D; + R = D + m.fontMetrics(a && a.fontSize, o).b; + if (z) { + if (!p) + (a = v(-I * D)), + (b = h ? -R : 0), + (n.box = p = + d + ? m.symbol(d, a, b, n.width, n.height, y) + : m.rect(a, b, n.width, n.height, 0, y[Pb])), + p.attr('fill', P).add(n); + p.isImg || p.attr(r({ width: v(n.width), height: v(n.height) }, y)); + y = null; + } + } + function k() { + var a = n.styles, + a = a && a.textAlign, + b = jb + D * (1 - I), + c; + c = h ? 0 : R; + if (s(u) && E && (a === 'center' || a === 'right')) + b += { center: 0.5, right: 1 }[a] * (u - E.width); + if (b !== o.x || c !== o.y) o.attr('x', b), c !== t && o.attr('y', c); + o.x = b; + o.y = c; + } + function l(a, b) { + p ? p.attr(a, b) : (y[a] = b); + } + var m = this, + n = m.g(i), + o = m.text('', 0, 0, g).attr({ zIndex: 1 }), + p, + E, + I = 0, + D = 3, + jb = 0, + u, + wb, + xb, + x, + Jb = 0, + y = {}, + R, + z; + n.onAdd = function () { + o.add(n); + n.attr({ text: a || '', x: b, y: c }); + p && s(e) && n.attr({ anchorX: e, anchorY: f }); + }; + n.widthSetter = function (a) { + u = a; + }; + n.heightSetter = function (a) { + wb = a; + }; + n.paddingSetter = function (a) { + s(a) && a !== D && ((D = a), k()); + }; + n.paddingLeftSetter = function (a) { + s(a) && a !== jb && ((jb = a), k()); + }; + n.alignSetter = function (a) { + I = { left: 0, center: 0.5, right: 1 }[a]; + }; + n.textSetter = function (a) { + a !== t && o.textSetter(a); + j(); + k(); + }; + n['stroke-widthSetter'] = function (a, b) { + a && (z = !0); + Jb = (a % 2) / 2; + l(b, a); + }; + n.strokeSetter = + n.fillSetter = + n.rSetter = + function (a, b) { + b === 'fill' && a && (z = !0); + l(b, a); + }; + n.anchorXSetter = function (a, b) { + e = a; + l(b, a + Jb - xb); + }; + n.anchorYSetter = function (a, b) { + f = a; + l(b, a - x); + }; + n.xSetter = function (a) { + n.x = a; + I && (a -= I * ((u || E.width) + D)); + xb = v(a); + n.attr('translateX', xb); + }; + n.ySetter = function (a) { + x = n.y = v(a); + n.attr('translateY', x); + }; + var C = n.css; + return r(n, { + css: function (a) { + if (a) { + var b = {}, + a = w(a); + q(n.textProps, function (c) { + a[c] !== t && ((b[c] = a[c]), delete a[c]); + }); + o.css(b); + } + return C.call(n, a); + }, + getBBox: function () { + return { + width: E.width + 2 * D, + height: E.height + 2 * D, + x: E.x - D, + y: E.y - D + }; + }, + shadow: function (a) { + p && p.shadow(a); + return n; + }, + destroy: function () { + X(n.element, 'mouseenter'); + X(n.element, 'mouseleave'); + o && (o = o.destroy()); + p && (p = p.destroy()); + G.prototype.destroy.call(n); + n = m = j = k = l = null; + } + }); + } + }; + Ya = ta; + r(G.prototype, { + htmlCss: function (a) { + var b = this.element; + if ((b = a && b.tagName === 'SPAN' && a.width)) + delete a.width, (this.textWidth = b), this.updateTransform(); + this.styles = r(this.styles, a); + A(this.element, a); + return this; + }, + htmlGetBBox: function () { + var a = this.element, + b = this.bBox; + if (!b) { + if (a.nodeName === 'text') a.style.position = 'absolute'; + b = this.bBox = { + x: a.offsetLeft, + y: a.offsetTop, + width: a.offsetWidth, + height: a.offsetHeight + }; + } + return b; + }, + htmlUpdateTransform: function () { + if (this.added) { + var a = this.renderer, + b = this.element, + c = this.translateX || 0, + d = this.translateY || 0, + e = this.x || 0, + f = this.y || 0, + g = this.textAlign || 'left', + h = { left: 0, center: 0.5, right: 1 }[g], + i = this.shadows; + A(b, { marginLeft: c, marginTop: d }); + i && + q(i, function (a) { + A(a, { marginLeft: c + 1, marginTop: d + 1 }); + }); + this.inverted && + q(b.childNodes, function (c) { + a.invertChild(c, b); + }); + if (b.tagName === 'SPAN') { + var j = this.rotation, + k, + l = z(this.textWidth), + m = [j, g, b.innerHTML, this.textWidth].join(','); + if (m !== this.cTT) { + k = a.fontMetrics(b.style.fontSize).b; + s(j) && this.setSpanRotation(j, h, k); + i = p(this.elemWidth, b.offsetWidth); + if (i > l && /[ \-]/.test(b.textContent || b.innerText)) + A(b, { width: l + 'px', display: 'block', whiteSpace: 'normal' }), + (i = l); + this.getSpanCorrection(i, k, h, j, g); + } + A(b, { + left: e + (this.xCorr || 0) + 'px', + top: f + (this.yCorr || 0) + 'px' + }); + if (sb) k = b.offsetHeight; + this.cTT = m; + } + } else this.alignOnAdd = !0; + }, + setSpanRotation: function (a, b, c) { + var d = {}, + e = Aa + ? '-ms-transform' + : sb + ? '-webkit-transform' + : Ta + ? 'MozTransform' + : Gb + ? '-o-transform' + : ''; + d[e] = d.transform = 'rotate(' + a + 'deg)'; + d[e + (Ta ? 'Origin' : '-origin')] = d.transformOrigin = + b * 100 + '% ' + c + 'px'; + A(this.element, d); + }, + getSpanCorrection: function (a, b, c) { + this.xCorr = -a * c; + this.yCorr = -b; + } + }); + r(ta.prototype, { + html: function (a, b, c) { + var d = this.createElement('span'), + e = d.element, + f = d.renderer; + d.textSetter = function (a) { + a !== e.innerHTML && delete this.bBox; + e.innerHTML = this.textStr = a; + }; + d.xSetter = + d.ySetter = + d.alignSetter = + d.rotationSetter = + function (a, b) { + b === 'align' && (b = 'textAlign'); + d[b] = a; + d.htmlUpdateTransform(); + }; + d.attr({ text: a, x: v(b), y: v(c) }).css({ + position: 'absolute', + whiteSpace: 'nowrap', + fontFamily: this.style.fontFamily, + fontSize: this.style.fontSize + }); + d.css = d.htmlCss; + if (f.isSVG) + d.add = function (a) { + var b, + c = f.box.parentNode, + j = []; + if ((this.parentGroup = a)) { + if (((b = a.div), !b)) { + for (; a; ) j.push(a), (a = a.parentGroup); + q(j.reverse(), function (a) { + var d; + b = a.div = + a.div || + $( + Ja, + { className: F(a.element, 'class') }, + { + position: 'absolute', + left: (a.translateX || 0) + 'px', + top: (a.translateY || 0) + 'px' + }, + b || c + ); + d = b.style; + r(a, { + translateXSetter: function (b, c) { + d.left = b + 'px'; + a[c] = b; + a.doTransform = !0; + }, + translateYSetter: function (b, c) { + d.top = b + 'px'; + a[c] = b; + a.doTransform = !0; + }, + visibilitySetter: function (a, b) { + d[b] = a; + } + }); + }); + } + } else b = c; + b.appendChild(e); + d.added = !0; + d.alignOnAdd && d.htmlUpdateTransform(); + return d; + }; + return d; + } + }); + var Z; + if (!ba && !ga) { + Z = { + init: function (a, b) { + var c = ['<', b, ' filled="f" stroked="f"'], + d = ['position: ', 'absolute', ';'], + e = b === Ja; + (b === 'shape' || e) && d.push('left:0;top:0;width:1px;height:1px;'); + d.push('visibility: ', e ? 'hidden' : 'visible'); + c.push(' style="', d.join(''), '"/>'); + if (b) + (c = e || b === 'span' || b === 'img' ? c.join('') : a.prepVML(c)), + (this.element = $(c)); + this.renderer = a; + }, + add: function (a) { + var b = this.renderer, + c = this.element, + d = b.box, + d = a ? a.element || a : d; + a && a.inverted && b.invertChild(c, d); + d.appendChild(c); + this.added = !0; + this.alignOnAdd && !this.deferUpdateTransform && this.updateTransform(); + if (this.onAdd) this.onAdd(); + return this; + }, + updateTransform: G.prototype.htmlUpdateTransform, + setSpanRotation: function () { + var a = this.rotation, + b = aa(a * Ca), + c = fa(a * Ca); + A(this.element, { + filter: a + ? [ + 'progid:DXImageTransform.Microsoft.Matrix(M11=', + b, + ', M12=', + -c, + ', M21=', + c, + ', M22=', + b, + ", sizingMethod='auto expand')" + ].join('') + : P + }); + }, + getSpanCorrection: function (a, b, c, d, e) { + var f = d ? aa(d * Ca) : 1, + g = d ? fa(d * Ca) : 0, + h = p(this.elemHeight, this.element.offsetHeight), + i; + this.xCorr = f < 0 && -a; + this.yCorr = g < 0 && -h; + i = f * g < 0; + this.xCorr += g * b * (i ? 1 - c : c); + this.yCorr -= f * b * (d ? (i ? c : 1 - c) : 1); + e && + e !== 'left' && + ((this.xCorr -= a * c * (f < 0 ? -1 : 1)), + d && (this.yCorr -= h * c * (g < 0 ? -1 : 1)), + A(this.element, { textAlign: e })); + }, + pathToVML: function (a) { + for (var b = a.length, c = []; b--; ) + if (ia(a[b])) c[b] = v(a[b] * 10) - 5; + else if (a[b] === 'Z') c[b] = 'x'; + else if (((c[b] = a[b]), a.isArc && (a[b] === 'wa' || a[b] === 'at'))) + c[b + 5] === c[b + 7] && (c[b + 7] += a[b + 7] > a[b + 5] ? 1 : -1), + c[b + 6] === c[b + 8] && + (c[b + 8] += a[b + 8] > a[b + 6] ? 1 : -1); + return c.join(' ') || 'x'; + }, + clip: function (a) { + var b = this, + c; + a + ? ((c = a.members), + ka(c, b), + c.push(b), + (b.destroyClip = function () { + ka(c, b); + }), + (a = a.getCSS(b))) + : (b.destroyClip && b.destroyClip(), + (a = { clip: gb ? 'inherit' : 'rect(auto)' })); + return b.css(a); + }, + css: G.prototype.htmlCss, + safeRemoveChild: function (a) { + a.parentNode && Pa(a); + }, + destroy: function () { + this.destroyClip && this.destroyClip(); + return G.prototype.destroy.apply(this); + }, + on: function (a, b) { + this.element['on' + a] = function () { + var a = H.event; + a.target = a.srcElement; + b(a); + }; + return this; + }, + cutOffPath: function (a, b) { + var c, + a = a.split(/[ ,]/); + c = a.length; + if (c === 9 || c === 11) a[c - 4] = a[c - 2] = z(a[c - 2]) - 10 * b; + return a.join(' '); + }, + shadow: function (a, b, c) { + var d = [], + e, + f = this.element, + g = this.renderer, + h, + i = f.style, + j, + k = f.path, + l, + m, + n, + o; + k && typeof k.value !== 'string' && (k = 'x'); + m = k; + if (a) { + n = p(a.width, 3); + o = (a.opacity || 0.15) / n; + for (e = 1; e <= 3; e++) { + l = n * 2 + 1 - 2 * e; + c && (m = this.cutOffPath(k.value, l + 0.5)); + j = [ + '' + ]; + h = $(g.prepVML(j), null, { + left: z(i.left) + p(a.offsetX, 1), + top: z(i.top) + p(a.offsetY, 1) + }); + if (c) h.cutOff = l + 1; + j = [ + '' + ]; + $(g.prepVML(j), null, null, h); + b ? b.element.appendChild(h) : f.parentNode.insertBefore(h, f); + d.push(h); + } + this.shadows = d; + } + return this; + }, + updateShadows: sa, + setAttr: function (a, b) { + gb ? (this.element[a] = b) : this.element.setAttribute(a, b); + }, + classSetter: function (a) { + this.element.className = a; + }, + dashstyleSetter: function (a, b, c) { + (c.getElementsByTagName('stroke')[0] || + $(this.renderer.prepVML(['']), null, null, c))[b] = + a || 'solid'; + this[b] = a; + }, + dSetter: function (a, b, c) { + var d = this.shadows, + a = a || []; + this.d = a.join && a.join(' '); + c.path = a = this.pathToVML(a); + if (d) + for (c = d.length; c--; ) + d[c].path = d[c].cutOff ? this.cutOffPath(a, d[c].cutOff) : a; + this.setAttr(b, a); + }, + fillSetter: function (a, b, c) { + var d = c.nodeName; + if (d === 'SPAN') c.style.color = a; + else if (d !== 'IMG') + (c.filled = a !== P), + this.setAttr('fillcolor', this.renderer.color(a, c, b, this)); + }, + opacitySetter: sa, + rotationSetter: function (a, b, c) { + c = c.style; + this[b] = c[b] = a; + c.left = -v(fa(a * Ca) + 1) + 'px'; + c.top = v(aa(a * Ca)) + 'px'; + }, + strokeSetter: function (a, b, c) { + this.setAttr('strokecolor', this.renderer.color(a, c, b)); + }, + 'stroke-widthSetter': function (a, b, c) { + c.stroked = !!a; + this[b] = a; + ia(a) && (a += 'px'); + this.setAttr('strokeweight', a); + }, + titleSetter: function (a, b) { + this.setAttr(b, a); + }, + visibilitySetter: function (a, b, c) { + a === 'inherit' && (a = 'visible'); + this.shadows && + q(this.shadows, function (c) { + c.style[b] = a; + }); + c.nodeName === 'DIV' && + ((a = a === 'hidden' ? '-999em' : 0), + gb || (c.style[b] = a ? 'visible' : 'hidden'), + (b = 'top')); + c.style[b] = a; + }, + xSetter: function (a, b, c) { + this[b] = a; + b === 'x' ? (b = 'left') : b === 'y' && (b = 'top'); + this.updateClipping + ? ((this[b] = a), this.updateClipping()) + : (c.style[b] = a); + }, + zIndexSetter: function (a, b, c) { + c.style[b] = a; + } + }; + S.VMLElement = Z = la(G, Z); + Z.prototype.ySetter = + Z.prototype.widthSetter = + Z.prototype.heightSetter = + Z.prototype.xSetter; + var ha = { + Element: Z, + isIE8: wa.indexOf('MSIE 8.0') > -1, + init: function (a, b, c, d) { + var e; + this.alignedObjects = []; + d = this.createElement(Ja).css( + r(this.getStyle(d), { position: 'relative' }) + ); + e = d.element; + a.appendChild(d.element); + this.isVML = !0; + this.box = e; + this.boxWrapper = d; + this.cache = {}; + this.setSize(b, c, !1); + if (!x.namespaces.hcv) { + x.namespaces.add('hcv', 'urn:schemas-microsoft-com:vml'); + try { + x.createStyleSheet().cssText = + 'hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } '; + } catch (f) { + x.styleSheets[0].cssText += + 'hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } '; + } + } + }, + isHidden: function () { + return !this.box.offsetWidth; + }, + clipRect: function (a, b, c, d) { + var e = this.createElement(), + f = da(a); + return r(e, { + members: [], + left: (f ? a.x : a) + 1, + top: (f ? a.y : b) + 1, + width: (f ? a.width : c) - 1, + height: (f ? a.height : d) - 1, + getCSS: function (a) { + var b = a.element, + c = b.nodeName, + a = a.inverted, + d = this.top - (c === 'shape' ? b.offsetTop : 0), + e = this.left, + b = e + this.width, + f = d + this.height, + d = { + clip: + 'rect(' + + v(a ? e : d) + + 'px,' + + v(a ? f : b) + + 'px,' + + v(a ? b : f) + + 'px,' + + v(a ? d : e) + + 'px)' + }; + !a && + gb && + c === 'DIV' && + r(d, { width: b + 'px', height: f + 'px' }); + return d; + }, + updateClipping: function () { + q(e.members, function (a) { + a.element && a.css(e.getCSS(a)); + }); + } + }); + }, + color: function (a, b, c, d) { + var e = this, + f, + g = /^rgba/, + h, + i, + j = P; + a && a.linearGradient + ? (i = 'gradient') + : a && a.radialGradient && (i = 'pattern'); + if (i) { + var k, + l, + m = a.linearGradient || a.radialGradient, + n, + o, + p, + E, + I, + D = '', + a = a.stops, + u, + s = [], + t = function () { + h = [ + '' + ]; + $(e.prepVML(h), null, null, b); + }; + n = a[0]; + u = a[a.length - 1]; + n[0] > 0 && a.unshift([0, n[1]]); + u[0] < 1 && a.push([1, u[1]]); + q(a, function (a, b) { + g.test(a[1]) + ? ((f = ya(a[1])), (k = f.get('rgb')), (l = f.get('a'))) + : ((k = a[1]), (l = 1)); + s.push(a[0] * 100 + '% ' + k); + b ? ((p = l), (E = k)) : ((o = l), (I = k)); + }); + if (c === 'fill') + if (i === 'gradient') + (c = m.x1 || m[0] || 0), + (a = m.y1 || m[1] || 0), + (n = m.x2 || m[2] || 0), + (m = m.y2 || m[3] || 0), + (D = + 'angle="' + + (90 - (V.atan((m - a) / (n - c)) * 180) / na) + + '"'), + t(); + else { + var j = m.r, + r = j * 2, + v = j * 2, + x = m.cx, + y = m.cy, + R = b.radialReference, + w, + j = function () { + R && + ((w = d.getBBox()), + (x += (R[0] - w.x) / w.width - 0.5), + (y += (R[1] - w.y) / w.height - 0.5), + (r *= R[2] / w.width), + (v *= R[2] / w.height)); + D = + 'src="' + + L.global.VMLRadialGradientURL + + '" size="' + + r + + ',' + + v + + '" origin="0.5,0.5" position="' + + x + + ',' + + y + + '" color2="' + + I + + '" '; + t(); + }; + d.added ? j() : (d.onAdd = j); + j = E; + } + else j = k; + } else if (g.test(a) && b.tagName !== 'IMG') + (f = ya(a)), + (h = ['<', c, ' opacity="', f.get('a'), '"/>']), + $(this.prepVML(h), null, null, b), + (j = f.get('rgb')); + else { + j = b.getElementsByTagName(c); + if (j.length) (j[0].opacity = 1), (j[0].type = 'solid'); + j = a; + } + return j; + }, + prepVML: function (a) { + var b = this.isIE8, + a = a.join(''); + b + ? ((a = a.replace('/>', ' xmlns="urn:schemas-microsoft-com:vml" />')), + (a = + a.indexOf('style="') === -1 + ? a.replace( + '/>', + ' style="display:inline-block;behavior:url(#default#VML);" />' + ) + : a.replace( + 'style="', + 'style="display:inline-block;behavior:url(#default#VML);' + ))) + : (a = a.replace('<', ' 1 && f.attr({ x: b, y: c, width: d, height: e }); + return f; + }, + createElement: function (a) { + return a === 'rect' + ? this.symbol(a) + : ta.prototype.createElement.call(this, a); + }, + invertChild: function (a, b) { + var c = this, + d = b.style, + e = a.tagName === 'IMG' && a.style; + A(a, { + flip: 'x', + left: z(d.width) - (e ? z(e.top) : 1), + top: z(d.height) - (e ? z(e.left) : 1), + rotation: -90 + }); + q(a.childNodes, function (b) { + c.invertChild(b, a); + }); + }, + symbols: { + arc: function (a, b, c, d, e) { + var f = e.start, + g = e.end, + h = e.r || c || d, + c = e.innerR, + d = aa(f), + i = fa(f), + j = aa(g), + k = fa(g); + if (g - f === 0) return ['x']; + f = [ + 'wa', + a - h, + b - h, + a + h, + b + h, + a + h * d, + b + h * i, + a + h * j, + b + h * k + ]; + e.open && !c && f.push('e', 'M', a, b); + f.push( + 'at', + a - c, + b - c, + a + c, + b + c, + a + c * j, + b + c * k, + a + c * d, + b + c * i, + 'x', + 'e' + ); + f.isArc = !0; + return f; + }, + circle: function (a, b, c, d, e) { + e && (c = d = 2 * e.r); + e && e.isCircle && ((a -= c / 2), (b -= d / 2)); + return [ + 'wa', + a, + b, + a + c, + b + d, + a + c, + b + d / 2, + a + c, + b + d / 2, + 'e' + ]; + }, + rect: function (a, b, c, d, e) { + return ta.prototype.symbols[ + !s(e) || !e.r ? 'square' : 'callout' + ].call(0, a, b, c, d, e); + } + } + }; + S.VMLRenderer = Z = function () { + this.init.apply(this, arguments); + }; + Z.prototype = w(ta.prototype, ha); + Ya = Z; + } + ta.prototype.measureSpanWidth = function (a, b) { + var c = x.createElement('span'), + d; + d = x.createTextNode(a); + c.appendChild(d); + A(c, b); + this.box.appendChild(c); + d = c.offsetWidth; + Pa(c); + return d; + }; + var Lb; + if (ga) + (S.CanVGRenderer = Z = + function () { + xa = 'http://www.w3.org/1999/xhtml'; + }), + (Z.prototype.symbols = {}), + (Lb = (function () { + function a() { + var a = b.length, + d; + for (d = 0; d < a; d++) b[d](); + b = []; + } + var b = []; + return { + push: function (c, d) { + b.length === 0 && Qb(d, a); + b.push(c); + } + }; + })()), + (Ya = Z); + Sa.prototype = { + addLabel: function () { + var a = this.axis, + b = a.options, + c = a.chart, + d = a.horiz, + e = a.categories, + f = a.names, + g = this.pos, + h = b.labels, + i = h.rotation, + j = a.tickPositions, + d = + (d && + e && + !h.step && + !h.staggerLines && + !h.rotation && + c.plotWidth / j.length) || + (!d && (c.margin[3] || c.chartWidth * 0.33)), + k = g === j[0], + l = g === j[j.length - 1], + m, + f = e ? p(e[g], f[g], g) : g, + e = this.label, + n = j.info; + a.isDatetimeAxis && + n && + (m = b.dateTimeLabelFormats[n.higherRanks[g] || n.unitName]); + this.isFirst = k; + this.isLast = l; + b = a.labelFormatter.call({ + axis: a, + chart: c, + isFirst: k, + isLast: l, + dateTimeLabelFormat: m, + value: a.isLog ? ea(ja(f)) : f + }); + g = d && { width: u(1, v(d - 2 * (h.padding || 10))) + 'px' }; + g = r(g, h.style); + if (s(e)) e && e.attr({ text: b }).css(g); + else { + m = { align: a.labelAlign }; + if (ia(i)) m.rotation = i; + if (d && h.ellipsis) g.HcHeight = a.len / j.length; + this.label = e = + s(b) && h.enabled + ? c.renderer + .text(b, 0, 0, h.useHTML) + .attr(m) + .css(g) + .add(a.labelGroup) + : null; + a.tickBaseline = c.renderer.fontMetrics(h.style.fontSize, e).b; + i && a.side === 2 && (a.tickBaseline *= aa(i * Ca)); + } + this.yOffset = e + ? p( + h.y, + a.tickBaseline + (a.side === 2 ? 8 : -(e.getBBox().height / 2)) + ) + : 0; + }, + getLabelSize: function () { + var a = this.label, + b = this.axis; + return a ? a.getBBox()[b.horiz ? 'height' : 'width'] : 0; + }, + getLabelSides: function () { + var a = this.label.getBBox(), + b = this.axis, + c = b.horiz, + d = b.options.labels, + a = c ? a.width : a.height, + b = c ? d.x - a * { left: 0, center: 0.5, right: 1 }[b.labelAlign] : 0; + return [b, c ? a + b : a]; + }, + handleOverflow: function (a, b) { + var c = !0, + d = this.axis, + e = this.isFirst, + f = this.isLast, + g = d.horiz ? b.x : b.y, + h = d.reversed, + i = d.tickPositions, + j = this.getLabelSides(), + k = j[0], + j = j[1], + l, + m, + n, + o = this.label.line || 0; + l = d.labelEdge; + m = d.justifyLabels && (e || f); + l[o] === t || g + k > l[o] ? (l[o] = g + j) : m || (c = !1); + if (m) { + l = (m = d.justifyToPlot) ? d.pos : 0; + m = m ? l + d.len : d.chart.chartWidth; + do (a += e ? 1 : -1), (n = d.ticks[i[a]]); + while (i[a] && (!n || !n.label || n.label.line !== o)); + d = n && n.label.xy && n.label.xy.x + n.getLabelSides()[e ? 0 : 1]; + (e && !h) || (f && h) + ? g + k < l && ((g = l - k), n && g + j > d && (c = !1)) + : g + j > m && ((g = m - j), n && g + k < d && (c = !1)); + b.x = g; + } + return c; + }, + getPosition: function (a, b, c, d) { + var e = this.axis, + f = e.chart, + g = (d && f.oldChartHeight) || f.chartHeight; + return { + x: a + ? e.translate(b + c, null, null, d) + e.transB + : e.left + + e.offset + + (e.opposite + ? ((d && f.oldChartWidth) || f.chartWidth) - e.right - e.left + : 0), + y: a + ? g - e.bottom + e.offset - (e.opposite ? e.height : 0) + : g - e.translate(b + c, null, null, d) - e.transB + }; + }, + getLabelPosition: function (a, b, c, d, e, f, g, h) { + var i = this.axis, + j = i.transA, + k = i.reversed, + l = i.staggerLines, + a = a + e.x - (f && d ? f * j * (k ? -1 : 1) : 0), + b = b + this.yOffset - (f && !d ? f * j * (k ? 1 : -1) : 0); + if (l) (c.line = (g / (h || 1)) % l), (b += c.line * (i.labelOffset / l)); + return { x: a, y: b }; + }, + getMarkPath: function (a, b, c, d, e, f) { + return f.crispLine( + ['M', a, b, 'L', a + (e ? 0 : -c), b + (e ? c : 0)], + d + ); + }, + render: function (a, b, c) { + var d = this.axis, + e = d.options, + f = d.chart.renderer, + g = d.horiz, + h = this.type, + i = this.label, + j = this.pos, + k = e.labels, + l = this.gridLine, + m = h ? h + 'Grid' : 'grid', + n = h ? h + 'Tick' : 'tick', + o = e[m + 'LineWidth'], + q = e[m + 'LineColor'], + E = e[m + 'LineDashStyle'], + I = e[n + 'Length'], + m = e[n + 'Width'] || 0, + D = e[n + 'Color'], + u = e[n + 'Position'], + n = this.mark, + s = k.step, + r = !0, + v = d.tickmarkOffset, + w = this.getPosition(g, j, v, b), + x = w.x, + w = w.y, + y = (g && x === d.pos + d.len) || (!g && w === d.pos) ? -1 : 1, + c = p(c, 1); + this.isActive = !0; + if (o) { + j = d.getPlotLinePath(j + v, o * y, b, !0); + if (l === t) { + l = { stroke: q, 'stroke-width': o }; + if (E) l.dashstyle = E; + if (!h) l.zIndex = 1; + if (b) l.opacity = 0; + this.gridLine = l = o ? f.path(j).attr(l).add(d.gridGroup) : null; + } + if (!b && l && j) + l[this.isNew ? 'attr' : 'animate']({ d: j, opacity: c }); + } + if (m && I) + u === 'inside' && (I = -I), + d.opposite && (I = -I), + (h = this.getMarkPath(x, w, I, m * y, g, f)), + n + ? n.animate({ d: h, opacity: c }) + : (this.mark = f + .path(h) + .attr({ stroke: D, 'stroke-width': m, opacity: c }) + .add(d.axisGroup)); + if (i && !isNaN(x)) + (i.xy = w = this.getLabelPosition(x, w, i, g, k, v, a, s)), + (this.isFirst && !this.isLast && !p(e.showFirstLabel, 1)) || + (this.isLast && !this.isFirst && !p(e.showLastLabel, 1)) + ? (r = !1) + : !d.isRadial && + !k.step && + !k.rotation && + !b && + c !== 0 && + (r = this.handleOverflow(a, w)), + s && a % s && (r = !1), + r && !isNaN(w.y) + ? ((w.opacity = c), + i[this.isNew ? 'attr' : 'animate'](w), + (this.isNew = !1)) + : i.attr('y', -9999); + }, + destroy: function () { + Oa(this, this.axis); + } + }; + S.PlotLineOrBand = function (a, b) { + this.axis = a; + if (b) (this.options = b), (this.id = b.id); + }; + S.PlotLineOrBand.prototype = { + render: function () { + var a = this, + b = a.axis, + c = b.horiz, + d = (b.pointRange || 0) / 2, + e = a.options, + f = e.label, + g = a.label, + h = e.width, + i = e.to, + j = e.from, + k = s(j) && s(i), + l = e.value, + m = e.dashStyle, + n = a.svgElem, + o = [], + p, + q = e.color, + I = e.zIndex, + D = e.events, + r = {}, + t = b.chart.renderer; + b.isLog && ((j = za(j)), (i = za(i)), (l = za(l))); + if (h) { + if ( + ((o = b.getPlotLinePath(l, h)), + (r = { stroke: q, 'stroke-width': h }), + m) + ) + r.dashstyle = m; + } else if (k) { + j = u(j, b.min - d); + i = C(i, b.max + d); + o = b.getPlotBandPath(j, i, e); + if (q) r.fill = q; + if (e.borderWidth) + (r.stroke = e.borderColor), (r['stroke-width'] = e.borderWidth); + } else return; + if (s(I)) r.zIndex = I; + if (n) + if (o) n.animate({ d: o }, null, n.onGetPath); + else { + if ( + (n.hide(), + (n.onGetPath = function () { + n.show(); + }), + g) + ) + a.label = g = g.destroy(); + } + else if (o && o.length && ((a.svgElem = n = t.path(o).attr(r).add()), D)) + for (p in ((d = function (b) { + n.on(b, function (c) { + D[b].apply(a, [c]); + }); + }), + D)) + d(p); + if (f && s(f.text) && o && o.length && b.width > 0 && b.height > 0) { + f = w( + { + align: c && k && 'center', + x: c ? !k && 4 : 10, + verticalAlign: !c && k && 'middle', + y: c ? (k ? 16 : 10) : k ? 6 : -4, + rotation: c && !k && 90 + }, + f + ); + if (!g) { + r = { align: f.textAlign || f.align, rotation: f.rotation }; + if (s(I)) r.zIndex = I; + a.label = g = t + .text(f.text, 0, 0, f.useHTML) + .attr(r) + .css(f.style) + .add(); + } + b = [o[1], o[4], k ? o[6] : o[1]]; + k = [o[2], o[5], k ? o[7] : o[2]]; + o = Na(b); + c = Na(k); + g.align(f, !1, { x: o, y: c, width: Ba(b) - o, height: Ba(k) - c }); + g.show(); + } else g && g.hide(); + return a; + }, + destroy: function () { + ka(this.axis.plotLinesAndBands, this); + delete this.axis; + Oa(this); + } + }; + ma.prototype = { + defaultOptions: { + dateTimeLabelFormats: { + millisecond: '%H:%M:%S.%L', + second: '%H:%M:%S', + minute: '%H:%M', + hour: '%H:%M', + day: '%e. %b', + week: '%e. %b', + month: "%b '%y", + year: '%Y' + }, + endOnTick: !1, + gridLineColor: '#C0C0C0', + labels: M, + lineColor: '#C0D0E0', + lineWidth: 1, + minPadding: 0.01, + maxPadding: 0.01, + minorGridLineColor: '#E0E0E0', + minorGridLineWidth: 1, + minorTickColor: '#A0A0A0', + minorTickLength: 2, + minorTickPosition: 'outside', + startOfWeek: 1, + startOnTick: !1, + tickColor: '#C0D0E0', + tickLength: 10, + tickmarkPlacement: 'between', + tickPixelInterval: 100, + tickPosition: 'outside', + tickWidth: 1, + title: { align: 'middle', style: { color: '#707070' } }, + type: 'linear' + }, + defaultYAxisOptions: { + endOnTick: !0, + gridLineWidth: 1, + tickPixelInterval: 72, + showLastLabel: !0, + labels: { x: -8, y: 3 }, + lineWidth: 0, + maxPadding: 0.05, + minPadding: 0.05, + startOnTick: !0, + tickWidth: 0, + title: { rotation: 270, text: 'Values' }, + stackLabels: { + enabled: !1, + formatter: function () { + return Ga(this.total, -1); + }, + style: M.style + } + }, + defaultLeftAxisOptions: { + labels: { x: -15, y: null }, + title: { rotation: 270 } + }, + defaultRightAxisOptions: { + labels: { x: 15, y: null }, + title: { rotation: 90 } + }, + defaultBottomAxisOptions: { + labels: { x: 0, y: null }, + title: { rotation: 0 } + }, + defaultTopAxisOptions: { labels: { x: 0, y: -15 }, title: { rotation: 0 } }, + init: function (a, b) { + var c = b.isX; + this.horiz = a.inverted ? !c : c; + this.coll = (this.isXAxis = c) ? 'xAxis' : 'yAxis'; + this.opposite = b.opposite; + this.side = + b.side || + (this.horiz ? (this.opposite ? 0 : 2) : this.opposite ? 1 : 3); + this.setOptions(b); + var d = this.options, + e = d.type; + this.labelFormatter = d.labels.formatter || this.defaultLabelFormatter; + this.userOptions = b; + this.minPixelPadding = 0; + this.chart = a; + this.reversed = d.reversed; + this.zoomEnabled = d.zoomEnabled !== !1; + this.categories = d.categories || e === 'category'; + this.names = []; + this.isLog = e === 'logarithmic'; + this.isDatetimeAxis = e === 'datetime'; + this.isLinked = s(d.linkedTo); + this.tickmarkOffset = + this.categories && d.tickmarkPlacement === 'between' ? 0.5 : 0; + this.ticks = {}; + this.labelEdge = []; + this.minorTicks = {}; + this.plotLinesAndBands = []; + this.alternateBands = {}; + this.len = 0; + this.minRange = this.userMinRange = d.minRange || d.maxZoom; + this.range = d.range; + this.offset = d.offset || 0; + this.stacks = {}; + this.oldStacks = {}; + this.min = this.max = null; + this.crosshair = p( + d.crosshair, + ra(a.options.tooltip.crosshairs)[c ? 0 : 1], + !1 + ); + var f, + d = this.options.events; + Da(this, a.axes) === -1 && + (c && !this.isColorAxis + ? a.axes.splice(a.xAxis.length, 0, this) + : a.axes.push(this), + a[this.coll].push(this)); + this.series = this.series || []; + if (a.inverted && c && this.reversed === t) this.reversed = !0; + this.removePlotLine = this.removePlotBand = this.removePlotBandOrLine; + for (f in d) N(this, f, d[f]); + if (this.isLog) (this.val2lin = za), (this.lin2val = ja); + }, + setOptions: function (a) { + this.options = w( + this.defaultOptions, + this.isXAxis ? {} : this.defaultYAxisOptions, + [ + this.defaultTopAxisOptions, + this.defaultRightAxisOptions, + this.defaultBottomAxisOptions, + this.defaultLeftAxisOptions + ][this.side], + w(L[this.coll], a) + ); + }, + defaultLabelFormatter: function () { + var a = this.axis, + b = this.value, + c = a.categories, + d = this.dateTimeLabelFormat, + e = L.lang.numericSymbols, + f = e && e.length, + g, + h = a.options.labels.format, + a = a.isLog ? b : a.tickInterval; + if (h) g = Ia(h, this); + else if (c) g = b; + else if (d) g = bb(d, b); + else if (f && a >= 1e3) + for (; f-- && g === t; ) + (c = Math.pow(1e3, f + 1)), + a >= c && e[f] !== null && (g = Ga(b / c, -1) + e[f]); + g === t && (g = Q(b) >= 1e4 ? Ga(b, 0) : Ga(b, -1, t, '')); + return g; + }, + getSeriesExtremes: function () { + var a = this, + b = a.chart; + a.hasVisibleSeries = !1; + a.dataMin = a.dataMax = null; + a.buildStacks && a.buildStacks(); + q(a.series, function (c) { + if (c.visible || !b.options.chart.ignoreHiddenSeries) { + var d; + d = c.options.threshold; + var e; + a.hasVisibleSeries = !0; + a.isLog && d <= 0 && (d = null); + if (a.isXAxis) { + if (((d = c.xData), d.length)) + (a.dataMin = C(p(a.dataMin, d[0]), Na(d))), + (a.dataMax = u(p(a.dataMax, d[0]), Ba(d))); + } else { + c.getExtremes(); + e = c.dataMax; + c = c.dataMin; + if (s(c) && s(e)) + (a.dataMin = C(p(a.dataMin, c), c)), + (a.dataMax = u(p(a.dataMax, e), e)); + if (s(d)) + if (a.dataMin >= d) (a.dataMin = d), (a.ignoreMinPadding = !0); + else if (a.dataMax < d) + (a.dataMax = d), (a.ignoreMaxPadding = !0); + } + } + }); + }, + translate: function (a, b, c, d, e, f) { + var g = 1, + h = 0, + i = d ? this.oldTransA : this.transA, + d = d ? this.oldMin : this.min, + j = this.minPixelPadding, + e = (this.options.ordinal || (this.isLog && e)) && this.lin2val; + if (!i) i = this.transA; + if (c) (g *= -1), (h = this.len); + this.reversed && ((g *= -1), (h -= g * (this.sector || this.len))); + b + ? ((a = a * g + h), + (a -= j), + (a = a / i + d), + e && (a = this.lin2val(a))) + : (e && (a = this.val2lin(a)), + f === 'between' && (f = 0.5), + (a = + g * (a - d) * i + + h + + g * j + + (ia(f) ? i * f * this.pointRange : 0))); + return a; + }, + toPixels: function (a, b) { + return this.translate(a, !1, !this.horiz, null, !0) + (b ? 0 : this.pos); + }, + toValue: function (a, b) { + return this.translate(a - (b ? 0 : this.pos), !0, !this.horiz, null, !0); + }, + getPlotLinePath: function (a, b, c, d, e) { + var f = this.chart, + g = this.left, + h = this.top, + i, + j, + k = (c && f.oldChartHeight) || f.chartHeight, + l = (c && f.oldChartWidth) || f.chartWidth, + m; + i = this.transB; + e = p(e, this.translate(a, null, null, c)); + a = c = v(e + i); + i = j = v(k - e - i); + if (isNaN(e)) m = !0; + else if (this.horiz) { + if (((i = h), (j = k - this.bottom), a < g || a > g + this.width)) + m = !0; + } else if (((a = g), (c = l - this.right), i < h || i > h + this.height)) + m = !0; + return m && !d + ? null + : f.renderer.crispLine(['M', a, i, 'L', c, j], b || 1); + }, + getLinearTickPositions: function (a, b, c) { + var d, + e = ea(U(b / a) * a), + f = ea(Ka(c / a) * a), + g = []; + if (b === c && ia(b)) return [b]; + for (b = e; b <= f; ) { + g.push(b); + b = ea(b + a); + if (b === d) break; + d = b; + } + return g; + }, + getMinorTickPositions: function () { + var a = this.options, + b = this.tickPositions, + c = this.minorTickInterval, + d = [], + e; + if (this.isLog) { + e = b.length; + for (a = 1; a < e; a++) + d = d.concat(this.getLogTickPositions(c, b[a - 1], b[a], !0)); + } else if (this.isDatetimeAxis && a.minorTickInterval === 'auto') + (d = d.concat( + this.getTimeTicks( + this.normalizeTimeTickInterval(c), + this.min, + this.max, + a.startOfWeek + ) + )), + d[0] < this.min && d.shift(); + else + for (b = this.min + ((b[0] - this.min) % c); b <= this.max; b += c) + d.push(b); + return d; + }, + adjustForMinRange: function () { + var a = this.options, + b = this.min, + c = this.max, + d, + e = this.dataMax - this.dataMin >= this.minRange, + f, + g, + h, + i, + j; + if (this.isXAxis && this.minRange === t && !this.isLog) + s(a.min) || s(a.max) + ? (this.minRange = null) + : (q(this.series, function (a) { + i = a.xData; + for (g = j = a.xIncrement ? 1 : i.length - 1; g > 0; g--) + if (((h = i[g] - i[g - 1]), f === t || h < f)) f = h; + }), + (this.minRange = C(f * 5, this.dataMax - this.dataMin))); + if (c - b < this.minRange) { + var k = this.minRange; + d = (k - c + b) / 2; + d = [b - d, p(a.min, b - d)]; + if (e) d[2] = this.dataMin; + b = Ba(d); + c = [b + k, p(a.max, b + k)]; + if (e) c[2] = this.dataMax; + c = Na(c); + c - b < k && ((d[0] = c - k), (d[1] = p(a.min, c - k)), (b = Ba(d))); + } + this.min = b; + this.max = c; + }, + setAxisTranslation: function (a) { + var b = this, + c = b.max - b.min, + d = b.axisPointRange || 0, + e, + f = 0, + g = 0, + h = b.linkedParent, + i = !!b.categories, + j = b.transA; + if (b.isXAxis || i || d) + h + ? ((f = h.minPointOffset), (g = h.pointRangePadding)) + : q(b.series, function (a) { + var h = i ? 1 : b.isXAxis ? a.pointRange : b.axisPointRange || 0, + j = a.options.pointPlacement, + n = a.closestPointRange; + h > c && (h = 0); + d = u(d, h); + f = u(f, Fa(j) ? 0 : h / 2); + g = u(g, j === 'on' ? 0 : h); + !a.noSharedTooltip && s(n) && (e = s(e) ? C(e, n) : n); + }), + (h = b.ordinalSlope && e ? b.ordinalSlope / e : 1), + (b.minPointOffset = f *= h), + (b.pointRangePadding = g *= h), + (b.pointRange = C(d, c)), + (b.closestPointRange = e); + if (a) b.oldTransA = j; + b.translationSlope = b.transA = j = b.len / (c + g || 1); + b.transB = b.horiz ? b.left : b.bottom; + b.minPixelPadding = j * f; + }, + setTickPositions: function (a) { + var b = this, + c = b.chart, + d = b.options, + e = d.startOnTick, + f = d.endOnTick, + g = b.isLog, + h = b.isDatetimeAxis, + i = b.isXAxis, + j = b.isLinked, + k = b.options.tickPositioner, + l = d.maxPadding, + m = d.minPadding, + n = d.tickInterval, + o = d.minTickInterval, + Y = d.tickPixelInterval, + E, + I = b.categories; + j + ? ((b.linkedParent = c[b.coll][d.linkedTo]), + (c = b.linkedParent.getExtremes()), + (b.min = p(c.min, c.dataMin)), + (b.max = p(c.max, c.dataMax)), + d.type !== b.linkedParent.options.type && oa(11, 1)) + : ((b.min = p(b.userMin, d.min, b.dataMin)), + (b.max = p(b.userMax, d.max, b.dataMax))); + if (g) + !a && C(b.min, p(b.dataMin, b.min)) <= 0 && oa(10, 1), + (b.min = ea(za(b.min))), + (b.max = ea(za(b.max))); + if (b.range && s(b.max)) + (b.userMin = b.min = u(b.min, b.max - b.range)), + (b.userMax = b.max), + (b.range = null); + b.beforePadding && b.beforePadding(); + b.adjustForMinRange(); + if ( + !I && + !b.axisPointRange && + !b.usePercentage && + !j && + s(b.min) && + s(b.max) && + (c = b.max - b.min) + ) { + if ( + !s(d.min) && + !s(b.userMin) && + m && + (b.dataMin < 0 || !b.ignoreMinPadding) + ) + b.min -= c * m; + if ( + !s(d.max) && + !s(b.userMax) && + l && + (b.dataMax > 0 || !b.ignoreMaxPadding) + ) + b.max += c * l; + } + if (ia(d.floor)) b.min = u(b.min, d.floor); + if (ia(d.ceiling)) b.max = C(b.max, d.ceiling); + b.min === b.max || b.min === void 0 || b.max === void 0 + ? (b.tickInterval = 1) + : j && !n && Y === b.linkedParent.options.tickPixelInterval + ? (b.tickInterval = b.linkedParent.tickInterval) + : ((b.tickInterval = p(n, I ? 1 : ((b.max - b.min) * Y) / u(b.len, Y))), + !s(n) && + b.len < Y && + !this.isRadial && + !this.isLog && + !I && + e && + f && + ((E = !0), (b.tickInterval /= 4))); + i && + !a && + q(b.series, function (a) { + a.processData(b.min !== b.oldMin || b.max !== b.oldMax); + }); + b.setAxisTranslation(!0); + b.beforeSetTickPositions && b.beforeSetTickPositions(); + if (b.postProcessTickInterval) + b.tickInterval = b.postProcessTickInterval(b.tickInterval); + if (b.pointRange) b.tickInterval = u(b.pointRange, b.tickInterval); + if (!n && b.tickInterval < o) b.tickInterval = o; + if (!h && !g && !n) + b.tickInterval = mb(b.tickInterval, null, lb(b.tickInterval), d); + b.minorTickInterval = + d.minorTickInterval === 'auto' && b.tickInterval + ? b.tickInterval / 5 + : d.minorTickInterval; + b.tickPositions = a = d.tickPositions + ? [].concat(d.tickPositions) + : k && k.apply(b, [b.min, b.max]); + if (!a) + !b.ordinalPositions && + (b.max - b.min) / b.tickInterval > u(2 * b.len, 200) && + oa(19, !0), + (a = h + ? b.getTimeTicks( + b.normalizeTimeTickInterval(b.tickInterval, d.units), + b.min, + b.max, + d.startOfWeek, + b.ordinalPositions, + b.closestPointRange, + !0 + ) + : g + ? b.getLogTickPositions(b.tickInterval, b.min, b.max) + : b.getLinearTickPositions(b.tickInterval, b.min, b.max)), + E && a.splice(1, a.length - 2), + (b.tickPositions = a); + if (!j) + (d = a[0]), + (g = a[a.length - 1]), + (h = b.minPointOffset || 0), + !e && !f && !I && a.length === 2 && a.splice(1, 0, (g + d) / 2), + e ? (b.min = d) : b.min - h > d && a.shift(), + f ? (b.max = g) : b.max + h < g && a.pop(), + a.length === 1 && + ((e = Q(b.max) > 1e13 ? 1 : 0.001), (b.min -= e), (b.max += e)); + }, + setMaxTicks: function () { + var a = this.chart, + b = a.maxTicks || {}, + c = this.tickPositions, + d = (this._maxTicksKey = [this.coll, this.pos, this.len].join('-')); + if ( + !this.isLinked && + !this.isDatetimeAxis && + c && + c.length > (b[d] || 0) && + this.options.alignTicks !== !1 + ) + b[d] = c.length; + a.maxTicks = b; + }, + adjustTickAmount: function () { + var a = this._maxTicksKey, + b = this.tickPositions, + c = this.chart.maxTicks; + if ( + c && + c[a] && + !this.isDatetimeAxis && + !this.categories && + !this.isLinked && + this.options.alignTicks !== !1 && + this.min !== t + ) { + var d = this.tickAmount, + e = b.length; + this.tickAmount = a = c[a]; + if (e < a) { + for (; b.length < a; ) + b.push(ea(b[b.length - 1] + this.tickInterval)); + this.transA *= (e - 1) / (a - 1); + this.max = b[b.length - 1]; + } + if (s(d) && a !== d) this.isDirty = !0; + } + }, + setScale: function () { + var a = this.stacks, + b, + c, + d, + e; + this.oldMin = this.min; + this.oldMax = this.max; + this.oldAxisLength = this.len; + this.setAxisSize(); + e = this.len !== this.oldAxisLength; + q(this.series, function (a) { + if (a.isDirtyData || a.isDirty || a.xAxis.isDirty) d = !0; + }); + if ( + e || + d || + this.isLinked || + this.forceRedraw || + this.userMin !== this.oldUserMin || + this.userMax !== this.oldUserMax + ) { + if (!this.isXAxis) + for (b in a) + for (c in a[b]) (a[b][c].total = null), (a[b][c].cum = 0); + this.forceRedraw = !1; + this.getSeriesExtremes(); + this.setTickPositions(); + this.oldUserMin = this.userMin; + this.oldUserMax = this.userMax; + if (!this.isDirty) + this.isDirty = + e || this.min !== this.oldMin || this.max !== this.oldMax; + } else if (!this.isXAxis) { + if (this.oldStacks) a = this.stacks = this.oldStacks; + for (b in a) for (c in a[b]) a[b][c].cum = a[b][c].total; + } + this.setMaxTicks(); + }, + setExtremes: function (a, b, c, d, e) { + var f = this, + g = f.chart, + c = p(c, !0), + e = r(e, { min: a, max: b }); + K(f, 'setExtremes', e, function () { + f.userMin = a; + f.userMax = b; + f.eventArgs = e; + f.isDirtyExtremes = !0; + c && g.redraw(d); + }); + }, + zoom: function (a, b) { + var c = this.dataMin, + d = this.dataMax, + e = this.options; + this.allowZoomOutside || + (s(c) && a <= C(c, p(e.min, c)) && (a = t), + s(d) && b >= u(d, p(e.max, d)) && (b = t)); + this.displayBtn = a !== t || b !== t; + this.setExtremes(a, b, !1, t, { trigger: 'zoom' }); + return !0; + }, + setAxisSize: function () { + var a = this.chart, + b = this.options, + c = b.offsetLeft || 0, + d = this.horiz, + e = p(b.width, a.plotWidth - c + (b.offsetRight || 0)), + f = p(b.height, a.plotHeight), + g = p(b.top, a.plotTop), + b = p(b.left, a.plotLeft + c), + c = /%$/; + c.test(f) && (f = (parseInt(f, 10) / 100) * a.plotHeight); + c.test(g) && (g = (parseInt(g, 10) / 100) * a.plotHeight + a.plotTop); + this.left = b; + this.top = g; + this.width = e; + this.height = f; + this.bottom = a.chartHeight - f - g; + this.right = a.chartWidth - e - b; + this.len = u(d ? e : f, 0); + this.pos = d ? b : g; + }, + getExtremes: function () { + var a = this.isLog; + return { + min: a ? ea(ja(this.min)) : this.min, + max: a ? ea(ja(this.max)) : this.max, + dataMin: this.dataMin, + dataMax: this.dataMax, + userMin: this.userMin, + userMax: this.userMax + }; + }, + getThreshold: function (a) { + var b = this.isLog, + c = b ? ja(this.min) : this.min, + b = b ? ja(this.max) : this.max; + c > a || a === null ? (a = c) : b < a && (a = b); + return this.translate(a, 0, 1, 0, 1); + }, + autoLabelAlign: function (a) { + a = (p(a, 0) - this.side * 90 + 720) % 360; + return a > 15 && a < 165 + ? 'right' + : a > 195 && a < 345 + ? 'left' + : 'center'; + }, + getOffset: function () { + var a = this, + b = a.chart, + c = b.renderer, + d = a.options, + e = a.tickPositions, + f = a.ticks, + g = a.horiz, + h = a.side, + i = b.inverted ? [1, 0, 3, 2][h] : h, + j, + k, + l = 0, + m, + n = 0, + o = d.title, + Y = d.labels, + E = 0, + I = b.axisOffset, + b = b.clipOffset, + D = [-1, 1, 1, -1][h], + r, + v = 1, + w = p(Y.maxStaggerLines, 5), + x, + z, + C, + y, + R; + a.hasData = j = a.hasVisibleSeries || (s(a.min) && s(a.max) && !!e); + a.showAxis = k = j || p(d.showEmpty, !0); + a.staggerLines = a.horiz && Y.staggerLines; + if (!a.axisGroup) + (a.gridGroup = c + .g('grid') + .attr({ zIndex: d.gridZIndex || 1 }) + .add()), + (a.axisGroup = c + .g('axis') + .attr({ zIndex: d.zIndex || 2 }) + .add()), + (a.labelGroup = c + .g('axis-labels') + .attr({ zIndex: Y.zIndex || 7 }) + .addClass('highcharts-' + a.coll.toLowerCase() + '-labels') + .add()); + if (j || a.isLinked) { + a.labelAlign = p(Y.align || a.autoLabelAlign(Y.rotation)); + q(e, function (b) { + f[b] ? f[b].addLabel() : (f[b] = new Sa(a, b)); + }); + if (a.horiz && !a.staggerLines && w && !Y.rotation) { + for (j = a.reversed ? [].concat(e).reverse() : e; v < w; ) { + x = []; + z = !1; + for (r = 0; r < j.length; r++) + (C = j[r]), + (y = (y = f[C].label && f[C].label.getBBox()) ? y.width : 0), + (R = r % v), + y && + ((C = a.translate(C)), + x[R] !== t && C < x[R] && (z = !0), + (x[R] = C + y)); + if (z) v++; + else break; + } + if (v > 1) a.staggerLines = v; + } + q(e, function (b) { + if ( + h === 0 || + h === 2 || + { 1: 'left', 3: 'right' }[h] === a.labelAlign + ) + E = u(f[b].getLabelSize(), E); + }); + if (a.staggerLines) (E *= a.staggerLines), (a.labelOffset = E); + } else for (r in f) f[r].destroy(), delete f[r]; + if (o && o.text && o.enabled !== !1) { + if (!a.axisTitle) + (a.axisTitle = c + .text(o.text, 0, 0, o.useHTML) + .attr({ + zIndex: 7, + rotation: o.rotation || 0, + align: + o.textAlign || + { low: 'left', middle: 'center', high: 'right' }[o.align] + }) + .addClass('highcharts-' + this.coll.toLowerCase() + '-title') + .css(o.style) + .add(a.axisGroup)), + (a.axisTitle.isNew = !0); + if (k) + (l = a.axisTitle.getBBox()[g ? 'height' : 'width']), + (m = o.offset), + (n = s(m) ? 0 : p(o.margin, g ? 5 : 10)); + a.axisTitle[k ? 'show' : 'hide'](); + } + a.offset = D * p(d.offset, I[h]); + c = h === 2 ? a.tickBaseline : 0; + g = E + n + (E && D * (g ? p(Y.y, a.tickBaseline + 8) : Y.x) - c); + a.axisTitleMargin = p(m, g); + I[h] = u(I[h], a.axisTitleMargin + l + D * a.offset, g); + b[i] = u(b[i], U(d.lineWidth / 2) * 2); + }, + getLinePath: function (a) { + var b = this.chart, + c = this.opposite, + d = this.offset, + e = this.horiz, + f = this.left + (c ? this.width : 0) + d, + d = b.chartHeight - this.bottom - (c ? this.height : 0) + d; + c && (a *= -1); + return b.renderer.crispLine( + [ + 'M', + e ? this.left : f, + e ? d : this.top, + 'L', + e ? b.chartWidth - this.right : f, + e ? d : b.chartHeight - this.bottom + ], + a + ); + }, + getTitlePosition: function () { + var a = this.horiz, + b = this.left, + c = this.top, + d = this.len, + e = this.options.title, + f = a ? b : c, + g = this.opposite, + h = this.offset, + i = z(e.style.fontSize || 12), + d = { low: f + (a ? 0 : d), middle: f + d / 2, high: f + (a ? d : 0) }[ + e.align + ], + b = + (a ? c + this.height : b) + + (a ? 1 : -1) * (g ? -1 : 1) * this.axisTitleMargin + + (this.side === 2 ? i : 0); + return { + x: a ? d : b + (g ? this.width : 0) + h + (e.x || 0), + y: a ? b - (g ? this.height : 0) + h : d + (e.y || 0) + }; + }, + render: function () { + var a = this, + b = a.horiz, + c = a.reversed, + d = a.chart, + e = d.renderer, + f = a.options, + g = a.isLog, + h = a.isLinked, + i = a.tickPositions, + j, + k = a.axisTitle, + l = a.ticks, + m = a.minorTicks, + n = a.alternateBands, + o = f.stackLabels, + p = f.alternateGridColor, + E = a.tickmarkOffset, + I = f.lineWidth, + D = d.hasRendered && s(a.oldMin) && !isNaN(a.oldMin), + r = a.hasData, + u = a.showAxis, + v, + w = f.labels.overflow, + x = (a.justifyLabels = b && w !== !1), + z; + a.labelEdge.length = 0; + a.justifyToPlot = w === 'justify'; + q([l, m, n], function (a) { + for (var b in a) a[b].isActive = !1; + }); + if (r || h) + if ( + (a.minorTickInterval && + !a.categories && + q(a.getMinorTickPositions(), function (b) { + m[b] || (m[b] = new Sa(a, b, 'minor')); + D && m[b].isNew && m[b].render(null, !0); + m[b].render(null, !1, 1); + }), + i.length && + ((j = i.slice()), + ((b && c) || (!b && !c)) && j.reverse(), + x && (j = j.slice(1).concat([j[0]])), + q(j, function (b, c) { + x && (c = c === j.length - 1 ? 0 : c + 1); + if (!h || (b >= a.min && b <= a.max)) + l[b] || (l[b] = new Sa(a, b)), + D && l[b].isNew && l[b].render(c, !0, 0.1), + l[b].render(c); + }), + E && + a.min === 0 && + (l[-1] || (l[-1] = new Sa(a, -1, null, !0)), l[-1].render(-1))), + p && + q(i, function (b, c) { + if (c % 2 === 0 && b < a.max) + n[b] || (n[b] = new S.PlotLineOrBand(a)), + (v = b + E), + (z = i[c + 1] !== t ? i[c + 1] + E : a.max), + (n[b].options = { + from: g ? ja(v) : v, + to: g ? ja(z) : z, + color: p + }), + n[b].render(), + (n[b].isActive = !0); + }), + !a._addedPlotLB) + ) + q((f.plotLines || []).concat(f.plotBands || []), function (b) { + a.addPlotBandOrLine(b); + }), + (a._addedPlotLB = !0); + q([l, m, n], function (a) { + var b, + c, + e = [], + f = va ? va.duration || 500 : 0, + g = function () { + for (c = e.length; c--; ) + a[e[c]] && + !a[e[c]].isActive && + (a[e[c]].destroy(), delete a[e[c]]); + }; + for (b in a) + if (!a[b].isActive) + a[b].render(b, !1, 0), (a[b].isActive = !1), e.push(b); + a === n || !d.hasRendered || !f ? g() : f && setTimeout(g, f); + }); + if (I) + (b = a.getLinePath(I)), + a.axisLine + ? a.axisLine.animate({ d: b }) + : (a.axisLine = e + .path(b) + .attr({ stroke: f.lineColor, 'stroke-width': I, zIndex: 7 }) + .add(a.axisGroup)), + a.axisLine[u ? 'show' : 'hide'](); + if (k && u) + k[k.isNew ? 'attr' : 'animate'](a.getTitlePosition()), (k.isNew = !1); + o && o.enabled && a.renderStackTotals(); + a.isDirty = !1; + }, + redraw: function () { + this.render(); + q(this.plotLinesAndBands, function (a) { + a.render(); + }); + q(this.series, function (a) { + a.isDirty = !0; + }); + }, + destroy: function (a) { + var b = this, + c = b.stacks, + d, + e = b.plotLinesAndBands; + a || X(b); + for (d in c) Oa(c[d]), (c[d] = null); + q([b.ticks, b.minorTicks, b.alternateBands], function (a) { + Oa(a); + }); + for (a = e.length; a--; ) e[a].destroy(); + q( + 'stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup'.split( + ',' + ), + function (a) { + b[a] && (b[a] = b[a].destroy()); + } + ); + this.cross && this.cross.destroy(); + }, + drawCrosshair: function (a, b) { + if (this.crosshair) + if ((s(b) || !p(this.crosshair.snap, !0)) === !1) this.hideCrosshair(); + else { + var c, + d = this.crosshair, + e = d.animation; + p(d.snap, !0) + ? s(b) && + (c = + this.chart.inverted != this.horiz + ? b.plotX + : this.len - b.plotY) + : (c = this.horiz + ? a.chartX - this.pos + : this.len - a.chartY + this.pos); + c = this.isRadial + ? this.getPlotLinePath(this.isXAxis ? b.x : p(b.stackY, b.y)) + : this.getPlotLinePath(null, null, null, null, c); + if (c === null) this.hideCrosshair(); + else if (this.cross) + this.cross + .attr({ visibility: 'visible' }) + [e ? 'animate' : 'attr']({ d: c }, e); + else { + e = { + 'stroke-width': d.width || 1, + stroke: d.color || '#C0C0C0', + zIndex: d.zIndex || 2 + }; + if (d.dashStyle) e.dashstyle = d.dashStyle; + this.cross = this.chart.renderer.path(c).attr(e).add(); + } + } + }, + hideCrosshair: function () { + this.cross && this.cross.hide(); + } + }; + r(ma.prototype, { + getPlotBandPath: function (a, b) { + var c = this.getPlotLinePath(b), + d = this.getPlotLinePath(a); + d && c ? d.push(c[4], c[5], c[1], c[2]) : (d = null); + return d; + }, + addPlotBand: function (a) { + return this.addPlotBandOrLine(a, 'plotBands'); + }, + addPlotLine: function (a) { + return this.addPlotBandOrLine(a, 'plotLines'); + }, + addPlotBandOrLine: function (a, b) { + var c = new S.PlotLineOrBand(this, a).render(), + d = this.userOptions; + c && + (b && ((d[b] = d[b] || []), d[b].push(a)), + this.plotLinesAndBands.push(c)); + return c; + }, + removePlotBandOrLine: function (a) { + for ( + var b = this.plotLinesAndBands, + c = this.options, + d = this.userOptions, + e = b.length; + e--; + + ) + b[e].id === a && b[e].destroy(); + q( + [ + c.plotLines || [], + d.plotLines || [], + c.plotBands || [], + d.plotBands || [] + ], + function (b) { + for (e = b.length; e--; ) b[e].id === a && ka(b, b[e]); + } + ); + } + }); + ma.prototype.getTimeTicks = function (a, b, c, d) { + var e = [], + f = {}, + g = L.global.useUTC, + h, + i = new Date(b - Ra), + j = a.unitRange, + k = a.count; + if (s(b)) { + j >= B.second && + (i.setMilliseconds(0), + i.setSeconds(j >= B.minute ? 0 : k * U(i.getSeconds() / k))); + if (j >= B.minute) i[Bb](j >= B.hour ? 0 : k * U(i[ob]() / k)); + if (j >= B.hour) i[Cb](j >= B.day ? 0 : k * U(i[pb]() / k)); + if (j >= B.day) i[rb](j >= B.month ? 1 : k * U(i[Wa]() / k)); + j >= B.month && + (i[Db](j >= B.year ? 0 : k * U(i[eb]() / k)), (h = i[fb]())); + j >= B.year && ((h -= h % k), i[Eb](h)); + if (j === B.week) i[rb](i[Wa]() - i[qb]() + p(d, 1)); + b = 1; + Ra && (i = new Date(i.getTime() + Ra)); + h = i[fb](); + for ( + var d = i.getTime(), + l = i[eb](), + m = i[Wa](), + n = g ? Ra : (864e5 + i.getTimezoneOffset() * 6e4) % 864e5; + d < c; + + ) + e.push(d), + j === B.year + ? (d = db(h + b * k, 0)) + : j === B.month + ? (d = db(h, l + b * k)) + : !g && (j === B.day || j === B.week) + ? (d = db(h, l, m + b * k * (j === B.day ? 1 : 7))) + : (d += j * k), + b++; + e.push(d); + q( + vb(e, function (a) { + return j <= B.hour && a % B.day === n; + }), + function (a) { + f[a] = 'day'; + } + ); + } + e.info = r(a, { higherRanks: f, totalRange: j * k }); + return e; + }; + ma.prototype.normalizeTimeTickInterval = function (a, b) { + var c = b || [ + ['millisecond', [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], + ['second', [1, 2, 5, 10, 15, 30]], + ['minute', [1, 2, 5, 10, 15, 30]], + ['hour', [1, 2, 3, 4, 6, 8, 12]], + ['day', [1, 2]], + ['week', [1, 2]], + ['month', [1, 2, 3, 4, 6]], + ['year', null] + ], + d = c[c.length - 1], + e = B[d[0]], + f = d[1], + g; + for (g = 0; g < c.length; g++) + if ( + ((d = c[g]), + (e = B[d[0]]), + (f = d[1]), + c[g + 1] && a <= (e * f[f.length - 1] + B[c[g + 1][0]]) / 2) + ) + break; + e === B.year && a < 5 * e && (f = [1, 2, 5]); + c = mb(a / e, f, d[0] === 'year' ? u(lb(a / e), 1) : 1); + return { unitRange: e, count: c, unitName: d[0] }; + }; + ma.prototype.getLogTickPositions = function (a, b, c, d) { + var e = this.options, + f = this.len, + g = []; + if (!d) this._minorAutoInterval = null; + if (a >= 0.5) (a = v(a)), (g = this.getLinearTickPositions(a, b, c)); + else if (a >= 0.08) + for ( + var f = U(b), + h, + i, + j, + k, + l, + e = + a > 0.3 + ? [1, 2, 4] + : a > 0.15 + ? [1, 2, 4, 6, 8] + : [1, 2, 3, 4, 5, 6, 7, 8, 9]; + f < c + 1 && !l; + f++ + ) { + i = e.length; + for (h = 0; h < i && !l; h++) + (j = za(ja(f) * e[h])), + j > b && (!d || k <= c) && k !== t && g.push(k), + k > c && (l = !0), + (k = j); + } + else if ( + ((b = ja(b)), + (c = ja(c)), + (a = e[d ? 'minorTickInterval' : 'tickInterval']), + (a = p( + a === 'auto' ? null : a, + this._minorAutoInterval, + ((c - b) * (e.tickPixelInterval / (d ? 5 : 1))) / + ((d ? f / this.tickPositions.length : f) || 1) + )), + (a = mb(a, null, lb(a))), + (g = Ua(this.getLinearTickPositions(a, b, c), za)), + !d) + ) + this._minorAutoInterval = a / 5; + if (!d) this.tickInterval = a; + return g; + }; + var Mb = (S.Tooltip = function () { + this.init.apply(this, arguments); + }); + Mb.prototype = { + init: function (a, b) { + var c = b.borderWidth, + d = b.style, + e = z(d.padding); + this.chart = a; + this.options = b; + this.crosshairs = []; + this.now = { x: 0, y: 0 }; + this.isHidden = !0; + this.label = a.renderer + .label( + '', + 0, + 0, + b.shape || 'callout', + null, + null, + b.useHTML, + null, + 'tooltip' + ) + .attr({ + padding: e, + fill: b.backgroundColor, + 'stroke-width': c, + r: b.borderRadius, + zIndex: 8 + }) + .css(d) + .css({ padding: 0 }) + .add() + .attr({ y: -9999 }); + ga || this.label.shadow(b.shadow); + this.shared = b.shared; + }, + destroy: function () { + if (this.label) this.label = this.label.destroy(); + clearTimeout(this.hideTimer); + clearTimeout(this.tooltipTimeout); + }, + move: function (a, b, c, d) { + var e = this, + f = e.now, + g = + e.options.animation !== !1 && + !e.isHidden && + (Q(a - f.x) > 1 || Q(b - f.y) > 1), + h = e.followPointer || e.len > 1; + r(f, { + x: g ? (2 * f.x + a) / 3 : a, + y: g ? (f.y + b) / 2 : b, + anchorX: h ? t : g ? (2 * f.anchorX + c) / 3 : c, + anchorY: h ? t : g ? (f.anchorY + d) / 2 : d + }); + e.label.attr(f); + if (g) + clearTimeout(this.tooltipTimeout), + (this.tooltipTimeout = setTimeout(function () { + e && e.move(a, b, c, d); + }, 32)); + }, + hide: function () { + var a = this, + b; + clearTimeout(this.hideTimer); + if (!this.isHidden) + (b = this.chart.hoverPoints), + (this.hideTimer = setTimeout(function () { + a.label.fadeOut(); + a.isHidden = !0; + }, p(this.options.hideDelay, 500))), + b && + q(b, function (a) { + a.setState(); + }), + (this.chart.hoverPoints = null); + }, + getAnchor: function (a, b) { + var c, + d = this.chart, + e = d.inverted, + f = d.plotTop, + g = 0, + h = 0, + i, + a = ra(a); + c = a[0].tooltipPos; + this.followPointer && + b && + (b.chartX === t && (b = d.pointer.normalize(b)), + (c = [b.chartX - d.plotLeft, b.chartY - f])); + c || + (q(a, function (a) { + i = a.series.yAxis; + g += a.plotX; + h += + (a.plotLow ? (a.plotLow + a.plotHigh) / 2 : a.plotY) + + (!e && i ? i.top - f : 0); + }), + (g /= a.length), + (h /= a.length), + (c = [ + e ? d.plotWidth - h : g, + this.shared && !e && a.length > 1 && b + ? b.chartY - f + : e + ? d.plotHeight - g + : h + ])); + return Ua(c, v); + }, + getPosition: function (a, b, c) { + var d = this.chart, + e = this.distance, + f = {}, + g, + h = ['y', d.chartHeight, b, c.plotY + d.plotTop], + i = ['x', d.chartWidth, a, c.plotX + d.plotLeft], + j = + c.ttBelow || + (d.inverted && !c.negative) || + (!d.inverted && c.negative), + k = function (a, b, c, d) { + var g = c < d - e, + b = d + e + c < b, + c = d - e - c; + d += e; + if (j && b) f[a] = d; + else if (!j && g) f[a] = c; + else if (g) f[a] = c; + else if (b) f[a] = d; + else return !1; + }, + l = function (a, b, c, d) { + if (d < e || d > b - e) return !1; + else f[a] = d < c / 2 ? 1 : d > b - c / 2 ? b - c - 2 : d - c / 2; + }, + m = function (a) { + var b = h; + h = i; + i = b; + g = a; + }, + n = function () { + k.apply(0, h) !== !1 + ? l.apply(0, i) === !1 && !g && (m(!0), n()) + : g + ? (f.x = f.y = 0) + : (m(!0), n()); + }; + (d.inverted || this.len > 1) && m(); + n(); + return f; + }, + defaultFormatter: function (a) { + var b = this.points || ra(this), + c = b[0].series, + d; + d = [a.tooltipHeaderFormatter(b[0])]; + q(b, function (a) { + c = a.series; + d.push( + (c.tooltipFormatter && c.tooltipFormatter(a)) || + a.point.tooltipFormatter(c.tooltipOptions.pointFormat) + ); + }); + d.push(a.options.footerFormat || ''); + return d.join(''); + }, + refresh: function (a, b) { + var c = this.chart, + d = this.label, + e = this.options, + f, + g, + h = {}, + i, + j = []; + i = e.formatter || this.defaultFormatter; + var h = c.hoverPoints, + k, + l = this.shared; + clearTimeout(this.hideTimer); + this.followPointer = ra(a)[0].series.tooltipOptions.followPointer; + g = this.getAnchor(a, b); + f = g[0]; + g = g[1]; + l && (!a.series || !a.series.noSharedTooltip) + ? ((c.hoverPoints = a), + h && + q(h, function (a) { + a.setState(); + }), + q(a, function (a) { + a.setState('hover'); + j.push(a.getLabelConfig()); + }), + (h = { x: a[0].category, y: a[0].y }), + (h.points = j), + (this.len = j.length), + (a = a[0])) + : (h = a.getLabelConfig()); + i = i.call(h, this); + h = a.series; + this.distance = p(h.tooltipOptions.distance, 16); + i === !1 + ? this.hide() + : (this.isHidden && (ab(d), d.attr('opacity', 1).show()), + d.attr({ text: i }), + (k = e.borderColor || a.color || h.color || '#606060'), + d.attr({ stroke: k }), + this.updatePosition({ + plotX: f, + plotY: g, + negative: a.negative, + ttBelow: a.ttBelow + }), + (this.isHidden = !1)); + K(c, 'tooltipRefresh', { + text: i, + x: f + c.plotLeft, + y: g + c.plotTop, + borderColor: k + }); + }, + updatePosition: function (a) { + var b = this.chart, + c = this.label, + c = (this.options.positioner || this.getPosition).call( + this, + c.width, + c.height, + a + ); + this.move(v(c.x), v(c.y), a.plotX + b.plotLeft, a.plotY + b.plotTop); + }, + tooltipHeaderFormatter: function (a) { + var b = a.series, + c = b.tooltipOptions, + d = c.dateTimeLabelFormats, + e = c.xDateFormat, + f = b.xAxis, + g = f && f.options.type === 'datetime' && ia(a.key), + c = c.headerFormat, + f = f && f.closestPointRange, + h; + if (g && !e) { + if (f) + for (h in B) { + if (B[h] >= f || (B[h] <= B.day && a.key % B[h] > 0)) { + e = d[h]; + break; + } + } + else e = d.day; + e = e || d.year; + } + g && e && (c = c.replace('{point.key}', '{point.key:' + e + '}')); + return Ia(c, { point: a, series: b }); + } + }; + var pa; + Za = x.documentElement.ontouchstart !== t; + var Va = (S.Pointer = function (a, b) { + this.init(a, b); + }); + Va.prototype = { + init: function (a, b) { + var c = b.chart, + d = c.events, + e = ga ? '' : c.zoomType, + c = a.inverted, + f; + this.options = b; + this.chart = a; + this.zoomX = f = /x/.test(e); + this.zoomY = e = /y/.test(e); + this.zoomHor = (f && !c) || (e && c); + this.zoomVert = (e && !c) || (f && c); + this.hasZoom = f || e; + this.runChartClick = d && !!d.click; + this.pinchDown = []; + this.lastValidTouch = {}; + if (S.Tooltip && b.tooltip.enabled) + (a.tooltip = new Mb(a, b.tooltip)), + (this.followTouchMove = b.tooltip.followTouchMove); + this.setDOMEvents(); + }, + normalize: function (a, b) { + var c, + d, + a = a || window.event, + a = Sb(a); + if (!a.target) a.target = a.srcElement; + d = a.touches + ? a.touches.length + ? a.touches.item(0) + : a.changedTouches[0] + : a; + if (!b) this.chartPosition = b = Rb(this.chart.container); + d.pageX === t + ? ((c = u(a.x, a.clientX - b.left)), (d = a.y)) + : ((c = d.pageX - b.left), (d = d.pageY - b.top)); + return r(a, { chartX: v(c), chartY: v(d) }); + }, + getCoordinates: function (a) { + var b = { xAxis: [], yAxis: [] }; + q(this.chart.axes, function (c) { + b[c.isXAxis ? 'xAxis' : 'yAxis'].push({ + axis: c, + value: c.toValue(a[c.horiz ? 'chartX' : 'chartY']) + }); + }); + return b; + }, + getIndex: function (a) { + var b = this.chart; + return b.inverted + ? b.plotHeight + b.plotTop - a.chartY + : a.chartX - b.plotLeft; + }, + runPointActions: function (a) { + var b = this.chart, + c = b.series, + d = b.tooltip, + e, + f, + g = b.hoverPoint, + h = b.hoverSeries, + i, + j, + k = b.chartWidth, + l = this.getIndex(a); + if (d && this.options.tooltip.shared && (!h || !h.noSharedTooltip)) { + f = []; + i = c.length; + for (j = 0; j < i; j++) + if ( + c[j].visible && + c[j].options.enableMouseTracking !== !1 && + !c[j].noSharedTooltip && + c[j].singularTooltips !== !0 && + c[j].tooltipPoints.length && + (e = c[j].tooltipPoints[l]) && + e.series + ) + (e._dist = Q(l - e.clientX)), (k = C(k, e._dist)), f.push(e); + for (i = f.length; i--; ) f[i]._dist > k && f.splice(i, 1); + if (f.length && f[0].clientX !== this.hoverX) + d.refresh(f, a), (this.hoverX = f[0].clientX); + } + c = h && h.tooltipOptions.followPointer; + if (h && h.tracker && !c) { + if ((e = h.tooltipPoints[l]) && e !== g) e.onMouseOver(a); + } else + d && + c && + !d.isHidden && + ((h = d.getAnchor([{}], a)), + d.updatePosition({ plotX: h[0], plotY: h[1] })); + if (d && !this._onDocumentMouseMove) + (this._onDocumentMouseMove = function (a) { + if (W[pa]) W[pa].pointer.onDocumentMouseMove(a); + }), + N(x, 'mousemove', this._onDocumentMouseMove); + q(b.axes, function (b) { + b.drawCrosshair(a, p(e, g)); + }); + }, + reset: function (a) { + var b = this.chart, + c = b.hoverSeries, + d = b.hoverPoint, + e = b.tooltip, + f = e && e.shared ? b.hoverPoints : d; + (a = a && e && f) && ra(f)[0].plotX === t && (a = !1); + if (a) e.refresh(f), d && d.setState(d.state, !0); + else { + if (d) d.onMouseOut(); + if (c) c.onMouseOut(); + e && e.hide(); + if (this._onDocumentMouseMove) + X(x, 'mousemove', this._onDocumentMouseMove), + (this._onDocumentMouseMove = null); + q(b.axes, function (a) { + a.hideCrosshair(); + }); + this.hoverX = null; + } + }, + scaleGroups: function (a, b) { + var c = this.chart, + d; + q(c.series, function (e) { + d = a || e.getPlotBox(); + e.xAxis && + e.xAxis.zoomEnabled && + (e.group.attr(d), + e.markerGroup && + (e.markerGroup.attr(d), e.markerGroup.clip(b ? c.clipRect : null)), + e.dataLabelsGroup && e.dataLabelsGroup.attr(d)); + }); + c.clipRect.attr(b || c.clipBox); + }, + dragStart: function (a) { + var b = this.chart; + b.mouseIsDown = a.type; + b.cancelClick = !1; + b.mouseDownX = this.mouseDownX = a.chartX; + b.mouseDownY = this.mouseDownY = a.chartY; + }, + drag: function (a) { + var b = this.chart, + c = b.options.chart, + d = a.chartX, + e = a.chartY, + f = this.zoomHor, + g = this.zoomVert, + h = b.plotLeft, + i = b.plotTop, + j = b.plotWidth, + k = b.plotHeight, + l, + m = this.mouseDownX, + n = this.mouseDownY, + o = c.panKey && a[c.panKey + 'Key']; + d < h ? (d = h) : d > h + j && (d = h + j); + e < i ? (e = i) : e > i + k && (e = i + k); + this.hasDragged = Math.sqrt(Math.pow(m - d, 2) + Math.pow(n - e, 2)); + if (this.hasDragged > 10) { + l = b.isInsidePlot(m - h, n - i); + if ( + b.hasCartesianSeries && + (this.zoomX || this.zoomY) && + l && + !o && + !this.selectionMarker + ) + this.selectionMarker = b.renderer + .rect(h, i, f ? 1 : j, g ? 1 : k, 0) + .attr({ + fill: c.selectionMarkerFill || 'rgba(69,114,167,0.25)', + zIndex: 7 + }) + .add(); + this.selectionMarker && + f && + ((d -= m), + this.selectionMarker.attr({ width: Q(d), x: (d > 0 ? 0 : d) + m })); + this.selectionMarker && + g && + ((d = e - n), + this.selectionMarker.attr({ height: Q(d), y: (d > 0 ? 0 : d) + n })); + l && !this.selectionMarker && c.panning && b.pan(a, c.panning); + } + }, + drop: function (a) { + var b = this.chart, + c = this.hasPinched; + if (this.selectionMarker) { + var d = { xAxis: [], yAxis: [], originalEvent: a.originalEvent || a }, + e = this.selectionMarker, + f = e.attr ? e.attr('x') : e.x, + g = e.attr ? e.attr('y') : e.y, + h = e.attr ? e.attr('width') : e.width, + i = e.attr ? e.attr('height') : e.height, + j; + if (this.hasDragged || c) + q(b.axes, function (b) { + if (b.zoomEnabled) { + var c = b.horiz, + e = a.type === 'touchend' ? b.minPixelPadding : 0, + n = b.toValue((c ? f : g) + e), + c = b.toValue((c ? f + h : g + i) - e); + !isNaN(n) && + !isNaN(c) && + (d[b.coll].push({ axis: b, min: C(n, c), max: u(n, c) }), + (j = !0)); + } + }), + j && + K(b, 'selection', d, function (a) { + b.zoom(r(a, c ? { animation: !1 } : null)); + }); + this.selectionMarker = this.selectionMarker.destroy(); + c && this.scaleGroups(); + } + if (b) + A(b.container, { cursor: b._cursor }), + (b.cancelClick = this.hasDragged > 10), + (b.mouseIsDown = this.hasDragged = this.hasPinched = !1), + (this.pinchDown = []); + }, + onContainerMouseDown: function (a) { + a = this.normalize(a); + a.preventDefault && a.preventDefault(); + this.dragStart(a); + }, + onDocumentMouseUp: function (a) { + W[pa] && W[pa].pointer.drop(a); + }, + onDocumentMouseMove: function (a) { + var b = this.chart, + c = this.chartPosition, + d = b.hoverSeries, + a = this.normalize(a, c); + c && + d && + !this.inClass(a.target, 'highcharts-tracker') && + !b.isInsidePlot(a.chartX - b.plotLeft, a.chartY - b.plotTop) && + this.reset(); + }, + onContainerMouseLeave: function () { + var a = W[pa]; + if (a) a.pointer.reset(), (a.pointer.chartPosition = null); + }, + onContainerMouseMove: function (a) { + var b = this.chart; + pa = b.index; + a = this.normalize(a); + a.returnValue = !1; + b.mouseIsDown === 'mousedown' && this.drag(a); + (this.inClass(a.target, 'highcharts-tracker') || + b.isInsidePlot(a.chartX - b.plotLeft, a.chartY - b.plotTop)) && + !b.openMenu && + this.runPointActions(a); + }, + inClass: function (a, b) { + for (var c; a; ) { + if ((c = F(a, 'class'))) + if (c.indexOf(b) !== -1) return !0; + else if (c.indexOf('highcharts-container') !== -1) return !1; + a = a.parentNode; + } + }, + onTrackerMouseOut: function (a) { + var b = this.chart.hoverSeries, + c = (a = a.relatedTarget || a.toElement) && a.point && a.point.series; + if ( + b && + !b.options.stickyTracking && + !this.inClass(a, 'highcharts-tooltip') && + c !== b + ) + b.onMouseOut(); + }, + onContainerClick: function (a) { + var b = this.chart, + c = b.hoverPoint, + d = b.plotLeft, + e = b.plotTop, + a = this.normalize(a); + a.cancelBubble = !0; + b.cancelClick || + (c && this.inClass(a.target, 'highcharts-tracker') + ? (K(c.series, 'click', r(a, { point: c })), + b.hoverPoint && c.firePointEvent('click', a)) + : (r(a, this.getCoordinates(a)), + b.isInsidePlot(a.chartX - d, a.chartY - e) && K(b, 'click', a))); + }, + setDOMEvents: function () { + var a = this, + b = a.chart.container; + b.onmousedown = function (b) { + a.onContainerMouseDown(b); + }; + b.onmousemove = function (b) { + a.onContainerMouseMove(b); + }; + b.onclick = function (b) { + a.onContainerClick(b); + }; + N(b, 'mouseleave', a.onContainerMouseLeave); + $a === 1 && N(x, 'mouseup', a.onDocumentMouseUp); + if (Za) + (b.ontouchstart = function (b) { + a.onContainerTouchStart(b); + }), + (b.ontouchmove = function (b) { + a.onContainerTouchMove(b); + }), + $a === 1 && N(x, 'touchend', a.onDocumentTouchEnd); + }, + destroy: function () { + var a; + X(this.chart.container, 'mouseleave', this.onContainerMouseLeave); + $a || + (X(x, 'mouseup', this.onDocumentMouseUp), + X(x, 'touchend', this.onDocumentTouchEnd)); + clearInterval(this.tooltipTimeout); + for (a in this) this[a] = null; + } + }; + r(S.Pointer.prototype, { + pinchTranslate: function (a, b, c, d, e, f) { + (this.zoomHor || this.pinchHor) && + this.pinchTranslateDirection(!0, a, b, c, d, e, f); + (this.zoomVert || this.pinchVert) && + this.pinchTranslateDirection(!1, a, b, c, d, e, f); + }, + pinchTranslateDirection: function (a, b, c, d, e, f, g, h) { + var i = this.chart, + j = a ? 'x' : 'y', + k = a ? 'X' : 'Y', + l = 'chart' + k, + m = a ? 'width' : 'height', + n = i['plot' + (a ? 'Left' : 'Top')], + o, + p, + q = h || 1, + r = i.inverted, + D = i.bounds[a ? 'h' : 'v'], + u = b.length === 1, + s = b[0][l], + v = c[0][l], + t = !u && b[1][l], + w = !u && c[1][l], + x, + c = function () { + !u && Q(s - t) > 20 && (q = h || Q(v - w) / Q(s - t)); + p = (n - v) / q + s; + o = i['plot' + (a ? 'Width' : 'Height')] / q; + }; + c(); + b = p; + b < D.min + ? ((b = D.min), (x = !0)) + : b + o > D.max && ((b = D.max - o), (x = !0)); + x + ? ((v -= 0.8 * (v - g[j][0])), u || (w -= 0.8 * (w - g[j][1])), c()) + : (g[j] = [v, w]); + r || ((f[j] = p - n), (f[m] = o)); + f = r ? 1 / q : q; + e[m] = o; + e[j] = b; + d[r ? (a ? 'scaleY' : 'scaleX') : 'scale' + k] = q; + d['translate' + k] = f * n + (v - f * s); + }, + pinch: function (a) { + var b = this, + c = b.chart, + d = b.pinchDown, + e = b.followTouchMove, + f = a.touches, + g = f.length, + h = b.lastValidTouch, + i = b.hasZoom, + j = b.selectionMarker, + k = {}, + l = + g === 1 && + ((b.inClass(a.target, 'highcharts-tracker') && c.runTrackerClick) || + c.runChartClick), + m = {}; + (i || e) && !l && a.preventDefault(); + Ua(f, function (a) { + return b.normalize(a); + }); + if (a.type === 'touchstart') + q(f, function (a, b) { + d[b] = { chartX: a.chartX, chartY: a.chartY }; + }), + (h.x = [d[0].chartX, d[1] && d[1].chartX]), + (h.y = [d[0].chartY, d[1] && d[1].chartY]), + q(c.axes, function (a) { + if (a.zoomEnabled) { + var b = c.bounds[a.horiz ? 'h' : 'v'], + d = a.minPixelPadding, + e = a.toPixels(p(a.options.min, a.dataMin)), + f = a.toPixels(p(a.options.max, a.dataMax)), + g = C(e, f), + e = u(e, f); + b.min = C(a.pos, g - d); + b.max = u(a.pos + a.len, e + d); + } + }); + else if (d.length) { + if (!j) b.selectionMarker = j = r({ destroy: sa }, c.plotBox); + b.pinchTranslate(d, f, k, j, m, h); + b.hasPinched = i; + b.scaleGroups(k, m); + !i && e && g === 1 && this.runPointActions(b.normalize(a)); + } + }, + onContainerTouchStart: function (a) { + var b = this.chart; + pa = b.index; + a.touches.length === 1 + ? ((a = this.normalize(a)), + b.isInsidePlot(a.chartX - b.plotLeft, a.chartY - b.plotTop) + ? (this.runPointActions(a), this.pinch(a)) + : this.reset()) + : a.touches.length === 2 && this.pinch(a); + }, + onContainerTouchMove: function (a) { + (a.touches.length === 1 || a.touches.length === 2) && this.pinch(a); + }, + onDocumentTouchEnd: function (a) { + W[pa] && W[pa].pointer.drop(a); + } + }); + if (H.PointerEvent || H.MSPointerEvent) { + var ua = {}, + yb = !!H.PointerEvent, + Wb = function () { + var a, + b = []; + b.item = function (a) { + return this[a]; + }; + for (a in ua) + ua.hasOwnProperty(a) && + b.push({ + pageX: ua[a].pageX, + pageY: ua[a].pageY, + target: ua[a].target + }); + return b; + }, + zb = function (a, b, c, d) { + a = a.originalEvent || a; + if ( + (a.pointerType === 'touch' || + a.pointerType === a.MSPOINTER_TYPE_TOUCH) && + W[pa] + ) + d(a), + (d = W[pa].pointer), + d[b]({ + type: c, + target: a.currentTarget, + preventDefault: sa, + touches: Wb() + }); + }; + r(Va.prototype, { + onContainerPointerDown: function (a) { + zb(a, 'onContainerTouchStart', 'touchstart', function (a) { + ua[a.pointerId] = { + pageX: a.pageX, + pageY: a.pageY, + target: a.currentTarget + }; + }); + }, + onContainerPointerMove: function (a) { + zb(a, 'onContainerTouchMove', 'touchmove', function (a) { + ua[a.pointerId] = { pageX: a.pageX, pageY: a.pageY }; + if (!ua[a.pointerId].target) ua[a.pointerId].target = a.currentTarget; + }); + }, + onDocumentPointerUp: function (a) { + zb(a, 'onContainerTouchEnd', 'touchend', function (a) { + delete ua[a.pointerId]; + }); + }, + batchMSEvents: function (a) { + a( + this.chart.container, + yb ? 'pointerdown' : 'MSPointerDown', + this.onContainerPointerDown + ); + a( + this.chart.container, + yb ? 'pointermove' : 'MSPointerMove', + this.onContainerPointerMove + ); + a(x, yb ? 'pointerup' : 'MSPointerUp', this.onDocumentPointerUp); + } + }); + Ma(Va.prototype, 'init', function (a, b, c) { + a.call(this, b, c); + (this.hasZoom || this.followTouchMove) && + A(b.container, { '-ms-touch-action': P, 'touch-action': P }); + }); + Ma(Va.prototype, 'setDOMEvents', function (a) { + a.apply(this); + (this.hasZoom || this.followTouchMove) && this.batchMSEvents(N); + }); + Ma(Va.prototype, 'destroy', function (a) { + this.batchMSEvents(X); + a.call(this); + }); + } + var kb = (S.Legend = function (a, b) { + this.init(a, b); + }); + kb.prototype = { + init: function (a, b) { + var c = this, + d = b.itemStyle, + e = p(b.padding, 8), + f = b.itemMarginTop || 0; + this.options = b; + if (b.enabled) + (c.itemStyle = d), + (c.itemHiddenStyle = w(d, b.itemHiddenStyle)), + (c.itemMarginTop = f), + (c.padding = e), + (c.initialItemX = e), + (c.initialItemY = e - 5), + (c.maxItemWidth = 0), + (c.chart = a), + (c.itemHeight = 0), + (c.lastLineHeight = 0), + (c.symbolWidth = p(b.symbolWidth, 16)), + (c.pages = []), + c.render(), + N(c.chart, 'endResize', function () { + c.positionCheckboxes(); + }); + }, + colorizeItem: function (a, b) { + var c = this.options, + d = a.legendItem, + e = a.legendLine, + f = a.legendSymbol, + g = this.itemHiddenStyle.color, + c = b ? c.itemStyle.color : g, + h = b ? a.legendColor || a.color || '#CCC' : g, + g = a.options && a.options.marker, + i = { fill: h }, + j; + d && d.css({ fill: c, color: c }); + e && e.attr({ stroke: h }); + if (f) { + if (g && f.isMarker) + for (j in ((i.stroke = h), (g = a.convertAttribs(g)), g)) + (d = g[j]), d !== t && (i[j] = d); + f.attr(i); + } + }, + positionItem: function (a) { + var b = this.options, + c = b.symbolPadding, + b = !b.rtl, + d = a._legendItemPos, + e = d[0], + d = d[1], + f = a.checkbox; + a.legendGroup && + a.legendGroup.translate(b ? e : this.legendWidth - e - 2 * c - 4, d); + if (f) (f.x = e), (f.y = d); + }, + destroyItem: function (a) { + var b = a.checkbox; + q( + ['legendItem', 'legendLine', 'legendSymbol', 'legendGroup'], + function (b) { + a[b] && (a[b] = a[b].destroy()); + } + ); + b && Pa(a.checkbox); + }, + destroy: function () { + var a = this.group, + b = this.box; + if (b) this.box = b.destroy(); + if (a) this.group = a.destroy(); + }, + positionCheckboxes: function (a) { + var b = this.group.alignAttr, + c, + d = this.clipHeight || this.legendHeight; + if (b) + (c = b.translateY), + q(this.allItems, function (e) { + var f = e.checkbox, + g; + f && + ((g = c + f.y + (a || 0) + 3), + A(f, { + left: b.translateX + e.checkboxOffset + f.x - 20 + 'px', + top: g + 'px', + display: g > c - 6 && g < c + d - 6 ? '' : P + })); + }); + }, + renderTitle: function () { + var a = this.padding, + b = this.options.title, + c = 0; + if (b.text) { + if (!this.title) + this.title = this.chart.renderer + .label( + b.text, + a - 3, + a - 4, + null, + null, + null, + null, + null, + 'legend-title' + ) + .attr({ zIndex: 1 }) + .css(b.style) + .add(this.group); + a = this.title.getBBox(); + c = a.height; + this.offsetWidth = a.width; + this.contentGroup.attr({ translateY: c }); + } + this.titleHeight = c; + }, + renderItem: function (a) { + var b = this.chart, + c = b.renderer, + d = this.options, + e = d.layout === 'horizontal', + f = this.symbolWidth, + g = d.symbolPadding, + h = this.itemStyle, + i = this.itemHiddenStyle, + j = this.padding, + k = e ? p(d.itemDistance, 20) : 0, + l = !d.rtl, + m = d.width, + n = d.itemMarginBottom || 0, + o = this.itemMarginTop, + q = this.initialItemX, + r = a.legendItem, + s = a.series && a.series.drawLegendSymbol ? a.series : a, + D = s.options, + D = this.createCheckboxForItem && D && D.showCheckbox, + t = d.useHTML; + if (!r) { + a.legendGroup = c + .g('legend-item') + .attr({ zIndex: 1 }) + .add(this.scrollGroup); + a.legendItem = r = c + .text( + d.labelFormat ? Ia(d.labelFormat, a) : d.labelFormatter.call(a), + l ? f + g : -g, + this.baseline || 0, + t + ) + .css(w(a.visible ? h : i)) + .attr({ align: l ? 'left' : 'right', zIndex: 2 }) + .add(a.legendGroup); + if (!this.baseline) + (this.baseline = c.fontMetrics(h.fontSize, r).f + 3 + o), + r.attr('y', this.baseline); + s.drawLegendSymbol(this, a); + this.setItemEvents && this.setItemEvents(a, r, t, h, i); + this.colorizeItem(a, a.visible); + D && this.createCheckboxForItem(a); + } + c = r.getBBox(); + f = a.checkboxOffset = + d.itemWidth || a.legendItemWidth || f + g + c.width + k + (D ? 20 : 0); + this.itemHeight = g = v(a.legendItemHeight || c.height); + if (e && this.itemX - q + f > (m || b.chartWidth - 2 * j - q - d.x)) + (this.itemX = q), + (this.itemY += o + this.lastLineHeight + n), + (this.lastLineHeight = 0); + this.maxItemWidth = u(this.maxItemWidth, f); + this.lastItemY = o + this.itemY + n; + this.lastLineHeight = u(g, this.lastLineHeight); + a._legendItemPos = [this.itemX, this.itemY]; + e + ? (this.itemX += f) + : ((this.itemY += o + g + n), (this.lastLineHeight = g)); + this.offsetWidth = + m || u((e ? this.itemX - q - k : f) + j, this.offsetWidth); + }, + getAllItems: function () { + var a = []; + q(this.chart.series, function (b) { + var c = b.options; + if (p(c.showInLegend, !s(c.linkedTo) ? t : !1, !0)) + a = a.concat( + b.legendItems || (c.legendType === 'point' ? b.data : b) + ); + }); + return a; + }, + render: function () { + var a = this, + b = a.chart, + c = b.renderer, + d = a.group, + e, + f, + g, + h, + i = a.box, + j = a.options, + k = a.padding, + l = j.borderWidth, + m = j.backgroundColor; + a.itemX = a.initialItemX; + a.itemY = a.initialItemY; + a.offsetWidth = 0; + a.lastItemY = 0; + if (!d) + (a.group = d = c.g('legend').attr({ zIndex: 7 }).add()), + (a.contentGroup = c.g().attr({ zIndex: 1 }).add(d)), + (a.scrollGroup = c.g().add(a.contentGroup)); + a.renderTitle(); + e = a.getAllItems(); + nb(e, function (a, b) { + return ( + ((a.options && a.options.legendIndex) || 0) - + ((b.options && b.options.legendIndex) || 0) + ); + }); + j.reversed && e.reverse(); + a.allItems = e; + a.display = f = !!e.length; + q(e, function (b) { + a.renderItem(b); + }); + g = j.width || a.offsetWidth; + h = a.lastItemY + a.lastLineHeight + a.titleHeight; + h = a.handleOverflow(h); + if (l || m) { + g += k; + h += k; + if (i) { + if (g > 0 && h > 0) + i[i.isNew ? 'attr' : 'animate'](i.crisp({ width: g, height: h })), + (i.isNew = !1); + } else + (a.box = i = + c + .rect(0, 0, g, h, j.borderRadius, l || 0) + .attr({ + stroke: j.borderColor, + 'stroke-width': l || 0, + fill: m || P + }) + .add(d) + .shadow(j.shadow)), + (i.isNew = !0); + i[f ? 'show' : 'hide'](); + } + a.legendWidth = g; + a.legendHeight = h; + q(e, function (b) { + a.positionItem(b); + }); + f && d.align(r({ width: g, height: h }, j), !0, 'spacingBox'); + b.isResizing || this.positionCheckboxes(); + }, + handleOverflow: function (a) { + var b = this, + c = this.chart, + d = c.renderer, + e = this.options, + f = e.y, + f = + c.spacingBox.height + + (e.verticalAlign === 'top' ? -f : f) - + this.padding, + g = e.maxHeight, + h, + i = this.clipRect, + j = e.navigation, + k = p(j.animation, !0), + l = j.arrowSize || 12, + m = this.nav, + n = this.pages, + o, + r = this.allItems; + e.layout === 'horizontal' && (f /= 2); + g && (f = C(f, g)); + n.length = 0; + if (a > f && !e.useHTML) { + this.clipHeight = h = u(f - 20 - this.titleHeight - this.padding, 0); + this.currentPage = p(this.currentPage, 1); + this.fullHeight = a; + q(r, function (a, b) { + var c = a._legendItemPos[1], + d = v(a.legendItem.getBBox().height), + e = n.length; + if (!e || (c - n[e - 1] > h && (o || c) !== n[e - 1])) + n.push(o || c), e++; + b === r.length - 1 && c + d - n[e - 1] > h && n.push(c); + c !== o && (o = c); + }); + if (!i) + (i = b.clipRect = d.clipRect(0, this.padding, 9999, 0)), + b.contentGroup.clip(i); + i.attr({ height: h }); + if (!m) + (this.nav = m = d.g().attr({ zIndex: 1 }).add(this.group)), + (this.up = d + .symbol('triangle', 0, 0, l, l) + .on('click', function () { + b.scroll(-1, k); + }) + .add(m)), + (this.pager = d.text('', 15, 10).css(j.style).add(m)), + (this.down = d + .symbol('triangle-down', 0, 0, l, l) + .on('click', function () { + b.scroll(1, k); + }) + .add(m)); + b.scroll(0); + a = f; + } else if (m) + i.attr({ height: c.chartHeight }), + m.hide(), + this.scrollGroup.attr({ translateY: 1 }), + (this.clipHeight = 0); + return a; + }, + scroll: function (a, b) { + var c = this.pages, + d = c.length, + e = this.currentPage + a, + f = this.clipHeight, + g = this.options.navigation, + h = g.activeColor, + g = g.inactiveColor, + i = this.pager, + j = this.padding; + e > d && (e = d); + if (e > 0) + b !== t && Qa(b, this.chart), + this.nav.attr({ + translateX: j, + translateY: f + this.padding + 7 + this.titleHeight, + visibility: 'visible' + }), + this.up + .attr({ fill: e === 1 ? g : h }) + .css({ cursor: e === 1 ? 'default' : 'pointer' }), + i.attr({ text: e + '/' + d }), + this.down + .attr({ x: 18 + this.pager.getBBox().width, fill: e === d ? g : h }) + .css({ cursor: e === d ? 'default' : 'pointer' }), + (c = -c[e - 1] + this.initialItemY), + this.scrollGroup.animate({ translateY: c }), + (this.currentPage = e), + this.positionCheckboxes(c); + } + }; + M = S.LegendSymbolMixin = { + drawRectangle: function (a, b) { + var c = a.options.symbolHeight || 12; + b.legendSymbol = this.chart.renderer + .rect( + 0, + a.baseline - 5 - c / 2, + a.symbolWidth, + c, + a.options.symbolRadius || 0 + ) + .attr({ zIndex: 3 }) + .add(b.legendGroup); + }, + drawLineMarker: function (a) { + var b = this.options, + c = b.marker, + d; + d = a.symbolWidth; + var e = this.chart.renderer, + f = this.legendGroup, + a = + a.baseline - + v( + e.fontMetrics(a.options.itemStyle.fontSize, this.legendItem).b * 0.3 + ), + g; + if (b.lineWidth) { + g = { 'stroke-width': b.lineWidth }; + if (b.dashStyle) g.dashstyle = b.dashStyle; + this.legendLine = e.path(['M', 0, a, 'L', d, a]).attr(g).add(f); + } + if (c && c.enabled !== !1) + (b = c.radius), + (this.legendSymbol = d = + e.symbol(this.symbol, d / 2 - b, a - b, 2 * b, 2 * b).add(f)), + (d.isMarker = !0); + } + }; + (/Trident\/7\.0/.test(wa) || Ta) && + Ma(kb.prototype, 'positionItem', function (a, b) { + var c = this, + d = function () { + b._legendItemPos && a.call(c, b); + }; + d(); + setTimeout(d); + }); + Xa.prototype = { + init: function (a, b) { + var c, + d = a.series; + a.series = null; + c = w(L, a); + c.series = a.series = d; + this.userOptions = a; + d = c.chart; + this.margin = this.splashArray('margin', d); + this.spacing = this.splashArray('spacing', d); + var e = d.events; + this.bounds = { h: {}, v: {} }; + this.callback = b; + this.isResizing = 0; + this.options = c; + this.axes = []; + this.series = []; + this.hasCartesianSeries = d.showAxes; + var f = this, + g; + f.index = W.length; + W.push(f); + $a++; + d.reflow !== !1 && + N(f, 'load', function () { + f.initReflow(); + }); + if (e) for (g in e) N(f, g, e[g]); + f.xAxis = []; + f.yAxis = []; + f.animation = ga ? !1 : p(d.animation, !0); + f.pointCount = f.colorCounter = f.symbolCounter = 0; + f.firstRender(); + }, + initSeries: function (a) { + var b = this.options.chart; + (b = J[a.type || b.type || b.defaultSeriesType]) || oa(17, !0); + b = new b(); + b.init(this, a); + return b; + }, + isInsidePlot: function (a, b, c) { + var d = c ? b : a, + a = c ? a : b; + return d >= 0 && d <= this.plotWidth && a >= 0 && a <= this.plotHeight; + }, + adjustTickAmounts: function () { + this.options.chart.alignTicks !== !1 && + q(this.axes, function (a) { + a.adjustTickAmount(); + }); + this.maxTicks = null; + }, + redraw: function (a) { + var b = this.axes, + c = this.series, + d = this.pointer, + e = this.legend, + f = this.isDirtyLegend, + g, + h, + i = this.hasCartesianSeries, + j = this.isDirtyBox, + k = c.length, + l = k, + m = this.renderer, + n = m.isHidden(), + o = []; + Qa(a, this); + n && this.cloneRenderTo(); + for (this.layOutTitles(); l--; ) + if (((a = c[l]), a.options.stacking && ((g = !0), a.isDirty))) { + h = !0; + break; + } + if (h) + for (l = k; l--; ) if (((a = c[l]), a.options.stacking)) a.isDirty = !0; + q(c, function (a) { + a.isDirty && a.options.legendType === 'point' && (f = !0); + }); + if (f && e.options.enabled) e.render(), (this.isDirtyLegend = !1); + g && this.getStacks(); + if (i) { + if (!this.isResizing) + (this.maxTicks = null), + q(b, function (a) { + a.setScale(); + }); + this.adjustTickAmounts(); + } + this.getMargins(); + i && + (q(b, function (a) { + a.isDirty && (j = !0); + }), + q(b, function (a) { + if (a.isDirtyExtremes) + (a.isDirtyExtremes = !1), + o.push(function () { + K(a, 'afterSetExtremes', r(a.eventArgs, a.getExtremes())); + delete a.eventArgs; + }); + (j || g) && a.redraw(); + })); + j && this.drawChartBox(); + q(c, function (a) { + a.isDirty && a.visible && (!a.isCartesian || a.xAxis) && a.redraw(); + }); + d && d.reset(!0); + m.draw(); + K(this, 'redraw'); + n && this.cloneRenderTo(!0); + q(o, function (a) { + a.call(); + }); + }, + get: function (a) { + var b = this.axes, + c = this.series, + d, + e; + for (d = 0; d < b.length; d++) if (b[d].options.id === a) return b[d]; + for (d = 0; d < c.length; d++) if (c[d].options.id === a) return c[d]; + for (d = 0; d < c.length; d++) { + e = c[d].points || []; + for (b = 0; b < e.length; b++) if (e[b].id === a) return e[b]; + } + return null; + }, + getAxes: function () { + var a = this, + b = this.options, + c = (b.xAxis = ra(b.xAxis || {})), + b = (b.yAxis = ra(b.yAxis || {})); + q(c, function (a, b) { + a.index = b; + a.isX = !0; + }); + q(b, function (a, b) { + a.index = b; + }); + c = c.concat(b); + q(c, function (b) { + new ma(a, b); + }); + a.adjustTickAmounts(); + }, + getSelectedPoints: function () { + var a = []; + q(this.series, function (b) { + a = a.concat( + vb(b.points || [], function (a) { + return a.selected; + }) + ); + }); + return a; + }, + getSelectedSeries: function () { + return vb(this.series, function (a) { + return a.selected; + }); + }, + getStacks: function () { + var a = this; + q(a.yAxis, function (a) { + if (a.stacks && a.hasVisibleSeries) a.oldStacks = a.stacks; + }); + q(a.series, function (b) { + if ( + b.options.stacking && + (b.visible === !0 || a.options.chart.ignoreHiddenSeries === !1) + ) + b.stackKey = b.type + p(b.options.stack, ''); + }); + }, + setTitle: function (a, b, c) { + var g; + var d = this, + e = d.options, + f; + f = e.title = w(e.title, a); + (g = e.subtitle = w(e.subtitle, b)), (e = g); + q( + [ + ['title', a, f], + ['subtitle', b, e] + ], + function (a) { + var b = a[0], + c = d[b], + e = a[1], + a = a[2]; + c && e && (d[b] = c = c.destroy()); + a && + a.text && + !c && + (d[b] = d.renderer + .text(a.text, 0, 0, a.useHTML) + .attr({ + align: a.align, + class: 'highcharts-' + b, + zIndex: a.zIndex || 4 + }) + .css(a.style) + .add()); + } + ); + d.layOutTitles(c); + }, + layOutTitles: function (a) { + var b = 0, + c = this.title, + d = this.subtitle, + e = this.options, + f = e.title, + e = e.subtitle, + g = this.renderer, + h = this.spacingBox.width - 44; + if ( + c && + (c + .css({ width: (f.width || h) + 'px' }) + .align( + r({ y: g.fontMetrics(f.style.fontSize, c).b - 3 }, f), + !1, + 'spacingBox' + ), + !f.floating && !f.verticalAlign) + ) + b = c.getBBox().height; + d && + (d + .css({ width: (e.width || h) + 'px' }) + .align( + r( + { y: b + (f.margin - 13) + g.fontMetrics(f.style.fontSize, d).b }, + e + ), + !1, + 'spacingBox' + ), + !e.floating && !e.verticalAlign && (b = Ka(b + d.getBBox().height))); + c = this.titleOffset !== b; + this.titleOffset = b; + if (!this.isDirtyBox && c) + (this.isDirtyBox = c), + this.hasRendered && p(a, !0) && this.isDirtyBox && this.redraw(); + }, + getChartSize: function () { + var a = this.options.chart, + b = a.width, + a = a.height, + c = this.renderToClone || this.renderTo; + if (!s(b)) this.containerWidth = hb(c, 'width'); + if (!s(a)) this.containerHeight = hb(c, 'height'); + this.chartWidth = u(0, b || this.containerWidth || 600); + this.chartHeight = u( + 0, + p(a, this.containerHeight > 19 ? this.containerHeight : 400) + ); + }, + cloneRenderTo: function (a) { + var b = this.renderToClone, + c = this.container; + a + ? b && (this.renderTo.appendChild(c), Pa(b), delete this.renderToClone) + : (c && c.parentNode === this.renderTo && this.renderTo.removeChild(c), + (this.renderToClone = b = this.renderTo.cloneNode(0)), + A(b, { position: 'absolute', top: '-9999px', display: 'block' }), + b.style.setProperty && + b.style.setProperty('display', 'block', 'important'), + x.body.appendChild(b), + c && b.appendChild(c)); + }, + getContainer: function () { + var a, + b = this.options.chart, + c, + d, + e; + this.renderTo = a = b.renderTo; + e = 'highcharts-' + tb++; + if (Fa(a)) this.renderTo = a = x.getElementById(a); + a || oa(13, !0); + c = z(F(a, 'data-highcharts-chart')); + !isNaN(c) && W[c] && W[c].hasRendered && W[c].destroy(); + F(a, 'data-highcharts-chart', this.index); + a.innerHTML = ''; + !b.skipClone && !a.offsetWidth && this.cloneRenderTo(); + this.getChartSize(); + c = this.chartWidth; + d = this.chartHeight; + this.container = a = $( + Ja, + { + className: + 'highcharts-container' + (b.className ? ' ' + b.className : ''), + id: e + }, + r( + { + position: 'relative', + overflow: 'hidden', + width: c + 'px', + height: d + 'px', + textAlign: 'left', + lineHeight: 'normal', + zIndex: 0, + '-webkit-tap-highlight-color': 'rgba(0,0,0,0)' + }, + b.style + ), + this.renderToClone || a + ); + this._cursor = a.style.cursor; + this.renderer = b.forExport + ? new ta(a, c, d, b.style, !0) + : new Ya(a, c, d, b.style); + ga && this.renderer.create(this, a, c, d); + }, + getMargins: function () { + var a = this.spacing, + b, + c = this.legend, + d = this.margin, + e = this.options.legend, + f = p(e.margin, 20), + g = e.x, + h = e.y, + i = e.align, + j = e.verticalAlign, + k = this.titleOffset; + this.resetMargins(); + b = this.axisOffset; + if (k && !s(d[0])) + this.plotTop = u(this.plotTop, k + this.options.title.margin + a[0]); + if (c.display && !e.floating) + if (i === 'right') { + if (!s(d[1])) + this.marginRight = u( + this.marginRight, + c.legendWidth - g + f + a[1] + ); + } else if (i === 'left') { + if (!s(d[3])) + this.plotLeft = u(this.plotLeft, c.legendWidth + g + f + a[3]); + } else if (j === 'top') { + if (!s(d[0])) + this.plotTop = u(this.plotTop, c.legendHeight + h + f + a[0]); + } else if (j === 'bottom' && !s(d[2])) + this.marginBottom = u( + this.marginBottom, + c.legendHeight - h + f + a[2] + ); + this.extraBottomMargin && (this.marginBottom += this.extraBottomMargin); + this.extraTopMargin && (this.plotTop += this.extraTopMargin); + this.hasCartesianSeries && + q(this.axes, function (a) { + a.getOffset(); + }); + s(d[3]) || (this.plotLeft += b[3]); + s(d[0]) || (this.plotTop += b[0]); + s(d[2]) || (this.marginBottom += b[2]); + s(d[1]) || (this.marginRight += b[1]); + this.setChartSize(); + }, + reflow: function (a) { + var b = this, + c = b.options.chart, + d = b.renderTo, + e = c.width || hb(d, 'width'), + f = c.height || hb(d, 'height'), + c = a ? a.target : H, + d = function () { + if (b.container) b.setSize(e, f, !1), (b.hasUserSize = null); + }; + if (!b.hasUserSize && e && f && (c === H || c === x)) { + if (e !== b.containerWidth || f !== b.containerHeight) + clearTimeout(b.reflowTimeout), + a ? (b.reflowTimeout = setTimeout(d, 100)) : d(); + b.containerWidth = e; + b.containerHeight = f; + } + }, + initReflow: function () { + var a = this, + b = function (b) { + a.reflow(b); + }; + N(H, 'resize', b); + N(a, 'destroy', function () { + X(H, 'resize', b); + }); + }, + setSize: function (a, b, c) { + var d = this, + e, + f, + g; + d.isResizing += 1; + g = function () { + d && + K(d, 'endResize', null, function () { + d.isResizing -= 1; + }); + }; + Qa(c, d); + d.oldChartHeight = d.chartHeight; + d.oldChartWidth = d.chartWidth; + if (s(a)) (d.chartWidth = e = u(0, v(a))), (d.hasUserSize = !!e); + if (s(b)) d.chartHeight = f = u(0, v(b)); + (va ? ib : A)(d.container, { width: e + 'px', height: f + 'px' }, va); + d.setChartSize(!0); + d.renderer.setSize(e, f, c); + d.maxTicks = null; + q(d.axes, function (a) { + a.isDirty = !0; + a.setScale(); + }); + q(d.series, function (a) { + a.isDirty = !0; + }); + d.isDirtyLegend = !0; + d.isDirtyBox = !0; + d.layOutTitles(); + d.getMargins(); + d.redraw(c); + d.oldChartHeight = null; + K(d, 'resize'); + va === !1 ? g() : setTimeout(g, (va && va.duration) || 500); + }, + setChartSize: function (a) { + var b = this.inverted, + c = this.renderer, + d = this.chartWidth, + e = this.chartHeight, + f = this.options.chart, + g = this.spacing, + h = this.clipOffset, + i, + j, + k, + l; + this.plotLeft = i = v(this.plotLeft); + this.plotTop = j = v(this.plotTop); + this.plotWidth = k = u(0, v(d - i - this.marginRight)); + this.plotHeight = l = u(0, v(e - j - this.marginBottom)); + this.plotSizeX = b ? l : k; + this.plotSizeY = b ? k : l; + this.plotBorderWidth = f.plotBorderWidth || 0; + this.spacingBox = c.spacingBox = { + x: g[3], + y: g[0], + width: d - g[3] - g[1], + height: e - g[0] - g[2] + }; + this.plotBox = c.plotBox = { x: i, y: j, width: k, height: l }; + d = 2 * U(this.plotBorderWidth / 2); + b = Ka(u(d, h[3]) / 2); + c = Ka(u(d, h[0]) / 2); + this.clipBox = { + x: b, + y: c, + width: U(this.plotSizeX - u(d, h[1]) / 2 - b), + height: u(0, U(this.plotSizeY - u(d, h[2]) / 2 - c)) + }; + a || + q(this.axes, function (a) { + a.setAxisSize(); + a.setAxisTranslation(); + }); + }, + resetMargins: function () { + var a = this.spacing, + b = this.margin; + this.plotTop = p(b[0], a[0]); + this.marginRight = p(b[1], a[1]); + this.marginBottom = p(b[2], a[2]); + this.plotLeft = p(b[3], a[3]); + this.axisOffset = [0, 0, 0, 0]; + this.clipOffset = [0, 0, 0, 0]; + }, + drawChartBox: function () { + var a = this.options.chart, + b = this.renderer, + c = this.chartWidth, + d = this.chartHeight, + e = this.chartBackground, + f = this.plotBackground, + g = this.plotBorder, + h = this.plotBGImage, + i = a.borderWidth || 0, + j = a.backgroundColor, + k = a.plotBackgroundColor, + l = a.plotBackgroundImage, + m = a.plotBorderWidth || 0, + n, + o = this.plotLeft, + p = this.plotTop, + q = this.plotWidth, + r = this.plotHeight, + u = this.plotBox, + s = this.clipRect, + v = this.clipBox; + n = i + (a.shadow ? 8 : 0); + if (i || j) + if (e) e.animate(e.crisp({ width: c - n, height: d - n })); + else { + e = { fill: j || P }; + if (i) (e.stroke = a.borderColor), (e['stroke-width'] = i); + this.chartBackground = b + .rect(n / 2, n / 2, c - n, d - n, a.borderRadius, i) + .attr(e) + .addClass('highcharts-background') + .add() + .shadow(a.shadow); + } + if (k) + f + ? f.animate(u) + : (this.plotBackground = b + .rect(o, p, q, r, 0) + .attr({ fill: k }) + .add() + .shadow(a.plotShadow)); + if (l) + h ? h.animate(u) : (this.plotBGImage = b.image(l, o, p, q, r).add()); + s + ? s.animate({ width: v.width, height: v.height }) + : (this.clipRect = b.clipRect(v)); + if (m) + g + ? g.animate(g.crisp({ x: o, y: p, width: q, height: r })) + : (this.plotBorder = b + .rect(o, p, q, r, 0, -m) + .attr({ + stroke: a.plotBorderColor, + 'stroke-width': m, + fill: P, + zIndex: 1 + }) + .add()); + this.isDirtyBox = !1; + }, + propFromSeries: function () { + var a = this, + b = a.options.chart, + c, + d = a.options.series, + e, + f; + q(['inverted', 'angular', 'polar'], function (g) { + c = J[b.type || b.defaultSeriesType]; + f = a[g] || b[g] || (c && c.prototype[g]); + for (e = d && d.length; !f && e--; ) + (c = J[d[e].type]) && c.prototype[g] && (f = !0); + a[g] = f; + }); + }, + linkSeries: function () { + var a = this, + b = a.series; + q(b, function (a) { + a.linkedSeries.length = 0; + }); + q(b, function (b) { + var d = b.options.linkedTo; + if (Fa(d) && (d = d === ':previous' ? a.series[b.index - 1] : a.get(d))) + d.linkedSeries.push(b), (b.linkedParent = d); + }); + }, + renderSeries: function () { + q(this.series, function (a) { + a.translate(); + a.setTooltipPoints && a.setTooltipPoints(); + a.render(); + }); + }, + renderLabels: function () { + var a = this, + b = a.options.labels; + b.items && + q(b.items, function (c) { + var d = r(b.style, c.style), + e = z(d.left) + a.plotLeft, + f = z(d.top) + a.plotTop + 12; + delete d.left; + delete d.top; + a.renderer.text(c.html, e, f).attr({ zIndex: 2 }).css(d).add(); + }); + }, + render: function () { + var a = this.axes, + b = this.renderer, + c = this.options; + this.setTitle(); + this.legend = new kb(this, c.legend); + this.getStacks(); + q(a, function (a) { + a.setScale(); + }); + this.getMargins(); + this.maxTicks = null; + q(a, function (a) { + a.setTickPositions(!0); + a.setMaxTicks(); + }); + this.adjustTickAmounts(); + this.getMargins(); + this.drawChartBox(); + this.hasCartesianSeries && + q(a, function (a) { + a.render(); + }); + if (!this.seriesGroup) + this.seriesGroup = b.g('series-group').attr({ zIndex: 3 }).add(); + this.renderSeries(); + this.renderLabels(); + this.showCredits(c.credits); + this.hasRendered = !0; + }, + showCredits: function (a) { + if (a.enabled && !this.credits) + this.credits = this.renderer + .text(a.text, 0, 0) + .on('click', function () { + if (a.href) location.href = a.href; + }) + .attr({ align: a.position.align, zIndex: 8 }) + .css(a.style) + .add() + .align(a.position); + }, + destroy: function () { + var a = this, + b = a.axes, + c = a.series, + d = a.container, + e, + f = d && d.parentNode; + K(a, 'destroy'); + W[a.index] = t; + $a--; + a.renderTo.removeAttribute('data-highcharts-chart'); + X(a); + for (e = b.length; e--; ) b[e] = b[e].destroy(); + for (e = c.length; e--; ) c[e] = c[e].destroy(); + q( + 'title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer'.split( + ',' + ), + function (b) { + var c = a[b]; + c && c.destroy && (a[b] = c.destroy()); + } + ); + if (d) (d.innerHTML = ''), X(d), f && Pa(d); + for (e in a) delete a[e]; + }, + isReadyToRender: function () { + var a = this; + return (!ba && H == H.top && x.readyState !== 'complete') || + (ga && !H.canvg) + ? (ga + ? Lb.push(function () { + a.firstRender(); + }, a.options.global.canvasToolsURL) + : x.attachEvent('onreadystatechange', function () { + x.detachEvent('onreadystatechange', a.firstRender); + x.readyState === 'complete' && a.firstRender(); + }), + !1) + : !0; + }, + firstRender: function () { + var a = this, + b = a.options, + c = a.callback; + if (a.isReadyToRender()) { + a.getContainer(); + K(a, 'init'); + a.resetMargins(); + a.setChartSize(); + a.propFromSeries(); + a.getAxes(); + q(b.series || [], function (b) { + a.initSeries(b); + }); + a.linkSeries(); + K(a, 'beforeRender'); + if (S.Pointer) a.pointer = new Va(a, b); + a.render(); + a.renderer.draw(); + c && c.apply(a, [a]); + q(a.callbacks, function (b) { + b.apply(a, [a]); + }); + a.cloneRenderTo(!0); + K(a, 'load'); + } + }, + splashArray: function (a, b) { + var c = b[a], + c = da(c) ? c : [c, c, c, c]; + return [ + p(b[a + 'Top'], c[0]), + p(b[a + 'Right'], c[1]), + p(b[a + 'Bottom'], c[2]), + p(b[a + 'Left'], c[3]) + ]; + } + }; + Xa.prototype.callbacks = []; + Z = S.CenteredSeriesMixin = { + getCenter: function () { + var a = this.options, + b = this.chart, + c = 2 * (a.slicedOffset || 0), + d, + e = b.plotWidth - 2 * c, + f = b.plotHeight - 2 * c, + b = a.center, + a = [ + p(b[0], '50%'), + p(b[1], '50%'), + a.size || '100%', + a.innerSize || 0 + ], + g = C(e, f), + h; + return Ua(a, function (a, b) { + h = /%$/.test(a); + d = b < 2 || (b === 2 && h); + return (h ? ([e, f, g, g][b] * z(a)) / 100 : a) + (d ? c : 0); + }); + } + }; + var Ea = function () {}; + Ea.prototype = { + init: function (a, b, c) { + this.series = a; + this.applyOptions(b, c); + this.pointAttr = {}; + if ( + a.options.colorByPoint && + ((b = a.options.colors || a.chart.options.colors), + (this.color = this.color || b[a.colorCounter++]), + a.colorCounter === b.length) + ) + a.colorCounter = 0; + a.chart.pointCount++; + return this; + }, + applyOptions: function (a, b) { + var c = this.series, + d = c.options.pointValKey || c.pointValKey, + a = Ea.prototype.optionsToObject.call(this, a); + r(this, a); + this.options = this.options ? r(this.options, a) : a; + if (d) this.y = this[d]; + if (this.x === t && c) this.x = b === t ? c.autoIncrement() : b; + return this; + }, + optionsToObject: function (a) { + var b = {}, + c = this.series, + d = c.pointArrayMap || ['y'], + e = d.length, + f = 0, + g = 0; + if (typeof a === 'number' || a === null) b[d[0]] = a; + else if (La(a)) { + if (a.length > e) { + c = typeof a[0]; + if (c === 'string') b.name = a[0]; + else if (c === 'number') b.x = a[0]; + f++; + } + for (; g < e; ) b[d[g++]] = a[f++]; + } else if (typeof a === 'object') { + b = a; + if (a.dataLabels) c._hasPointLabels = !0; + if (a.marker) c._hasPointMarkers = !0; + } + return b; + }, + destroy: function () { + var a = this.series.chart, + b = a.hoverPoints, + c; + a.pointCount--; + if (b && (this.setState(), ka(b, this), !b.length)) a.hoverPoints = null; + if (this === a.hoverPoint) this.onMouseOut(); + if (this.graphic || this.dataLabel) X(this), this.destroyElements(); + this.legendItem && a.legend.destroyItem(this); + for (c in this) this[c] = null; + }, + destroyElements: function () { + for ( + var a = + 'graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup'.split( + ',' + ), + b, + c = 6; + c--; + + ) + (b = a[c]), this[b] && (this[b] = this[b].destroy()); + }, + getLabelConfig: function () { + return { + x: this.category, + y: this.y, + key: this.name || this.category, + series: this.series, + point: this, + percentage: this.percentage, + total: this.total || this.stackTotal + }; + }, + tooltipFormatter: function (a) { + var b = this.series, + c = b.tooltipOptions, + d = p(c.valueDecimals, ''), + e = c.valuePrefix || '', + f = c.valueSuffix || ''; + q(b.pointArrayMap || ['y'], function (b) { + b = '{point.' + b; + if (e || f) a = a.replace(b + '}', e + b + '}' + f); + a = a.replace(b + '}', b + ':,.' + d + 'f}'); + }); + return Ia(a, { point: this, series: this.series }); + }, + firePointEvent: function (a, b, c) { + var d = this, + e = this.series.options; + (e.point.events[a] || + (d.options && d.options.events && d.options.events[a])) && + this.importEvents(); + a === 'click' && + e.allowPointSelect && + (c = function (a) { + d.select(null, a.ctrlKey || a.metaKey || a.shiftKey); + }); + K(this, a, b, c); + } + }; + var O = function () {}; + O.prototype = { + isCartesian: !0, + type: 'line', + pointClass: Ea, + sorted: !0, + requireSorting: !0, + pointAttrToOptions: { + stroke: 'lineColor', + 'stroke-width': 'lineWidth', + fill: 'fillColor', + r: 'radius' + }, + axisTypes: ['xAxis', 'yAxis'], + colorCounter: 0, + parallelArrays: ['x', 'y'], + init: function (a, b) { + var c = this, + d, + e, + f = a.series, + g = function (a, b) { + return p(a.options.index, a._i) - p(b.options.index, b._i); + }; + c.chart = a; + c.options = b = c.setOptions(b); + c.linkedSeries = []; + c.bindAxes(); + r(c, { + name: b.name, + state: '', + pointAttr: {}, + visible: b.visible !== !1, + selected: b.selected === !0 + }); + if (ga) b.animation = !1; + e = b.events; + for (d in e) N(c, d, e[d]); + if ( + (e && e.click) || + (b.point && b.point.events && b.point.events.click) || + b.allowPointSelect + ) + a.runTrackerClick = !0; + c.getColor(); + c.getSymbol(); + q(c.parallelArrays, function (a) { + c[a + 'Data'] = []; + }); + c.setData(b.data, !1); + if (c.isCartesian) a.hasCartesianSeries = !0; + f.push(c); + c._i = f.length - 1; + nb(f, g); + this.yAxis && nb(this.yAxis.series, g); + q(f, function (a, b) { + a.index = b; + a.name = a.name || 'Series ' + (b + 1); + }); + }, + bindAxes: function () { + var a = this, + b = a.options, + c = a.chart, + d; + q(a.axisTypes || [], function (e) { + q(c[e], function (c) { + d = c.options; + if ( + b[e] === d.index || + (b[e] !== t && b[e] === d.id) || + (b[e] === t && d.index === 0) + ) + c.series.push(a), (a[e] = c), (c.isDirty = !0); + }); + !a[e] && a.optionalAxis !== e && oa(18, !0); + }); + }, + updateParallelArrays: function (a, b) { + var c = a.series, + d = arguments; + q( + c.parallelArrays, + typeof b === 'number' + ? function (d) { + var f = d === 'y' && c.toYData ? c.toYData(a) : a[d]; + c[d + 'Data'][b] = f; + } + : function (a) { + Array.prototype[b].apply( + c[a + 'Data'], + Array.prototype.slice.call(d, 2) + ); + } + ); + }, + autoIncrement: function () { + var a = this.options, + b = this.xIncrement, + b = p(b, a.pointStart, 0); + this.pointInterval = p(this.pointInterval, a.pointInterval, 1); + this.xIncrement = b + this.pointInterval; + return b; + }, + getSegments: function () { + var a = -1, + b = [], + c, + d = this.points, + e = d.length; + if (e) + if (this.options.connectNulls) { + for (c = e; c--; ) d[c].y === null && d.splice(c, 1); + d.length && (b = [d]); + } else + q(d, function (c, g) { + c.y === null + ? (g > a + 1 && b.push(d.slice(a + 1, g)), (a = g)) + : g === e - 1 && b.push(d.slice(a + 1, g + 1)); + }); + this.segments = b; + }, + setOptions: function (a) { + var b = this.chart, + c = b.options.plotOptions, + b = b.userOptions || {}, + d = b.plotOptions || {}, + e = c[this.type]; + this.userOptions = a; + c = w(e, c.series, a); + this.tooltipOptions = w( + L.tooltip, + L.plotOptions[this.type].tooltip, + b.tooltip, + d.series && d.series.tooltip, + d[this.type] && d[this.type].tooltip, + a.tooltip + ); + e.marker === null && delete c.marker; + return c; + }, + getCyclic: function (a, b, c) { + var d = this.userOptions, + e = '_' + a + 'Index', + f = a + 'Counter'; + b || + (s(d[e]) + ? (b = d[e]) + : ((d[e] = b = this.chart[f] % c.length), (this.chart[f] += 1)), + (b = c[b])); + this[a] = b; + }, + getColor: function () { + this.options.colorByPoint || + this.getCyclic( + 'color', + this.options.color || ca[this.type].color, + this.chart.options.colors + ); + }, + getSymbol: function () { + var a = this.options.marker; + this.getCyclic('symbol', a.symbol, this.chart.options.symbols); + if (/^url/.test(this.symbol)) a.radius = 0; + }, + drawLegendSymbol: M.drawLineMarker, + setData: function (a, b, c, d) { + var e = this, + f = e.points, + g = (f && f.length) || 0, + h, + i = e.options, + j = e.chart, + k = null, + l = e.xAxis, + m = l && !!l.categories, + n = e.tooltipPoints, + o = i.turboThreshold, + r = this.xData, + u = this.yData, + s = (h = e.pointArrayMap) && h.length, + a = a || []; + h = a.length; + b = p(b, !0); + if (d !== !1 && h && g === h && !e.cropped && !e.hasGroupedData) + q(a, function (a, b) { + f[b].update(a, !1); + }); + else { + e.xIncrement = null; + e.pointRange = m ? 1 : i.pointRange; + e.colorCounter = 0; + q(this.parallelArrays, function (a) { + e[a + 'Data'].length = 0; + }); + if (o && h > o) { + for (c = 0; k === null && c < h; ) (k = a[c]), c++; + if (ia(k)) { + m = p(i.pointStart, 0); + i = p(i.pointInterval, 1); + for (c = 0; c < h; c++) (r[c] = m), (u[c] = a[c]), (m += i); + e.xIncrement = m; + } else if (La(k)) + if (s) + for (c = 0; c < h; c++) + (i = a[c]), (r[c] = i[0]), (u[c] = i.slice(1, s + 1)); + else + for (c = 0; c < h; c++) (i = a[c]), (r[c] = i[0]), (u[c] = i[1]); + else oa(12); + } else + for (c = 0; c < h; c++) + if ( + a[c] !== t && + ((i = { series: e }), + e.pointClass.prototype.applyOptions.apply(i, [a[c]]), + e.updateParallelArrays(i, c), + m && i.name) + ) + l.names[i.x] = i.name; + Fa(u[0]) && oa(14, !0); + e.data = []; + e.options.data = a; + for (c = g; c--; ) f[c] && f[c].destroy && f[c].destroy(); + if (n) n.length = 0; + if (l) l.minRange = l.userMinRange; + e.isDirty = e.isDirtyData = j.isDirtyBox = !0; + c = !1; + } + b && j.redraw(c); + }, + processData: function (a) { + var b = this.xData, + c = this.yData, + d = b.length, + e; + e = 0; + var f, + g, + h = this.xAxis, + i = this.options, + j = i.cropThreshold, + k = 0, + l = this.isCartesian, + m, + n; + if (l && !this.isDirty && !h.isDirty && !this.yAxis.isDirty && !a) + return !1; + if (l && this.sorted && (!j || d > j || this.forceCrop)) + if ( + ((m = h.getExtremes()), + (n = m.min), + (m = m.max), + b[d - 1] < n || b[0] > m) + ) + (b = []), (c = []); + else if (b[0] < n || b[d - 1] > m) + (e = this.cropData(this.xData, this.yData, n, m)), + (b = e.xData), + (c = e.yData), + (e = e.start), + (f = !0), + (k = b.length); + for (a = b.length - 1; a >= 0; a--) + (d = b[a] - b[a - 1]), + !f && b[a] > n && b[a] < m && k++, + d > 0 && (g === t || d < g) + ? (g = d) + : d < 0 && this.requireSorting && oa(15); + this.cropped = f; + this.cropStart = e; + this.processedXData = b; + this.processedYData = c; + this.activePointCount = k; + if (i.pointRange === null) this.pointRange = g || 1; + this.closestPointRange = g; + }, + cropData: function (a, b, c, d) { + var e = a.length, + f = 0, + g = e, + h = p(this.cropShoulder, 1), + i; + for (i = 0; i < e; i++) + if (a[i] >= c) { + f = u(0, i - h); + break; + } + for (; i < e; i++) + if (a[i] > d) { + g = i + h; + break; + } + return { xData: a.slice(f, g), yData: b.slice(f, g), start: f, end: g }; + }, + generatePoints: function () { + var a = this.options.data, + b = this.data, + c, + d = this.processedXData, + e = this.processedYData, + f = this.pointClass, + g = d.length, + h = this.cropStart || 0, + i, + j = this.hasGroupedData, + k, + l = [], + m; + if (!b && !j) (b = []), (b.length = a.length), (b = this.data = b); + for (m = 0; m < g; m++) + (i = h + m), + j + ? (l[m] = new f().init(this, [d[m]].concat(ra(e[m])))) + : (b[i] + ? (k = b[i]) + : a[i] !== t && (b[i] = k = new f().init(this, a[i], d[m])), + (l[m] = k)); + if (b && (g !== (c = b.length) || j)) + for (m = 0; m < c; m++) + if ((m === h && !j && (m += g), b[m])) + b[m].destroyElements(), (b[m].plotX = t); + this.data = b; + this.points = l; + }, + getExtremes: function (a) { + var b = this.yAxis, + c = this.processedXData, + d, + e = [], + f = 0; + d = this.xAxis.getExtremes(); + var g = d.min, + h = d.max, + i, + j, + k, + l, + a = a || this.stackedYData || this.processedYData; + d = a.length; + for (l = 0; l < d; l++) + if ( + ((j = c[l]), + (k = a[l]), + (i = k !== null && k !== t && (!b.isLog || k.length || k > 0)), + (j = + this.getExtremesFromAll || + this.cropped || + ((c[l + 1] || j) >= g && (c[l - 1] || j) <= h)), + i && j) + ) + if ((i = k.length)) for (; i--; ) k[i] !== null && (e[f++] = k[i]); + else e[f++] = k; + this.dataMin = p(void 0, Na(e)); + this.dataMax = p(void 0, Ba(e)); + }, + translate: function () { + this.processedXData || this.processData(); + this.generatePoints(); + for ( + var a = this.options, + b = a.stacking, + c = this.xAxis, + d = c.categories, + e = this.yAxis, + f = this.points, + g = f.length, + h = !!this.modifyValue, + i = a.pointPlacement, + j = i === 'between' || ia(i), + k = a.threshold, + a = 0; + a < g; + a++ + ) { + var l = f[a], + m = l.x, + n = l.y, + o = l.low, + q = + b && e.stacks[(this.negStacks && n < k ? '-' : '') + this.stackKey]; + if (e.isLog && n <= 0) l.y = n = null; + l.plotX = c.translate(m, 0, 0, 0, 1, i, this.type === 'flags'); + if (b && this.visible && q && q[m]) + (q = q[m]), + (n = q.points[this.index + ',' + a]), + (o = n[0]), + (n = n[1]), + o === 0 && (o = p(k, e.min)), + e.isLog && o <= 0 && (o = null), + (l.total = l.stackTotal = q.total), + (l.percentage = q.total && (l.y / q.total) * 100), + (l.stackY = n), + q.setOffset(this.pointXOffset || 0, this.barW || 0); + l.yBottom = s(o) ? e.translate(o, 0, 1, 0, 1) : null; + h && (n = this.modifyValue(n, l)); + l.plotY = + typeof n === 'number' && n !== Infinity + ? e.translate(n, 0, 1, 0, 1) + : t; + l.clientX = j ? c.translate(m, 0, 0, 0, 1) : l.plotX; + l.negative = l.y < (k || 0); + l.category = d && d[l.x] !== t ? d[l.x] : l.x; + } + this.getSegments(); + }, + animate: function (a) { + var b = this.chart, + c = b.renderer, + d; + d = this.options.animation; + var e = this.clipBox || b.clipBox, + f = b.inverted, + g; + if (d && !da(d)) d = ca[this.type].animation; + g = ['_sharedClip', d.duration, d.easing, e.height].join(','); + a + ? ((a = b[g]), + (d = b[g + 'm']), + a || + ((b[g] = a = c.clipRect(r(e, { width: 0 }))), + (b[g + 'm'] = d = + c.clipRect( + -99, + f ? -b.plotLeft : -b.plotTop, + 99, + f ? b.chartWidth : b.chartHeight + ))), + this.group.clip(a), + this.markerGroup.clip(d), + (this.sharedClipKey = g)) + : ((a = b[g]) && a.animate({ width: b.plotSizeX }, d), + b[g + 'm'] && b[g + 'm'].animate({ width: b.plotSizeX + 99 }, d), + (this.animate = null)); + }, + afterAnimate: function () { + var a = this.chart, + b = this.sharedClipKey, + c = this.group, + d = this.clipBox; + if (c && this.options.clip !== !1) { + if (!b || !d) c.clip(d ? a.renderer.clipRect(d) : a.clipRect); + this.markerGroup.clip(); + } + K(this, 'afterAnimate'); + setTimeout(function () { + b && + a[b] && + (d || (a[b] = a[b].destroy()), + a[b + 'm'] && (a[b + 'm'] = a[b + 'm'].destroy())); + }, 100); + }, + drawPoints: function () { + var a, + b = this.points, + c = this.chart, + d, + e, + f, + g, + h, + i, + j, + k; + d = this.options.marker; + var l = this.pointAttr[''], + m, + n = this.markerGroup, + o = p( + d.enabled, + this.activePointCount < (0.5 * this.xAxis.len) / d.radius + ); + if (d.enabled !== !1 || this._hasPointMarkers) + for (f = b.length; f--; ) + if ( + ((g = b[f]), + (d = U(g.plotX)), + (e = g.plotY), + (k = g.graphic), + (i = g.marker || {}), + (a = (o && i.enabled === t) || i.enabled), + (m = c.isInsidePlot(v(d), e, c.inverted)), + a && e !== t && !isNaN(e) && g.y !== null) + ) + if ( + ((a = g.pointAttr[g.selected ? 'select' : ''] || l), + (h = a.r), + (i = p(i.symbol, this.symbol)), + (j = i.indexOf('url') === 0), + k) + ) + k[m ? 'show' : 'hide'](!0).animate( + r( + { x: d - h, y: e - h }, + k.symbolName ? { width: 2 * h, height: 2 * h } : {} + ) + ); + else { + if (m && (h > 0 || j)) + g.graphic = c.renderer + .symbol(i, d - h, e - h, 2 * h, 2 * h) + .attr(a) + .add(n); + } + else if (k) g.graphic = k.destroy(); + }, + convertAttribs: function (a, b, c, d) { + var e = this.pointAttrToOptions, + f, + g, + h = {}, + a = a || {}, + b = b || {}, + c = c || {}, + d = d || {}; + for (f in e) (g = e[f]), (h[f] = p(a[g], b[f], c[f], d[f])); + return h; + }, + getAttribs: function () { + var a = this, + b = a.options, + c = ca[a.type].marker ? b.marker : b, + d = c.states, + e = d.hover, + f, + g = a.color; + f = { stroke: g, fill: g }; + var h = a.points || [], + i, + j = [], + k, + l = a.pointAttrToOptions; + k = a.hasPointSpecificOptions; + var m = b.negativeColor, + n = c.lineColor, + o = c.fillColor; + i = b.turboThreshold; + var p; + b.marker + ? ((e.radius = e.radius || c.radius + e.radiusPlus), + (e.lineWidth = e.lineWidth || c.lineWidth + e.lineWidthPlus)) + : (e.color = + e.color || + ya(e.color || g) + .brighten(e.brightness) + .get()); + j[''] = a.convertAttribs(c, f); + q(['hover', 'select'], function (b) { + j[b] = a.convertAttribs(d[b], j['']); + }); + a.pointAttr = j; + g = h.length; + if (!i || g < i || k) + for (; g--; ) { + i = h[g]; + if ( + (c = (i.options && i.options.marker) || i.options) && + c.enabled === !1 + ) + c.radius = 0; + if (i.negative && m) i.color = i.fillColor = m; + k = b.colorByPoint || i.color; + if (i.options) for (p in l) s(c[l[p]]) && (k = !0); + if (k) { + c = c || {}; + k = []; + d = c.states || {}; + f = d.hover = d.hover || {}; + if (!b.marker) + f.color = + f.color || + (!i.options.color && e.color) || + ya(i.color) + .brighten(f.brightness || e.brightness) + .get(); + f = { color: i.color }; + if (!o) f.fillColor = i.color; + if (!n) f.lineColor = i.color; + k[''] = a.convertAttribs(r(f, c), j['']); + k.hover = a.convertAttribs(d.hover, j.hover, k['']); + k.select = a.convertAttribs(d.select, j.select, k['']); + } else k = j; + i.pointAttr = k; + } + }, + destroy: function () { + var a = this, + b = a.chart, + c = /AppleWebKit\/533/.test(wa), + d, + e, + f = a.data || [], + g, + h, + i; + K(a, 'destroy'); + X(a); + q(a.axisTypes || [], function (b) { + if ((i = a[b])) ka(i.series, a), (i.isDirty = i.forceRedraw = !0); + }); + a.legendItem && a.chart.legend.destroyItem(a); + for (e = f.length; e--; ) (g = f[e]) && g.destroy && g.destroy(); + a.points = null; + clearTimeout(a.animationTimeout); + q( + 'area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip'.split( + ',' + ), + function (b) { + a[b] && ((d = c && b === 'group' ? 'hide' : 'destroy'), a[b][d]()); + } + ); + if (b.hoverSeries === a) b.hoverSeries = null; + ka(b.series, a); + for (h in a) delete a[h]; + }, + getSegmentPath: function (a) { + var b = this, + c = [], + d = b.options.step; + q(a, function (e, f) { + var g = e.plotX, + h = e.plotY, + i; + b.getPointSpline + ? c.push.apply(c, b.getPointSpline(a, e, f)) + : (c.push(f ? 'L' : 'M'), + d && + f && + ((i = a[f - 1]), + d === 'right' + ? c.push(i.plotX, h) + : d === 'center' + ? c.push((i.plotX + g) / 2, i.plotY, (i.plotX + g) / 2, h) + : c.push(g, i.plotY)), + c.push(e.plotX, e.plotY)); + }); + return c; + }, + getGraphPath: function () { + var a = this, + b = [], + c, + d = []; + q(a.segments, function (e) { + c = a.getSegmentPath(e); + e.length > 1 ? (b = b.concat(c)) : d.push(e[0]); + }); + a.singlePoints = d; + return (a.graphPath = b); + }, + drawGraph: function () { + var a = this, + b = this.options, + c = [['graph', b.lineColor || this.color]], + d = b.lineWidth, + e = b.dashStyle, + f = b.linecap !== 'square', + g = this.getGraphPath(), + h = b.negativeColor; + h && c.push(['graphNeg', h]); + q(c, function (c, h) { + var k = c[0], + l = a[k]; + if (l) ab(l), l.animate({ d: g }); + else if (d && g.length) + (l = { stroke: c[1], 'stroke-width': d, fill: P, zIndex: 1 }), + e + ? (l.dashstyle = e) + : f && (l['stroke-linecap'] = l['stroke-linejoin'] = 'round'), + (a[k] = a.chart.renderer + .path(g) + .attr(l) + .add(a.group) + .shadow(!h && b.shadow)); + }); + }, + clipNeg: function () { + var a = this.options, + b = this.chart, + c = b.renderer, + d = a.negativeColor || a.negativeFillColor, + e, + f = this.graph, + g = this.area, + h = this.posClip, + i = this.negClip; + e = b.chartWidth; + var j = b.chartHeight, + k = u(e, j), + l = this.yAxis; + if (d && (f || g)) { + d = v(l.toPixels(a.threshold || 0, !0)); + d < 0 && (k -= d); + a = { x: 0, y: 0, width: k, height: d }; + k = { x: 0, y: d, width: k, height: k }; + if (b.inverted) + (a.height = k.y = b.plotWidth - d), + c.isVML && + ((a = { + x: b.plotWidth - d - b.plotLeft, + y: 0, + width: e, + height: j + }), + (k = { + x: d + b.plotLeft - e, + y: 0, + width: b.plotLeft + d, + height: e + })); + l.reversed ? ((b = k), (e = a)) : ((b = a), (e = k)); + h + ? (h.animate(b), i.animate(e)) + : ((this.posClip = h = c.clipRect(b)), + (this.negClip = i = c.clipRect(e)), + f && this.graphNeg && (f.clip(h), this.graphNeg.clip(i)), + g && (g.clip(h), this.areaNeg.clip(i))); + } + }, + invertGroups: function () { + function a() { + var a = { width: b.yAxis.len, height: b.xAxis.len }; + q(['group', 'markerGroup'], function (c) { + b[c] && b[c].attr(a).invert(); + }); + } + var b = this, + c = b.chart; + if (b.xAxis) + N(c, 'resize', a), + N(b, 'destroy', function () { + X(c, 'resize', a); + }), + a(), + (b.invertGroups = a); + }, + plotGroup: function (a, b, c, d, e) { + var f = this[a], + g = !f; + g && + (this[a] = f = + this.chart.renderer + .g(b) + .attr({ visibility: c, zIndex: d || 0.1 }) + .add(e)); + f[g ? 'attr' : 'animate'](this.getPlotBox()); + return f; + }, + getPlotBox: function () { + var a = this.chart, + b = this.xAxis, + c = this.yAxis; + if (a.inverted) (b = c), (c = this.xAxis); + return { + translateX: b ? b.left : a.plotLeft, + translateY: c ? c.top : a.plotTop, + scaleX: 1, + scaleY: 1 + }; + }, + render: function () { + var a = this, + b = a.chart, + c, + d = a.options, + e = + ((c = d.animation) && + !!a.animate && + b.renderer.isSVG && + p(c.duration, 500)) || + 0, + f = a.visible ? 'visible' : 'hidden', + g = d.zIndex, + h = a.hasRendered, + i = b.seriesGroup; + c = a.plotGroup('group', 'series', f, g, i); + a.markerGroup = a.plotGroup('markerGroup', 'markers', f, g, i); + e && a.animate(!0); + a.getAttribs(); + c.inverted = a.isCartesian ? b.inverted : !1; + a.drawGraph && (a.drawGraph(), a.clipNeg()); + a.drawDataLabels && a.drawDataLabels(); + a.visible && a.drawPoints(); + a.drawTracker && a.options.enableMouseTracking !== !1 && a.drawTracker(); + b.inverted && a.invertGroups(); + d.clip !== !1 && !a.sharedClipKey && !h && c.clip(b.clipRect); + e && a.animate(); + if (!h) + e + ? (a.animationTimeout = setTimeout(function () { + a.afterAnimate(); + }, e)) + : a.afterAnimate(); + a.isDirty = a.isDirtyData = !1; + a.hasRendered = !0; + }, + redraw: function () { + var a = this.chart, + b = this.isDirtyData, + c = this.group, + d = this.xAxis, + e = this.yAxis; + c && + (a.inverted && c.attr({ width: a.plotWidth, height: a.plotHeight }), + c.animate({ + translateX: p(d && d.left, a.plotLeft), + translateY: p(e && e.top, a.plotTop) + })); + this.translate(); + this.setTooltipPoints && this.setTooltipPoints(!0); + this.render(); + b && K(this, 'updatedData'); + } + }; + Fb.prototype = { + destroy: function () { + Oa(this, this.axis); + }, + render: function (a) { + var b = this.options, + c = b.format, + c = c ? Ia(c, this) : b.formatter.call(this); + this.label + ? this.label.attr({ text: c, visibility: 'hidden' }) + : (this.label = this.axis.chart.renderer + .text(c, null, null, b.useHTML) + .css(b.style) + .attr({ + align: this.textAlign, + rotation: b.rotation, + visibility: 'hidden' + }) + .add(a)); + }, + setOffset: function (a, b) { + var c = this.axis, + d = c.chart, + e = d.inverted, + f = this.isNegative, + g = c.translate(c.usePercentage ? 100 : this.total, 0, 0, 0, 1), + c = c.translate(0), + c = Q(g - c), + h = d.xAxis[0].translate(this.x) + a, + i = d.plotHeight, + f = { + x: e ? (f ? g : g - c) : h, + y: e ? i - h - b : f ? i - g - c : i - g, + width: e ? c : b, + height: e ? b : c + }; + if ((e = this.label)) + e.align(this.alignOptions, null, f), + (f = e.alignAttr), + e[ + this.options.crop === !1 || d.isInsidePlot(f.x, f.y) + ? 'show' + : 'hide' + ](!0); + } + }; + ma.prototype.buildStacks = function () { + var a = this.series, + b = p(this.options.reversedStacks, !0), + c = a.length; + if (!this.isXAxis) { + for (this.usePercentage = !1; c--; ) + a[b ? c : a.length - c - 1].setStackedPoints(); + if (this.usePercentage) + for (c = 0; c < a.length; c++) a[c].setPercentStacks(); + } + }; + ma.prototype.renderStackTotals = function () { + var a = this.chart, + b = a.renderer, + c = this.stacks, + d, + e, + f = this.stackTotalGroup; + if (!f) + this.stackTotalGroup = f = b + .g('stack-labels') + .attr({ visibility: 'visible', zIndex: 6 }) + .add(); + f.translate(a.plotLeft, a.plotTop); + for (d in c) for (e in ((a = c[d]), a)) a[e].render(f); + }; + O.prototype.setStackedPoints = function () { + if ( + this.options.stacking && + !( + this.visible !== !0 && + this.chart.options.chart.ignoreHiddenSeries !== !1 + ) + ) { + var a = this.processedXData, + b = this.processedYData, + c = [], + d = b.length, + e = this.options, + f = e.threshold, + g = e.stack, + e = e.stacking, + h = this.stackKey, + i = '-' + h, + j = this.negStacks, + k = this.yAxis, + l = k.stacks, + m = k.oldStacks, + n, + o, + p, + q, + r, + s; + for (q = 0; q < d; q++) { + r = a[q]; + s = b[q]; + p = this.index + ',' + q; + o = (n = j && s < f) ? i : h; + l[o] || (l[o] = {}); + if (!l[o][r]) + m[o] && m[o][r] + ? ((l[o][r] = m[o][r]), (l[o][r].total = null)) + : (l[o][r] = new Fb(k, k.options.stackLabels, n, r, g)); + o = l[o][r]; + o.points[p] = [o.cum || 0]; + e === 'percent' + ? ((n = n ? h : i), + j && l[n] && l[n][r] + ? ((n = l[n][r]), + (o.total = n.total = u(n.total, o.total) + Q(s) || 0)) + : (o.total = ea(o.total + (Q(s) || 0)))) + : (o.total = ea(o.total + (s || 0))); + o.cum = (o.cum || 0) + (s || 0); + o.points[p].push(o.cum); + c[q] = o.cum; + } + if (e === 'percent') k.usePercentage = !0; + this.stackedYData = c; + k.oldStacks = {}; + } + }; + O.prototype.setPercentStacks = function () { + var a = this, + b = a.stackKey, + c = a.yAxis.stacks, + d = a.processedXData; + q([b, '-' + b], function (b) { + var e; + for (var f = d.length, g, h; f--; ) + if ( + ((g = d[f]), + (e = (h = c[b] && c[b][g]) && h.points[a.index + ',' + f]), + (g = e)) + ) + (h = h.total ? 100 / h.total : 0), + (g[0] = ea(g[0] * h)), + (g[1] = ea(g[1] * h)), + (a.stackedYData[f] = g[1]); + }); + }; + r(Xa.prototype, { + addSeries: function (a, b, c) { + var d, + e = this; + a && + ((b = p(b, !0)), + K(e, 'addSeries', { options: a }, function () { + d = e.initSeries(a); + e.isDirtyLegend = !0; + e.linkSeries(); + b && e.redraw(c); + })); + return d; + }, + addAxis: function (a, b, c, d) { + var e = b ? 'xAxis' : 'yAxis', + f = this.options; + new ma(this, w(a, { index: this[e].length, isX: b })); + f[e] = ra(f[e] || {}); + f[e].push(a); + p(c, !0) && this.redraw(d); + }, + showLoading: function (a) { + var b = this, + c = b.options, + d = b.loadingDiv, + e = c.loading, + f = function () { + d && + A(d, { + left: b.plotLeft + 'px', + top: b.plotTop + 'px', + width: b.plotWidth + 'px', + height: b.plotHeight + 'px' + }); + }; + if (!d) + (b.loadingDiv = d = + $( + Ja, + { className: 'highcharts-loading' }, + r(e.style, { zIndex: 10, display: P }), + b.container + )), + (b.loadingSpan = $('span', null, e.labelStyle, d)), + N(b, 'redraw', f); + b.loadingSpan.innerHTML = a || c.lang.loading; + if (!b.loadingShown) + A(d, { opacity: 0, display: '' }), + ib( + d, + { opacity: e.style.opacity }, + { duration: e.showDuration || 0 } + ), + (b.loadingShown = !0); + f(); + }, + hideLoading: function () { + var a = this.options, + b = this.loadingDiv; + b && + ib( + b, + { opacity: 0 }, + { + duration: a.loading.hideDuration || 100, + complete: function () { + A(b, { display: P }); + } + } + ); + this.loadingShown = !1; + } + }); + r(Ea.prototype, { + update: function (a, b, c) { + var d = this, + e = d.series, + f = d.graphic, + g, + h = e.data, + i = e.chart, + j = e.options, + b = p(b, !0); + d.firePointEvent('update', { options: a }, function () { + d.applyOptions(a); + if (da(a)) { + e.getAttribs(); + if (f) + a && a.marker && a.marker.symbol + ? (d.graphic = f.destroy()) + : f.attr(d.pointAttr[d.state || '']); + if (a && a.dataLabels && d.dataLabel) + d.dataLabel = d.dataLabel.destroy(); + } + g = Da(d, h); + e.updateParallelArrays(d, g); + j.data[g] = d.options; + e.isDirty = e.isDirtyData = !0; + if (!e.fixedBox && e.hasCartesianSeries) i.isDirtyBox = !0; + j.legendType === 'point' && i.legend.destroyItem(d); + b && i.redraw(c); + }); + }, + remove: function (a, b) { + var c = this, + d = c.series, + e = d.points, + f = d.chart, + g, + h = d.data; + Qa(b, f); + a = p(a, !0); + c.firePointEvent('remove', null, function () { + g = Da(c, h); + h.length === e.length && e.splice(g, 1); + h.splice(g, 1); + d.options.data.splice(g, 1); + d.updateParallelArrays(c, 'splice', g, 1); + c.destroy(); + d.isDirty = !0; + d.isDirtyData = !0; + a && f.redraw(); + }); + } + }); + r(O.prototype, { + addPoint: function (a, b, c, d) { + var e = this.options, + f = this.data, + g = this.graph, + h = this.area, + i = this.chart, + j = this.xAxis && this.xAxis.names, + k = (g && g.shift) || 0, + l = e.data, + m, + n = this.xData; + Qa(d, i); + c && + q([g, h, this.graphNeg, this.areaNeg], function (a) { + if (a) a.shift = k + 1; + }); + if (h) h.isArea = !0; + b = p(b, !0); + d = { series: this }; + this.pointClass.prototype.applyOptions.apply(d, [a]); + g = d.x; + h = n.length; + if (this.requireSorting && g < n[h - 1]) + for (m = !0; h && n[h - 1] > g; ) h--; + this.updateParallelArrays(d, 'splice', h, 0, 0); + this.updateParallelArrays(d, h); + if (j) j[g] = d.name; + l.splice(h, 0, a); + m && (this.data.splice(h, 0, null), this.processData()); + e.legendType === 'point' && this.generatePoints(); + c && + (f[0] && f[0].remove + ? f[0].remove(!1) + : (f.shift(), this.updateParallelArrays(d, 'shift'), l.shift())); + this.isDirtyData = this.isDirty = !0; + b && (this.getAttribs(), i.redraw()); + }, + remove: function (a, b) { + var c = this, + d = c.chart, + a = p(a, !0); + if (!c.isRemoving) + (c.isRemoving = !0), + K(c, 'remove', null, function () { + c.destroy(); + d.isDirtyLegend = d.isDirtyBox = !0; + d.linkSeries(); + a && d.redraw(b); + }); + c.isRemoving = !1; + }, + update: function (a, b) { + var c = this, + d = this.chart, + e = this.userOptions, + f = this.type, + g = J[f].prototype, + h = ['group', 'markerGroup', 'dataLabelsGroup'], + i; + q(h, function (a) { + h[a] = c[a]; + delete c[a]; + }); + a = w( + e, + { animation: !1, index: this.index, pointStart: this.xData[0] }, + { data: this.options.data }, + a + ); + this.remove(!1); + for (i in g) g.hasOwnProperty(i) && (this[i] = t); + r(this, J[a.type || f].prototype); + q(h, function (a) { + c[a] = h[a]; + }); + this.init(d, a); + d.linkSeries(); + p(b, !0) && d.redraw(!1); + } + }); + r(ma.prototype, { + update: function (a, b) { + var c = this.chart, + a = (c.options[this.coll][this.options.index] = w(this.userOptions, a)); + this.destroy(!0); + this._addedPlotLB = t; + this.init(c, r(a, { events: t })); + c.isDirtyBox = !0; + p(b, !0) && c.redraw(); + }, + remove: function (a) { + for ( + var b = this.chart, c = this.coll, d = this.series, e = d.length; + e--; + + ) + d[e] && d[e].remove(!1); + ka(b.axes, this); + ka(b[c], this); + b.options[c].splice(this.options.index, 1); + q(b[c], function (a, b) { + a.options.index = b; + }); + this.destroy(); + b.isDirtyBox = !0; + p(a, !0) && b.redraw(); + }, + setTitle: function (a, b) { + this.update({ title: a }, b); + }, + setCategories: function (a, b) { + this.update({ categories: a }, b); + } + }); + ha = la(O); + J.line = ha; + ca.area = w(T, { threshold: 0 }); + var qa = la(O, { + type: 'area', + getSegments: function () { + var a = this, + b = [], + c = [], + d = [], + e = this.xAxis, + f = this.yAxis, + g = f.stacks[this.stackKey], + h = {}, + i, + j, + k = this.points, + l = this.options.connectNulls, + m, + n; + if (this.options.stacking && !this.cropped) { + for (m = 0; m < k.length; m++) h[k[m].x] = k[m]; + for (n in g) g[n].total !== null && d.push(+n); + d.sort(function (a, b) { + return a - b; + }); + q(d, function (b) { + var d = 0, + k; + if (!l || (h[b] && h[b].y !== null)) + if (h[b]) c.push(h[b]); + else { + for (m = a.index; m <= f.series.length; m++) + if ((k = g[b].points[m + ',' + b])) { + d = k[1]; + break; + } + i = e.translate(b); + j = f.toPixels(d, !0); + c.push({ + y: null, + plotX: i, + clientX: i, + plotY: j, + yBottom: j, + onMouseOver: sa + }); + } + }); + c.length && b.push(c); + } else O.prototype.getSegments.call(this), (b = this.segments); + this.segments = b; + }, + getSegmentPath: function (a) { + var b = O.prototype.getSegmentPath.call(this, a), + c = [].concat(b), + d, + e = this.options; + d = b.length; + var f = this.yAxis.getThreshold(e.threshold), + g; + d === 3 && c.push('L', b[1], b[2]); + if (e.stacking && !this.closedStacks) + for (d = a.length - 1; d >= 0; d--) + (g = p(a[d].yBottom, f)), + d < a.length - 1 && e.step && c.push(a[d + 1].plotX, g), + c.push(a[d].plotX, g); + else this.closeSegment(c, a, f); + this.areaPath = this.areaPath.concat(c); + return b; + }, + closeSegment: function (a, b, c) { + a.push('L', b[b.length - 1].plotX, c, 'L', b[0].plotX, c); + }, + drawGraph: function () { + this.areaPath = []; + O.prototype.drawGraph.apply(this); + var a = this, + b = this.areaPath, + c = this.options, + d = c.negativeColor, + e = c.negativeFillColor, + f = [['area', this.color, c.fillColor]]; + (d || e) && f.push(['areaNeg', d, e]); + q(f, function (d) { + var e = d[0], + f = a[e]; + f + ? f.animate({ d: b }) + : (a[e] = a.chart.renderer + .path(b) + .attr({ + fill: p( + d[2], + ya(d[1]).setOpacity(p(c.fillOpacity, 0.75)).get() + ), + zIndex: 0 + }) + .add(a.group)); + }); + }, + drawLegendSymbol: M.drawRectangle + }); + J.area = qa; + ca.spline = w(T); + ha = la(O, { + type: 'spline', + getPointSpline: function (a, b, c) { + var d = b.plotX, + e = b.plotY, + f = a[c - 1], + g = a[c + 1], + h, + i, + j, + k; + if (f && g) { + a = f.plotY; + j = g.plotX; + var g = g.plotY, + l; + h = (1.5 * d + f.plotX) / 2.5; + i = (1.5 * e + a) / 2.5; + j = (1.5 * d + j) / 2.5; + k = (1.5 * e + g) / 2.5; + l = ((k - i) * (j - d)) / (j - h) + e - k; + i += l; + k += l; + i > a && i > e + ? ((i = u(a, e)), (k = 2 * e - i)) + : i < a && i < e && ((i = C(a, e)), (k = 2 * e - i)); + k > g && k > e + ? ((k = u(g, e)), (i = 2 * e - k)) + : k < g && k < e && ((k = C(g, e)), (i = 2 * e - k)); + b.rightContX = j; + b.rightContY = k; + } + c + ? ((b = [ + 'C', + f.rightContX || f.plotX, + f.rightContY || f.plotY, + h || d, + i || e, + d, + e + ]), + (f.rightContX = f.rightContY = null)) + : (b = ['M', d, e]); + return b; + } + }); + J.spline = ha; + ca.areaspline = w(ca.area); + qa = qa.prototype; + ha = la(ha, { + type: 'areaspline', + closedStacks: !0, + getSegmentPath: qa.getSegmentPath, + closeSegment: qa.closeSegment, + drawGraph: qa.drawGraph, + drawLegendSymbol: M.drawRectangle + }); + J.areaspline = ha; + ca.column = w(T, { + borderColor: '#FFFFFF', + borderRadius: 0, + groupPadding: 0.2, + marker: null, + pointPadding: 0.1, + minPointLength: 0, + cropThreshold: 50, + pointRange: null, + states: { + hover: { brightness: 0.1, shadow: !1, halo: !1 }, + select: { color: '#C0C0C0', borderColor: '#000000', shadow: !1 } + }, + dataLabels: { align: null, verticalAlign: null, y: null }, + stickyTracking: !1, + tooltip: { distance: 6 }, + threshold: 0 + }); + ha = la(O, { + type: 'column', + pointAttrToOptions: { + stroke: 'borderColor', + fill: 'color', + r: 'borderRadius' + }, + cropShoulder: 0, + trackerGroups: ['group', 'dataLabelsGroup'], + negStacks: !0, + init: function () { + O.prototype.init.apply(this, arguments); + var a = this, + b = a.chart; + b.hasRendered && + q(b.series, function (b) { + if (b.type === a.type) b.isDirty = !0; + }); + }, + getColumnMetrics: function () { + var a = this, + b = a.options, + c = a.xAxis, + d = a.yAxis, + e = c.reversed, + f, + g = {}, + h, + i = 0; + b.grouping === !1 + ? (i = 1) + : q(a.chart.series, function (b) { + var c = b.options, + e = b.yAxis; + if ( + b.type === a.type && + b.visible && + d.len === e.len && + d.pos === e.pos + ) + c.stacking + ? ((f = b.stackKey), g[f] === t && (g[f] = i++), (h = g[f])) + : c.grouping !== !1 && (h = i++), + (b.columnIndex = h); + }); + var c = C( + Q(c.transA) * + (c.ordinalSlope || + b.pointRange || + c.closestPointRange || + c.tickInterval || + 1), + c.len + ), + j = c * b.groupPadding, + k = (c - 2 * j) / i, + l = b.pointWidth, + b = s(l) ? (k - l) / 2 : k * b.pointPadding, + l = p(l, k - 2 * b); + return (a.columnMetrics = { + width: l, + offset: + b + + (j + + ((e ? i - (a.columnIndex || 0) : a.columnIndex) || 0) * k - + c / 2) * + (e ? -1 : 1) + }); + }, + translate: function () { + var a = this, + b = a.chart, + c = a.options, + d = (a.borderWidth = p( + c.borderWidth, + a.activePointCount > 0.5 * a.xAxis.len ? 0 : 1 + )), + e = a.yAxis, + f = (a.translatedThreshold = e.getThreshold(c.threshold)), + g = p(c.minPointLength, 5), + h = a.getColumnMetrics(), + i = h.width, + j = (a.barW = u(i, 1 + 2 * d)), + k = (a.pointXOffset = h.offset), + l = -(d % 2 ? 0.5 : 0), + m = d % 2 ? 0.5 : 1; + b.renderer.isVML && b.inverted && (m += 1); + c.pointPadding && (j = Ka(j)); + O.prototype.translate.apply(a); + q(a.points, function (c) { + var d = p(c.yBottom, f), + h = C(u(-999 - d, c.plotY), e.len + 999 + d), + q = c.plotX + k, + r = j, + s = C(h, d), + t; + t = u(h, d) - s; + Q(t) < g && + g && + ((t = g), + (s = v( + Q(s - f) > g + ? d - g + : f - (e.translate(c.y, 0, 1, 0, 1) <= f ? g : 0) + ))); + c.barX = q; + c.pointWidth = i; + c.tooltipPos = b.inverted + ? [e.len - h, a.xAxis.len - q - r / 2] + : [q + r / 2, h]; + r = v(q + r) + l; + q = v(q) + l; + r -= q; + d = Q(s) < 0.5; + t = v(s + t) + m; + s = v(s) + m; + t -= s; + d && ((s -= 1), (t += 1)); + c.shapeType = 'rect'; + c.shapeArgs = { x: q, y: s, width: r, height: t }; + }); + }, + getSymbol: sa, + drawLegendSymbol: M.drawRectangle, + drawGraph: sa, + drawPoints: function () { + var a = this, + b = this.chart, + c = a.options, + d = b.renderer, + e = c.animationLimit || 250, + f, + g; + q(a.points, function (h) { + var i = h.plotY, + j = h.graphic; + if (i !== t && !isNaN(i) && h.y !== null) + (f = h.shapeArgs), + (i = s(a.borderWidth) ? { 'stroke-width': a.borderWidth } : {}), + (g = h.pointAttr[h.selected ? 'select' : ''] || a.pointAttr['']), + j + ? (ab(j), j.attr(i)[b.pointCount < e ? 'animate' : 'attr'](w(f))) + : (h.graphic = d[h.shapeType](f) + .attr(g) + .attr(i) + .add(a.group) + .shadow(c.shadow, null, c.stacking && !c.borderRadius)); + else if (j) h.graphic = j.destroy(); + }); + }, + animate: function (a) { + var b = this.yAxis, + c = this.options, + d = this.chart.inverted, + e = {}; + if (ba) + a + ? ((e.scaleY = 0.001), + (a = C(b.pos + b.len, u(b.pos, b.toPixels(c.threshold)))), + d ? (e.translateX = a - b.len) : (e.translateY = a), + this.group.attr(e)) + : ((e.scaleY = 1), + (e[d ? 'translateX' : 'translateY'] = b.pos), + this.group.animate(e, this.options.animation), + (this.animate = null)); + }, + remove: function () { + var a = this, + b = a.chart; + b.hasRendered && + q(b.series, function (b) { + if (b.type === a.type) b.isDirty = !0; + }); + O.prototype.remove.apply(a, arguments); + } + }); + J.column = ha; + ca.bar = w(ca.column); + qa = la(ha, { type: 'bar', inverted: !0 }); + J.bar = qa; + ca.scatter = w(T, { + lineWidth: 0, + tooltip: { + headerFormat: + ' {series.name}
    ', + pointFormat: 'x: {point.x}
    y: {point.y}
    ' + }, + stickyTracking: !1 + }); + qa = la(O, { + type: 'scatter', + sorted: !1, + requireSorting: !1, + noSharedTooltip: !0, + trackerGroups: ['markerGroup', 'dataLabelsGroup'], + takeOrdinalPosition: !1, + singularTooltips: !0, + drawGraph: function () { + this.options.lineWidth && O.prototype.drawGraph.call(this); + } + }); + J.scatter = qa; + ca.pie = w(T, { + borderColor: '#FFFFFF', + borderWidth: 1, + center: [null, null], + clip: !1, + colorByPoint: !0, + dataLabels: { + distance: 30, + enabled: !0, + formatter: function () { + return this.point.name; + } + }, + ignoreHiddenPoint: !0, + legendType: 'point', + marker: null, + size: null, + showInLegend: !1, + slicedOffset: 10, + states: { hover: { brightness: 0.1, shadow: !1 } }, + stickyTracking: !1, + tooltip: { followPointer: !0 } + }); + T = { + type: 'pie', + isCartesian: !1, + pointClass: la(Ea, { + init: function () { + Ea.prototype.init.apply(this, arguments); + var a = this, + b; + if (a.y < 0) a.y = null; + r(a, { visible: a.visible !== !1, name: p(a.name, 'Slice') }); + b = function (b) { + a.slice(b.type === 'select'); + }; + N(a, 'select', b); + N(a, 'unselect', b); + return a; + }, + setVisible: function (a) { + var b = this, + c = b.series, + d = c.chart; + b.visible = b.options.visible = a = a === t ? !b.visible : a; + c.options.data[Da(b, c.data)] = b.options; + q(['graphic', 'dataLabel', 'connector', 'shadowGroup'], function (c) { + if (b[c]) b[c][a ? 'show' : 'hide'](!0); + }); + b.legendItem && d.legend.colorizeItem(b, a); + if (!c.isDirty && c.options.ignoreHiddenPoint) + (c.isDirty = !0), d.redraw(); + }, + slice: function (a, b, c) { + var d = this.series; + Qa(c, d.chart); + p(b, !0); + this.sliced = this.options.sliced = a = s(a) ? a : !this.sliced; + d.options.data[Da(this, d.data)] = this.options; + a = a ? this.slicedTranslation : { translateX: 0, translateY: 0 }; + this.graphic.animate(a); + this.shadowGroup && this.shadowGroup.animate(a); + }, + haloPath: function (a) { + var b = this.shapeArgs, + c = this.series.chart; + return this.sliced || !this.visible + ? [] + : this.series.chart.renderer.symbols.arc( + c.plotLeft + b.x, + c.plotTop + b.y, + b.r + a, + b.r + a, + { innerR: this.shapeArgs.r, start: b.start, end: b.end } + ); + } + }), + requireSorting: !1, + noSharedTooltip: !0, + trackerGroups: ['group', 'dataLabelsGroup'], + axisTypes: [], + pointAttrToOptions: { + stroke: 'borderColor', + 'stroke-width': 'borderWidth', + fill: 'color' + }, + singularTooltips: !0, + getColor: sa, + animate: function (a) { + var b = this, + c = b.points, + d = b.startAngleRad; + if (!a) + q(c, function (a) { + var c = a.graphic, + a = a.shapeArgs; + c && + (c.attr({ r: b.center[3] / 2, start: d, end: d }), + c.animate( + { r: a.r, start: a.start, end: a.end }, + b.options.animation + )); + }), + (b.animate = null); + }, + setData: function (a, b, c, d) { + O.prototype.setData.call(this, a, !1, c, d); + this.processData(); + this.generatePoints(); + p(b, !0) && this.chart.redraw(c); + }, + generatePoints: function () { + var a, + b = 0, + c, + d, + e, + f = this.options.ignoreHiddenPoint; + O.prototype.generatePoints.call(this); + c = this.points; + d = c.length; + for (a = 0; a < d; a++) (e = c[a]), (b += f && !e.visible ? 0 : e.y); + this.total = b; + for (a = 0; a < d; a++) + (e = c[a]), (e.percentage = b > 0 ? (e.y / b) * 100 : 0), (e.total = b); + }, + translate: function (a) { + this.generatePoints(); + var b = 0, + c = this.options, + d = c.slicedOffset, + e = d + c.borderWidth, + f, + g, + h, + i = c.startAngle || 0, + j = (this.startAngleRad = (na / 180) * (i - 90)), + i = (this.endAngleRad = (na / 180) * (p(c.endAngle, i + 360) - 90)) - j, + k = this.points, + l = c.dataLabels.distance, + c = c.ignoreHiddenPoint, + m, + n = k.length, + o; + if (!a) this.center = a = this.getCenter(); + this.getX = function (b, c) { + h = V.asin(C((b - a[1]) / (a[2] / 2 + l), 1)); + return a[0] + (c ? -1 : 1) * aa(h) * (a[2] / 2 + l); + }; + for (m = 0; m < n; m++) { + o = k[m]; + f = j + b * i; + if (!c || o.visible) b += o.percentage / 100; + g = j + b * i; + o.shapeType = 'arc'; + o.shapeArgs = { + x: a[0], + y: a[1], + r: a[2] / 2, + innerR: a[3] / 2, + start: v(f * 1e3) / 1e3, + end: v(g * 1e3) / 1e3 + }; + h = (g + f) / 2; + h > 1.5 * na ? (h -= 2 * na) : h < -na / 2 && (h += 2 * na); + o.slicedTranslation = { + translateX: v(aa(h) * d), + translateY: v(fa(h) * d) + }; + f = (aa(h) * a[2]) / 2; + g = (fa(h) * a[2]) / 2; + o.tooltipPos = [a[0] + f * 0.7, a[1] + g * 0.7]; + o.half = h < -na / 2 || h > na / 2 ? 1 : 0; + o.angle = h; + e = C(e, l / 2); + o.labelPos = [ + a[0] + f + aa(h) * l, + a[1] + g + fa(h) * l, + a[0] + f + aa(h) * e, + a[1] + g + fa(h) * e, + a[0] + f, + a[1] + g, + l < 0 ? 'center' : o.half ? 'right' : 'left', + h + ]; + } + }, + drawGraph: null, + drawPoints: function () { + var a = this, + b = a.chart.renderer, + c, + d, + e = a.options.shadow, + f, + g; + if (e && !a.shadowGroup) a.shadowGroup = b.g('shadow').add(a.group); + q(a.points, function (h) { + d = h.graphic; + g = h.shapeArgs; + f = h.shadowGroup; + if (e && !f) f = h.shadowGroup = b.g('shadow').add(a.shadowGroup); + c = h.sliced ? h.slicedTranslation : { translateX: 0, translateY: 0 }; + f && f.attr(c); + d + ? d.animate(r(g, c)) + : (h.graphic = d = + b[h.shapeType](g) + .setRadialReference(a.center) + .attr(h.pointAttr[h.selected ? 'select' : '']) + .attr({ 'stroke-linejoin': 'round' }) + .attr(c) + .add(a.group) + .shadow(e, f)); + h.visible !== void 0 && h.setVisible(h.visible); + }); + }, + sortByAngle: function (a, b) { + a.sort(function (a, d) { + return a.angle !== void 0 && (d.angle - a.angle) * b; + }); + }, + drawLegendSymbol: M.drawRectangle, + getCenter: Z.getCenter, + getSymbol: sa + }; + T = la(O, T); + J.pie = T; + O.prototype.drawDataLabels = function () { + var a = this, + b = a.options, + c = b.cursor, + d = b.dataLabels, + e = a.points, + f, + g, + h, + i; + if (d.enabled || a._hasPointLabels) + a.dlProcessOptions && a.dlProcessOptions(d), + (i = a.plotGroup( + 'dataLabelsGroup', + 'data-labels', + d.defer ? 'hidden' : 'visible', + d.zIndex || 6 + )), + !a.hasRendered && + p(d.defer, !0) && + (i.attr({ opacity: 0 }), + N(a, 'afterAnimate', function () { + a.visible && i.show(); + i[b.animation ? 'animate' : 'attr']( + { opacity: 1 }, + { duration: 200 } + ); + })), + (g = d), + q(e, function (b) { + var e, + l = b.dataLabel, + m, + n, + o = b.connector, + q = !0; + f = b.options && b.options.dataLabels; + e = p(f && f.enabled, g.enabled); + if (l && !e) b.dataLabel = l.destroy(); + else if (e) { + d = w(g, f); + e = d.rotation; + m = b.getLabelConfig(); + h = d.format ? Ia(d.format, m) : d.formatter.call(m, d); + d.style.color = p(d.color, d.style.color, a.color, 'black'); + if (l) + if (s(h)) l.attr({ text: h }), (q = !1); + else { + if (((b.dataLabel = l = l.destroy()), o)) + b.connector = o.destroy(); + } + else if (s(h)) { + l = { + fill: d.backgroundColor, + stroke: d.borderColor, + 'stroke-width': d.borderWidth, + r: d.borderRadius || 0, + rotation: e, + padding: d.padding, + zIndex: 1 + }; + for (n in l) l[n] === t && delete l[n]; + l = b.dataLabel = a.chart.renderer[e ? 'text' : 'label']( + h, + 0, + -999, + null, + null, + null, + d.useHTML + ) + .attr(l) + .css(r(d.style, c && { cursor: c })) + .add(i) + .shadow(d.shadow); + } + l && a.alignDataLabel(b, l, d, null, q); + } + }); + }; + O.prototype.alignDataLabel = function (a, b, c, d, e) { + var f = this.chart, + g = f.inverted, + h = p(a.plotX, -999), + i = p(a.plotY, -999), + j = b.getBBox(); + if ( + (a = + this.visible && + (a.series.forceDL || + f.isInsidePlot(h, v(i), g) || + (d && f.isInsidePlot(h, g ? d.x + 1 : d.y + d.height - 1, g)))) + ) + (d = r( + { + x: g ? f.plotWidth - i : h, + y: v(g ? f.plotHeight - h : i), + width: 0, + height: 0 + }, + d + )), + r(c, { width: j.width, height: j.height }), + c.rotation + ? b[e ? 'attr' : 'animate']({ + x: d.x + c.x + d.width / 2, + y: d.y + c.y + d.height / 2 + }).attr({ align: c.align }) + : (b.align(c, null, d), + (g = b.alignAttr), + p(c.overflow, 'justify') === 'justify' + ? this.justifyDataLabel(b, c, g, j, d, e) + : p(c.crop, !0) && + (a = + f.isInsidePlot(g.x, g.y) && + f.isInsidePlot(g.x + j.width, g.y + j.height))); + if (!a) b.attr({ y: -999 }), (b.placed = !1); + }; + O.prototype.justifyDataLabel = function (a, b, c, d, e, f) { + var g = this.chart, + h = b.align, + i = b.verticalAlign, + j, + k; + j = c.x; + if (j < 0) h === 'right' ? (b.align = 'left') : (b.x = -j), (k = !0); + j = c.x + d.width; + if (j > g.plotWidth) + h === 'left' ? (b.align = 'right') : (b.x = g.plotWidth - j), (k = !0); + j = c.y; + if (j < 0) + i === 'bottom' ? (b.verticalAlign = 'top') : (b.y = -j), (k = !0); + j = c.y + d.height; + if (j > g.plotHeight) + i === 'top' ? (b.verticalAlign = 'bottom') : (b.y = g.plotHeight - j), + (k = !0); + if (k) (a.placed = !f), a.align(b, null, e); + }; + if (J.pie) + (J.pie.prototype.drawDataLabels = function () { + var a = this, + b = a.data, + c, + d = a.chart, + e = a.options.dataLabels, + f = p(e.connectorPadding, 10), + g = p(e.connectorWidth, 1), + h = d.plotWidth, + i = d.plotHeight, + j, + k, + l = p(e.softConnector, !0), + m = e.distance, + n = a.center, + o = n[2] / 2, + r = n[1], + s = m > 0, + t, + w, + x, + z = [[], []], + B, + A, + K, + J, + y, + R = [0, 0, 0, 0], + N = function (a, b) { + return b.y - a.y; + }; + if (a.visible && (e.enabled || a._hasPointLabels)) { + O.prototype.drawDataLabels.apply(a); + q(b, function (a) { + a.dataLabel && a.visible && z[a.half].push(a); + }); + for (J = 2; J--; ) { + var H = [], + M = [], + F = z[J], + L = F.length, + G; + if (L) { + a.sortByAngle(F, J - 0.5); + for (y = b = 0; !b && F[y]; ) + (b = + F[y] && + F[y].dataLabel && + (F[y].dataLabel.getBBox().height || 21)), + y++; + if (m > 0) { + w = C(r + o + m, d.plotHeight); + for (y = u(0, r - o - m); y <= w; y += b) H.push(y); + w = H.length; + if (L > w) { + c = [].concat(F); + c.sort(N); + for (y = L; y--; ) c[y].rank = y; + for (y = L; y--; ) F[y].rank >= w && F.splice(y, 1); + L = F.length; + } + for (y = 0; y < L; y++) { + c = F[y]; + x = c.labelPos; + c = 9999; + var S, P; + for (P = 0; P < w; P++) + (S = Q(H[P] - x[1])), S < c && ((c = S), (G = P)); + if (G < y && H[y] !== null) G = y; + else + for ( + w < L - y + G && H[y] !== null && (G = w - L + y); + H[G] === null; + + ) + G++; + M.push({ i: G, y: H[G] }); + H[G] = null; + } + M.sort(N); + } + for (y = 0; y < L; y++) { + c = F[y]; + x = c.labelPos; + t = c.dataLabel; + K = c.visible === !1 ? 'hidden' : 'visible'; + c = x[1]; + if (m > 0) { + if ( + ((w = M.pop()), + (G = w.i), + (A = w.y), + (c > A && H[G + 1] !== null) || (c < A && H[G - 1] !== null)) + ) + A = C(u(0, c), d.plotHeight); + } else A = c; + B = e.justify + ? n[0] + (J ? -1 : 1) * (o + m) + : a.getX(A === r - o - m || A === r + o + m ? c : A, J); + t._attr = { visibility: K, align: x[6] }; + t._pos = { + x: B + e.x + ({ left: f, right: -f }[x[6]] || 0), + y: A + e.y - 10 + }; + t.connX = B; + t.connY = A; + if (this.options.size === null) + (w = t.width), + B - w < f + ? (R[3] = u(v(w - B + f), R[3])) + : B + w > h - f && (R[1] = u(v(B + w - h + f), R[1])), + A - b / 2 < 0 + ? (R[0] = u(v(-A + b / 2), R[0])) + : A + b / 2 > i && (R[2] = u(v(A + b / 2 - i), R[2])); + } + } + } + if (Ba(R) === 0 || this.verifyDataLabelOverflow(R)) + this.placeDataLabels(), + s && + g && + q(this.points, function (b) { + j = b.connector; + x = b.labelPos; + if ((t = b.dataLabel) && t._pos) + (K = t._attr.visibility), + (B = t.connX), + (A = t.connY), + (k = l + ? [ + 'M', + B + (x[6] === 'left' ? 5 : -5), + A, + 'C', + B, + A, + 2 * x[2] - x[4], + 2 * x[3] - x[5], + x[2], + x[3], + 'L', + x[4], + x[5] + ] + : [ + 'M', + B + (x[6] === 'left' ? 5 : -5), + A, + 'L', + x[2], + x[3], + 'L', + x[4], + x[5] + ]), + j + ? (j.animate({ d: k }), j.attr('visibility', K)) + : (b.connector = j = + a.chart.renderer + .path(k) + .attr({ + 'stroke-width': g, + stroke: e.connectorColor || b.color || '#606060', + visibility: K + }) + .add(a.dataLabelsGroup)); + else if (j) b.connector = j.destroy(); + }); + } + }), + (J.pie.prototype.placeDataLabels = function () { + q(this.points, function (a) { + var a = a.dataLabel, + b; + if (a) + (b = a._pos) + ? (a.attr(a._attr), + a[a.moved ? 'animate' : 'attr'](b), + (a.moved = !0)) + : a && a.attr({ y: -999 }); + }); + }), + (J.pie.prototype.alignDataLabel = sa), + (J.pie.prototype.verifyDataLabelOverflow = function (a) { + var b = this.center, + c = this.options, + d = c.center, + e = (c = c.minSize || 80), + f; + d[0] !== null + ? (e = u(b[2] - u(a[1], a[3]), c)) + : ((e = u(b[2] - a[1] - a[3], c)), (b[0] += (a[3] - a[1]) / 2)); + d[1] !== null + ? (e = u(C(e, b[2] - u(a[0], a[2])), c)) + : ((e = u(C(e, b[2] - a[0] - a[2]), c)), (b[1] += (a[0] - a[2]) / 2)); + e < b[2] + ? ((b[2] = e), + this.translate(b), + q(this.points, function (a) { + if (a.dataLabel) a.dataLabel._pos = null; + }), + this.drawDataLabels && this.drawDataLabels()) + : (f = !0); + return f; + }); + if (J.column) + J.column.prototype.alignDataLabel = function (a, b, c, d, e) { + var f = this.chart, + g = f.inverted, + h = a.dlBox || a.shapeArgs, + i = a.below || a.plotY > p(this.translatedThreshold, f.plotSizeY), + j = p(c.inside, !!this.options.stacking); + if ( + h && + ((d = w(h)), + g && + (d = { + x: f.plotWidth - d.y - d.height, + y: f.plotHeight - d.x - d.width, + width: d.height, + height: d.width + }), + !j) + ) + g + ? ((d.x += i ? 0 : d.width), (d.width = 0)) + : ((d.y += i ? d.height : 0), (d.height = 0)); + c.align = p(c.align, !g || j ? 'center' : i ? 'right' : 'left'); + c.verticalAlign = p( + c.verticalAlign, + g || j ? 'middle' : i ? 'top' : 'bottom' + ); + O.prototype.alignDataLabel.call(this, a, b, c, d, e); + }; + T = S.TrackerMixin = { + drawTrackerPoint: function () { + var a = this, + b = a.chart, + c = b.pointer, + d = a.options.cursor, + e = d && { cursor: d }, + f = function (c) { + var d = c.target, + e; + if (b.hoverSeries !== a) a.onMouseOver(); + for (; d && !e; ) (e = d.point), (d = d.parentNode); + if (e !== t && e !== b.hoverPoint) e.onMouseOver(c); + }; + q(a.points, function (a) { + if (a.graphic) a.graphic.element.point = a; + if (a.dataLabel) a.dataLabel.element.point = a; + }); + if (!a._hasTracking) + q(a.trackerGroups, function (b) { + if ( + a[b] && + (a[b] + .addClass('highcharts-tracker') + .on('mouseover', f) + .on('mouseout', function (a) { + c.onTrackerMouseOut(a); + }) + .css(e), + Za) + ) + a[b].on('touchstart', f); + }), + (a._hasTracking = !0); + }, + drawTrackerGraph: function () { + var a = this, + b = a.options, + c = b.trackByArea, + d = [].concat(c ? a.areaPath : a.graphPath), + e = d.length, + f = a.chart, + g = f.pointer, + h = f.renderer, + i = f.options.tooltip.snap, + j = a.tracker, + k = b.cursor, + l = k && { cursor: k }, + k = a.singlePoints, + m, + n = function () { + if (f.hoverSeries !== a) a.onMouseOver(); + }, + o = 'rgba(192,192,192,' + (ba ? 1.0e-4 : 0.002) + ')'; + if (e && !c) + for (m = e + 1; m--; ) + d[m] === 'M' && d.splice(m + 1, 0, d[m + 1] - i, d[m + 2], 'L'), + ((m && d[m] === 'M') || m === e) && + d.splice(m, 0, 'L', d[m - 2] + i, d[m - 1]); + for (m = 0; m < k.length; m++) + (e = k[m]), + d.push('M', e.plotX - i, e.plotY, 'L', e.plotX + i, e.plotY); + j + ? j.attr({ d: d }) + : ((a.tracker = h + .path(d) + .attr({ + 'stroke-linejoin': 'round', + visibility: a.visible ? 'visible' : 'hidden', + stroke: o, + fill: c ? o : P, + 'stroke-width': b.lineWidth + (c ? 0 : 2 * i), + zIndex: 2 + }) + .add(a.group)), + q([a.tracker, a.markerGroup], function (a) { + a.addClass('highcharts-tracker') + .on('mouseover', n) + .on('mouseout', function (a) { + g.onTrackerMouseOut(a); + }) + .css(l); + if (Za) a.on('touchstart', n); + })); + } + }; + if (J.column) ha.prototype.drawTracker = T.drawTrackerPoint; + if (J.pie) J.pie.prototype.drawTracker = T.drawTrackerPoint; + if (J.scatter) qa.prototype.drawTracker = T.drawTrackerPoint; + r(kb.prototype, { + setItemEvents: function (a, b, c, d, e) { + var f = this; + (c ? b : a.legendGroup) + .on('mouseover', function () { + a.setState('hover'); + b.css(f.options.itemHoverStyle); + }) + .on('mouseout', function () { + b.css(a.visible ? d : e); + a.setState(); + }) + .on('click', function (b) { + var c = function () { + a.setVisible(); + }, + b = { browserEvent: b }; + a.firePointEvent + ? a.firePointEvent('legendItemClick', b, c) + : K(a, 'legendItemClick', b, c); + }); + }, + createCheckboxForItem: function (a) { + a.checkbox = $( + 'input', + { type: 'checkbox', checked: a.selected, defaultChecked: a.selected }, + this.options.itemCheckboxStyle, + this.chart.container + ); + N(a.checkbox, 'click', function (b) { + K(a, 'checkboxClick', { checked: b.target.checked }, function () { + a.select(); + }); + }); + } + }); + L.legend.itemStyle.cursor = 'pointer'; + r(Xa.prototype, { + showResetZoom: function () { + var a = this, + b = L.lang, + c = a.options.chart.resetZoomButton, + d = c.theme, + e = d.states, + f = c.relativeTo === 'chart' ? null : 'plotBox'; + this.resetZoomButton = a.renderer + .button( + b.resetZoom, + null, + null, + function () { + a.zoomOut(); + }, + d, + e && e.hover + ) + .attr({ align: c.position.align, title: b.resetZoomTitle }) + .add() + .align(c.position, !1, f); + }, + zoomOut: function () { + var a = this; + K(a, 'selection', { resetSelection: !0 }, function () { + a.zoom(); + }); + }, + zoom: function (a) { + var b, + c = this.pointer, + d = !1, + e; + !a || a.resetSelection + ? q(this.axes, function (a) { + b = a.zoom(); + }) + : q(a.xAxis.concat(a.yAxis), function (a) { + var e = a.axis, + h = e.isXAxis; + if (c[h ? 'zoomX' : 'zoomY'] || c[h ? 'pinchX' : 'pinchY']) + (b = e.zoom(a.min, a.max)), e.displayBtn && (d = !0); + }); + e = this.resetZoomButton; + if (d && !e) this.showResetZoom(); + else if (!d && da(e)) this.resetZoomButton = e.destroy(); + b && + this.redraw( + p( + this.options.chart.animation, + a && a.animation, + this.pointCount < 100 + ) + ); + }, + pan: function (a, b) { + var c = this, + d = c.hoverPoints, + e; + d && + q(d, function (a) { + a.setState(); + }); + q(b === 'xy' ? [1, 0] : [1], function (b) { + var d = a[b ? 'chartX' : 'chartY'], + h = c[b ? 'xAxis' : 'yAxis'][0], + i = c[b ? 'mouseDownX' : 'mouseDownY'], + j = (h.pointRange || 0) / 2, + k = h.getExtremes(), + l = h.toValue(i - d, !0) + j, + i = h.toValue(i + c[b ? 'plotWidth' : 'plotHeight'] - d, !0) - j; + h.series.length && + l > C(k.dataMin, k.min) && + i < u(k.dataMax, k.max) && + (h.setExtremes(l, i, !1, !1, { trigger: 'pan' }), (e = !0)); + c[b ? 'mouseDownX' : 'mouseDownY'] = d; + }); + e && c.redraw(!1); + A(c.container, { cursor: 'move' }); + } + }); + r(Ea.prototype, { + select: function (a, b) { + var c = this, + d = c.series, + e = d.chart, + a = p(a, !c.selected); + c.firePointEvent( + a ? 'select' : 'unselect', + { accumulate: b }, + function () { + c.selected = c.options.selected = a; + d.options.data[Da(c, d.data)] = c.options; + c.setState(a && 'select'); + b || + q(e.getSelectedPoints(), function (a) { + if (a.selected && a !== c) + (a.selected = a.options.selected = !1), + (d.options.data[Da(a, d.data)] = a.options), + a.setState(''), + a.firePointEvent('unselect'); + }); + } + ); + }, + onMouseOver: function (a) { + var b = this.series, + c = b.chart, + d = c.tooltip, + e = c.hoverPoint; + if (e && e !== this) e.onMouseOut(); + this.firePointEvent('mouseOver'); + d && (!d.shared || b.noSharedTooltip) && d.refresh(this, a); + this.setState('hover'); + c.hoverPoint = this; + }, + onMouseOut: function () { + var a = this.series.chart, + b = a.hoverPoints; + this.firePointEvent('mouseOut'); + if (!b || Da(this, b) === -1) this.setState(), (a.hoverPoint = null); + }, + importEvents: function () { + if (!this.hasImportedEvents) { + var a = w(this.series.options.point, this.options).events, + b; + this.events = a; + for (b in a) N(this, b, a[b]); + this.hasImportedEvents = !0; + } + }, + setState: function (a, b) { + var c = this.plotX, + d = this.plotY, + e = this.series, + f = e.options.states, + g = ca[e.type].marker && e.options.marker, + h = g && !g.enabled, + i = g && g.states[a], + j = i && i.enabled === !1, + k = e.stateMarkerGraphic, + l = this.marker || {}, + m = e.chart, + n = e.halo, + o, + a = a || ''; + o = this.pointAttr[a] || e.pointAttr[a]; + if ( + !( + (a === this.state && !b) || + (this.selected && a !== 'select') || + (f[a] && f[a].enabled === !1) || + (a && (j || (h && i.enabled === !1))) || + (a && l.states && l.states[a] && l.states[a].enabled === !1) + ) + ) { + if (this.graphic) + (g = g && this.graphic.symbolName && o.r), + this.graphic.attr( + w(o, g ? { x: c - g, y: d - g, width: 2 * g, height: 2 * g } : {}) + ), + k && k.hide(); + else { + if (a && i) + if ( + ((g = i.radius), + (l = l.symbol || e.symbol), + k && k.currentSymbol !== l && (k = k.destroy()), + k) + ) + k[b ? 'animate' : 'attr']({ x: c - g, y: d - g }); + else if (l) + (e.stateMarkerGraphic = k = + m.renderer + .symbol(l, c - g, d - g, 2 * g, 2 * g) + .attr(o) + .add(e.markerGroup)), + (k.currentSymbol = l); + if (k) k[a && m.isInsidePlot(c, d, m.inverted) ? 'show' : 'hide'](); + } + if ((c = f[a] && f[a].halo) && c.size) { + if (!n) e.halo = n = m.renderer.path().add(e.seriesGroup); + n.attr( + r( + { + fill: ya(this.color || e.color) + .setOpacity(c.opacity) + .get() + }, + c.attributes + ) + )[b ? 'animate' : 'attr']({ d: this.haloPath(c.size) }); + } else n && n.attr({ d: [] }); + this.state = a; + } + }, + haloPath: function (a) { + var b = this.series, + c = b.chart, + d = b.getPlotBox(), + e = c.inverted; + return c.renderer.symbols.circle( + d.translateX + (e ? b.yAxis.len - this.plotY : this.plotX) - a, + d.translateY + (e ? b.xAxis.len - this.plotX : this.plotY) - a, + a * 2, + a * 2 + ); + } + }); + r(O.prototype, { + onMouseOver: function () { + var a = this.chart, + b = a.hoverSeries; + if (b && b !== this) b.onMouseOut(); + this.options.events.mouseOver && K(this, 'mouseOver'); + this.setState('hover'); + a.hoverSeries = this; + }, + onMouseOut: function () { + var a = this.options, + b = this.chart, + c = b.tooltip, + d = b.hoverPoint; + if (d) d.onMouseOut(); + this && a.events.mouseOut && K(this, 'mouseOut'); + c && !a.stickyTracking && (!c.shared || this.noSharedTooltip) && c.hide(); + this.setState(); + b.hoverSeries = null; + }, + setState: function (a) { + var b = this.options, + c = this.graph, + d = this.graphNeg, + e = b.states, + b = b.lineWidth, + a = a || ''; + if (this.state !== a) + (this.state = a), + (e[a] && e[a].enabled === !1) || + (a && (b = e[a].lineWidth || b + (e[a].lineWidthPlus || 0)), + c && + !c.dashstyle && + ((a = { 'stroke-width': b }), c.attr(a), d && d.attr(a))); + }, + setVisible: function (a, b) { + var c = this, + d = c.chart, + e = c.legendItem, + f, + g = d.options.chart.ignoreHiddenSeries, + h = c.visible; + f = (c.visible = a = c.userOptions.visible = a === t ? !h : a) + ? 'show' + : 'hide'; + q(['group', 'dataLabelsGroup', 'markerGroup', 'tracker'], function (a) { + if (c[a]) c[a][f](); + }); + if (d.hoverSeries === c) c.onMouseOut(); + e && d.legend.colorizeItem(c, a); + c.isDirty = !0; + c.options.stacking && + q(d.series, function (a) { + if (a.options.stacking && a.visible) a.isDirty = !0; + }); + q(c.linkedSeries, function (b) { + b.setVisible(a, !1); + }); + if (g) d.isDirtyBox = !0; + b !== !1 && d.redraw(); + K(c, f); + }, + setTooltipPoints: function (a) { + var b = [], + c, + d, + e = this.xAxis, + f = e && e.getExtremes(), + g = e ? e.tooltipLen || e.len : this.chart.plotSizeX, + h, + i, + j = []; + if (!(this.options.enableMouseTracking === !1 || this.singularTooltips)) { + if (a) this.tooltipPoints = null; + q(this.segments || this.points, function (a) { + b = b.concat(a); + }); + e && e.reversed && (b = b.reverse()); + this.orderTooltipPoints && this.orderTooltipPoints(b); + a = b.length; + for (i = 0; i < a; i++) + if (((e = b[i]), (c = e.x), c >= f.min && c <= f.max)) { + h = b[i + 1]; + c = d === t ? 0 : d + 1; + for ( + d = b[i + 1] + ? C( + u( + 0, + U( + (e.clientX + (h ? h.wrappedClientX || h.clientX : g)) / + 2 + ) + ), + g + ) + : g; + c >= 0 && c <= d; + + ) + j[c++] = e; + } + this.tooltipPoints = j; + } + }, + show: function () { + this.setVisible(!0); + }, + hide: function () { + this.setVisible(!1); + }, + select: function (a) { + this.selected = a = a === t ? !this.selected : a; + if (this.checkbox) this.checkbox.checked = a; + K(this, a ? 'select' : 'unselect'); + }, + drawTracker: T.drawTrackerGraph + }); + r(S, { + Axis: ma, + Chart: Xa, + Color: ya, + Point: Ea, + Tick: Sa, + Renderer: Ya, + Series: O, + SVGElement: G, + SVGRenderer: ta, + arrayMin: Na, + arrayMax: Ba, + charts: W, + dateFormat: bb, + format: Ia, + pathAnim: ub, + getOptions: function () { + return L; + }, + hasBidiBug: Nb, + isTouchDevice: Hb, + numberFormat: Ga, + seriesTypes: J, + setOptions: function (a) { + L = w(!0, L, a); + Ab(); + return L; + }, + addEvent: N, + removeEvent: X, + createElement: $, + discardElement: Pa, + css: A, + each: q, + extend: r, + map: Ua, + merge: w, + pick: p, + splat: ra, + extendClass: la, + pInt: z, + wrap: Ma, + svg: ba, + canvas: ga, + vml: !ba && !ga, + product: 'Highcharts', + version: '4.0.3' + }); +})(); diff --git a/tests/apps/com_openf2_tests_preloaded/manifest.js b/tests/apps/com_openf2_tests_preloaded/manifest.js index 0fab9013..ff57f22f 100644 --- a/tests/apps/com_openf2_tests_preloaded/manifest.js +++ b/tests/apps/com_openf2_tests_preloaded/manifest.js @@ -1,9 +1,11 @@ F2_jsonpCallback_com_openf2_tests_preloaded({ - "inlineScripts": [], - "scripts": [], - "styles": [], - "apps": [{ - "html": '
    Hello world!
    ', - "status": 'success' - }] -}); \ No newline at end of file + inlineScripts: [], + scripts: [], + styles: [], + apps: [ + { + html: '
    Hello world!
    ', + status: 'success' + } + ] +}); diff --git a/tests/apps/com_openf2_tests_preloaded/preloadedTest-amd.js b/tests/apps/com_openf2_tests_preloaded/preloadedTest-amd.js index a3802eb5..df4dddea 100644 --- a/tests/apps/com_openf2_tests_preloaded/preloadedTest-amd.js +++ b/tests/apps/com_openf2_tests_preloaded/preloadedTest-amd.js @@ -1,6 +1,5 @@ require(['../dist/f2.js'], function () { - F2.Apps[TEST_APP_ID] = (function() { - + F2.Apps[TEST_APP_ID] = (function () { var App_Class = function (appConfig, appContent, root) { this.appConfig = appConfig; this.appContent = appContent; @@ -12,7 +11,11 @@ require(['../dist/f2.js'], function () { App_Class.prototype.init = function () { F2.PreloadAppInitializedCounter++; var context = this; - F2.Events.on('PreloadAppCommuncation', function(){ if(!context.doNotCallAgain) { context._handleEmit(); } }); + F2.Events.on('PreloadAppCommuncation', function () { + if (!context.doNotCallAgain) { + context._handleEmit(); + } + }); F2.PreloadAppInitialized = true; }; @@ -26,4 +29,4 @@ require(['../dist/f2.js'], function () { return App_Class; })(); -}); \ No newline at end of file +}); diff --git a/tests/apps/com_openf2_tests_preloaded/preloadedTest.js b/tests/apps/com_openf2_tests_preloaded/preloadedTest.js index f58fe064..bad7be6b 100644 --- a/tests/apps/com_openf2_tests_preloaded/preloadedTest.js +++ b/tests/apps/com_openf2_tests_preloaded/preloadedTest.js @@ -3,9 +3,8 @@ * way to replace the preloaded app after F2 has been refreshed. */ window.F2_PRELOADED = window.F2_PRELOADED || []; -window.F2_PRELOADED.push(function() { - F2.Apps[TEST_PRELOADED_APP_ID] = (function() { - +window.F2_PRELOADED.push(function () { + F2.Apps[TEST_PRELOADED_APP_ID] = (function () { var App_Class = function (appConfig, appContent, root) { this.appConfig = appConfig; this.appContent = appContent; @@ -16,7 +15,7 @@ window.F2_PRELOADED.push(function() { App_Class.prototype.init = function () { var appConfig = this.appConfig; - F2.Events.on('PreloadAppTestOne', function(testValue){ + F2.Events.on('PreloadAppTestOne', function (testValue) { F2.Events.emit('PreloadAppResponseOne', testValue); }); @@ -25,4 +24,4 @@ window.F2_PRELOADED.push(function() { return App_Class; })(); -}); \ No newline at end of file +}); diff --git a/tests/apps/com_openf2_tests_preloaded_argtester/appclass.js b/tests/apps/com_openf2_tests_preloaded_argtester/appclass.js index 5a54b3fa..51838479 100644 --- a/tests/apps/com_openf2_tests_preloaded_argtester/appclass.js +++ b/tests/apps/com_openf2_tests_preloaded_argtester/appclass.js @@ -1,7 +1,6 @@ window.F2_PRELOADED = window.F2_PRELOADED || []; -window.F2_PRELOADED.push(function() { - F2.Apps["com_openf2_tests_preloaded_argtester"] = (function() { - +window.F2_PRELOADED.push(function () { + F2.Apps['com_openf2_tests_preloaded_argtester'] = (function () { var App_Class = function (appConfig, appContent, root) { this.argumentCount = arguments.length; this.appConfig = appConfig; @@ -13,10 +12,8 @@ window.F2_PRELOADED.push(function() { F2.Events.emit('PreloadAppArgumentCount', this.argumentCount); }; - App_Class.prototype.destroy = function () { - - }; + App_Class.prototype.destroy = function () {}; return App_Class; })(); -}); \ No newline at end of file +}); diff --git a/tests/context.html b/tests/context.html index ff542eb1..c2481960 100644 --- a/tests/context.html +++ b/tests/context.html @@ -6,52 +6,87 @@ Reloaded before every execution run. --> - - - - - - - - - - + + + + + + + + +
    + The Node.js Test Server is not running. Some tests will not be run. +
    + - - - - + + + + - + - - - + + + - - - + - - %SCRIPTS% - + %SCRIPTS% + - - - - \ No newline at end of file + + + + diff --git a/tests/css/page.css b/tests/css/page.css index 77dd1959..c67128c9 100644 --- a/tests/css/page.css +++ b/tests/css/page.css @@ -1,3 +1,3 @@ .f2-app-container { display: none; -} \ No newline at end of file +} diff --git a/tests/debug.html b/tests/debug.html index a0b15381..e906a752 100644 --- a/tests/debug.html +++ b/tests/debug.html @@ -1,60 +1,94 @@ - + - -%X_UA_COMPATIBLE% - Karma DEBUG RUNNER - - - - - - - - - + + %X_UA_COMPATIBLE% + Karma DEBUG RUNNER + + + + + + + +
    + The Node.js Test Server is not running. Some tests will not be run. +
    + - - - - + + + + - + - - - + + + - - - - - + + - - %SCRIPTS% - + %SCRIPTS% + - - - - \ No newline at end of file + + + + diff --git a/tests/index-amd.html b/tests/index-amd.html index 11f2df63..53716cb5 100644 --- a/tests/index-amd.html +++ b/tests/index-amd.html @@ -1,54 +1,115 @@ - - F2 (AMD) - Jasmine Unit Tests - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + F2 (AMD) - Jasmine Unit Tests + + + + + +
    + The Node.js Test Server is not running. Some tests will not be run. +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/js/require.min.js b/tests/js/require.min.js index 55bd5e95..7a9bd265 100644 --- a/tests/js/require.min.js +++ b/tests/js/require.min.js @@ -3,34 +3,1018 @@ Available via the MIT or new BSD license. see: http://github.com/jrburke/requirejs for details */ -var requirejs,require,define; -(function(ba){function G(b){return"[object Function]"===K.call(b)}function H(b){return"[object Array]"===K.call(b)}function v(b,c){if(b){var d;for(d=0;dthis.depCount&&!this.defined){if(G(l)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{f=i.execCb(c,l,b,f)}catch(d){a=d}else f=i.execCb(c,l,b,f);this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:this.usingExports&& -(f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,g.onResourceLoad))g.onResourceLoad(i,this.map,this.depMaps);y(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a= -this.map,b=a.id,d=p(a.prefix);this.depMaps.push(d);q(d,"defined",u(this,function(f){var l,d;d=m(aa,this.map.id);var e=this.map.name,P=this.map.parentMap?this.map.parentMap.name:null,n=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(e=f.normalize(e,function(a){return c(a,P,!0)})||""),f=p(a.prefix+"!"+e,this.map.parentMap),q(f,"defined",u(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=m(h,f.id)){this.depMaps.push(f); -if(this.events.error)d.on("error",u(this,function(a){this.emit("error",a)}));d.enable()}}else d?(this.map.url=i.nameToUrl(d),this.load()):(l=u(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=u(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(h,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),l.fromText=u(this,function(f,c){var d=a.name,e=p(d),P=M;c&&(f=c);P&&(M=!1);s(e);t(j.config,b)&&(j.config[d]=j.config[b]);try{g.exec(f)}catch(h){return w(C("fromtexteval", -"fromText eval for "+b+" failed: "+h,h,[b]))}P&&(M=!0);this.depMaps.push(e);i.completeLoad(d);n([d],l)}),f.load(a.name,n,l,j))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){V[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,u(this,function(a,b){var c,f;if("string"===typeof a){a=p(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=m(L,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;q(a,"defined",u(this,function(a){this.defineDep(b, -a);this.check()}));this.errback?q(a,"error",u(this,this.errback)):this.events.error&&q(a,"error",u(this,function(a){this.emit("error",a)}))}c=a.id;f=h[c];!t(L,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,u(this,function(a){var b=m(h,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:j,contextName:b, -registry:h,defined:r,urlFetched:S,defQueue:A,Module:Z,makeModuleMap:p,nextTick:g.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=j.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(j[b]||(j[b]={}),U(j[b],a,!0,!0)):j[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(aa[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a); -b[c]=a}),j.shim=b);a.packages&&v(a.packages,function(a){var b,a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(j.paths[b]=a.location);j.pkgs[b]=a.name+"/"+(a.main||"main").replace(ia,"").replace(Q,"")});B(h,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=p(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ba,arguments));return b||a.exports&&da(a.exports)}},makeRequire:function(a,e){function j(c,d,m){var n, -q;e.enableBuildCallback&&(d&&G(d))&&(d.__requireJsBuild=!0);if("string"===typeof c){if(G(d))return w(C("requireargs","Invalid require call"),m);if(a&&t(L,c))return L[c](h[a.id]);if(g.get)return g.get(i,c,a,j);n=p(c,a,!1,!0);n=n.id;return!t(r,n)?w(C("notloaded",'Module name "'+n+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):r[n]}J();i.nextTick(function(){J();q=s(p(null,a));q.skipMap=e.skipMap;q.init(c,d,m,{enabled:!0});D()});return j}e=e||{};U(j,{isBrowser:z,toUrl:function(b){var d, -e=b.lastIndexOf("."),k=b.split("/")[0];if(-1!==e&&(!("."===k||".."===k)||1e.attachEvent.toString().indexOf("[native code"))&& -!Y?(M=!0,e.attachEvent("onreadystatechange",b.onScriptLoad)):(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)),e.src=d,J=e,D?y.insertBefore(e,D):y.appendChild(e),J=null,e;if(ea)try{importScripts(d),b.completeLoad(c)}catch(m){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,m,[c]))}};z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(I=b.getAttribute("data-main"))return s=I,q.baseUrl||(E=s.split("/"), -s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl=O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var e,g;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(ka,"").replace(la,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(M){if(!(e=J))N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(b){if("interactive"=== -b.readyState)return N=b}),e=N;e&&(b||(b=e.getAttribute("data-requiremodule")),g=F[e.getAttribute("data-requirecontext")])}(g?g.defQueue:R).push([b,c,d])};define.amd={jQuery:!0};g.exec=function(b){return eval(b)};g(q)}})(this); \ No newline at end of file +var requirejs, require, define; +(function (ba) { + function G(b) { + return '[object Function]' === K.call(b); + } + function H(b) { + return '[object Array]' === K.call(b); + } + function v(b, c) { + if (b) { + var d; + for (d = 0; d < b.length && (!b[d] || !c(b[d], d, b)); d += 1); + } + } + function T(b, c) { + if (b) { + var d; + for (d = b.length - 1; -1 < d && (!b[d] || !c(b[d], d, b)); d -= 1); + } + } + function t(b, c) { + return fa.call(b, c); + } + function m(b, c) { + return t(b, c) && b[c]; + } + function B(b, c) { + for (var d in b) if (t(b, d) && c(b[d], d)) break; + } + function U(b, c, d, e) { + c && + B(c, function (c, g) { + if (d || !t(b, g)) + e && + 'object' === typeof c && + c && + !H(c) && + !G(c) && + !(c instanceof RegExp) + ? (b[g] || (b[g] = {}), U(b[g], c, d, e)) + : (b[g] = c); + }); + return b; + } + function u(b, c) { + return function () { + return c.apply(b, arguments); + }; + } + function ca(b) { + throw b; + } + function da(b) { + if (!b) return b; + var c = ba; + v(b.split('.'), function (b) { + c = c[b]; + }); + return c; + } + function C(b, c, d, e) { + c = Error(c + '\nhttp://requirejs.org/docs/errors.html#' + b); + c.requireType = b; + c.requireModules = e; + d && (c.originalError = d); + return c; + } + function ga(b) { + function c(a, k, b) { + var f, + l, + c, + d, + e, + g, + i, + p, + k = k && k.split('/'), + h = j.map, + n = h && h['*']; + if (a) { + a = a.split('/'); + l = a.length - 1; + j.nodeIdCompat && Q.test(a[l]) && (a[l] = a[l].replace(Q, '')); + '.' === a[0].charAt(0) && + k && + ((l = k.slice(0, k.length - 1)), (a = l.concat(a))); + l = a; + for (c = 0; c < l.length; c++) + if (((d = l[c]), '.' === d)) l.splice(c, 1), (c -= 1); + else if ( + '..' === d && + !(0 === c || (1 === c && '..' === l[2]) || '..' === l[c - 1]) && + 0 < c + ) + l.splice(c - 1, 2), (c -= 2); + a = a.join('/'); + } + if (b && h && (k || n)) { + l = a.split('/'); + c = l.length; + a: for (; 0 < c; c -= 1) { + e = l.slice(0, c).join('/'); + if (k) + for (d = k.length; 0 < d; d -= 1) + if ((b = m(h, k.slice(0, d).join('/')))) + if ((b = m(b, e))) { + f = b; + g = c; + break a; + } + !i && n && m(n, e) && ((i = m(n, e)), (p = c)); + } + !f && i && ((f = i), (g = p)); + f && (l.splice(0, g, f), (a = l.join('/'))); + } + return (f = m(j.pkgs, a)) ? f : a; + } + function d(a) { + z && + v(document.getElementsByTagName('script'), function (k) { + if ( + k.getAttribute('data-requiremodule') === a && + k.getAttribute('data-requirecontext') === i.contextName + ) + return k.parentNode.removeChild(k), !0; + }); + } + function e(a) { + var k = m(j.paths, a); + if (k && H(k) && 1 < k.length) + return ( + k.shift(), + i.require.undef(a), + i.makeRequire(null, { skipMap: !0 })([a]), + !0 + ); + } + function n(a) { + var k, + c = a ? a.indexOf('!') : -1; + -1 < c && ((k = a.substring(0, c)), (a = a.substring(c + 1, a.length))); + return [k, a]; + } + function p(a, k, b, f) { + var l, + d, + e = null, + g = k ? k.name : null, + j = a, + p = !0, + h = ''; + a || ((p = !1), (a = '_@r' + (K += 1))); + a = n(a); + e = a[0]; + a = a[1]; + e && ((e = c(e, g, f)), (d = m(r, e))); + a && + (e + ? (h = + d && d.normalize + ? d.normalize(a, function (a) { + return c(a, g, f); + }) + : -1 === a.indexOf('!') + ? c(a, g, f) + : a) + : ((h = c(a, g, f)), + (a = n(h)), + (e = a[0]), + (h = a[1]), + (b = !0), + (l = i.nameToUrl(h)))); + b = e && !d && !b ? '_unnormalized' + (O += 1) : ''; + return { + prefix: e, + name: h, + parentMap: k, + unnormalized: !!b, + url: l, + originalName: j, + isDefine: p, + id: (e ? e + '!' + h : h) + b + }; + } + function s(a) { + var k = a.id, + b = m(h, k); + b || (b = h[k] = new i.Module(a)); + return b; + } + function q(a, k, b) { + var f = a.id, + c = m(h, f); + if (t(r, f) && (!c || c.defineEmitComplete)) 'defined' === k && b(r[f]); + else if (((c = s(a)), c.error && 'error' === k)) b(c.error); + else c.on(k, b); + } + function w(a, b) { + var c = a.requireModules, + f = !1; + if (b) b(a); + else if ( + (v(c, function (b) { + if ((b = m(h, b))) + (b.error = a), b.events.error && ((f = !0), b.emit('error', a)); + }), + !f) + ) + g.onError(a); + } + function x() { + R.length && (ha.apply(A, [A.length, 0].concat(R)), (R = [])); + } + function y(a) { + delete h[a]; + delete V[a]; + } + function F(a, b, c) { + var f = a.map.id; + a.error + ? a.emit('error', a.error) + : ((b[f] = !0), + v(a.depMaps, function (f, d) { + var e = f.id, + g = m(h, e); + g && + !a.depMatched[d] && + !c[e] && + (m(b, e) ? (a.defineDep(d, r[e]), a.check()) : F(g, b, c)); + }), + (c[f] = !0)); + } + function D() { + var a, + b, + c = (a = 1e3 * j.waitSeconds) && i.startTime + a < new Date().getTime(), + f = [], + l = [], + g = !1, + h = !0; + if (!W) { + W = !0; + B(V, function (a) { + var i = a.map, + j = i.id; + if (a.enabled && (i.isDefine || l.push(a), !a.error)) + if (!a.inited && c) e(j) ? (g = b = !0) : (f.push(j), d(j)); + else if ( + !a.inited && + a.fetched && + i.isDefine && + ((g = !0), !i.prefix) + ) + return (h = !1); + }); + if (c && f.length) + return ( + (a = C('timeout', 'Load timeout for modules: ' + f, null, f)), + (a.contextName = i.contextName), + w(a) + ); + h && + v(l, function (a) { + F(a, {}, {}); + }); + if ((!c || b) && g) + if ((z || ea) && !X) + X = setTimeout(function () { + X = 0; + D(); + }, 50); + W = !1; + } + } + function E(a) { + t(r, a[0]) || s(p(a[0], null, !0)).init(a[1], a[2]); + } + function I(a) { + var a = a.currentTarget || a.srcElement, + b = i.onScriptLoad; + a.detachEvent && !Y + ? a.detachEvent('onreadystatechange', b) + : a.removeEventListener('load', b, !1); + b = i.onScriptError; + (!a.detachEvent || Y) && a.removeEventListener('error', b, !1); + return { node: a, id: a && a.getAttribute('data-requiremodule') }; + } + function J() { + var a; + for (x(); A.length; ) { + a = A.shift(); + if (null === a[0]) + return w( + C( + 'mismatch', + 'Mismatched anonymous define() module: ' + a[a.length - 1] + ) + ); + E(a); + } + } + var W, + Z, + i, + L, + X, + j = { + waitSeconds: 7, + baseUrl: './', + paths: {}, + bundles: {}, + pkgs: {}, + shim: {}, + config: {} + }, + h = {}, + V = {}, + $ = {}, + A = [], + r = {}, + S = {}, + aa = {}, + K = 1, + O = 1; + L = { + require: function (a) { + return a.require ? a.require : (a.require = i.makeRequire(a.map)); + }, + exports: function (a) { + a.usingExports = !0; + if (a.map.isDefine) + return a.exports + ? (r[a.map.id] = a.exports) + : (a.exports = r[a.map.id] = {}); + }, + module: function (a) { + return a.module + ? a.module + : (a.module = { + id: a.map.id, + uri: a.map.url, + config: function () { + return m(j.config, a.map.id) || {}; + }, + exports: a.exports || (a.exports = {}) + }); + } + }; + Z = function (a) { + this.events = m($, a.id) || {}; + this.map = a; + this.shim = m(j.shim, a.id); + this.depExports = []; + this.depMaps = []; + this.depMatched = []; + this.pluginMaps = {}; + this.depCount = 0; + }; + Z.prototype = { + init: function (a, b, c, f) { + f = f || {}; + if (!this.inited) { + this.factory = b; + if (c) this.on('error', c); + else + this.events.error && + (c = u(this, function (a) { + this.emit('error', a); + })); + this.depMaps = a && a.slice(0); + this.errback = c; + this.inited = !0; + this.ignore = f.ignore; + f.enabled || this.enabled ? this.enable() : this.check(); + } + }, + defineDep: function (a, b) { + this.depMatched[a] || + ((this.depMatched[a] = !0), + (this.depCount -= 1), + (this.depExports[a] = b)); + }, + fetch: function () { + if (!this.fetched) { + this.fetched = !0; + i.startTime = new Date().getTime(); + var a = this.map; + if (this.shim) + i.makeRequire(this.map, { enableBuildCallback: !0 })( + this.shim.deps || [], + u(this, function () { + return a.prefix ? this.callPlugin() : this.load(); + }) + ); + else return a.prefix ? this.callPlugin() : this.load(); + } + }, + load: function () { + var a = this.map.url; + S[a] || ((S[a] = !0), i.load(this.map.id, a)); + }, + check: function () { + if (this.enabled && !this.enabling) { + var a, + b, + c = this.map.id; + b = this.depExports; + var f = this.exports, + l = this.factory; + if (this.inited) + if (this.error) this.emit('error', this.error); + else { + if (!this.defining) { + this.defining = !0; + if (1 > this.depCount && !this.defined) { + if (G(l)) { + if ( + (this.events.error && this.map.isDefine) || + g.onError !== ca + ) + try { + f = i.execCb(c, l, b, f); + } catch (d) { + a = d; + } + else f = i.execCb(c, l, b, f); + this.map.isDefine && + void 0 === f && + ((b = this.module) + ? (f = b.exports) + : this.usingExports && (f = this.exports)); + if (a) + return ( + (a.requireMap = this.map), + (a.requireModules = this.map.isDefine + ? [this.map.id] + : null), + (a.requireType = this.map.isDefine + ? 'define' + : 'require'), + w((this.error = a)) + ); + } else f = l; + this.exports = f; + if ( + this.map.isDefine && + !this.ignore && + ((r[c] = f), g.onResourceLoad) + ) + g.onResourceLoad(i, this.map, this.depMaps); + y(c); + this.defined = !0; + } + this.defining = !1; + this.defined && + !this.defineEmitted && + ((this.defineEmitted = !0), + this.emit('defined', this.exports), + (this.defineEmitComplete = !0)); + } + } + else this.fetch(); + } + }, + callPlugin: function () { + var a = this.map, + b = a.id, + d = p(a.prefix); + this.depMaps.push(d); + q( + d, + 'defined', + u(this, function (f) { + var l, d; + d = m(aa, this.map.id); + var e = this.map.name, + P = this.map.parentMap ? this.map.parentMap.name : null, + n = i.makeRequire(a.parentMap, { enableBuildCallback: !0 }); + if (this.map.unnormalized) { + if ( + (f.normalize && + (e = + f.normalize(e, function (a) { + return c(a, P, !0); + }) || ''), + (f = p(a.prefix + '!' + e, this.map.parentMap)), + q( + f, + 'defined', + u(this, function (a) { + this.init( + [], + function () { + return a; + }, + null, + { enabled: !0, ignore: !0 } + ); + }) + ), + (d = m(h, f.id))) + ) { + this.depMaps.push(f); + if (this.events.error) + d.on( + 'error', + u(this, function (a) { + this.emit('error', a); + }) + ); + d.enable(); + } + } else + d + ? ((this.map.url = i.nameToUrl(d)), this.load()) + : ((l = u(this, function (a) { + this.init( + [], + function () { + return a; + }, + null, + { enabled: !0 } + ); + })), + (l.error = u(this, function (a) { + this.inited = !0; + this.error = a; + a.requireModules = [b]; + B(h, function (a) { + 0 === a.map.id.indexOf(b + '_unnormalized') && + y(a.map.id); + }); + w(a); + })), + (l.fromText = u(this, function (f, c) { + var d = a.name, + e = p(d), + P = M; + c && (f = c); + P && (M = !1); + s(e); + t(j.config, b) && (j.config[d] = j.config[b]); + try { + g.exec(f); + } catch (h) { + return w( + C( + 'fromtexteval', + 'fromText eval for ' + b + ' failed: ' + h, + h, + [b] + ) + ); + } + P && (M = !0); + this.depMaps.push(e); + i.completeLoad(d); + n([d], l); + })), + f.load(a.name, n, l, j)); + }) + ); + i.enable(d, this); + this.pluginMaps[d.id] = d; + }, + enable: function () { + V[this.map.id] = this; + this.enabling = this.enabled = !0; + v( + this.depMaps, + u(this, function (a, b) { + var c, f; + if ('string' === typeof a) { + a = p( + a, + this.map.isDefine ? this.map : this.map.parentMap, + !1, + !this.skipMap + ); + this.depMaps[b] = a; + if ((c = m(L, a.id))) { + this.depExports[b] = c(this); + return; + } + this.depCount += 1; + q( + a, + 'defined', + u(this, function (a) { + this.defineDep(b, a); + this.check(); + }) + ); + this.errback + ? q(a, 'error', u(this, this.errback)) + : this.events.error && + q( + a, + 'error', + u(this, function (a) { + this.emit('error', a); + }) + ); + } + c = a.id; + f = h[c]; + !t(L, c) && f && !f.enabled && i.enable(a, this); + }) + ); + B( + this.pluginMaps, + u(this, function (a) { + var b = m(h, a.id); + b && !b.enabled && i.enable(a, this); + }) + ); + this.enabling = !1; + this.check(); + }, + on: function (a, b) { + var c = this.events[a]; + c || (c = this.events[a] = []); + c.push(b); + }, + emit: function (a, b) { + v(this.events[a], function (a) { + a(b); + }); + 'error' === a && delete this.events[a]; + } + }; + i = { + config: j, + contextName: b, + registry: h, + defined: r, + urlFetched: S, + defQueue: A, + Module: Z, + makeModuleMap: p, + nextTick: g.nextTick, + onError: w, + configure: function (a) { + a.baseUrl && + '/' !== a.baseUrl.charAt(a.baseUrl.length - 1) && + (a.baseUrl += '/'); + var b = j.shim, + c = { paths: !0, bundles: !0, config: !0, map: !0 }; + B(a, function (a, b) { + c[b] ? (j[b] || (j[b] = {}), U(j[b], a, !0, !0)) : (j[b] = a); + }); + a.bundles && + B(a.bundles, function (a, b) { + v(a, function (a) { + a !== b && (aa[a] = b); + }); + }); + a.shim && + (B(a.shim, function (a, c) { + H(a) && (a = { deps: a }); + if ((a.exports || a.init) && !a.exportsFn) + a.exportsFn = i.makeShimExports(a); + b[c] = a; + }), + (j.shim = b)); + a.packages && + v(a.packages, function (a) { + var b, + a = 'string' === typeof a ? { name: a } : a; + b = a.name; + a.location && (j.paths[b] = a.location); + j.pkgs[b] = + a.name + '/' + (a.main || 'main').replace(ia, '').replace(Q, ''); + }); + B(h, function (a, b) { + !a.inited && !a.map.unnormalized && (a.map = p(b)); + }); + if (a.deps || a.callback) i.require(a.deps || [], a.callback); + }, + makeShimExports: function (a) { + return function () { + var b; + a.init && (b = a.init.apply(ba, arguments)); + return b || (a.exports && da(a.exports)); + }; + }, + makeRequire: function (a, e) { + function j(c, d, m) { + var n, q; + e.enableBuildCallback && d && G(d) && (d.__requireJsBuild = !0); + if ('string' === typeof c) { + if (G(d)) return w(C('requireargs', 'Invalid require call'), m); + if (a && t(L, c)) return L[c](h[a.id]); + if (g.get) return g.get(i, c, a, j); + n = p(c, a, !1, !0); + n = n.id; + return !t(r, n) + ? w( + C( + 'notloaded', + 'Module name "' + + n + + '" has not been loaded yet for context: ' + + b + + (a ? '' : '. Use require([])') + ) + ) + : r[n]; + } + J(); + i.nextTick(function () { + J(); + q = s(p(null, a)); + q.skipMap = e.skipMap; + q.init(c, d, m, { enabled: !0 }); + D(); + }); + return j; + } + e = e || {}; + U(j, { + isBrowser: z, + toUrl: function (b) { + var d, + e = b.lastIndexOf('.'), + k = b.split('/')[0]; + if (-1 !== e && (!('.' === k || '..' === k) || 1 < e)) + (d = b.substring(e, b.length)), (b = b.substring(0, e)); + return i.nameToUrl(c(b, a && a.id, !0), d, !0); + }, + defined: function (b) { + return t(r, p(b, a, !1, !0).id); + }, + specified: function (b) { + b = p(b, a, !1, !0).id; + return t(r, b) || t(h, b); + } + }); + a || + (j.undef = function (b) { + x(); + var c = p(b, a, !0), + e = m(h, b); + d(b); + delete r[b]; + delete S[c.url]; + delete $[b]; + T(A, function (a, c) { + a[0] === b && A.splice(c, 1); + }); + e && (e.events.defined && ($[b] = e.events), y(b)); + }); + return j; + }, + enable: function (a) { + m(h, a.id) && s(a).enable(); + }, + completeLoad: function (a) { + var b, + c, + d = m(j.shim, a) || {}, + g = d.exports; + for (x(); A.length; ) { + c = A.shift(); + if (null === c[0]) { + c[0] = a; + if (b) break; + b = !0; + } else c[0] === a && (b = !0); + E(c); + } + c = m(h, a); + if (!b && !t(r, a) && c && !c.inited) { + if (j.enforceDefine && (!g || !da(g))) + return e(a) + ? void 0 + : w(C('nodefine', 'No define call for ' + a, null, [a])); + E([a, d.deps || [], d.exportsFn]); + } + D(); + }, + nameToUrl: function (a, b, c) { + var d, e, h; + (d = m(j.pkgs, a)) && (a = d); + if ((d = m(aa, a))) return i.nameToUrl(d, b, c); + if (g.jsExtRegExp.test(a)) d = a + (b || ''); + else { + d = j.paths; + a = a.split('/'); + for (e = a.length; 0 < e; e -= 1) + if (((h = a.slice(0, e).join('/')), (h = m(d, h)))) { + H(h) && (h = h[0]); + a.splice(0, e, h); + break; + } + d = a.join('/'); + d += b || (/^data\:|\?/.test(d) || c ? '' : '.js'); + d = + ('/' === d.charAt(0) || d.match(/^[\w\+\.\-]+:/) ? '' : j.baseUrl) + + d; + } + return j.urlArgs + ? d + ((-1 === d.indexOf('?') ? '?' : '&') + j.urlArgs) + : d; + }, + load: function (a, b) { + g.load(i, a, b); + }, + execCb: function (a, b, c, d) { + return b.apply(d, c); + }, + onScriptLoad: function (a) { + if ( + 'load' === a.type || + ja.test((a.currentTarget || a.srcElement).readyState) + ) + (N = null), (a = I(a)), i.completeLoad(a.id); + }, + onScriptError: function (a) { + var b = I(a); + if (!e(b.id)) + return w(C('scripterror', 'Script error for: ' + b.id, a, [b.id])); + } + }; + i.require = i.makeRequire(); + return i; + } + var g, + x, + y, + D, + I, + E, + N, + J, + s, + O, + ka = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm, + la = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, + Q = /\.js$/, + ia = /^\.\//; + x = Object.prototype; + var K = x.toString, + fa = x.hasOwnProperty, + ha = Array.prototype.splice, + z = !!( + 'undefined' !== typeof window && + 'undefined' !== typeof navigator && + window.document + ), + ea = !z && 'undefined' !== typeof importScripts, + ja = + z && 'PLAYSTATION 3' === navigator.platform + ? /^complete$/ + : /^(complete|loaded)$/, + Y = 'undefined' !== typeof opera && '[object Opera]' === opera.toString(), + F = {}, + q = {}, + R = [], + M = !1; + if ('undefined' === typeof define) { + if ('undefined' !== typeof requirejs) { + if (G(requirejs)) return; + q = requirejs; + requirejs = void 0; + } + 'undefined' !== typeof require && + !G(require) && + ((q = require), (require = void 0)); + g = requirejs = function (b, c, d, e) { + var n, + p = '_'; + !H(b) && + 'string' !== typeof b && + ((n = b), H(c) ? ((b = c), (c = d), (d = e)) : (b = [])); + n && n.context && (p = n.context); + (e = m(F, p)) || (e = F[p] = g.s.newContext(p)); + n && e.configure(n); + return e.require(b, c, d); + }; + g.config = function (b) { + return g(b); + }; + g.nextTick = + 'undefined' !== typeof setTimeout + ? function (b) { + setTimeout(b, 4); + } + : function (b) { + b(); + }; + require || (require = g); + g.version = '2.1.17'; + g.jsExtRegExp = /^\/|:|\?|\.js$/; + g.isBrowser = z; + x = g.s = { contexts: F, newContext: ga }; + g({}); + v(['toUrl', 'undef', 'defined', 'specified'], function (b) { + g[b] = function () { + var c = F._; + return c.require[b].apply(c, arguments); + }; + }); + if ( + z && + ((y = x.head = document.getElementsByTagName('head')[0]), + (D = document.getElementsByTagName('base')[0])) + ) + y = x.head = D.parentNode; + g.onError = ca; + g.createNode = function (b) { + var c = b.xhtml + ? document.createElementNS( + 'http://www.w3.org/1999/xhtml', + 'html:script' + ) + : document.createElement('script'); + c.type = b.scriptType || 'text/javascript'; + c.charset = 'utf-8'; + c.async = !0; + return c; + }; + g.load = function (b, c, d) { + var e = (b && b.config) || {}; + if (z) + return ( + (e = g.createNode(e, c, d)), + e.setAttribute('data-requirecontext', b.contextName), + e.setAttribute('data-requiremodule', c), + e.attachEvent && + !( + e.attachEvent.toString && + 0 > e.attachEvent.toString().indexOf('[native code') + ) && + !Y + ? ((M = !0), e.attachEvent('onreadystatechange', b.onScriptLoad)) + : (e.addEventListener('load', b.onScriptLoad, !1), + e.addEventListener('error', b.onScriptError, !1)), + (e.src = d), + (J = e), + D ? y.insertBefore(e, D) : y.appendChild(e), + (J = null), + e + ); + if (ea) + try { + importScripts(d), b.completeLoad(c); + } catch (m) { + b.onError( + C( + 'importscripts', + 'importScripts failed for ' + c + ' at ' + d, + m, + [c] + ) + ); + } + }; + z && + !q.skipDataMain && + T(document.getElementsByTagName('script'), function (b) { + y || (y = b.parentNode); + if ((I = b.getAttribute('data-main'))) + return ( + (s = I), + q.baseUrl || + ((E = s.split('/')), + (s = E.pop()), + (O = E.length ? E.join('/') + '/' : './'), + (q.baseUrl = O)), + (s = s.replace(Q, '')), + g.jsExtRegExp.test(s) && (s = I), + (q.deps = q.deps ? q.deps.concat(s) : [s]), + !0 + ); + }); + define = function (b, c, d) { + var e, g; + 'string' !== typeof b && ((d = c), (c = b), (b = null)); + H(c) || ((d = c), (c = null)); + !c && + G(d) && + ((c = []), + d.length && + (d + .toString() + .replace(ka, '') + .replace(la, function (b, d) { + c.push(d); + }), + (c = ( + 1 === d.length ? ['require'] : ['require', 'exports', 'module'] + ).concat(c)))); + if (M) { + if (!(e = J)) + (N && 'interactive' === N.readyState) || + T(document.getElementsByTagName('script'), function (b) { + if ('interactive' === b.readyState) return (N = b); + }), + (e = N); + e && + (b || (b = e.getAttribute('data-requiremodule')), + (g = F[e.getAttribute('data-requirecontext')])); + } + (g ? g.defQueue : R).push([b, c, d]); + }; + define.amd = { jQuery: !0 }; + g.exec = function (b) { + return eval(b); + }; + g(q); + } +})(this); diff --git a/tests/server.js b/tests/server.js index cefbbaea..b93b52e0 100644 --- a/tests/server.js +++ b/tests/server.js @@ -1,15 +1,15 @@ const express = require('express'); const app = express(); -const port = process.env.PORT || 3000 +const port = process.env.PORT || 3000; app.use(express.static('./')); app.set('json spaces', 2); //wrap up AppManifest response -const getResponse = function(req,id,manifest){ +const getResponse = function (req, id, manifest) { const body = JSON.stringify(manifest); - if (req.method == 'POST'){ + if (req.method == 'POST') { return body; } else { return 'F2_jsonpCallback_' + id + '(' + body + ');'; @@ -21,84 +21,100 @@ const getResponse = function(req,id,manifest){ * will output an AppManifest with an AppClass that will log some data. * See container-spec.js and search for httpPostTest */ -app.use('/F2/apps/test/http-post', function(req, res) { +app.use('/F2/apps/test/http-post', function (req, res) { res.setHeader('Content-Type', 'text/javascript'); - res.send(getResponse(req,'com_test_app',{ - inlineScripts: [ - [ - 'F2.Apps["com_test_app"] = function(appConfig, appContent, root) {', + res.send( + getResponse(req, 'com_test_app', { + inlineScripts: [ + [ + 'F2.Apps["com_test_app"] = function(appConfig, appContent, root) {', 'F2.log(appContent.data.method == "POST");', - '};' - ].join('') - ], - apps: [ - { - data: { - method: req.method - }, - html: '
    ' - } - ] - })); + '};' + ].join('') + ], + apps: [ + { + data: { + method: req.method + }, + html: '
    ' + } + ] + }) + ); }); -app.all('/F2/apps/test/hello-world', function(req,res){ +app.all('/F2/apps/test/hello-world', function (req, res) { var manifest = { inlineScripts: [], scripts: [], styles: [], - apps: [{ - html: '
    Hello world!
    ', - status: 'success' - }] + apps: [ + { + html: '
    Hello world!
    ', + status: 'success' + } + ] }; res.setHeader('Content-Type', 'text/javascript'); - res.send(getResponse(req,'com_openf2_examples_javascript_helloworld',manifest)); + res.send( + getResponse(req, 'com_openf2_examples_javascript_helloworld', manifest) + ); }); -app.all('/F2/apps/test/market-news', function(req,res){ +app.all('/F2/apps/test/market-news', function (req, res) { var manifest = { inlineScripts: [], scripts: [], styles: [], - apps: [{ - html: '
    Hello market news!
    ', - status: 'success' - }] + apps: [ + { + html: '
    Hello market news!
    ', + status: 'success' + } + ] }; res.setHeader('Content-Type', 'text/javascript'); - res.send(getResponse(req,'com_openf2_examples_csharp_marketnews',manifest)); + res.send(getResponse(req, 'com_openf2_examples_csharp_marketnews', manifest)); }); -app.all('/F2/apps/test/com_openf2_tests_helloworld', function(req,res){ +app.all('/F2/apps/test/com_openf2_tests_helloworld', function (req, res) { var manifest = { inlineScripts: [], scripts: [], styles: [], - apps: [{ - html: '
    Hello world test!
    ', - status: 'success' - }] + apps: [ + { + html: '
    Hello world test!
    ', + status: 'success' + } + ] }; res.setHeader('Content-Type', 'text/javascript'); - res.send(getResponse(req,'com_openf2_tests_helloworld',manifest)); + res.send(getResponse(req, 'com_openf2_tests_helloworld', manifest)); }); -app.all('/F2/apps/test/hello-world-node', function(req,res){ +app.all('/F2/apps/test/hello-world-node', function (req, res) { var baseUrl = `${req.protocol}://${req.get('host')}`; var manifest = { inlineScripts: [], - scripts: [`${baseUrl}/tests/apps/com_openf2_examples_nodejs_helloworld/appclass.js`], - styles: [`${baseUrl}/tests/apps/com_openf2_examples_nodejs_helloworld/app.css`], - apps: [{ - html: "

    Hello, World!

    This demonstrates a simple \"Hello World\" F2 App.

    Container Developers

    If you're a Container Provider and want to learn how to integrate F2 into your website, browse to the Container docs.

    App Developers

    If you're an App Provider and want to learn how to build F2 apps, browse to the App docs.


    Get your hands on an example F2 Container and Apps!

    ", - status: 'success' - }] + scripts: [ + `${baseUrl}/tests/apps/com_openf2_examples_nodejs_helloworld/appclass.js` + ], + styles: [ + `${baseUrl}/tests/apps/com_openf2_examples_nodejs_helloworld/app.css` + ], + apps: [ + { + html: '

    Hello, World!

    This demonstrates a simple "Hello World" F2 App.

    Container Developers

    If you\'re a Container Provider and want to learn how to integrate F2 into your website, browse to the Container docs.

    App Developers

    If you\'re an App Provider and want to learn how to build F2 apps, browse to the App docs.


    Get your hands on an example F2 Container and Apps!

    ', + status: 'success' + } + ] }; res.setHeader('Content-Type', 'text/javascript'); - res.send(getResponse(req,'com_openf2_examples_nodejs_helloworld',manifest)); + res.send(getResponse(req, 'com_openf2_examples_nodejs_helloworld', manifest)); }); app.listen(port, () => { - console.log(`test server listening on ${port}`) -}); \ No newline at end of file + console.log(`test server listening on ${port}`); +}); diff --git a/tests/spec/amd-spec.js b/tests/spec/amd-spec.js index ee4f483c..851491ae 100644 --- a/tests/spec/amd-spec.js +++ b/tests/spec/amd-spec.js @@ -1,6 +1,5 @@ -describe('AMD', function() { - - it('should define F2 both as an AMD module and global', function(done) { +describe('AMD', function () { + it('should define F2 both as an AMD module and global', function (done) { require(['../dist/f2.js'], function (nonGlobalF2) { expect(nonGlobalF2).toBeDefined(); expect(nonGlobalF2.registerApps).toBeDefined(); @@ -8,5 +7,4 @@ describe('AMD', function() { done(); }); }); - -}); \ No newline at end of file +}); diff --git a/tests/spec/app-handlers-spec.js b/tests/spec/app-handlers-spec.js index ecb11d6c..c89d51b7 100644 --- a/tests/spec/app-handlers-spec.js +++ b/tests/spec/app-handlers-spec.js @@ -1,5 +1,4 @@ describe('F2.AppHandlers', function () { - var containerAppHandlerToken = null; beforeEach(function () { @@ -25,18 +24,17 @@ describe('F2.AppHandlers', function () { html: '
    Testing
    ' } ] - } + }; }; - it('should not allow F2.AppHandlers.on() handler registration without valid token', function () { expect(function () { F2.init(); F2.AppHandlers.on( - "", + '', F2.Constants.AppHandlers.APP_RENDER_BEFORE, - function (appConfig) { } + function (appConfig) {} ); F2.registerApps(appConfig(), appManifest()); @@ -47,10 +45,7 @@ describe('F2.AppHandlers', function () { expect(function () { F2.init(); - F2.AppHandlers.off( - "", - F2.Constants.AppHandlers.APP_RENDER_BEFORE - ); + F2.AppHandlers.off('', F2.Constants.AppHandlers.APP_RENDER_BEFORE); F2.registerApps(appConfig(), appManifest()); }).toThrow(); @@ -95,15 +90,14 @@ describe('F2.AppHandlers', function () { // 2. appRenderBefore // 3. appRender // 4. appRenderAfter - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_CREATE_ROOT, - function (appConfig) { - appConfig.root = $("
    ").get(0); - arOrder.push(F2.Constants.AppHandlers.APP_CREATE_ROOT); - } - ) + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + function (appConfig) { + appConfig.root = $('
    ').get(0); + arOrder.push(F2.Constants.AppHandlers.APP_CREATE_ROOT); + } + ) .on( containerAppHandlerToken, F2.Constants.AppHandlers.APP_RENDER_BEFORE, @@ -115,7 +109,7 @@ describe('F2.AppHandlers', function () { containerAppHandlerToken, F2.Constants.AppHandlers.APP_RENDER, function (appConfig) { - $("body").append($(appConfig.root)); + $('body').append($(appConfig.root)); arOrder.push(F2.Constants.AppHandlers.APP_RENDER); } ) @@ -124,9 +118,11 @@ describe('F2.AppHandlers', function () { F2.Constants.AppHandlers.APP_RENDER_AFTER, function (appConfig) { arOrder.push(F2.Constants.AppHandlers.APP_RENDER_AFTER); - sOrder = arOrder.join(","); + sOrder = arOrder.join(','); - expect(sOrder).toBe("appCreateRoot,appRenderBefore,appRender,appRenderAfter"); + expect(sOrder).toBe( + 'appCreateRoot,appRenderBefore,appRender,appRenderAfter' + ); done(); } ); @@ -136,7 +132,6 @@ describe('F2.AppHandlers', function () { }); describe('F2.AppHandlers - rendering - appCreateRoot', function () { - var containerAppHandlerToken = null; beforeEach(function () { @@ -165,99 +160,95 @@ describe('F2.AppHandlers - rendering - appCreateRoot', function () { }; }; - it( - 'should create appRoot using the apps html if appCreateRoot event is not bound and render appRoot to the page automatically.', - function (done) { - F2.init(); + it('should create appRoot using the apps html if appCreateRoot event is not bound and render appRoot to the page automatically.', function (done) { + F2.init(); - F2.AppHandlers.on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); - expect($root.hasClass("test-app")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.text() == "Testing").toBe(true); - done(); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); + expect($root.hasClass('test-app')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.text() == 'Testing').toBe(true); + done(); + } + ); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.registerApps(appConfig(), appManifest()); + }); it('should pass appConfig as only argument to appCreateRoot.', function (done) { - F2.init(); + F2.init(); - F2.AppHandlers.on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_CREATE_ROOT, - function (appConfig) { - appConfig.root = $("

    ").get(0); - var bHasAppConfig = (arguments.length == 1 && appConfig && appConfig.appId && appConfig.manifestUrl) ? true : false; - expect(bHasAppConfig).toBe(true); - done(); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + function (appConfig) { + appConfig.root = $('

    ').get(0); + var bHasAppConfig = + arguments.length == 1 && + appConfig && + appConfig.appId && + appConfig.manifestUrl + ? true + : false; + expect(bHasAppConfig).toBe(true); + done(); + } + ); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.registerApps(appConfig(), appManifest()); + }); - it( - 'respects appCreateRoot setting appConfig.root and appends app html by default.', - function (done) { - F2.init(); + it('respects appCreateRoot setting appConfig.root and appends app html by default.', function (done) { + F2.init(); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_CREATE_ROOT, - function (appConfig) { - appConfig.root = $("

    ").get(0); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); - expect($root.is("h1")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); - done(); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + function (appConfig) { + appConfig.root = $('

    ').get(0); + } + ).on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); + expect($root.is('h1')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); + done(); + } + ); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.registerApps(appConfig(), appManifest()); + }); it('fires appCreateRoot functions sequentially.', function (done) { var arOrder = []; F2.init(); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_CREATE_ROOT, - function (appConfig) { - appConfig.root = $("").get(0); - arOrder.push("1"); - } - ) + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + function (appConfig) { + appConfig.root = $('').get(0); + arOrder.push('1'); + } + ) .on( containerAppHandlerToken, F2.Constants.AppHandlers.APP_CREATE_ROOT, function (appConfig) { - arOrder.push("2"); + arOrder.push('2'); } ) .on( containerAppHandlerToken, F2.Constants.AppHandlers.APP_CREATE_ROOT, function (appConfig) { - arOrder.push("3"); + arOrder.push('3'); } ) .on( @@ -265,46 +256,44 @@ describe('F2.AppHandlers - rendering - appCreateRoot', function () { F2.Constants.AppHandlers.APP_RENDER_AFTER, function (appConfig) { var $root = $(appConfig.root); - expect(arOrder.join(",")).toBe("1,2,3"); - expect($root.is("app")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); + expect(arOrder.join(',')).toBe('1,2,3'); + expect($root.is('app')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); done(); } ); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.registerApps(appConfig(), appManifest()); + }); it('allows manipulation of appConfig.root through out appCreateRoot methods.', function (done) { var arOrder = []; F2.init(); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_CREATE_ROOT, - function (appConfig) { - appConfig.root = $("").get(0); - arOrder.push("1"); - } - ) + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + function (appConfig) { + appConfig.root = $('').get(0); + arOrder.push('1'); + } + ) .on( containerAppHandlerToken, F2.Constants.AppHandlers.APP_CREATE_ROOT, function (appConfig) { - $(appConfig.root).addClass("blue"); - arOrder.push("2"); + $(appConfig.root).addClass('blue'); + arOrder.push('2'); } ) .on( containerAppHandlerToken, F2.Constants.AppHandlers.APP_CREATE_ROOT, function (appConfig) { - $(appConfig.root).addClass("red").attr("data-test", "test"); - arOrder.push("3"); + $(appConfig.root).addClass('red').attr('data-test', 'test'); + arOrder.push('3'); } ) .on( @@ -312,41 +301,39 @@ describe('F2.AppHandlers - rendering - appCreateRoot', function () { F2.Constants.AppHandlers.APP_RENDER_AFTER, function (appConfig) { var $root = $(appConfig.root); - expect($root.hasClass("blue")).toBe(true); - expect($root.hasClass("red")).toBe(true); - expect(!!$root.attr("data-test")).toBe(true); - expect(arOrder.join(",")).toBe("1,2,3"); - expect($root.is("app")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); + expect($root.hasClass('blue')).toBe(true); + expect($root.hasClass('red')).toBe(true); + expect(!!$root.attr('data-test')).toBe(true); + expect(arOrder.join(',')).toBe('1,2,3'); + expect($root.is('app')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); done(); } ); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.registerApps(appConfig(), appManifest()); + }); it('allows resetting of appConfig.root.', function (done) { var arOrder = []; F2.init(); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_CREATE_ROOT, - function (appConfig) { - appConfig.root = $("").get(0); - arOrder.push("1"); - } - ) + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + function (appConfig) { + appConfig.root = $('').get(0); + arOrder.push('1'); + } + ) .on( containerAppHandlerToken, F2.Constants.AppHandlers.APP_CREATE_ROOT, function (appConfig) { - appConfig.root = $("").get(0); - arOrder.push("2"); + appConfig.root = $('').get(0); + arOrder.push('2'); } ) .on( @@ -354,21 +341,19 @@ describe('F2.AppHandlers - rendering - appCreateRoot', function () { F2.Constants.AppHandlers.APP_RENDER_AFTER, function (appConfig) { var $root = $(appConfig.root); - expect(arOrder.join(",")).toBe("1,2"); - expect($root.is("specialapp")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); + expect(arOrder.join(',')).toBe('1,2'); + expect($root.is('specialapp')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); done(); } ); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.registerApps(appConfig(), appManifest()); + }); }); describe('F2.AppHandlers - rendering - appRenderBefore', function () { - var containerAppHandlerToken = null; beforeEach(function () { @@ -398,214 +383,199 @@ describe('F2.AppHandlers - rendering - appRenderBefore', function () { }; it('should pass appConfig as only argument to appRenderBefore.', function (done) { + F2.init(); - F2.init(); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_BEFORE, + function (appConfig) { + var bHasAppConfig = + arguments.length == 1 && + appConfig && + appConfig.appId && + appConfig.manifestUrl + ? true + : false; + expect(bHasAppConfig).toBe(true); + done(); + } + ); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_BEFORE, - function (appConfig) { - var bHasAppConfig = (arguments.length == 1 && appConfig && appConfig.appId && appConfig.manifestUrl) ? true : false; - expect(bHasAppConfig).toBe(true); - done(); - } - ); + F2.registerApps(appConfig(), appManifest()); + }); - F2.registerApps(appConfig(), appManifest()); - } - ); + it('should create appRoot using the apps html if appCreateRoot event is not bound and render appRoot to the page automatically.', function (done) { + F2.init(); - it( - 'should create appRoot using the apps html if appCreateRoot event is not bound and render appRoot to the page automatically.', - function (done) { - F2.init(); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); + expect($root.hasClass('test-app')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.text() == 'Testing').toBe(true); + done(); + } + ); - F2.AppHandlers.on( + F2.registerApps(appConfig(), appManifest()); + }); + + it('respects appRenderBefore setting appConfig.root and appends app html by default.', function (done) { + F2.init(); + + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_BEFORE, + function (appConfig) { + appConfig.root = $('

    ').get(0); + } + ).on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); + expect($root.is('h1')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); + done(); + } + ); + + F2.registerApps(appConfig(), appManifest()); + }); + + it('fires appRenderBefore functions sequentially.', function (done) { + var arOrder = []; + + F2.init(); + + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_BEFORE, + function (appConfig) { + appConfig.root = $('').get(0); + arOrder.push('1'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_BEFORE, + function (appConfig) { + arOrder.push('2'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_BEFORE, + function (appConfig) { + arOrder.push('3'); + } + ) + .on( containerAppHandlerToken, F2.Constants.AppHandlers.APP_RENDER_AFTER, function (appConfig) { var $root = $(appConfig.root); - expect($root.hasClass("test-app")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.text() == "Testing").toBe(true); + expect(arOrder.join(',')).toBe('1,2,3'); + expect($root.is('app')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); done(); } ); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.registerApps(appConfig(), appManifest()); + }); - it( - 'respects appRenderBefore setting appConfig.root and appends app html by default.', - function (done) { - F2.init(); + it('allows manipulation of appConfig.root through out appRenderBefore methods.', function (done) { + var arOrder = []; - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_BEFORE, - function (appConfig) { - appConfig.root = $("

    ").get(0); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); - expect($root.is("h1")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); - done(); - } - ); + F2.init(); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_BEFORE, + function (appConfig) { + appConfig.root = $('').get(0); + arOrder.push('1'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_BEFORE, + function (appConfig) { + $(appConfig.root).addClass('blue'); + arOrder.push('2'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_BEFORE, + function (appConfig) { + $(appConfig.root).addClass('red').attr('data-test', 'test'); + arOrder.push('3'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); + expect($root.hasClass('blue')).toBe(true); + expect($root.hasClass('red')).toBe(true); + expect(!!$root.attr('data-test')).toBe(true); + expect(arOrder.join(',')).toBe('1,2,3'); + expect($root.is('app')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); + done(); + } + ); - it('fires appRenderBefore functions sequentially.', function (done) { - var arOrder = []; + F2.registerApps(appConfig(), appManifest()); + }); - F2.init(); + it('allows resetting of appConfig.root.', function (done) { + var arOrder = []; - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_BEFORE, - function (appConfig) { - appConfig.root = $("").get(0); - arOrder.push("1"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_BEFORE, - function (appConfig) { - arOrder.push("2"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_BEFORE, - function (appConfig) { - arOrder.push("3"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); - expect(arOrder.join(",")).toBe("1,2,3"); - expect($root.is("app")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); - done(); - } - ); + F2.init(); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_BEFORE, + function (appConfig) { + appConfig.root = $('').get(0); + arOrder.push('1'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_BEFORE, + function (appConfig) { + appConfig.root = $('').get(0); + arOrder.push('2'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); + expect(arOrder.join(',')).toBe('1,2'); + expect($root.is('specialapp')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); + done(); + } + ); - it( - 'allows manipulation of appConfig.root through out appRenderBefore methods.', - function (done) { - var arOrder = []; - - F2.init(); - - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_BEFORE, - function (appConfig) { - appConfig.root = $("").get(0); - arOrder.push("1"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_BEFORE, - function (appConfig) { - $(appConfig.root).addClass("blue"); - arOrder.push("2"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_BEFORE, - function (appConfig) { - $(appConfig.root).addClass("red").attr("data-test", "test"); - arOrder.push("3"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); - expect($root.hasClass("blue")).toBe(true); - expect($root.hasClass("red")).toBe(true); - expect(!!$root.attr("data-test")).toBe(true); - expect(arOrder.join(",")).toBe("1,2,3"); - expect($root.is("app")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); - done(); - } - ); - - F2.registerApps(appConfig(), appManifest()); - } - ); - - it('allows resetting of appConfig.root.', function (done) { - var arOrder = []; - - F2.init(); - - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_BEFORE, - function (appConfig) { - appConfig.root = $("").get(0); - arOrder.push("1"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_BEFORE, - function (appConfig) { - appConfig.root = $("").get(0); - arOrder.push("2"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); - expect(arOrder.join(",")).toBe("1,2"); - expect($root.is("specialapp")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); - done(); - } - ); - - F2.registerApps(appConfig(), appManifest()); - } - ); - -}); + F2.registerApps(appConfig(), appManifest()); + }); +}); describe('F2.AppHandlers - rendering - appRender', function () { - var containerAppHandlerToken = null; beforeEach(function () { @@ -634,324 +604,301 @@ describe('F2.AppHandlers - rendering - appRender', function () { }; }; - it( - 'should pass appConfig and html as only arguments to appRender.', - function (done) { - F2.init(); + it('should pass appConfig and html as only arguments to appRender.', function (done) { + F2.init(); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_CREATE_ROOT, - function (appConfig) { - appConfig.root = $("
    ").get(0); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - function (appConfig, html) { - $('body').append($(appConfig.root).append(html)); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + function (appConfig) { + appConfig.root = $('
    ').get(0); + } + ).on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + function (appConfig, html) { + $('body').append($(appConfig.root).append(html)); + + var bHasAppConfig = + arguments.length == 2 && + appConfig && + appConfig.appId && + appConfig.manifestUrl + ? true + : false; + var bHasHtml = + arguments.length == 2 && html && typeof html === 'string' + ? true + : false; + + expect(bHasAppConfig).toBe(true); + expect(bHasHtml).toBe(true); - var bHasAppConfig = (arguments.length == 2 && appConfig && appConfig.appId && appConfig.manifestUrl) ? true : false; - var bHasHtml = (arguments.length == 2 && html && typeof (html) === "string") ? true : false; + done(); + } + ); - expect(bHasAppConfig).toBe(true); - expect(bHasHtml).toBe(true); + F2.registerApps(appConfig(), appManifest()); + }); - done(); - } - ); + it('should automatically create appRoot from app html and add app to the page if no appRender method is bound.', function (done) { + var bDone = false; + var bRootOnPage = false; + var bAppIsRoot = false; + var bAppHtmlInRoot = false; - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.init(); - it( - 'should automatically create appRoot from app html and add app to the page if no appRender method is bound.', - function (done) { - var bDone = false; - var bRootOnPage = false; - var bAppIsRoot = false; - var bAppHtmlInRoot = false; + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); - F2.init(); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.hasClass('test-app')).toBe(true); + expect($root.text() == 'Testing').toBe(true); + done(); + } + ); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); - - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.hasClass("test-app")).toBe(true); - expect($root.text() == "Testing").toBe(true); - done(); - } - ); + F2.registerApps(appConfig(), appManifest()); + }); - F2.registerApps(appConfig(), appManifest()); - } - ); + it('respects appRender appending html and putting it on the page manually.', function (done) { + $('div.app-area').remove(); + $("
    ").appendTo('body'); - it( - 'respects appRender appending html and putting it on the page manually.', - function (done) { - $("div.app-area").remove(); - $("
    ").appendTo("body"); + F2.init(); - F2.init(); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + function (appConfig) { + appConfig.root = $('').get(0); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + function (appConfig, html) { + var $root = $(appConfig.root); + $root.append(html); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_CREATE_ROOT, - function (appConfig) { - appConfig.root = $("").get(0); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - function (appConfig, html) { - var $root = $(appConfig.root); - $root.append(html); - - $("body div.app-area:first").append($root); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); - - expect($root.is("app")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.parent().is("div.app-area")).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); - done(); - } - ); + $('body div.app-area:first').append($root); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); - F2.registerApps(appConfig(), appManifest()); - } - ); + expect($root.is('app')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.parent().is('div.app-area')).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); + done(); + } + ); - it( - 'allows dom node to be only argument to appRender. Which renders the app to the dom node.', - function (done) { - // append a placeholder for the app - $("
    ").appendTo("body"); + F2.registerApps(appConfig(), appManifest()); + }); - F2.init(); + it('allows dom node to be only argument to appRender. Which renders the app to the dom node.', function (done) { + // append a placeholder for the app + $("
    ").appendTo('body'); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_CREATE_ROOT, - function (appConfig) { - appConfig.root = $("").get(0); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - $("div.app-area:last").get(0) - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); + F2.init(); - expect($root.is("app")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.parent().is("div.app-area")).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + function (appConfig) { + appConfig.root = $('').get(0); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + $('div.app-area:last').get(0) + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); - $("div.app-area").remove(); + expect($root.is('app')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.parent().is('div.app-area')).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); - done(); - } - ); + $('div.app-area').remove(); - F2.registerApps(appConfig(), appManifest()); - } - ); + done(); + } + ); - it( - 'should allow dom node to be only argument to appRender. Which renders the app to the dom node without needing to specifiy appCreateRoot handler.', - function (done) { - // append a placeholder for the app - $("
    ").appendTo("body"); + F2.registerApps(appConfig(), appManifest()); + }); - F2.init(); + it('should allow dom node to be only argument to appRender. Which renders the app to the dom node without needing to specifiy appCreateRoot handler.', function (done) { + // append a placeholder for the app + $("
    ").appendTo('body'); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - $("div.app-area:last").get(0) - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); + F2.init(); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.parent().is("div.app-area")).toBe(true); - expect($root.hasClass("test-app")).toBe(true); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + $('div.app-area:last').get(0) + ).on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); - $("div.app-area").remove(); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.parent().is('div.app-area')).toBe(true); + expect($root.hasClass('test-app')).toBe(true); - done(); - } - ); + $('div.app-area').remove(); - F2.registerApps(appConfig(), appManifest()); - } - ); + done(); + } + ); - it( - 'fires appRender functions sequentially.', - function (done) { - var arOrder = []; + F2.registerApps(appConfig(), appManifest()); + }); - // append a placeholder for the app - $("
    ").appendTo("body"); + it('fires appRender functions sequentially.', function (done) { + var arOrder = []; - F2.init(); + // append a placeholder for the app + $("
    ").appendTo('body'); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_CREATE_ROOT, - function (appConfig) { - appConfig.root = $("").get(0); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - function (appConfig) { - arOrder.push("1"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - function (appConfig) { - arOrder.push("2"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - $("div.app-area").get(0) - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - function (appConfig) { - arOrder.push("3"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); + F2.init(); - expect(arOrder.join(",")).toBe("1,2,3"); - expect($root.is("app")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.parent().is("div.app-area")).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + function (appConfig) { + appConfig.root = $('').get(0); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + function (appConfig) { + arOrder.push('1'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + function (appConfig) { + arOrder.push('2'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + $('div.app-area').get(0) + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + function (appConfig) { + arOrder.push('3'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); - $("div.app-area").remove(); + expect(arOrder.join(',')).toBe('1,2,3'); + expect($root.is('app')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.parent().is('div.app-area')).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); - done(); - } - ); + $('div.app-area').remove(); - F2.registerApps(appConfig(), appManifest()); - } - ); + done(); + } + ); - it( - 'allows manipulation of appConfig.root through out appRender methods.', - function (done) { - var arOrder = []; - $("
    ").appendTo("body"); + F2.registerApps(appConfig(), appManifest()); + }); - F2.init(); + it('allows manipulation of appConfig.root through out appRender methods.', function (done) { + var arOrder = []; + $("
    ").appendTo('body'); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_CREATE_ROOT, - function (appConfig) { - appConfig.root = $("").get(0); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - function (appConfig) { - arOrder.push("1"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - function (appConfig) { - $(appConfig.root).addClass("blue"); - arOrder.push("2"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - $("div.app-area").get(0) - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER, - function (appConfig) { - $(appConfig.root).addClass("red").attr("data-test", "test"); - arOrder.push("3"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); - - expect($root.hasClass("blue")).toBe(true); - expect($root.hasClass("red")).toBe(true); - expect(!!$root.attr("data-test")).toBe(true); - expect(arOrder.join(",")).toBe("1,2,3"); - expect($root.is("app")).toBe(true); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.find("div.test-app").length > 0).toBe(true); - expect($root.parent().is("div.app-area")).toBe(true); - - done(); - } - ); + F2.init(); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_CREATE_ROOT, + function (appConfig) { + appConfig.root = $('').get(0); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + function (appConfig) { + arOrder.push('1'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + function (appConfig) { + $(appConfig.root).addClass('blue'); + arOrder.push('2'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + $('div.app-area').get(0) + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER, + function (appConfig) { + $(appConfig.root).addClass('red').attr('data-test', 'test'); + arOrder.push('3'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); + + expect($root.hasClass('blue')).toBe(true); + expect($root.hasClass('red')).toBe(true); + expect(!!$root.attr('data-test')).toBe(true); + expect(arOrder.join(',')).toBe('1,2,3'); + expect($root.is('app')).toBe(true); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.find('div.test-app').length > 0).toBe(true); + expect($root.parent().is('div.app-area')).toBe(true); + done(); + } + ); + + F2.registerApps(appConfig(), appManifest()); + }); }); describe('F2.AppHandlers - rendering - appRenderAfter', function () { - var containerAppHandlerToken = null; beforeEach(function () { @@ -980,89 +927,82 @@ describe('F2.AppHandlers - rendering - appRenderAfter', function () { }; }; - it( - 'should pass appConfig as only argument to appRenderAfter.', - function (done) { - F2.init(); + it('should pass appConfig as only argument to appRenderAfter.', function (done) { + F2.init(); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var bHasAppConfig = (arguments.length == 1 && appConfig && appConfig.appId && appConfig.manifestUrl) ? true : false; - expect(bHasAppConfig).toBe(true); - done(); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var bHasAppConfig = + arguments.length == 1 && + appConfig && + appConfig.appId && + appConfig.manifestUrl + ? true + : false; + expect(bHasAppConfig).toBe(true); + done(); + } + ); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.registerApps(appConfig(), appManifest()); + }); - it( - 'should fire appRenderAfter only after app is in dom.', - function (done) { - F2.init(); + it('should fire appRenderAfter only after app is in dom.', function (done) { + F2.init(); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - var $root = $(appConfig.root); - - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.hasClass("test-app")).toBe(true); - expect($root.text() == "Testing").toBe(true); - done(); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + var $root = $(appConfig.root); - F2.registerApps(appConfig(), appManifest()); - } - ); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.hasClass('test-app')).toBe(true); + expect($root.text() == 'Testing').toBe(true); + done(); + } + ); - it( - 'fires appRenderAfter functions sequentially.', - function (done) { - var arOrder = []; + F2.registerApps(appConfig(), appManifest()); + }); - F2.init(); + it('fires appRenderAfter functions sequentially.', function (done) { + var arOrder = []; - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - arOrder.push("1"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - arOrder.push("2"); - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - arOrder.push("3"); - var $root = $(appConfig.root); - - expect(arOrder.join(",")).toBe("1,2,3"); - expect($root.parents("body:first").length > 0).toBe(true); - expect($root.text() == "Testing").toBe(true); - done(); - } - ); + F2.init(); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + arOrder.push('1'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + arOrder.push('2'); + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + arOrder.push('3'); + var $root = $(appConfig.root); + + expect(arOrder.join(',')).toBe('1,2,3'); + expect($root.parents('body:first').length > 0).toBe(true); + expect($root.text() == 'Testing').toBe(true); + done(); + } + ); + F2.registerApps(appConfig(), appManifest()); + }); }); describe('F2.AppHandlers - rendering - appDestroyBefore', function () { @@ -1094,99 +1034,96 @@ describe('F2.AppHandlers - rendering - appDestroyBefore', function () { }; }; - it( - 'should remove on() appDestroyBefore handlers regardless of namespace if no namespace passed to off() event.', - function (done) { - var bAppGone = false; - var $root = null; - var bAppDestroyOnMethodCalled = false; - var bAppDestroyWithNamespaceOnMethodCalled = false; + it('should remove on() appDestroyBefore handlers regardless of namespace if no namespace passed to off() event.', function (done) { + var bAppGone = false; + var $root = null; + var bAppDestroyOnMethodCalled = false; + var bAppDestroyWithNamespaceOnMethodCalled = false; - F2.init(); + F2.init(); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_DESTROY_BEFORE, - function () { - bAppDestroyOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_DESTROY_BEFORE + ".specialNamespace", - function () { - bAppDestroyWithNamespaceOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - $root = $(appConfig.root); - - F2.AppHandlers.off(containerAppHandlerToken, F2.Constants.AppHandlers.APP_DESTROY_BEFORE); - F2.removeApp(appConfig.instanceId); - - expect($root.parent().length == 0).toBe(true); - expect(bAppDestroyOnMethodCalled).toBe(false); - expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); - done(); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_BEFORE, + function () { + bAppDestroyOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_BEFORE + '.specialNamespace', + function () { + bAppDestroyWithNamespaceOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + $root = $(appConfig.root); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.AppHandlers.off( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_BEFORE + ); + F2.removeApp(appConfig.instanceId); - it( - 'should only remove on() from appDestroyBefore handlers if namespace matches what was passed to off() event.', - function (done) { - var bAppGone = false; - var $root = null; - var bAppDestroyOnMethodCalled = false; - var bAppDestroyWithNamespaceOnMethodCalled = false; + expect($root.parent().length == 0).toBe(true); + expect(bAppDestroyOnMethodCalled).toBe(false); + expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); + done(); + } + ); - F2.init(); + F2.registerApps(appConfig(), appManifest()); + }); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_DESTROY_BEFORE, - function () { - bAppDestroyOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_DESTROY_BEFORE + ".specialNamespace", - function () { - bAppDestroyWithNamespaceOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - $root = $(appConfig.root); - - F2.AppHandlers.off(containerAppHandlerToken, F2.Constants.AppHandlers.APP_DESTROY_BEFORE + ".specialNamespace"); - F2.removeApp(appConfig.instanceId); - - expect($root.parent().length == 0).toBe(true); - expect(bAppDestroyOnMethodCalled).toBe(true); - expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); - done(); - } - ); + it('should only remove on() from appDestroyBefore handlers if namespace matches what was passed to off() event.', function (done) { + var bAppGone = false; + var $root = null; + var bAppDestroyOnMethodCalled = false; + var bAppDestroyWithNamespaceOnMethodCalled = false; - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.init(); + + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_BEFORE, + function () { + bAppDestroyOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_BEFORE + '.specialNamespace', + function () { + bAppDestroyWithNamespaceOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + $root = $(appConfig.root); + + F2.AppHandlers.off( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_BEFORE + '.specialNamespace' + ); + F2.removeApp(appConfig.instanceId); + + expect($root.parent().length == 0).toBe(true); + expect(bAppDestroyOnMethodCalled).toBe(true); + expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); + done(); + } + ); + + F2.registerApps(appConfig(), appManifest()); + }); }); describe('F2.AppHandlers - rendering - appDestroy', function () { - var containerAppHandlerToken = null; beforeEach(function () { @@ -1257,7 +1194,7 @@ describe('F2.AppHandlers - rendering - appDestroy', function () { ); // wait for the app to have been created - F2.Events.on('com_openf2_examples_nodejs_helloworld-init', function() { + F2.Events.on('com_openf2_examples_nodejs_helloworld-init', function () { // delay execution of removing the app setTimeout(function () { F2.removeApp(instanceConfig.instanceId); @@ -1273,107 +1210,113 @@ describe('F2.AppHandlers - rendering - appDestroy', function () { F2.registerApps(appConfig()); }, 10000); - it( - 'should remove on() appDestroy handlers regardless of namespace if no namespace passed to off() event.', - function (done) { - var bAppGone = false; - var $root = null; - var bAppDestroyOnMethodCalled = false; - var bAppDestroyWithNamespaceOnMethodCalled = false; + it('should remove on() appDestroy handlers regardless of namespace if no namespace passed to off() event.', function (done) { + var bAppGone = false; + var $root = null; + var bAppDestroyOnMethodCalled = false; + var bAppDestroyWithNamespaceOnMethodCalled = false; - F2.init(); + F2.init(); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_DESTROY, - function (appConfig) { - bAppDestroyOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - "appDestroy.specialNamespace", - function (appConfig) { - bAppDestroyWithNamespaceOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - $root = $(appConfig.root); - - F2.AppHandlers.off(containerAppHandlerToken, F2.Constants.AppHandlers.APP_DESTROY); - F2.removeApp(appConfig.instanceId); - - expect($root.parent().length == 0).toBe(true); - expect(bAppDestroyOnMethodCalled).toBe(false); - expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); - done(); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY, + function (appConfig) { + bAppDestroyOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + 'appDestroy.specialNamespace', + function (appConfig) { + bAppDestroyWithNamespaceOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + $root = $(appConfig.root); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.AppHandlers.off( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY + ); + F2.removeApp(appConfig.instanceId); - it( - 'should only remove on() from appDestroy handlers if namespace matches what was passed to off() event.', - function (done) { - var bAppGone = false; - var $root = null; - var bAppDestroyOnMethodCalled = false; - var bAppDestroyWithNamespaceOnMethodCalled = false; + expect($root.parent().length == 0).toBe(true); + expect(bAppDestroyOnMethodCalled).toBe(false); + expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); + done(); + } + ); - F2.init(); + F2.registerApps(appConfig(), appManifest()); + }); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_DESTROY, - function (appInstance) { - // call the apps destroy method, if it has one - if (appInstance && appInstance.app && appInstance.app.destroy && typeof (appInstance.app.destroy) == "function") { - appInstance.app.destroy(); - } - // warn the container developer/app developer that even though they have a destroy method it hasn't been - else if (appInstance && appInstance.app && appInstance.app.destroy) { - F2.log(app.config.appId + " has a destroy property, but destroy is not of type function and as such will not be executed."); - } - - //remove the root - appInstance.config.root.remove(); - - bAppDestroyOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - "appDestroy.specialNamespace", - function (appConfig) { - bAppDestroyWithNamespaceOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - $root = $(appConfig.root); - - F2.AppHandlers.off(containerAppHandlerToken, "appDestroy.specialNamespace"); - F2.removeApp(appConfig.instanceId); - - expect($root.parent().length == 0).toBe(true); - expect(bAppDestroyOnMethodCalled).toBe(true); - expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); - done(); - } - ); + it('should only remove on() from appDestroy handlers if namespace matches what was passed to off() event.', function (done) { + var bAppGone = false; + var $root = null; + var bAppDestroyOnMethodCalled = false; + var bAppDestroyWithNamespaceOnMethodCalled = false; - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.init(); + + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY, + function (appInstance) { + // call the apps destroy method, if it has one + if ( + appInstance && + appInstance.app && + appInstance.app.destroy && + typeof appInstance.app.destroy == 'function' + ) { + appInstance.app.destroy(); + } + // warn the container developer/app developer that even though they have a destroy method it hasn't been + else if (appInstance && appInstance.app && appInstance.app.destroy) { + F2.log( + app.config.appId + + ' has a destroy property, but destroy is not of type function and as such will not be executed.' + ); + } + + //remove the root + appInstance.config.root.remove(); + + bAppDestroyOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + 'appDestroy.specialNamespace', + function (appConfig) { + bAppDestroyWithNamespaceOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + $root = $(appConfig.root); + + F2.AppHandlers.off( + containerAppHandlerToken, + 'appDestroy.specialNamespace' + ); + F2.removeApp(appConfig.instanceId); + + expect($root.parent().length == 0).toBe(true); + expect(bAppDestroyOnMethodCalled).toBe(true); + expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); + done(); + } + ); + + F2.registerApps(appConfig(), appManifest()); + }); }); describe('F2.AppHandlers - rendering - appDestroyAfter', function () { @@ -1405,97 +1348,93 @@ describe('F2.AppHandlers - rendering - appDestroyAfter', function () { }; }; - it( - 'should remove on() appDestroyAfter handlers regardless of namespace if no namespace passed to off() event.', - function (done) { - var $root = null; - var bAppDestroyOnMethodCalled = false; - var bAppDestroyWithNamespaceOnMethodCalled = false; + it('should remove on() appDestroyAfter handlers regardless of namespace if no namespace passed to off() event.', function (done) { + var $root = null; + var bAppDestroyOnMethodCalled = false; + var bAppDestroyWithNamespaceOnMethodCalled = false; - F2.init(); + F2.init(); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_DESTROY_AFTER, - function () { - bAppDestroyOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_DESTROY_AFTER + ".specialNamespace", - function () { - bAppDestroyWithNamespaceOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - $root = $(appConfig.root); - - F2.AppHandlers.off(containerAppHandlerToken, F2.Constants.AppHandlers.APP_DESTROY_AFTER); - F2.removeApp(appConfig.instanceId); - - expect($root.parent().length == 0).toBe(true); - expect(bAppDestroyOnMethodCalled).toBe(false); - expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); - done(); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_AFTER, + function () { + bAppDestroyOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_AFTER + '.specialNamespace', + function () { + bAppDestroyWithNamespaceOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + $root = $(appConfig.root); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.AppHandlers.off( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_AFTER + ); + F2.removeApp(appConfig.instanceId); - it( - 'should only remove on() from appDestroyAfter handlers if namespace matches what was passed to off() event.', - function () { - var $root = null; - var bAppDestroyOnMethodCalled = false; - var bAppDestroyWithNamespaceOnMethodCalled = false; + expect($root.parent().length == 0).toBe(true); + expect(bAppDestroyOnMethodCalled).toBe(false); + expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); + done(); + } + ); - F2.init(); + F2.registerApps(appConfig(), appManifest()); + }); - F2.AppHandlers - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_DESTROY_AFTER, - function () { - bAppDestroyOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_DESTROY_AFTER + ".specialNamespace", - function () { - bAppDestroyWithNamespaceOnMethodCalled = true; - } - ) - .on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_RENDER_AFTER, - function (appConfig) { - $root = $(appConfig.root); + it('should only remove on() from appDestroyAfter handlers if namespace matches what was passed to off() event.', function () { + var $root = null; + var bAppDestroyOnMethodCalled = false; + var bAppDestroyWithNamespaceOnMethodCalled = false; - F2.AppHandlers.off(containerAppHandlerToken, F2.Constants.AppHandlers.APP_DESTROY_AFTER + ".specialNamespace"); - F2.removeApp(appConfig.instanceId); + F2.init(); - expect($root.parent().length == 0).toBe(true); - expect(bAppDestroyOnMethodCalled).toBe(true); - expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_AFTER, + function () { + bAppDestroyOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_AFTER + '.specialNamespace', + function () { + bAppDestroyWithNamespaceOnMethodCalled = true; + } + ) + .on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_RENDER_AFTER, + function (appConfig) { + $root = $(appConfig.root); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.AppHandlers.off( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_DESTROY_AFTER + '.specialNamespace' + ); + F2.removeApp(appConfig.instanceId); + + expect($root.parent().length == 0).toBe(true); + expect(bAppDestroyOnMethodCalled).toBe(true); + expect(bAppDestroyWithNamespaceOnMethodCalled).toBe(false); + } + ); + F2.registerApps(appConfig(), appManifest()); + }); }); describe('F2.AppHandlers - error handling - appScriptLoadFailed', function () { - var containerAppHandlerToken = null; beforeEach(function () { @@ -1528,45 +1467,45 @@ describe('F2.AppHandlers - error handling - appScriptLoadFailed', function () { invalidInlineAppManifest.scripts = []; invalidInlineAppManifest.inlineScripts = ['1alert("a");']; - it( - 'handler should receive appScriptLoadFailed event due to invalid appjs path', - function (done) { - // Reduce timeout so this unit test doesn't take 7 seconds - F2.init({ scriptErrorTimeout: 100 }); + it('handler should receive appScriptLoadFailed event due to invalid appjs path', function (done) { + // Reduce timeout so this unit test doesn't take 7 seconds + F2.init({ scriptErrorTimeout: 100 }); - F2.AppHandlers.on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, - function (appConfig, scriptInfo) { - F2.AppHandlers.off(containerAppHandlerToken, F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED); - F2.removeApp(appConfig.instanceId); - expect(true).toBe(true); // making it this far means the test succeeded - done(); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, + function (appConfig, scriptInfo) { + F2.AppHandlers.off( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED + ); + F2.removeApp(appConfig.instanceId); + expect(true).toBe(true); // making it this far means the test succeeded + done(); + } + ); - F2.registerApps(appConfig(), appManifest()); - } - ); + F2.registerApps(appConfig(), appManifest()); + }); - it( - 'handler should receive appScriptLoadFailed event due to invalid inline script', - function (done) { - F2.init(); + it('handler should receive appScriptLoadFailed event due to invalid inline script', function (done) { + F2.init(); - F2.AppHandlers.on( - containerAppHandlerToken, - F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, - function (appConfig, scriptInfo) { - bScriptLoadFailedReceived = true; - F2.AppHandlers.off(containerAppHandlerToken, F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED); - F2.removeApp(appConfig.instanceId); - expect(true).toBe(true); // making it this far means the test succeeded - done(); - } - ); + F2.AppHandlers.on( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED, + function (appConfig, scriptInfo) { + bScriptLoadFailedReceived = true; + F2.AppHandlers.off( + containerAppHandlerToken, + F2.Constants.AppHandlers.APP_SCRIPT_LOAD_FAILED + ); + F2.removeApp(appConfig.instanceId); + expect(true).toBe(true); // making it this far means the test succeeded + done(); + } + ); - F2.registerApps(appConfig(), invalidInlineAppManifest); - } - ); + F2.registerApps(appConfig(), invalidInlineAppManifest); + }); }); diff --git a/tests/spec/autoload-spec.js b/tests/spec/autoload-spec.js index 5304a1ec..0a3aeb3b 100644 --- a/tests/spec/autoload-spec.js +++ b/tests/spec/autoload-spec.js @@ -1,46 +1,51 @@ -describe('F2.loadPlaceholders - auto', function() { - - var itShouldFindAndRegisterApps = function(selector, count) { - it('should automatically find and register apps', function(done) { +describe('F2.loadPlaceholders - auto', function () { + var itShouldFindAndRegisterApps = function (selector, count) { + it('should automatically find and register apps', function (done) { var children = 0; - var periodicCheck = setInterval( - function() { - var element = document.querySelectorAll(selector); - if (!element) { - return; - // clearInterval(periodicCheck); - // console.log('unable to locate selector: ' + selector); - // throw new Error('unable to locate selector: ' + selector); - } - // sum the number of children found in each of the elements that were found - children = Array.from(element).reduce((total, current) => total + current.children.length, 0); - if (children === count) { - try { - expect(children).toEqual(count); - } catch (e) { - console.error('caught exception waiting for children: ' + e.message); - } finally { - clearInterval(periodicCheck); - } - done(); + var periodicCheck = setInterval(function () { + var element = document.querySelectorAll(selector); + if (!element) { + return; + // clearInterval(periodicCheck); + // console.log('unable to locate selector: ' + selector); + // throw new Error('unable to locate selector: ' + selector); + } + // sum the number of children found in each of the elements that were found + children = Array.from(element).reduce( + (total, current) => total + current.children.length, + 0 + ); + if (children === count) { + try { + expect(children).toEqual(count); + } catch (e) { + console.error( + 'caught exception waiting for children: ' + e.message + ); + } finally { + clearInterval(periodicCheck); } - }, - 100 - ); + done(); + } + }, 100); }); }; - describe('single app by id', function() { + describe('single app by id', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += - '
    '; + '
    '; }); // force F2 to be reloaded beforeEachReloadF2(); - it('should automatically auto-init F2 when f2-autoload id is on the page', function() { + it('should automatically auto-init F2 when f2-autoload id is on the page', function () { // need to wait for dom ready before F2.init() will be called expect(F2.isInit()).toBe(true); }); @@ -48,12 +53,20 @@ describe('F2.loadPlaceholders - auto', function() { itShouldFindAndRegisterApps('#f2-autoload', 1); }); - describe('single app by id, with children', function() { + describe('single app by id, with children', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += [ - '
    ', - '
    ', + '
    ', + '
    ', '
    ' ].join(''); }); @@ -63,57 +76,73 @@ describe('F2.loadPlaceholders - auto', function() { itShouldFindAndRegisterApps('#f2-autoload', 1); - it('should ignore apps within apps', function(done) { + it('should ignore apps within apps', function (done) { setTimeout(function () { - expect(document.getElementById('f2-autoload').children.length).toEqual(1); + expect(document.getElementById('f2-autoload').children.length).toEqual( + 1 + ); expect( - Array.from(document.querySelectorAll('#f2-autoload [data-f2-appid]')).reduce((total, current) => total + current.children.length, 0) + Array.from( + document.querySelectorAll('#f2-autoload [data-f2-appid]') + ).reduce((total, current) => total + current.children.length, 0) ).toEqual(0); done(); }, 3000); // arbitrary amount of time }); }); - describe('single app by attribute', function() { + describe('single app by attribute', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += - '
    '; + '
    '; }); // force F2 to be reloaded beforeEachReloadF2(); - it('should automatically auto-init F2 when data-f2-autoload attribute is on the page', function() { + it('should automatically auto-init F2 when data-f2-autoload attribute is on the page', function () { expect(F2.isInit()).toBe(true); }); itShouldFindAndRegisterApps('[data-f2-autoload]', 1); }); - describe('single app by class', function() { + describe('single app by class', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += - '
    '; + '
    '; }); // force F2 to be reloaded beforeEachReloadF2(); - it('should automatically auto-init F2 when f2-autoload class is on the page', function() { + it('should automatically auto-init F2 when f2-autoload class is on the page', function () { expect(F2.isInit()).toBe(true); }); itShouldFindAndRegisterApps('.f2-autoload', 1); }); - describe('single app by id, nested', function() { + describe('single app by id, nested', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += [ '
    ', - '
    ', + '
    ', '
    ' ].join(''); }); @@ -124,12 +153,16 @@ describe('F2.loadPlaceholders - auto', function() { itShouldFindAndRegisterApps('#f2-autoload [data-f2-appid]', 1); }); - describe('single app by attribute, nested', function() { + describe('single app by attribute, nested', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += [ '
    ', - '
    ', + '
    ', '
    ' ].join(''); }); @@ -140,12 +173,16 @@ describe('F2.loadPlaceholders - auto', function() { itShouldFindAndRegisterApps('#f2-autoload-single [data-f2-appid]', 1); }); - describe('single app by class, nested', function() { + describe('single app by class, nested', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += [ '
    ', - '
    ', + '
    ', '
    ' ].join(''); }); @@ -156,13 +193,21 @@ describe('F2.loadPlaceholders - auto', function() { itShouldFindAndRegisterApps('#f2-autoload-single [data-f2-appid]', 1); }); - describe('many apps by id', function() { + describe('many apps by id', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += [ '
    ', - '
    ', - '
    ', + '
    ', + '
    ', '
    ' ].join(''); }); @@ -173,13 +218,21 @@ describe('F2.loadPlaceholders - auto', function() { itShouldFindAndRegisterApps('#f2-autoload [data-f2-appid]', 2); }); - describe('many apps by attribute', function() { + describe('many apps by attribute', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += [ '
    ', - '
    ', - '
    ', + '
    ', + '
    ', '
    ' ].join(''); }); @@ -190,13 +243,21 @@ describe('F2.loadPlaceholders - auto', function() { itShouldFindAndRegisterApps('#f2-autoload-many [data-f2-appid]', 2); }); - describe('many apps by class', function() { + describe('many apps by class', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += [ '
    ', - '
    ', - '
    ', + '
    ', + '
    ', '
    ' ].join(''); }); @@ -207,16 +268,24 @@ describe('F2.loadPlaceholders - auto', function() { itShouldFindAndRegisterApps('#f2-autoload-many [data-f2-appid]', 2); }); - describe('many placeholders by attribute', function() { + describe('many placeholders by attribute', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += [ '
    ', - '
    ', + '
    ', '
    ', '
    ', - '
    ', - '
    ', + '
    ', + '
    ' ].join(''); }); @@ -226,16 +295,24 @@ describe('F2.loadPlaceholders - auto', function() { itShouldFindAndRegisterApps('#test-fixture [data-f2-appid]', 2); }); - describe('many placeholders by class', function() { + describe('many placeholders by class', function () { // append test to DOM before reloading F2 - beforeEach(function() { + beforeEach(function () { document.getElementById('test-fixture').innerHTML += [ '
    ', - '
    ', + '
    ', '
    ', '
    ', - '
    ', - '
    ', + '
    ', + '
    ' ].join(''); }); @@ -246,42 +323,45 @@ describe('F2.loadPlaceholders - auto', function() { }); }); -describe('F2.loadPlaceholders - manual', function() { - +describe('F2.loadPlaceholders - manual', function () { // force F2 to be reloaded - beforeEachReloadF2(function() { - document.getElementById('test-fixture').innerHTML += '
    '; + beforeEachReloadF2(function () { + document.getElementById('test-fixture').innerHTML += + '
    '; spyOn(console, 'log').and.callThrough(); }); - var shouldFindAndRegisterApps = function(selector, count, done) { + var shouldFindAndRegisterApps = function (selector, count, done) { var children = 0; - var periodicCheck = setInterval( - function() { - var element = document.querySelectorAll(selector); - if (!element) { + var periodicCheck = setInterval(function () { + var element = document.querySelectorAll(selector); + if (!element) { + clearInterval(periodicCheck); + throw new Error('unable to locate selector: ' + selector); + } + // sum the number of children found in each of the elements that were found + children = Array.from(element).reduce( + (total, current) => total + current.children.length, + 0 + ); + if (children === count) { + try { + expect(children).toEqual(count); + } catch (e) { + console.error('caught exception waiting for children: ' + e.message); + } finally { clearInterval(periodicCheck); - throw new Error('unable to locate selector: ' + selector); - } - // sum the number of children found in each of the elements that were found - children = Array.from(element).reduce((total, current) => total + current.children.length, 0); - if (children === count) { - try { - expect(children).toEqual(count); - } catch (e) { - console.error('caught exception waiting for children: ' + e.message); - } finally { - clearInterval(periodicCheck); - } - done(); } + done(); + } }, 100); }; - it('should require the presence of data-f2-manifesturl', function() { + it('should require the presence of data-f2-manifesturl', function () { // add the invalid placeholder - document.getElementById('f2-autoload').innerHTML += '
    '; + document.getElementById('f2-autoload').innerHTML += + '
    '; // even though the manifesturl is missing, the message is generic because a // null AppConfig was generated @@ -291,10 +371,14 @@ describe('F2.loadPlaceholders - manual', function() { expect(console.log).toHaveBeenCalledWith('"appId" missing from app object'); }); - it('should find and register apps', function(done) { + it('should find and register apps', function (done) { document.getElementById('test-fixture').innerHTML += [ '
    ', - '
    ', + '
    ', '
    ' ].join(''); @@ -304,12 +388,20 @@ describe('F2.loadPlaceholders - manual', function() { shouldFindAndRegisterApps('#f2-autoload [data-f2-appid]', 1, done); }); - it('should find and register multiple apps', function(done) { + it('should find and register multiple apps', function (done) { // add the placeholder document.getElementById('test-fixture').innerHTML += [ '
    ', - '
    ', - '
    ', + '
    ', + '
    ', '
    ' ].join(''); @@ -319,18 +411,22 @@ describe('F2.loadPlaceholders - manual', function() { shouldFindAndRegisterApps('#f2-autoload [data-f2-appid]', 2, done); }); - it('should throw an exception when an invalid parentNode is passed', function() { - expect(function() { + it('should throw an exception when an invalid parentNode is passed', function () { + expect(function () { F2.init(); F2.loadPlaceholders('foo'); }).toThrow('"parentNode" must be null or a DOM node'); }); - it('should find and register apps within a given scope', function(done) { + it('should find and register apps within a given scope', function (done) { // add the placeholder document.getElementById('test-fixture').innerHTML += [ '
    ', - '
    ', + '
    ', '
    ' ].join(''); @@ -339,4 +435,4 @@ describe('F2.loadPlaceholders - manual', function() { shouldFindAndRegisterApps('#f2-autoload [data-f2-appid]', 1, done); }); -}); \ No newline at end of file +}); diff --git a/tests/spec/container-spec.js b/tests/spec/container-spec.js index 9730950e..dc337206 100644 --- a/tests/spec/container-spec.js +++ b/tests/spec/container-spec.js @@ -1,12 +1,11 @@ -describe('F2.registerApps - pre-load', function() { - - beforeEach(function() { +describe('F2.registerApps - pre-load', function () { + beforeEach(function () { spyOn(console, 'log').and.callThrough(); // refresh the preloaded apps since the F2/F2.Apps namespace was wiped out - window.F2_PRELOADED.forEach(f => f()); + window.F2_PRELOADED.forEach((f) => f()); }); - it('should throw exception if F2.init() is not called prior', function() { + it('should throw exception if F2.init() is not called prior', function () { var appConfig = { appId: TEST_PRELOADED_APP_ID, manifestUrl: TEST_PRELOADED_MANIFEST_URL, @@ -14,17 +13,21 @@ describe('F2.registerApps - pre-load', function() { }; F2.registerApps([appConfig]); - expect(console .log).toHaveBeenCalledWith('F2.init() must be called before F2.registerApps()'); + expect(console.log).toHaveBeenCalledWith( + 'F2.init() must be called before F2.registerApps()' + ); }); - it('should throw exception if no appConfigs are passed.', function() { + it('should throw exception if no appConfigs are passed.', function () { F2.init(); F2.registerApps(); - expect(console.log).toHaveBeenCalledWith('At least one AppConfig must be passed when calling F2.registerApps()'); + expect(console.log).toHaveBeenCalledWith( + 'At least one AppConfig must be passed when calling F2.registerApps()' + ); }); - it('should allow you to pass single appConfig as object to F2.registerApps', function() { - expect(function() { + it('should allow you to pass single appConfig as object to F2.registerApps', function () { + expect(function () { F2.init(); var appConfig = { appId: TEST_PRELOADED_APP_ID, @@ -34,44 +37,49 @@ describe('F2.registerApps - pre-load', function() { }).not.toThrow(); }); - it('should not require appConfig.manifestUrl when passing pre-load appConfig to F2.registerApps', function() { + it('should not require appConfig.manifestUrl when passing pre-load appConfig to F2.registerApps', function () { F2.init(); var appConfig = { appId: TEST_PRELOADED_APP_ID, root: document.querySelector(`div.${TEST_PRELOADED_APP_ID}`) }; F2.registerApps(appConfig); - expect(console.log).not.toHaveBeenCalledWith('"manifestUrl" missing from app object'); + expect(console.log).not.toHaveBeenCalledWith( + '"manifestUrl" missing from app object' + ); }); - it('should throw exception if you pass an invalid appConfig to F2.registerApps', function() { + it('should throw exception if you pass an invalid appConfig to F2.registerApps', function () { F2.init(); F2.registerApps({}); expect(console.log).toHaveBeenCalledWith('"appId" missing from app object'); }); - it('should request apps without valid root property and auto init pre-load apps with root when passing mix to F2.registerApps', function(done) { + it('should request apps without valid root property and auto init pre-load apps with root when passing mix to F2.registerApps', function (done) { // we're basically looking to ensure that the second app passed in gets // initialized properly because it already existed on the page - var appConfigs = [{ - appId: TEST_APP_ID, - manifestUrl: TEST_MANIFEST_URL - }, { - appId: TEST_PRELOADED_APP_ID, - root: document.querySelector(`div.${TEST_PRELOADED_APP_ID}`) - }]; + var appConfigs = [ + { + appId: TEST_APP_ID, + manifestUrl: TEST_MANIFEST_URL + }, + { + appId: TEST_PRELOADED_APP_ID, + root: document.querySelector(`div.${TEST_PRELOADED_APP_ID}`) + } + ]; F2.init(); F2.AppHandlers.on( F2.AppHandlers.getToken(), F2.Constants.AppHandlers.APP_RENDER_AFTER, - function() { + function () { F2.Events.emit('PreloadAppTestOne', 'one'); } ); - F2.Events.on('PreloadAppResponseOne', function(val) { + F2.Events.on('PreloadAppResponseOne', function (val) { expect(val).toBe('one'); done(); }); @@ -79,29 +87,31 @@ describe('F2.registerApps - pre-load', function() { F2.registerApps(appConfigs); }); - it('should allow you to init/register multiple of the same app that are already on the page.', function(done) { - + it('should allow you to init/register multiple of the same app that are already on the page.', function (done) { var appsOnPage = document.querySelectorAll(`div.${TEST_PRELOADED_APP_ID}`); - var appConfigs = [{ - appId: TEST_PRELOADED_APP_ID, - context: { - app: 1 - }, - manifestUrl: TEST_PRELOADED_MANIFEST_URL, - root: appsOnPage[0] - }, { - appId: TEST_PRELOADED_APP_ID, - context: { - app: 2 + var appConfigs = [ + { + appId: TEST_PRELOADED_APP_ID, + context: { + app: 1 + }, + manifestUrl: TEST_PRELOADED_MANIFEST_URL, + root: appsOnPage[0] }, - manifestUrl: TEST_PRELOADED_MANIFEST_URL, - root: appsOnPage[1] - }]; + { + appId: TEST_PRELOADED_APP_ID, + context: { + app: 2 + }, + manifestUrl: TEST_PRELOADED_MANIFEST_URL, + root: appsOnPage[1] + } + ]; F2.init(); var appResponseCount = 0; - F2.Events.on('PreloadAppResponseTwo', function(val) { + F2.Events.on('PreloadAppResponseTwo', function (val) { expect(val).toBeTruthy(); appResponseCount++; @@ -118,22 +128,23 @@ describe('F2.registerApps - pre-load', function() { // appManifest. // See container.js line 979 // - it('should pass appConfig, appContent, and root to preloaded AppClasses when given AppContent', function(done) { - + it('should pass appConfig, appContent, and root to preloaded AppClasses when given AppContent', function (done) { var appConfig = { - appId:'com_openf2_tests_preloaded_argtester', + appId: 'com_openf2_tests_preloaded_argtester', root: document.querySelector('div.com_openf2_tests_preloaded_argtester') }; var appManifest = { - scripts: ["/tests/apps/com_openf2_tests_preloaded_argtester/appclass.js"], - apps: [{ - html: '
    Testing
    ' - }] + scripts: ['/tests/apps/com_openf2_tests_preloaded_argtester/appclass.js'], + apps: [ + { + html: '
    Testing
    ' + } + ] }; F2.init(); - F2.Events.on('PreloadAppArgumentCount', function(count) { + F2.Events.on('PreloadAppArgumentCount', function (count) { expect(count).toEqual(3); done(); }); @@ -142,34 +153,31 @@ describe('F2.registerApps - pre-load', function() { }); }); -describe('F2.init', function() { - - it('should allow for no parameters', function() { - expect(function() { +describe('F2.init', function () { + it('should allow for no parameters', function () { + expect(function () { F2.init(); }).not.toThrow(); }); - it('should allow for an empty object parameter', function() { - expect(function() { + it('should allow for an empty object parameter', function () { + expect(function () { F2.init({}); }).not.toThrow(); }); - }); -describe('F2.init - xhr overrides', function() { - - it('should throw an exception when ContainerConfig.xhr is not an object or function', function() { - expect(function() { +describe('F2.init - xhr overrides', function () { + it('should throw an exception when ContainerConfig.xhr is not an object or function', function () { + expect(function () { F2.init({ xhr: true }); }).toThrow('ContainerConfig.xhr should be a function or an object'); }); - it('should throw an exception when xhr.dataType is not a function', function() { - expect(function() { + it('should throw an exception when xhr.dataType is not a function', function () { + expect(function () { F2.init({ xhr: { dataType: true @@ -178,8 +186,8 @@ describe('F2.init - xhr overrides', function() { }).toThrow('ContainerConfig.xhr.dataType should be a function'); }); - it('should throw an exception when xhr.type is not a function', function() { - expect(function() { + it('should throw an exception when xhr.type is not a function', function () { + expect(function () { F2.init({ xhr: { type: true @@ -189,8 +197,8 @@ describe('F2.init - xhr overrides', function() { }).toThrow('ContainerConfig.xhr.type should be a function'); }); - it('should throw an exception when xhr.url is not a function', function() { - expect(function() { + it('should throw an exception when xhr.url is not a function', function () { + expect(function () { F2.init({ xhr: { url: true @@ -201,48 +209,48 @@ describe('F2.init - xhr overrides', function() { }); }); -describe('F2.isInit', function() { - - it('should return false when F2.init has not been called', function() { +describe('F2.isInit', function () { + it('should return false when F2.init has not been called', function () { expect(F2.isInit()).toBeFalsy(); }); - it('should return true when F2.init has been called', function() { + it('should return true when F2.init has been called', function () { F2.init(); expect(F2.isInit()).toBeTruthy(); }); }); -describe('F2.init - internationalization', function() { - +describe('F2.init - internationalization', function () { var appConfig = { appId: TEST_APP_ID, manifestUrl: TEST_MANIFEST_URL, - localeSupport: ['en-us','de-de'] + localeSupport: ['en-us', 'de-de'] }; var appManifest = { scripts: [], styles: [], inlineScripts: [], - apps: [{ - html: '
    Testing
    ' - }] + apps: [ + { + html: '
    Testing
    ' + } + ] }; - it('should not fail F2.init when locale is undefined', function() { + it('should not fail F2.init when locale is undefined', function () { F2.init(); //F2.registerApps(appConfig,appManifest); expect(F2.isInit()).toBeTruthy(); }); - it('F2.getContainerLocale() should return null when locale is undefined', function() { + it('F2.getContainerLocale() should return null when locale is undefined', function () { F2.init(); //F2.registerApps(appConfig,appManifest); expect(F2.getContainerLocale()).toBe(null); }); - it('F2.getContainerLocale() should return current locale', function() { + it('F2.getContainerLocale() should return current locale', function () { F2.init({ locale: 'en-us' }); @@ -250,7 +258,7 @@ describe('F2.init - internationalization', function() { expect(F2.getContainerLocale()).toBe('en-us'); }); - it('F2.getContainerLocale() should be a string', function() { + it('F2.getContainerLocale() should be a string', function () { F2.init({ locale: 'en-us' }); @@ -258,25 +266,27 @@ describe('F2.init - internationalization', function() { expect(typeof F2.getContainerLocale() === 'string').toBeTruthy(); }); - it('F2.getContainerLocale() should be a valid IETF tag', function() { + it('F2.getContainerLocale() should be a valid IETF tag', function () { F2.init({ locale: 'en-us' }); //F2.registerApps(appConfig,appManifest); //see http://www.w3.org/TR/xmlschema11-2/#language - expect( /[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*/.test( F2.getContainerLocale() ) ).toBeTruthy(); + expect( + /[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*/.test(F2.getContainerLocale()) + ).toBeTruthy(); }); - it('should not modify original appConfig', function() { + it('should not modify original appConfig', function () { F2.init({ locale: 'en-us' }); - F2.registerApps(appConfig,appManifest); + F2.registerApps(appConfig, appManifest); expect(appConfig.containerLocale).toBeFalsy(); expect(appConfig.locale).toBeFalsy(); }); - it('app should receive locale as "containerLocale" in appConfig', function(done) { + it('app should receive locale as "containerLocale" in appConfig', function (done) { F2.init({ locale: 'en-us' }); @@ -286,13 +296,13 @@ describe('F2.init - internationalization', function() { manifestUrl: TEST_MANIFEST_URL3 }); - F2.Events.on('com_openf2_examples_nodejs_helloworld-init', data => { + F2.Events.on('com_openf2_examples_nodejs_helloworld-init', (data) => { expect(data.testLocaleFromAppConfig).toEqual(F2.getContainerLocale()); done(); }); }); - it('app should not receive locale as "containerLocale" in appConfig when locale is not defined', function(done) { + it('app should not receive locale as "containerLocale" in appConfig when locale is not defined', function (done) { F2.init(); F2.registerApps({ @@ -300,24 +310,24 @@ describe('F2.init - internationalization', function() { manifestUrl: TEST_MANIFEST_URL3 }); - F2.Events.on('com_openf2_examples_nodejs_helloworld-init', data => { + F2.Events.on('com_openf2_examples_nodejs_helloworld-init', (data) => { expect(data.testLocaleFromAppConfig).toBeFalsy(); done(); }); }); - it('should update containerLocale when CONTAINER_LOCALE_CHANGE is fired', function(done) { + it('should update containerLocale when CONTAINER_LOCALE_CHANGE is fired', function (done) { var _locale; F2.init({ locale: 'en-us' }); - F2.registerApps(appConfig,appManifest); + F2.registerApps(appConfig, appManifest); //locale was defined, should be en-us expect(F2.getContainerLocale() == 'en-us').toBeTruthy(); //listen for changes - F2.Events.on(F2.Constants.Events.CONTAINER_LOCALE_CHANGE,function(data){ + F2.Events.on(F2.Constants.Events.CONTAINER_LOCALE_CHANGE, function (data) { _locale = data.locale; //now locale should be changed expect(F2.getContainerLocale() == 'de-de').toBeTruthy(); @@ -325,59 +335,59 @@ describe('F2.init - internationalization', function() { }); //now change locale - F2.Events.emit(F2.Constants.Events.CONTAINER_LOCALE_CHANGE,{ + F2.Events.emit(F2.Constants.Events.CONTAINER_LOCALE_CHANGE, { locale: 'de-de' }); }); - it('should update containerLocale when CONTAINER_LOCALE_CHANGE is fired after being undefined', function(done) { + it('should update containerLocale when CONTAINER_LOCALE_CHANGE is fired after being undefined', function (done) { F2.init(); - F2.registerApps(appConfig,appManifest); + F2.registerApps(appConfig, appManifest); //locale was not defined, should be null expect(F2.getContainerLocale()).toBe(null); //listen for changes - F2.Events.on(F2.Constants.Events.CONTAINER_LOCALE_CHANGE,function(data){ + F2.Events.on(F2.Constants.Events.CONTAINER_LOCALE_CHANGE, function (data) { //now locale should be changed expect(F2.getContainerLocale() == 'de-de').toBeTruthy(); done(); }); //now change locale - F2.Events.emit(F2.Constants.Events.CONTAINER_LOCALE_CHANGE,{ + F2.Events.emit(F2.Constants.Events.CONTAINER_LOCALE_CHANGE, { locale: 'de-de' }); }); - it('AppManifest should support localeSupport property', function() { + it('AppManifest should support localeSupport property', function () { F2.init({ locale: 'en-us' }); - F2.registerApps(appConfig,appManifest); + F2.registerApps(appConfig, appManifest); expect(appConfig.localeSupport).toBeTruthy(); }); - it('AppManifest\'s localeSupport property should be an array', function() { + it("AppManifest's localeSupport property should be an array", function () { F2.init({ locale: 'en-us' }); - F2.registerApps(appConfig,appManifest); + F2.registerApps(appConfig, appManifest); expect(typeof appConfig.localeSupport == 'object').toBeTruthy(); }); - it('AppManifest\'s localeSupport property should have 2 items', function() { + it("AppManifest's localeSupport property should have 2 items", function () { F2.init({ locale: 'en-us' }); - F2.registerApps(appConfig,appManifest); + F2.registerApps(appConfig, appManifest); expect(appConfig.localeSupport.length == 2).toBeTruthy(); }); - it('app should receive localeSupport in appConfig', function(done) { + it('app should receive localeSupport in appConfig', function (done) { F2.init({ locale: 'en-us' }); @@ -388,13 +398,13 @@ describe('F2.init - internationalization', function() { localeSupport: ['en-us'] }); - F2.Events.on('com_openf2_examples_nodejs_helloworld-init', data => { + F2.Events.on('com_openf2_examples_nodejs_helloworld-init', (data) => { expect(data.testLocaleSupportFromAppConfig).toEqual(['en-us']); done(); }); }); - it('app should receive localeSupport in appConfig and have 2 items', function(done) { + it('app should receive localeSupport in appConfig and have 2 items', function (done) { F2.init({ locale: 'en-us' }); @@ -402,43 +412,47 @@ describe('F2.init - internationalization', function() { F2.registerApps({ appId: TEST_APP_ID3, manifestUrl: TEST_MANIFEST_URL3, - localeSupport: ['en-us','de-de'] + localeSupport: ['en-us', 'de-de'] }); - F2.Events.on('com_openf2_examples_nodejs_helloworld-init', data => { + F2.Events.on('com_openf2_examples_nodejs_helloworld-init', (data) => { expect(data.testLocaleSupportFromAppConfig.length).toBe(2); done(); }); }); - }); -describe('F2.registerApps - basic', function() { - - beforeEachReloadF2(function() { +describe('F2.registerApps - basic', function () { + beforeEachReloadF2(function () { spyOn(console, 'log').and.callThrough(); }); - it('should fail on empty parameters', function() { + it('should fail on empty parameters', function () { F2.init(); F2.registerApps(); - expect(console.log).toHaveBeenCalledWith('At least one AppConfig must be passed when calling F2.registerApps()'); + expect(console.log).toHaveBeenCalledWith( + 'At least one AppConfig must be passed when calling F2.registerApps()' + ); }); - it('should fail when passed an empty array', function() { + it('should fail when passed an empty array', function () { F2.init(); F2.registerApps([]); - expect(console.log).toHaveBeenCalledWith('At least one AppConfig must be passed when calling F2.registerApps()'); + expect(console.log).toHaveBeenCalledWith( + 'At least one AppConfig must be passed when calling F2.registerApps()' + ); }); - it('should fail when the parameters are invalid', function() { + it('should fail when the parameters are invalid', function () { F2.init(); F2.registerApps(null, []); expect(console.log).toHaveBeenCalled(); - expect(console.log).toHaveBeenCalledWith('At least one AppConfig must be passed when calling F2.registerApps()'); + expect(console.log).toHaveBeenCalledWith( + 'At least one AppConfig must be passed when calling F2.registerApps()' + ); }); - it('should fail when the AppConfig is invalid', function() { + it('should fail when the AppConfig is invalid', function () { F2.init(); F2.registerApps({}); expect(console.log).toHaveBeenCalledWith('"appId" missing from app object'); @@ -446,38 +460,50 @@ describe('F2.registerApps - basic', function() { F2.registerApps({ appId: TEST_APP_ID }); - expect(console.log).toHaveBeenCalledWith('"manifestUrl" missing from app object'); + expect(console.log).toHaveBeenCalledWith( + '"manifestUrl" missing from app object' + ); }); - it('should fail when the parameter lengths do not match', function() { + it('should fail when the parameter lengths do not match', function () { F2.init(); - F2.registerApps({ - appId: TEST_APP_ID, - manifestUrl: TEST_MANIFEST_URL - }, [{}, {}]); - expect(console.log).toHaveBeenCalledWith('The length of "apps" does not equal the length of "appManifests"'); + F2.registerApps( + { + appId: TEST_APP_ID, + manifestUrl: TEST_MANIFEST_URL + }, + [{}, {}] + ); + expect(console.log).toHaveBeenCalledWith( + 'The length of "apps" does not equal the length of "appManifests"' + ); }); - it('should not fail when a single appManifest is passed (#55)', function(done) { + it('should not fail when a single appManifest is passed (#55)', function (done) { F2.init(); - F2.registerApps({ - appId: TEST_APP_ID, - manifestUrl: TEST_MANIFEST_URL - }, { - apps: [{ - html: '
    ' - }] - }); + F2.registerApps( + { + appId: TEST_APP_ID, + manifestUrl: TEST_MANIFEST_URL + }, + { + apps: [ + { + html: '
    ' + } + ] + } + ); // wait long enough for registerApps to have failed - setTimeout(function() { + setTimeout(function () { // F2.log should not have run expect(console.log).not.toHaveBeenCalled(); done(); }, 1000); }); - it('should not modify the original AppConfig that was passed in', function() { + it('should not modify the original AppConfig that was passed in', function () { var appConfig = { appId: TEST_APP_ID, manifestUrl: TEST_MANIFEST_URL @@ -490,15 +516,14 @@ describe('F2.registerApps - basic', function() { }); }); -describe('F2.registerApps - xhr overrides', function() { - +describe('F2.registerApps - xhr overrides', function () { var appConfig = { appId: TEST_APP_ID, manifestUrl: TEST_MANIFEST_URL }; - it('should call xhr if it is defined', function() { - var spy = jasmine.createSpy('xhr') + it('should call xhr if it is defined', function () { + var spy = jasmine.createSpy('xhr'); F2.init({ xhr: spy @@ -508,9 +533,9 @@ describe('F2.registerApps - xhr overrides', function() { expect(spy).toHaveBeenCalled(); }); - it('should pass 5 parameters to xhr', function(done) { + it('should pass 5 parameters to xhr', function (done) { F2.init({ - xhr: function(url, appConfigs, success, error, complete) { + xhr: function (url, appConfigs, success, error, complete) { expect(arguments.length).toBe(5); expect(typeof url).toBe('string'); expect(appConfigs instanceof Array).toBeTruthy(); @@ -523,7 +548,7 @@ describe('F2.registerApps - xhr overrides', function() { F2.registerApps(appConfig); }); - it('should call xhr.dataType', function() { + it('should call xhr.dataType', function () { var spy = jasmine.createSpy('dataType').and.returnValue('jsonp'); F2.init({ xhr: { @@ -535,18 +560,18 @@ describe('F2.registerApps - xhr overrides', function() { expect(spy).toHaveBeenCalled(); }); - it('should throw an exception when xhr.dataType does not return a string', function() { - expect(function() { + it('should throw an exception when xhr.dataType does not return a string', function () { + expect(function () { F2.init({ xhr: { - dataType: function() {} + dataType: function () {} } }); F2.registerApps(appConfig); }).toThrow('ContainerConfig.xhr.dataType should return a string'); }); - it('should call xhr.type', function() { + it('should call xhr.type', function () { var spy = jasmine.createSpy('xhrType').and.returnValue('GET'); F2.init({ xhr: { @@ -557,18 +582,18 @@ describe('F2.registerApps - xhr overrides', function() { expect(spy).toHaveBeenCalled(); }); - it('should throw an exception when xhr.type does not return a string', function() { - expect(function() { + it('should throw an exception when xhr.type does not return a string', function () { + expect(function () { F2.init({ xhr: { - type: function() {} + type: function () {} } }); F2.registerApps(appConfig); }).toThrow('ContainerConfig.xhr.type should return a string'); }); - it('should call xhr.url', function() { + it('should call xhr.url', function () { var spy = jasmine.createSpy('url').and.returnValue(TEST_MANIFEST_URL); F2.init({ xhr: { @@ -580,30 +605,29 @@ describe('F2.registerApps - xhr overrides', function() { expect(spy).toHaveBeenCalled(); }); - it('should throw an exception when xhr.url does not return a string', function() { - expect(function() { + it('should throw an exception when xhr.url does not return a string', function () { + expect(function () { F2.init({ xhr: { - url: function() {} + url: function () {} } }); F2.registerApps(appConfig); }).toThrow('ContainerConfig.xhr.url should return a string'); }); - it('should use POST when the domain of the container matches that of the app (#41, #59)', function(done) { - - F2.log = function(isPost) { + it('should use POST when the domain of the container matches that of the app (#41, #59)', function (done) { + F2.log = function (isPost) { expect(isPost).toBeTruthy(); done(); }; F2.init({ xhr: { - dataType: function(url) { + dataType: function (url) { return F2.isLocalRequest(url) ? 'json' : 'jsonp'; }, - type: function(url) { + type: function (url) { return F2.isLocalRequest(url) ? 'POST' : 'GET'; } } @@ -615,19 +639,18 @@ describe('F2.registerApps - xhr overrides', function() { }); }); - it('should use GET when the domain of the container does not match that of the app (#41, #59)', function(done) { - - F2.log = function(isPost) { + it('should use GET when the domain of the container does not match that of the app (#41, #59)', function (done) { + F2.log = function (isPost) { expect(isPost).toBeFalsy(); done(); }; F2.init({ xhr: { - dataType: function(url) { + dataType: function (url) { return F2.isLocalRequest(url) ? 'json' : 'jsonp'; }, - type: function(url) { + type: function (url) { return F2.isLocalRequest(url) ? 'POST' : 'GET'; } } @@ -640,8 +663,7 @@ describe('F2.registerApps - xhr overrides', function() { }); }); -describe('F2.registerApps - rendering', function() { - +describe('F2.registerApps - rendering', function () { var appConfig = { appId: TEST_APP_ID, manifestUrl: TEST_MANIFEST_URL @@ -650,55 +672,75 @@ describe('F2.registerApps - rendering', function() { scripts: [], styles: [], inlineScripts: [], - apps: [{ - html: '
    Testing
    ' - }] + apps: [ + { + html: '
    Testing
    ' + } + ] }; - var appClass = 'http://localhost:8080/tests/apps/com_openf2_examples_nodejs_helloworld/appclass.js'; + var appClass = + 'http://localhost:8080/tests/apps/com_openf2_examples_nodejs_helloworld/appclass.js'; - it('should eval AppManifest.inlineScripts when AppManifest.scripts are defined', function(done) { - F2.inlineScriptsEvaluated = function() { + it('should eval AppManifest.inlineScripts when AppManifest.scripts are defined', function (done) { + F2.inlineScriptsEvaluated = function () { expect(true).toBeTruthy(); // the fact that we made it here is success done(); }; F2.init(); - F2.registerApps([{ - appId: TEST_APP_ID, - manifestUrl: TEST_MANIFEST_URL - }], [{ - 'inlineScripts': ['(function(){F2.inlineScriptsEvaluated();})()'], - 'scripts': [appClass], - 'apps': [{ - 'html': '
    Testing
    ' - }] - }]); + F2.registerApps( + [ + { + appId: TEST_APP_ID, + manifestUrl: TEST_MANIFEST_URL + } + ], + [ + { + inlineScripts: ['(function(){F2.inlineScriptsEvaluated();})()'], + scripts: [appClass], + apps: [ + { + html: '
    Testing
    ' + } + ] + } + ] + ); }); - it('should eval AppManifest.inlineScripts when AppManifest.scripts are not defined', function(done) { - F2.inlineScriptsEvaluated = function() { + it('should eval AppManifest.inlineScripts when AppManifest.scripts are not defined', function (done) { + F2.inlineScriptsEvaluated = function () { expect(true).toBeTruthy(); // the fact that we made it here is success done(); }; F2.init(); - F2.registerApps([{ - appId: TEST_APP_ID, - manifestUrl: TEST_MANIFEST_URL - }], [{ - 'inlineScripts': ['(function(){F2.inlineScriptsEvaluated();})()'], - 'apps': [{ - 'html': '
    Testing
    ' - }] - }]); + F2.registerApps( + [ + { + appId: TEST_APP_ID, + manifestUrl: TEST_MANIFEST_URL + } + ], + [ + { + inlineScripts: ['(function(){F2.inlineScriptsEvaluated();})()'], + apps: [ + { + html: '
    Testing
    ' + } + ] + } + ] + ); }); - it('should add cache buster to AppManifest.scripts when F2.ContainerConfig.debugMode is true', function(done) { - + it('should add cache buster to AppManifest.scripts when F2.ContainerConfig.debugMode is true', function (done) { var scriptGuid = F2.guid(); var scriptRegex = new RegExp('guid=' + scriptGuid); - F2.checkCacheBuster = function() { + F2.checkCacheBuster = function () { var bustedCache = false; var scripts = document.querySelectorAll('script'); @@ -716,24 +758,32 @@ describe('F2.registerApps - rendering', function() { F2.init({ debugMode: true }); - F2.registerApps([{ - appId: TEST_APP_ID, - manifestUrl: TEST_MANIFEST_URL - }], [{ - 'inlineScripts': ['(function() {F2.checkCacheBuster();})()'], - 'scripts': [appClass + '?guid=' + scriptGuid], - 'apps': [{ - 'html': '
    Testing
    ' - }] - }]); + F2.registerApps( + [ + { + appId: TEST_APP_ID, + manifestUrl: TEST_MANIFEST_URL + } + ], + [ + { + inlineScripts: ['(function() {F2.checkCacheBuster();})()'], + scripts: [appClass + '?guid=' + scriptGuid], + apps: [ + { + html: '
    Testing
    ' + } + ] + } + ] + ); }); - it('should not add cache buster to AppManifest.scripts when F2.ContainerConfig.debugMode is undefined or false', function(done) { - + it('should not add cache buster to AppManifest.scripts when F2.ContainerConfig.debugMode is undefined or false', function (done) { var scriptGuid = F2.guid(); var scriptRegex = new RegExp('guid=' + scriptGuid); - F2.checkCacheBuster = function() { + F2.checkCacheBuster = function () { var bustedCache = false; var scripts = document.querySelectorAll('script'); @@ -749,19 +799,28 @@ describe('F2.registerApps - rendering', function() { }; F2.init(); - F2.registerApps([{ - appId: TEST_APP_ID, - manifestUrl: TEST_MANIFEST_URL - }], [{ - 'inlineScripts': ['(function() {F2.checkCacheBuster();})()'], - 'scripts': [appClass + '?guid=' + scriptGuid], - 'apps': [{ - 'html': '
    Testing
    ' - }] - }]); + F2.registerApps( + [ + { + appId: TEST_APP_ID, + manifestUrl: TEST_MANIFEST_URL + } + ], + [ + { + inlineScripts: ['(function() {F2.checkCacheBuster();})()'], + scripts: [appClass + '?guid=' + scriptGuid], + apps: [ + { + html: '
    Testing
    ' + } + ] + } + ] + ); }); - it('should always init an appclass', function(done) { + it('should always init an appclass', function (done) { var appsInitialized = 0; F2.init(); @@ -793,30 +852,37 @@ describe('F2.registerApps - rendering', function() { ]); }, 10000); - it('should load and execute scripts in order', function(done) { - + it('should load and execute scripts in order', function (done) { F2.init(); //notify when dependencies have been loaded - F2.Events.on('com_openf2_examples_nodejs_helloworld-init', data => { + F2.Events.on('com_openf2_examples_nodejs_helloworld-init', (data) => { console.log('init event received'); expect(data.HightChartsIsDefined).toBeTruthy(); done(); }); //load 1 app with 2 script files, the 2nd one depends on Highcharts - F2.registerApps([{ - appId: TEST_APP_ID3, - manifestUrl: TEST_MANIFEST_URL3 - }], [{ - 'scripts': [ - 'http://localhost:8080/tests/apps/com_openf2_examples_nodejs_helloworld/highcharts-4.0.3.js', - 'http://localhost:8080/tests/apps/com_openf2_examples_nodejs_helloworld/appclass.js' + F2.registerApps( + [ + { + appId: TEST_APP_ID3, + manifestUrl: TEST_MANIFEST_URL3 + } ], - 'apps': [{ - 'html': '
    Testing
    ' - }] - }]); + [ + { + scripts: [ + 'http://localhost:8080/tests/apps/com_openf2_examples_nodejs_helloworld/highcharts-4.0.3.js', + 'http://localhost:8080/tests/apps/com_openf2_examples_nodejs_helloworld/appclass.js' + ], + apps: [ + { + html: '
    Testing
    ' + } + ] + } + ] + ); }); - }); diff --git a/tests/spec/spec-helpers.js b/tests/spec/spec-helpers.js index 2c73c1ae..6356b08d 100644 --- a/tests/spec/spec-helpers.js +++ b/tests/spec/spec-helpers.js @@ -3,17 +3,17 @@ var TEST_MANIFEST_URL = 'http://localhost:8080/F2/apps/test/hello-world', TEST_MANIFEST_URL2 = 'http://localhost:8080/F2/apps/test/market-news', TEST_APP_ID2 = 'com_openf2_examples_csharp_marketnews', TEST_MANIFEST_URL_HTTP_POST = 'http://localhost:3000/F2/apps/test/http-post', - TEST_MANIFEST_URL_HTTP_XDOMAIN = 'http://localhost:8081/F2/apps/test/http-post', + TEST_MANIFEST_URL_HTTP_XDOMAIN = + 'http://localhost:8081/F2/apps/test/http-post', TEST_MANIFEST_URL3 = 'http://localhost:8080/F2/apps/test/hello-world-node', TEST_APP_ID3 = 'com_openf2_examples_nodejs_helloworld', TEST_PRELOADED_APP_ID = 'com_openf2_tests_preloaded', - TEST_PRELOADED_MANIFEST_URL = 'http://localhost:8080/tests/apps/com_openf2_tests_preloaded/manifest.js' -; - + TEST_PRELOADED_MANIFEST_URL = + 'http://localhost:8080/tests/apps/com_openf2_tests_preloaded/manifest.js'; /** * Clean out the test fixture before each spec */ -beforeEach(function() { +beforeEach(function () { var fixture = document.getElementById('test-fixture'); while (fixture.firstChild) { fixture.removeChild(fixture.firstChild); @@ -23,28 +23,28 @@ beforeEach(function() { /** * Reload F2 before each spec */ -var beforeEachReloadF2 = function(callback) { - beforeEach(function(done) { - console.info('beforeEachReloadF2: start') +var beforeEachReloadF2 = function (callback) { + beforeEach(function (done) { + console.info('beforeEachReloadF2: start'); window.F2 = null; - var head = (document.head || document.getElementsByTagName('head')[0]); + var head = document.head || document.getElementsByTagName('head')[0]; var script = document.createElement('script'); head.appendChild(script); script.async = false; - script.onerror = function(e) { + script.onerror = function (e) { console.error('F2 FAILED TO LOAD: ' + e.message); throw new Error('F2 FAILED TO LOAD: ' + e.message); - } - script.onload = script.onreadystatechange = function(e) { + }; + script.onload = script.onreadystatechange = function (e) { script = null; if (!window.F2) { - console.error('F2 WAS NOT PROPERLY LOADED') + console.error('F2 WAS NOT PROPERLY LOADED'); throw new Error('F2 WAS NOT PROPERLY LOADED'); } - console.info('beforeEachReloadF2: end') + console.info('beforeEachReloadF2: end'); callback && callback(); done(); - } + }; script.src = '../dist/f2.js'; }); }; @@ -55,14 +55,14 @@ beforeEachReloadF2(); /** * Delete all test apps after each spec */ -afterEach(function(done) { +afterEach(function (done) { var scripts = Array.from(document.querySelectorAll('script[src]') || []); - ([].concat(scripts)).forEach(s => { + [].concat(scripts).forEach((s) => { if (/tests\/apps/.test(s.src)) { s.parentNode.removeChild(s); } }); done(); -}); \ No newline at end of file +}); diff --git a/tests/spec/utils-spec.js b/tests/spec/utils-spec.js index 5c2260a3..e73b58ec 100644 --- a/tests/spec/utils-spec.js +++ b/tests/spec/utils-spec.js @@ -1,39 +1,41 @@ -describe('F2 utility methods', function() { - - it('F2.version should return a version number (SemVer as String)', function() { +describe('F2 utility methods', function () { + it('F2.version should return a version number (SemVer as String)', function () { //https://github.com/sindresorhus/semver-regex - var testVersion = /\bv?(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?\b/ig.test(F2.version()); + var testVersion = + /\bv?(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?\b/gi.test( + F2.version() + ); expect(testVersion).toBeTruthy(); }); - it('F2.guid should not produce equal guids', function() { + it('F2.guid should not produce equal guids', function () { expect(F2.guid()).not.toMatch(F2.guid()); }); - it('F2.parse should parse a json object', function() { + it('F2.parse should parse a json object', function () { expect(F2.parse('{"foo":"bar"}')).toEqual({ foo: 'bar' }); }); - it('F2.stringify should convert an object to a json string', function() { + it('F2.stringify should convert an object to a json string', function () { expect(F2.stringify({ foo: 'bar' })).toMatch('{"foo":"bar"}'); }); - describe('F2.extend', function() { - it('should ignore extra F2 namespace', function() { + describe('F2.extend', function () { + it('should ignore extra F2 namespace', function () { F2.extend('F2.TestObj', { foo: 'bar' }); - expect(F2.TestObj).toEqual({ foo: 'bar' }) + expect(F2.TestObj).toEqual({ foo: 'bar' }); }); - it('should not overwrite properties by default', function() { + it('should not overwrite properties by default', function () { F2.extend('F2.TestObj', { foo: 'bar' }); F2.extend('F2.TestObj', { foo: 'foo' }); expect(F2.TestObj).toEqual({ foo: 'bar' }); }); - it('should overwrite properties', function() { + it('should overwrite properties', function () { F2.extend('F2.TestObj', { foo: 'bar' }); F2.extend('F2.TestObj', { foo: 'foo' }, true); expect(F2.TestObj).toEqual({ foo: 'foo' }); }); }); -}); \ No newline at end of file +}); diff --git a/webpack.base.js b/webpack.base.js index 9fee9896..27c872c9 100644 --- a/webpack.base.js +++ b/webpack.base.js @@ -51,7 +51,7 @@ in the terms and conditions related to the specific Third Party Material, if any // Examine all modules maxModules: Infinity, // Display bailout reasons - optimizationBailout: true, + optimizationBailout: true }) ] };