mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29a7bc4c81 | ||
|
|
e21e993729 | ||
|
|
0af1a85442 | ||
|
|
10e7bb97ee | ||
|
|
c319bbc5f3 | ||
|
|
9e42f70e5f | ||
|
|
ff47152187 | ||
|
|
94b6ce5ca0 | ||
|
|
8e1020f134 | ||
|
|
be7a0fef41 | ||
|
|
9fe7bb7362 | ||
|
|
5d4b121ac1 | ||
|
|
cb424a5f78 | ||
|
|
88ab9d0756 | ||
|
|
29f4fd40ed | ||
|
|
b7f7ba06b9 | ||
|
|
94f8ac8d1d | ||
|
|
72ab38bd2f | ||
|
|
b3d5466131 | ||
|
|
bafbd8f1b6 | ||
|
|
8c1ce03183 | ||
|
|
97490b272f | ||
|
|
2afbe9514b | ||
|
|
603be609a1 | ||
|
|
4590be7b65 | ||
|
|
097a2f6582 | ||
|
|
f818e5bc51 | ||
|
|
34cf8fc43c | ||
|
|
7712765c3a | ||
|
|
eaf1304eda | ||
|
|
f97f32df0f | ||
|
|
79eecd6db4 | ||
|
|
5a75d8e788 | ||
|
|
42e58fb73a | ||
|
|
dba996b2c4 |
@@ -1 +0,0 @@
|
||||
repo_token: zGjBVmujNT7iaxo98dhB7EGcjLaMWxIkX
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.coveralls.yml
|
||||
.DS_Store
|
||||
*.custom.*
|
||||
*.template.*
|
||||
|
||||
@@ -5,9 +5,8 @@ node_js:
|
||||
- "0.10"
|
||||
env:
|
||||
global:
|
||||
- BIN="node" BUILD=false COMPAT=false MAKE=false OPTION="" SAUCE_LABS=false
|
||||
- SAUCE_USERNAME="lodash"
|
||||
- secure: "aFxaPI4NvlZHgXvfmNtUlYCIeiVpC4QzkdevGHc2FK27BJLnNTKNno9sBhaygURbQ83bYzfQ+fe8SMIzE7aLramAGILrT4DiWqfO+ihuB3EK1cahCbB6OionbIUI27Xzy+YukO+5lQmMP/dpVlwhIfR3qxmN4m7wXI+ExEemjZg="
|
||||
- BIN="node" BUILD=false COMPAT=false MAKE=false OPTION="" SAUCE_LABS=false SAUCE_USERNAME="lodash"
|
||||
- secure: "tg1JFsIFnxzLaTboFPOnm+aJCuMm5+JdhLlESlqg9x3fwro++7KCnwHKLNovhchaPe4otC43ZMB/nfWhDnDm11dKbm/V6HlTkED+dadTsaLxVDg6J+7yK41QhokBPJOxLV78iDaNaAQVYEirAgZ0yn8kFubxmNKV+bpCGQNc9yU="
|
||||
matrix:
|
||||
- BUILD="compat"
|
||||
- BUILD="modern"
|
||||
@@ -55,7 +54,7 @@ before_install:
|
||||
- "([ $BUILD == 'legacy' ] || [ $BUILD == 'mobile' ] || [ $BUILD == 'modern' ]) && MAKE=true || true"
|
||||
- "([ $BUILD == 'compat' ] || [ $BUILD == 'legacy' ]) && COMPAT=true || true"
|
||||
- "[ $SAUCE_LABS != false ] && npm i ecstatic@\"~0.4.0\" request@\"~2.27.0\" sauce-tunnel@\"~1.1.0\" || true"
|
||||
- "[ $BIN == 'istanbul' ] && npm i -g coveralls@\"~2.3.0\" istanbul@\"~0.1.0\" || true"
|
||||
- "[ $BIN == 'istanbul' ] && npm i -g coveralls@\"~2.5.0\" istanbul@\"~0.1.0\" || true"
|
||||
- "[ $BIN == 'narwhal' ] && wget https://github.com/280north/narwhal/archive/v0.3.2.zip && sudo unzip v0.3.2 -d /opt/ && rm v0.3.2.zip || true"
|
||||
- "[ $BIN == 'narwhal' ] && sudo ln -s /opt/narwhal-0.3.2/bin/narwhal /usr/local/bin/narwhal && sudo chmod +x /usr/local/bin/narwhal || true"
|
||||
- "[ $BIN == 'rhino' ] && sudo mkdir /opt/rhino-1.7R5 && sudo wget -O /opt/rhino-1.7R5/js.jar https://oss.sonatype.org/content/repositories/snapshots/org/mozilla/rhino/1.7R5-SNAPSHOT/rhino-1.7R5-20120629.144839-4.jar || true"
|
||||
|
||||
162
README.md
162
README.md
@@ -1,105 +1,34 @@
|
||||
# Lo-Dash v2.4.0
|
||||
A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features).
|
||||
# Lo-Dash v2.4.2
|
||||
A utility library delivering consistency, [customization](https://lodash.com/custom-builds), [performance](https://lodash.com/benchmarks), & [extras](https://lodash.com/#features).
|
||||
|
||||
## Download
|
||||
|
||||
Check out our [wiki]([https://github.com/lodash/lodash/wiki/build-differences]) for details over the differences between builds.
|
||||
|
||||
* Modern builds perfect for newer browsers/environments:<br>
|
||||
[Development](https://raw.github.com/lodash/lodash/2.4.0/dist/lodash.js) &
|
||||
[Production](https://raw.github.com/lodash/lodash/2.4.0/dist/lodash.min.js)
|
||||
[Development](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.js) &
|
||||
[Production](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.min.js)
|
||||
|
||||
* Compatibility builds for older environment support too:<br>
|
||||
[Development](https://raw.github.com/lodash/lodash/2.4.0/dist/lodash.compat.js) &
|
||||
[Production](https://raw.github.com/lodash/lodash/2.4.0/dist/lodash.compat.min.js)
|
||||
[Development](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.compat.js) &
|
||||
[Production](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.compat.min.js)
|
||||
|
||||
* Underscore builds to use as a drop-in replacement:<br>
|
||||
[Development](https://raw.github.com/lodash/lodash/2.4.0/dist/lodash.underscore.js) &
|
||||
[Production](https://raw.github.com/lodash/lodash/2.4.0/dist/lodash.underscore.min.js)
|
||||
[Development](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.underscore.js) &
|
||||
[Production](https://raw.github.com/lodash/lodash/2.4.2/dist/lodash.underscore.min.js)
|
||||
|
||||
CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed.
|
||||
CDN copies are available on [cdnjs](http://cdnjs.com/libraries/lodash.js/) & [jsDelivr](http://www.jsdelivr.com/#!lodash). For smaller file sizes, create [custom builds](https://lodash.com/custom-builds) with only the features needed.
|
||||
|
||||
Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-es6](https://github.com/lodash/lodash-es6), [lodash-node](https://npmjs.org/package/lodash-node), & [npm packages](https://npmjs.org/browse/keyword/lodash-modularized) per method.
|
||||
|
||||
## Dive in
|
||||
|
||||
There’s plenty of **[documentation](http://lodash.com/docs)**, [unit tests](http://lodash.com/tests), & [benchmarks](http://lodash.com/benchmarks).<br>
|
||||
There’s plenty of **[documentation](https://lodash.com/docs)**, [unit tests](https://lodash.com/tests), & [benchmarks](https://lodash.com/benchmarks).<br>
|
||||
Check out <a href="http://devdocs.io/lodash/">DevDocs</a> as a fast, organized, & searchable interface for our documentation.
|
||||
|
||||
The full changelog for this release is available on our [wiki](https://github.com/lodash/lodash/wiki/Changelog).<br>
|
||||
A list of upcoming features is available on our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap).
|
||||
|
||||
## Features *not* in Underscore
|
||||
|
||||
* AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.)
|
||||
* [_(…)](http://lodash.com/docs#_) supports intuitive chaining
|
||||
* [_.at](http://lodash.com/docs#at) for cherry-picking collection values
|
||||
* [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods
|
||||
* [_.clone](http://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects
|
||||
* [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects
|
||||
* [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex`
|
||||
* [_.constant](http://lodash.com/docs#constant) and [_.property](http://lodash.com/docs#property) function generators for composing functions
|
||||
* [_.create](http://lodash.com/docs#create) for easier object inheritance
|
||||
* [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins
|
||||
* [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions
|
||||
* [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept additional `options` for more control
|
||||
* [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys
|
||||
* [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early
|
||||
* [_.forIn](http://lodash.com/docs#forIn) for iterating own & inherited properties
|
||||
* [_.forOwn](http://lodash.com/docs#forOwn) for iterating own properties
|
||||
* [_.isPlainObject](http://lodash.com/docs#isPlainObject) for checking if values are created by `Object`
|
||||
* [_.mapValues](http://lodash.com/docs#mapValues) for [mapping](http://lodash.com/docs#map) values to an object
|
||||
* [_.memoize](http://lodash.com/docs#memoize) exposes the `cache` of memoized functions
|
||||
* [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend)
|
||||
* [_.noop](http://lodash.com/docs#noop) for function placeholders
|
||||
* [_.now](http://lodash.com/docs#now) as a cross-browser `Date.now` alternative
|
||||
* [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior
|
||||
* [_.pull](http://lodash.com/docs#pull) & [_.remove](http://lodash.com/docs#remove) for mutating arrays
|
||||
* [_.random](http://lodash.com/docs#random) supports returning floating-point numbers
|
||||
* [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking
|
||||
* [_.sortBy](http://lodash.com/docs#sortBy) supports sorting by multiple properties
|
||||
* [_.support](http://lodash.com/docs#support) for flagging environment features
|
||||
* [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals)
|
||||
* [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects
|
||||
* [_.where](http://lodash.com/docs#where) supports deep object comparisons
|
||||
* [_.xor](http://lodash.com/docs#xor) as a companion to [_.difference](http://lodash.com/docs#difference), [_.intersection](http://lodash.com/docs#intersection), & [_.union](http://lodash.com/docs#union)
|
||||
* [_.zip](http://lodash.com/docs#zip) is capable of unzipping values
|
||||
* [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), &
|
||||
[more](http://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks
|
||||
* [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), &
|
||||
[more](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings
|
||||
* [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), &
|
||||
[more](http://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands
|
||||
* [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), &
|
||||
[more](http://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight") right-associative methods
|
||||
|
||||
## Resources
|
||||
|
||||
* Podcasts
|
||||
- [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/)
|
||||
|
||||
* Posts
|
||||
- [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/)
|
||||
- [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/)
|
||||
|
||||
* Videos
|
||||
- [Introduction](https://vimeo.com/44154599)
|
||||
- [Origins](https://vimeo.com/44154600)
|
||||
- [Optimizations & builds](https://vimeo.com/44154601)
|
||||
- [Native method use](https://vimeo.com/48576012)
|
||||
- [Testing](https://vimeo.com/45865290)
|
||||
- [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk)
|
||||
|
||||
A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources).
|
||||
|
||||
## Support
|
||||
|
||||
Tested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25~17, Safari 3-7, Node.js 0.6.21~0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.<br>
|
||||
Automated browser test results [are available](https://saucelabs.com/u/lodash) as well as [Travis CI](https://travis-ci.org/) builds for [lodash](https://travis-ci.org/lodash/lodash/), [lodash-cli](https://travis-ci.org/lodash/lodash-cli/), [lodash-amd](https://travis-ci.org/lodash/lodash-amd/), [lodash-node](https://travis-ci.org/lodash/lodash-node/), & [grunt-lodash](https://travis-ci.org/lodash/grunt-lodash).
|
||||
|
||||
Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.<br>
|
||||
[](https://saucelabs.com/ "Sauce Labs: Selenium Testing & More")
|
||||
|
||||
## Installation & usage
|
||||
|
||||
In browsers:
|
||||
@@ -148,14 +77,69 @@ require({
|
||||
});
|
||||
```
|
||||
|
||||
## Author
|
||||
## Resources
|
||||
|
||||
| [](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
|
||||
|---|
|
||||
| [John-David Dalton](http://allyoucanleet.com/) |
|
||||
* Podcasts
|
||||
- [JavaScript Jabber](http://javascriptjabber.com/079-jsj-lo-dash-with-john-david-dalton/)
|
||||
|
||||
## Contributors
|
||||
* Posts
|
||||
- [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/)
|
||||
- [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/)
|
||||
|
||||
| [](https://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [](https://twitter.com/mathias "Follow @mathias on Twitter") |
|
||||
|---|---|---|
|
||||
| [Blaine Bublitz](http://www.iceddev.com/) | [Kit Cambridge](http://kitcambridge.be/) | [Mathias Bynens](http://mathiasbynens.be/) |
|
||||
* Videos
|
||||
- [Introduction](https://vimeo.com/44154599)
|
||||
- [Origins](https://vimeo.com/44154600)
|
||||
- [Optimizations & builds](https://vimeo.com/44154601)
|
||||
- [Native method use](https://vimeo.com/48576012)
|
||||
- [Testing](https://vimeo.com/45865290)
|
||||
- [CascadiaJS ’12](http://www.youtube.com/watch?v=dpPy4f_SeEk)
|
||||
|
||||
A list of other community created podcasts, posts, & videos is available on our [wiki](https://github.com/lodash/lodash/wiki/Resources).
|
||||
|
||||
## Features
|
||||
|
||||
* AMD loader support ([curl](https://github.com/cujojs/curl), [dojo](http://dojotoolkit.org/), [requirejs](http://requirejs.org/), etc.)
|
||||
* [_(…)](https://lodash.com/docs#_) supports intuitive chaining
|
||||
* [_.at](https://lodash.com/docs#at) for cherry-picking collection values
|
||||
* [_.bindKey](https://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods
|
||||
* [_.clone](https://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects
|
||||
* [_.cloneDeep](https://lodash.com/docs#cloneDeep) for deep cloning arrays & objects
|
||||
* [_.constant](https://lodash.com/docs#constant) & [_.property](https://lodash.com/docs#property) function generators for composing functions
|
||||
* [_.contains](https://lodash.com/docs#contains) accepts a `fromIndex`
|
||||
* [_.create](https://lodash.com/docs#create) for easier object inheritance
|
||||
* [_.createCallback](https://lodash.com/docs#createCallback) for extending callbacks in methods & mixins
|
||||
* [_.curry](https://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions
|
||||
* [_.debounce](https://lodash.com/docs#debounce) & [_.throttle](https://lodash.com/docs#throttle) accept additional `options` for more control
|
||||
* [_.findIndex](https://lodash.com/docs#findIndex) & [_.findKey](https://lodash.com/docs#findKey) for finding indexes & keys
|
||||
* [_.forEach](https://lodash.com/docs#forEach) is chainable & supports exiting early
|
||||
* [_.forIn](https://lodash.com/docs#forIn) for iterating own & inherited properties
|
||||
* [_.forOwn](https://lodash.com/docs#forOwn) for iterating own properties
|
||||
* [_.isPlainObject](https://lodash.com/docs#isPlainObject) for checking if values are created by `Object`
|
||||
* [_.mapValues](https://lodash.com/docs#mapValues) for [mapping](https://lodash.com/docs#map) values to an object
|
||||
* [_.memoize](https://lodash.com/docs#memoize) exposes the `cache` of memoized functions
|
||||
* [_.merge](https://lodash.com/docs#merge) for a deep [_.extend](https://lodash.com/docs#extend)
|
||||
* [_.noop](https://lodash.com/docs#noop) for function placeholders
|
||||
* [_.now](https://lodash.com/docs#now) as a cross-browser `Date.now` alternative
|
||||
* [_.parseInt](https://lodash.com/docs#parseInt) for consistent behavior
|
||||
* [_.pull](https://lodash.com/docs#pull) & [_.remove](https://lodash.com/docs#remove) for mutating arrays
|
||||
* [_.random](https://lodash.com/docs#random) supports returning floating-point numbers
|
||||
* [_.runInContext](https://lodash.com/docs#runInContext) for easier mocking
|
||||
* [_.sortBy](https://lodash.com/docs#sortBy) supports sorting by multiple properties
|
||||
* [_.support](https://lodash.com/docs#support) for flagging environment features
|
||||
* [_.template](https://lodash.com/docs#template) supports [*“imports”*](https://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-literals-string-literals)
|
||||
* [_.transform](https://lodash.com/docs#transform) as a powerful alternative to [_.reduce](https://lodash.com/docs#reduce) for transforming objects
|
||||
* [_.where](https://lodash.com/docs#where) supports deep object comparisons
|
||||
* [_.xor](https://lodash.com/docs#xor) as a companion to [_.difference](https://lodash.com/docs#difference), [_.intersection](https://lodash.com/docs#intersection), & [_.union](https://lodash.com/docs#union)
|
||||
* [_.zip](https://lodash.com/docs#zip) is capable of unzipping values
|
||||
* [_.omit](https://lodash.com/docs#omit), [_.pick](https://lodash.com/docs#pick), &
|
||||
[more](https://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks
|
||||
* [_.contains](https://lodash.com/docs#contains), [_.toArray](https://lodash.com/docs#toArray), &
|
||||
[more](https://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings
|
||||
* [_.filter](https://lodash.com/docs#filter), [_.map](https://lodash.com/docs#map), &
|
||||
[more](https://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* & *“_.where”* shorthands
|
||||
* [_.findLast](https://lodash.com/docs#findLast), [_.findLastIndex](https://lodash.com/docs#findLastIndex), &
|
||||
[more](https://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight, _.partialRight") right-associative methods
|
||||
|
||||
## Support
|
||||
|
||||
Tested in Chrome 5~31, Firefox 2~25, IE 6-11, Opera 9.25-17, Safari 3-7, Node.js 0.6.21-0.10.22, Narwhal 0.3.2, PhantomJS 1.9.2, RingoJS 0.9, & Rhino 1.7RC5.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"version": "2.4.0",
|
||||
"version": "2.4.2",
|
||||
"main": "dist/lodash.compat.js",
|
||||
"ignore": [
|
||||
".*",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"repo": "lodash/lodash",
|
||||
"version": "2.4.0",
|
||||
"version": "2.4.2",
|
||||
"description": "A utility library delivering consistency, customization, performance, & extras.",
|
||||
"license": "MIT",
|
||||
"keywords": ["amd", "browser", "client", "functional", "server", "util"],
|
||||
|
||||
138
dist/lodash.compat.js
vendored
138
dist/lodash.compat.js
vendored
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.4.0 (Custom Build) <http://lodash.com/>
|
||||
* Lo-Dash 2.4.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <http://lodash.com/license>
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
;(function() {
|
||||
|
||||
@@ -518,30 +518,31 @@
|
||||
clearTimeout = context.clearTimeout,
|
||||
floor = Math.floor,
|
||||
fnToString = Function.prototype.toString,
|
||||
getPrototypeOf = reNative.test(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
|
||||
getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
|
||||
hasOwnProperty = objectProto.hasOwnProperty,
|
||||
push = arrayRef.push,
|
||||
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
||||
setTimeout = context.setTimeout,
|
||||
splice = arrayRef.splice;
|
||||
splice = arrayRef.splice,
|
||||
unshift = arrayRef.unshift;
|
||||
|
||||
/** Used to set meta data on functions */
|
||||
var defineProperty = (function() {
|
||||
// IE 8 only accepts DOM elements
|
||||
try {
|
||||
var o = {},
|
||||
func = reNative.test(func = Object.defineProperty) && func,
|
||||
func = isNative(func = Object.defineProperty) && func,
|
||||
result = func(o, o, o) && func;
|
||||
} catch(e) { }
|
||||
return result;
|
||||
}());
|
||||
|
||||
/* Native method shortcuts for methods with the same name as other `lodash` methods */
|
||||
var nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
|
||||
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
|
||||
var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate,
|
||||
nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray,
|
||||
nativeIsFinite = context.isFinite,
|
||||
nativeIsNaN = context.isNaN,
|
||||
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeMax = Math.max,
|
||||
nativeMin = Math.min,
|
||||
nativeParseInt = context.parseInt,
|
||||
@@ -729,7 +730,7 @@
|
||||
* @memberOf _.support
|
||||
* @type boolean
|
||||
*/
|
||||
support.funcDecomp = !reNative.test(context.WinRTError) && reThis.test(runInContext);
|
||||
support.funcDecomp = !isNative(context.WinRTError) && reThis.test(runInContext);
|
||||
|
||||
/**
|
||||
* Detect if `Function#name` is supported (all but IE).
|
||||
@@ -987,7 +988,10 @@
|
||||
// `Function#bind` spec
|
||||
// http://es5.github.io/#x15.3.4.5
|
||||
if (partialArgs) {
|
||||
var args = partialArgs.slice();
|
||||
// avoid `arguments` object deoptimizations by using `slice` instead
|
||||
// of `Array.prototype.slice.call` and not assigning `arguments` to a
|
||||
// variable as a ternary expression
|
||||
var args = slice(partialArgs);
|
||||
push.apply(args, arguments);
|
||||
}
|
||||
// mimic the constructor's `return` behavior
|
||||
@@ -1204,7 +1208,7 @@
|
||||
function bound() {
|
||||
var thisBinding = isBind ? thisArg : this;
|
||||
if (partialArgs) {
|
||||
var args = partialArgs.slice();
|
||||
var args = slice(partialArgs);
|
||||
push.apply(args, arguments);
|
||||
}
|
||||
if (partialRightArgs || isCurry) {
|
||||
@@ -1429,51 +1433,54 @@
|
||||
|
||||
// recursively compare objects and arrays (susceptible to call stack limits)
|
||||
if (isArr) {
|
||||
// compare lengths to determine if a deep comparison is necessary
|
||||
length = a.length;
|
||||
size = b.length;
|
||||
result = size == length;
|
||||
|
||||
// compare lengths to determine if a deep comparison is necessary
|
||||
result = size == a.length;
|
||||
if (!result && !isWhere) {
|
||||
return result;
|
||||
}
|
||||
// deep compare the contents, ignoring non-numeric properties
|
||||
while (size--) {
|
||||
var index = length,
|
||||
value = b[size];
|
||||
if (result || isWhere) {
|
||||
// deep compare the contents, ignoring non-numeric properties
|
||||
while (size--) {
|
||||
var index = length,
|
||||
value = b[size];
|
||||
|
||||
if (isWhere) {
|
||||
while (index--) {
|
||||
if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
if (isWhere) {
|
||||
while (index--) {
|
||||
if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
}
|
||||
} else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
|
||||
// which, in this case, is more costly
|
||||
forIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
// count the number of properties.
|
||||
size++;
|
||||
// deep compare each property value.
|
||||
return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
|
||||
}
|
||||
});
|
||||
|
||||
if (result && !isWhere) {
|
||||
// ensure both objects have the same number of properties
|
||||
forIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
// `size` will be `-1` if `a` has more properties than `b`
|
||||
return (result = --size > -1);
|
||||
else {
|
||||
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
|
||||
// which, in this case, is more costly
|
||||
forIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
// count the number of properties.
|
||||
size++;
|
||||
// deep compare each property value.
|
||||
return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
|
||||
}
|
||||
});
|
||||
|
||||
if (result && !isWhere) {
|
||||
// ensure both objects have the same number of properties
|
||||
forIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
// `size` will be `-1` if `a` has more properties than `b`
|
||||
return (result = --size > -1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
stackA.pop();
|
||||
stackB.pop();
|
||||
|
||||
if (initedStack) {
|
||||
releaseArray(stackA);
|
||||
releaseArray(stackB);
|
||||
@@ -1580,13 +1587,8 @@
|
||||
|
||||
if (isLarge) {
|
||||
var cache = createCache(seen);
|
||||
if (cache) {
|
||||
indexOf = cacheIndexOf;
|
||||
seen = cache;
|
||||
} else {
|
||||
isLarge = false;
|
||||
seen = callback ? seen : (releaseArray(seen), result);
|
||||
}
|
||||
indexOf = cacheIndexOf;
|
||||
seen = cache;
|
||||
}
|
||||
while (++index < length) {
|
||||
var value = array[index],
|
||||
@@ -1686,8 +1688,14 @@
|
||||
}
|
||||
var bindData = func && func.__bindData__;
|
||||
if (bindData && bindData !== true) {
|
||||
bindData = bindData.slice();
|
||||
|
||||
// clone `bindData`
|
||||
bindData = slice(bindData);
|
||||
if (bindData[2]) {
|
||||
bindData[2] = slice(bindData[2]);
|
||||
}
|
||||
if (bindData[3]) {
|
||||
bindData[3] = slice(bindData[3]);
|
||||
}
|
||||
// set `thisBinding` is not previously bound
|
||||
if (isBind && !(bindData[1] & 1)) {
|
||||
bindData[4] = thisArg;
|
||||
@@ -1706,7 +1714,7 @@
|
||||
}
|
||||
// append partial right arguments
|
||||
if (isPartialRight) {
|
||||
push.apply(bindData[3] || (bindData[3] = []), partialRightArgs);
|
||||
unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs);
|
||||
}
|
||||
// merge flags
|
||||
bindData[1] |= bitmask;
|
||||
@@ -1789,6 +1797,17 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a native function.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if the `value` is a native function, else `false`.
|
||||
*/
|
||||
function isNative(value) {
|
||||
return typeof value == 'function' && reNative.test(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets `this` binding data on a given function.
|
||||
*
|
||||
@@ -1799,6 +1818,7 @@
|
||||
var setBindData = !defineProperty ? noop : function(func, value) {
|
||||
descriptor.value = value;
|
||||
defineProperty(func, '__bindData__', descriptor);
|
||||
descriptor.value = null;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2840,7 +2860,7 @@
|
||||
return false;
|
||||
}
|
||||
var valueOf = value.valueOf,
|
||||
objProto = typeof valueOf == 'function' && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
|
||||
objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
|
||||
|
||||
return objProto
|
||||
? (value == objProto || getPrototypeOf(value) == objProto)
|
||||
@@ -5343,7 +5363,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array that is the smymetric difference of the provided arrays.
|
||||
* Creates an array that is the symmetric difference of the provided arrays.
|
||||
* See http://en.wikipedia.org/wiki/Symmetric_difference.
|
||||
*
|
||||
* @static
|
||||
@@ -6312,7 +6332,7 @@
|
||||
* _.defer(function() { console.log(_.now() - stamp); });
|
||||
* // => logs the number of milliseconds it took for the deferred function to be called
|
||||
*/
|
||||
var now = reNative.test(now = Date.now) && now || function() {
|
||||
var now = isNative(now = Date.now) && now || function() {
|
||||
return new Date().getTime();
|
||||
};
|
||||
|
||||
@@ -6470,7 +6490,7 @@
|
||||
* debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl
|
||||
*
|
||||
* For more information on precompiling templates see:
|
||||
* http://lodash.com/custom-builds
|
||||
* https://lodash.com/custom-builds
|
||||
*
|
||||
* For more information on Chrome extension sandboxes see:
|
||||
* http://developer.chrome.com/stable/extensions/sandboxingEval.html
|
||||
@@ -7039,7 +7059,7 @@
|
||||
* @memberOf _
|
||||
* @type string
|
||||
*/
|
||||
lodash.VERSION = '2.4.0';
|
||||
lodash.VERSION = '2.4.2';
|
||||
|
||||
// add "Chaining" functions to the wrapper
|
||||
lodash.prototype.chain = wrapperChain;
|
||||
|
||||
144
dist/lodash.compat.min.js
vendored
144
dist/lodash.compat.min.js
vendored
@@ -1,60 +1,92 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.4.0 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Lo-Dash 2.4.2 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
*/
|
||||
;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++e<r;)if(n[e]===t)return e;return-1}function t(t,e){var r=typeof e;if(t=t.l,"boolean"==r||null==e)return t[e]?0:-1;"number"!=r&&"string"!=r&&(r="object");var u="number"==r?e:b+e;return t=(t=t[r])&&t[u],"object"==r?t&&-1<n(t,e)?0:-1:t?0:-1}function e(n){var t=this.l,e=typeof n;if("boolean"==e||null==n)t[n]=true;else{"number"!=e&&"string"!=e&&(e="object");var r="number"==e?n:b+n,t=t[e]||(t[e]={});"object"==e?(t[r]||(t[r]=[])).push(n):t[r]=true
|
||||
}}function r(n){return n.charCodeAt(0)}function u(n,t){for(var e=n.m,r=t.m,u=-1,o=e.length;++u<o;){var a=e[u],i=r[u];if(a!==i){if(a>i||typeof a=="undefined")return 1;if(a<i||typeof i=="undefined")return-1}}return n.n-t.n}function o(n){var t=-1,r=n.length,u=n[0],o=n[r/2|0],a=n[r-1];if(u&&typeof u=="object"&&o&&typeof o=="object"&&a&&typeof a=="object")return false;for(u=l(),u["false"]=u["null"]=u["true"]=u.undefined=false,o=l(),o.k=n,o.l=u,o.push=e;++t<r;)o.push(n[t]);return o}function a(n){return"\\"+Y[n]
|
||||
}function i(){return v.pop()||[]}function l(){return y.pop()||{k:null,l:null,m:null,"false":false,n:0,"null":false,number:null,object:null,push:null,string:null,"true":false,undefined:false,o:null}}function f(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function c(n){n.length=0,v.length<w&&v.push(n)}function p(n){var t=n.l;t&&p(t),n.k=n.l=n.m=n.object=n.number=n.string=n.o=null,y.length<w&&y.push(n)}function s(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Array(0>e?0:e);++r<e;)u[r]=n[t+r];
|
||||
return u}function g(e){function v(n){return n&&typeof n=="object"&&!Le(n)&&_e.call(n,"__wrapped__")?n:new y(n)}function y(n,t){this.__chain__=!!t,this.__wrapped__=n}function w(n){function t(){if(r){var n=r.slice();we.apply(n,arguments)}if(this instanceof t){var o=nt(e.prototype),n=e.apply(o,n||arguments);return jt(n)?n:o}return e.apply(u,n||arguments)}var e=n[0],r=n[2],u=n[4];return $e(t,n),t}function Y(n,t,e,r,u){if(e){var o=e(n);if(typeof o!="undefined")return o}if(!jt(n))return n;var a=ge.call(n);
|
||||
if(!V[a]||!Te.nodeClass&&f(n))return n;var l=Re[a];switch(a){case L:case z:return new l(+n);case W:case M:return new l(n);case J:return o=l(n.source,S.exec(n)),o.lastIndex=n.lastIndex,o}if(a=Le(n),t){var p=!r;r||(r=i()),u||(u=i());for(var g=r.length;g--;)if(r[g]==n)return u[g];o=a?l(n.length):{}}else o=a?s(n):Qe({},n);return a&&(_e.call(n,"index")&&(o.index=n.index),_e.call(n,"input")&&(o.input=n.input)),t?(r.push(n),u.push(o),(a?Ue:Ze)(n,function(n,a){o[a]=Y(n,t,e,r,u)}),p&&(c(r),c(u)),o):o}function nt(n){return jt(n)?Ee(n):{}
|
||||
}function tt(n,t,e){if(typeof n!="function")return Vt;if(typeof t=="undefined"||!("prototype"in n))return n;var r=n.__bindData__;if(typeof r=="undefined"&&(Te.funcNames&&(r=!n.name),r=r||!Te.funcDecomp,!r)){var u=de.call(n);Te.funcNames||(r=!A.test(u)),r||(r=B.test(u),$e(n,r))}if(false===r||true!==r&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,u){return n.call(t,e,r,u)};case 4:return function(e,r,u,o){return n.call(t,e,r,u,o)
|
||||
}}return Jt(n,t)}function et(n){function t(){var n=l?a:this;if(u){var h=u.slice();we.apply(h,arguments)}return(o||c)&&(h||(h=s(arguments)),o&&we.apply(h,o),c&&h.length<i)?(r|=16,et([e,p?r:-4&r,h,null,a,i])):(h||(h=arguments),f&&(e=n[g]),this instanceof t?(n=nt(e.prototype),h=e.apply(n,h),jt(h)?h:n):e.apply(n,h))}var e=n[0],r=n[1],u=n[2],o=n[3],a=n[4],i=n[5],l=1&r,f=2&r,c=4&r,p=8&r,g=e;return $e(t,n),t}function rt(e,r){var u=-1,a=ht(),i=e?e.length:0,l=i>=_&&a===n,f=[];if(l){var c=o(r);c?(a=t,r=c):l=false
|
||||
}for(;++u<i;)c=e[u],0>a(r,c)&&f.push(c);return l&&p(r),f}function ot(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r<u;){var a=n[r];if(a&&typeof a=="object"&&typeof a.length=="number"&&(Le(a)||mt(a))){t||(a=ot(a,t,e));var i=-1,l=a.length,f=o.length;for(o.length+=l;++i<l;)o[f++]=a[i]}else e||o.push(a)}return o}function at(n,t,e,r,u,o){if(e){var a=e(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;if(n===n&&!(n&&X[typeof n]||t&&X[typeof t]))return false;if(null==n||null==t)return n===t;
|
||||
var l=ge.call(n),p=ge.call(t);if(l==T&&(l=G),p==T&&(p=G),l!=p)return false;switch(l){case L:case z:return+n==+t;case W:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case J:case M:return n==ae(t)}if(p=l==$,!p){var s=_e.call(n,"__wrapped__"),g=_e.call(t,"__wrapped__");if(s||g)return at(s?n.__wrapped__:n,g?t.__wrapped__:t,e,r,u,o);if(l!=G||!Te.nodeClass&&(f(n)||f(t)))return false;if(l=!Te.argsObject&&mt(n)?ue:n.constructor,s=!Te.argsObject&&mt(t)?ue:t.constructor,l!=s&&!(wt(l)&&l instanceof l&&wt(s)&&s instanceof s)&&"constructor"in n&&"constructor"in t)return false
|
||||
}for(s=!u,u||(u=i()),o||(o=i()),l=u.length;l--;)if(u[l]==n)return o[l]==t;var h=0,a=true;if(u.push(n),o.push(t),p){if(l=n.length,h=t.length,a=h==n.length,!a&&!r)return a;for(;h--;)if(p=l,s=t[h],r)for(;p--&&!(a=at(n[p],s,e,r,u,o)););else if(!(a=at(n[h],s,e,r,u,o)))break;return a}return Ye(t,function(t,i,l){return _e.call(l,i)?(h++,a=_e.call(n,i)&&at(n[i],t,e,r,u,o)):void 0}),a&&!r&&Ye(n,function(n,t,e){return _e.call(e,t)?a=-1<--h:void 0}),s&&(c(u),c(o)),a}function it(n,t,e,r,u){(Le(t)?It:Ze)(t,function(t,o){var a,i,l=t,f=n[o];
|
||||
if(t&&((i=Le(t))||nr(t))){for(l=r.length;l--;)if(a=r[l]==t){f=u[l];break}if(!a){var c;e&&(l=e(f,t),c=typeof l!="undefined")&&(f=l),c||(f=i?Le(f)?f:[]:nr(f)?f:{}),r.push(t),u.push(f),c||it(f,t,e,r,u)}}else e&&(l=e(f,t),typeof l=="undefined"&&(l=t)),typeof l!="undefined"&&(f=l);n[o]=f})}function lt(n,t){return n+me(Pe()*(t-n+1))}function ft(e,r,u){var a=-1,l=ht(),f=e?e.length:0,s=[],g=!r&&f>=_&&l===n,h=u||g?i():s;if(g){var v=o(h);v?(l=t,h=v):(g=false,h=u?h:(c(h),s))}for(;++a<f;){var v=e[a],y=u?u(v,a,e):v;
|
||||
(r?!a||h[h.length-1]!==y:0>l(h,y))&&((u||g)&&h.push(y),s.push(v))}return g?(c(h.k),p(h)):u&&c(h),s}function ct(n){return function(t,e,r){var u={};if(e=v.createCallback(e,r,3),Le(t)){r=-1;for(var o=t.length;++r<o;){var a=t[r];n(u,a,e(a,r,t),t)}}else Ue(t,function(t,r,o){n(u,t,e(t,r,o),o)});return u}}function pt(n,t,e,r,u,o){var a=1&t,i=4&t,l=16&t,f=32&t;if(!(2&t||wt(n)))throw new ie;l&&!e.length&&(t&=-17,l=e=false),f&&!r.length&&(t&=-33,f=r=false);var c=n&&n.__bindData__;return c&&true!==c?(c=c.slice(),!a||1&c[1]||(c[4]=u),!a&&1&c[1]&&(t|=8),!i||4&c[1]||(c[5]=o),l&&we.apply(c[2]||(c[2]=[]),e),f&&we.apply(c[3]||(c[3]=[]),r),c[1]|=t,pt.apply(null,c)):(1==t||17===t?w:et)([n,t,e,r,u,o])
|
||||
}function st(){Q.h=F,Q.b=Q.c=Q.g=Q.i="",Q.e="t",Q.j=true;for(var n,t=0;n=arguments[t];t++)for(var e in n)Q[e]=n[e];t=Q.a,Q.d=/^[^,]+/.exec(t)[0],n=te,t="return function("+t+"){",e=Q;var r="var n,t="+e.d+",E="+e.e+";if(!t)return E;"+e.i+";";e.b?(r+="var u=t.length;n=-1;if("+e.b+"){",Te.unindexedChars&&(r+="if(s(t)){t=t.split('')}"),r+="while(++n<u){"+e.g+";}}else{"):Te.nonEnumArgs&&(r+="var u=t.length;n=-1;if(u&&p(t)){while(++n<u){n+='';"+e.g+";}}else{"),Te.enumPrototypes&&(r+="var G=typeof t=='function';"),Te.enumErrorProps&&(r+="var F=t===k||t instanceof Error;");
|
||||
var u=[];if(Te.enumPrototypes&&u.push('!(G&&n=="prototype")'),Te.enumErrorProps&&u.push('!(F&&(n=="message"||n=="name"))'),e.j&&e.f)r+="var C=-1,D=B[typeof t]&&v(t),u=D?D.length:0;while(++C<u){n=D[C];",u.length&&(r+="if("+u.join("&&")+"){"),r+=e.g+";",u.length&&(r+="}"),r+="}";else if(r+="for(n in t){",e.j&&u.push("m.call(t, n)"),u.length&&(r+="if("+u.join("&&")+"){"),r+=e.g+";",u.length&&(r+="}"),r+="}",Te.nonEnumShadows){for(r+="if(t!==A){var i=t.constructor,r=t===(i&&i.prototype),f=t===J?I:t===k?j:L.call(t),x=y[f];",k=0;7>k;k++)r+="n='"+e.h[k]+"';if((!(r&&x[n])&&m.call(t,n))",e.j||(r+="||(!x[n]&&t[n]!==A[n])"),r+="){"+e.g+"}";
|
||||
r+="}"}return(e.b||Te.nonEnumArgs)&&(r+="}"),r+=e.c+";return E",n("d,j,k,m,o,p,q,s,v,A,B,y,I,J,L",t+r+"}")(tt,q,fe,_e,d,mt,Le,Ct,Q.f,ce,X,Fe,M,pe,ge)}function gt(n){return Je[n]}function ht(){var t=(t=v.indexOf)===Lt?n:t;return t}function vt(n){var t,e;return!n||ge.call(n)!=G||(t=n.constructor,wt(t)&&!(t instanceof t))||!Te.argsClass&&mt(n)||!Te.nodeClass&&f(n)?false:Te.ownLast?(Ye(n,function(n,t,r){return e=_e.call(r,t),false}),false!==e):(Ye(n,function(n,t){e=t}),typeof e=="undefined"||_e.call(n,e))}function yt(n){return Me[n]
|
||||
}function mt(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ge.call(n)==T||false}function dt(n,t,e){var r=qe(n),u=r.length;for(t=tt(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function bt(n){var t=[];return Ye(n,function(n,e){wt(n)&&t.push(e)}),t.sort()}function _t(n){for(var t=-1,e=qe(n),r=e.length,u={};++t<r;){var o=e[t];u[n[o]]=o}return u}function wt(n){return typeof n=="function"}function jt(n){return!(!n||!X[typeof n])}function xt(n){return typeof n=="number"||n&&typeof n=="object"&&ge.call(n)==W||false
|
||||
}function Ct(n){return typeof n=="string"||n&&typeof n=="object"&&ge.call(n)==M||false}function kt(n){for(var t=-1,e=qe(n),r=e.length,u=Yt(r);++t<r;)u[t]=n[e[t]];return u}function Et(n,t,e){var r=-1,u=ht(),o=n?n.length:0,a=false;return e=(0>e?De(0,o+e):e)||0,Le(n)?a=-1<u(n,t,e):typeof o=="number"?a=-1<(Ct(n)?n.indexOf(t,e):u(n,t,e)):Ue(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function Ot(n,t,e){var r=true;if(t=v.createCallback(t,e,3),Le(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else Ue(n,function(n,e,u){return r=!!t(n,e,u)
|
||||
});return r}function St(n,t,e){var r=[];if(t=v.createCallback(t,e,3),Le(n)){e=-1;for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else Ue(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function At(n,t,e){if(t=v.createCallback(t,e,3),!Le(n)){var r;return Ue(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0}),r}e=-1;for(var u=n.length;++e<u;){var o=n[e];if(t(o,e,n))return o}}function It(n,t,e){if(t&&typeof e=="undefined"&&Le(n)){e=-1;for(var r=n.length;++e<r&&false!==t(n[e],e,n););}else Ue(n,t,e);
|
||||
return n}function Dt(n,t,e){var r=n,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:tt(t,e,3),Le(n))for(;u--&&false!==t(n[u],u,n););else{if(typeof u!="number")var o=qe(n),u=o.length;else Te.unindexedChars&&Ct(n)&&(r=n.split(""));Ue(n,function(n,e,a){return e=o?o[--u]:--u,t(r[e],e,a)})}return n}function Nt(n,t,e){var r=-1,u=n?n.length:0,o=Yt(typeof u=="number"?u:0);if(t=v.createCallback(t,e,3),Le(n))for(;++r<u;)o[r]=t(n[r],r,n);else Ue(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function Bt(n,t,e){var u=-1/0,o=u;
|
||||
if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&Le(n)){e=-1;for(var a=n.length;++e<a;){var i=n[e];i>o&&(o=i)}}else t=null==t&&Ct(n)?r:v.createCallback(t,e,3),Ue(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Pt(n,t,e,r){var u=3>arguments.length;if(t=v.createCallback(t,r,4),Le(n)){var o=-1,a=n.length;for(u&&(e=n[++o]);++o<a;)e=t(e,n[o],o,n)}else Ue(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)});return e}function Rt(n,t,e,r){var u=3>arguments.length;return t=v.createCallback(t,r,4),Dt(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)
|
||||
}),e}function Ft(n){var t=-1,e=n?n.length:0,r=Yt(typeof e=="number"?e:0);return It(n,function(n){var e=lt(0,++t);r[t]=r[e],r[e]=n}),r}function Tt(n,t,e){var r;if(t=v.createCallback(t,e,3),Le(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else Ue(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function $t(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=-1;for(t=v.createCallback(t,e,3);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[0]:h;return s(n,0,Ne(De(0,r),u))
|
||||
}function Lt(t,e,r){if(typeof r=="number"){var u=t?t.length:0;r=0>r?De(0,u+r):r||0}else if(r)return r=qt(t,e),t[r]===e?r:-1;return n(t,e,r)}function zt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=v.createCallback(t,e,3);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:De(0,t);return s(n,r)}function qt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?v.createCallback(e,r,1):Vt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function Kt(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(e=v.createCallback(e,r,3)),ft(n,t,e)
|
||||
}function Wt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,e=n?Bt(ur(n,"length")):0,r=Yt(0>e?0:e);++t<e;)r[t]=ur(n,t);return r}function Gt(n,t){var e=-1,r=n?n.length:0,u={};for(t||!r||Le(n[0])||(t=[]);++e<r;){var o=n[e];t?u[o]=t[e]:o&&(u[o[0]]=o[1])}return u}function Jt(n,t){return 2<arguments.length?pt(n,17,s(arguments,2),null,t):pt(n,1,null,null,t)}function Mt(n,t,e){var r,u,o,a,i,l,f,c=0,p=false,s=true;if(!wt(n))throw new ie;if(t=De(0,t)||0,true===e)var g=true,s=false;else jt(e)&&(g=e.leading,p="maxWait"in e&&(De(t,e.maxWait)||0),s="trailing"in e?e.trailing:s);
|
||||
var v=function(){var e=t-(or()-a);0<e?l=xe(v,e):(u&&ye(u),e=f,u=l=f=h,e&&(c=or(),o=n.apply(i,r),l||u||(r=i=null)))},y=function(){l&&ye(l),u=l=f=h,(s||p!==t)&&(c=or(),o=n.apply(i,r),l||u||(r=i=null))};return function(){if(r=arguments,a=or(),i=this,f=s&&(l||!g),false===p)var e=g&&!l;else{u||g||(c=a);var h=p-(a-c),m=0>=h;m?(u&&(u=ye(u)),c=a,o=n.apply(i,r)):u||(u=xe(y,h))}return m&&l?l=ye(l):l||t===p||(l=xe(v,t)),e&&(m=true,o=n.apply(i,r)),!m||l||u||(r=i=null),o}}function Vt(n){return n}function Ht(n,t,e){var r=true,u=t&&bt(t);
|
||||
t&&(e||u.length)||(null==e&&(e=t),o=y,t=n,n=v,u=bt(t)),false===e?r=false:jt(e)&&"chain"in e&&(r=e.chain);var o=n,a=wt(o);It(u,function(e){var u=n[e]=t[e];a&&(o.prototype[e]=function(){var t=this.__chain__,e=this.__wrapped__,a=[e];if(we.apply(a,arguments),a=u.apply(n,a),r||t){if(e===a&&jt(a))return this;a=new o(a),a.__chain__=t}return a})})}function Ut(){}function Qt(n){return function(t){return t[n]}}function Xt(){return this.__wrapped__}e=e?ut.defaults(Z.Object(),e,ut.pick(Z,R)):Z;var Yt=e.Array,Zt=e.Boolean,ne=e.Date,te=e.Function,ee=e.Math,re=e.Number,ue=e.Object,oe=e.RegExp,ae=e.String,ie=e.TypeError,le=[],fe=e.Error.prototype,ce=ue.prototype,pe=ae.prototype,se=e._,ge=ce.toString,he=oe("^"+ae(ge).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),ve=ee.ceil,ye=e.clearTimeout,me=ee.floor,de=te.prototype.toString,be=he.test(be=ue.getPrototypeOf)&&be,_e=ce.hasOwnProperty,we=le.push,je=ce.propertyIsEnumerable,xe=e.setTimeout,Ce=le.splice,ke=function(){try{var n={},t=he.test(t=ue.defineProperty)&&t,e=t(n,n,n)&&t
|
||||
}catch(r){}return e}(),Ee=he.test(Ee=ue.create)&&Ee,Oe=he.test(Oe=Yt.isArray)&&Oe,Se=e.isFinite,Ae=e.isNaN,Ie=he.test(Ie=ue.keys)&&Ie,De=ee.max,Ne=ee.min,Be=e.parseInt,Pe=ee.random,Re={};Re[$]=Yt,Re[L]=Zt,Re[z]=ne,Re[K]=te,Re[G]=ue,Re[W]=re,Re[J]=oe,Re[M]=ae;var Fe={};Fe[$]=Fe[z]=Fe[W]={constructor:true,toLocaleString:true,toString:true,valueOf:true},Fe[L]=Fe[M]={constructor:true,toString:true,valueOf:true},Fe[q]=Fe[K]=Fe[J]={constructor:true,toString:true},Fe[G]={constructor:true},function(){for(var n=F.length;n--;){var t,e=F[n];
|
||||
for(t in Fe)_e.call(Fe,t)&&!_e.call(Fe[t],e)&&(Fe[t][e]=false)}}(),y.prototype=v.prototype;var Te=v.support={};!function(){var n=function(){this.x=1},t={0:1,length:1},r=[];n.prototype={valueOf:1,y:1};for(var u in new n)r.push(u);for(u in arguments);Te.argsClass=ge.call(arguments)==T,Te.argsObject=arguments.constructor==ue&&!(arguments instanceof Yt),Te.enumErrorProps=je.call(fe,"message")||je.call(fe,"name"),Te.enumPrototypes=je.call(n,"prototype"),Te.funcDecomp=!he.test(e.WinRTError)&&B.test(g),Te.funcNames=typeof te.name=="string",Te.nonEnumArgs=0!=u,Te.nonEnumShadows=!/valueOf/.test(r),Te.ownLast="x"!=r[0],Te.spliceObjects=(le.splice.call(t,0,1),!t[0]),Te.unindexedChars="xx"!="x"[0]+ue("x")[0];
|
||||
try{Te.nodeClass=!(ge.call(document)==G&&!({toString:0}+""))}catch(o){Te.nodeClass=true}}(1),v.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:I,variable:"",imports:{_:v}},Ee||(nt=function(){function n(){}return function(t){if(jt(t)){n.prototype=t;var r=new n;n.prototype=null}return r||e.Object()}}());var $e=ke?function(n,t){U.value=t,ke(n,"__bindData__",U)}:Ut;Te.argsClass||(mt=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&_e.call(n,"callee")&&!je.call(n,"callee")||false
|
||||
});var Le=Oe||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ge.call(n)==$||false},ze=st({a:"z",e:"[]",i:"if(!(B[typeof z]))return E",g:"E.push(n)"}),qe=Ie?function(n){return jt(n)?Te.enumPrototypes&&typeof n=="function"||Te.nonEnumArgs&&n.length&&mt(n)?ze(n):Ie(n):[]}:ze,Ke={a:"g,e,K",i:"e=e&&typeof K=='undefined'?e:d(e,K,3)",b:"typeof u=='number'",v:qe,g:"if(e(t[n],n,g)===false)return E"},We={a:"z,H,l",i:"var a=arguments,b=0,c=typeof l=='number'?2:a.length;while(++b<c){t=a[b];if(t&&B[typeof t]){",v:qe,g:"if(typeof E[n]=='undefined')E[n]=t[n]",c:"}}"},Ge={i:"if(!B[typeof t])return E;"+Ke.i,b:false},Je={"&":"&","<":"<",">":">",'"':""","'":"'"},Me=_t(Je),Ve=oe("("+qe(Me).join("|")+")","g"),He=oe("["+qe(Je).join("")+"]","g"),Ue=st(Ke),Qe=st(We,{i:We.i.replace(";",";if(c>3&&typeof a[c-2]=='function'){var e=d(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){e=a[--c]}"),g:"E[n]=e?e(E[n],t[n]):t[n]"}),Xe=st(We),Ye=st(Ke,Ge,{j:false}),Ze=st(Ke,Ge);
|
||||
wt(/x/)&&(wt=function(n){return typeof n=="function"&&ge.call(n)==K});var nr=be?function(n){if(!n||ge.call(n)!=G||!Te.argsClass&&mt(n))return false;var t=n.valueOf,e=typeof t=="function"&&(e=be(t))&&be(e);return e?n==e||be(n)==e:vt(n)}:vt,tr=ct(function(n,t,e){_e.call(n,e)?n[e]++:n[e]=1}),er=ct(function(n,t,e){(_e.call(n,e)?n[e]:n[e]=[]).push(t)}),rr=ct(function(n,t,e){n[e]=t}),ur=Nt,or=he.test(or=ne.now)&&or||function(){return(new ne).getTime()},ar=8==Be(j+"08")?Be:function(n,t){return Be(Ct(n)?n.replace(D,""):n,t||0)
|
||||
};return v.after=function(n,t){if(!wt(t))throw new ie;return function(){return 1>--n?t.apply(this,arguments):void 0}},v.assign=Qe,v.at=function(n){var t=arguments,e=-1,r=ot(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Yt(t);for(Te.unindexedChars&&Ct(n)&&(n=n.split(""));++e<t;)u[e]=n[r[e]];return u},v.bind=Jt,v.bindAll=function(n){for(var t=1<arguments.length?ot(arguments,true,false,1):bt(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=pt(n[u],1,null,null,n)}return n},v.bindKey=function(n,t){return 2<arguments.length?pt(t,19,s(arguments,2),null,n):pt(t,3,null,null,n)
|
||||
},v.chain=function(n){return n=new y(n),n.__chain__=true,n},v.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},v.compose=function(){for(var n=arguments,t=n.length;t--;)if(!wt(n[t]))throw new ie;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},v.constant=function(n){return function(){return n}},v.countBy=tr,v.create=function(n,t){var e=nt(n);return t?Qe(e,t):e},v.createCallback=function(n,t,e){var r=typeof n;if(null==n||"function"==r)return tt(n,t,e);
|
||||
if("object"!=r)return Qt(n);var u=qe(n),o=u[0],a=n[o];return 1!=u.length||a!==a||jt(a)?function(t){for(var e=u.length,r=false;e--&&(r=at(t[u[e]],n[u[e]],null,true)););return r}:function(n){return n=n[o],a===n&&(0!==a||1/a==1/n)}},v.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,pt(n,4,null,null,null,t)},v.debounce=Mt,v.defaults=Xe,v.defer=function(n){if(!wt(n))throw new ie;var t=s(arguments,1);return xe(function(){n.apply(h,t)},1)},v.delay=function(n,t){if(!wt(n))throw new ie;var e=s(arguments,2);
|
||||
return xe(function(){n.apply(h,e)},t)},v.difference=function(n){return rt(n,ot(arguments,true,true,1))},v.filter=St,v.flatten=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(n=Nt(n,e,r)),ot(n,t)},v.forEach=It,v.forEachRight=Dt,v.forIn=Ye,v.forInRight=function(n,t,e){var r=[];Ye(n,function(n,t){r.push(t,n)});var u=r.length;for(t=tt(t,e,3);u--&&false!==t(r[u--],r[u],n););return n},v.forOwn=Ze,v.forOwnRight=dt,v.functions=bt,v.groupBy=er,v.indexBy=rr,v.initial=function(n,t,e){var r=0,u=n?n.length:0;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=v.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return s(n,0,Ne(De(0,u-r),u))},v.intersection=function(){for(var e=[],r=-1,u=arguments.length,a=i(),l=ht(),f=l===n,s=i();++r<u;){var g=arguments[r];(Le(g)||mt(g))&&(e.push(g),a.push(f&&g.length>=_&&o(r?e[r]:s)))}var f=e[0],h=-1,v=f?f.length:0,y=[];n:for(;++h<v;){var m=a[0],g=f[h];if(0>(m?t(m,g):l(s,g))){for(r=u,(m||s).push(g);--r;)if(m=a[r],0>(m?t(m,g):l(e[r],g)))continue n;y.push(g)
|
||||
}}for(;u--;)(m=a[u])&&p(m);return c(a),c(s),y},v.invert=_t,v.invoke=function(n,t){var e=s(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,a=Yt(typeof o=="number"?o:0);return It(n,function(n){a[++r]=(u?t:n[t]).apply(n,e)}),a},v.keys=qe,v.map=Nt,v.mapValues=function(n,t,e){var r={};return t=v.createCallback(t,e,3),Ze(n,function(n,e,u){r[e]=t(n,e,u)}),r},v.max=Bt,v.memoize=function(n,t){if(!wt(n))throw new ie;var e=function(){var r=e.cache,u=t?t.apply(this,arguments):b+arguments[0];return _e.call(r,u)?r[u]:r[u]=n.apply(this,arguments)
|
||||
};return e.cache={},e},v.merge=function(n){var t=arguments,e=2;if(!jt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3<e&&"function"==typeof t[e-2])var r=tt(t[--e-1],t[e--],2);else 2<e&&"function"==typeof t[e-1]&&(r=t[--e]);for(var t=s(arguments,1,e),u=-1,o=i(),a=i();++u<e;)it(n,t[u],r,o,a);return c(o),c(a),n},v.min=function(n,t,e){var u=1/0,o=u;if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&Le(n)){e=-1;for(var a=n.length;++e<a;){var i=n[e];i<o&&(o=i)}}else t=null==t&&Ct(n)?r:v.createCallback(t,e,3),Ue(n,function(n,e,r){e=t(n,e,r),e<u&&(u=e,o=n)
|
||||
});return o},v.omit=function(n,t,e){var r={};if(typeof t!="function"){var u=[];Ye(n,function(n,t){u.push(t)});for(var u=rt(u,ot(arguments,true,false,1)),o=-1,a=u.length;++o<a;){var i=u[o];r[i]=n[i]}}else t=v.createCallback(t,e,3),Ye(n,function(n,e,u){t(n,e,u)||(r[e]=n)});return r},v.once=function(n){var t,e;if(!wt(n))throw new ie;return function(){return t?e:(t=true,e=n.apply(this,arguments),n=null,e)}},v.pairs=function(n){for(var t=-1,e=qe(n),r=e.length,u=Yt(r);++t<r;){var o=e[t];u[t]=[o,n[o]]}return u
|
||||
},v.partial=function(n){return pt(n,16,s(arguments,1))},v.partialRight=function(n){return pt(n,32,null,s(arguments,1))},v.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,o=ot(arguments,true,false,1),a=jt(n)?o.length:0;++u<a;){var i=o[u];i in n&&(r[i]=n[i])}else t=v.createCallback(t,e,3),Ye(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},v.pluck=ur,v.property=Qt,v.pull=function(n){for(var t=arguments,e=0,r=t.length,u=n?n.length:0;++e<r;)for(var o=-1,a=t[e];++o<u;)n[o]===a&&(Ce.call(n,o--,1),u--);
|
||||
return n},v.range=function(n,t,e){n=+n||0,e=typeof e=="number"?e:+e||1,null==t&&(t=n,n=0);var r=-1;t=De(0,ve((t-n)/(e||1)));for(var u=Yt(t);++r<t;)u[r]=n,n+=e;return u},v.reject=function(n,t,e){return t=v.createCallback(t,e,3),St(n,function(n,e,r){return!t(n,e,r)})},v.remove=function(n,t,e){var r=-1,u=n?n.length:0,o=[];for(t=v.createCallback(t,e,3);++r<u;)e=n[r],t(e,r,n)&&(o.push(e),Ce.call(n,r--,1),u--);return o},v.rest=zt,v.shuffle=Ft,v.sortBy=function(n,t,e){var r=-1,o=Le(t),a=n?n.length:0,f=Yt(typeof a=="number"?a:0);
|
||||
for(o||(t=v.createCallback(t,e,3)),It(n,function(n,e,u){var a=f[++r]=l();o?a.m=Nt(t,function(t){return n[t]}):(a.m=i())[0]=t(n,e,u),a.n=r,a.o=n}),a=f.length,f.sort(u);a--;)n=f[a],f[a]=n.o,o||c(n.m),p(n);return f},v.tap=function(n,t){return t(n),n},v.throttle=function(n,t,e){var r=true,u=true;if(!wt(n))throw new ie;return false===e?r=false:jt(e)&&(r="leading"in e?e.leading:r,u="trailing"in e?e.trailing:u),H.leading=r,H.maxWait=t,H.trailing=u,Mt(n,t,H)},v.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Yt(n);
|
||||
for(t=tt(t,e,1);++r<n;)u[r]=t(r);return u},v.toArray=function(n){return n&&typeof n.length=="number"?Te.unindexedChars&&Ct(n)?n.split(""):s(n):kt(n)},v.transform=function(n,t,e,r){var u=Le(n);if(null==e)if(u)e=[];else{var o=n&&n.constructor;e=nt(o&&o.prototype)}return t&&(t=v.createCallback(t,r,4),(u?Ue:Ze)(n,function(n,r,u){return t(e,n,r,u)})),e},v.union=function(){return ft(ot(arguments,true,true))},v.uniq=Kt,v.values=kt,v.where=St,v.without=function(n){return rt(n,s(arguments,1))},v.wrap=function(n,t){return pt(t,16,[n])
|
||||
},v.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var e=arguments[n];if(Le(e)||mt(e))var r=r?ft(rt(r,e).concat(rt(e,r))):e}return r||[]},v.zip=Wt,v.zipObject=Gt,v.collect=Nt,v.drop=zt,v.each=It,v.eachRight=Dt,v.extend=Qe,v.methods=bt,v.object=Gt,v.select=St,v.tail=zt,v.unique=Kt,v.unzip=Wt,Ht(v),v.clone=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=t,t=false),Y(n,t,typeof e=="function"&&tt(e,r,1))},v.cloneDeep=function(n,t,e){return Y(n,true,typeof t=="function"&&tt(t,e,1))},v.contains=Et,v.escape=function(n){return null==n?"":ae(n).replace(He,gt)
|
||||
},v.every=Ot,v.find=At,v.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=v.createCallback(t,e,3);++r<u;)if(t(n[r],r,n))return r;return-1},v.findKey=function(n,t,e){var r;return t=v.createCallback(t,e,3),Ze(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},v.findLast=function(n,t,e){var r;return t=v.createCallback(t,e,3),Dt(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0}),r},v.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=v.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;
|
||||
return-1},v.findLastKey=function(n,t,e){var r;return t=v.createCallback(t,e,3),dt(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},v.has=function(n,t){return n?_e.call(n,t):false},v.identity=Vt,v.indexOf=Lt,v.isArguments=mt,v.isArray=Le,v.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&ge.call(n)==L||false},v.isDate=function(n){return n&&typeof n=="object"&&ge.call(n)==z||false},v.isElement=function(n){return n&&1===n.nodeType||false},v.isEmpty=function(n){var t=true;if(!n)return t;var e=ge.call(n),r=n.length;
|
||||
return e==$||e==M||(Te.argsClass?e==T:mt(n))||e==G&&typeof r=="number"&&wt(n.splice)?!r:(Ze(n,function(){return t=false}),t)},v.isEqual=function(n,t,e,r){return at(n,t,typeof e=="function"&&tt(e,r,2))},v.isFinite=function(n){return Se(n)&&!Ae(parseFloat(n))},v.isFunction=wt,v.isNaN=function(n){return xt(n)&&n!=+n},v.isNull=function(n){return null===n},v.isNumber=xt,v.isObject=jt,v.isPlainObject=nr,v.isRegExp=function(n){return n&&X[typeof n]&&ge.call(n)==J||false},v.isString=Ct,v.isUndefined=function(n){return typeof n=="undefined"
|
||||
},v.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?De(0,r+e):Ne(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},v.mixin=Ht,v.noConflict=function(){return e._=se,this},v.noop=Ut,v.now=or,v.parseInt=ar,v.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=Pe(),Ne(n+e*(t-n+parseFloat("1e-"+((e+"").length-1))),t)):lt(n,t)},v.reduce=Pt,v.reduceRight=Rt,v.result=function(n,t){if(n){var e=n[t];
|
||||
return wt(e)?n[t]():e}},v.runInContext=g,v.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:qe(n).length},v.some=Tt,v.sortedIndex=qt,v.template=function(n,t,e){var r=v.templateSettings;n=ae(n||""),e=Xe({},e,r);var u,o=Xe({},e.imports,r.imports),r=qe(o),o=kt(o),i=0,l=e.interpolate||N,f="__p+='",l=oe((e.escape||N).source+"|"+l.source+"|"+(l===I?O:N).source+"|"+(e.evaluate||N).source+"|$","g");n.replace(l,function(t,e,r,o,l,c){return r||(r=o),f+=n.slice(i,c).replace(P,a),e&&(f+="'+__e("+e+")+'"),l&&(u=true,f+="';"+l+";\n__p+='"),r&&(f+="'+((__t=("+r+"))==null?'':__t)+'"),i=c+t.length,t
|
||||
}),f+="';",l=e=e.variable,l||(e="obj",f="with("+e+"){"+f+"}"),f=(u?f.replace(x,""):f).replace(C,"$1").replace(E,"$1;"),f="function("+e+"){"+(l?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}";try{var c=te(r,"return "+f).apply(h,o)}catch(p){throw p.source=f,p}return t?c(t):(c.source=f,c)},v.unescape=function(n){return null==n?"":ae(n).replace(Ve,yt)},v.uniqueId=function(n){var t=++m;return ae(null==n?"":n)+t
|
||||
},v.all=Ot,v.any=Tt,v.detect=At,v.findWhere=At,v.foldl=Pt,v.foldr=Rt,v.include=Et,v.inject=Pt,Ht(function(){var n={};return Ze(v,function(t,e){v.prototype[e]||(n[e]=t)}),n}(),false),v.first=$t,v.last=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=v.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:h;return s(n,De(0,u-r))},v.sample=function(n,t,e){return n&&typeof n.length!="number"?n=kt(n):Te.unindexedChars&&Ct(n)&&(n=n.split("")),null==t||e?n?n[lt(0,n.length-1)]:h:(n=Ft(n),n.length=Ne(De(0,t),n.length),n)
|
||||
},v.take=$t,v.head=$t,Ze(v,function(n,t){var e="sample"!==t;v.prototype[t]||(v.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new y(o,u):o})}),v.VERSION="2.4.0",v.prototype.chain=function(){return this.__chain__=true,this},v.prototype.toString=function(){return ae(this.__wrapped__)},v.prototype.value=Xt,v.prototype.valueOf=Xt,Ue(["join","pop","shift"],function(n){var t=le[n];v.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);
|
||||
return n?new y(e,n):e}}),Ue(["push","reverse","sort","unshift"],function(n){var t=le[n];v.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Ue(["concat","slice","splice"],function(n){var t=le[n];v.prototype[n]=function(){return new y(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Te.spliceObjects||Ue(["pop","shift","splice"],function(n){var t=le[n],e="splice"==n;v.prototype[n]=function(){var n=this.__chain__,r=this.__wrapped__,u=t.apply(r,arguments);return 0===r.length&&delete r[0],n||e?new y(u,n):u
|
||||
}}),v}var h,v=[],y=[],m=0,d={},b=+new Date+"",_=75,w=40,j=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",x=/\b__p\+='';/g,C=/\b(__p\+=)''\+/g,E=/(__e\(.*?\)|\b__t\))\+'';/g,O=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,S=/\w*$/,A=/^\s*function[ \n\r\t]+\w/,I=/<%=([\s\S]+?)%>/g,D=RegExp("^["+j+"]*0+(?=.$)"),N=/($^)/,B=/\bthis\b/,P=/['\n\r\t\u2028\u2029\\]/g,R="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setTimeout".split(" "),F="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),T="[object Arguments]",$="[object Array]",L="[object Boolean]",z="[object Date]",q="[object Error]",K="[object Function]",W="[object Number]",G="[object Object]",J="[object RegExp]",M="[object String]",V={};
|
||||
V[K]=false,V[T]=V[$]=V[L]=V[z]=V[W]=V[G]=V[J]=V[M]=true;var H={leading:false,maxWait:0,trailing:false},U={configurable:false,enumerable:false,value:null,writable:false},Q={a:"",b:null,c:"",d:"",e:"",v:null,g:"",h:null,support:null,i:"",j:false},X={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},Y={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Z=X[typeof window]&&window||this,nt=X[typeof exports]&&exports&&!exports.nodeType&&exports,tt=X[typeof module]&&module&&!module.nodeType&&module,et=tt&&tt.exports===nt&&nt,rt=X[typeof global]&&global;
|
||||
!rt||rt.global!==rt&&rt.window!==rt||(Z=rt);var ut=g();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Z._=ut, define(function(){return ut})):nt&&tt?et?(tt.exports=ut)._=ut:nt._=ut:Z._=ut}).call(this);
|
||||
;(function(){function n(n,r,e){for(var t=(e||0)-1,o=n?n.length:0;++t<o;)if(n[t]===r)return t;return-1}function r(r,e){var t=typeof e;if(r=r.cache,"boolean"==t||null==e)return r[e]?0:-1;"number"!=t&&"string"!=t&&(t="object");var o="number"==t?e:m+e;return r=(r=r[t])&&r[o],"object"==t?r&&n(r,e)>-1?0:-1:r?0:-1}function e(n){var r=this.cache,e=typeof n;if("boolean"==e||null==n)r[n]=!0;else{"number"!=e&&"string"!=e&&(e="object");var t="number"==e?n:m+n,o=r[e]||(r[e]={});"object"==e?(o[t]||(o[t]=[])).push(n):o[t]=!0;
|
||||
|
||||
}}function t(n){return n.charCodeAt(0)}function o(n,r){for(var e=n.criteria,t=r.criteria,o=-1,u=e.length;++o<u;){var a=e[o],i=t[o];if(a!==i){if(a>i||"undefined"==typeof a)return 1;if(a<i||"undefined"==typeof i)return-1}}return n.index-r.index}function u(n){var r=-1,t=n.length,o=n[0],u=n[t/2|0],a=n[t-1];if(o&&"object"==typeof o&&u&&"object"==typeof u&&a&&"object"==typeof a)return!1;var i=l();i["false"]=i["null"]=i["true"]=i.undefined=!1;var c=l();for(c.array=n,c.cache=i,c.push=e;++r<t;)c.push(n[r]);
|
||||
|
||||
return c}function a(n){return"\\"+Z[n]}function i(){return v.pop()||[]}function l(){return y.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function c(n){return"function"!=typeof n.toString&&"string"==typeof(n+"")}function f(n){n.length=0,v.length<w&&v.push(n)}function s(n){var r=n.cache;r&&s(r),n.array=n.cache=n.criteria=n.object=n.number=n.string=n.value=null,y.length<w&&y.push(n)}function p(n,r,e){
|
||||
r||(r=0),"undefined"==typeof e&&(e=n?n.length:0);for(var t=-1,o=e-r||0,u=Array(o<0?0:o);++t<o;)u[t]=n[r+t];return u}function g(e){function v(n){return n&&"object"==typeof n&&!st(n)&&Ke.call(n,"__wrapped__")?n:new y(n)}function y(n,r){this.__chain__=!!r,this.__wrapped__=n}function w(n){function r(){if(t){var n=p(t);Ue.apply(n,arguments)}if(this instanceof r){var u=rn(e.prototype),a=e.apply(u,n||arguments);return Fn(a)?a:u}return e.apply(o,n||arguments)}var e=n[0],t=n[2],o=n[4];return ft(r,n),r}function Z(n,r,e,t,o){
|
||||
if(e){var u=e(n);if("undefined"!=typeof u)return u}var a=Fn(n);if(!a)return n;var l=$e.call(n);if(!G[l]||!lt.nodeClass&&c(n))return n;var s=at[l];switch(l){case H:case W:return new s(+n);case K:case V:return new s(n);case M:return u=s(n.source,O.exec(n)),u.lastIndex=n.lastIndex,u}var g=st(n);if(r){var h=!t;t||(t=i()),o||(o=i());for(var v=t.length;v--;)if(t[v]==n)return o[v];u=g?s(n.length):{}}else u=g?p(n):xt({},n);return g&&(Ke.call(n,"index")&&(u.index=n.index),Ke.call(n,"input")&&(u.input=n.input)),
|
||||
r?(t.push(n),o.push(u),(g?wt:Ct)(n,function(n,a){u[a]=Z(n,r,e,t,o)}),h&&(f(t),f(o)),u):u}function rn(n,r){return Fn(n)?Xe(n):{}}function en(n,r,e){if("function"!=typeof n)return ue;if("undefined"==typeof r||!("prototype"in n))return n;var t=n.__bindData__;if("undefined"==typeof t&&(lt.funcNames&&(t=!n.name),t=t||!lt.funcDecomp,!t)){var o=qe.call(n);lt.funcNames||(t=!S.test(o)),t||(t=N.test(o),ft(n,t))}if(t===!1||t!==!0&&1&t[1])return n;switch(e){case 1:return function(e){return n.call(r,e)};case 2:
|
||||
return function(e,t){return n.call(r,e,t)};case 3:return function(e,t,o){return n.call(r,e,t,o)};case 4:return function(e,t,o,u){return n.call(r,e,t,o,u)}}return qr(n,r)}function tn(n){function r(){var n=l?a:this;if(o){var h=p(o);Ue.apply(h,arguments)}if((u||f)&&(h||(h=p(arguments)),u&&Ue.apply(h,u),f&&h.length<i))return t|=16,tn([e,s?t:-4&t,h,null,a,i]);if(h||(h=arguments),c&&(e=n[g]),this instanceof r){n=rn(e.prototype);var v=e.apply(n,h);return Fn(v)?v:n}return e.apply(n,h)}var e=n[0],t=n[1],o=n[2],u=n[3],a=n[4],i=n[5],l=1&t,c=2&t,f=4&t,s=8&t,g=e;
|
||||
|
||||
return ft(r,n),r}function on(e,t){var o=-1,a=yn(),i=e?e.length:0,l=i>=_&&a===n,c=[];if(l){var f=u(t);f?(a=r,t=f):l=!1}for(;++o<i;){var p=e[o];a(t,p)<0&&c.push(p)}return l&&s(t),c}function an(n,r,e,t){for(var o=(t||0)-1,u=n?n.length:0,a=[];++o<u;){var i=n[o];if(i&&"object"==typeof i&&"number"==typeof i.length&&(st(i)||_n(i))){r||(i=an(i,r,e));var l=-1,c=i.length,f=a.length;for(a.length+=c;++l<c;)a[f++]=i[l]}else e||a.push(i)}return a}function ln(n,r,e,t,o,u){if(e){var a=e(n,r);if("undefined"!=typeof a)return!!a;
|
||||
|
||||
}if(n===r)return 0!==n||1/n==1/r;var l=typeof n,s=typeof r;if(n===n&&(!n||!Y[l])&&(!r||!Y[s]))return!1;if(null==n||null==r)return n===r;var p=$e.call(n),g=$e.call(r);if(p==F&&(p=U),g==F&&(g=U),p!=g)return!1;switch(p){case H:case W:return+n==+r;case K:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case M:case V:return n==Ae(r)}var v=p==B;if(!v){var y=Ke.call(n,"__wrapped__"),b=Ke.call(r,"__wrapped__");if(y||b)return ln(y?n.__wrapped__:n,b?r.__wrapped__:r,e,t,o,u);if(p!=U||!lt.nodeClass&&(c(n)||c(r)))return!1;
|
||||
|
||||
var d=!lt.argsObject&&_n(n)?Oe:n.constructor,m=!lt.argsObject&&_n(r)?Oe:r.constructor;if(d!=m&&!($n(d)&&d instanceof d&&$n(m)&&m instanceof m)&&"constructor"in n&&"constructor"in r)return!1}var _=!o;o||(o=i()),u||(u=i());for(var w=o.length;w--;)if(o[w]==n)return u[w]==r;var x=0;if(a=!0,o.push(n),u.push(r),v){if(w=n.length,x=r.length,a=x==w,a||t)for(;x--;){var j=w,k=r[x];if(t)for(;j--&&!(a=ln(n[j],k,e,t,o,u)););else if(!(a=ln(n[x],k,e,t,o,u)))break}}else kt(r,function(r,i,l){return Ke.call(l,i)?(x++,
|
||||
a=Ke.call(n,i)&&ln(n[i],r,e,t,o,u)):h}),a&&!t&&kt(n,function(n,r,e){return Ke.call(e,r)?a=--x>-1:h});return o.pop(),u.pop(),_&&(f(o),f(u)),a}function cn(n,r,e,t,o){(st(r)?or:Ct)(r,function(r,u){var a,i,l=r,c=n[u];if(r&&((i=st(r))||Pt(r))){for(var f=t.length;f--;)if(a=t[f]==r){c=o[f];break}if(!a){var s;e&&(l=e(c,r),(s="undefined"!=typeof l)&&(c=l)),s||(c=i?st(c)?c:[]:Pt(c)?c:{}),t.push(r),o.push(c),s||cn(c,r,e,t,o)}}else e&&(l=e(c,r),"undefined"==typeof l&&(l=r)),"undefined"!=typeof l&&(c=l);n[u]=c;
|
||||
|
||||
})}function fn(n,r){return n+We(ut()*(r-n+1))}function sn(e,t,o){var a=-1,l=yn(),c=e?e.length:0,p=[],g=!t&&c>=_&&l===n,h=o||g?i():p;if(g){var v=u(h);l=r,h=v}for(;++a<c;){var y=e[a],b=o?o(y,a,e):y;(t?!a||h[h.length-1]!==b:l(h,b)<0)&&((o||g)&&h.push(b),p.push(y))}return g?(f(h.array),s(h)):o&&f(h),p}function pn(n){return function(r,e,t){var o={};if(e=v.createCallback(e,t,3),st(r))for(var u=-1,a=r.length;++u<a;){var i=r[u];n(o,i,e(i,u,r),r)}else wt(r,function(r,t,u){n(o,r,e(r,t,u),u)});return o}}function gn(n,r,e,t,o,u){
|
||||
var a=1&r,i=2&r,l=4&r,c=16&r,f=32&r;if(!i&&!$n(n))throw new Ie;c&&!e.length&&(r&=-17,c=e=!1),f&&!t.length&&(r&=-33,f=t=!1);var s=n&&n.__bindData__;if(s&&s!==!0)return s=p(s),s[2]&&(s[2]=p(s[2])),s[3]&&(s[3]=p(s[3])),!a||1&s[1]||(s[4]=o),!a&&1&s[1]&&(r|=8),!l||4&s[1]||(s[5]=u),c&&Ue.apply(s[2]||(s[2]=[]),e),f&&Je.apply(s[3]||(s[3]=[]),t),s[1]|=r,gn.apply(null,s);var g=1==r||17===r?w:tn;return g([n,r,e,t,o,u])}function hn(){X.shadowedProps=D,X.array=X.bottom=X.loop=X.top="",X.init="iterable",X.useHas=!0;
|
||||
|
||||
for(var n,r=0;n=arguments[r];r++)for(var e in n)X[e]=n[e];var t=X.args;X.firstArg=/^[^,]+/.exec(t)[0];var o=Ce("baseCreateCallback, errorClass, errorProto, hasOwnProperty, indicatorObject, isArguments, isArray, isString, keys, objectProto, objectTypes, nonEnumProps, stringClass, stringProto, toString","return function("+t+") {\n"+ct(X)+"\n}");return o(en,q,Ne,Ke,d,_n,st,zn,X.keys,Re,Y,it,V,Te,$e)}function vn(n){return bt[n]}function yn(){var r=(r=v.indexOf)===Cr?n:r;return r}function bn(n){return"function"==typeof n&&Fe.test(n);
|
||||
|
||||
}function dn(n){var r,e;return!n||$e.call(n)!=U||(r=n.constructor,$n(r)&&!(r instanceof r))||!lt.argsClass&&_n(n)||!lt.nodeClass&&c(n)?!1:lt.ownLast?(kt(n,function(n,r,t){return e=Ke.call(t,r),!1}),e!==!1):(kt(n,function(n,r){e=r}),"undefined"==typeof e||Ke.call(n,e))}function mn(n){return dt[n]}function _n(n){return n&&"object"==typeof n&&"number"==typeof n.length&&$e.call(n)==F||!1}function wn(n,r,e,t){return"boolean"!=typeof r&&null!=r&&(t=e,e=r,r=!1),Z(n,r,"function"==typeof e&&en(e,t,1))}function xn(n,r,e){
|
||||
return Z(n,!0,"function"==typeof r&&en(r,e,1))}function jn(n,r){var e=rn(n);return r?xt(e,r):e}function kn(n,r,e){var t;return r=v.createCallback(r,e,3),Ct(n,function(n,e,o){return r(n,e,o)?(t=e,!1):h}),t}function Cn(n,r,e){var t;return r=v.createCallback(r,e,3),En(n,function(n,e,o){return r(n,e,o)?(t=e,!1):h}),t}function Pn(n,r,e){var t=[];kt(n,function(n,r){t.push(r,n)});var o=t.length;for(r=en(r,e,3);o--&&r(t[o--],t[o],n)!==!1;);return n}function En(n,r,e){var t=gt(n),o=t.length;for(r=en(r,e,3);o--;){
|
||||
var u=t[o];if(r(n[u],u,n)===!1)break}return n}function On(n){var r=[];return kt(n,function(n,e){$n(n)&&r.push(e)}),r.sort()}function Sn(n,r){return n?Ke.call(n,r):!1}function An(n){for(var r=-1,e=gt(n),t=e.length,o={};++r<t;){var u=e[r];o[n[u]]=u}return o}function In(n){return n===!0||n===!1||n&&"object"==typeof n&&$e.call(n)==H||!1}function Ln(n){return n&&"object"==typeof n&&$e.call(n)==W||!1}function Nn(n){return n&&1===n.nodeType||!1}function Rn(n){var r=!0;if(!n)return r;var e=$e.call(n),t=n.length;
|
||||
|
||||
return e==B||e==V||(lt.argsClass?e==F:_n(n))||e==U&&"number"==typeof t&&$n(n.splice)?!t:(Ct(n,function(){return r=!1}),r)}function Tn(n,r,e,t){return ln(n,r,"function"==typeof e&&en(e,t,2))}function Dn(n){return Ze(n)&&!nt(parseFloat(n))}function $n(n){return"function"==typeof n}function Fn(n){return!(!n||!Y[typeof n])}function Bn(n){return Wn(n)&&n!=+n}function Hn(n){return null===n}function Wn(n){return"number"==typeof n||n&&"object"==typeof n&&$e.call(n)==K||!1}function qn(n){return n&&Y[typeof n]&&$e.call(n)==M||!1;
|
||||
|
||||
}function zn(n){return"string"==typeof n||n&&"object"==typeof n&&$e.call(n)==V||!1}function Kn(n){return"undefined"==typeof n}function Un(n,r,e){var t={};return r=v.createCallback(r,e,3),Ct(n,function(n,e,o){t[e]=r(n,e,o)}),t}function Mn(n){var r=arguments,e=2;if(!Fn(n))return n;if("number"!=typeof r[2]&&(e=r.length),e>3&&"function"==typeof r[e-2])var t=en(r[--e-1],r[e--],2);else e>2&&"function"==typeof r[e-1]&&(t=r[--e]);for(var o=p(arguments,1,e),u=-1,a=i(),l=i();++u<e;)cn(n,o[u],t,a,l);return f(a),
|
||||
f(l),n}function Vn(n,r,e){var t={};if("function"!=typeof r){var o=[];kt(n,function(n,r){o.push(r)}),o=on(o,an(arguments,!0,!1,1));for(var u=-1,a=o.length;++u<a;){var i=o[u];t[i]=n[i]}}else r=v.createCallback(r,e,3),kt(n,function(n,e,o){r(n,e,o)||(t[e]=n)});return t}function Gn(n){for(var r=-1,e=gt(n),t=e.length,o=we(t);++r<t;){var u=e[r];o[r]=[u,n[u]]}return o}function Jn(n,r,e){var t={};if("function"!=typeof r)for(var o=-1,u=an(arguments,!0,!1,1),a=Fn(n)?u.length:0;++o<a;){var i=u[o];i in n&&(t[i]=n[i]);
|
||||
|
||||
}else r=v.createCallback(r,e,3),kt(n,function(n,e,o){r(n,e,o)&&(t[e]=n)});return t}function Qn(n,r,e,t){var o=st(n);if(null==e)if(o)e=[];else{var u=n&&n.constructor,a=u&&u.prototype;e=rn(a)}return r&&(r=v.createCallback(r,t,4),(o?wt:Ct)(n,function(n,t,o){return r(e,n,t,o)})),e}function Xn(n){for(var r=-1,e=gt(n),t=e.length,o=we(t);++r<t;)o[r]=n[e[r]];return o}function Yn(n){var r=arguments,e=-1,t=an(r,!0,!1,1),o=r[2]&&r[2][r[1]]===n?1:t.length,u=we(o);for(lt.unindexedChars&&zn(n)&&(n=n.split(""));++e<o;)u[e]=n[t[e]];
|
||||
|
||||
return u}function Zn(n,r,e){var t=-1,o=yn(),u=n?n.length:0,a=!1;return e=(e<0?et(0,u+e):e)||0,st(n)?a=o(n,r,e)>-1:"number"==typeof u?a=(zn(n)?n.indexOf(r,e):o(n,r,e))>-1:wt(n,function(n){return++t<e?h:!(a=n===r)}),a}function nr(n,r,e){var t=!0;if(r=v.createCallback(r,e,3),st(n))for(var o=-1,u=n.length;++o<u&&(t=!!r(n[o],o,n)););else wt(n,function(n,e,o){return t=!!r(n,e,o)});return t}function rr(n,r,e){var t=[];if(r=v.createCallback(r,e,3),st(n))for(var o=-1,u=n.length;++o<u;){var a=n[o];r(a,o,n)&&t.push(a);
|
||||
|
||||
}else wt(n,function(n,e,o){r(n,e,o)&&t.push(n)});return t}function er(n,r,e){if(r=v.createCallback(r,e,3),!st(n)){var t;return wt(n,function(n,e,o){return r(n,e,o)?(t=n,!1):h}),t}for(var o=-1,u=n.length;++o<u;){var a=n[o];if(r(a,o,n))return a}}function tr(n,r,e){var t;return r=v.createCallback(r,e,3),ur(n,function(n,e,o){return r(n,e,o)?(t=n,!1):h}),t}function or(n,r,e){if(r&&"undefined"==typeof e&&st(n))for(var t=-1,o=n.length;++t<o&&r(n[t],t,n)!==!1;);else wt(n,r,e);return n}function ur(n,r,e){
|
||||
var t=n,o=n?n.length:0;if(r=r&&"undefined"==typeof e?r:en(r,e,3),st(n))for(;o--&&r(n[o],o,n)!==!1;);else{if("number"!=typeof o){var u=gt(n);o=u.length}else lt.unindexedChars&&zn(n)&&(t=n.split(""));wt(n,function(n,e,a){return e=u?u[--o]:--o,r(t[e],e,a)})}return n}function ar(n,r){var e=p(arguments,2),t=-1,o="function"==typeof r,u=n?n.length:0,a=we("number"==typeof u?u:0);return or(n,function(n){a[++t]=(o?r:n[r]).apply(n,e)}),a}function ir(n,r,e){var t=-1,o=n?n.length:0,u=we("number"==typeof o?o:0);
|
||||
|
||||
if(r=v.createCallback(r,e,3),st(n))for(;++t<o;)u[t]=r(n[t],t,n);else wt(n,function(n,e,o){u[++t]=r(n,e,o)});return u}function lr(n,r,e){var o=-(1/0),u=o;if("function"!=typeof r&&e&&e[r]===n&&(r=null),null==r&&st(n))for(var a=-1,i=n.length;++a<i;){var l=n[a];l>u&&(u=l)}else r=null==r&&zn(n)?t:v.createCallback(r,e,3),wt(n,function(n,e,t){var a=r(n,e,t);a>o&&(o=a,u=n)});return u}function cr(n,r,e){var o=1/0,u=o;if("function"!=typeof r&&e&&e[r]===n&&(r=null),null==r&&st(n))for(var a=-1,i=n.length;++a<i;){
|
||||
var l=n[a];l<u&&(u=l)}else r=null==r&&zn(n)?t:v.createCallback(r,e,3),wt(n,function(n,e,t){var a=r(n,e,t);a<o&&(o=a,u=n)});return u}function fr(n,r,e,t){var o=arguments.length<3;if(r=v.createCallback(r,t,4),st(n)){var u=-1,a=n.length;for(o&&(e=n[++u]);++u<a;)e=r(e,n[u],u,n)}else wt(n,function(n,t,u){e=o?(o=!1,n):r(e,n,t,u)});return e}function sr(n,r,e,t){var o=arguments.length<3;return r=v.createCallback(r,t,4),ur(n,function(n,t,u){e=o?(o=!1,n):r(e,n,t,u)}),e}function pr(n,r,e){return r=v.createCallback(r,e,3),
|
||||
rr(n,function(n,e,t){return!r(n,e,t)})}function gr(n,r,e){if(n&&"number"!=typeof n.length?n=Xn(n):lt.unindexedChars&&zn(n)&&(n=n.split("")),null==r||e)return n?n[fn(0,n.length-1)]:h;var t=hr(n);return t.length=tt(et(0,r),t.length),t}function hr(n){var r=-1,e=n?n.length:0,t=we("number"==typeof e?e:0);return or(n,function(n){var e=fn(0,++r);t[r]=t[e],t[e]=n}),t}function vr(n){var r=n?n.length:0;return"number"==typeof r?r:gt(n).length}function yr(n,r,e){var t;if(r=v.createCallback(r,e,3),st(n))for(var o=-1,u=n.length;++o<u&&!(t=r(n[o],o,n)););else wt(n,function(n,e,o){
|
||||
return!(t=r(n,e,o))});return!!t}function br(n,r,e){var t=-1,u=st(r),a=n?n.length:0,c=we("number"==typeof a?a:0);for(u||(r=v.createCallback(r,e,3)),or(n,function(n,e,o){var a=c[++t]=l();u?a.criteria=ir(r,function(r){return n[r]}):(a.criteria=i())[0]=r(n,e,o),a.index=t,a.value=n}),a=c.length,c.sort(o);a--;){var p=c[a];c[a]=p.value,u||f(p.criteria),s(p)}return c}function dr(n){return n&&"number"==typeof n.length?lt.unindexedChars&&zn(n)?n.split(""):p(n):Xn(n)}function mr(n){for(var r=-1,e=n?n.length:0,t=[];++r<e;){
|
||||
var o=n[r];o&&t.push(o)}return t}function _r(n){return on(n,an(arguments,!0,!0,1))}function wr(n,r,e){var t=-1,o=n?n.length:0;for(r=v.createCallback(r,e,3);++t<o;)if(r(n[t],t,n))return t;return-1}function xr(n,r,e){var t=n?n.length:0;for(r=v.createCallback(r,e,3);t--;)if(r(n[t],t,n))return t;return-1}function jr(n,r,e){var t=0,o=n?n.length:0;if("number"!=typeof r&&null!=r){var u=-1;for(r=v.createCallback(r,e,3);++u<o&&r(n[u],u,n);)t++}else if(t=r,null==t||e)return n?n[0]:h;return p(n,0,tt(et(0,t),o));
|
||||
|
||||
}function kr(n,r,e,t){return"boolean"!=typeof r&&null!=r&&(t=e,e="function"!=typeof r&&t&&t[r]===n?null:r,r=!1),null!=e&&(n=ir(n,e,t)),an(n,r)}function Cr(r,e,t){if("number"==typeof t){var o=r?r.length:0;t=t<0?et(0,o+t):t||0}else if(t){var u=Rr(r,e);return r[u]===e?u:-1}return n(r,e,t)}function Pr(n,r,e){var t=0,o=n?n.length:0;if("number"!=typeof r&&null!=r){var u=o;for(r=v.createCallback(r,e,3);u--&&r(n[u],u,n);)t++}else t=null==r||e?1:r||t;return p(n,0,tt(et(0,o-t),o))}function Er(){for(var e=[],t=-1,o=arguments.length,a=i(),l=yn(),c=l===n,p=i();++t<o;){
|
||||
var g=arguments[t];(st(g)||_n(g))&&(e.push(g),a.push(c&&g.length>=_&&u(t?e[t]:p)))}var h=e[0],v=-1,y=h?h.length:0,b=[];n:for(;++v<y;){var d=a[0];if(g=h[v],(d?r(d,g):l(p,g))<0){for(t=o,(d||p).push(g);--t;)if(d=a[t],(d?r(d,g):l(e[t],g))<0)continue n;b.push(g)}}for(;o--;)d=a[o],d&&s(d);return f(a),f(p),b}function Or(n,r,e){var t=0,o=n?n.length:0;if("number"!=typeof r&&null!=r){var u=o;for(r=v.createCallback(r,e,3);u--&&r(n[u],u,n);)t++}else if(t=r,null==t||e)return n?n[o-1]:h;return p(n,et(0,o-t))}function Sr(n,r,e){
|
||||
var t=n?n.length:0;for("number"==typeof e&&(t=(e<0?et(0,t+e):tt(e,t-1))+1);t--;)if(n[t]===r)return t;return-1}function Ar(n){for(var r=arguments,e=0,t=r.length,o=n?n.length:0;++e<t;)for(var u=-1,a=r[e];++u<o;)n[u]===a&&(Ge.call(n,u--,1),o--);return n}function Ir(n,r,e){n=+n||0,e="number"==typeof e?e:+e||1,null==r&&(r=n,n=0);for(var t=-1,o=et(0,Be((r-n)/(e||1))),u=we(o);++t<o;)u[t]=n,n+=e;return u}function Lr(n,r,e){var t=-1,o=n?n.length:0,u=[];for(r=v.createCallback(r,e,3);++t<o;){var a=n[t];r(a,t,n)&&(u.push(a),
|
||||
Ge.call(n,t--,1),o--)}return u}function Nr(n,r,e){if("number"!=typeof r&&null!=r){var t=0,o=-1,u=n?n.length:0;for(r=v.createCallback(r,e,3);++o<u&&r(n[o],o,n);)t++}else t=null==r||e?1:et(0,r);return p(n,t)}function Rr(n,r,e,t){var o=0,u=n?n.length:o;for(e=e?v.createCallback(e,t,1):ue,r=e(r);o<u;){var a=o+u>>>1;e(n[a])<r?o=a+1:u=a}return o}function Tr(){return sn(an(arguments,!0,!0))}function Dr(n,r,e,t){return"boolean"!=typeof r&&null!=r&&(t=e,e="function"!=typeof r&&t&&t[r]===n?null:r,r=!1),null!=e&&(e=v.createCallback(e,t,3)),
|
||||
sn(n,r,e)}function $r(n){return on(n,p(arguments,1))}function Fr(){for(var n=-1,r=arguments.length;++n<r;){var e=arguments[n];if(st(e)||_n(e))var t=t?sn(on(t,e).concat(on(e,t))):e}return t||[]}function Br(){for(var n=arguments.length>1?arguments:arguments[0],r=-1,e=n?lr(At(n,"length")):0,t=we(e<0?0:e);++r<e;)t[r]=At(n,r);return t}function Hr(n,r){var e=-1,t=n?n.length:0,o={};for(r||!t||st(n[0])||(r=[]);++e<t;){var u=n[e];r?o[u]=r[e]:u&&(o[u[0]]=u[1])}return o}function Wr(n,r){if(!$n(r))throw new Ie;
|
||||
|
||||
return function(){return--n<1?r.apply(this,arguments):h}}function qr(n,r){return arguments.length>2?gn(n,17,p(arguments,2),null,r):gn(n,1,null,null,r)}function zr(n){for(var r=arguments.length>1?an(arguments,!0,!1,1):On(n),e=-1,t=r.length;++e<t;){var o=r[e];n[o]=gn(n[o],1,null,null,n)}return n}function Kr(n,r){return arguments.length>2?gn(r,19,p(arguments,2),null,n):gn(r,3,null,null,n)}function Ur(){for(var n=arguments,r=n.length;r--;)if(!$n(n[r]))throw new Ie;return function(){for(var r=arguments,e=n.length;e--;)r=[n[e].apply(this,r)];
|
||||
|
||||
return r[0]}}function Mr(n,r){return r="number"==typeof r?r:+r||n.length,gn(n,4,null,null,null,r)}function Vr(n,r,e){var t,o,u,a,i,l,c,f=0,s=!1,p=!0;if(!$n(n))throw new Ie;if(r=et(0,r)||0,e===!0){var g=!0;p=!1}else Fn(e)&&(g=e.leading,s="maxWait"in e&&(et(r,e.maxWait)||0),p="trailing"in e?e.trailing:p);var v=function(){var e=r-(Lt()-a);if(e>0)l=Ve(v,e);else{o&&He(o);var s=c;o=l=c=h,s&&(f=Lt(),u=n.apply(i,t),l||o||(t=i=null))}},y=function(){l&&He(l),o=l=c=h,(p||s!==r)&&(f=Lt(),u=n.apply(i,t),l||o||(t=i=null));
|
||||
|
||||
};return function(){if(t=arguments,a=Lt(),i=this,c=p&&(l||!g),s===!1)var e=g&&!l;else{o||g||(f=a);var h=s-(a-f),b=h<=0;b?(o&&(o=He(o)),f=a,u=n.apply(i,t)):o||(o=Ve(y,h))}return b&&l?l=He(l):l||r===s||(l=Ve(v,r)),e&&(b=!0,u=n.apply(i,t)),!b||l||o||(t=i=null),u}}function Gr(n){if(!$n(n))throw new Ie;var r=p(arguments,1);return Ve(function(){n.apply(h,r)},1)}function Jr(n,r){if(!$n(n))throw new Ie;var e=p(arguments,2);return Ve(function(){n.apply(h,e)},r)}function Qr(n,r){if(!$n(n))throw new Ie;var e=function(){
|
||||
var t=e.cache,o=r?r.apply(this,arguments):m+arguments[0];return Ke.call(t,o)?t[o]:t[o]=n.apply(this,arguments)};return e.cache={},e}function Xr(n){var r,e;if(!$n(n))throw new Ie;return function(){return r?e:(r=!0,e=n.apply(this,arguments),n=null,e)}}function Yr(n){return gn(n,16,p(arguments,1))}function Zr(n){return gn(n,32,null,p(arguments,1))}function ne(n,r,e){var t=!0,o=!0;if(!$n(n))throw new Ie;return e===!1?t=!1:Fn(e)&&(t="leading"in e?e.leading:t,o="trailing"in e?e.trailing:o),J.leading=t,
|
||||
J.maxWait=r,J.trailing=o,Vr(n,r,J)}function re(n,r){return gn(r,16,[n])}function ee(n){return function(){return n}}function te(n,r,e){var t=typeof n;if(null==n||"function"==t)return en(n,r,e);if("object"!=t)return ce(n);var o=gt(n),u=o[0],a=n[u];return 1!=o.length||a!==a||Fn(a)?function(r){for(var e=o.length,t=!1;e--&&(t=ln(r[o[e]],n[o[e]],null,!0)););return t}:function(n){var r=n[u];return a===r&&(0!==a||1/a==1/r)}}function oe(n){return null==n?"":Ae(n).replace(_t,vn)}function ue(n){return n}function ae(n,r,e){
|
||||
var t=!0,o=r&&On(r);r&&(e||o.length)||(null==e&&(e=r),u=y,r=n,n=v,o=On(r)),e===!1?t=!1:Fn(e)&&"chain"in e&&(t=e.chain);var u=n,a=$n(u);or(o,function(e){var o=n[e]=r[e];a&&(u.prototype[e]=function(){var r=this.__chain__,e=this.__wrapped__,a=[e];Ue.apply(a,arguments);var i=o.apply(n,a);if(t||r){if(e===i&&Fn(i))return this;i=new u(i),i.__chain__=r}return i})})}function ie(){return e._=De,this}function le(){}function ce(n){return function(r){return r[n]}}function fe(n,r,e){var t=null==n,o=null==r;if(null==e&&("boolean"==typeof n&&o?(e=n,
|
||||
n=1):o||"boolean"!=typeof r||(e=r,o=!0)),t&&o&&(r=1),n=+n||0,o?(r=n,n=0):r=+r||0,e||n%1||r%1){var u=ut();return tt(n+u*(r-n+parseFloat("1e-"+((u+"").length-1))),r)}return fn(n,r)}function se(n,r){if(n){var e=n[r];return $n(e)?n[r]():e}}function pe(n,r,e){var t=v.templateSettings;n=Ae(n||""),e=jt({},e,t);var o,u=jt({},e.imports,t.imports),i=gt(u),l=Xn(u),c=0,f=e.interpolate||L,s="__p += '",p=Se((e.escape||L).source+"|"+f.source+"|"+(f===A?E:L).source+"|"+(e.evaluate||L).source+"|$","g");n.replace(p,function(r,e,t,u,i,l){
|
||||
return t||(t=u),s+=n.slice(c,l).replace(R,a),e&&(s+="' +\n__e("+e+") +\n'"),i&&(o=!0,s+="';\n"+i+";\n__p += '"),t&&(s+="' +\n((__t = ("+t+")) == null ? '' : __t) +\n'"),c=l+r.length,r}),s+="';\n";var g=e.variable,y=g;y||(g="obj",s="with ("+g+") {\n"+s+"\n}\n"),s=(o?s.replace(j,""):s).replace(C,"$1").replace(P,"$1;"),s="function("+g+") {\n"+(y?"":g+" || ("+g+" = {});\n")+"var __t, __p = '', __e = _.escape"+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}";
|
||||
|
||||
var b="\n/*\n//# sourceURL="+(e.sourceURL||"/lodash/template/source["+$++ +"]")+"\n*/";try{var d=Ce(i,"return "+s+b).apply(h,l)}catch(m){throw m.source=s,m}return r?d(r):(d.source=s,d)}function ge(n,r,e){n=(n=+n)>-1?n:0;var t=-1,o=we(n);for(r=en(r,e,1);++t<n;)o[t]=r(t);return o}function he(n){return null==n?"":Ae(n).replace(mt,mn)}function ve(n){var r=++b;return Ae(null==n?"":n)+r}function ye(n){return n=new y(n),n.__chain__=!0,n}function be(n,r){return r(n),n}function de(){return this.__chain__=!0,
|
||||
this}function me(){return Ae(this.__wrapped__)}function _e(){return this.__wrapped__}e=e?un.defaults(nn.Object(),e,un.pick(nn,T)):nn;var we=e.Array,xe=e.Boolean,je=e.Date,ke=e.Error,Ce=e.Function,Pe=e.Math,Ee=e.Number,Oe=e.Object,Se=e.RegExp,Ae=e.String,Ie=e.TypeError,Le=[],Ne=ke.prototype,Re=Oe.prototype,Te=Ae.prototype,De=e._,$e=Re.toString,Fe=Se("^"+Ae($e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Be=Pe.ceil,He=e.clearTimeout,We=Pe.floor,qe=Ce.prototype.toString,ze=bn(ze=Oe.getPrototypeOf)&&ze,Ke=Re.hasOwnProperty,Ue=Le.push,Me=Re.propertyIsEnumerable,Ve=e.setTimeout,Ge=Le.splice,Je=Le.unshift,Qe=function(){
|
||||
try{var n={},r=bn(r=Oe.defineProperty)&&r,e=r(n,n,n)&&r}catch(t){}return e}(),Xe=bn(Xe=Oe.create)&&Xe,Ye=bn(Ye=we.isArray)&&Ye,Ze=e.isFinite,nt=e.isNaN,rt=bn(rt=Oe.keys)&&rt,et=Pe.max,tt=Pe.min,ot=e.parseInt,ut=Pe.random,at={};at[B]=we,at[H]=xe,at[W]=je,at[z]=Ce,at[U]=Oe,at[K]=Ee,at[M]=Se,at[V]=Ae;var it={};it[B]=it[W]=it[K]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},it[H]=it[V]={constructor:!0,toString:!0,valueOf:!0},it[q]=it[z]=it[M]={constructor:!0,toString:!0},it[U]={constructor:!0
|
||||
},function(){for(var n=D.length;n--;){var r=D[n];for(var e in it)Ke.call(it,e)&&!Ke.call(it[e],r)&&(it[e][r]=!1)}}(),y.prototype=v.prototype;var lt=v.support={};!function(){var n=function(){this.x=1},r={0:1,length:1},t=[];n.prototype={valueOf:1,y:1};for(var o in new n)t.push(o);for(o in arguments);lt.argsClass=$e.call(arguments)==F,lt.argsObject=arguments.constructor==Oe&&!(arguments instanceof we),lt.enumErrorProps=Me.call(Ne,"message")||Me.call(Ne,"name"),lt.enumPrototypes=Me.call(n,"prototype"),
|
||||
lt.funcDecomp=!bn(e.WinRTError)&&N.test(g),lt.funcNames="string"==typeof Ce.name,lt.nonEnumArgs=0!=o,lt.nonEnumShadows=!/valueOf/.test(t),lt.ownLast="x"!=t[0],lt.spliceObjects=(Le.splice.call(r,0,1),!r[0]),lt.unindexedChars="x"[0]+Oe("x")[0]!="xx";try{lt.nodeClass=!($e.call(document)==U&&!({toString:0}+""))}catch(u){lt.nodeClass=!0}}(1),v.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:A,variable:"",imports:{_:v}};var ct=function(n){var r="var index, iterable = "+n.firstArg+", result = "+n.init+";\nif (!iterable) return result;\n"+n.top+";";
|
||||
|
||||
n.array?(r+="\nvar length = iterable.length; index = -1;\nif ("+n.array+") { ",lt.unindexedChars&&(r+="\n if (isString(iterable)) {\n iterable = iterable.split('')\n } "),r+="\n while (++index < length) {\n "+n.loop+";\n }\n}\nelse { "):lt.nonEnumArgs&&(r+="\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += '';\n "+n.loop+";\n }\n } else { "),lt.enumPrototypes&&(r+="\n var skipProto = typeof iterable == 'function';\n "),
|
||||
lt.enumErrorProps&&(r+="\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n ");var e=[];if(lt.enumPrototypes&&e.push('!(skipProto && index == "prototype")'),lt.enumErrorProps&&e.push('!(skipErrorProps && (index == "message" || index == "name"))'),n.useHas&&n.keys)r+="\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n",
|
||||
e.length&&(r+=" if ("+e.join(" && ")+") {\n "),r+=n.loop+"; ",e.length&&(r+="\n }"),r+="\n } ";else if(r+="\n for (index in iterable) {\n",n.useHas&&e.push("hasOwnProperty.call(iterable, index)"),e.length&&(r+=" if ("+e.join(" && ")+") {\n "),r+=n.loop+"; ",e.length&&(r+="\n }"),r+="\n } ",lt.nonEnumShadows){for(r+="\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n ",
|
||||
k=0;k<7;k++)r+="\n index = '"+n.shadowedProps[k]+"';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))",n.useHas||(r+=" || (!nonEnum[index] && iterable[index] !== objectProto[index])"),r+=") {\n "+n.loop+";\n } ";r+="\n } "}return(n.array||lt.nonEnumArgs)&&(r+="\n}"),r+=n.bottom+";\nreturn result"};Xe||(rn=function(){function n(){}return function(r){if(Fn(r)){n.prototype=r;var t=new n;n.prototype=null}return t||e.Object()}}());var ft=Qe?function(n,r){
|
||||
Q.value=r,Qe(n,"__bindData__",Q),Q.value=null}:le;lt.argsClass||(_n=function(n){return n&&"object"==typeof n&&"number"==typeof n.length&&Ke.call(n,"callee")&&!Me.call(n,"callee")||!1});var st=Ye||function(n){return n&&"object"==typeof n&&"number"==typeof n.length&&$e.call(n)==B||!1},pt=hn({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),gt=rt?function(n){return Fn(n)?lt.enumPrototypes&&"function"==typeof n||lt.nonEnumArgs&&n.length&&_n(n)?pt(n):rt(n):[];
|
||||
|
||||
}:pt,ht={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",array:"typeof length == 'number'",keys:gt,loop:"if (callback(iterable[index], index, collection) === false) return result"},vt={args:"object, source, guard",top:"var args = arguments,\n argsIndex = 0,\n argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n iterable = args[argsIndex];\n if (iterable && objectTypes[typeof iterable]) {",
|
||||
keys:gt,loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:" }\n}"},yt={top:"if (!objectTypes[typeof iterable]) return result;\n"+ht.top,array:!1},bt={"&":"&","<":"<",">":">",'"':""","'":"'"},dt=An(bt),mt=Se("("+gt(dt).join("|")+")","g"),_t=Se("["+gt(bt).join("")+"]","g"),wt=hn(ht),xt=hn(vt,{top:vt.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n callback = args[--argsLength];\n}"),
|
||||
loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"}),jt=hn(vt),kt=hn(ht,yt,{useHas:!1}),Ct=hn(ht,yt);$n(/x/)&&($n=function(n){return"function"==typeof n&&$e.call(n)==z});var Pt=ze?function(n){if(!n||$e.call(n)!=U||!lt.argsClass&&_n(n))return!1;var r=n.valueOf,e=bn(r)&&(e=ze(r))&&ze(e);return e?n==e||ze(n)==e:dn(n)}:dn,Et=pn(function(n,r,e){Ke.call(n,e)?n[e]++:n[e]=1}),Ot=pn(function(n,r,e){(Ke.call(n,e)?n[e]:n[e]=[]).push(r)}),St=pn(function(n,r,e){n[e]=r;
|
||||
|
||||
}),At=ir,It=rr,Lt=bn(Lt=je.now)&&Lt||function(){return(new je).getTime()},Nt=8==ot(x+"08")?ot:function(n,r){return ot(zn(n)?n.replace(I,""):n,r||0)};return v.after=Wr,v.assign=xt,v.at=Yn,v.bind=qr,v.bindAll=zr,v.bindKey=Kr,v.chain=ye,v.compact=mr,v.compose=Ur,v.constant=ee,v.countBy=Et,v.create=jn,v.createCallback=te,v.curry=Mr,v.debounce=Vr,v.defaults=jt,v.defer=Gr,v.delay=Jr,v.difference=_r,v.filter=rr,v.flatten=kr,v.forEach=or,v.forEachRight=ur,v.forIn=kt,v.forInRight=Pn,v.forOwn=Ct,v.forOwnRight=En,
|
||||
v.functions=On,v.groupBy=Ot,v.indexBy=St,v.initial=Pr,v.intersection=Er,v.invert=An,v.invoke=ar,v.keys=gt,v.map=ir,v.mapValues=Un,v.max=lr,v.memoize=Qr,v.merge=Mn,v.min=cr,v.omit=Vn,v.once=Xr,v.pairs=Gn,v.partial=Yr,v.partialRight=Zr,v.pick=Jn,v.pluck=At,v.property=ce,v.pull=Ar,v.range=Ir,v.reject=pr,v.remove=Lr,v.rest=Nr,v.shuffle=hr,v.sortBy=br,v.tap=be,v.throttle=ne,v.times=ge,v.toArray=dr,v.transform=Qn,v.union=Tr,v.uniq=Dr,v.values=Xn,v.where=It,v.without=$r,v.wrap=re,v.xor=Fr,v.zip=Br,v.zipObject=Hr,
|
||||
v.collect=ir,v.drop=Nr,v.each=or,v.eachRight=ur,v.extend=xt,v.methods=On,v.object=Hr,v.select=rr,v.tail=Nr,v.unique=Dr,v.unzip=Br,ae(v),v.clone=wn,v.cloneDeep=xn,v.contains=Zn,v.escape=oe,v.every=nr,v.find=er,v.findIndex=wr,v.findKey=kn,v.findLast=tr,v.findLastIndex=xr,v.findLastKey=Cn,v.has=Sn,v.identity=ue,v.indexOf=Cr,v.isArguments=_n,v.isArray=st,v.isBoolean=In,v.isDate=Ln,v.isElement=Nn,v.isEmpty=Rn,v.isEqual=Tn,v.isFinite=Dn,v.isFunction=$n,v.isNaN=Bn,v.isNull=Hn,v.isNumber=Wn,v.isObject=Fn,
|
||||
v.isPlainObject=Pt,v.isRegExp=qn,v.isString=zn,v.isUndefined=Kn,v.lastIndexOf=Sr,v.mixin=ae,v.noConflict=ie,v.noop=le,v.now=Lt,v.parseInt=Nt,v.random=fe,v.reduce=fr,v.reduceRight=sr,v.result=se,v.runInContext=g,v.size=vr,v.some=yr,v.sortedIndex=Rr,v.template=pe,v.unescape=he,v.uniqueId=ve,v.all=nr,v.any=yr,v.detect=er,v.findWhere=er,v.foldl=fr,v.foldr=sr,v.include=Zn,v.inject=fr,ae(function(){var n={};return Ct(v,function(r,e){v.prototype[e]||(n[e]=r)}),n}(),!1),v.first=jr,v.last=Or,v.sample=gr,v.take=jr,
|
||||
v.head=jr,Ct(v,function(n,r){var e="sample"!==r;v.prototype[r]||(v.prototype[r]=function(r,t){var o=this.__chain__,u=n(this.__wrapped__,r,t);return o||null!=r&&(!t||e&&"function"==typeof r)?new y(u,o):u})}),v.VERSION="2.4.2",v.prototype.chain=de,v.prototype.toString=me,v.prototype.value=_e,v.prototype.valueOf=_e,wt(["join","pop","shift"],function(n){var r=Le[n];v.prototype[n]=function(){var n=this.__chain__,e=r.apply(this.__wrapped__,arguments);return n?new y(e,n):e}}),wt(["push","reverse","sort","unshift"],function(n){
|
||||
var r=Le[n];v.prototype[n]=function(){return r.apply(this.__wrapped__,arguments),this}}),wt(["concat","slice","splice"],function(n){var r=Le[n];v.prototype[n]=function(){return new y(r.apply(this.__wrapped__,arguments),this.__chain__)}}),lt.spliceObjects||wt(["pop","shift","splice"],function(n){var r=Le[n],e="splice"==n;v.prototype[n]=function(){var n=this.__chain__,t=this.__wrapped__,o=r.apply(t,arguments);return 0===t.length&&delete t[0],n||e?new y(o,n):o}}),v}var h,v=[],y=[],b=0,d={},m=+new Date+"",_=75,w=40,x=" \f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",j=/\b__p \+= '';/g,C=/\b(__p \+=) '' \+/g,P=/(__e\(.*?\)|\b__t\)) \+\n'';/g,E=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,O=/\w*$/,S=/^\s*function[ \n\r\t]+\w/,A=/<%=([\s\S]+?)%>/g,I=RegExp("^["+x+"]*0+(?=.$)"),L=/($^)/,N=/\bthis\b/,R=/['\n\r\t\u2028\u2029\\]/g,T=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],D=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],$=0,F="[object Arguments]",B="[object Array]",H="[object Boolean]",W="[object Date]",q="[object Error]",z="[object Function]",K="[object Number]",U="[object Object]",M="[object RegExp]",V="[object String]",G={};
|
||||
|
||||
G[z]=!1,G[F]=G[B]=G[H]=G[W]=G[K]=G[U]=G[M]=G[V]=!0;var J={leading:!1,maxWait:0,trailing:!1},Q={configurable:!1,enumerable:!1,value:null,writable:!1},X={args:"",array:null,bottom:"",firstArg:"",init:"",keys:null,loop:"",shadowedProps:null,support:null,top:"",useHas:!1},Y={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Z={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},nn=Y[typeof window]&&window||this,rn=Y[typeof exports]&&exports&&!exports.nodeType&&exports,en=Y[typeof module]&&module&&!module.nodeType&&module,tn=en&&en.exports===rn&&rn,on=Y[typeof global]&&global;
|
||||
|
||||
!on||on.global!==on&&on.window!==on||(nn=on);var un=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(nn._=un,define(function(){return un})):rn&&en?tn?(en.exports=un)._=un:rn._=un:nn._=un}).call(this);
|
||||
140
dist/lodash.js
vendored
140
dist/lodash.js
vendored
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.4.0 (Custom Build) <http://lodash.com/>
|
||||
* Lo-Dash 2.4.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <http://lodash.com/license>
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
;(function() {
|
||||
|
||||
@@ -477,29 +477,30 @@
|
||||
clearTimeout = context.clearTimeout,
|
||||
floor = Math.floor,
|
||||
fnToString = Function.prototype.toString,
|
||||
getPrototypeOf = reNative.test(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
|
||||
getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
|
||||
hasOwnProperty = objectProto.hasOwnProperty,
|
||||
push = arrayRef.push,
|
||||
setTimeout = context.setTimeout,
|
||||
splice = arrayRef.splice;
|
||||
splice = arrayRef.splice,
|
||||
unshift = arrayRef.unshift;
|
||||
|
||||
/** Used to set meta data on functions */
|
||||
var defineProperty = (function() {
|
||||
// IE 8 only accepts DOM elements
|
||||
try {
|
||||
var o = {},
|
||||
func = reNative.test(func = Object.defineProperty) && func,
|
||||
func = isNative(func = Object.defineProperty) && func,
|
||||
result = func(o, o, o) && func;
|
||||
} catch(e) { }
|
||||
return result;
|
||||
}());
|
||||
|
||||
/* Native method shortcuts for methods with the same name as other `lodash` methods */
|
||||
var nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
|
||||
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
|
||||
var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate,
|
||||
nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray,
|
||||
nativeIsFinite = context.isFinite,
|
||||
nativeIsNaN = context.isNaN,
|
||||
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeMax = Math.max,
|
||||
nativeMin = Math.min,
|
||||
nativeParseInt = context.parseInt,
|
||||
@@ -621,7 +622,7 @@
|
||||
* @memberOf _.support
|
||||
* @type boolean
|
||||
*/
|
||||
support.funcDecomp = !reNative.test(context.WinRTError) && reThis.test(runInContext);
|
||||
support.funcDecomp = !isNative(context.WinRTError) && reThis.test(runInContext);
|
||||
|
||||
/**
|
||||
* Detect if `Function#name` is supported (all but IE).
|
||||
@@ -711,7 +712,10 @@
|
||||
// `Function#bind` spec
|
||||
// http://es5.github.io/#x15.3.4.5
|
||||
if (partialArgs) {
|
||||
var args = partialArgs.slice();
|
||||
// avoid `arguments` object deoptimizations by using `slice` instead
|
||||
// of `Array.prototype.slice.call` and not assigning `arguments` to a
|
||||
// variable as a ternary expression
|
||||
var args = slice(partialArgs);
|
||||
push.apply(args, arguments);
|
||||
}
|
||||
// mimic the constructor's `return` behavior
|
||||
@@ -928,7 +932,7 @@
|
||||
function bound() {
|
||||
var thisBinding = isBind ? thisArg : this;
|
||||
if (partialArgs) {
|
||||
var args = partialArgs.slice();
|
||||
var args = slice(partialArgs);
|
||||
push.apply(args, arguments);
|
||||
}
|
||||
if (partialRightArgs || isCurry) {
|
||||
@@ -1153,51 +1157,54 @@
|
||||
|
||||
// recursively compare objects and arrays (susceptible to call stack limits)
|
||||
if (isArr) {
|
||||
// compare lengths to determine if a deep comparison is necessary
|
||||
length = a.length;
|
||||
size = b.length;
|
||||
result = size == length;
|
||||
|
||||
// compare lengths to determine if a deep comparison is necessary
|
||||
result = size == a.length;
|
||||
if (!result && !isWhere) {
|
||||
return result;
|
||||
}
|
||||
// deep compare the contents, ignoring non-numeric properties
|
||||
while (size--) {
|
||||
var index = length,
|
||||
value = b[size];
|
||||
if (result || isWhere) {
|
||||
// deep compare the contents, ignoring non-numeric properties
|
||||
while (size--) {
|
||||
var index = length,
|
||||
value = b[size];
|
||||
|
||||
if (isWhere) {
|
||||
while (index--) {
|
||||
if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
if (isWhere) {
|
||||
while (index--) {
|
||||
if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
}
|
||||
} else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
|
||||
// which, in this case, is more costly
|
||||
forIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
// count the number of properties.
|
||||
size++;
|
||||
// deep compare each property value.
|
||||
return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
|
||||
}
|
||||
});
|
||||
|
||||
if (result && !isWhere) {
|
||||
// ensure both objects have the same number of properties
|
||||
forIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
// `size` will be `-1` if `a` has more properties than `b`
|
||||
return (result = --size > -1);
|
||||
else {
|
||||
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
|
||||
// which, in this case, is more costly
|
||||
forIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
// count the number of properties.
|
||||
size++;
|
||||
// deep compare each property value.
|
||||
return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
|
||||
}
|
||||
});
|
||||
|
||||
if (result && !isWhere) {
|
||||
// ensure both objects have the same number of properties
|
||||
forIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
// `size` will be `-1` if `a` has more properties than `b`
|
||||
return (result = --size > -1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
stackA.pop();
|
||||
stackB.pop();
|
||||
|
||||
if (initedStack) {
|
||||
releaseArray(stackA);
|
||||
releaseArray(stackB);
|
||||
@@ -1304,13 +1311,8 @@
|
||||
|
||||
if (isLarge) {
|
||||
var cache = createCache(seen);
|
||||
if (cache) {
|
||||
indexOf = cacheIndexOf;
|
||||
seen = cache;
|
||||
} else {
|
||||
isLarge = false;
|
||||
seen = callback ? seen : (releaseArray(seen), result);
|
||||
}
|
||||
indexOf = cacheIndexOf;
|
||||
seen = cache;
|
||||
}
|
||||
while (++index < length) {
|
||||
var value = array[index],
|
||||
@@ -1410,8 +1412,14 @@
|
||||
}
|
||||
var bindData = func && func.__bindData__;
|
||||
if (bindData && bindData !== true) {
|
||||
bindData = bindData.slice();
|
||||
|
||||
// clone `bindData`
|
||||
bindData = slice(bindData);
|
||||
if (bindData[2]) {
|
||||
bindData[2] = slice(bindData[2]);
|
||||
}
|
||||
if (bindData[3]) {
|
||||
bindData[3] = slice(bindData[3]);
|
||||
}
|
||||
// set `thisBinding` is not previously bound
|
||||
if (isBind && !(bindData[1] & 1)) {
|
||||
bindData[4] = thisArg;
|
||||
@@ -1430,7 +1438,7 @@
|
||||
}
|
||||
// append partial right arguments
|
||||
if (isPartialRight) {
|
||||
push.apply(bindData[3] || (bindData[3] = []), partialRightArgs);
|
||||
unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs);
|
||||
}
|
||||
// merge flags
|
||||
bindData[1] |= bitmask;
|
||||
@@ -1465,6 +1473,17 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a native function.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if the `value` is a native function, else `false`.
|
||||
*/
|
||||
function isNative(value) {
|
||||
return typeof value == 'function' && reNative.test(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets `this` binding data on a given function.
|
||||
*
|
||||
@@ -1475,6 +1494,7 @@
|
||||
var setBindData = !defineProperty ? noop : function(func, value) {
|
||||
descriptor.value = value;
|
||||
defineProperty(func, '__bindData__', descriptor);
|
||||
descriptor.value = null;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2495,12 +2515,12 @@
|
||||
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
||||
* // => true
|
||||
*/
|
||||
var isPlainObject = function(value) {
|
||||
var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) {
|
||||
if (!(value && toString.call(value) == objectClass)) {
|
||||
return false;
|
||||
}
|
||||
var valueOf = value.valueOf,
|
||||
objProto = typeof valueOf == 'function' && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
|
||||
objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
|
||||
|
||||
return objProto
|
||||
? (value == objProto || getPrototypeOf(value) == objProto)
|
||||
@@ -4993,7 +5013,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array that is the smymetric difference of the provided arrays.
|
||||
* Creates an array that is the symmetric difference of the provided arrays.
|
||||
* See http://en.wikipedia.org/wiki/Symmetric_difference.
|
||||
*
|
||||
* @static
|
||||
@@ -5962,7 +5982,7 @@
|
||||
* _.defer(function() { console.log(_.now() - stamp); });
|
||||
* // => logs the number of milliseconds it took for the deferred function to be called
|
||||
*/
|
||||
var now = reNative.test(now = Date.now) && now || function() {
|
||||
var now = isNative(now = Date.now) && now || function() {
|
||||
return new Date().getTime();
|
||||
};
|
||||
|
||||
@@ -6120,7 +6140,7 @@
|
||||
* debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl
|
||||
*
|
||||
* For more information on precompiling templates see:
|
||||
* http://lodash.com/custom-builds
|
||||
* https://lodash.com/custom-builds
|
||||
*
|
||||
* For more information on Chrome extension sandboxes see:
|
||||
* http://developer.chrome.com/stable/extensions/sandboxingEval.html
|
||||
@@ -6689,7 +6709,7 @@
|
||||
* @memberOf _
|
||||
* @type string
|
||||
*/
|
||||
lodash.VERSION = '2.4.0';
|
||||
lodash.VERSION = '2.4.2';
|
||||
|
||||
// add "Chaining" functions to the wrapper
|
||||
lodash.prototype.chain = wrapperChain;
|
||||
|
||||
134
dist/lodash.min.js
vendored
134
dist/lodash.min.js
vendored
@@ -1,55 +1,87 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.4.0 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Lo-Dash 2.4.2 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
*/
|
||||
;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++e<r;)if(n[e]===t)return e;return-1}function t(t,e){var r=typeof e;if(t=t.l,"boolean"==r||null==e)return t[e]?0:-1;"number"!=r&&"string"!=r&&(r="object");var u="number"==r?e:m+e;return t=(t=t[r])&&t[u],"object"==r?t&&-1<n(t,e)?0:-1:t?0:-1}function e(n){var t=this.l,e=typeof n;if("boolean"==e||null==n)t[n]=true;else{"number"!=e&&"string"!=e&&(e="object");var r="number"==e?n:m+n,t=t[e]||(t[e]={});"object"==e?(t[r]||(t[r]=[])).push(n):t[r]=true
|
||||
}}function r(n){return n.charCodeAt(0)}function u(n,t){for(var e=n.m,r=t.m,u=-1,o=e.length;++u<o;){var i=e[u],a=r[u];if(i!==a){if(i>a||typeof i=="undefined")return 1;if(i<a||typeof a=="undefined")return-1}}return n.n-t.n}function o(n){var t=-1,r=n.length,u=n[0],o=n[r/2|0],i=n[r-1];if(u&&typeof u=="object"&&o&&typeof o=="object"&&i&&typeof i=="object")return false;for(u=f(),u["false"]=u["null"]=u["true"]=u.undefined=false,o=f(),o.k=n,o.l=u,o.push=e;++t<r;)o.push(n[t]);return o}function i(n){return"\\"+U[n]
|
||||
}function a(){return h.pop()||[]}function f(){return g.pop()||{k:null,l:null,m:null,"false":false,n:0,"null":false,number:null,object:null,push:null,string:null,"true":false,undefined:false,o:null}}function l(n){n.length=0,h.length<_&&h.push(n)}function c(n){var t=n.l;t&&c(t),n.k=n.l=n.m=n.object=n.number=n.string=n.o=null,g.length<_&&g.push(n)}function p(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Array(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function s(e){function h(n){if(!n||ce.call(n)!=q)return false;
|
||||
var t=n.valueOf,e=typeof t=="function"&&(e=ye(t))&&ye(e);return e?n==e||ye(n)==e:ht(n)}function g(n,t,e){if(!n||!V[typeof n])return n;t=t&&typeof e=="undefined"?t:et(t,e,3);for(var r=-1,u=V[typeof n]&&Te(n),o=u?u.length:0;++r<o&&(e=u[r],false!==t(n[e],e,n)););return n}function _(n,t,e){var r;if(!n||!V[typeof n])return n;t=t&&typeof e=="undefined"?t:et(t,e,3);for(r in n)if(false===t(n[r],r,n))break;return n}function U(n,t,e){var r,u=n,o=u;if(!u)return o;for(var i=arguments,a=0,f=typeof e=="number"?2:i.length;++a<f;)if((u=i[a])&&V[typeof u])for(var l=-1,c=V[typeof u]&&Te(u),p=c?c.length:0;++l<p;)r=c[l],"undefined"==typeof o[r]&&(o[r]=u[r]);
|
||||
return o}function H(n,t,e){var r,u=n,o=u;if(!u)return o;var i=arguments,a=0,f=typeof e=="number"?2:i.length;if(3<f&&"function"==typeof i[f-2])var l=et(i[--f-1],i[f--],2);else 2<f&&"function"==typeof i[f-1]&&(l=i[--f]);for(;++a<f;)if((u=i[a])&&V[typeof u])for(var c=-1,p=V[typeof u]&&Te(u),s=p?p.length:0;++c<s;)r=p[c],o[r]=l?l(o[r],u[r]):u[r];return o}function J(n){var t,e=[];if(!n||!V[typeof n])return e;for(t in n)me.call(n,t)&&e.push(t);return e}function Q(n){return n&&typeof n=="object"&&!$e(n)&&me.call(n,"__wrapped__")?n:new X(n)
|
||||
}function X(n,t){this.__chain__=!!t,this.__wrapped__=n}function Z(n){function t(){if(r){var n=r.slice();be.apply(n,arguments)}if(this instanceof t){var o=tt(e.prototype),n=e.apply(o,n||arguments);return wt(n)?n:o}return e.apply(u,n||arguments)}var e=n[0],r=n[2],u=n[4];return De(t,n),t}function nt(n,t,e,r,u){if(e){var o=e(n);if(typeof o!="undefined")return o}if(!wt(n))return n;var i=ce.call(n);if(!K[i])return n;var f=Re[i];switch(i){case T:case F:return new f(+n);case W:case P:return new f(n);case z:return o=f(n.source,C.exec(n)),o.lastIndex=n.lastIndex,o
|
||||
}if(i=$e(n),t){var c=!r;r||(r=a()),u||(u=a());for(var s=r.length;s--;)if(r[s]==n)return u[s];o=i?f(n.length):{}}else o=i?p(n):H({},n);return i&&(me.call(n,"index")&&(o.index=n.index),me.call(n,"input")&&(o.input=n.input)),t?(r.push(n),u.push(o),(i?St:g)(n,function(n,i){o[i]=nt(n,t,e,r,u)}),c&&(l(r),l(u)),o):o}function tt(n){return wt(n)?je(n):{}}function et(n,t,e){if(typeof n!="function")return Ut;if(typeof t=="undefined"||!("prototype"in n))return n;var r=n.__bindData__;if(typeof r=="undefined"&&(Ae.funcNames&&(r=!n.name),r=r||!Ae.funcDecomp,!r)){var u=ge.call(n);
|
||||
Ae.funcNames||(r=!O.test(u)),r||(r=E.test(u),De(n,r))}if(false===r||true!==r&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,u){return n.call(t,e,r,u)};case 4:return function(e,r,u,o){return n.call(t,e,r,u,o)}}return Mt(n,t)}function rt(n){function t(){var n=f?i:this;if(u){var h=u.slice();be.apply(h,arguments)}return(o||c)&&(h||(h=p(arguments)),o&&be.apply(h,o),c&&h.length<a)?(r|=16,rt([e,s?r:-4&r,h,null,i,a])):(h||(h=arguments),l&&(e=n[v]),this instanceof t?(n=tt(e.prototype),h=e.apply(n,h),wt(h)?h:n):e.apply(n,h))
|
||||
}var e=n[0],r=n[1],u=n[2],o=n[3],i=n[4],a=n[5],f=1&r,l=2&r,c=4&r,s=8&r,v=e;return De(t,n),t}function ut(e,r){var u=-1,i=vt(),a=e?e.length:0,f=a>=b&&i===n,l=[];if(f){var p=o(r);p?(i=t,r=p):f=false}for(;++u<a;)p=e[u],0>i(r,p)&&l.push(p);return f&&c(r),l}function ot(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r<u;){var i=n[r];if(i&&typeof i=="object"&&typeof i.length=="number"&&($e(i)||yt(i))){t||(i=ot(i,t,e));var a=-1,f=i.length,l=o.length;for(o.length+=f;++a<f;)o[l++]=i[a]}else e||o.push(i)}return o
|
||||
}function it(n,t,e,r,u,o){if(e){var i=e(n,t);if(typeof i!="undefined")return!!i}if(n===t)return 0!==n||1/n==1/t;if(n===n&&!(n&&V[typeof n]||t&&V[typeof t]))return false;if(null==n||null==t)return n===t;var f=ce.call(n),c=ce.call(t);if(f==D&&(f=q),c==D&&(c=q),f!=c)return false;switch(f){case T:case F:return+n==+t;case W:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case z:case P:return n==oe(t)}if(c=f==$,!c){var p=me.call(n,"__wrapped__"),s=me.call(t,"__wrapped__");if(p||s)return it(p?n.__wrapped__:n,s?t.__wrapped__:t,e,r,u,o);
|
||||
if(f!=q)return false;if(f=n.constructor,p=t.constructor,f!=p&&!(dt(f)&&f instanceof f&&dt(p)&&p instanceof p)&&"constructor"in n&&"constructor"in t)return false}for(p=!u,u||(u=a()),o||(o=a()),f=u.length;f--;)if(u[f]==n)return o[f]==t;var v=0,i=true;if(u.push(n),o.push(t),c){if(f=n.length,v=t.length,i=v==n.length,!i&&!r)return i;for(;v--;)if(c=f,p=t[v],r)for(;c--&&!(i=it(n[c],p,e,r,u,o)););else if(!(i=it(n[v],p,e,r,u,o)))break;return i}return _(t,function(t,a,f){return me.call(f,a)?(v++,i=me.call(n,a)&&it(n[a],t,e,r,u,o)):void 0
|
||||
}),i&&!r&&_(n,function(n,t,e){return me.call(e,t)?i=-1<--v:void 0}),p&&(l(u),l(o)),i}function at(n,t,e,r,u){($e(t)?St:g)(t,function(t,o){var i,a,f=t,l=n[o];if(t&&((a=$e(t))||h(t))){for(f=r.length;f--;)if(i=r[f]==t){l=u[f];break}if(!i){var c;e&&(f=e(l,t),c=typeof f!="undefined")&&(l=f),c||(l=a?$e(l)?l:[]:h(l)?l:{}),r.push(t),u.push(l),c||at(l,t,e,r,u)}}else e&&(f=e(l,t),typeof f=="undefined"&&(f=t)),typeof f!="undefined"&&(l=f);n[o]=l})}function ft(n,t){return n+he(Ee()*(t-n+1))}function lt(e,r,u){var i=-1,f=vt(),p=e?e.length:0,s=[],v=!r&&p>=b&&f===n,h=u||v?a():s;
|
||||
if(v){var g=o(h);g?(f=t,h=g):(v=false,h=u?h:(l(h),s))}for(;++i<p;){var g=e[i],y=u?u(g,i,e):g;(r?!i||h[h.length-1]!==y:0>f(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(l(h.k),c(h)):u&&l(h),s}function ct(n){return function(t,e,r){var u={};e=Q.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++r<o;){var i=t[r];n(u,i,e(i,r,t),t)}else g(t,function(t,r,o){n(u,t,e(t,r,o),o)});return u}}function pt(n,t,e,r,u,o){var i=1&t,a=4&t,f=16&t,l=32&t;if(!(2&t||dt(n)))throw new ie;f&&!e.length&&(t&=-17,f=e=false),l&&!r.length&&(t&=-33,l=r=false);
|
||||
var c=n&&n.__bindData__;return c&&true!==c?(c=c.slice(),!i||1&c[1]||(c[4]=u),!i&&1&c[1]&&(t|=8),!a||4&c[1]||(c[5]=o),f&&be.apply(c[2]||(c[2]=[]),e),l&&be.apply(c[3]||(c[3]=[]),r),c[1]|=t,pt.apply(null,c)):(1==t||17===t?Z:rt)([n,t,e,r,u,o])}function st(n){return Fe[n]}function vt(){var t=(t=Q.indexOf)===Wt?n:t;return t}function ht(n){var t,e;return n&&ce.call(n)==q&&(t=n.constructor,!dt(t)||t instanceof t)?(_(n,function(n,t){e=t}),typeof e=="undefined"||me.call(n,e)):false}function gt(n){return Be[n]}function yt(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ce.call(n)==D||false
|
||||
}function mt(n,t,e){var r=Te(n),u=r.length;for(t=et(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function bt(n){var t=[];return _(n,function(n,e){dt(n)&&t.push(e)}),t.sort()}function _t(n){for(var t=-1,e=Te(n),r=e.length,u={};++t<r;){var o=e[t];u[n[o]]=o}return u}function dt(n){return typeof n=="function"}function wt(n){return!(!n||!V[typeof n])}function jt(n){return typeof n=="number"||n&&typeof n=="object"&&ce.call(n)==W||false}function kt(n){return typeof n=="string"||n&&typeof n=="object"&&ce.call(n)==P||false
|
||||
}function xt(n){for(var t=-1,e=Te(n),r=e.length,u=Xt(r);++t<r;)u[t]=n[e[t]];return u}function Ct(n,t,e){var r=-1,u=vt(),o=n?n.length:0,i=false;return e=(0>e?Ne(0,o+e):e)||0,$e(n)?i=-1<u(n,t,e):typeof o=="number"?i=-1<(kt(n)?n.indexOf(t,e):u(n,t,e)):g(n,function(n){return++r<e?void 0:!(i=n===t)}),i}function Ot(n,t,e){var r=true;t=Q.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&(r=!!t(n[e],e,n)););else g(n,function(n,e,u){return r=!!t(n,e,u)});return r}function Nt(n,t,e){var r=[];
|
||||
t=Q.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}else g(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function It(n,t,e){t=Q.createCallback(t,e,3),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return g(n,function(n,e,r){return t(n,e,r)?(u=n,false):void 0}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function St(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:et(t,e,3),typeof u=="number")for(;++r<u&&false!==t(n[r],r,n););else g(n,t);
|
||||
return n}function Et(n,t,e){var r=n?n.length:0;if(t=t&&typeof e=="undefined"?t:et(t,e,3),typeof r=="number")for(;r--&&false!==t(n[r],r,n););else{var u=Te(n),r=u.length;g(n,function(n,e,o){return e=u?u[--r]:--r,t(o[e],e,o)})}return n}function Rt(n,t,e){var r=-1,u=n?n.length:0;if(t=Q.createCallback(t,e,3),typeof u=="number")for(var o=Xt(u);++r<u;)o[r]=t(n[r],r,n);else o=[],g(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function At(n,t,e){var u=-1/0,o=u;if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&$e(n)){e=-1;
|
||||
for(var i=n.length;++e<i;){var a=n[e];a>o&&(o=a)}}else t=null==t&&kt(n)?r:Q.createCallback(t,e,3),St(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Dt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=Q.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else g(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)});return e}function $t(n,t,e,r){var u=3>arguments.length;return t=Q.createCallback(t,r,4),Et(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)
|
||||
}),e}function Tt(n){var t=-1,e=n?n.length:0,r=Xt(typeof e=="number"?e:0);return St(n,function(n){var e=ft(0,++t);r[t]=r[e],r[e]=n}),r}function Ft(n,t,e){var r;t=Q.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else g(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function Bt(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=-1;for(t=Q.createCallback(t,e,3);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[0]:v;return p(n,0,Ie(Ne(0,r),u))
|
||||
}function Wt(t,e,r){if(typeof r=="number"){var u=t?t.length:0;r=0>r?Ne(0,u+r):r||0}else if(r)return r=zt(t,e),t[r]===e?r:-1;return n(t,e,r)}function qt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=Q.createCallback(t,e,3);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Ne(0,t);return p(n,r)}function zt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?Q.createCallback(e,r,1):Ut,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function Pt(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(e=Q.createCallback(e,r,3)),lt(n,t,e)
|
||||
}function Kt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,e=n?At(Le(n,"length")):0,r=Xt(0>e?0:e);++t<e;)r[t]=Le(n,t);return r}function Lt(n,t){var e=-1,r=n?n.length:0,u={};for(t||!r||$e(n[0])||(t=[]);++e<r;){var o=n[e];t?u[o]=t[e]:o&&(u[o[0]]=o[1])}return u}function Mt(n,t){return 2<arguments.length?pt(n,17,p(arguments,2),null,t):pt(n,1,null,null,t)}function Vt(n,t,e){function r(){c&&ve(c),i=c=p=v,(g||h!==t)&&(s=Me(),a=n.apply(l,o),c||i||(o=l=null))}function u(){var e=t-(Me()-f);0<e?c=_e(u,e):(i&&ve(i),e=p,i=c=p=v,e&&(s=Me(),a=n.apply(l,o),c||i||(o=l=null)))
|
||||
}var o,i,a,f,l,c,p,s=0,h=false,g=true;if(!dt(n))throw new ie;if(t=Ne(0,t)||0,true===e)var y=true,g=false;else wt(e)&&(y=e.leading,h="maxWait"in e&&(Ne(t,e.maxWait)||0),g="trailing"in e?e.trailing:g);return function(){if(o=arguments,f=Me(),l=this,p=g&&(c||!y),false===h)var e=y&&!c;else{i||y||(s=f);var v=h-(f-s),m=0>=v;m?(i&&(i=ve(i)),s=f,a=n.apply(l,o)):i||(i=_e(r,v))}return m&&c?c=ve(c):c||t===h||(c=_e(u,t)),e&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Ut(n){return n}function Gt(n,t,e){var r=true,u=t&&bt(t);
|
||||
t&&(e||u.length)||(null==e&&(e=t),o=X,t=n,n=Q,u=bt(t)),false===e?r=false:wt(e)&&"chain"in e&&(r=e.chain);var o=n,i=dt(o);St(u,function(e){var u=n[e]=t[e];i&&(o.prototype[e]=function(){var t=this.__chain__,e=this.__wrapped__,i=[e];if(be.apply(i,arguments),i=u.apply(n,i),r||t){if(e===i&&wt(i))return this;i=new o(i),i.__chain__=t}return i})})}function Ht(){}function Jt(n){return function(t){return t[n]}}function Qt(){return this.__wrapped__}e=e?Y.defaults(G.Object(),e,Y.pick(G,A)):G;var Xt=e.Array,Yt=e.Boolean,Zt=e.Date,ne=e.Function,te=e.Math,ee=e.Number,re=e.Object,ue=e.RegExp,oe=e.String,ie=e.TypeError,ae=[],fe=re.prototype,le=e._,ce=fe.toString,pe=ue("^"+oe(ce).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),se=te.ceil,ve=e.clearTimeout,he=te.floor,ge=ne.prototype.toString,ye=pe.test(ye=re.getPrototypeOf)&&ye,me=fe.hasOwnProperty,be=ae.push,_e=e.setTimeout,de=ae.splice,we=function(){try{var n={},t=pe.test(t=re.defineProperty)&&t,e=t(n,n,n)&&t
|
||||
}catch(r){}return e}(),je=pe.test(je=re.create)&&je,ke=pe.test(ke=Xt.isArray)&&ke,xe=e.isFinite,Ce=e.isNaN,Oe=pe.test(Oe=re.keys)&&Oe,Ne=te.max,Ie=te.min,Se=e.parseInt,Ee=te.random,Re={};Re[$]=Xt,Re[T]=Yt,Re[F]=Zt,Re[B]=ne,Re[q]=re,Re[W]=ee,Re[z]=ue,Re[P]=oe,X.prototype=Q.prototype;var Ae=Q.support={};Ae.funcDecomp=!pe.test(e.a)&&E.test(s),Ae.funcNames=typeof ne.name=="string",Q.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,variable:"",imports:{_:Q}},je||(tt=function(){function n(){}return function(t){if(wt(t)){n.prototype=t;
|
||||
var r=new n;n.prototype=null}return r||e.Object()}}());var De=we?function(n,t){M.value=t,we(n,"__bindData__",M)}:Ht,$e=ke||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ce.call(n)==$||false},Te=Oe?function(n){return wt(n)?Oe(n):[]}:J,Fe={"&":"&","<":"<",">":">",'"':""","'":"'"},Be=_t(Fe),We=ue("("+Te(Be).join("|")+")","g"),qe=ue("["+Te(Fe).join("")+"]","g"),ze=ct(function(n,t,e){me.call(n,e)?n[e]++:n[e]=1}),Pe=ct(function(n,t,e){(me.call(n,e)?n[e]:n[e]=[]).push(t)
|
||||
}),Ke=ct(function(n,t,e){n[e]=t}),Le=Rt,Me=pe.test(Me=Zt.now)&&Me||function(){return(new Zt).getTime()},Ve=8==Se(d+"08")?Se:function(n,t){return Se(kt(n)?n.replace(I,""):n,t||0)};return Q.after=function(n,t){if(!dt(t))throw new ie;return function(){return 1>--n?t.apply(this,arguments):void 0}},Q.assign=H,Q.at=function(n){for(var t=arguments,e=-1,r=ot(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=Xt(t);++e<t;)u[e]=n[r[e]];return u},Q.bind=Mt,Q.bindAll=function(n){for(var t=1<arguments.length?ot(arguments,true,false,1):bt(n),e=-1,r=t.length;++e<r;){var u=t[e];
|
||||
n[u]=pt(n[u],1,null,null,n)}return n},Q.bindKey=function(n,t){return 2<arguments.length?pt(t,19,p(arguments,2),null,n):pt(t,3,null,null,n)},Q.chain=function(n){return n=new X(n),n.__chain__=true,n},Q.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},Q.compose=function(){for(var n=arguments,t=n.length;t--;)if(!dt(n[t]))throw new ie;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},Q.constant=function(n){return function(){return n
|
||||
}},Q.countBy=ze,Q.create=function(n,t){var e=tt(n);return t?H(e,t):e},Q.createCallback=function(n,t,e){var r=typeof n;if(null==n||"function"==r)return et(n,t,e);if("object"!=r)return Jt(n);var u=Te(n),o=u[0],i=n[o];return 1!=u.length||i!==i||wt(i)?function(t){for(var e=u.length,r=false;e--&&(r=it(t[u[e]],n[u[e]],null,true)););return r}:function(n){return n=n[o],i===n&&(0!==i||1/i==1/n)}},Q.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,pt(n,4,null,null,null,t)},Q.debounce=Vt,Q.defaults=U,Q.defer=function(n){if(!dt(n))throw new ie;
|
||||
var t=p(arguments,1);return _e(function(){n.apply(v,t)},1)},Q.delay=function(n,t){if(!dt(n))throw new ie;var e=p(arguments,2);return _e(function(){n.apply(v,e)},t)},Q.difference=function(n){return ut(n,ot(arguments,true,true,1))},Q.filter=Nt,Q.flatten=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(n=Rt(n,e,r)),ot(n,t)},Q.forEach=St,Q.forEachRight=Et,Q.forIn=_,Q.forInRight=function(n,t,e){var r=[];_(n,function(n,t){r.push(t,n)});var u=r.length;
|
||||
for(t=et(t,e,3);u--&&false!==t(r[u--],r[u],n););return n},Q.forOwn=g,Q.forOwnRight=mt,Q.functions=bt,Q.groupBy=Pe,Q.indexBy=Ke,Q.initial=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=Q.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return p(n,0,Ie(Ne(0,u-r),u))},Q.intersection=function(){for(var e=[],r=-1,u=arguments.length,i=a(),f=vt(),p=f===n,s=a();++r<u;){var v=arguments[r];($e(v)||yt(v))&&(e.push(v),i.push(p&&v.length>=b&&o(r?e[r]:s)))
|
||||
}var p=e[0],h=-1,g=p?p.length:0,y=[];n:for(;++h<g;){var m=i[0],v=p[h];if(0>(m?t(m,v):f(s,v))){for(r=u,(m||s).push(v);--r;)if(m=i[r],0>(m?t(m,v):f(e[r],v)))continue n;y.push(v)}}for(;u--;)(m=i[u])&&c(m);return l(i),l(s),y},Q.invert=_t,Q.invoke=function(n,t){var e=p(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,i=Xt(typeof o=="number"?o:0);return St(n,function(n){i[++r]=(u?t:n[t]).apply(n,e)}),i},Q.keys=Te,Q.map=Rt,Q.mapValues=function(n,t,e){var r={};return t=Q.createCallback(t,e,3),g(n,function(n,e,u){r[e]=t(n,e,u)
|
||||
}),r},Q.max=At,Q.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):m+arguments[0];return me.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!dt(n))throw new ie;return e.cache={},e},Q.merge=function(n){var t=arguments,e=2;if(!wt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3<e&&"function"==typeof t[e-2])var r=et(t[--e-1],t[e--],2);else 2<e&&"function"==typeof t[e-1]&&(r=t[--e]);for(var t=p(arguments,1,e),u=-1,o=a(),i=a();++u<e;)at(n,t[u],r,o,i);return l(o),l(i),n},Q.min=function(n,t,e){var u=1/0,o=u;
|
||||
if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&$e(n)){e=-1;for(var i=n.length;++e<i;){var a=n[e];a<o&&(o=a)}}else t=null==t&&kt(n)?r:Q.createCallback(t,e,3),St(n,function(n,e,r){e=t(n,e,r),e<u&&(u=e,o=n)});return o},Q.omit=function(n,t,e){var r={};if(typeof t!="function"){var u=[];_(n,function(n,t){u.push(t)});for(var u=ut(u,ot(arguments,true,false,1)),o=-1,i=u.length;++o<i;){var a=u[o];r[a]=n[a]}}else t=Q.createCallback(t,e,3),_(n,function(n,e,u){t(n,e,u)||(r[e]=n)});return r},Q.once=function(n){var t,e;
|
||||
if(!dt(n))throw new ie;return function(){return t?e:(t=true,e=n.apply(this,arguments),n=null,e)}},Q.pairs=function(n){for(var t=-1,e=Te(n),r=e.length,u=Xt(r);++t<r;){var o=e[t];u[t]=[o,n[o]]}return u},Q.partial=function(n){return pt(n,16,p(arguments,1))},Q.partialRight=function(n){return pt(n,32,null,p(arguments,1))},Q.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,o=ot(arguments,true,false,1),i=wt(n)?o.length:0;++u<i;){var a=o[u];a in n&&(r[a]=n[a])}else t=Q.createCallback(t,e,3),_(n,function(n,e,u){t(n,e,u)&&(r[e]=n)
|
||||
});return r},Q.pluck=Le,Q.property=Jt,Q.pull=function(n){for(var t=arguments,e=0,r=t.length,u=n?n.length:0;++e<r;)for(var o=-1,i=t[e];++o<u;)n[o]===i&&(de.call(n,o--,1),u--);return n},Q.range=function(n,t,e){n=+n||0,e=typeof e=="number"?e:+e||1,null==t&&(t=n,n=0);var r=-1;t=Ne(0,se((t-n)/(e||1)));for(var u=Xt(t);++r<t;)u[r]=n,n+=e;return u},Q.reject=function(n,t,e){return t=Q.createCallback(t,e,3),Nt(n,function(n,e,r){return!t(n,e,r)})},Q.remove=function(n,t,e){var r=-1,u=n?n.length:0,o=[];for(t=Q.createCallback(t,e,3);++r<u;)e=n[r],t(e,r,n)&&(o.push(e),de.call(n,r--,1),u--);
|
||||
return o},Q.rest=qt,Q.shuffle=Tt,Q.sortBy=function(n,t,e){var r=-1,o=$e(t),i=n?n.length:0,p=Xt(typeof i=="number"?i:0);for(o||(t=Q.createCallback(t,e,3)),St(n,function(n,e,u){var i=p[++r]=f();o?i.m=Rt(t,function(t){return n[t]}):(i.m=a())[0]=t(n,e,u),i.n=r,i.o=n}),i=p.length,p.sort(u);i--;)n=p[i],p[i]=n.o,o||l(n.m),c(n);return p},Q.tap=function(n,t){return t(n),n},Q.throttle=function(n,t,e){var r=true,u=true;if(!dt(n))throw new ie;return false===e?r=false:wt(e)&&(r="leading"in e?e.leading:r,u="trailing"in e?e.trailing:u),L.leading=r,L.maxWait=t,L.trailing=u,Vt(n,t,L)
|
||||
},Q.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Xt(n);for(t=et(t,e,1);++r<n;)u[r]=t(r);return u},Q.toArray=function(n){return n&&typeof n.length=="number"?p(n):xt(n)},Q.transform=function(n,t,e,r){var u=$e(n);if(null==e)if(u)e=[];else{var o=n&&n.constructor;e=tt(o&&o.prototype)}return t&&(t=Q.createCallback(t,r,4),(u?St:g)(n,function(n,r,u){return t(e,n,r,u)})),e},Q.union=function(){return lt(ot(arguments,true,true))},Q.uniq=Pt,Q.values=xt,Q.where=Nt,Q.without=function(n){return ut(n,p(arguments,1))
|
||||
},Q.wrap=function(n,t){return pt(t,16,[n])},Q.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var e=arguments[n];if($e(e)||yt(e))var r=r?lt(ut(r,e).concat(ut(e,r))):e}return r||[]},Q.zip=Kt,Q.zipObject=Lt,Q.collect=Rt,Q.drop=qt,Q.each=St,Q.eachRight=Et,Q.extend=H,Q.methods=bt,Q.object=Lt,Q.select=Nt,Q.tail=qt,Q.unique=Pt,Q.unzip=Kt,Gt(Q),Q.clone=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=t,t=false),nt(n,t,typeof e=="function"&&et(e,r,1))},Q.cloneDeep=function(n,t,e){return nt(n,true,typeof t=="function"&&et(t,e,1))
|
||||
},Q.contains=Ct,Q.escape=function(n){return null==n?"":oe(n).replace(qe,st)},Q.every=Ot,Q.find=It,Q.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=Q.createCallback(t,e,3);++r<u;)if(t(n[r],r,n))return r;return-1},Q.findKey=function(n,t,e){var r;return t=Q.createCallback(t,e,3),g(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},Q.findLast=function(n,t,e){var r;return t=Q.createCallback(t,e,3),Et(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0}),r},Q.findLastIndex=function(n,t,e){var r=n?n.length:0;
|
||||
for(t=Q.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},Q.findLastKey=function(n,t,e){var r;return t=Q.createCallback(t,e,3),mt(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},Q.has=function(n,t){return n?me.call(n,t):false},Q.identity=Ut,Q.indexOf=Wt,Q.isArguments=yt,Q.isArray=$e,Q.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&ce.call(n)==T||false},Q.isDate=function(n){return n&&typeof n=="object"&&ce.call(n)==F||false},Q.isElement=function(n){return n&&1===n.nodeType||false
|
||||
},Q.isEmpty=function(n){var t=true;if(!n)return t;var e=ce.call(n),r=n.length;return e==$||e==P||e==D||e==q&&typeof r=="number"&&dt(n.splice)?!r:(g(n,function(){return t=false}),t)},Q.isEqual=function(n,t,e,r){return it(n,t,typeof e=="function"&&et(e,r,2))},Q.isFinite=function(n){return xe(n)&&!Ce(parseFloat(n))},Q.isFunction=dt,Q.isNaN=function(n){return jt(n)&&n!=+n},Q.isNull=function(n){return null===n},Q.isNumber=jt,Q.isObject=wt,Q.isPlainObject=h,Q.isRegExp=function(n){return n&&typeof n=="object"&&ce.call(n)==z||false
|
||||
},Q.isString=kt,Q.isUndefined=function(n){return typeof n=="undefined"},Q.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Ne(0,r+e):Ie(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},Q.mixin=Gt,Q.noConflict=function(){return e._=le,this},Q.noop=Ht,Q.now=Me,Q.parseInt=Ve,Q.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=Ee(),Ie(n+e*(t-n+parseFloat("1e-"+((e+"").length-1))),t)):ft(n,t)
|
||||
},Q.reduce=Dt,Q.reduceRight=$t,Q.result=function(n,t){if(n){var e=n[t];return dt(e)?n[t]():e}},Q.runInContext=s,Q.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Te(n).length},Q.some=Ft,Q.sortedIndex=zt,Q.template=function(n,t,e){var r=Q.templateSettings;n=oe(n||""),e=U({},e,r);var u,o=U({},e.imports,r.imports),r=Te(o),o=xt(o),a=0,f=e.interpolate||S,l="__p+='",f=ue((e.escape||S).source+"|"+f.source+"|"+(f===N?x:S).source+"|"+(e.evaluate||S).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(a,c).replace(R,i),e&&(l+="'+__e("+e+")+'"),f&&(u=true,l+="';"+f+";\n__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),a=c+t.length,t
|
||||
}),l+="';",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(w,""):l).replace(j,"$1").replace(k,"$1;"),l="function("+e+"){"+(f?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var c=ne(r,"return "+l).apply(v,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},Q.unescape=function(n){return null==n?"":oe(n).replace(We,gt)},Q.uniqueId=function(n){var t=++y;return oe(null==n?"":n)+t
|
||||
},Q.all=Ot,Q.any=Ft,Q.detect=It,Q.findWhere=It,Q.foldl=Dt,Q.foldr=$t,Q.include=Ct,Q.inject=Dt,Gt(function(){var n={};return g(Q,function(t,e){Q.prototype[e]||(n[e]=t)}),n}(),false),Q.first=Bt,Q.last=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=Q.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:v;return p(n,Ne(0,u-r))},Q.sample=function(n,t,e){return n&&typeof n.length!="number"&&(n=xt(n)),null==t||e?n?n[ft(0,n.length-1)]:v:(n=Tt(n),n.length=Ie(Ne(0,t),n.length),n)
|
||||
},Q.take=Bt,Q.head=Bt,g(Q,function(n,t){var e="sample"!==t;Q.prototype[t]||(Q.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new X(o,u):o})}),Q.VERSION="2.4.0",Q.prototype.chain=function(){return this.__chain__=true,this},Q.prototype.toString=function(){return oe(this.__wrapped__)},Q.prototype.value=Qt,Q.prototype.valueOf=Qt,St(["join","pop","shift"],function(n){var t=ae[n];Q.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);
|
||||
return n?new X(e,n):e}}),St(["push","reverse","sort","unshift"],function(n){var t=ae[n];Q.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),St(["concat","slice","splice"],function(n){var t=ae[n];Q.prototype[n]=function(){return new X(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Q}var v,h=[],g=[],y=0,m=+new Date+"",b=75,_=40,d=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",w=/\b__p\+='';/g,j=/\b(__p\+=)''\+/g,k=/(__e\(.*?\)|\b__t\))\+'';/g,x=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,O=/^\s*function[ \n\r\t]+\w/,N=/<%=([\s\S]+?)%>/g,I=RegExp("^["+d+"]*0+(?=.$)"),S=/($^)/,E=/\bthis\b/,R=/['\n\r\t\u2028\u2029\\]/g,A="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setTimeout".split(" "),D="[object Arguments]",$="[object Array]",T="[object Boolean]",F="[object Date]",B="[object Function]",W="[object Number]",q="[object Object]",z="[object RegExp]",P="[object String]",K={};
|
||||
K[B]=false,K[D]=K[$]=K[T]=K[F]=K[W]=K[q]=K[z]=K[P]=true;var L={leading:false,maxWait:0,trailing:false},M={configurable:false,enumerable:false,value:null,writable:false},V={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},U={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},G=V[typeof window]&&window||this,H=V[typeof exports]&&exports&&!exports.nodeType&&exports,J=V[typeof module]&&module&&!module.nodeType&&module,Q=J&&J.exports===H&&H,X=V[typeof global]&&global;!X||X.global!==X&&X.window!==X||(G=X);
|
||||
var Y=s();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(G._=Y, define(function(){return Y})):H&&J?Q?(J.exports=Y)._=Y:H._=Y:G._=Y}).call(this);
|
||||
;(function(){function n(n,r,t){for(var e=(t||0)-1,u=n?n.length:0;++e<u;)if(n[e]===r)return e;return-1}function r(r,t){var e=typeof t;if(r=r.cache,"boolean"==e||null==t)return r[t]?0:-1;"number"!=e&&"string"!=e&&(e="object");var u="number"==e?t:m+t;return r=(r=r[e])&&r[u],"object"==e?r&&n(r,t)>-1?0:-1:r?0:-1}function t(n){var r=this.cache,t=typeof n;if("boolean"==t||null==n)r[n]=!0;else{"number"!=t&&"string"!=t&&(t="object");var e="number"==t?n:m+n,u=r[t]||(r[t]={});"object"==t?(u[e]||(u[e]=[])).push(n):u[e]=!0;
|
||||
|
||||
}}function e(n){return n.charCodeAt(0)}function u(n,r){for(var t=n.criteria,e=r.criteria,u=-1,o=t.length;++u<o;){var a=t[u],i=e[u];if(a!==i){if(a>i||"undefined"==typeof a)return 1;if(a<i||"undefined"==typeof i)return-1}}return n.index-r.index}function o(n){var r=-1,e=n.length,u=n[0],o=n[e/2|0],a=n[e-1];if(u&&"object"==typeof u&&o&&"object"==typeof o&&a&&"object"==typeof a)return!1;var i=f();i["false"]=i["null"]=i["true"]=i.undefined=!1;var l=f();for(l.array=n,l.cache=i,l.push=t;++r<e;)l.push(n[r]);
|
||||
|
||||
return l}function a(n){return"\\"+G[n]}function i(){return h.pop()||[]}function f(){return g.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function l(n){n.length=0,h.length<_&&h.push(n)}function c(n){var r=n.cache;r&&c(r),n.array=n.cache=n.criteria=n.object=n.number=n.string=n.value=null,g.length<_&&g.push(n)}function p(n,r,t){r||(r=0),"undefined"==typeof t&&(t=n?n.length:0);for(var e=-1,u=t-r||0,o=Array(u<0?0:u);++e<u;)o[e]=n[r+e];
|
||||
|
||||
return o}function s(t){function h(n){return n&&"object"==typeof n&&!Yt(n)&&Tt.call(n,"__wrapped__")?n:new g(n)}function g(n,r){this.__chain__=!!r,this.__wrapped__=n}function _(n){function r(){if(e){var n=p(e);$t.apply(n,arguments)}if(this instanceof r){var o=J(t.prototype),a=t.apply(o,n||arguments);return Sn(a)?a:o}return t.apply(u,n||arguments)}var t=n[0],e=n[2],u=n[4];return Xt(r,n),r}function G(n,r,t,e,u){if(t){var o=t(n);if("undefined"!=typeof o)return o}var a=Sn(n);if(!a)return n;var f=Nt.call(n);
|
||||
|
||||
if(!K[f])return n;var c=Jt[f];switch(f){case F:case B:return new c(+n);case q:case P:return new c(n);case L:return o=c(n.source,C.exec(n)),o.lastIndex=n.lastIndex,o}var s=Yt(n);if(r){var v=!e;e||(e=i()),u||(u=i());for(var h=e.length;h--;)if(e[h]==n)return u[h];o=s?c(n.length):{}}else o=s?p(n):oe({},n);return s&&(Tt.call(n,"index")&&(o.index=n.index),Tt.call(n,"input")&&(o.input=n.input)),r?(e.push(n),u.push(o),(s?Xn:fe)(n,function(n,a){o[a]=G(n,r,t,e,u)}),v&&(l(e),l(u)),o):o}function J(n,r){return Sn(n)?zt(n):{};
|
||||
|
||||
}function Q(n,r,t){if("function"!=typeof n)return Yr;if("undefined"==typeof r||!("prototype"in n))return n;var e=n.__bindData__;if("undefined"==typeof e&&(Qt.funcNames&&(e=!n.name),e=e||!Qt.funcDecomp,!e)){var u=At.call(n);Qt.funcNames||(e=!O.test(u)),e||(e=I.test(u),Xt(n,e))}if(e===!1||e!==!0&&1&e[1])return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,e){return n.call(r,t,e)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){
|
||||
return n.call(r,t,e,u,o)}}return $r(n,r)}function X(n){function r(){var n=f?a:this;if(u){var h=p(u);$t.apply(h,arguments)}if((o||c)&&(h||(h=p(arguments)),o&&$t.apply(h,o),c&&h.length<i))return e|=16,X([t,s?e:-4&e,h,null,a,i]);if(h||(h=arguments),l&&(t=n[v]),this instanceof r){n=J(t.prototype);var g=t.apply(n,h);return Sn(g)?g:n}return t.apply(n,h)}var t=n[0],e=n[1],u=n[2],o=n[3],a=n[4],i=n[5],f=1&e,l=2&e,c=4&e,s=8&e,v=t;return Xt(r,n),r}function Y(t,e){var u=-1,a=ln(),i=t?t.length:0,f=i>=b&&a===n,l=[];
|
||||
|
||||
if(f){var p=o(e);p?(a=r,e=p):f=!1}for(;++u<i;){var s=t[u];a(e,s)<0&&l.push(s)}return f&&c(e),l}function nn(n,r,t,e){for(var u=(e||0)-1,o=n?n.length:0,a=[];++u<o;){var i=n[u];if(i&&"object"==typeof i&&"number"==typeof i.length&&(Yt(i)||vn(i))){r||(i=nn(i,r,t));var f=-1,l=i.length,c=a.length;for(a.length+=l;++f<l;)a[c++]=i[f]}else t||a.push(i)}return a}function rn(n,r,t,e,u,o){if(t){var a=t(n,r);if("undefined"!=typeof a)return!!a}if(n===r)return 0!==n||1/n==1/r;var f=typeof n,c=typeof r;if(n===n&&(!n||!V[f])&&(!r||!V[c]))return!1;
|
||||
|
||||
if(null==n||null==r)return n===r;var p=Nt.call(n),s=Nt.call(r);if(p==T&&(p=z),s==T&&(s=z),p!=s)return!1;switch(p){case F:case B:return+n==+r;case q:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case L:case P:return n==jt(r)}var h=p==$;if(!h){var g=Tt.call(n,"__wrapped__"),y=Tt.call(r,"__wrapped__");if(g||y)return rn(g?n.__wrapped__:n,y?r.__wrapped__:r,t,e,u,o);if(p!=z)return!1;var m=n.constructor,b=r.constructor;if(m!=b&&!(In(m)&&m instanceof m&&In(b)&&b instanceof b)&&"constructor"in n&&"constructor"in r)return!1;
|
||||
|
||||
}var _=!u;u||(u=i()),o||(o=i());for(var d=u.length;d--;)if(u[d]==n)return o[d]==r;var w=0;if(a=!0,u.push(n),o.push(r),h){if(d=n.length,w=r.length,a=w==d,a||e)for(;w--;){var j=d,k=r[w];if(e)for(;j--&&!(a=rn(n[j],k,t,e,u,o)););else if(!(a=rn(n[w],k,t,e,u,o)))break}}else ie(r,function(r,i,f){return Tt.call(f,i)?(w++,a=Tt.call(n,i)&&rn(n[i],r,t,e,u,o)):v}),a&&!e&&ie(n,function(n,r,t){return Tt.call(t,r)?a=--w>-1:v});return u.pop(),o.pop(),_&&(l(u),l(o)),a}function tn(n,r,t,e,u){(Yt(r)?Xn:fe)(r,function(r,o){
|
||||
var a,i,f=r,l=n[o];if(r&&((i=Yt(r))||le(r))){for(var c=e.length;c--;)if(a=e[c]==r){l=u[c];break}if(!a){var p;t&&(f=t(l,r),(p="undefined"!=typeof f)&&(l=f)),p||(l=i?Yt(l)?l:[]:le(l)?l:{}),e.push(r),u.push(l),p||tn(l,r,t,e,u)}}else t&&(f=t(l,r),"undefined"==typeof f&&(f=r)),"undefined"!=typeof f&&(l=f);n[o]=l})}function en(n,r){return n+St(Ht()*(r-n+1))}function un(t,e,u){var a=-1,f=ln(),p=t?t.length:0,s=[],v=!e&&p>=b&&f===n,h=u||v?i():s;if(v){var g=o(h);f=r,h=g}for(;++a<p;){var y=t[a],m=u?u(y,a,t):y;
|
||||
|
||||
(e?!a||h[h.length-1]!==m:f(h,m)<0)&&((u||v)&&h.push(m),s.push(y))}return v?(l(h.array),c(h)):u&&l(h),s}function on(n){return function(r,t,e){var u={};t=h.createCallback(t,e,3);var o=-1,a=r?r.length:0;if("number"==typeof a)for(;++o<a;){var i=r[o];n(u,i,t(i,o,r),r)}else fe(r,function(r,e,o){n(u,r,t(r,e,o),o)});return u}}function an(n,r,t,e,u,o){var a=1&r,i=2&r,f=4&r,l=16&r,c=32&r;if(!i&&!In(n))throw new kt;l&&!t.length&&(r&=-17,l=t=!1),c&&!e.length&&(r&=-33,c=e=!1);var s=n&&n.__bindData__;if(s&&s!==!0)return s=p(s),
|
||||
s[2]&&(s[2]=p(s[2])),s[3]&&(s[3]=p(s[3])),!a||1&s[1]||(s[4]=u),!a&&1&s[1]&&(r|=8),!f||4&s[1]||(s[5]=o),l&&$t.apply(s[2]||(s[2]=[]),t),c&&Wt.apply(s[3]||(s[3]=[]),e),s[1]|=r,an.apply(null,s);var v=1==r||17===r?_:X;return v([n,r,t,e,u,o])}function fn(n){return re[n]}function ln(){var r=(r=h.indexOf)===br?n:r;return r}function cn(n){return"function"==typeof n&&Rt.test(n)}function pn(n){var r,t;return n&&Nt.call(n)==z&&(r=n.constructor,!In(r)||r instanceof r)?(ie(n,function(n,r){t=r}),"undefined"==typeof t||Tt.call(n,t)):!1;
|
||||
|
||||
}function sn(n){return te[n]}function vn(n){return n&&"object"==typeof n&&"number"==typeof n.length&&Nt.call(n)==T||!1}function hn(n,r,t,e){return"boolean"!=typeof r&&null!=r&&(e=t,t=r,r=!1),G(n,r,"function"==typeof t&&Q(t,e,1))}function gn(n,r,t){return G(n,!0,"function"==typeof r&&Q(r,t,1))}function yn(n,r){var t=J(n);return r?oe(t,r):t}function mn(n,r,t){var e;return r=h.createCallback(r,t,3),fe(n,function(n,t,u){return r(n,t,u)?(e=t,!1):v}),e}function bn(n,r,t){var e;return r=h.createCallback(r,t,3),
|
||||
dn(n,function(n,t,u){return r(n,t,u)?(e=t,!1):v}),e}function _n(n,r,t){var e=[];ie(n,function(n,r){e.push(r,n)});var u=e.length;for(r=Q(r,t,3);u--&&r(e[u--],e[u],n)!==!1;);return n}function dn(n,r,t){var e=ne(n),u=e.length;for(r=Q(r,t,3);u--;){var o=e[u];if(r(n[o],o,n)===!1)break}return n}function wn(n){var r=[];return ie(n,function(n,t){In(n)&&r.push(t)}),r.sort()}function jn(n,r){return n?Tt.call(n,r):!1}function kn(n){for(var r=-1,t=ne(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u}function xn(n){
|
||||
return n===!0||n===!1||n&&"object"==typeof n&&Nt.call(n)==F||!1}function Cn(n){return n&&"object"==typeof n&&Nt.call(n)==B||!1}function On(n){return n&&1===n.nodeType||!1}function Nn(n){var r=!0;if(!n)return r;var t=Nt.call(n),e=n.length;return t==$||t==P||t==T||t==z&&"number"==typeof e&&In(n.splice)?!e:(fe(n,function(){return r=!1}),r)}function Rn(n,r,t,e){return rn(n,r,"function"==typeof t&&Q(t,e,2))}function En(n){return Pt(n)&&!Kt(parseFloat(n))}function In(n){return"function"==typeof n}function Sn(n){
|
||||
return!(!n||!V[typeof n])}function An(n){return Tn(n)&&n!=+n}function Dn(n){return null===n}function Tn(n){return"number"==typeof n||n&&"object"==typeof n&&Nt.call(n)==q||!1}function $n(n){return n&&"object"==typeof n&&Nt.call(n)==L||!1}function Fn(n){return"string"==typeof n||n&&"object"==typeof n&&Nt.call(n)==P||!1}function Bn(n){return"undefined"==typeof n}function Wn(n,r,t){var e={};return r=h.createCallback(r,t,3),fe(n,function(n,t,u){e[t]=r(n,t,u)}),e}function qn(n){var r=arguments,t=2;if(!Sn(n))return n;
|
||||
|
||||
if("number"!=typeof r[2]&&(t=r.length),t>3&&"function"==typeof r[t-2])var e=Q(r[--t-1],r[t--],2);else t>2&&"function"==typeof r[t-1]&&(e=r[--t]);for(var u=p(arguments,1,t),o=-1,a=i(),f=i();++o<t;)tn(n,u[o],e,a,f);return l(a),l(f),n}function zn(n,r,t){var e={};if("function"!=typeof r){var u=[];ie(n,function(n,r){u.push(r)}),u=Y(u,nn(arguments,!0,!1,1));for(var o=-1,a=u.length;++o<a;){var i=u[o];e[i]=n[i]}}else r=h.createCallback(r,t,3),ie(n,function(n,t,u){r(n,t,u)||(e[t]=n)});return e}function Ln(n){
|
||||
for(var r=-1,t=ne(n),e=t.length,u=ht(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u}function Pn(n,r,t){var e={};if("function"!=typeof r)for(var u=-1,o=nn(arguments,!0,!1,1),a=Sn(n)?o.length:0;++u<a;){var i=o[u];i in n&&(e[i]=n[i])}else r=h.createCallback(r,t,3),ie(n,function(n,t,u){r(n,t,u)&&(e[t]=n)});return e}function Kn(n,r,t,e){var u=Yt(n);if(null==t)if(u)t=[];else{var o=n&&n.constructor,a=o&&o.prototype;t=J(a)}return r&&(r=h.createCallback(r,e,4),(u?Xn:fe)(n,function(n,e,u){return r(t,n,e,u)})),
|
||||
t}function Un(n){for(var r=-1,t=ne(n),e=t.length,u=ht(e);++r<e;)u[r]=n[t[r]];return u}function Mn(n){for(var r=arguments,t=-1,e=nn(r,!0,!1,1),u=r[2]&&r[2][r[1]]===n?1:e.length,o=ht(u);++t<u;)o[t]=n[e[t]];return o}function Vn(n,r,t){var e=-1,u=ln(),o=n?n.length:0,a=!1;return t=(t<0?Mt(0,o+t):t)||0,Yt(n)?a=u(n,r,t)>-1:"number"==typeof o?a=(Fn(n)?n.indexOf(r,t):u(n,r,t))>-1:fe(n,function(n){return++e<t?v:!(a=n===r)}),a}function Gn(n,r,t){var e=!0;r=h.createCallback(r,t,3);var u=-1,o=n?n.length:0;if("number"==typeof o)for(;++u<o&&(e=!!r(n[u],u,n)););else fe(n,function(n,t,u){
|
||||
return e=!!r(n,t,u)});return e}function Hn(n,r,t){var e=[];r=h.createCallback(r,t,3);var u=-1,o=n?n.length:0;if("number"==typeof o)for(;++u<o;){var a=n[u];r(a,u,n)&&e.push(a)}else fe(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function Jn(n,r,t){r=h.createCallback(r,t,3);var e=-1,u=n?n.length:0;if("number"!=typeof u){var o;return fe(n,function(n,t,e){return r(n,t,e)?(o=n,!1):v}),o}for(;++e<u;){var a=n[e];if(r(a,e,n))return a}}function Qn(n,r,t){var e;return r=h.createCallback(r,t,3),Yn(n,function(n,t,u){
|
||||
return r(n,t,u)?(e=n,!1):v}),e}function Xn(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&"undefined"==typeof t?r:Q(r,t,3),"number"==typeof u)for(;++e<u&&r(n[e],e,n)!==!1;);else fe(n,r);return n}function Yn(n,r,t){var e=n?n.length:0;if(r=r&&"undefined"==typeof t?r:Q(r,t,3),"number"==typeof e)for(;e--&&r(n[e],e,n)!==!1;);else{var u=ne(n);e=u.length,fe(n,function(n,t,o){return t=u?u[--e]:--e,r(o[t],t,o)})}return n}function Zn(n,r){var t=p(arguments,2),e=-1,u="function"==typeof r,o=n?n.length:0,a=ht("number"==typeof o?o:0);
|
||||
|
||||
return Xn(n,function(n){a[++e]=(u?r:n[r]).apply(n,t)}),a}function nr(n,r,t){var e=-1,u=n?n.length:0;if(r=h.createCallback(r,t,3),"number"==typeof u)for(var o=ht(u);++e<u;)o[e]=r(n[e],e,n);else o=[],fe(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function rr(n,r,t){var u=-(1/0),o=u;if("function"!=typeof r&&t&&t[r]===n&&(r=null),null==r&&Yt(n))for(var a=-1,i=n.length;++a<i;){var f=n[a];f>o&&(o=f)}else r=null==r&&Fn(n)?e:h.createCallback(r,t,3),Xn(n,function(n,t,e){var a=r(n,t,e);a>u&&(u=a,o=n)});return o;
|
||||
|
||||
}function tr(n,r,t){var u=1/0,o=u;if("function"!=typeof r&&t&&t[r]===n&&(r=null),null==r&&Yt(n))for(var a=-1,i=n.length;++a<i;){var f=n[a];f<o&&(o=f)}else r=null==r&&Fn(n)?e:h.createCallback(r,t,3),Xn(n,function(n,t,e){var a=r(n,t,e);a<u&&(u=a,o=n)});return o}function er(n,r,t,e){if(!n)return t;var u=arguments.length<3;r=h.createCallback(r,e,4);var o=-1,a=n.length;if("number"==typeof a)for(u&&(t=n[++o]);++o<a;)t=r(t,n[o],o,n);else fe(n,function(n,e,o){t=u?(u=!1,n):r(t,n,e,o)});return t}function ur(n,r,t,e){
|
||||
var u=arguments.length<3;return r=h.createCallback(r,e,4),Yn(n,function(n,e,o){t=u?(u=!1,n):r(t,n,e,o)}),t}function or(n,r,t){return r=h.createCallback(r,t,3),Hn(n,function(n,t,e){return!r(n,t,e)})}function ar(n,r,t){if(n&&"number"!=typeof n.length&&(n=Un(n)),null==r||t)return n?n[en(0,n.length-1)]:v;var e=ir(n);return e.length=Vt(Mt(0,r),e.length),e}function ir(n){var r=-1,t=n?n.length:0,e=ht("number"==typeof t?t:0);return Xn(n,function(n){var t=en(0,++r);e[r]=e[t],e[t]=n}),e}function fr(n){var r=n?n.length:0;
|
||||
|
||||
return"number"==typeof r?r:ne(n).length}function lr(n,r,t){var e;r=h.createCallback(r,t,3);var u=-1,o=n?n.length:0;if("number"==typeof o)for(;++u<o&&!(e=r(n[u],u,n)););else fe(n,function(n,t,u){return!(e=r(n,t,u))});return!!e}function cr(n,r,t){var e=-1,o=Yt(r),a=n?n.length:0,p=ht("number"==typeof a?a:0);for(o||(r=h.createCallback(r,t,3)),Xn(n,function(n,t,u){var a=p[++e]=f();o?a.criteria=nr(r,function(r){return n[r]}):(a.criteria=i())[0]=r(n,t,u),a.index=e,a.value=n}),a=p.length,p.sort(u);a--;){
|
||||
var s=p[a];p[a]=s.value,o||l(s.criteria),c(s)}return p}function pr(n){return n&&"number"==typeof n.length?p(n):Un(n)}function sr(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];u&&e.push(u)}return e}function vr(n){return Y(n,nn(arguments,!0,!0,1))}function hr(n,r,t){var e=-1,u=n?n.length:0;for(r=h.createCallback(r,t,3);++e<u;)if(r(n[e],e,n))return e;return-1}function gr(n,r,t){var e=n?n.length:0;for(r=h.createCallback(r,t,3);e--;)if(r(n[e],e,n))return e;return-1}function yr(n,r,t){var e=0,u=n?n.length:0;
|
||||
|
||||
if("number"!=typeof r&&null!=r){var o=-1;for(r=h.createCallback(r,t,3);++o<u&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[0]:v;return p(n,0,Vt(Mt(0,e),u))}function mr(n,r,t,e){return"boolean"!=typeof r&&null!=r&&(e=t,t="function"!=typeof r&&e&&e[r]===n?null:r,r=!1),null!=t&&(n=nr(n,t,e)),nn(n,r)}function br(r,t,e){if("number"==typeof e){var u=r?r.length:0;e=e<0?Mt(0,u+e):e||0}else if(e){var o=Nr(r,t);return r[o]===t?o:-1}return n(r,t,e)}function _r(n,r,t){var e=0,u=n?n.length:0;if("number"!=typeof r&&null!=r){
|
||||
var o=u;for(r=h.createCallback(r,t,3);o--&&r(n[o],o,n);)e++}else e=null==r||t?1:r||e;return p(n,0,Vt(Mt(0,u-e),u))}function dr(){for(var t=[],e=-1,u=arguments.length,a=i(),f=ln(),p=f===n,s=i();++e<u;){var v=arguments[e];(Yt(v)||vn(v))&&(t.push(v),a.push(p&&v.length>=b&&o(e?t[e]:s)))}var h=t[0],g=-1,y=h?h.length:0,m=[];n:for(;++g<y;){var _=a[0];if(v=h[g],(_?r(_,v):f(s,v))<0){for(e=u,(_||s).push(v);--e;)if(_=a[e],(_?r(_,v):f(t[e],v))<0)continue n;m.push(v)}}for(;u--;)_=a[u],_&&c(_);return l(a),l(s),
|
||||
m}function wr(n,r,t){var e=0,u=n?n.length:0;if("number"!=typeof r&&null!=r){var o=u;for(r=h.createCallback(r,t,3);o--&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n?n[u-1]:v;return p(n,Mt(0,u-e))}function jr(n,r,t){var e=n?n.length:0;for("number"==typeof t&&(e=(t<0?Mt(0,e+t):Vt(t,e-1))+1);e--;)if(n[e]===r)return e;return-1}function kr(n){for(var r=arguments,t=0,e=r.length,u=n?n.length:0;++t<e;)for(var o=-1,a=r[t];++o<u;)n[o]===a&&(Bt.call(n,o--,1),u--);return n}function xr(n,r,t){n=+n||0,t="number"==typeof t?t:+t||1,
|
||||
null==r&&(r=n,n=0);for(var e=-1,u=Mt(0,Et((r-n)/(t||1))),o=ht(u);++e<u;)o[e]=n,n+=t;return o}function Cr(n,r,t){var e=-1,u=n?n.length:0,o=[];for(r=h.createCallback(r,t,3);++e<u;){var a=n[e];r(a,e,n)&&(o.push(a),Bt.call(n,e--,1),u--)}return o}function Or(n,r,t){if("number"!=typeof r&&null!=r){var e=0,u=-1,o=n?n.length:0;for(r=h.createCallback(r,t,3);++u<o&&r(n[u],u,n);)e++}else e=null==r||t?1:Mt(0,r);return p(n,e)}function Nr(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?h.createCallback(t,e,1):Yr,r=t(r);u<o;){
|
||||
var a=u+o>>>1;t(n[a])<r?u=a+1:o=a}return u}function Rr(){return un(nn(arguments,!0,!0))}function Er(n,r,t,e){return"boolean"!=typeof r&&null!=r&&(e=t,t="function"!=typeof r&&e&&e[r]===n?null:r,r=!1),null!=t&&(t=h.createCallback(t,e,3)),un(n,r,t)}function Ir(n){return Y(n,p(arguments,1))}function Sr(){for(var n=-1,r=arguments.length;++n<r;){var t=arguments[n];if(Yt(t)||vn(t))var e=e?un(Y(e,t).concat(Y(t,e))):t}return e||[]}function Ar(){for(var n=arguments.length>1?arguments:arguments[0],r=-1,t=n?rr(ve(n,"length")):0,e=ht(t<0?0:t);++r<t;)e[r]=ve(n,r);
|
||||
|
||||
return e}function Dr(n,r){var t=-1,e=n?n.length:0,u={};for(r||!e||Yt(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u}function Tr(n,r){if(!In(r))throw new kt;return function(){return--n<1?r.apply(this,arguments):v}}function $r(n,r){return arguments.length>2?an(n,17,p(arguments,2),null,r):an(n,1,null,null,r)}function Fr(n){for(var r=arguments.length>1?nn(arguments,!0,!1,1):wn(n),t=-1,e=r.length;++t<e;){var u=r[t];n[u]=an(n[u],1,null,null,n)}return n}function Br(n,r){return arguments.length>2?an(r,19,p(arguments,2),null,n):an(r,3,null,null,n);
|
||||
|
||||
}function Wr(){for(var n=arguments,r=n.length;r--;)if(!In(n[r]))throw new kt;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}}function qr(n,r){return r="number"==typeof r?r:+r||n.length,an(n,4,null,null,null,r)}function zr(n,r,t){var e,u,o,a,i,f,l,c=0,p=!1,s=!0;if(!In(n))throw new kt;if(r=Mt(0,r)||0,t===!0){var h=!0;s=!1}else Sn(t)&&(h=t.leading,p="maxWait"in t&&(Mt(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var g=function(){var t=r-(ge()-a);if(t>0)f=Ft(g,t);
|
||||
else{u&&It(u);var p=l;u=f=l=v,p&&(c=ge(),o=n.apply(i,e),f||u||(e=i=null))}},y=function(){f&&It(f),u=f=l=v,(s||p!==r)&&(c=ge(),o=n.apply(i,e),f||u||(e=i=null))};return function(){if(e=arguments,a=ge(),i=this,l=s&&(f||!h),p===!1)var t=h&&!f;else{u||h||(c=a);var v=p-(a-c),m=v<=0;m?(u&&(u=It(u)),c=a,o=n.apply(i,e)):u||(u=Ft(y,v))}return m&&f?f=It(f):f||r===p||(f=Ft(g,r)),t&&(m=!0,o=n.apply(i,e)),!m||f||u||(e=i=null),o}}function Lr(n){if(!In(n))throw new kt;var r=p(arguments,1);return Ft(function(){n.apply(v,r);
|
||||
|
||||
},1)}function Pr(n,r){if(!In(n))throw new kt;var t=p(arguments,2);return Ft(function(){n.apply(v,t)},r)}function Kr(n,r){if(!In(n))throw new kt;var t=function(){var e=t.cache,u=r?r.apply(this,arguments):m+arguments[0];return Tt.call(e,u)?e[u]:e[u]=n.apply(this,arguments)};return t.cache={},t}function Ur(n){var r,t;if(!In(n))throw new kt;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}}function Mr(n){return an(n,16,p(arguments,1))}function Vr(n){return an(n,32,null,p(arguments,1));
|
||||
|
||||
}function Gr(n,r,t){var e=!0,u=!0;if(!In(n))throw new kt;return t===!1?e=!1:Sn(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),U.leading=e,U.maxWait=r,U.trailing=u,zr(n,r,U)}function Hr(n,r){return an(r,16,[n])}function Jr(n){return function(){return n}}function Qr(n,r,t){var e=typeof n;if(null==n||"function"==e)return Q(n,r,t);if("object"!=e)return tt(n);var u=ne(n),o=u[0],a=n[o];return 1!=u.length||a!==a||Sn(a)?function(r){for(var t=u.length,e=!1;t--&&(e=rn(r[u[t]],n[u[t]],null,!0)););
|
||||
return e}:function(n){var r=n[o];return a===r&&(0!==a||1/a==1/r)}}function Xr(n){return null==n?"":jt(n).replace(ue,fn)}function Yr(n){return n}function Zr(n,r,t){var e=!0,u=r&&wn(r);r&&(t||u.length)||(null==t&&(t=r),o=g,r=n,n=h,u=wn(r)),t===!1?e=!1:Sn(t)&&"chain"in t&&(e=t.chain);var o=n,a=In(o);Xn(u,function(t){var u=n[t]=r[t];a&&(o.prototype[t]=function(){var r=this.__chain__,t=this.__wrapped__,a=[t];$t.apply(a,arguments);var i=u.apply(n,a);if(e||r){if(t===i&&Sn(i))return this;i=new o(i),i.__chain__=r;
|
||||
|
||||
}return i})})}function nt(){return t._=Ot,this}function rt(){}function tt(n){return function(r){return r[n]}}function et(n,r,t){var e=null==n,u=null==r;if(null==t&&("boolean"==typeof n&&u?(t=n,n=1):u||"boolean"!=typeof r||(t=r,u=!0)),e&&u&&(r=1),n=+n||0,u?(r=n,n=0):r=+r||0,t||n%1||r%1){var o=Ht();return Vt(n+o*(r-n+parseFloat("1e-"+((o+"").length-1))),r)}return en(n,r)}function ut(n,r){if(n){var t=n[r];return In(t)?n[r]():t}}function ot(n,r,t){var e=h.templateSettings;n=jt(n||""),t=ae({},t,e);var u,o=ae({},t.imports,e.imports),i=ne(o),f=Un(o),l=0,c=t.interpolate||E,p="__p += '",s=wt((t.escape||E).source+"|"+c.source+"|"+(c===N?x:E).source+"|"+(t.evaluate||E).source+"|$","g");
|
||||
|
||||
n.replace(s,function(r,t,e,o,i,f){return e||(e=o),p+=n.slice(l,f).replace(S,a),t&&(p+="' +\n__e("+t+") +\n'"),i&&(u=!0,p+="';\n"+i+";\n__p += '"),e&&(p+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),l=f+r.length,r}),p+="';\n";var g=t.variable,y=g;y||(g="obj",p="with ("+g+") {\n"+p+"\n}\n"),p=(u?p.replace(w,""):p).replace(j,"$1").replace(k,"$1;"),p="function("+g+") {\n"+(y?"":g+" || ("+g+" = {});\n")+"var __t, __p = '', __e = _.escape"+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";
|
||||
|
||||
var m="\n/*\n//# sourceURL="+(t.sourceURL||"/lodash/template/source["+D++ +"]")+"\n*/";try{var b=mt(i,"return "+p+m).apply(v,f)}catch(_){throw _.source=p,_}return r?b(r):(b.source=p,b)}function at(n,r,t){n=(n=+n)>-1?n:0;var e=-1,u=ht(n);for(r=Q(r,t,1);++e<n;)u[e]=r(e);return u}function it(n){return null==n?"":jt(n).replace(ee,sn)}function ft(n){var r=++y;return jt(null==n?"":n)+r}function lt(n){return n=new g(n),n.__chain__=!0,n}function ct(n,r){return r(n),n}function pt(){return this.__chain__=!0,
|
||||
this}function st(){return jt(this.__wrapped__)}function vt(){return this.__wrapped__}t=t?Z.defaults(H.Object(),t,Z.pick(H,A)):H;var ht=t.Array,gt=t.Boolean,yt=t.Date,mt=t.Function,bt=t.Math,_t=t.Number,dt=t.Object,wt=t.RegExp,jt=t.String,kt=t.TypeError,xt=[],Ct=dt.prototype,Ot=t._,Nt=Ct.toString,Rt=wt("^"+jt(Nt).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Et=bt.ceil,It=t.clearTimeout,St=bt.floor,At=mt.prototype.toString,Dt=cn(Dt=dt.getPrototypeOf)&&Dt,Tt=Ct.hasOwnProperty,$t=xt.push,Ft=t.setTimeout,Bt=xt.splice,Wt=xt.unshift,qt=function(){
|
||||
try{var n={},r=cn(r=dt.defineProperty)&&r,t=r(n,n,n)&&r}catch(e){}return t}(),zt=cn(zt=dt.create)&&zt,Lt=cn(Lt=ht.isArray)&&Lt,Pt=t.isFinite,Kt=t.isNaN,Ut=cn(Ut=dt.keys)&&Ut,Mt=bt.max,Vt=bt.min,Gt=t.parseInt,Ht=bt.random,Jt={};Jt[$]=ht,Jt[F]=gt,Jt[B]=yt,Jt[W]=mt,Jt[z]=dt,Jt[q]=_t,Jt[L]=wt,Jt[P]=jt,g.prototype=h.prototype;var Qt=h.support={};Qt.funcDecomp=!cn(t.WinRTError)&&I.test(s),Qt.funcNames="string"==typeof mt.name,h.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:N,
|
||||
variable:"",imports:{_:h}},zt||(J=function(){function n(){}return function(r){if(Sn(r)){n.prototype=r;var e=new n;n.prototype=null}return e||t.Object()}}());var Xt=qt?function(n,r){M.value=r,qt(n,"__bindData__",M),M.value=null}:rt,Yt=Lt||function(n){return n&&"object"==typeof n&&"number"==typeof n.length&&Nt.call(n)==$||!1},Zt=function(n){var r,t=n,e=[];if(!t)return e;if(!V[typeof n])return e;for(r in t)Tt.call(t,r)&&e.push(r);return e},ne=Ut?function(n){return Sn(n)?Ut(n):[]}:Zt,re={"&":"&",
|
||||
"<":"<",">":">",'"':""","'":"'"},te=kn(re),ee=wt("("+ne(te).join("|")+")","g"),ue=wt("["+ne(re).join("")+"]","g"),oe=function(n,r,t){var e,u=n,o=u;if(!u)return o;var a=arguments,i=0,f="number"==typeof t?2:a.length;if(f>3&&"function"==typeof a[f-2])var l=Q(a[--f-1],a[f--],2);else f>2&&"function"==typeof a[f-1]&&(l=a[--f]);for(;++i<f;)if(u=a[i],u&&V[typeof u])for(var c=-1,p=V[typeof u]&&ne(u),s=p?p.length:0;++c<s;)e=p[c],o[e]=l?l(o[e],u[e]):u[e];return o},ae=function(n,r,t){var e,u=n,o=u;
|
||||
|
||||
if(!u)return o;for(var a=arguments,i=0,f="number"==typeof t?2:a.length;++i<f;)if(u=a[i],u&&V[typeof u])for(var l=-1,c=V[typeof u]&&ne(u),p=c?c.length:0;++l<p;)e=c[l],"undefined"==typeof o[e]&&(o[e]=u[e]);return o},ie=function(n,r,t){var e,u=n,o=u;if(!u)return o;if(!V[typeof u])return o;r=r&&"undefined"==typeof t?r:Q(r,t,3);for(e in u)if(r(u[e],e,n)===!1)return o;return o},fe=function(n,r,t){var e,u=n,o=u;if(!u)return o;if(!V[typeof u])return o;r=r&&"undefined"==typeof t?r:Q(r,t,3);for(var a=-1,i=V[typeof u]&&ne(u),f=i?i.length:0;++a<f;)if(e=i[a],
|
||||
r(u[e],e,n)===!1)return o;return o},le=Dt?function(n){if(!n||Nt.call(n)!=z)return!1;var r=n.valueOf,t=cn(r)&&(t=Dt(r))&&Dt(t);return t?n==t||Dt(n)==t:pn(n)}:pn,ce=on(function(n,r,t){Tt.call(n,t)?n[t]++:n[t]=1}),pe=on(function(n,r,t){(Tt.call(n,t)?n[t]:n[t]=[]).push(r)}),se=on(function(n,r,t){n[t]=r}),ve=nr,he=Hn,ge=cn(ge=yt.now)&&ge||function(){return(new yt).getTime()},ye=8==Gt(d+"08")?Gt:function(n,r){return Gt(Fn(n)?n.replace(R,""):n,r||0)};return h.after=Tr,h.assign=oe,h.at=Mn,h.bind=$r,h.bindAll=Fr,
|
||||
h.bindKey=Br,h.chain=lt,h.compact=sr,h.compose=Wr,h.constant=Jr,h.countBy=ce,h.create=yn,h.createCallback=Qr,h.curry=qr,h.debounce=zr,h.defaults=ae,h.defer=Lr,h.delay=Pr,h.difference=vr,h.filter=Hn,h.flatten=mr,h.forEach=Xn,h.forEachRight=Yn,h.forIn=ie,h.forInRight=_n,h.forOwn=fe,h.forOwnRight=dn,h.functions=wn,h.groupBy=pe,h.indexBy=se,h.initial=_r,h.intersection=dr,h.invert=kn,h.invoke=Zn,h.keys=ne,h.map=nr,h.mapValues=Wn,h.max=rr,h.memoize=Kr,h.merge=qn,h.min=tr,h.omit=zn,h.once=Ur,h.pairs=Ln,
|
||||
h.partial=Mr,h.partialRight=Vr,h.pick=Pn,h.pluck=ve,h.property=tt,h.pull=kr,h.range=xr,h.reject=or,h.remove=Cr,h.rest=Or,h.shuffle=ir,h.sortBy=cr,h.tap=ct,h.throttle=Gr,h.times=at,h.toArray=pr,h.transform=Kn,h.union=Rr,h.uniq=Er,h.values=Un,h.where=he,h.without=Ir,h.wrap=Hr,h.xor=Sr,h.zip=Ar,h.zipObject=Dr,h.collect=nr,h.drop=Or,h.each=Xn,h.eachRight=Yn,h.extend=oe,h.methods=wn,h.object=Dr,h.select=Hn,h.tail=Or,h.unique=Er,h.unzip=Ar,Zr(h),h.clone=hn,h.cloneDeep=gn,h.contains=Vn,h.escape=Xr,h.every=Gn,
|
||||
h.find=Jn,h.findIndex=hr,h.findKey=mn,h.findLast=Qn,h.findLastIndex=gr,h.findLastKey=bn,h.has=jn,h.identity=Yr,h.indexOf=br,h.isArguments=vn,h.isArray=Yt,h.isBoolean=xn,h.isDate=Cn,h.isElement=On,h.isEmpty=Nn,h.isEqual=Rn,h.isFinite=En,h.isFunction=In,h.isNaN=An,h.isNull=Dn,h.isNumber=Tn,h.isObject=Sn,h.isPlainObject=le,h.isRegExp=$n,h.isString=Fn,h.isUndefined=Bn,h.lastIndexOf=jr,h.mixin=Zr,h.noConflict=nt,h.noop=rt,h.now=ge,h.parseInt=ye,h.random=et,h.reduce=er,h.reduceRight=ur,h.result=ut,h.runInContext=s,
|
||||
h.size=fr,h.some=lr,h.sortedIndex=Nr,h.template=ot,h.unescape=it,h.uniqueId=ft,h.all=Gn,h.any=lr,h.detect=Jn,h.findWhere=Jn,h.foldl=er,h.foldr=ur,h.include=Vn,h.inject=er,Zr(function(){var n={};return fe(h,function(r,t){h.prototype[t]||(n[t]=r)}),n}(),!1),h.first=yr,h.last=wr,h.sample=ar,h.take=yr,h.head=yr,fe(h,function(n,r){var t="sample"!==r;h.prototype[r]||(h.prototype[r]=function(r,e){var u=this.__chain__,o=n(this.__wrapped__,r,e);return u||null!=r&&(!e||t&&"function"==typeof r)?new g(o,u):o;
|
||||
|
||||
})}),h.VERSION="2.4.2",h.prototype.chain=pt,h.prototype.toString=st,h.prototype.value=vt,h.prototype.valueOf=vt,Xn(["join","pop","shift"],function(n){var r=xt[n];h.prototype[n]=function(){var n=this.__chain__,t=r.apply(this.__wrapped__,arguments);return n?new g(t,n):t}}),Xn(["push","reverse","sort","unshift"],function(n){var r=xt[n];h.prototype[n]=function(){return r.apply(this.__wrapped__,arguments),this}}),Xn(["concat","slice","splice"],function(n){var r=xt[n];h.prototype[n]=function(){return new g(r.apply(this.__wrapped__,arguments),this.__chain__);
|
||||
|
||||
}}),h}var v,h=[],g=[],y=0,m=+new Date+"",b=75,_=40,d=" \f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",w=/\b__p \+= '';/g,j=/\b(__p \+=) '' \+/g,k=/(__e\(.*?\)|\b__t\)) \+\n'';/g,x=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,O=/^\s*function[ \n\r\t]+\w/,N=/<%=([\s\S]+?)%>/g,R=RegExp("^["+d+"]*0+(?=.$)"),E=/($^)/,I=/\bthis\b/,S=/['\n\r\t\u2028\u2029\\]/g,A=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],D=0,T="[object Arguments]",$="[object Array]",F="[object Boolean]",B="[object Date]",W="[object Function]",q="[object Number]",z="[object Object]",L="[object RegExp]",P="[object String]",K={};
|
||||
|
||||
K[W]=!1,K[T]=K[$]=K[F]=K[B]=K[q]=K[z]=K[L]=K[P]=!0;var U={leading:!1,maxWait:0,trailing:!1},M={configurable:!1,enumerable:!1,value:null,writable:!1},V={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},G={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},H=V[typeof window]&&window||this,J=V[typeof exports]&&exports&&!exports.nodeType&&exports,Q=V[typeof module]&&module&&!module.nodeType&&module,X=Q&&Q.exports===J&&J,Y=V[typeof global]&&global;!Y||Y.global!==Y&&Y.window!==Y||(H=Y);
|
||||
|
||||
var Z=s();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(H._=Z,define(function(){return Z})):J&&Q?X?(Q.exports=Z)._=Z:J._=Z:H._=Z}).call(this);
|
||||
61
dist/lodash.underscore.js
vendored
61
dist/lodash.underscore.js
vendored
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.4.0 (Custom Build) <http://lodash.com/>
|
||||
* Lo-Dash 2.4.2 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
||||
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <http://lodash.com/license>
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
;(function() {
|
||||
|
||||
@@ -215,11 +215,11 @@
|
||||
propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||||
|
||||
/* Native method shortcuts for methods with the same name as other `lodash` methods */
|
||||
var nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
|
||||
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
|
||||
var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate,
|
||||
nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray,
|
||||
nativeIsFinite = root.isFinite,
|
||||
nativeIsNaN = root.isNaN,
|
||||
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeMax = Math.max,
|
||||
nativeMin = Math.min,
|
||||
nativeRandom = Math.random;
|
||||
@@ -402,7 +402,10 @@
|
||||
// `Function#bind` spec
|
||||
// http://es5.github.io/#x15.3.4.5
|
||||
if (partialArgs) {
|
||||
var args = partialArgs.slice();
|
||||
// avoid `arguments` object deoptimizations by using `slice` instead
|
||||
// of `Array.prototype.slice.call` and not assigning `arguments` to a
|
||||
// variable as a ternary expression
|
||||
var args = slice(partialArgs);
|
||||
push.apply(args, arguments);
|
||||
}
|
||||
// mimic the constructor's `return` behavior
|
||||
@@ -504,7 +507,7 @@
|
||||
function bound() {
|
||||
var thisBinding = isBind ? thisArg : this;
|
||||
if (partialArgs) {
|
||||
var args = partialArgs.slice();
|
||||
var args = slice(partialArgs);
|
||||
push.apply(args, arguments);
|
||||
}
|
||||
if (partialRightArgs || isCurry) {
|
||||
@@ -690,22 +693,25 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
forIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
size++;
|
||||
return !(result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, stackA, stackB)) && indicatorObject;
|
||||
}
|
||||
});
|
||||
|
||||
if (result) {
|
||||
forIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
return !(result = --size > -1) && indicatorObject;
|
||||
else {
|
||||
forIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
size++;
|
||||
return !(result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, stackA, stackB)) && indicatorObject;
|
||||
}
|
||||
});
|
||||
|
||||
if (result) {
|
||||
forIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
return !(result = --size > -1) && indicatorObject;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
stackA.pop();
|
||||
stackB.pop();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -858,6 +864,17 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a native function.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if the `value` is a native function, else `false`.
|
||||
*/
|
||||
function isNative(value) {
|
||||
return typeof value == 'function' && reNative.test(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `unescape` to convert HTML entities to characters.
|
||||
*
|
||||
@@ -4324,7 +4341,7 @@
|
||||
* _.defer(function() { console.log(_.now() - stamp); });
|
||||
* // => logs the number of milliseconds it took for the deferred function to be called
|
||||
*/
|
||||
var now = reNative.test(now = Date.now) && now || function() {
|
||||
var now = isNative(now = Date.now) && now || function() {
|
||||
return new Date().getTime();
|
||||
};
|
||||
|
||||
@@ -4441,7 +4458,7 @@
|
||||
* debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl
|
||||
*
|
||||
* For more information on precompiling templates see:
|
||||
* http://lodash.com/custom-builds
|
||||
* https://lodash.com/custom-builds
|
||||
*
|
||||
* For more information on Chrome extension sandboxes see:
|
||||
* http://developer.chrome.com/stable/extensions/sandboxingEval.html
|
||||
@@ -4892,7 +4909,7 @@
|
||||
* @memberOf _
|
||||
* @type string
|
||||
*/
|
||||
lodash.VERSION = '2.4.0';
|
||||
lodash.VERSION = '2.4.2';
|
||||
|
||||
// add "Chaining" functions to the wrapper
|
||||
lodash.prototype.chain = wrapperChain;
|
||||
|
||||
70
dist/lodash.underscore.min.js
vendored
70
dist/lodash.underscore.min.js
vendored
@@ -1,39 +1,39 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.4.0 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Lo-Dash 2.4.2 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE
|
||||
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
||||
*/
|
||||
;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++t<e;)if(n[t]===r)return t;return-1}function r(n,r){for(var t=n.m,e=r.m,u=-1,o=t.length;++u<o;){var i=t[u],f=e[u];if(i!==f){if(i>f||typeof i=="undefined")return 1;if(i<f||typeof f=="undefined")return-1}}return n.n-r.n}function t(n){return"\\"+vr[n]}function e(n,r,t){r||(r=0),typeof t=="undefined"&&(t=n?n.length:0);var e=-1;t=t-r||0;for(var u=Array(0>t?0:t);++e<t;)u[e]=n[r+e];return u}function u(n){return n instanceof u?n:new o(n)}function o(n,r){this.__chain__=!!r,this.__wrapped__=n
|
||||
}function i(n){function r(){if(e){var n=e.slice();Nr.apply(n,arguments)}if(this instanceof r){var o=f(t.prototype),n=t.apply(o,n||arguments);return A(n)?n:o}return t.apply(u,n||arguments)}var t=n[0],e=n[2],u=n[4];return r}function f(n){return A(n)?kr(n):{}}function a(n,r,t){if(typeof n!="function")return X;if(typeof r=="undefined"||!("prototype"in n))return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,e){return n.call(r,t,e)};case 3:return function(t,e,u){return n.call(r,t,e,u)
|
||||
};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return K(n,r)}function l(n){function r(){var n=p?a:this;if(o){var y=o.slice();Nr.apply(y,arguments)}return(i||g)&&(y||(y=e(arguments)),i&&Nr.apply(y,i),g&&y.length<c)?(u|=16,l([t,h?u:-4&u,y,null,a,c])):(y||(y=arguments),s&&(t=n[v]),this instanceof r?(n=f(t.prototype),y=t.apply(n,y),A(y)?y:n):t.apply(n,y))}var t=n[0],u=n[1],o=n[2],i=n[3],a=n[4],c=n[5],p=1&u,s=2&u,g=4&u,h=8&u,v=t;return r}function c(n,r){for(var t=-1,e=m(),u=n?n.length:0,o=[];++t<u;){var i=n[t];
|
||||
0>e(r,i)&&o.push(i)}return o}function p(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(zr(i)||d(i))){r||(i=p(i,r,t));var f=-1,a=i.length,l=o.length;for(o.length+=a;++f<a;)o[l++]=i[f]}else t||o.push(i)}return o}function s(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(n===n&&!(n&&hr[typeof n]||r&&hr[typeof r]))return false;if(null==n||null==r)return n===r;var o=Tr.call(n),i=Tr.call(r);if(o!=i)return false;switch(o){case ar:case lr:return+n==+r;
|
||||
case cr:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case sr:case gr:return n==r+""}if(i=o==fr,!i){var f=n instanceof u,a=r instanceof u;if(f||a)return s(f?n.__wrapped__:n,a?r.__wrapped__:r,t,e);if(o!=pr)return false;if(o=n.constructor,f=r.constructor,o!=f&&!(E(o)&&o instanceof o&&E(f)&&f instanceof f)&&"constructor"in n&&"constructor"in r)return false}for(t||(t=[]),e||(e=[]),o=t.length;o--;)if(t[o]==n)return e[o]==r;var l=true,c=0;if(t.push(n),e.push(r),i){if(c=r.length,l=c==n.length)for(;c--&&(l=s(n[c],r[c],t,e)););return l
|
||||
}return Jr(r,function(r,u,o){return Sr.call(o,u)?(c++,!(l=Sr.call(n,u)&&s(n[u],r,t,e))&&tr):void 0}),l&&Jr(n,function(n,r,t){return Sr.call(t,r)?!(l=-1<--c)&&tr:void 0}),l}function g(n,r,t){for(var e=-1,u=m(),o=n?n.length:0,i=[],f=t?[]:i;++e<o;){var a=n[e],l=t?t(a,e,n):a;(r?!e||f[f.length-1]!==l:0>u(f,l))&&(t&&f.push(l),i.push(a))}return i}function h(n){return function(r,t,e){var u={};t=Q(t,e,3),e=-1;var o=r?r.length:0;if(typeof o=="number")for(;++e<o;){var i=r[e];n(u,i,t(i,e,r),r)}else Kr(r,function(r,e,o){n(u,r,t(r,e,o),o)
|
||||
});return u}}function v(n,r,t,e,u,o){var f=16&r,a=32&r;if(!(2&r||E(n)))throw new TypeError;return f&&!t.length&&(r&=-17,t=false),a&&!e.length&&(r&=-33,e=false),(1==r||17===r?i:l)([n,r,t,e,u,o])}function y(n){return Ur[n]}function m(){var r=(r=u.indexOf)===V?n:r;return r}function _(n){return Vr[n]}function d(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Tr.call(n)==ir||false}function b(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]=e[u]}return n
|
||||
}function w(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)"undefined"==typeof n[u]&&(n[u]=e[u])}return n}function j(n){var r=[];return Jr(n,function(n,t){E(n)&&r.push(t)}),r.sort()}function x(n){for(var r=-1,t=Pr(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u}function T(n){if(!n)return true;if(zr(n)||S(n))return!n.length;for(var r in n)if(Sr.call(n,r))return false;return true}function E(n){return typeof n=="function"}function A(n){return!(!n||!hr[typeof n])
|
||||
}function O(n){return typeof n=="number"||n&&typeof n=="object"&&Tr.call(n)==cr||false}function S(n){return typeof n=="string"||n&&typeof n=="object"&&Tr.call(n)==gr||false}function N(n){for(var r=-1,t=Pr(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function R(n,r){var t=m(),e=n?n.length:0,u=false;return e&&typeof e=="number"?u=-1<t(n,r):Kr(n,function(n){return(u=n===r)&&tr}),u}function k(n,r,t){var e=true;r=Q(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else Kr(n,function(n,t,u){return!(e=!!r(n,t,u))&&tr
|
||||
});return e}function B(n,r,t){var e=[];r=Q(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var o=n[t];r(o,t,n)&&e.push(o)}else Kr(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function F(n,r,t){r=Q(r,t,3),t=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return Kr(n,function(n,t,e){return r(n,t,e)?(u=n,tr):void 0}),u}for(;++t<e;){var o=n[t];if(r(o,t,n))return o}}function q(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:a(r,t,3),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==tr;);else Kr(n,r)
|
||||
}function D(n,r){var t=n?n.length:0;if(typeof t=="number")for(;t--&&false!==r(n[t],t,n););else{var e=Pr(n),t=e.length;Kr(n,function(n,u,o){return u=e?e[--t]:--t,false===r(o[u],u,o)&&tr})}}function I(n,r,t){var e=-1,u=n?n.length:0;if(r=Q(r,t,3),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],Kr(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function M(n,r,t){var e=-1/0,u=e;typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t>u&&(u=t);
|
||||
else r=Q(r,t,3),q(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function $(n,r,t,e){if(!n)return t;var u=3>arguments.length;r=Q(r,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(t=n[++o]);++o<i;)t=r(t,n[o],o,n);else Kr(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)});return t}function W(n,r,t,e){var u=3>arguments.length;return r=Q(r,e,4),D(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function z(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return q(n,function(n){var t;t=++r,t=0+Or($r()*(t-0+1)),e[r]=e[t],e[t]=n
|
||||
}),e}function C(n,r,t){var e;r=Q(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else Kr(n,function(n,t,u){return(e=r(n,t,u))&&tr});return!!e}function P(n,r,t){return t&&T(r)?nr:(t?F:B)(n,r)}function U(n,r,t){var u=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=-1;for(r=Q(r,t,3);++i<o&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[0]:nr;return e(n,0,Mr(Ir(0,u),o))}function V(r,t,e){if(typeof e=="number"){var u=r?r.length:0;e=0>e?Ir(0,u+e):e||0}else if(e)return e=H(r,t),r[e]===t?e:-1;
|
||||
return n(r,t,e)}function G(n,r,t){if(typeof r!="number"&&null!=r){var u=0,o=-1,i=n?n.length:0;for(r=Q(r,t,3);++o<i&&r(n[o],o,n);)u++}else u=null==r||t?1:Ir(0,r);return e(n,u)}function H(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?Q(t,e,1):X,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function J(n,r,t,e){return typeof r!="boolean"&&null!=r&&(e=t,t=typeof r!="function"&&e&&e[r]===n?null:r,r=false),null!=t&&(t=Q(t,e,3)),g(n,r,t)}function K(n,r){return 2<arguments.length?v(n,17,e(arguments,2),null,r):v(n,1,null,null,r)
|
||||
}function L(n,r,t){var e,u,o,i,f,a,l,c=0,p=false,s=true;if(!E(n))throw new TypeError;if(r=Ir(0,r)||0,true===t)var g=true,s=false;else A(t)&&(g=t.leading,p="maxWait"in t&&(Ir(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var h=function(){var t=r-(Zr()-i);0<t?a=setTimeout(h,t):(u&&clearTimeout(u),t=l,u=a=l=nr,t&&(c=Zr(),o=n.apply(f,e),a||u||(e=f=null)))},v=function(){a&&clearTimeout(a),u=a=l=nr,(s||p!==r)&&(c=Zr(),o=n.apply(f,e),a||u||(e=f=null))};return function(){if(e=arguments,i=Zr(),f=this,l=s&&(a||!g),false===p)var t=g&&!a;
|
||||
else{u||g||(c=i);var y=p-(i-c),m=0>=y;m?(u&&(u=clearTimeout(u)),c=i,o=n.apply(f,e)):u||(u=setTimeout(v,y))}return m&&a?a=clearTimeout(a):a||r===p||(a=setTimeout(h,r)),t&&(m=true,o=n.apply(f,e)),!m||a||u||(e=f=null),o}}function Q(n,r,t){var e=typeof n;if(null==n||"function"==e)return a(n,r,t);if("object"!=e)return Z(n);var u=Pr(n);return function(r){for(var t=u.length,e=false;t--&&(e=r[u[t]]===n[u[t]]););return e}}function X(n){return n}function Y(n){q(j(n),function(r){var t=u[r]=n[r];u.prototype[r]=function(){var n=[this.__wrapped__];
|
||||
return Nr.apply(n,arguments),n=t.apply(u,n),this.__chain__?new o(n,true):n}})}function Z(n){return function(r){return r[n]}}var nr,rr=0,tr={},er=+new Date+"",ur=/($^)/,or=/['\n\r\t\u2028\u2029\\]/g,ir="[object Arguments]",fr="[object Array]",ar="[object Boolean]",lr="[object Date]",cr="[object Number]",pr="[object Object]",sr="[object RegExp]",gr="[object String]",hr={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},vr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},yr=hr[typeof window]&&window||this,mr=hr[typeof exports]&&exports&&!exports.nodeType&&exports,_r=hr[typeof module]&&module&&!module.nodeType&&module,dr=_r&&_r.exports===mr&&mr,br=hr[typeof global]&&global;
|
||||
!br||br.global!==br&&br.window!==br||(yr=br);var wr=[],jr=Object.prototype,xr=yr._,Tr=jr.toString,Er=RegExp("^"+(Tr+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Ar=Math.ceil,Or=Math.floor,Sr=jr.hasOwnProperty,Nr=wr.push,Rr=jr.propertyIsEnumerable,kr=Er.test(kr=Object.create)&&kr,Br=Er.test(Br=Array.isArray)&&Br,Fr=yr.isFinite,qr=yr.isNaN,Dr=Er.test(Dr=Object.keys)&&Dr,Ir=Math.max,Mr=Math.min,$r=Math.random;o.prototype=u.prototype;var Wr={};!function(){var n={0:1,length:1};
|
||||
Wr.spliceObjects=(wr.splice.call(n,0,1),!n[0])}(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},kr||(f=function(){function n(){}return function(r){if(A(r)){n.prototype=r;var t=new n;n.prototype=null}return t||yr.Object()}}()),d(arguments)||(d=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Sr.call(n,"callee")&&!Rr.call(n,"callee")||false});var zr=Br||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Tr.call(n)==fr||false
|
||||
},Cr=function(n){var r,t=[];if(!n||!hr[typeof n])return t;for(r in n)Sr.call(n,r)&&t.push(r);return t},Pr=Dr?function(n){return A(n)?Dr(n):[]}:Cr,Ur={"&":"&","<":"<",">":">",'"':""","'":"'"},Vr=x(Ur),Gr=RegExp("("+Pr(Vr).join("|")+")","g"),Hr=RegExp("["+Pr(Ur).join("")+"]","g"),Jr=function(n,r){var t;if(!n||!hr[typeof n])return n;for(t in n)if(r(n[t],t,n)===tr)break;return n},Kr=function(n,r){var t;if(!n||!hr[typeof n])return n;for(t in n)if(Sr.call(n,t)&&r(n[t],t,n)===tr)break;
|
||||
return n};E(/x/)&&(E=function(n){return typeof n=="function"&&"[object Function]"==Tr.call(n)});var Lr=h(function(n,r,t){Sr.call(n,t)?n[t]++:n[t]=1}),Qr=h(function(n,r,t){(Sr.call(n,t)?n[t]:n[t]=[]).push(r)}),Xr=h(function(n,r,t){n[t]=r}),Yr=I,Zr=Er.test(Zr=Date.now)&&Zr||function(){return(new Date).getTime()};u.after=function(n,r){if(!E(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},u.bind=K,u.bindAll=function(n){for(var r=1<arguments.length?p(arguments,true,false,1):j(n),t=-1,e=r.length;++t<e;){var u=r[t];
|
||||
n[u]=v(n[u],1,null,null,n)}return n},u.chain=function(n){return n=new o(n),n.__chain__=true,n},u.compact=function(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];u&&e.push(u)}return e},u.compose=function(){for(var n=arguments,r=n.length;r--;)if(!E(n[r]))throw new TypeError;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},u.countBy=Lr,u.debounce=L,u.defaults=w,u.defer=function(n){if(!E(n))throw new TypeError;var r=e(arguments,1);return setTimeout(function(){n.apply(nr,r)
|
||||
},1)},u.delay=function(n,r){if(!E(n))throw new TypeError;var t=e(arguments,2);return setTimeout(function(){n.apply(nr,t)},r)},u.difference=function(n){return c(n,p(arguments,true,true,1))},u.filter=B,u.flatten=function(n,r){return p(n,r)},u.forEach=q,u.functions=j,u.groupBy=Qr,u.indexBy=Xr,u.initial=function(n,r,t){var u=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=o;for(r=Q(r,t,3);i--&&r(n[i],i,n);)u++}else u=null==r||t?1:r||u;return e(n,0,Mr(Ir(0,o-u),o))},u.intersection=function(){for(var n=[],r=-1,t=arguments.length;++r<t;){var e=arguments[r];
|
||||
(zr(e)||d(e))&&n.push(e)}var u=n[0],o=-1,i=m(),f=u?u.length:0,a=[];n:for(;++o<f;)if(e=u[o],0>i(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},u.invert=x,u.invoke=function(n,r){var t=e(arguments,2),u=-1,o=typeof r=="function",i=n?n.length:0,f=Array(typeof i=="number"?i:0);return q(n,function(n){f[++u]=(o?r:n[r]).apply(n,t)}),f},u.keys=Pr,u.map=I,u.max=M,u.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):er+arguments[0];return Sr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)
|
||||
}},u.min=function(n,r,t){var e=1/0,u=e;typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t<u&&(u=t);else r=Q(r,t,3),q(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u},u.omit=function(n){var r=[];Jr(n,function(n,t){r.push(t)});for(var r=c(r,p(arguments,true,false,1)),t=-1,e=r.length,u={};++t<e;){var o=r[t];u[o]=n[o]}return u},u.once=function(n){var r,t;if(!E(n))throw new TypeError;return function(){return r?t:(r=true,t=n.apply(this,arguments),n=null,t)
|
||||
}},u.pairs=function(n){for(var r=-1,t=Pr(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},u.partial=function(n){return v(n,16,e(arguments,1))},u.pick=function(n){for(var r=-1,t=p(arguments,true,false,1),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},u.pluck=Yr,u.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=Ir(0,Ar((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},u.reject=function(n,r,t){return r=Q(r,t,3),B(n,function(n,t,e){return!r(n,t,e)
|
||||
})},u.rest=G,u.shuffle=z,u.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(t=Q(t,e,3),q(n,function(n,r,e){i[++u]={m:[t(n,r,e)],n:u,o:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].o;return i},u.tap=function(n,r){return r(n),n},u.throttle=function(n,r,t){var e=true,u=true;if(!E(n))throw new TypeError;return false===t?e=false:A(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,L(n,r,t)},u.times=function(n,r,t){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=Array(n);for(r=a(r,t,1);++e<n;)u[e]=r(e);return u},u.toArray=function(n){return zr(n)?e(n):n&&typeof n.length=="number"?I(n):N(n)},u.union=function(){return g(p(arguments,true,true))},u.uniq=J,u.values=N,u.where=P,u.without=function(n){return c(n,e(arguments,1))},u.wrap=function(n,r){return v(r,16,[n])},u.zip=function(){for(var n=-1,r=M(Yr(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=Yr(arguments,n);return t},u.collect=I,u.drop=G,u.each=q,u.extend=b,u.methods=j,u.object=function(n,r){var t=-1,e=n?n.length:0,u={};
|
||||
for(r||!e||zr(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},u.select=B,u.tail=G,u.unique=J,u.clone=function(n){return A(n)?zr(n)?e(n):b({},n):n},u.contains=R,u.escape=function(n){return null==n?"":(n+"").replace(Hr,y)},u.every=k,u.find=F,u.has=function(n,r){return n?Sr.call(n,r):false},u.identity=X,u.indexOf=V,u.isArguments=d,u.isArray=zr,u.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Tr.call(n)==ar||false},u.isDate=function(n){return n&&typeof n=="object"&&Tr.call(n)==lr||false
|
||||
},u.isElement=function(n){return n&&1===n.nodeType||false},u.isEmpty=T,u.isEqual=function(n,r){return s(n,r)},u.isFinite=function(n){return Fr(n)&&!qr(parseFloat(n))},u.isFunction=E,u.isNaN=function(n){return O(n)&&n!=+n},u.isNull=function(n){return null===n},u.isNumber=O,u.isObject=A,u.isRegExp=function(n){return n&&hr[typeof n]&&Tr.call(n)==sr||false},u.isString=S,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Ir(0,e+t):Mr(t,e-1))+1);e--;)if(n[e]===r)return e;
|
||||
return-1},u.mixin=Y,u.noConflict=function(){return yr._=xr,this},u.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Or($r()*(r-n+1))},u.reduce=$,u.reduceRight=W,u.result=function(n,r){if(n){var t=n[r];return E(t)?n[r]():t}},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Pr(n).length},u.some=C,u.sortedIndex=H,u.template=function(n,r,e){var o=u,i=o.templateSettings;n=(n||"")+"",e=w({},e,i);var f=0,a="__p+='",i=e.variable;n.replace(RegExp((e.escape||ur).source+"|"+(e.interpolate||ur).source+"|"+(e.evaluate||ur).source+"|$","g"),function(r,e,u,o,i){return a+=n.slice(f,i).replace(or,t),e&&(a+="'+_.escape("+e+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r
|
||||
}),a+="';",i||(i="obj",a="with("+i+"||{}){"+a+"}"),a="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";try{var l=Function("_","return "+a)(o)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},u.unescape=function(n){return null==n?"":(n+"").replace(Gr,_)},u.uniqueId=function(n){var r=++rr+"";return n?n+r:r},u.all=k,u.any=C,u.detect=F,u.findWhere=function(n,r){return P(n,r,true)},u.foldl=$,u.foldr=W,u.include=R,u.inject=$,u.first=U,u.last=function(n,r,t){var u=0,o=n?n.length:0;
|
||||
if(typeof r!="number"&&null!=r){var i=o;for(r=Q(r,t,3);i--&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[o-1]:nr;return e(n,Ir(0,o-u))},u.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=N(n)),null==r||t?n?n[0+Or($r()*(n.length-1-0+1))]:nr:(n=z(n),n.length=Mr(Ir(0,r),n.length),n)},u.take=U,u.head=U,Y(u),u.VERSION="2.4.0",u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.value=function(){return this.__wrapped__},q("pop push reverse shift sort splice unshift".split(" "),function(n){var r=wr[n];
|
||||
u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),Wr.spliceObjects||0!==n.length||delete n[0],this}}),q(["concat","join","slice"],function(n){var r=wr[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(yr._=u, define(function(){return u})):mr&&_r?dr?(_r.exports=u)._=u:mr._=u:yr._=u}).call(this);
|
||||
;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++t<e;)if(n[t]===r)return t;return-1}function r(n,r){for(var t=n.m,e=r.m,u=-1,o=t.length;++u<o;){var i=t[u],f=e[u];if(i!==f){if(i>f||typeof i=="undefined")return 1;if(i<f||typeof f=="undefined")return-1}}return n.n-r.n}function t(n){return"\\"+yr[n]}function e(n,r,t){r||(r=0),typeof t=="undefined"&&(t=n?n.length:0);var e=-1;t=t-r||0;for(var u=Array(0>t?0:t);++e<t;)u[e]=n[r+e];return u}function u(n){return n instanceof u?n:new o(n)}function o(n,r){this.__chain__=!!r,this.__wrapped__=n
|
||||
}function i(n){function r(){if(u){var n=e(u);Rr.apply(n,arguments)}if(this instanceof r){var i=f(t.prototype),n=t.apply(i,n||arguments);return O(n)?n:i}return t.apply(o,n||arguments)}var t=n[0],u=n[2],o=n[4];return r}function f(n){return O(n)?Br(n):{}}function a(n,r,t){if(typeof n!="function")return Y;if(typeof r=="undefined"||!("prototype"in n))return n;switch(t){case 1:return function(t){return n.call(r,t)};case 2:return function(t,e){return n.call(r,t,e)};case 3:return function(t,e,u){return n.call(r,t,e,u)
|
||||
};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return L(n,r)}function l(n){function r(){var n=p?a:this;if(o){var y=e(o);Rr.apply(y,arguments)}return(i||g)&&(y||(y=e(arguments)),i&&Rr.apply(y,i),g&&y.length<c)?(u|=16,l([t,h?u:-4&u,y,null,a,c])):(y||(y=arguments),s&&(t=n[v]),this instanceof r?(n=f(t.prototype),y=t.apply(n,y),O(y)?y:n):t.apply(n,y))}var t=n[0],u=n[1],o=n[2],i=n[3],a=n[4],c=n[5],p=1&u,s=2&u,g=4&u,h=8&u,v=t;return r}function c(n,r){for(var t=-1,e=m(),u=n?n.length:0,o=[];++t<u;){var i=n[t];
|
||||
0>e(r,i)&&o.push(i)}return o}function p(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++e<u;){var i=n[e];if(i&&typeof i=="object"&&typeof i.length=="number"&&(Cr(i)||b(i))){r||(i=p(i,r,t));var f=-1,a=i.length,l=o.length;for(o.length+=a;++f<a;)o[l++]=i[f]}else t||o.push(i)}return o}function s(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(n===n&&!(n&&vr[typeof n]||r&&vr[typeof r]))return false;if(null==n||null==r)return n===r;var o=Er.call(n),i=Er.call(r);if(o!=i)return false;switch(o){case lr:case cr:return+n==+r;
|
||||
case pr:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case gr:case hr:return n==r+""}if(i=o==ar,!i){var f=n instanceof u,a=r instanceof u;if(f||a)return s(f?n.__wrapped__:n,a?r.__wrapped__:r,t,e);if(o!=sr)return false;if(o=n.constructor,f=r.constructor,o!=f&&!(A(o)&&o instanceof o&&A(f)&&f instanceof f)&&"constructor"in n&&"constructor"in r)return false}for(t||(t=[]),e||(e=[]),o=t.length;o--;)if(t[o]==n)return e[o]==r;var l=true,c=0;if(t.push(n),e.push(r),i){if(c=r.length,l=c==n.length)for(;c--&&(l=s(n[c],r[c],t,e)););}else Kr(r,function(r,u,o){return Nr.call(o,u)?(c++,!(l=Nr.call(n,u)&&s(n[u],r,t,e))&&er):void 0
|
||||
}),l&&Kr(n,function(n,r,t){return Nr.call(t,r)?!(l=-1<--c)&&er:void 0});return t.pop(),e.pop(),l}function g(n,r,t){for(var e=-1,u=m(),o=n?n.length:0,i=[],f=t?[]:i;++e<o;){var a=n[e],l=t?t(a,e,n):a;(r?!e||f[f.length-1]!==l:0>u(f,l))&&(t&&f.push(l),i.push(a))}return i}function h(n){return function(r,t,e){var u={};t=X(t,e,3),e=-1;var o=r?r.length:0;if(typeof o=="number")for(;++e<o;){var i=r[e];n(u,i,t(i,e,r),r)}else Lr(r,function(r,e,o){n(u,r,t(r,e,o),o)});return u}}function v(n,r,t,e,u,o){var f=16&r,a=32&r;
|
||||
if(!(2&r||A(n)))throw new TypeError;return f&&!t.length&&(r&=-17,t=false),a&&!e.length&&(r&=-33,e=false),(1==r||17===r?i:l)([n,r,t,e,u,o])}function y(n){return Vr[n]}function m(){var r=(r=u.indexOf)===G?n:r;return r}function _(n){return typeof n=="function"&&Ar.test(n)}function d(n){return Gr[n]}function b(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Er.call(n)==fr||false}function w(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]=e[u]}return n
|
||||
}function j(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)"undefined"==typeof n[u]&&(n[u]=e[u])}return n}function x(n){var r=[];return Kr(n,function(n,t){A(n)&&r.push(t)}),r.sort()}function T(n){for(var r=-1,t=Ur(n),e=t.length,u={};++r<e;){var o=t[r];u[n[o]]=o}return u}function E(n){if(!n)return true;if(Cr(n)||N(n))return!n.length;for(var r in n)if(Nr.call(n,r))return false;return true}function A(n){return typeof n=="function"}function O(n){return!(!n||!vr[typeof n])
|
||||
}function S(n){return typeof n=="number"||n&&typeof n=="object"&&Er.call(n)==pr||false}function N(n){return typeof n=="string"||n&&typeof n=="object"&&Er.call(n)==hr||false}function R(n){for(var r=-1,t=Ur(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function k(n,r){var t=m(),e=n?n.length:0,u=false;return e&&typeof e=="number"?u=-1<t(n,r):Lr(n,function(n){return(u=n===r)&&er}),u}function B(n,r,t){var e=true;r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&(e=!!r(n[t],t,n)););else Lr(n,function(n,t,u){return!(e=!!r(n,t,u))&&er
|
||||
});return e}function F(n,r,t){var e=[];r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u;){var o=n[t];r(o,t,n)&&e.push(o)}else Lr(n,function(n,t,u){r(n,t,u)&&e.push(n)});return e}function q(n,r,t){r=X(r,t,3),t=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return Lr(n,function(n,t,e){return r(n,t,e)?(u=n,er):void 0}),u}for(;++t<e;){var o=n[t];if(r(o,t,n))return o}}function D(n,r,t){var e=-1,u=n?n.length:0;if(r=r&&typeof t=="undefined"?r:a(r,t,3),typeof u=="number")for(;++e<u&&r(n[e],e,n)!==er;);else Lr(n,r)
|
||||
}function I(n,r){var t=n?n.length:0;if(typeof t=="number")for(;t--&&false!==r(n[t],t,n););else{var e=Ur(n),t=e.length;Lr(n,function(n,u,o){return u=e?e[--t]:--t,false===r(o[u],u,o)&&er})}}function M(n,r,t){var e=-1,u=n?n.length:0;if(r=X(r,t,3),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=r(n[e],e,n);else o=[],Lr(n,function(n,t,u){o[++e]=r(n,t,u)});return o}function $(n,r,t){var e=-1/0,u=e;typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t>u&&(u=t);
|
||||
else r=X(r,t,3),D(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function W(n,r,t,e){if(!n)return t;var u=3>arguments.length;r=X(r,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(t=n[++o]);++o<i;)t=r(t,n[o],o,n);else Lr(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)});return t}function z(n,r,t,e){var u=3>arguments.length;return r=X(r,e,4),I(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function C(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return D(n,function(n){var t;t=++r,t=0+Sr(Wr()*(t-0+1)),e[r]=e[t],e[t]=n
|
||||
}),e}function P(n,r,t){var e;r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++t<u&&!(e=r(n[t],t,n)););else Lr(n,function(n,t,u){return(e=r(n,t,u))&&er});return!!e}function U(n,r,t){return t&&E(r)?rr:(t?q:F)(n,r)}function V(n,r,t){var u=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=-1;for(r=X(r,t,3);++i<o&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[0]:rr;return e(n,0,$r(Mr(0,u),o))}function G(r,t,e){if(typeof e=="number"){var u=r?r.length:0;e=0>e?Mr(0,u+e):e||0}else if(e)return e=J(r,t),r[e]===t?e:-1;
|
||||
return n(r,t,e)}function H(n,r,t){if(typeof r!="number"&&null!=r){var u=0,o=-1,i=n?n.length:0;for(r=X(r,t,3);++o<i&&r(n[o],o,n);)u++}else u=null==r||t?1:Mr(0,r);return e(n,u)}function J(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?X(t,e,1):Y,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function K(n,r,t,e){return typeof r!="boolean"&&null!=r&&(e=t,t=typeof r!="function"&&e&&e[r]===n?null:r,r=false),null!=t&&(t=X(t,e,3)),g(n,r,t)}function L(n,r){return 2<arguments.length?v(n,17,e(arguments,2),null,r):v(n,1,null,null,r)
|
||||
}function Q(n,r,t){var e,u,o,i,f,a,l,c=0,p=false,s=true;if(!A(n))throw new TypeError;if(r=Mr(0,r)||0,true===t)var g=true,s=false;else O(t)&&(g=t.leading,p="maxWait"in t&&(Mr(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var h=function(){var t=r-(nt()-i);0<t?a=setTimeout(h,t):(u&&clearTimeout(u),t=l,u=a=l=rr,t&&(c=nt(),o=n.apply(f,e),a||u||(e=f=null)))},v=function(){a&&clearTimeout(a),u=a=l=rr,(s||p!==r)&&(c=nt(),o=n.apply(f,e),a||u||(e=f=null))};return function(){if(e=arguments,i=nt(),f=this,l=s&&(a||!g),false===p)var t=g&&!a;
|
||||
else{u||g||(c=i);var y=p-(i-c),m=0>=y;m?(u&&(u=clearTimeout(u)),c=i,o=n.apply(f,e)):u||(u=setTimeout(v,y))}return m&&a?a=clearTimeout(a):a||r===p||(a=setTimeout(h,r)),t&&(m=true,o=n.apply(f,e)),!m||a||u||(e=f=null),o}}function X(n,r,t){var e=typeof n;if(null==n||"function"==e)return a(n,r,t);if("object"!=e)return nr(n);var u=Ur(n);return function(r){for(var t=u.length,e=false;t--&&(e=r[u[t]]===n[u[t]]););return e}}function Y(n){return n}function Z(n){D(x(n),function(r){var t=u[r]=n[r];u.prototype[r]=function(){var n=[this.__wrapped__];
|
||||
return Rr.apply(n,arguments),n=t.apply(u,n),this.__chain__?new o(n,true):n}})}function nr(n){return function(r){return r[n]}}var rr,tr=0,er={},ur=+new Date+"",or=/($^)/,ir=/['\n\r\t\u2028\u2029\\]/g,fr="[object Arguments]",ar="[object Array]",lr="[object Boolean]",cr="[object Date]",pr="[object Number]",sr="[object Object]",gr="[object RegExp]",hr="[object String]",vr={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},yr={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},mr=vr[typeof window]&&window||this,_r=vr[typeof exports]&&exports&&!exports.nodeType&&exports,dr=vr[typeof module]&&module&&!module.nodeType&&module,br=dr&&dr.exports===_r&&_r,wr=vr[typeof global]&&global;
|
||||
!wr||wr.global!==wr&&wr.window!==wr||(mr=wr);var jr=[],xr=Object.prototype,Tr=mr._,Er=xr.toString,Ar=RegExp("^"+(Er+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Or=Math.ceil,Sr=Math.floor,Nr=xr.hasOwnProperty,Rr=jr.push,kr=xr.propertyIsEnumerable,Br=_(Br=Object.create)&&Br,Fr=_(Fr=Array.isArray)&&Fr,qr=mr.isFinite,Dr=mr.isNaN,Ir=_(Ir=Object.keys)&&Ir,Mr=Math.max,$r=Math.min,Wr=Math.random;o.prototype=u.prototype;var zr={};!function(){var n={0:1,length:1};zr.spliceObjects=(jr.splice.call(n,0,1),!n[0])
|
||||
}(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Br||(f=function(){function n(){}return function(r){if(O(r)){n.prototype=r;var t=new n;n.prototype=null}return t||mr.Object()}}()),b(arguments)||(b=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Nr.call(n,"callee")&&!kr.call(n,"callee")||false});var Cr=Fr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Er.call(n)==ar||false},Pr=function(n){var r,t=[];
|
||||
if(!n||!vr[typeof n])return t;for(r in n)Nr.call(n,r)&&t.push(r);return t},Ur=Ir?function(n){return O(n)?Ir(n):[]}:Pr,Vr={"&":"&","<":"<",">":">",'"':""","'":"'"},Gr=T(Vr),Hr=RegExp("("+Ur(Gr).join("|")+")","g"),Jr=RegExp("["+Ur(Vr).join("")+"]","g"),Kr=function(n,r){var t;if(!n||!vr[typeof n])return n;for(t in n)if(r(n[t],t,n)===er)break;return n},Lr=function(n,r){var t;if(!n||!vr[typeof n])return n;for(t in n)if(Nr.call(n,t)&&r(n[t],t,n)===er)break;return n};A(/x/)&&(A=function(n){return typeof n=="function"&&"[object Function]"==Er.call(n)
|
||||
});var Qr=h(function(n,r,t){Nr.call(n,t)?n[t]++:n[t]=1}),Xr=h(function(n,r,t){(Nr.call(n,t)?n[t]:n[t]=[]).push(r)}),Yr=h(function(n,r,t){n[t]=r}),Zr=M,nt=_(nt=Date.now)&&nt||function(){return(new Date).getTime()};u.after=function(n,r){if(!A(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},u.bind=L,u.bindAll=function(n){for(var r=1<arguments.length?p(arguments,true,false,1):x(n),t=-1,e=r.length;++t<e;){var u=r[t];n[u]=v(n[u],1,null,null,n)}return n},u.chain=function(n){return n=new o(n),n.__chain__=true,n
|
||||
},u.compact=function(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];u&&e.push(u)}return e},u.compose=function(){for(var n=arguments,r=n.length;r--;)if(!A(n[r]))throw new TypeError;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},u.countBy=Qr,u.debounce=Q,u.defaults=j,u.defer=function(n){if(!A(n))throw new TypeError;var r=e(arguments,1);return setTimeout(function(){n.apply(rr,r)},1)},u.delay=function(n,r){if(!A(n))throw new TypeError;var t=e(arguments,2);
|
||||
return setTimeout(function(){n.apply(rr,t)},r)},u.difference=function(n){return c(n,p(arguments,true,true,1))},u.filter=F,u.flatten=function(n,r){return p(n,r)},u.forEach=D,u.functions=x,u.groupBy=Xr,u.indexBy=Yr,u.initial=function(n,r,t){var u=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=o;for(r=X(r,t,3);i--&&r(n[i],i,n);)u++}else u=null==r||t?1:r||u;return e(n,0,$r(Mr(0,o-u),o))},u.intersection=function(){for(var n=[],r=-1,t=arguments.length;++r<t;){var e=arguments[r];(Cr(e)||b(e))&&n.push(e)
|
||||
}var u=n[0],o=-1,i=m(),f=u?u.length:0,a=[];n:for(;++o<f;)if(e=u[o],0>i(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},u.invert=T,u.invoke=function(n,r){var t=e(arguments,2),u=-1,o=typeof r=="function",i=n?n.length:0,f=Array(typeof i=="number"?i:0);return D(n,function(n){f[++u]=(o?r:n[r]).apply(n,t)}),f},u.keys=Ur,u.map=M,u.max=$,u.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):ur+arguments[0];return Nr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)
|
||||
}},u.min=function(n,r,t){var e=1/0,u=e;typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t<u&&(u=t);else r=X(r,t,3),D(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u},u.omit=function(n){var r=[];Kr(n,function(n,t){r.push(t)});for(var r=c(r,p(arguments,true,false,1)),t=-1,e=r.length,u={};++t<e;){var o=r[t];u[o]=n[o]}return u},u.once=function(n){var r,t;if(!A(n))throw new TypeError;return function(){return r?t:(r=true,t=n.apply(this,arguments),n=null,t)
|
||||
}},u.pairs=function(n){for(var r=-1,t=Ur(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},u.partial=function(n){return v(n,16,e(arguments,1))},u.pick=function(n){for(var r=-1,t=p(arguments,true,false,1),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},u.pluck=Zr,u.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=Mr(0,Or((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},u.reject=function(n,r,t){return r=X(r,t,3),F(n,function(n,t,e){return!r(n,t,e)
|
||||
})},u.rest=H,u.shuffle=C,u.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(t=X(t,e,3),D(n,function(n,r,e){i[++u]={m:[t(n,r,e)],n:u,o:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].o;return i},u.tap=function(n,r){return r(n),n},u.throttle=function(n,r,t){var e=true,u=true;if(!A(n))throw new TypeError;return false===t?e=false:O(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,Q(n,r,t)},u.times=function(n,r,t){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=Array(n);for(r=a(r,t,1);++e<n;)u[e]=r(e);return u},u.toArray=function(n){return Cr(n)?e(n):n&&typeof n.length=="number"?M(n):R(n)},u.union=function(){return g(p(arguments,true,true))},u.uniq=K,u.values=R,u.where=U,u.without=function(n){return c(n,e(arguments,1))},u.wrap=function(n,r){return v(r,16,[n])},u.zip=function(){for(var n=-1,r=$(Zr(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=Zr(arguments,n);return t},u.collect=M,u.drop=H,u.each=D,u.extend=w,u.methods=x,u.object=function(n,r){var t=-1,e=n?n.length:0,u={};
|
||||
for(r||!e||Cr(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},u.select=F,u.tail=H,u.unique=K,u.clone=function(n){return O(n)?Cr(n)?e(n):w({},n):n},u.contains=k,u.escape=function(n){return null==n?"":(n+"").replace(Jr,y)},u.every=B,u.find=q,u.has=function(n,r){return n?Nr.call(n,r):false},u.identity=Y,u.indexOf=G,u.isArguments=b,u.isArray=Cr,u.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Er.call(n)==lr||false},u.isDate=function(n){return n&&typeof n=="object"&&Er.call(n)==cr||false
|
||||
},u.isElement=function(n){return n&&1===n.nodeType||false},u.isEmpty=E,u.isEqual=function(n,r){return s(n,r)},u.isFinite=function(n){return qr(n)&&!Dr(parseFloat(n))},u.isFunction=A,u.isNaN=function(n){return S(n)&&n!=+n},u.isNull=function(n){return null===n},u.isNumber=S,u.isObject=O,u.isRegExp=function(n){return n&&vr[typeof n]&&Er.call(n)==gr||false},u.isString=N,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Mr(0,e+t):$r(t,e-1))+1);e--;)if(n[e]===r)return e;
|
||||
return-1},u.mixin=Z,u.noConflict=function(){return mr._=Tr,this},u.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Sr(Wr()*(r-n+1))},u.reduce=W,u.reduceRight=z,u.result=function(n,r){if(n){var t=n[r];return A(t)?n[r]():t}},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Ur(n).length},u.some=P,u.sortedIndex=J,u.template=function(n,r,e){var o=u,i=o.templateSettings;n=(n||"")+"",e=j({},e,i);var f=0,a="__p+='",i=e.variable;n.replace(RegExp((e.escape||or).source+"|"+(e.interpolate||or).source+"|"+(e.evaluate||or).source+"|$","g"),function(r,e,u,o,i){return a+=n.slice(f,i).replace(ir,t),e&&(a+="'+_.escape("+e+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r
|
||||
}),a+="';",i||(i="obj",a="with("+i+"||{}){"+a+"}"),a="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";try{var l=Function("_","return "+a)(o)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},u.unescape=function(n){return null==n?"":(n+"").replace(Hr,d)},u.uniqueId=function(n){var r=++tr+"";return n?n+r:r},u.all=B,u.any=P,u.detect=q,u.findWhere=function(n,r){return U(n,r,true)},u.foldl=W,u.foldr=z,u.include=k,u.inject=W,u.first=V,u.last=function(n,r,t){var u=0,o=n?n.length:0;
|
||||
if(typeof r!="number"&&null!=r){var i=o;for(r=X(r,t,3);i--&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[o-1]:rr;return e(n,Mr(0,o-u))},u.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=R(n)),null==r||t?n?n[0+Sr(Wr()*(n.length-1-0+1))]:rr:(n=C(n),n.length=$r(Mr(0,r),n.length),n)},u.take=V,u.head=V,Z(u),u.VERSION="2.4.2",u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.value=function(){return this.__wrapped__},D("pop push reverse shift sort splice unshift".split(" "),function(n){var r=jr[n];
|
||||
u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),zr.spliceObjects||0!==n.length||delete n[0],this}}),D(["concat","join","slice"],function(n){var r=jr[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(mr._=u, define(function(){return u})):_r&&dr?br?(dr.exports=u)._=u:_r._=u:mr._=u}).call(this);
|
||||
1863
doc/README.md
1863
doc/README.md
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@
|
||||
// generate Markdown
|
||||
$markdown = docdown(array(
|
||||
'path' => '../' . $filePath,
|
||||
'title' => 'Lo-Dash <span>v' . $version . '</span>',
|
||||
'title' => '<a href="http://lodash.com/">Lo-Dash</a> <span>v' . $version . '</span>',
|
||||
'toc' => 'categories',
|
||||
'url' => 'https://github.com/lodash/lodash/blob/' . $version . '/lodash.js'
|
||||
));
|
||||
|
||||
135
lodash.js
135
lodash.js
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* @license
|
||||
* Lo-Dash 2.4.0 <http://lodash.com/>
|
||||
* Lo-Dash 2.4.2 <https://lodash.com/>
|
||||
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <http://lodash.com/license>
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
;(function() {
|
||||
|
||||
@@ -517,7 +517,7 @@
|
||||
clearTimeout = context.clearTimeout,
|
||||
floor = Math.floor,
|
||||
fnToString = Function.prototype.toString,
|
||||
getPrototypeOf = reNative.test(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
|
||||
getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
|
||||
hasOwnProperty = objectProto.hasOwnProperty,
|
||||
push = arrayRef.push,
|
||||
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
||||
@@ -530,18 +530,18 @@
|
||||
// IE 8 only accepts DOM elements
|
||||
try {
|
||||
var o = {},
|
||||
func = reNative.test(func = Object.defineProperty) && func,
|
||||
func = isNative(func = Object.defineProperty) && func,
|
||||
result = func(o, o, o) && func;
|
||||
} catch(e) { }
|
||||
return result;
|
||||
}());
|
||||
|
||||
/* Native method shortcuts for methods with the same name as other `lodash` methods */
|
||||
var nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
|
||||
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
|
||||
var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate,
|
||||
nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray,
|
||||
nativeIsFinite = context.isFinite,
|
||||
nativeIsNaN = context.isNaN,
|
||||
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeMax = Math.max,
|
||||
nativeMin = Math.min,
|
||||
nativeParseInt = context.parseInt,
|
||||
@@ -729,7 +729,7 @@
|
||||
* @memberOf _.support
|
||||
* @type boolean
|
||||
*/
|
||||
support.funcDecomp = !reNative.test(context.WinRTError) && reThis.test(runInContext);
|
||||
support.funcDecomp = !isNative(context.WinRTError) && reThis.test(runInContext);
|
||||
|
||||
/**
|
||||
* Detect if `Function#name` is supported (all but IE).
|
||||
@@ -1004,7 +1004,10 @@
|
||||
// `Function#bind` spec
|
||||
// http://es5.github.io/#x15.3.4.5
|
||||
if (partialArgs) {
|
||||
var args = partialArgs.slice();
|
||||
// avoid `arguments` object deoptimizations by using `slice` instead
|
||||
// of `Array.prototype.slice.call` and not assigning `arguments` to a
|
||||
// variable as a ternary expression
|
||||
var args = slice(partialArgs);
|
||||
push.apply(args, arguments);
|
||||
}
|
||||
// mimic the constructor's `return` behavior
|
||||
@@ -1221,7 +1224,7 @@
|
||||
function bound() {
|
||||
var thisBinding = isBind ? thisArg : this;
|
||||
if (partialArgs) {
|
||||
var args = partialArgs.slice();
|
||||
var args = slice(partialArgs);
|
||||
push.apply(args, arguments);
|
||||
}
|
||||
if (partialRightArgs || isCurry) {
|
||||
@@ -1446,51 +1449,54 @@
|
||||
|
||||
// recursively compare objects and arrays (susceptible to call stack limits)
|
||||
if (isArr) {
|
||||
// compare lengths to determine if a deep comparison is necessary
|
||||
length = a.length;
|
||||
size = b.length;
|
||||
result = size == length;
|
||||
|
||||
// compare lengths to determine if a deep comparison is necessary
|
||||
result = size == a.length;
|
||||
if (!result && !isWhere) {
|
||||
return result;
|
||||
}
|
||||
// deep compare the contents, ignoring non-numeric properties
|
||||
while (size--) {
|
||||
var index = length,
|
||||
value = b[size];
|
||||
if (result || isWhere) {
|
||||
// deep compare the contents, ignoring non-numeric properties
|
||||
while (size--) {
|
||||
var index = length,
|
||||
value = b[size];
|
||||
|
||||
if (isWhere) {
|
||||
while (index--) {
|
||||
if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
if (isWhere) {
|
||||
while (index--) {
|
||||
if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
}
|
||||
} else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
|
||||
// which, in this case, is more costly
|
||||
forIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
// count the number of properties.
|
||||
size++;
|
||||
// deep compare each property value.
|
||||
return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
|
||||
}
|
||||
});
|
||||
|
||||
if (result && !isWhere) {
|
||||
// ensure both objects have the same number of properties
|
||||
forIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
// `size` will be `-1` if `a` has more properties than `b`
|
||||
return (result = --size > -1);
|
||||
else {
|
||||
// deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
|
||||
// which, in this case, is more costly
|
||||
forIn(b, function(value, key, b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
// count the number of properties.
|
||||
size++;
|
||||
// deep compare each property value.
|
||||
return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
|
||||
}
|
||||
});
|
||||
|
||||
if (result && !isWhere) {
|
||||
// ensure both objects have the same number of properties
|
||||
forIn(a, function(value, key, a) {
|
||||
if (hasOwnProperty.call(a, key)) {
|
||||
// `size` will be `-1` if `a` has more properties than `b`
|
||||
return (result = --size > -1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
stackA.pop();
|
||||
stackB.pop();
|
||||
|
||||
if (initedStack) {
|
||||
releaseArray(stackA);
|
||||
releaseArray(stackB);
|
||||
@@ -1597,13 +1603,8 @@
|
||||
|
||||
if (isLarge) {
|
||||
var cache = createCache(seen);
|
||||
if (cache) {
|
||||
indexOf = cacheIndexOf;
|
||||
seen = cache;
|
||||
} else {
|
||||
isLarge = false;
|
||||
seen = callback ? seen : (releaseArray(seen), result);
|
||||
}
|
||||
indexOf = cacheIndexOf;
|
||||
seen = cache;
|
||||
}
|
||||
while (++index < length) {
|
||||
var value = array[index],
|
||||
@@ -1703,8 +1704,14 @@
|
||||
}
|
||||
var bindData = func && func.__bindData__;
|
||||
if (bindData && bindData !== true) {
|
||||
bindData = bindData.slice();
|
||||
|
||||
// clone `bindData`
|
||||
bindData = slice(bindData);
|
||||
if (bindData[2]) {
|
||||
bindData[2] = slice(bindData[2]);
|
||||
}
|
||||
if (bindData[3]) {
|
||||
bindData[3] = slice(bindData[3]);
|
||||
}
|
||||
// set `thisBinding` is not previously bound
|
||||
if (isBind && !(bindData[1] & 1)) {
|
||||
bindData[4] = thisArg;
|
||||
@@ -1723,7 +1730,7 @@
|
||||
}
|
||||
// append partial right arguments
|
||||
if (isPartialRight) {
|
||||
push.apply(bindData[3] || (bindData[3] = []), partialRightArgs);
|
||||
unshift.apply(bindData[3] || (bindData[3] = []), partialRightArgs);
|
||||
}
|
||||
// merge flags
|
||||
bindData[1] |= bitmask;
|
||||
@@ -1807,6 +1814,17 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a native function.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if the `value` is a native function, else `false`.
|
||||
*/
|
||||
function isNative(value) {
|
||||
return typeof value == 'function' && reNative.test(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets `this` binding data on a given function.
|
||||
*
|
||||
@@ -1817,6 +1835,7 @@
|
||||
var setBindData = !defineProperty ? noop : function(func, value) {
|
||||
descriptor.value = value;
|
||||
defineProperty(func, '__bindData__', descriptor);
|
||||
descriptor.value = null;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2858,7 +2877,7 @@
|
||||
return false;
|
||||
}
|
||||
var valueOf = value.valueOf,
|
||||
objProto = typeof valueOf == 'function' && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
|
||||
objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
|
||||
|
||||
return objProto
|
||||
? (value == objProto || getPrototypeOf(value) == objProto)
|
||||
@@ -5361,7 +5380,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array that is the smymetric difference of the provided arrays.
|
||||
* Creates an array that is the symmetric difference of the provided arrays.
|
||||
* See http://en.wikipedia.org/wiki/Symmetric_difference.
|
||||
*
|
||||
* @static
|
||||
@@ -6330,7 +6349,7 @@
|
||||
* _.defer(function() { console.log(_.now() - stamp); });
|
||||
* // => logs the number of milliseconds it took for the deferred function to be called
|
||||
*/
|
||||
var now = reNative.test(now = Date.now) && now || function() {
|
||||
var now = isNative(now = Date.now) && now || function() {
|
||||
return new Date().getTime();
|
||||
};
|
||||
|
||||
@@ -6488,7 +6507,7 @@
|
||||
* debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl
|
||||
*
|
||||
* For more information on precompiling templates see:
|
||||
* http://lodash.com/custom-builds
|
||||
* https://lodash.com/custom-builds
|
||||
*
|
||||
* For more information on Chrome extension sandboxes see:
|
||||
* http://developer.chrome.com/stable/extensions/sandboxingEval.html
|
||||
@@ -7057,7 +7076,7 @@
|
||||
* @memberOf _
|
||||
* @type string
|
||||
*/
|
||||
lodash.VERSION = '2.4.0';
|
||||
lodash.VERSION = '2.4.2';
|
||||
|
||||
// add "Chaining" functions to the wrapper
|
||||
lodash.prototype.chain = wrapperChain;
|
||||
|
||||
10
package.json
10
package.json
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"version": "2.4.0",
|
||||
"version": "2.4.2",
|
||||
"description": "A utility library delivering consistency, customization, performance, & extras.",
|
||||
"homepage": "http://lodash.com/",
|
||||
"homepage": "https://lodash.com/",
|
||||
"license": "MIT",
|
||||
"main": "dist/lodash.js",
|
||||
"keywords": ["amd", "browser", "client", "customize", "functional", "server", "util"],
|
||||
@@ -11,11 +11,9 @@
|
||||
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
||||
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
|
||||
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
|
||||
"Mathias Bynens <mathias@qiwi.be> (http://mathiasbynens.be/)"
|
||||
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
||||
],
|
||||
"bugs": "https://github.com/lodash/lodash/issues",
|
||||
"repository": { "type": "git", "url": "https://github.com/lodash/lodash.git" },
|
||||
"engines": ["node", "rhino"],
|
||||
"repository": "lodash/lodash",
|
||||
"files": [
|
||||
"LICENSE.txt",
|
||||
"lodash.js",
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
;(function(root, undefined) {
|
||||
'use strict';
|
||||
|
||||
/** Native method shortcut */
|
||||
var unshift = Array.prototype.unshift;
|
||||
|
||||
/** Used to match HTML entities */
|
||||
var reEscapedHtml = /(&|<|>|"|')/g;
|
||||
|
||||
/** Used to match parts of the assert message */
|
||||
var reDied = /^Died on test #\d+/,
|
||||
reExpected = /Expected: *<\/th><td><pre>([\s\S]*?)<\/pre>/,
|
||||
reMessage = /^<span class='test-message'>([\s\S]*?)<\/span>/;
|
||||
|
||||
/** Used to convert HTML entities to characters */
|
||||
var htmlUnescapes = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
''': "'"
|
||||
};
|
||||
|
||||
/** Detect free variable `exports` */
|
||||
var freeExports = typeof exports == 'object' && exports;
|
||||
|
||||
/** Detect free variable `global`, from Node.js or Browserified code, and use it as `root` */
|
||||
var freeGlobal = typeof global == 'object' && global;
|
||||
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
|
||||
root = freeGlobal;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Checks if a given value is present in an array using strict equality
|
||||
* for comparisons, i.e. `===`.
|
||||
*
|
||||
* @oruvate
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {*} target The value to check for.
|
||||
* @returns {boolean} Returns `true` if the `target` element is found, else `false`.
|
||||
*/
|
||||
function contains(array, value) {
|
||||
var index = -1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
while (++index < length) {
|
||||
if (array[index] === value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the value of `property` on `object`. If `object` is falsey then
|
||||
* `undefined` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {string} property The property to get the value of.
|
||||
* @returns {*} Returns the resolved value.
|
||||
*/
|
||||
function result(object, property) {
|
||||
return object ? object[property] : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the HTML entities `&`, `<`, `>`, `"`, and `'`
|
||||
* in `string` to their corresponding characters.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to unescape.
|
||||
* @returns {string} Returns the unescaped string.
|
||||
*/
|
||||
function unescape(string) {
|
||||
return string == null ? '' : String(string).replace(reEscapedHtml, unescapeHtmlChar);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `unescape` to convert HTML entities to characters.
|
||||
*
|
||||
* @private
|
||||
* @param {string} match The matched character to unescape.
|
||||
* @returns {string} Returns the unescaped character.
|
||||
*/
|
||||
function unescapeHtmlChar(match) {
|
||||
return htmlUnescapes[match];
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Installs the QUnit additions on the given `context` object.
|
||||
*
|
||||
* @memberOf exports
|
||||
* @param {Object} context The context object.
|
||||
*/
|
||||
function runInContext(context) {
|
||||
// exit early if no `context` is provided or if `QUnit` does not exist
|
||||
if (!context || !context.QUnit) {
|
||||
return;
|
||||
}
|
||||
|
||||
/** Shorten `context.QUnit.QUnit` to `context.QUnit` */
|
||||
var QUnit = context.QUnit = context.QUnit.QUnit || context.QUnit;
|
||||
|
||||
/** The number of retries async tests have to succeed */
|
||||
QUnit.config.asyncRetries = 0;
|
||||
|
||||
/** An object of excused tests and assertions */
|
||||
QUnit.config.excused = {};
|
||||
|
||||
/**
|
||||
* A callback triggered at the start of every test.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @param {Object} details An object with `module` and `name` properties.
|
||||
*/
|
||||
QUnit.testStart(function(details) {
|
||||
var excused = QUnit.config.excused || {},
|
||||
excusedTests = excused[details.module],
|
||||
excusedAsserts = excusedTests && excusedTests[details.name];
|
||||
|
||||
var test = QUnit.config.current,
|
||||
finish = test.finish;
|
||||
|
||||
// allow async tests to retry
|
||||
if (test.async && !test.retries) {
|
||||
test.retries = 0;
|
||||
test.finish = function() {
|
||||
var asserts = this.assertions,
|
||||
index = -1,
|
||||
length = asserts.length,
|
||||
queue = QUnit.config.queue;
|
||||
|
||||
while (++index < length) {
|
||||
var assert = asserts[index];
|
||||
if (!assert.result && this.retries < QUnit.config.asyncRetries) {
|
||||
this.retries++;
|
||||
asserts.length = 0;
|
||||
|
||||
var oldLength = queue.length;
|
||||
this.queue();
|
||||
unshift.apply(queue, queue.splice(oldLength, queue.length - oldLength));
|
||||
return;
|
||||
}
|
||||
}
|
||||
finish.call(this);
|
||||
};
|
||||
}
|
||||
// nothing to excuse
|
||||
if (!excusedAsserts) {
|
||||
return;
|
||||
}
|
||||
// excuse the entire test
|
||||
if (excusedAsserts === true) {
|
||||
test.async = false;
|
||||
test.callback = function() {};
|
||||
test.expected = 0;
|
||||
return;
|
||||
}
|
||||
// excuse specific assertions
|
||||
test.finish = function() {
|
||||
var asserts = this.assertions,
|
||||
index = -1,
|
||||
length = asserts.length;
|
||||
|
||||
while (++index < length) {
|
||||
var assert = asserts[index],
|
||||
message = unescape(result(reMessage.exec(assert.message), 1)),
|
||||
died = result(reDied.exec(message), 0),
|
||||
expected = unescape(result(reExpected.exec(assert.message), 1));
|
||||
|
||||
if ((message && contains(excusedAsserts, message)) ||
|
||||
(died && contains(excusedAsserts, died)) ||
|
||||
(expected && (
|
||||
contains(excusedAsserts, expected) ||
|
||||
contains(excusedAsserts, expected.replace(/\s+/g, ''))
|
||||
))) {
|
||||
assert.result = true;
|
||||
}
|
||||
}
|
||||
finish.call(this);
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose QUnit extras
|
||||
if (freeExports && !freeExports.nodeType) {
|
||||
freeExports.runInContext = runInContext;
|
||||
} else {
|
||||
runInContext(root);
|
||||
}
|
||||
}(this));
|
||||
@@ -18,11 +18,11 @@
|
||||
<h1>Test</h1>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../vendor/qunit/qunit/qunit.js"></script>
|
||||
<script src="../vendor/qunit-extras/qunit-extras.js"></script>
|
||||
<script src="../vendor/json-js/json2.js"></script>
|
||||
<script src="../vendor/jquery/jquery.js"></script>
|
||||
<script src="../vendor/platform.js/platform.js"></script>
|
||||
<script src="../vendor/qunit/qunit/qunit.js"></script>
|
||||
<script src="./asset/qunit-extras.js"></script>
|
||||
<script src="./asset/test-ui.js"></script>
|
||||
<script src="../lodash.js"></script>
|
||||
<script>
|
||||
|
||||
@@ -12,15 +12,18 @@
|
||||
</head>
|
||||
<body>
|
||||
<script src="../vendor/qunit/qunit/qunit.js"></script>
|
||||
<script src="../vendor/qunit-extras/qunit-extras.js"></script>
|
||||
<script src="../vendor/platform.js/platform.js"></script>
|
||||
<script src="./asset/qunit-extras.js"></script>
|
||||
<script src="./asset/test-ui.js"></script>
|
||||
<div id="qunit"></div>
|
||||
<div id="exports"></div>
|
||||
<script>
|
||||
// set bad shims
|
||||
Array._isArray = Array.isArray;
|
||||
Array.isArray = function() { return false; };
|
||||
Array.isArray = function() {};
|
||||
|
||||
Date._now = Date.now;
|
||||
Date.now = function() {};
|
||||
|
||||
Function.prototype._bind = Function.prototype.bind;
|
||||
Function.prototype.bind = function() { return function() {}; };
|
||||
@@ -31,10 +34,13 @@
|
||||
Object._defineProperty = Object.defineProperty;
|
||||
Object.defineProperty = function() {};
|
||||
|
||||
Object._keys = Object.keys;
|
||||
Object.keys = function() { return []; };
|
||||
Object._getPrototypeOf = Object.getPrototypeOf;
|
||||
Object.getPrototypeOf = function() {};
|
||||
|
||||
// load Lo-Dash and expose it to the bad `Object.keys` shim
|
||||
Object._keys = Object.keys;
|
||||
Object.keys = function() {};
|
||||
|
||||
// load Lo-Dash and expose it to the bad shims
|
||||
document.write('<script src="' + (ui.isModularize ? '../lodash.js' : ui.buildPath) + '"><\/script>');
|
||||
</script>
|
||||
<script>
|
||||
@@ -47,6 +53,11 @@
|
||||
} else {
|
||||
delete Array.isArray;
|
||||
}
|
||||
if (Date._now) {
|
||||
Date.now = Date._now;
|
||||
} else {
|
||||
delete Date.now;
|
||||
}
|
||||
if (Function.prototype._bind) {
|
||||
Function.prototype.bind = Function.prototype._bind;
|
||||
} else {
|
||||
@@ -62,15 +73,22 @@
|
||||
} else {
|
||||
delete Object.defineProperty;
|
||||
}
|
||||
if (Object._getPrototypeOf) {
|
||||
Object.getPrototypeOf = Object._getPrototypeOf;
|
||||
} else {
|
||||
delete Object.getPrototypeOf;
|
||||
}
|
||||
if (Object._keys) {
|
||||
Object.keys = Object._keys;
|
||||
} else {
|
||||
delete Object.keys;
|
||||
}
|
||||
delete Array._isArray;
|
||||
delete Date._now;
|
||||
delete Function.prototype._bind;
|
||||
delete Object._create;
|
||||
delete Object._defineProperty;
|
||||
delete Object._getPrototypeOf;
|
||||
delete Object._keys;
|
||||
|
||||
QUnit.config.hidepassed = true;
|
||||
|
||||
@@ -216,14 +216,16 @@
|
||||
console.error('Tests failed on platforms: ' + JSON.stringify(failingPlatforms));
|
||||
|
||||
failingTests.forEach(function(test) {
|
||||
var details = 'See ' + test.url + ' for details.',
|
||||
platform = JSON.stringify(test.platform),
|
||||
result = test.result;
|
||||
var result = test.result || {},
|
||||
details = 'See ' + test.url + ' for details.',
|
||||
failed = result.failed,
|
||||
platform = JSON.stringify(test.platform);
|
||||
|
||||
if (result && result.failed) {
|
||||
console.error(result.failed + ' failures on ' + platform + '. ' + details);
|
||||
if (failed) {
|
||||
console.error(failed + ' failures on ' + platform + '. ' + details);
|
||||
} else {
|
||||
console.error('Testing on ' + platform + ' failed; no results available. ' + details);
|
||||
var message = result.message || 'no results available. ' + details;
|
||||
console.error('Testing on ' + platform + ' failed; ' + message);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -245,6 +247,8 @@
|
||||
var options = {
|
||||
'build': build,
|
||||
'framework': 'qunit',
|
||||
'idle-timeout': 300,
|
||||
'max-duration': 600,
|
||||
'name': sessionName,
|
||||
'public': 'public',
|
||||
'platforms': platforms,
|
||||
|
||||
442
test/test.js
442
test/test.js
@@ -1,16 +1,19 @@
|
||||
;(function(root, undefined) {
|
||||
'use strict';
|
||||
|
||||
/** Used to store Lo-Dash to test for bad shim detection */
|
||||
var lodashBadShim = root.lodashBadShim;
|
||||
|
||||
/** Method and object shortcuts */
|
||||
var phantom = root.phantom,
|
||||
amd = root.define && define.amd,
|
||||
argv = root.process && process.argv,
|
||||
document = !phantom && root.document,
|
||||
body = document && document.body,
|
||||
create = Object.create,
|
||||
freeze = Object.freeze,
|
||||
noop = function() {},
|
||||
params = root.arguments,
|
||||
process = root.process,
|
||||
push = Array.prototype.push,
|
||||
slice = Array.prototype.slice,
|
||||
system = root.system,
|
||||
@@ -27,9 +30,9 @@
|
||||
} else if (system) {
|
||||
min = 1;
|
||||
result = params = system.args;
|
||||
} else if (process) {
|
||||
} else if (argv) {
|
||||
min = 2;
|
||||
result = params = process.argv;
|
||||
result = params = argv;
|
||||
} else if (params) {
|
||||
result = params;
|
||||
}
|
||||
@@ -80,7 +83,7 @@
|
||||
root.addEventListener || (root.addEventListener = noop),
|
||||
root.setTimeout || (root.setTimeout = noop),
|
||||
root.QUnit = load('../vendor/qunit/qunit/qunit.js') || root.QUnit,
|
||||
(load('../vendor/qunit-clib/qunit-clib.js') || { 'runInContext': noop }).runInContext(root),
|
||||
(load('../vendor/qunit-extras/qunit-extras.js') || { 'runInContext': noop }).runInContext(root),
|
||||
addEventListener === noop && delete root.addEventListener,
|
||||
root.QUnit
|
||||
);
|
||||
@@ -88,10 +91,6 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// load QUnit extras
|
||||
if (load) {
|
||||
(load('./asset/qunit-extras.js') || { 'runInContext': noop }).runInContext(root);
|
||||
}
|
||||
// log params passed to `test.js`
|
||||
if (params) {
|
||||
console.log('test.js invoked with arguments: ' + JSON.stringify(slice.call(params)));
|
||||
@@ -117,16 +116,7 @@
|
||||
page.onInitialized = function() {
|
||||
page.evaluate(function() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var xhr = new XMLHttpRequest;
|
||||
xhr.open('get', '../vendor/qunit-clib/qunit-clib.js');
|
||||
xhr.onload = function() {
|
||||
var script = document.createElement('script');
|
||||
script.text = xhr.responseText;
|
||||
document.head.appendChild(script);
|
||||
QUnit.done(callPhantom);
|
||||
};
|
||||
|
||||
xhr.send(null);
|
||||
QUnit.done(callPhantom);
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -176,6 +166,18 @@
|
||||
/** Used to check problem JScript properties too */
|
||||
var shadowedObject = _.invert(shadowedProps);
|
||||
|
||||
/**
|
||||
* Removes all own enumerable properties from a given object.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to empty.
|
||||
*/
|
||||
function emptyObject(object) {
|
||||
_.forOwn(object, function(value, key, object) {
|
||||
delete object[key];
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips a given number of tests with a passing result.
|
||||
*
|
||||
@@ -195,6 +197,8 @@
|
||||
(function() {
|
||||
if (!amd) {
|
||||
try {
|
||||
emptyObject(require.cache);
|
||||
|
||||
_.extend(_, require('vm').runInNewContext([
|
||||
'({',
|
||||
"'_arguments': (function() { return arguments; }(1, 2, 3)),",
|
||||
@@ -211,6 +215,48 @@
|
||||
"'_undefined': undefined,",
|
||||
'})'
|
||||
].join('\n')));
|
||||
|
||||
// set bad shims
|
||||
Array._isArray = Array.isArray;
|
||||
Array.isArray = function() {};
|
||||
|
||||
Date._now = Date.now;
|
||||
Date.now = function() {};
|
||||
|
||||
Function.prototype._bind = Function.prototype.bind;
|
||||
Function.prototype.bind = function() { return function() {}; };
|
||||
|
||||
Object._create = Object.create;
|
||||
Object.create = function() {};
|
||||
|
||||
Object._defineProperty = Object.defineProperty;
|
||||
Object.defineProperty = function() {};
|
||||
|
||||
Object._getPrototypeOf = Object.getPrototypeOf;
|
||||
Object.getPrototypeOf = function() {};
|
||||
|
||||
Object._keys = Object.keys;
|
||||
Object.keys = function() {};
|
||||
|
||||
// load Lo-Dash and expose it to the bad shims
|
||||
lodashBadShim = (lodashBadShim = require(filePath))._ || lodashBadShim;
|
||||
|
||||
// restore native methods
|
||||
Array.isArray = Array._isArray;
|
||||
Date.now = Date._now;
|
||||
Function.prototype.bind = Function.prototype._bind;
|
||||
Object.create = Object._create;
|
||||
Object.defineProperty = Object._defineProperty;
|
||||
Object.getPrototypeOf = Object._getPrototypeOf;
|
||||
Object.keys = Object._keys;
|
||||
|
||||
delete Array._isArray;
|
||||
delete Date._now;
|
||||
delete Function.prototype._bind;
|
||||
delete Object._create;
|
||||
delete Object._defineProperty;
|
||||
delete Object._getPrototypeOf;
|
||||
delete Object._keys;
|
||||
} catch(e) { }
|
||||
}
|
||||
if (!_._object && document) {
|
||||
@@ -307,50 +353,60 @@
|
||||
}
|
||||
});
|
||||
|
||||
test('avoids overwritten native methods', 4, function() {
|
||||
test('avoids overwritten native methods', 7, function() {
|
||||
function Foo() {}
|
||||
|
||||
function message(methodName) {
|
||||
return '`_.' + methodName + '` should avoid overwritten native methods';
|
||||
}
|
||||
|
||||
var object = { 'a': true };
|
||||
|
||||
if (document) {
|
||||
if (lodashBadShim) {
|
||||
try {
|
||||
actual = [lodashBadShim.isArray([]), lodashBadShim.isArray({ 'length': 0 })];
|
||||
} catch(e) {
|
||||
actual = null;
|
||||
}
|
||||
deepEqual(actual, [true, false], message('Array.isArray'));
|
||||
|
||||
try {
|
||||
actual = lodashBadShim.now();
|
||||
} catch(e) {
|
||||
actual = null;
|
||||
}
|
||||
ok(typeof actual == 'number', message('Date.now'));
|
||||
|
||||
try {
|
||||
actual = [lodashBadShim.create(Foo.prototype, object), lodashBadShim.create()];
|
||||
} catch(e) {
|
||||
actual = null;
|
||||
}
|
||||
ok(actual[0] instanceof Foo, message('Object.create'));
|
||||
deepEqual(actual[1], {}, message('Object.create'));
|
||||
|
||||
try {
|
||||
var actual = lodashBadShim.bind(function() { return this.a; }, object)();
|
||||
} catch(e) {
|
||||
actual = null;
|
||||
}
|
||||
ok(actual, message('bind'));
|
||||
ok(actual, message('Object.defineProperty'));
|
||||
|
||||
try {
|
||||
actual = lodashBadShim.isArray([]);
|
||||
actual = [lodashBadShim.isPlainObject({}), lodashBadShim.isPlainObject([])];
|
||||
} catch(e) {
|
||||
actual = null;
|
||||
}
|
||||
ok(actual, message('isArray'));
|
||||
deepEqual(actual, [true, false], message('Object.getPrototypeOf'));
|
||||
|
||||
try {
|
||||
actual = lodashBadShim.keys(object);
|
||||
actual = [lodashBadShim.keys(object), lodashBadShim.keys()];
|
||||
} catch(e) {
|
||||
actual = null;
|
||||
}
|
||||
deepEqual(actual, ['a'], message('keys'));
|
||||
|
||||
try {
|
||||
var Foo = function() {
|
||||
this.a = 2;
|
||||
};
|
||||
|
||||
var actual = _.transform(new Foo, function(result, value, key) {
|
||||
result[key] = value * value;
|
||||
});
|
||||
} catch(e) {
|
||||
actual = null;
|
||||
}
|
||||
ok(actual instanceof Foo, message('transform'));
|
||||
deepEqual(actual, [['a'], []], message('Object.keys'));
|
||||
}
|
||||
else {
|
||||
skipTest(4);
|
||||
skipTest(7);
|
||||
}
|
||||
});
|
||||
}());
|
||||
@@ -585,7 +641,6 @@
|
||||
function Foo() {
|
||||
return this;
|
||||
}
|
||||
|
||||
var bound = _.bind(Foo, { 'a': 1 }),
|
||||
newBound = new bound;
|
||||
|
||||
@@ -594,10 +649,15 @@
|
||||
ok(newBound instanceof Foo);
|
||||
});
|
||||
|
||||
test('ensure `new bound` is an instance of `func`', 1, function() {
|
||||
var bound = _.bind(noop, {});
|
||||
test('ensure `new bound` is an instance of `func`', 2, function() {
|
||||
function Foo(value) {
|
||||
return value && object;
|
||||
}
|
||||
var bound = _.bind(Foo),
|
||||
object = {};
|
||||
|
||||
ok(new bound instanceof noop);
|
||||
ok(new bound instanceof Foo);
|
||||
strictEqual(new bound(true), object);
|
||||
});
|
||||
|
||||
test('should append array arguments to partially applied arguments (test in IE < 9)', 1, function() {
|
||||
@@ -1276,11 +1336,12 @@
|
||||
|
||||
test('should return the function provided if already bound with `Function#bind`', 1, function() {
|
||||
function a() {}
|
||||
var object = {};
|
||||
|
||||
var bound = a.bind && a.bind({});
|
||||
var bound = a.bind && a.bind(object);
|
||||
if (bound && !('prototype' in bound)) {
|
||||
var bound = a.bind({});
|
||||
strictEqual(_.createCallback(bound, {}), bound);
|
||||
var bound = a.bind(object);
|
||||
strictEqual(_.createCallback(bound, object), bound);
|
||||
}
|
||||
else {
|
||||
skipTest();
|
||||
@@ -1291,28 +1352,43 @@
|
||||
function a() {}
|
||||
function b() { return this.b; }
|
||||
|
||||
var object = {};
|
||||
|
||||
if (_.support.funcDecomp) {
|
||||
strictEqual(_.createCallback(a, {}), a);
|
||||
notStrictEqual(_.createCallback(b, {}), b);
|
||||
strictEqual(_.createCallback(a, object), a);
|
||||
notStrictEqual(_.createCallback(b, object), b);
|
||||
}
|
||||
else {
|
||||
skipTest(2);
|
||||
}
|
||||
});
|
||||
|
||||
test('should only write `__bindData__` to named functions', 2, function() {
|
||||
test('should only write `__bindData__` to named functions', 3, function() {
|
||||
function a() {};
|
||||
var b = function() {};
|
||||
function c() {};
|
||||
|
||||
var b = function() {},
|
||||
object = {};
|
||||
|
||||
if (defineProperty && _.support.funcDecomp) {
|
||||
_.createCallback(a, {});
|
||||
_.createCallback(a, object);
|
||||
ok('__bindData__' in a)
|
||||
|
||||
_.createCallback(b, {});
|
||||
_.createCallback(b, object);
|
||||
ok(!('__bindData__' in b));
|
||||
|
||||
if (_.support.funcNames) {
|
||||
_.support.funcNames = false;
|
||||
_.createCallback(c, object);
|
||||
ok('__bindData__' in c);
|
||||
_.support.funcNames = true;
|
||||
}
|
||||
else {
|
||||
skipTest();
|
||||
}
|
||||
}
|
||||
else {
|
||||
skipTest(2);
|
||||
skipTest(3);
|
||||
}
|
||||
});
|
||||
}());
|
||||
@@ -1354,6 +1430,17 @@
|
||||
});
|
||||
});
|
||||
|
||||
test('ensure `new bound` is an instance of `func`', 2, function() {
|
||||
function Foo(value) {
|
||||
return value && object;
|
||||
}
|
||||
var bound = _.curry(Foo),
|
||||
object = {};
|
||||
|
||||
ok(new bound(false) instanceof Foo);
|
||||
strictEqual(new bound(true), object);
|
||||
});
|
||||
|
||||
test('should not alter the `this` binding', 9, function() {
|
||||
function func(a, b, c) {
|
||||
var value = this || {};
|
||||
@@ -1544,7 +1631,7 @@
|
||||
|
||||
test('should work with `maxWait` option', 2, function() {
|
||||
if (!(isRhino && isModularize)) {
|
||||
var limit = 512,
|
||||
var limit = argv ? 1000 : 500,
|
||||
withCount = 0,
|
||||
withoutCount = 0;
|
||||
|
||||
@@ -1554,7 +1641,7 @@
|
||||
|
||||
var withoutMaxWait = _.debounce(function() {
|
||||
withoutCount++;
|
||||
}, 64);
|
||||
}, 96);
|
||||
|
||||
var start = +new Date;
|
||||
while ((new Date - start) < limit) {
|
||||
@@ -1569,6 +1656,27 @@
|
||||
}
|
||||
});
|
||||
|
||||
asyncTest('should cancel `maxDelayed` when `delayed` is executed', 1, function() {
|
||||
if (!(isRhino && isModularize)) {
|
||||
var count = 0;
|
||||
|
||||
var debounced = _.debounce(function() {
|
||||
count++;
|
||||
}, 32, { 'maxWait': 64 });
|
||||
|
||||
debounced();
|
||||
|
||||
setTimeout(function() {
|
||||
strictEqual(count, 1);
|
||||
QUnit.start();
|
||||
}, 128);
|
||||
}
|
||||
else {
|
||||
skipTest(1);
|
||||
QUnit.start();
|
||||
}
|
||||
});
|
||||
|
||||
asyncTest('should execute the `trailing` call with the correct arguments and `this` binding', 2, function() {
|
||||
if (!(isRhino && isModularize)) {
|
||||
var args,
|
||||
@@ -1797,6 +1905,16 @@
|
||||
deepEqual(_.difference(array1, array2), []);
|
||||
});
|
||||
|
||||
test('should work with large arrays of objects', 1, function() {
|
||||
var object = {};
|
||||
|
||||
var largeArray = _.times(largeArraySize, function() {
|
||||
return object;
|
||||
});
|
||||
|
||||
deepEqual(_.difference(largeArray, [object]), []);
|
||||
});
|
||||
|
||||
test('should ignore individual secondary values', 1, function() {
|
||||
var array = [1, null, 3];
|
||||
deepEqual(_.difference(array, null, 3), array);
|
||||
@@ -2004,6 +2122,14 @@
|
||||
strictEqual(func(objects, function(object) { return object.a == 3; }), expected[1]);
|
||||
});
|
||||
|
||||
test('should work with an object for `collection`', 1, function() {
|
||||
var actual = _.find({ 'a': 1, 'b': 2, 'c': 3 }, function(num) {
|
||||
return num > 2;
|
||||
});
|
||||
|
||||
equal(actual, 3);
|
||||
});
|
||||
|
||||
test('should work with an object for `callback`', 1, function() {
|
||||
strictEqual(func(objects, { 'b': 2 }), expected[2]);
|
||||
});
|
||||
@@ -2688,19 +2814,19 @@
|
||||
QUnit.module('`__proto__` property bugs');
|
||||
|
||||
(function() {
|
||||
var stringLiteral = '__proto__',
|
||||
stringObject = Object(stringLiteral),
|
||||
expected = [stringLiteral, stringObject];
|
||||
|
||||
var array = _.times(largeArraySize, function(count) {
|
||||
return count % 2 ? stringObject : stringLiteral;
|
||||
});
|
||||
|
||||
test('internal data objects should work with the `__proto__` key', 4, function() {
|
||||
deepEqual(_.difference(array, array), []);
|
||||
deepEqual(_.intersection(array, array), expected);
|
||||
deepEqual(_.uniq(array), expected);
|
||||
deepEqual(_.without.apply(_, [array].concat(array)), []);
|
||||
var stringLiteral = '__proto__',
|
||||
stringObject = Object(stringLiteral),
|
||||
expected = [stringLiteral, stringObject];
|
||||
|
||||
var largeArray = _.times(largeArraySize, function(count) {
|
||||
return count % 2 ? stringObject : stringLiteral;
|
||||
});
|
||||
|
||||
deepEqual(_.difference(largeArray, largeArray), []);
|
||||
deepEqual(_.intersection(largeArray, largeArray), expected);
|
||||
deepEqual(_.uniq(largeArray), expected);
|
||||
deepEqual(_.without.apply(_, [largeArray].concat(largeArray)), []);
|
||||
});
|
||||
|
||||
test('lodash.memoize should memoize values resolved to the `__proto__` key', 1, function() {
|
||||
@@ -2954,9 +3080,7 @@
|
||||
|
||||
while (++index < length) {
|
||||
var other = array[index];
|
||||
if (other === value ||
|
||||
(_.isObject(value) && other instanceof Foo) ||
|
||||
(other === 'x' && /[13]/.test(value))) {
|
||||
if (other === value || (value instanceof Foo && other instanceof Foo)) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
@@ -3001,17 +3125,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
test('`_.omit` should work with a custom `_.indexOf` method', 1, function() {
|
||||
if (!isModularize) {
|
||||
_.indexOf = custom;
|
||||
deepEqual(_.omit(array, ['x']), { '0': 1, '2': 3 });
|
||||
_.indexOf = indexOf;
|
||||
}
|
||||
else {
|
||||
skipTest();
|
||||
}
|
||||
});
|
||||
|
||||
test('`_.uniq` should work with a custom `_.indexOf` method', 2, function() {
|
||||
if (!isModularize) {
|
||||
_.indexOf = custom;
|
||||
@@ -3136,6 +3249,17 @@
|
||||
deepEqual(actual, [1, 2]);
|
||||
});
|
||||
|
||||
test('should work with large arrays of objects', 1, function() {
|
||||
var object = {},
|
||||
expected = [object];
|
||||
|
||||
var largeArray = _.times(largeArraySize, function() {
|
||||
return object;
|
||||
});
|
||||
|
||||
deepEqual(_.intersection(expected, largeArray), expected);
|
||||
});
|
||||
|
||||
test('should return a wrapped value when chaining', 2, function() {
|
||||
if (!isNpm) {
|
||||
var actual = _([1, 3, 2]).intersection([5, 2, 1, 4]);
|
||||
@@ -3712,9 +3836,9 @@
|
||||
|
||||
strictEqual(_.isEqual(array1, array2), false);
|
||||
|
||||
array1 = ['a','b', 'c'];
|
||||
array1 = ['a', 'b', 'c'];
|
||||
array1[1] = array1;
|
||||
array2 = ['a', ['b', 'b'], 'c'];
|
||||
array2 = ['a', ['a', 'b', 'c'], 'c'];
|
||||
|
||||
strictEqual(_.isEqual(array1, array2), false);
|
||||
});
|
||||
@@ -3740,7 +3864,7 @@
|
||||
|
||||
object1 = { 'a': 1, 'b': 2, 'c': 3 };
|
||||
object1.b = object1;
|
||||
object2 = { 'a': 1, 'b': { 'b': 2 }, 'c': 3 };
|
||||
object2 = { 'a': 1, 'b': { 'a': 1, 'b': 2, 'c': 3 }, 'c': 3 };
|
||||
|
||||
strictEqual(_.isEqual(object1, object2), false);
|
||||
});
|
||||
@@ -3785,17 +3909,19 @@
|
||||
strictEqual(_.isEqual(object1, object2), true);
|
||||
});
|
||||
|
||||
test('should return `false` when comparing values with circular references to unlike values', 2, function() {
|
||||
var array1 = ['a', null, 'c'],
|
||||
array2 = ['a', [], 'c'],
|
||||
object1 = { 'a': 1, 'b': null, 'c': 3 },
|
||||
object2 = { 'a': 1, 'b': {}, 'c': 3 };
|
||||
test('should perform comparisons between objects with shared property values', function() {
|
||||
var object1 = {
|
||||
'a': [1, 2]
|
||||
};
|
||||
|
||||
array1[1] = array1;
|
||||
strictEqual(_.isEqual(array1, array2), false);
|
||||
var object2 = {
|
||||
'a': [1, 2],
|
||||
'b': [1, 2]
|
||||
};
|
||||
|
||||
object1.b = object1;
|
||||
strictEqual(_.isEqual(object1, object2), false);
|
||||
object1.b = object1.a;
|
||||
|
||||
strictEqual(_.isEqual(object1, object2), true);
|
||||
});
|
||||
|
||||
test('should pass the correct `callback` arguments', 1, function() {
|
||||
@@ -4221,6 +4347,8 @@
|
||||
QUnit.module('lodash.isPlainObject');
|
||||
|
||||
(function() {
|
||||
var element = document && document.createElement('div');
|
||||
|
||||
test('should detect plain objects', 5, function() {
|
||||
function Foo(a) {
|
||||
this.a = 1;
|
||||
@@ -4235,13 +4363,27 @@
|
||||
} else {
|
||||
skipTest();
|
||||
}
|
||||
if (document) {
|
||||
strictEqual(_.isPlainObject(body), false);
|
||||
if (element) {
|
||||
strictEqual(_.isPlainObject(element), false);
|
||||
} else {
|
||||
skipTest();
|
||||
}
|
||||
});
|
||||
|
||||
test('should return `true` for plain objects with a custom `valueOf` property', 2, function() {
|
||||
strictEqual(_.isPlainObject({ 'valueOf': 0 }), true);
|
||||
|
||||
if (element) {
|
||||
var valueOf = element.valueOf;
|
||||
element.valueOf = 0;
|
||||
strictEqual(_.isPlainObject(element), false);
|
||||
element.valueOf = valueOf;
|
||||
}
|
||||
else {
|
||||
skipTest();
|
||||
}
|
||||
});
|
||||
|
||||
test('should return `true` for empty objects', 1, function() {
|
||||
strictEqual(_.isPlainObject({}), true);
|
||||
});
|
||||
@@ -5289,9 +5431,22 @@
|
||||
QUnit.module('lodash.now');
|
||||
|
||||
(function() {
|
||||
test('should return the number of milliseconds that have elapsed since the Unix epoch', 1, function() {
|
||||
var actual = _.now();
|
||||
ok(new Date - actual < 4);
|
||||
asyncTest('should return the number of milliseconds that have elapsed since the Unix epoch', 2, function() {
|
||||
var stamp = +new Date,
|
||||
actual = _.now();
|
||||
|
||||
ok(actual >= stamp);
|
||||
|
||||
if (!(isRhino && isModularize)) {
|
||||
setTimeout(function() {
|
||||
ok(_.now() > actual);
|
||||
QUnit.start();
|
||||
}, 32);
|
||||
}
|
||||
else {
|
||||
skipTest();
|
||||
QUnit.start();
|
||||
}
|
||||
});
|
||||
}());
|
||||
|
||||
@@ -5463,7 +5618,8 @@
|
||||
QUnit.module('partial methods');
|
||||
|
||||
_.forEach(['partial', 'partialRight'], function(methodName) {
|
||||
var func = _[methodName];
|
||||
var func = _[methodName],
|
||||
isPartial = methodName == 'partial';
|
||||
|
||||
test('`_.' + methodName + '` partially applies without additional arguments', 1, function() {
|
||||
var arg = 'a',
|
||||
@@ -5478,7 +5634,7 @@
|
||||
expected = [arg1, arg2],
|
||||
fn = function(x, y) { return [x, y]; };
|
||||
|
||||
if (methodName == 'partialRight') {
|
||||
if (!isPartial) {
|
||||
expected.reverse();
|
||||
}
|
||||
deepEqual(func(fn, arg1)(arg2), expected);
|
||||
@@ -5508,11 +5664,35 @@
|
||||
});
|
||||
|
||||
test('`_.' + methodName + '` returns a function with a `length` of `0`', 1, function() {
|
||||
var func = function(a, b, c) {},
|
||||
actual = _.partial(func, 'a');
|
||||
var fn = function(a, b, c) {},
|
||||
actual = func(fn, 'a');
|
||||
|
||||
strictEqual(actual.length, 0);
|
||||
});
|
||||
|
||||
test('ensure `new bound` is an instance of `func`', 2, function() {
|
||||
function Foo(value) {
|
||||
return value && object;
|
||||
}
|
||||
var bound = func(Foo),
|
||||
object = {};
|
||||
|
||||
ok(new bound instanceof Foo);
|
||||
strictEqual(new bound(true), object);
|
||||
});
|
||||
|
||||
test('`_.' + methodName + '` should clone `__bindData__` for created functions', 3, function() {
|
||||
function greet(greeting, name) {
|
||||
return greeting + ' ' + name;
|
||||
}
|
||||
var par1 = func(greet, 'hi'),
|
||||
par2 = func(par1, 'barney'),
|
||||
par3 = func(par1, 'pebbles');
|
||||
|
||||
equal(par1('fred'), isPartial ? 'hi fred' : 'fred hi')
|
||||
equal(par2(), isPartial ? 'hi barney' : 'barney hi');
|
||||
equal(par3(), isPartial ? 'hi pebbles' : 'pebbles hi');
|
||||
});
|
||||
});
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
@@ -5532,7 +5712,7 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('methods using `createBound`');
|
||||
QUnit.module('methods using `createWrapper`');
|
||||
|
||||
(function() {
|
||||
test('combinations of partial functions should work', 1, function() {
|
||||
@@ -6546,21 +6726,18 @@
|
||||
|
||||
(function() {
|
||||
var objects = [
|
||||
{ 'num': 991 },
|
||||
{ 'num': 212 },
|
||||
{ 'num': 11 },
|
||||
{ 'num': 16 },
|
||||
{ 'num': 74 },
|
||||
{ 'num': 0 },
|
||||
{ 'num': 1515 }
|
||||
{ 'a': 'x', 'b': 3 },
|
||||
{ 'a': 'y', 'b': 4 },
|
||||
{ 'a': 'x', 'b': 1 },
|
||||
{ 'a': 'y', 'b': 2 }
|
||||
];
|
||||
|
||||
test('should sort in ascending order', 1, function() {
|
||||
var actual = _.pluck(_.sortBy(objects, function(object) {
|
||||
return object.num;
|
||||
}), 'num');
|
||||
return object.b;
|
||||
}), 'b');
|
||||
|
||||
deepEqual(actual, [0, 11, 16, 74, 212, 991, 1515]);
|
||||
deepEqual(actual, [1, 2, 3, 4]);
|
||||
});
|
||||
|
||||
test('should perform a stable sort (test in IE > 8, Opera, and V8)', 1, function() {
|
||||
@@ -6617,20 +6794,23 @@
|
||||
});
|
||||
|
||||
test('should work with an array for `callback`', 1, function() {
|
||||
var objects = [
|
||||
{ 'a': 'x', 'b': 3 },
|
||||
{ 'a': 'y', 'b': 4 },
|
||||
{ 'a': 'x', 'b': 1 },
|
||||
{ 'a': 'y', 'b': 2 }
|
||||
];
|
||||
|
||||
var actual = _.sortBy(objects, ['a', 'b']);
|
||||
deepEqual(actual, [objects[2], objects[0], objects[3], objects[1]]);
|
||||
});
|
||||
|
||||
test('should coerce arrays returned from a `callback`', 1, function() {
|
||||
var actual = _.sortBy(objects, function(object) {
|
||||
var result = [object.a, object.b];
|
||||
result.toString = function() { return String(this[0]); };
|
||||
return result;
|
||||
});
|
||||
|
||||
deepEqual(actual, [objects[0], objects[2], objects[1], objects[3]]);
|
||||
});
|
||||
|
||||
test('should work with a string for `callback`', 1, function() {
|
||||
var actual = _.pluck(_.sortBy(objects, 'num'), 'num');
|
||||
deepEqual(actual, [0, 11, 16, 74, 212, 991, 1515]);
|
||||
var actual = _.pluck(_.sortBy(objects, 'b'), 'b');
|
||||
deepEqual(actual, [1, 2, 3, 4]);
|
||||
});
|
||||
|
||||
test('should work with an object for `collection`', 1, function() {
|
||||
@@ -7231,7 +7411,7 @@
|
||||
test('should trigger a call when invoked repeatedly' + (index ? ' and `leading` is `false`' : ''), 1, function() {
|
||||
if (!(isRhino && isModularize)) {
|
||||
var count = 0,
|
||||
limit = 512,
|
||||
limit = 500,
|
||||
options = index ? { 'leading': false } : {};
|
||||
|
||||
var throttled = _.throttle(function() {
|
||||
@@ -7641,6 +7821,20 @@
|
||||
deepEqual(_.uniq(array), [1, 2, 3]);
|
||||
});
|
||||
|
||||
test('should work with large arrays', 1, function() {
|
||||
var object = {};
|
||||
|
||||
var largeArray = _.times(largeArraySize, function(index) {
|
||||
switch (index % 3) {
|
||||
case 0: return 0;
|
||||
case 1: return 'a';
|
||||
case 2: return object;
|
||||
}
|
||||
});
|
||||
|
||||
deepEqual(_.uniq(largeArray), [0, 'a', object]);
|
||||
});
|
||||
|
||||
test('should work with a `callback`', 1, function() {
|
||||
var actual = _.uniq(objects, false, function(object) {
|
||||
return object.a;
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
<img id="chart_image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">
|
||||
</div>
|
||||
<script src="../vendor/qunit/qunit/qunit.js"></script>
|
||||
<script src="../vendor/qunit-extras/qunit-extras.js"></script>
|
||||
<script src="../vendor/jquery/jquery.js"></script>
|
||||
<script src="../vendor/platform.js/platform.js"></script>
|
||||
<script src="./asset/qunit-extras.js"></script>
|
||||
<script src="./asset/test-ui.js"></script>
|
||||
<script>
|
||||
QUnit.config.asyncRetries = 10;
|
||||
@@ -66,7 +66,11 @@
|
||||
],
|
||||
'bindAll': [
|
||||
'throws an error for bindAll with no functions named'
|
||||
]
|
||||
],
|
||||
'throttle repeatedly with results': true,
|
||||
'more throttle does not trigger leading call when leading is set to false': true,
|
||||
'throttle does not trigger trailing call when trailing is set to false': true,
|
||||
'debounce asap': true
|
||||
},
|
||||
'Objects': {
|
||||
'isEqual': [
|
||||
@@ -97,10 +101,14 @@
|
||||
}
|
||||
};
|
||||
|
||||
// only excuse in Sauce Labs (buggy Safari)
|
||||
// only excuse in Sauce Labs (buggy Safari and timers)
|
||||
if (location.port != '9001') {
|
||||
delete QUnit.config.excused.Chaining['select/reject/sortBy'];
|
||||
delete QUnit.config.excused.Chaining['select/reject/sortBy in functional style'];
|
||||
delete QUnit.config.excused.Functions['throttle repeatedly with results'];
|
||||
delete QUnit.config.excused.Functions['more throttle does not trigger leading call when leading is set to false'];
|
||||
delete QUnit.config.excused.Functions['throttle does not trigger trailing call when trailing is set to false'];
|
||||
delete QUnit.config.excused.Functions['debounce asap'];
|
||||
delete QUnit.config.excused.Objects.isEqual;
|
||||
delete QUnit.config.excused.Utility.times;
|
||||
delete QUnit.config.excused.Utility.uniqueId;
|
||||
|
||||
387
vendor/qunit-clib/qunit-clib.js
vendored
387
vendor/qunit-clib/qunit-clib.js
vendored
@@ -1,387 +0,0 @@
|
||||
/*!
|
||||
* QUnit CLI Boilerplate v1.3.0
|
||||
* Copyright 2011-2012 John-David Dalton <http://allyoucanleet.com/>
|
||||
* Based on a gist by Jörn Zaefferer <https://gist.github.com/722381>
|
||||
* Available under MIT license <http://mths.be/mit>
|
||||
*/
|
||||
;(function(root) {
|
||||
'use strict';
|
||||
|
||||
/** Detect free variable `exports` */
|
||||
var freeExports = typeof exports == 'object' && exports;
|
||||
|
||||
/** Detect free variable `global`, from Node.js or Browserified code, and use it as `root` */
|
||||
var freeGlobal = typeof global == 'object' && global;
|
||||
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
|
||||
root = freeGlobal;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Installs the CLI boilerplate additions on the given `context` object.
|
||||
*
|
||||
* @memberOf exports
|
||||
* @param {Object} context The context object.
|
||||
*/
|
||||
function runInContext(context) {
|
||||
// exit early if no `context` is provided or if `QUnit` does not exist
|
||||
if (!context || !context.QUnit) {
|
||||
return;
|
||||
}
|
||||
|
||||
/** Used to report the test module for failing tests */
|
||||
var moduleName,
|
||||
modulePrinted;
|
||||
|
||||
/** Used to display the wait throbber */
|
||||
var throbberId,
|
||||
throbberDelay = 500,
|
||||
waitCount = -1;
|
||||
|
||||
/** Add `console.log()` support for Narwhal, Rhino, and RingoJS */
|
||||
var console = context.console || (context.console = { 'log': context.print });
|
||||
|
||||
/** Used as a horizontal rule in console output */
|
||||
var hr = '----------------------------------------';
|
||||
|
||||
/** Used by `logInline` to clear previously logged messages */
|
||||
var prevLine = '';
|
||||
|
||||
/** Shorten `context.QUnit.QUnit` to `context.QUnit` */
|
||||
var QUnit = context.QUnit = context.QUnit.QUnit || context.QUnit;
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Schedules timer-based callbacks.
|
||||
*
|
||||
* @private
|
||||
* @param {Function|string} fn The function to call.
|
||||
* @param {number} delay The number of milliseconds to delay the `fn` call.
|
||||
* @param [arg1, arg2, ...] Arguments to invoke `fn` with.
|
||||
* @param {boolean} repeated A flag to specify whether `fn` is called repeatedly.
|
||||
* @returns {number} The the ID of the timeout.
|
||||
*/
|
||||
function schedule(fn, delay, args, repeated) {
|
||||
// Rhino 1.7RC4 will error assigning `task` below
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=775566
|
||||
var task = ids[++counter] = new JavaAdapter(java.util.TimerTask, {
|
||||
'run': function() {
|
||||
fn.apply(context, args);
|
||||
}
|
||||
});
|
||||
// support non-functions
|
||||
if (typeof fn != 'function') {
|
||||
fn = (function(code) {
|
||||
code = String(code);
|
||||
return function() { eval(code); };
|
||||
}(fn));
|
||||
}
|
||||
// used by setInterval
|
||||
if (repeated) {
|
||||
timer.schedule(task, delay, delay);
|
||||
}
|
||||
// used by setTimeout
|
||||
else {
|
||||
timer.schedule(task, delay);
|
||||
}
|
||||
return counter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the delay set by `setInterval` or `setTimeout`.
|
||||
*
|
||||
* @memberOf context
|
||||
* @param {number} id The ID of the timeout to be cleared.
|
||||
*/
|
||||
function clearTimer(id) {
|
||||
if (ids[id]) {
|
||||
ids[id].cancel();
|
||||
timer.purge();
|
||||
delete ids[id];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a code snippet or function repeatedly, with a delay between each call.
|
||||
*
|
||||
* @memberOf context
|
||||
* @param {Function|string} fn The function to call or string to evaluate.
|
||||
* @param {number} delay The number of milliseconds to delay each `fn` call.
|
||||
* @param [arg1, arg2, ...] Arguments to invoke `fn` with.
|
||||
* @returns {number} The the ID of the timeout.
|
||||
*/
|
||||
function setInterval(fn, delay) {
|
||||
return schedule(fn, delay, slice.call(arguments, 2), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a code snippet or a function after specified delay.
|
||||
*
|
||||
* @memberOf context
|
||||
* @param {Function|string} fn The function to call or string to evaluate.
|
||||
* @param {number} delay The number of milliseconds to delay the `fn` call.
|
||||
* @param [arg1, arg2, ...] Arguments to invoke `fn` with.
|
||||
* @returns {number} The the ID of the timeout.
|
||||
*/
|
||||
function setTimeout(fn, delay) {
|
||||
return schedule(fn, delay, slice.call(arguments, 2));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Writes an inline message to standard output.
|
||||
*
|
||||
* @private
|
||||
* @param {string} text The text to log.
|
||||
*/
|
||||
var logInline = (function() {
|
||||
// exit early if not Node.js
|
||||
if (!(typeof process == 'object' && process &&
|
||||
process.on && process.stdout && process.platform != 'win32')) {
|
||||
return function() {};
|
||||
}
|
||||
// cleanup any inline logs when exited via `ctrl+c`
|
||||
process.on('SIGINT', function() {
|
||||
logInline('');
|
||||
process.exit();
|
||||
});
|
||||
return function(text) {
|
||||
var blankLine = repeat(' ', prevLine.length);
|
||||
if (text.length > hr.length) {
|
||||
text = text.slice(0, hr.length - 3) + '...';
|
||||
}
|
||||
prevLine = text;
|
||||
process.stdout.write(text + blankLine.slice(text.length) + '\r');
|
||||
}
|
||||
}());
|
||||
|
||||
/**
|
||||
* Writes the wait throbber to standard output.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function logThrobber() {
|
||||
logInline('Please wait' + repeat('.', (++waitCount % 3) + 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string with `text` repeated `n` number of times.
|
||||
*
|
||||
* @private
|
||||
* @param {string} text The text to repeat.
|
||||
* @param {number} n The number of times to repeat `text`.
|
||||
* @returns {string} The created string.
|
||||
*/
|
||||
function repeat(text, n) {
|
||||
return Array(n + 1).join(text);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* A logging callback triggered when all testing is completed.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @param {Object} details An object with properties `failed`, `passed`, `runtime`, and `total`.
|
||||
*/
|
||||
QUnit.done(function() {
|
||||
var ran;
|
||||
return function(details) {
|
||||
// stop `asyncTest()` from erroneously calling `done()` twice in
|
||||
// environments w/o timeouts
|
||||
if (ran) {
|
||||
return;
|
||||
}
|
||||
ran = true;
|
||||
|
||||
logInline('');
|
||||
console.log(hr);
|
||||
console.log(' PASS: ' + details.passed + ' FAIL: ' + details.failed + ' TOTAL: ' + details.total);
|
||||
console.log(' Finished in ' + details.runtime + ' milliseconds.');
|
||||
console.log(hr);
|
||||
|
||||
// exit out of Node.js or PhantomJS
|
||||
try {
|
||||
var process = context.process || context.phantom;
|
||||
if (details.failed) {
|
||||
process.exit(1);
|
||||
} else {
|
||||
process.exit(0);
|
||||
}
|
||||
} catch(e) { }
|
||||
|
||||
// exit out of Narwhal, Rhino, or RingoJS
|
||||
try {
|
||||
if (details.failed) {
|
||||
java.lang.System.exit(1);
|
||||
} else {
|
||||
quit();
|
||||
}
|
||||
} catch(e) { }
|
||||
};
|
||||
}());
|
||||
|
||||
/**
|
||||
* A logging callback triggered after every assertion.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @param {Object} details An object with properties `actual`, `expected`, `message`, and `result`.
|
||||
*/
|
||||
QUnit.log(function(details) {
|
||||
var expected = details.expected,
|
||||
result = details.result,
|
||||
type = typeof expected != 'undefined' ? 'EQ' : 'OK';
|
||||
|
||||
var assertion = [
|
||||
result ? 'PASS' : 'FAIL',
|
||||
type,
|
||||
details.message || 'ok'
|
||||
];
|
||||
|
||||
if (!result && type == 'EQ') {
|
||||
assertion.push('Expected: ' + expected + ', Actual: ' + details.actual);
|
||||
}
|
||||
QUnit.config.testStats.assertions.push(assertion.join(' | '));
|
||||
});
|
||||
|
||||
/**
|
||||
* A logging callback triggered at the start of every test module.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @param {Object} details An object with property `name`.
|
||||
*/
|
||||
QUnit.moduleStart(function(details) {
|
||||
// reset the `modulePrinted` flag
|
||||
var newModuleName = details.name;
|
||||
if (moduleName != newModuleName) {
|
||||
moduleName = newModuleName;
|
||||
modulePrinted = false;
|
||||
}
|
||||
// initialize the wait throbber
|
||||
if (!throbberId) {
|
||||
throbberId = context.setInterval(logThrobber, throbberDelay);
|
||||
logThrobber();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Converts an object into a string representation.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @type Function
|
||||
* @param {Object} object The object to stringify.
|
||||
* @returns {string} The result string.
|
||||
*/
|
||||
QUnit.jsDump.parsers.object = (function() {
|
||||
var func = QUnit.jsDump.parsers.object;
|
||||
return function(object) {
|
||||
// fork to support Rhino's error objects
|
||||
if (typeof object.rhinoException == 'object') {
|
||||
return object.name +
|
||||
' { message: "' + object.message +
|
||||
'", fileName: "' + object.fileName +
|
||||
'", lineNumber: ' + object.lineNumber + ' }';
|
||||
}
|
||||
return func(object);
|
||||
};
|
||||
}());
|
||||
|
||||
/**
|
||||
* A logging callback triggered after a test is completed.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @param {Object} details An object with properties `failed`, `name`, `passed`, and `total`.
|
||||
*/
|
||||
QUnit.testDone(function(details) {
|
||||
var assertions = QUnit.config.testStats.assertions,
|
||||
testName = details.name;
|
||||
|
||||
if (details.failed > 0) {
|
||||
logInline('');
|
||||
if (!modulePrinted) {
|
||||
modulePrinted = true;
|
||||
console.log(hr);
|
||||
console.log(moduleName);
|
||||
console.log(hr);
|
||||
}
|
||||
console.log(' FAIL - '+ testName);
|
||||
assertions.forEach(function(value) {
|
||||
console.log(' ' + value);
|
||||
});
|
||||
}
|
||||
assertions.length = 0;
|
||||
});
|
||||
|
||||
/**
|
||||
* An object used to hold information about the current running test.
|
||||
*
|
||||
* @memberOf QUnit.config
|
||||
* @type Object
|
||||
*/
|
||||
QUnit.config.testStats = {
|
||||
|
||||
/**
|
||||
* An array of test summaries.
|
||||
*
|
||||
* @memberOf QUnit.config.testStats
|
||||
* @type Array
|
||||
*/
|
||||
'assertions': []
|
||||
};
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
// Timeout fallbacks based on the work of Andrea Giammarchi and Weston C.
|
||||
// https://github.com/WebReflection/wru/blob/master/src/rhinoTimers.js
|
||||
// http://stackoverflow.com/questions/2261705/how-to-run-a-javascript-function-asynchronously-without-using-settimeout
|
||||
try {
|
||||
var counter = 0,
|
||||
ids = {},
|
||||
slice = Array.prototype.slice,
|
||||
timer = new java.util.Timer;
|
||||
|
||||
(function() {
|
||||
var getDescriptor = Object.getOwnPropertyDescriptor || function() {
|
||||
return { 'writable': true };
|
||||
};
|
||||
|
||||
var descriptor;
|
||||
if ((!context.clearInterval || ((descriptor = getDescriptor(context, 'clearInterval')) && (descriptor.writable || descriptor.set))) &&
|
||||
(!context.setInterval || ((descriptor = getDescriptor(context, 'setInterval')) && (descriptor.writable || descriptor.set)))) {
|
||||
context.clearInterval = clearTimer;
|
||||
context.setInterval = setInterval;
|
||||
}
|
||||
if ((!context.clearTimeout || ((descriptor = getDescriptor(context, 'clearTimeout')) && (descriptor.writable || descriptor.set))) &&
|
||||
(!context.setTimeout || ((descriptor = getDescriptor(context, 'setTimeout')) && (descriptor.writable || descriptor.set)))) {
|
||||
context.clearTimeout = clearTimer;
|
||||
context.setTimeout = setTimeout;
|
||||
}
|
||||
}());
|
||||
} catch(e) { }
|
||||
|
||||
// expose shortcuts
|
||||
// exclude `module` because some environments have it as a built-in object
|
||||
('asyncTest deepEqual equal equals expect notDeepEqual notEqual notStrictEqual ' +
|
||||
'ok raises same start stop strictEqual test throws').replace(/\S+/g, function(methodName) {
|
||||
context[methodName] = QUnit[methodName];
|
||||
});
|
||||
|
||||
// must call `QUnit.start()` in the test file if not loaded in a browser
|
||||
if (!context.document || context.phantom) {
|
||||
QUnit.config.autostart = false;
|
||||
QUnit.init();
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose QUnit CLIB
|
||||
if (freeExports && !freeExports.nodeType) {
|
||||
freeExports.runInContext = runInContext;
|
||||
} else {
|
||||
runInContext(root);
|
||||
}
|
||||
}(this));
|
||||
570
vendor/qunit-extras/qunit-extras.js
vendored
Normal file
570
vendor/qunit-extras/qunit-extras.js
vendored
Normal file
@@ -0,0 +1,570 @@
|
||||
/*!
|
||||
* QUnit Extras v1.0.0
|
||||
* Copyright 2011-2012 John-David Dalton <http://allyoucanleet.com/>
|
||||
* Based on a gist by Jörn Zaefferer <https://gist.github.com/722381>
|
||||
* Available under MIT license <http://mths.be/mit>
|
||||
*/
|
||||
;(function(root, undefined) {
|
||||
'use strict';
|
||||
|
||||
/** Native method shortcut */
|
||||
var unshift = Array.prototype.unshift;
|
||||
|
||||
/** Used to match HTML entities */
|
||||
var reEscapedHtml = /(&|<|>|"|')/g;
|
||||
|
||||
/** Used to match parts of the assert message */
|
||||
var reDied = /^Died on test #\d+/,
|
||||
reExpected = /Expected: *<\/th><td><pre>([\s\S]*?)<\/pre>/,
|
||||
reMessage = /^<span class='test-message'>([\s\S]*?)<\/span>/;
|
||||
|
||||
/** Used to convert HTML entities to characters */
|
||||
var htmlUnescapes = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
''': "'"
|
||||
};
|
||||
|
||||
/** Used as a horizontal rule in console output */
|
||||
var hr = '----------------------------------------';
|
||||
|
||||
/** Detect free variable `exports` */
|
||||
var freeExports = typeof exports == 'object' && exports;
|
||||
|
||||
/** Detect free variable `global`, from Node.js or Browserified code, and use it as `root` */
|
||||
var freeGlobal = typeof global == 'object' && global;
|
||||
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
|
||||
root = freeGlobal;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Checks if a given value is present in an array using strict equality
|
||||
* for comparisons, i.e. `===`.
|
||||
*
|
||||
* @oruvate
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {*} target The value to check for.
|
||||
* @returns {boolean} Returns `true` if the `target` element is found, else `false`.
|
||||
*/
|
||||
function contains(array, value) {
|
||||
var index = -1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
while (++index < length) {
|
||||
if (array[index] === value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string with `text` repeated `n` number of times.
|
||||
*
|
||||
* @private
|
||||
* @param {string} text The text to repeat.
|
||||
* @param {number} n The number of times to repeat `text`.
|
||||
* @returns {string} The created string.
|
||||
*/
|
||||
function repeat(text, n) {
|
||||
return Array(n + 1).join(text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the value of `property` on `object`. If `object` is falsey then
|
||||
* `undefined` is returned.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {string} property The property to get the value of.
|
||||
* @returns {*} Returns the resolved value.
|
||||
*/
|
||||
function result(object, property) {
|
||||
return object ? object[property] : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the HTML entities `&`, `<`, `>`, `"`, and `'`
|
||||
* in `string` to their corresponding characters.
|
||||
*
|
||||
* @private
|
||||
* @param {string} string The string to unescape.
|
||||
* @returns {string} Returns the unescaped string.
|
||||
*/
|
||||
function unescape(string) {
|
||||
return string == null ? '' : String(string).replace(reEscapedHtml, unescapeHtmlChar);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `unescape` to convert HTML entities to characters.
|
||||
*
|
||||
* @private
|
||||
* @param {string} match The matched character to unescape.
|
||||
* @returns {string} Returns the unescaped character.
|
||||
*/
|
||||
function unescapeHtmlChar(match) {
|
||||
return htmlUnescapes[match];
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Installs the QUnit additions on the given `context` object.
|
||||
*
|
||||
* @memberOf exports
|
||||
* @param {Object} context The context object.
|
||||
*/
|
||||
function runInContext(context) {
|
||||
// exit early if no `context` is provided or if `QUnit` does not exist
|
||||
if (!context || !context.QUnit) {
|
||||
return;
|
||||
}
|
||||
|
||||
/** Used to report the test module for failing tests */
|
||||
var moduleName,
|
||||
modulePrinted;
|
||||
|
||||
/** Object shortcuts */
|
||||
var console = context.console,
|
||||
phantom = context.phantom,
|
||||
process = phantom || context.process,
|
||||
document = !phantom && context.document;
|
||||
|
||||
/** Detects if running in a PhantomJS web page */
|
||||
var isPhantomPage = typeof context.callPhantom == 'function';
|
||||
|
||||
/** Used to display the wait throbber */
|
||||
var throbberId,
|
||||
throbberDelay = 500,
|
||||
waitCount = -1;
|
||||
|
||||
/** Shorten `context.QUnit.QUnit` to `context.QUnit` */
|
||||
var QUnit = context.QUnit = context.QUnit.QUnit || context.QUnit;
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Schedules timer-based callbacks.
|
||||
*
|
||||
* @private
|
||||
* @param {Function|string} fn The function to call.
|
||||
* @param {number} delay The number of milliseconds to delay the `fn` call.
|
||||
* @param [arg1, arg2, ...] Arguments to invoke `fn` with.
|
||||
* @param {boolean} repeated A flag to specify whether `fn` is called repeatedly.
|
||||
* @returns {number} The the ID of the timeout.
|
||||
*/
|
||||
function schedule(fn, delay, args, repeated) {
|
||||
// Rhino 1.7RC4 will error assigning `task` below
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=775566
|
||||
var task = ids[++counter] = new JavaAdapter(java.util.TimerTask, {
|
||||
'run': function() {
|
||||
fn.apply(context, args);
|
||||
}
|
||||
});
|
||||
// support non-functions
|
||||
if (typeof fn != 'function') {
|
||||
fn = (function(code) {
|
||||
code = String(code);
|
||||
return function() { eval(code); };
|
||||
}(fn));
|
||||
}
|
||||
// used by setInterval
|
||||
if (repeated) {
|
||||
timer.schedule(task, delay, delay);
|
||||
}
|
||||
// used by setTimeout
|
||||
else {
|
||||
timer.schedule(task, delay);
|
||||
}
|
||||
return counter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the delay set by `setInterval` or `setTimeout`.
|
||||
*
|
||||
* @memberOf context
|
||||
* @param {number} id The ID of the timeout to be cleared.
|
||||
*/
|
||||
function clearTimer(id) {
|
||||
if (ids[id]) {
|
||||
ids[id].cancel();
|
||||
timer.purge();
|
||||
delete ids[id];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a code snippet or function repeatedly, with a delay between each call.
|
||||
*
|
||||
* @memberOf context
|
||||
* @param {Function|string} fn The function to call or string to evaluate.
|
||||
* @param {number} delay The number of milliseconds to delay each `fn` call.
|
||||
* @param [arg1, arg2, ...] Arguments to invoke `fn` with.
|
||||
* @returns {number} The the ID of the timeout.
|
||||
*/
|
||||
function setInterval(fn, delay) {
|
||||
return schedule(fn, delay, slice.call(arguments, 2), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a code snippet or a function after specified delay.
|
||||
*
|
||||
* @memberOf context
|
||||
* @param {Function|string} fn The function to call or string to evaluate.
|
||||
* @param {number} delay The number of milliseconds to delay the `fn` call.
|
||||
* @param [arg1, arg2, ...] Arguments to invoke `fn` with.
|
||||
* @returns {number} The the ID of the timeout.
|
||||
*/
|
||||
function setTimeout(fn, delay) {
|
||||
return schedule(fn, delay, slice.call(arguments, 2));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Writes an inline message to standard output.
|
||||
*
|
||||
* @private
|
||||
* @param {string} text The text to log.
|
||||
*/
|
||||
var logInline = (function() {
|
||||
// exit early if not Node.js
|
||||
if (!(typeof process == 'object' && process &&
|
||||
process.on && process.stdout && process.platform != 'win32')) {
|
||||
return function() {};
|
||||
}
|
||||
// cleanup any inline logs when exited via `ctrl+c`
|
||||
process.on('SIGINT', function() {
|
||||
logInline('');
|
||||
process.exit();
|
||||
});
|
||||
|
||||
var prevLine = '';
|
||||
return function(text) {
|
||||
var blankLine = repeat(' ', prevLine.length);
|
||||
if (text.length > hr.length) {
|
||||
text = text.slice(0, hr.length - 3) + '...';
|
||||
}
|
||||
prevLine = text;
|
||||
process.stdout.write(text + blankLine.slice(text.length) + '\r');
|
||||
}
|
||||
}());
|
||||
|
||||
/**
|
||||
* Writes the wait throbber to standard output.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function logThrobber() {
|
||||
logInline('Please wait' + repeat('.', (++waitCount % 3) + 1));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The number of retries async tests have to succeed.
|
||||
*
|
||||
* @memberOf QUnit.config
|
||||
* @type number
|
||||
*/
|
||||
QUnit.config.asyncRetries = 0;
|
||||
|
||||
/**
|
||||
* An object of excused tests and assertions.
|
||||
*
|
||||
* @memberOf QUnit.config
|
||||
* @type Object
|
||||
*/
|
||||
QUnit.config.excused = {};
|
||||
|
||||
/**
|
||||
* An object used to hold information about the current running test.
|
||||
*
|
||||
* @memberOf QUnit.config
|
||||
* @type Object
|
||||
*/
|
||||
QUnit.config.testStats = {
|
||||
|
||||
/**
|
||||
* An array of test summaries.
|
||||
*
|
||||
* @memberOf QUnit.config.testStats
|
||||
* @type Array
|
||||
*/
|
||||
'assertions': []
|
||||
};
|
||||
|
||||
/**
|
||||
* A callback triggered at the start of every test.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @param {Object} details An object with `module` and `name` properties.
|
||||
*/
|
||||
QUnit.testStart(function(details) {
|
||||
var excused = QUnit.config.excused || {},
|
||||
excusedTests = excused[details.module],
|
||||
excusedAsserts = excusedTests && excusedTests[details.name];
|
||||
|
||||
var test = QUnit.config.current,
|
||||
finish = test.finish;
|
||||
|
||||
// allow async tests to retry
|
||||
if (test.async && !test.retries) {
|
||||
test.retries = 0;
|
||||
test.finish = function() {
|
||||
var asserts = this.assertions,
|
||||
index = -1,
|
||||
length = asserts.length,
|
||||
queue = QUnit.config.queue;
|
||||
|
||||
while (++index < length) {
|
||||
var assert = asserts[index];
|
||||
if (!assert.result && this.retries < QUnit.config.asyncRetries) {
|
||||
this.retries++;
|
||||
asserts.length = 0;
|
||||
|
||||
var oldLength = queue.length;
|
||||
this.queue();
|
||||
unshift.apply(queue, queue.splice(oldLength, queue.length - oldLength));
|
||||
return;
|
||||
}
|
||||
}
|
||||
finish.call(this);
|
||||
};
|
||||
}
|
||||
// nothing to excuse
|
||||
if (!excusedAsserts) {
|
||||
return;
|
||||
}
|
||||
// excuse the entire test
|
||||
if (excusedAsserts === true) {
|
||||
test.async = false;
|
||||
test.callback = function() {};
|
||||
test.expected = 0;
|
||||
return;
|
||||
}
|
||||
// excuse specific assertions
|
||||
test.finish = function() {
|
||||
var asserts = this.assertions,
|
||||
index = -1,
|
||||
length = asserts.length;
|
||||
|
||||
while (++index < length) {
|
||||
var assert = asserts[index],
|
||||
message = unescape(result(reMessage.exec(assert.message), 1)),
|
||||
died = result(reDied.exec(message), 0),
|
||||
expected = unescape(result(reExpected.exec(assert.message), 1));
|
||||
|
||||
if ((message && contains(excusedAsserts, message)) ||
|
||||
(died && contains(excusedAsserts, died)) ||
|
||||
(expected && (
|
||||
contains(excusedAsserts, expected) ||
|
||||
contains(excusedAsserts, expected.replace(/\s+/g, ''))
|
||||
))) {
|
||||
assert.result = true;
|
||||
}
|
||||
}
|
||||
finish.call(this);
|
||||
};
|
||||
});
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
// add logging extras
|
||||
if (isPhantomPage || !document) {
|
||||
|
||||
/**
|
||||
* A logging callback triggered when all testing is completed.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @param {Object} details An object with properties `failed`, `passed`, `runtime`, and `total`.
|
||||
*/
|
||||
QUnit.done(function() {
|
||||
var ran;
|
||||
return function(details) {
|
||||
// stop `asyncTest()` from erroneously calling `done()` twice in
|
||||
// environments w/o timeouts
|
||||
if (ran) {
|
||||
return;
|
||||
}
|
||||
ran = true;
|
||||
|
||||
logInline('');
|
||||
console.log(hr);
|
||||
console.log(' PASS: ' + details.passed + ' FAIL: ' + details.failed + ' TOTAL: ' + details.total);
|
||||
console.log(' Finished in ' + details.runtime + ' milliseconds.');
|
||||
console.log(hr);
|
||||
|
||||
// exit out of Node.js or PhantomJS
|
||||
try {
|
||||
if (details.failed) {
|
||||
process.exit(1);
|
||||
} else {
|
||||
process.exit(0);
|
||||
}
|
||||
} catch(e) { }
|
||||
|
||||
// exit out of Narwhal, Rhino, or RingoJS
|
||||
try {
|
||||
if (details.failed) {
|
||||
java.lang.System.exit(1);
|
||||
} else {
|
||||
quit();
|
||||
}
|
||||
} catch(e) { }
|
||||
};
|
||||
}());
|
||||
|
||||
/**
|
||||
* A logging callback triggered after every assertion.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @param {Object} details An object with properties `actual`, `expected`, `message`, and `result`.
|
||||
*/
|
||||
QUnit.log(function(details) {
|
||||
var expected = details.expected,
|
||||
result = details.result,
|
||||
type = typeof expected != 'undefined' ? 'EQ' : 'OK';
|
||||
|
||||
var assertion = [
|
||||
result ? 'PASS' : 'FAIL',
|
||||
type,
|
||||
details.message || 'ok'
|
||||
];
|
||||
|
||||
if (!result && type == 'EQ') {
|
||||
assertion.push('Expected: ' + expected + ', Actual: ' + details.actual);
|
||||
}
|
||||
QUnit.config.testStats.assertions.push(assertion.join(' | '));
|
||||
});
|
||||
|
||||
/**
|
||||
* A logging callback triggered at the start of every test module.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @param {Object} details An object with property `name`.
|
||||
*/
|
||||
QUnit.moduleStart(function(details) {
|
||||
// reset the `modulePrinted` flag
|
||||
var newModuleName = details.name;
|
||||
if (moduleName != newModuleName) {
|
||||
moduleName = newModuleName;
|
||||
modulePrinted = false;
|
||||
}
|
||||
// initialize the wait throbber
|
||||
if (!throbberId) {
|
||||
throbberId = context.setInterval(logThrobber, throbberDelay);
|
||||
logThrobber();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* A logging callback triggered after a test is completed.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @param {Object} details An object with properties `failed`, `name`, `passed`, and `total`.
|
||||
*/
|
||||
QUnit.testDone(function(details) {
|
||||
var assertions = QUnit.config.testStats.assertions,
|
||||
testName = details.name;
|
||||
|
||||
if (details.failed > 0) {
|
||||
logInline('');
|
||||
if (!modulePrinted) {
|
||||
modulePrinted = true;
|
||||
console.log(hr);
|
||||
console.log(moduleName);
|
||||
console.log(hr);
|
||||
}
|
||||
console.log(' FAIL - '+ testName);
|
||||
assertions.forEach(function(value) {
|
||||
console.log(' ' + value);
|
||||
});
|
||||
}
|
||||
assertions.length = 0;
|
||||
});
|
||||
|
||||
/**
|
||||
* Converts an object into a string representation.
|
||||
*
|
||||
* @memberOf QUnit
|
||||
* @type Function
|
||||
* @param {Object} object The object to stringify.
|
||||
* @returns {string} The result string.
|
||||
*/
|
||||
QUnit.jsDump.parsers.object = (function() {
|
||||
var func = QUnit.jsDump.parsers.object;
|
||||
return function(object) {
|
||||
// fork to support Rhino's error objects
|
||||
if (typeof object.rhinoException == 'object') {
|
||||
return object.name +
|
||||
' { message: "' + object.message +
|
||||
'", fileName: "' + object.fileName +
|
||||
'", lineNumber: ' + object.lineNumber + ' }';
|
||||
}
|
||||
return func(object);
|
||||
};
|
||||
}());
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
// add CLI extras
|
||||
if (!document) {
|
||||
// Timeout fallbacks based on the work of Andrea Giammarchi and Weston C.
|
||||
// https://github.com/WebReflection/wru/blob/master/src/rhinoTimers.js
|
||||
// http://stackoverflow.com/questions/2261705/how-to-run-a-javascript-function-asynchronously-without-using-settimeout
|
||||
try {
|
||||
var counter = 0,
|
||||
ids = {},
|
||||
slice = Array.prototype.slice,
|
||||
timer = new java.util.Timer;
|
||||
|
||||
(function() {
|
||||
var getDescriptor = Object.getOwnPropertyDescriptor || function() {
|
||||
return { 'writable': true };
|
||||
};
|
||||
|
||||
var descriptor;
|
||||
if ((!context.clearInterval || ((descriptor = getDescriptor(context, 'clearInterval')) && (descriptor.writable || descriptor.set))) &&
|
||||
(!context.setInterval || ((descriptor = getDescriptor(context, 'setInterval')) && (descriptor.writable || descriptor.set)))) {
|
||||
context.clearInterval = clearTimer;
|
||||
context.setInterval = setInterval;
|
||||
}
|
||||
if ((!context.clearTimeout || ((descriptor = getDescriptor(context, 'clearTimeout')) && (descriptor.writable || descriptor.set))) &&
|
||||
(!context.setTimeout || ((descriptor = getDescriptor(context, 'setTimeout')) && (descriptor.writable || descriptor.set)))) {
|
||||
context.clearTimeout = clearTimer;
|
||||
context.setTimeout = setTimeout;
|
||||
}
|
||||
}());
|
||||
} catch(e) { }
|
||||
|
||||
// add `console.log` support to Narwhal, Rhino, and RingoJS
|
||||
console || (console = context.console = { 'log': context.print });
|
||||
|
||||
// expose shortcuts
|
||||
// exclude `module` because some environments have it as a built-in object
|
||||
('asyncTest deepEqual equal equals expect notDeepEqual notEqual notStrictEqual ' +
|
||||
'ok raises same start stop strictEqual test throws').replace(/\S+/g, function(methodName) {
|
||||
context[methodName] = QUnit[methodName];
|
||||
});
|
||||
|
||||
// must call `QUnit.start` in the test file if not loaded in a browser
|
||||
QUnit.config.autostart = false;
|
||||
QUnit.init();
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose QUnit extras
|
||||
if (freeExports && !freeExports.nodeType) {
|
||||
freeExports.runInContext = runInContext;
|
||||
} else {
|
||||
runInContext(root);
|
||||
}
|
||||
}(this));
|
||||
Reference in New Issue
Block a user