Compare commits

...

499 Commits
3.0.1 ... 3.9.0

Author SHA1 Message Date
jdalton
15841b191d Bump to v3.9.0. 2015-05-19 08:19:55 -07:00
jdalton
65514d89ad Rebuild lodash and docs. 2015-05-19 08:19:42 -07:00
jdalton
c6f8896826 Ensure _.get can return null values. [closes #1216] 2015-05-19 08:18:46 -07:00
jdalton
882d84f1e6 Ensure _.merge skips undefined values if a destination value exists. 2015-05-18 07:30:25 -07:00
jdalton
0eba3a3678 Update ecstatic and istanbul travis deps. 2015-05-18 07:30:24 -07:00
jdalton
756b28c3ab Rename value param to srcValue. 2015-05-17 16:13:54 -07:00
jdalton
d78ebc40ae Fix isEqual tests on older Safari. 2015-05-17 09:14:50 -07:00
jdalton
58aea21b82 Use 'xo' instead of 'hi' for string tests. 2015-05-17 00:55:30 -07:00
jdalton
c2b1d61dd1 Add toObject to _.pairs. 2015-05-17 00:55:30 -07:00
jdalton
f4d72dba06 Adjust test labels for consistency. 2015-05-17 00:55:30 -07:00
jdalton
31e81d7be2 Add string tests for _.isMatch, _.matches, & _.matchesProperty. 2015-05-17 00:55:30 -07:00
jdalton
6c9123beee Add toObject use to baseIsMatch. 2015-05-16 18:53:33 -07:00
jdalton
0fa0397da2 Add checks back to isEqual and simplify checks in baseIsEqual. 2015-05-16 18:53:33 -07:00
jdalton
b652fc7e1a Reduce baseIsMatch and isMatch by adding getMatchData. 2015-05-16 15:24:59 -07:00
jdalton
c42fea0d3d Remove isStrictComparable use from _.isEqual. 2015-05-16 13:29:41 -07:00
jdalton
48a56a848a Add test for modularized flow and flowRight. 2015-05-16 11:30:57 -07:00
jdalton
d6937baa8e Simplify getFuncName. 2015-05-16 11:30:43 -07:00
jdalton
3490f8acb5 Ensure LodashWrapper.prototype.thru exists before creating a wrapper in flow. 2015-05-16 07:01:15 -07:00
jdalton
46ace7e8e8 Simplify getNative. 2015-05-15 11:30:57 -07:00
jdalton
698956e130 Move parseFloat into isIndex. [closes #1209] 2015-05-15 08:55:47 -07:00
jdalton
b25cd39953 Add isObject check to getNative. 2015-05-15 01:29:17 -07:00
jdalton
de4f5eb2ca Allow for getNative to accept a nullish object value. 2015-05-15 00:30:20 -07:00
jdalton
ccc5fa3981 Add getNative helper. 2015-05-15 00:23:27 -07:00
jdalton
b899a19184 Change "it is" to "it's". [ci skip] 2015-05-15 00:22:14 -07:00
jdalton
6af7fac344 Minor style nit in _.isObject. 2015-05-14 21:27:11 -07:00
jdalton
49ef2b4d54 Clarify _.debounce and _.throttle docs. [ci skip] 2015-05-14 09:13:00 -07:00
jdalton
fcc09a7375 Use strict equality check since its type isn't guaranteed. 2015-05-13 23:39:06 -07:00
jdalton
8e9ad4df97 Avoid testing Backbone in IE6 in sauce. 2015-05-13 23:25:47 -07:00
jdalton
4dfcfd2542 Cleanup test/backbone.html and test/underscore.html. 2015-05-13 23:25:31 -07:00
jdalton
12081c9bd6 Bypass vm module use for ChakraNode. 2015-05-13 21:04:51 -07:00
jdalton
abee7fdfa2 Update vendors. 2015-05-13 21:03:09 -07:00
jdalton
ca0bc0632b Reduce _.has. 2015-05-13 08:57:03 -07:00
jdalton
e465750cd2 Fix failing _.has tests in Rhino. 2015-05-13 00:51:58 -07:00
jdalton
934b08f720 Avoid mixing boolean and object types in variable assignments. 2015-05-12 23:41:14 -07:00
jdalton
78cc98840b Remove fast path from _.isMatch. 2015-05-12 21:19:12 -07:00
jdalton
d4cd7a120f Remove support.funcDecomp and support.nonEnumStrings. 2015-05-12 21:18:35 -07:00
jdalton
4b6c91bbf1 Remove support.nonEnumArgs. 2015-05-12 09:23:07 -07:00
jdalton
e3be2b4451 Ensure _.has treats sparse arrays as dense. 2015-05-12 08:58:37 -07:00
jdalton
c6ff845ecb Ensure _.intersection works with a single array. [closes #1199] 2015-05-11 23:52:56 -07:00
jdalton
846bde35ff Use hasOwnProperty instead of objToString for the creation of reIsNative to avoid issues with core-js. [closes #1197] 2015-05-11 10:31:38 -07:00
jdalton
69990ae226 Fix test error in Rhino with CommonJS support. 2015-05-10 23:13:18 -07:00
jdalton
415fc81577 Remove Narwhal reference from source. 2015-05-10 20:20:18 -07:00
jdalton
b675566e23 Cleanup bizarro values, vm values, iframe values, worker addition, & module additions. 2015-05-10 20:17:57 -07:00
jdalton
190da0dcd4 Capitalize comments in test/index.html. [ci skip] 2015-05-10 20:09:14 -07:00
jdalton
5c40f93ca3 Fix AMD tests in PhantomJS. 2015-05-10 17:05:46 -07:00
jdalton
879c1e4992 Increase test coverage. 2015-05-09 18:02:09 -07:00
jdalton
311334c9e1 Add doc examples to _.gt, _.gte, _.lt, & _.lte. [ci skip] 2015-05-09 15:25:32 -07:00
jdalton
dc5268b0c0 Add _.gt, _.gte, _.lt, _.lte, & _.eq unit tests. 2015-05-09 12:25:31 -07:00
jdalton
d77ace6dc3 Upate tested Chrome version in sauce.js. 2015-05-08 18:56:20 -07:00
jdalton
f0b3c1a9ab Cleanup createFlow. 2015-05-08 18:55:57 -07:00
jdalton
9efb73f592 Remove nativeAssign and getOwnPropertySymbols use. 2015-05-08 11:36:44 -07:00
jdalton
569b4b29aa Add case of 5 to createCtorWrapper to align with bindCallback. 2015-05-08 11:36:23 -07:00
jdalton
a61bde5b78 Ensure _.bind works with ES6 class constructors. [closes #1193] 2015-05-08 09:49:54 -07:00
jdalton
542dd67892 Update param docs for createExtremum. [ci skip] 2015-05-08 00:17:48 -07:00
jdalton
172eca6081 Avoid using require in source because browserify does a quick regexp match for \brequire\b before deciding whether to build an AST to get require calls. 2015-05-07 23:59:51 -07:00
jdalton
004aaed783 Remove odd string support from createExtremum. 2015-05-07 23:53:50 -07:00
jdalton
a1b15df648 Update tested Rhino to 1.7.6. 2015-05-07 01:05:16 -07:00
jdalton
b5d5bef678 Avoid undefined length variable use in createExtremum. 2015-05-07 00:38:22 -07:00
Len Smith
421df0dff3 Make null sorted right behind undefined and NaN. 2015-05-07 00:34:12 -07:00
Armaan Ahluwalia
5b5e29cb7b Fixed iteratees doc typos. [ci skip] 2015-05-06 14:58:03 -07:00
jdalton
db67ae12ec Optimize _.max and _.min when invoked with iteratees and add _.gt, _.gte, _.lt, _.lte, & _.eq. 2015-05-06 08:56:50 -07:00
jdalton
7dfd7ad5b9 Minor adjustments to param docs for baseCompareAscending and matchesProperty. [ci skip] 2015-05-06 01:37:56 -07:00
jdalton
ca5fa9e84d Add support for an immutable Map to _.memoize.Cache. 2015-05-05 23:13:00 -07:00
jdalton
1afcfa4406 Use precomputed values for MAX_ARRAY_LENGTH and MAX_SAFE_INTEGER. 2015-05-04 21:53:12 -07:00
jdalton
95b1455b62 Consistently use callback as the variable to store getCallback() results. 2015-05-04 09:06:06 -07:00
jdalton
d825937411 Ensure customizer results are respected by _.isEqual. 2015-05-03 22:57:45 -07:00
jdalton
ee182df533 Optimize object comparisons in _.isEqual. 2015-05-03 19:38:58 -07:00
jdalton
14651d8ea8 Remove customizer assignment from clone and cloneDeep. 2015-05-03 17:20:51 -07:00
jdalton
7e4ed7c1a9 Ensure baseCreate works in ExtendScript. 2015-05-03 13:47:40 -07:00
jdalton
13fe88c03f Cleanup baseIsMatch and equalArrays. 2015-05-02 23:00:57 -07:00
jdalton
7b80a780c7 Remove old Opera from Sauce tests. 2015-05-01 22:16:59 -07:00
jdalton
2b465bdf82 Update QUnit dev dep. 2015-05-01 21:00:50 -07:00
jdalton
6d52119597 Bump to v3.8.0. 2015-05-01 00:45:06 -07:00
jdalton
b75041173c Rebuild lodash and docs. 2015-05-01 00:45:06 -07:00
jdalton
23eba0a029 Avoid isArrayLike in createBaseEach to bail out early when nullish. 2015-05-01 00:45:06 -07:00
jdalton
566781cab2 Loosen -0 and 0 checks. 2015-05-01 00:44:55 -07:00
jdalton
0ea1fc5602 Avoid var name pad in composeArgsRight. 2015-04-30 09:09:47 -07:00
jdalton
2ce9e09e8b Ensure _.padLeft and _.padRight handle empty strings correctly. 2015-04-30 09:09:46 -07:00
Tim D
6cab7ceb0f Removing length assignment in baseFlatten for a perf win. 2015-04-29 19:57:39 -07:00
jdalton
8ae7d8aa07 Simplify SameValueZero doc notes. [ci skip] 2015-04-29 00:25:36 -07:00
jdalton
ce6ccef2d0 Ensure baseAt, basePullAt, and pullAt handle nullish values correctly. 2015-04-29 00:25:36 -07:00
jdalton
2c6d880542 Loosen restrictions of _.intersection and others to accept array-like objects and add isArrayLike helper. [closes #1163] 2015-04-29 00:25:36 -07:00
jdalton
bf89287c56 Optimize lazy slice for start of 0 and an end value. 2015-04-29 00:25:36 -07:00
jdalton
df176dfe8a Fix modularized npm build tests. 2015-04-26 14:22:46 -07:00
jdalton
141a32d388 Add _.callback test for augmenting source objects. 2015-04-26 10:59:29 -07:00
jdalton
37786b76ed Minor whitespace nits. [ci skip] 2015-04-26 00:46:33 -07:00
jdalton
02b920f259 Add _.flow and _.flowRight tests for curried functions with placeholders. 2015-04-23 08:38:58 -07:00
jdalton
31e25f88a0 Narrow bitmask check in createFlow. 2015-04-23 08:06:51 -07:00
jdalton
231c8a468e Replace "that" with "which" in pickByArray and pickByCallback docs. [ci skip] 2015-04-22 23:10:17 -07:00
jdalton
ae346f564f Avoid lazy eval optimization in createFlow if metadata has placeholder arguments. [closes #1160] 2015-04-22 20:44:56 -07:00
jdalton
fcc0608cf2 Only use built-in Object.assign when in strict mode. 2015-04-22 20:23:30 -07:00
jdalton
641cd63462 Fix old V8 JIT bug that has cropped up again. 2015-04-22 20:17:39 -07:00
jdalton
0b907a3efa Make tests work in Phantom 2. 2015-04-22 20:16:43 -07:00
jdalton
ce180cf2bf Excuse Underscore _.now test to avoid occasional false fail in sauce andrioid. 2015-04-22 07:18:14 -07:00
jdalton
d97276404c Update excused Underscore tests. 2015-04-22 07:09:52 -07:00
Ray Hammond
d5a9b4344b Removed unused variables identified by JSHint. 2015-04-21 16:58:10 -07:00
jdalton
e317fdfa3d Cleanup deep path tests. 2015-04-21 08:07:49 -07:00
jdalton
150ea2639a Add complex tests for unquoted bracketed property names. 2015-04-21 08:03:14 -07:00
jdalton
a551348b40 Fix preventExtensions definition typo. [closes #1153] 2015-04-21 07:59:02 -07:00
jdalton
3429b5d661 Ensure empty brackets are ignored by _.get and _.set. 2015-04-21 00:02:28 -07:00
jdalton
c8314b215b Doc and var name tweaks to _.unzip, _.unzipWith, and _.zipWith. 2015-04-20 08:59:53 -07:00
jdalton
5929f7d23b Newline nit in _.assign doc. [ci skip] 2015-04-20 00:35:41 -07:00
jdalton
85a7df3d27 Add _.unzipWith. 2015-04-20 00:10:12 -07:00
jdalton
e6c5a0e848 Update iOS comment on getLength. [ci skip] 2015-04-19 20:04:13 -07:00
Ray Hammond
92dee72b10 Added two missing semicolons. 2015-04-19 17:51:14 -07:00
jdalton
4d6e57a5e6 Make _.zipWith act like _.zip when no iteratee is provided and make _.unzip ignore non array or arguments object values. 2015-04-19 10:32:27 -07:00
jdalton
936a1c2764 Add support for thisArg in zipWith. 2015-04-19 08:02:43 -07:00
jdalton
a08a3c6096 Cleanup tests. 2015-04-18 22:31:46 -07:00
thirdcreed
82be40eace Add _.zipWith. 2015-04-18 11:13:03 -07:00
jdalton
20ba0bd1dc Fix _.uniqueId test to properly compare values. 2015-04-18 11:10:55 -07:00
jdalton
75ce6b82e8 Add sum to guarded doc note in _.map. [ci skip] 2015-04-17 09:04:22 -07:00
jdalton
9749ac56ba Remove extraneous docs for methods that reference others. [ci skip] 2015-04-17 08:37:55 -07:00
jdalton
746f9bb778 Add _.mapKeys. [closes #169] 2015-04-17 08:36:37 -07:00
jdalton
f2dae588aa Add test labels to help track down odd false fail. 2015-04-17 08:27:14 -07:00
jdalton
9f3f0a76aa Ensure baseGet returns undefined and not null. [closes #1136] 2015-04-16 20:07:48 -07:00
jdalton
30f28a51ca Bump v3.7.0. 2015-04-15 20:08:34 -07:00
jdalton
3e22344782 Rebuild lodash and docs. 2015-04-15 19:32:58 -07:00
jdalton
0b20d89d62 Ensure _.times floors n float values. 2015-04-15 19:21:13 -07:00
jdalton
80d892c744 Update Firefox versions in saucelabs.js. 2015-04-15 09:04:28 -07:00
jdalton
53326bef33 Update vendors. 2015-04-15 08:44:18 -07:00
jdalton
f05a5a3abb Fix failing strict mode _.set tests. 2015-04-15 00:00:40 -07:00
jdalton
8581be4977 Ensure baseGet and result work with strings on nested objects. 2015-04-14 22:34:46 -07:00
jdalton
0e8277ba9e Cleanup path methods. 2015-04-14 21:19:31 -07:00
jdalton
3cc2f83912 Add more string character access tests and adjust array path tests. 2015-04-14 21:18:50 -07:00
jdalton
177034a498 Move _.filter benchmark and cleanup labels. 2015-04-14 21:15:18 -07:00
jdalton
f4d06e5183 Remove unneeded "use strict" directive. 2015-04-14 12:54:30 -07:00
jdalton
637a6b5f7e Optimize _.invoke. 2015-04-14 12:29:41 -07:00
jdalton
75445b8b98 Update ecstatic travis dep. 2015-04-14 12:14:12 -07:00
jdalton
f96de55ac7 Optimize isKey. 2015-04-14 12:13:54 -07:00
jdalton
c4d4af3b5a Make freeGlobal detect align with freeSelf and freeWindow checks. 2015-04-13 20:29:58 -07:00
jdalton
5dfee44340 Cleanup doc blocks. [ci skip] 2015-04-13 20:29:26 -07:00
jdalton
99f5857d84 Add stable sort tests for objects. 2015-04-13 20:28:25 -07:00
jdalton
520f7c6812 Ensure index in baseSortByOrder is an integer. 2015-04-13 09:30:01 -07:00
jdalton
63d493aa1f Cleanup _.sortBy, _.sortByAll, _.sortByOrder, & baseSortByOrder. 2015-04-13 08:58:10 -07:00
jdalton
38ab42f855 Add Object.assign reference to _.assign docs. [ci skip] 2015-04-13 07:43:35 -07:00
Graeme Yeates
bc3771f3af Support iteratee use cases for _.sortByAll and _.sortByOrder. 2015-04-12 18:29:26 -07:00
jdalton
9d90af409b Add bizarro test for Object.getOwnPropertySymbols. 2015-04-12 18:28:50 -07:00
jdalton
20183bbd57 Have baseMap use getLength and isLength. 2015-04-12 10:33:34 -07:00
jdalton
1d8efe1cf8 Cleanup deep property tests. 2015-04-11 23:08:59 -07:00
jdalton
23354d413f Add an _.invoke test for deep paths. 2015-04-11 23:08:11 -07:00
jdalton
715f03f5f1 Change call to invoke in _.debounce and _.throttle test. 2015-04-11 23:08:11 -07:00
jdalton
ff6bbaed19 Add more tests for _.sortByAll and _.sortByOrder used as iteratees of _.reduce. 2015-04-11 20:58:31 -07:00
Graeme Yeates
f82cbbab1c Use _.restParam in _.sortByAll. 2015-04-11 20:18:29 -07:00
jdalton
5a1b526b6c Add and adjust deep path examples to _.method, _.methodOf, _.property and _.propertyOf docs. [ci skip] 2015-04-11 18:40:05 -07:00
jdalton
1ef92c87fb Use query instead of inspect in various docs. [ci skip] 2015-04-11 16:33:24 -07:00
jdalton
0aef515522 Rename baseMethod to invokePath and make use of it in _.invoke. 2015-04-11 16:32:27 -07:00
jdalton
9b5c97666a Ensure symbols work for _.assign, _.defaults, & _.merge. 2015-04-11 11:42:36 -07:00
jdalton
a55d822f9a Add more comments to nativeAssign definition. [ci skip] 2015-04-10 21:24:32 -07:00
jdalton
5b2bde6e0d Simplify getSymbols. 2015-04-10 19:56:38 -07:00
jdalton
020c5b27dc Add assert labels to _.tempalte test. 2015-04-10 15:42:03 -07:00
jdalton
65457208e5 Fix feature test for IE tech preview. 2015-04-10 15:41:48 -07:00
jdalton
6eb1b98975 Fix test fails in Node 0.12. 2015-04-10 15:40:26 -07:00
jdalton
a927bab6b3 Use built-in Object.assign if available. 2015-04-10 09:19:39 -07:00
jdalton
48e3e3e8cb Add _.method and _.methodOf docs. [ci skip] 2015-04-09 09:29:23 -07:00
jdalton
b5d095401d Make _.result and _.set docs more consistent with _.get. [ci skip] 2015-04-09 08:42:05 -07:00
jdalton
b3e58d4794 Cleanup createAssigner. 2015-04-09 07:35:32 -07:00
jdalton
79b064320e Update _.assign benchmarks for newer Underscore versions. 2015-04-09 07:30:17 -07:00
Sankar Gorthi
335b8326ee Fix broken link in _.bindKey docs. [ci skip] 2015-04-08 15:22:06 -07:00
jdalton
e777020e44 Update propertyIsEnumerable mock for support.nonEnumArgs feature test changes. 2015-04-08 13:42:48 -07:00
jdalton
745d97ebe1 Replace typeof checks for undefined with === checks. 2015-04-08 09:37:35 -07:00
jdalton
bb06d98a43 Add _.has doc examples of deep paths. [ci skip] 2015-04-08 09:27:37 -07:00
jdalton
3500b0016c Store last(path) in a var. 2015-04-08 08:41:57 -07:00
jdalton
7ec916b777 Add additional backtick reference to _.escape docs. [ci skip] 2015-04-08 08:24:44 -07:00
jdalton
3c71f79929 Fix string indexes with _.has in older enviros. 2015-04-08 00:39:39 -07:00
jdalton
a83e70104c Ensure complex paths work with _.get, _.result, & _.set. 2015-04-07 19:47:31 -07:00
jdalton
85af554bac Replace work with expected value in test labels of _.get, _.isMatch, _.matches, _.matchesProperty, _.method, _.property, _.propertyOf, & _.result. 2015-04-07 18:45:39 -07:00
jdalton
885722afde Add _.has and _.methodOf tests. 2015-04-07 18:41:51 -07:00
jdalton
b2f094da01 Add another path test to a deep property test of _.result. 2015-04-07 09:29:44 -07:00
jdalton
1e85ec6758 Add more _.method tests. 2015-04-07 09:29:09 -07:00
jdalton
c8974aac3e Ensure nullish values aren't treated as empty objects in _.get, _.has, _.matchesProperty, _.property, _.propertyOf, & _.result. 2015-04-07 08:33:19 -07:00
jdalton
ad318c04e5 Use nullish more in test labels. 2015-04-07 08:19:24 -07:00
jdalton
db73e48206 Add mutation notes to docs of _.assign and _.defaults. [ci skip] 2015-04-07 08:07:00 -07:00
jdalton
d13972e0b8 Fix string test fails for _.matchesProperty, _.property, & _.result in IE 6 & 7. 2015-04-07 07:28:58 -07:00
Graeme Yeates
df74b2bfcb Remove _.noop from chainable list. [ci skip] 2015-04-07 00:31:38 -07:00
jdalton
b94b75726d Cleanup _.property and _.propertyOf tests. 2015-04-07 00:24:50 -07:00
jdalton
9a2d38acff Cleanup _.method tests. 2015-04-07 00:24:22 -07:00
jdalton
537f8f401e Cleanup _.matchesProperty tests. 2015-04-07 00:24:01 -07:00
jdalton
04f1a799dc Cleanup _.matches tests. 2015-04-07 00:23:16 -07:00
jdalton
74adb2f540 Consolidate _.get and _.result tests. 2015-04-07 00:22:11 -07:00
jdalton
a129a2509f Ensure _.method aligns with _.invoke. 2015-04-07 00:20:35 -07:00
jdalton
cc0b8e9d10 Ensure methods like _.get, _.has, _.matchesProperty, _.property, & _.propertyOf can get characters of string indexes. 2015-04-07 00:16:33 -07:00
jdalton
af8fcf234f Add _.set test for non-deep paths. 2015-04-06 13:01:27 -06:00
jdalton
e0dc2daf54 Simplify _.set for plain keys. 2015-04-06 12:59:39 -06:00
jdalton
c066e655dc Add empty path and array path coercing _.set test. 2015-04-06 12:04:07 -05:00
jdalton
2698e6f0ea Add more array path tests to _.get. 2015-04-06 11:54:09 -05:00
jdalton
63902bde9c Add array path tests to _.set. 2015-04-06 11:34:33 -05:00
jdalton
c876004fb2 Ensure _.set passes strict mode tests. 2015-04-06 09:57:26 -05:00
jdalton
633f37bfb6 Add array path tests to _.get. 2015-04-06 09:29:36 -05:00
jdalton
d70bc74dc8 Adjust baseGet and isKey to reduce code in other methods. 2015-04-05 21:41:10 -05:00
Justin Ridgewell
d7a4524e70 Add _.method and _.methodOf. 2015-04-05 13:53:54 -05:00
jdalton
fe1e27fd40 Add tests for _.add coercing params to numbers. 2015-04-05 13:45:56 -05:00
jdalton
8a7a099073 Use x even more in support definition. 2015-04-05 13:25:45 -05:00
jdalton
1b53b5f9eb Cleanup doc block for _.support.nonEnumArgs. [ci skip] 2015-04-05 13:25:29 -05:00
James
8b758ee25a Make _.add coerce augend and addend params to numbers. 2015-04-05 11:59:56 -05:00
jdalton
81c24a8478 Add _.get test for empty paths. 2015-04-05 08:38:51 -05:00
jdalton
a6f3e0b6af Remove "correctly" from test labels. 2015-04-05 08:38:14 -05:00
jdalton
6e9e8127b6 Rename variable sum in doc examples to total. [ci skip] 2015-04-05 08:15:36 -05:00
jdalton
63d43275d3 Remove unnecessary parseFloat from baseAt. 2015-04-05 08:13:32 -05:00
jdalton
cb2bf7f8fa Add tests for missing path parts for _.matchesProperty. 2015-04-05 01:39:51 -05:00
jdalton
1fae760ccd Use perl instead of sed in travis.yml. 2015-04-05 01:39:16 -05:00
jdalton
4195c4c4bf Add tests for missing path parts for _.property and _.propertyOf. 2015-04-04 14:35:50 -05:00
jdalton
13e7a1ed93 Add _.isMatch and _.matchesProperty tests for nullish object params. 2015-04-04 00:29:04 -05:00
jdalton
ea4357ca98 Add _.callback tests for deep paths. 2015-04-03 17:44:59 -05:00
jdalton
5e8255d24d Tweak path related test labels. 2015-04-03 17:08:59 -05:00
jdalton
003d6ec43f Add _.has tests for deep paths. 2015-04-03 17:08:30 -05:00
jdalton
9749ff7c67 Add a non-deep property test for _.get. 2015-04-03 12:56:12 -05:00
jdalton
c88589e0e5 Add _.result tests for deep paths. 2015-04-03 12:55:42 -05:00
jdalton
32ef1bb7a5 Add deep props to key tests to make it more interesting. 2015-04-03 12:47:26 -05:00
jdalton
206c65904f Add _.matchesProperty test for deep props. 2015-04-03 12:47:08 -05:00
jdalton
219d4688e4 Ensure path a property name is teated as a key before a path in _.get and _.set. 2015-04-03 12:36:31 -05:00
jdalton
adc687f0a0 Add _.property and _.propertyOf tests for deep paths. 2015-04-03 12:22:38 -05:00
jdalton
88e59c9a5a Cleanup tests. 2015-04-03 11:46:55 -05:00
jdalton
71a89a575f Add _.get and _.set tests. 2015-04-03 11:46:37 -05:00
jdalton
e3dc8dfcf4 Remove rogue newline in initCloneByTag doc block. [ci skip] 2015-04-03 02:12:14 -05:00
jdalton
2dd77d5bc7 Change "method" to "function". [ci skip] 2015-04-03 02:11:42 -05:00
jdalton
0192226bb3 Use "length" when referring to a property name. [ci skip] 2015-04-03 02:11:16 -05:00
jdalton
faf2658da2 Move getLength closer to like functions and give it a proper jsdoc block. 2015-04-03 02:10:21 -05:00
jdalton
9a1c00d2dc Use x a bit more in support definition to prevent aggressive minifier modifications. 2015-04-01 21:42:57 -07:00
jdalton
4a8695caff Use getLength to avoid an iOS JIT bug. 2015-04-01 21:39:37 -07:00
jdalton
b28016bfeb Simplify isLength check in _.keys. 2015-04-01 12:07:12 -07:00
jdalton
4758a9e66d Ensure _.inRange swaps start with end when start is greater than end. [closes #1099] 2015-04-01 08:43:42 -07:00
Trevor Adams
97bd1ef4ec Minor change to _.once to avoid an extra var swap. 2015-04-01 08:38:02 -07:00
jdalton
2adac8bdae Use _.restParam in createAssigner. 2015-04-01 01:57:19 -07:00
jdalton
3c56914822 Simplify isLoose check in baseIsEqualDeep. 2015-04-01 00:08:31 -07:00
jdalton
c5cc907838 Ensure _.match and _.matchesProperty compares functions by reference. [closes #1101] 2015-03-31 23:41:15 -07:00
jdalton
0907aabacd Avoid bug in older browsers where an unmatched capture group returns an empty string. 2015-03-31 09:09:17 -07:00
jdalton
f4290bda7f Update test deps. 2015-03-31 01:06:09 -07:00
jdalton
4bdb82a7a2 Ensure toPath works with a nullish value. 2015-03-31 00:50:47 -07:00
jdalton
6a696dde3a Add _.set tests. 2015-03-31 00:15:46 -07:00
jdalton
8481684a82 Fix start and end typo mix up in _.range docs. [closes #1095] [ci skip] 2015-03-30 21:05:48 -07:00
Benjamin Tan
03aa8b3356 Minor documentation and test name nits. [ci skip] 2015-03-30 20:58:20 -07:00
jdalton
64bfed2640 Clarify _.uniq docs. [ci skip] 2015-03-30 00:55:30 -07:00
jdalton
2edcc89303 Add _.get and _.set. 2015-03-29 20:59:48 -07:00
jdalton
18313f2e90 Minor word nit for mapSet doc. [ci skip] 2015-03-29 20:57:19 -07:00
jdalton
0ff96418bd Simplify reIsDeepProp and rePropName. 2015-03-29 20:32:25 -07:00
Justin Ridgewell
1480abf0e8 Fix Worker tests in Chrome. See https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Browser_notes. 2015-03-29 18:34:48 -07:00
jdalton
e7ba75d533 Make toPath more robust and add support for deep properties to _.has and _.matchesProperty. 2015-03-29 15:43:53 -07:00
jdalton
044291d940 Add deep property support to _.has. 2015-03-29 08:59:42 -07:00
jdalton
ad62efcb9e Make reComboMarks singular for naming consistency. 2015-03-29 08:08:46 -07:00
jdalton
0dc59d9481 Add support for brackets to toPath. 2015-03-29 08:08:23 -07:00
Justin Ridgewell
11ab3034b1 Ensure _.result calls deep function with correct context. 2015-03-29 08:07:36 -07:00
Justin Ridgewell
c594bda77f Simplify getProperty and friends. 2015-03-29 00:07:13 -07:00
jdalton
8218b74fb3 Remove propertyDeep, propertyDeepOf, and resultDeep in favor of deep property path support in existing methods. 2015-03-28 13:16:16 -07:00
Joshua Piccari
3d0beb1a2e Add _.propertyDeep and _.propertyDeepOf. 2015-03-28 09:54:40 -07:00
Joshua Piccari
515cfd48d8 Add _.resultDeep. 2015-03-28 09:48:55 -07:00
jdalton
1448bab5b3 Clear func in function created by _.before without requiring an additional call. [closes #1088] 2015-03-28 00:39:04 -07:00
jdalton
2884f8acb8 Ensure _.intersection of a single array returns an empty array. [closes #1085] 2015-03-26 13:17:41 -07:00
jdalton
075cae4efb Use basePullAt in _.remove. 2015-03-26 09:03:29 -07:00
Justin Ridgewell
d2b98323dd Don't mutate array during #remove. [closes #1079] 2015-03-26 09:02:55 -07:00
jdalton
b1a81a85b1 Add a test for _.remove and index params. 2015-03-26 07:29:36 -07:00
jdalton
668384649a Change "Iterator" typo to "Iteratee" in docs. [ci skip] 2015-03-26 07:29:36 -07:00
jdalton
a7252b1a7f Bump to v3.6.0. 2015-03-24 22:41:59 -07:00
jdalton
a4e58e4d55 Rebuild lodash and docs. 2015-03-24 22:41:53 -07:00
jdalton
4241e01364 Cleanup comment links. [ci skip] 2015-03-24 22:34:57 -07:00
jdalton
d7d7952138 Increase test coverage by modifying the source to hit the branch of getFuncName used for minified builds. 2015-03-24 20:15:33 -07:00
jdalton
9cc2253339 Add npm i step to contributing.md. [ci skip] 2015-03-24 08:15:32 -07:00
jdalton
6831802590 Rename predicate to iteratee in _.uniq, _.countBy, _.groupBy, _.indexBy, & _.map docs. [closes #1071] [ci skip] 2015-03-23 23:34:33 -07:00
jdalton
9d79cc7e87 Make _.deburr handle combining diacritical marks. [closes #1070] 2015-03-23 20:50:04 -07:00
jdalton
763b003a11 Add note about _.runInContext to _.mixin docs. [ci skip] 2015-03-23 20:04:13 -07:00
jdalton
d560e2a558 Remove unused bar reFuncName. 2015-03-23 19:58:25 -07:00
jdalton
f914f080b1 Simplify ctor check flag in equalObjects. 2015-03-23 09:24:55 -07:00
jdalton
600a4e86e1 Ensure _.matches and _.matchesProperty work with function value params. 2015-03-23 09:24:05 -07:00
jdalton
e7b4ada65f Add _.restParam test for functions with more than 3 params. 2015-03-23 09:06:45 -07:00
jdalton
95f31be096 Add doc blocks for getFuncName and isLaziable. [ci skip] 2015-03-23 09:01:19 -07:00
jdalton
ad6db7eaae Adjust object checks in baseIsMatch, baseMatches, baseMatchesProperty, & isMatch. 2015-03-22 23:44:11 -07:00
jdalton
d7a99c6618 Add _.matches and _.matchesProperty tests for inherited properties. 2015-03-22 00:45:36 -07:00
jdalton
f20d8f5cc0 Loosen _.matches to match objects with inherited properties. [closes #1067] 2015-03-21 23:33:19 -07:00
jdalton
8930e6b393 Add baseWhile and createBaseEach. 2015-03-21 22:07:19 -07:00
jdalton
f26886acb0 Add createSortedIndex. 2015-03-21 18:08:35 -07:00
jdalton
820ab8d486 Add test for _.escapeRegExp with eval and Function. 2015-03-21 11:43:18 -07:00
jdalton
8e425fb358 Tweak _.at and _.matchesProperty doc examples. [ci skip] 2015-03-21 10:01:46 -07:00
jdalton
6006f499ac Fix doc bugs in _.runInContext, _.thru, _.forEachRight, & _.escapeRegExp. [closes #1065] [ci skip] 2015-03-21 10:01:17 -07:00
Christopher Venning
3caa740fc4 Fixed errors in documentation examples for _.trim, _.matchesProperty, & _.property. [ci skip] 2015-03-21 08:53:49 -07:00
jdalton
007ea9ea20 Add length check test to _.flow & _.flowRight. 2015-03-20 23:49:31 -07:00
jdalton
5d248d261d Expand part of shortcut fusion test. 2015-03-20 23:22:36 -07:00
jdalton
26908cba64 Don't assume a lodash method will exist. 2015-03-20 15:15:06 -07:00
jdalton
18d118746e Add _.fill doc example. [ci skip] 2015-03-20 12:37:49 -07:00
jdalton
9a633f5f2e Update root detection in WeakMap and Set shims. 2015-03-20 12:01:37 -07:00
jdalton
5aa44e98d5 Fix rhino and other old environment test fail. 2015-03-20 12:00:29 -07:00
jdalton
33916fa975 No need to redeclare funcName in createFlow. 2015-03-20 11:49:18 -07:00
jdalton
eab18df403 Cleanup isLaziable and getFuncNames. 2015-03-20 09:24:56 -07:00
jdalton
002caceb05 Cleanup isXyz methods. 2015-03-20 09:24:13 -07:00
jdalton
c250aa804a Ensure _.merge correctly coerces objects to arrays. [closes #1061] 2015-03-19 08:58:56 -07:00
jdalton
94ca50883f Drop funcDecomp optimization in baseCallback and ensure shortcut fusion for _.flow and _.flowRight works in minified builds. 2015-03-19 08:40:45 -07:00
jdalton
462c482873 Add support for shortcut fusion to _.flow and _.flowRight. 2015-03-18 10:27:45 -07:00
jdalton
e28e04a990 Add freeSelf as a fallback for when freeWindow is unavailable. 2015-03-17 20:13:10 -07:00
Rocco Nicosia
6438385d64 Fix _.zipObject docs to more clearly demonstrate it as _.pairs inverse. [ci skip] 2015-03-17 16:50:00 -07:00
jdalton
bfb08ce003 Use opposite instead of inverse to describe _.propertyOf. [ci skip] 2015-03-17 16:49:30 -07:00
jdalton
3590a06f40 Update _.zipObject docs to tie into _.pairs. [ci skip] 2015-03-17 16:45:01 -07:00
jdalton
23ca6c5e10 Rename createPad to createPadding and cleanup docs of pad methods. 2015-03-17 15:57:12 -07:00
jdalton
1aea5bcd50 Finish adding comment blocks to creator function. [ci skip] 2015-03-17 13:54:33 -07:00
jdalton
82c5d8ed28 Rename createComposer to createFlow. 2015-03-17 10:27:52 -07:00
jdalton
5dcd58a75f Tweak _.findIndex docs and correct _.findKey docs. [ci skip] 2015-03-17 10:23:59 -07:00
jdalton
dc605a4ee1 More more docs for creator functions. [ci skip] 2015-03-17 10:23:26 -07:00
Justin Ridgewell
fec940ab8b Allocate proper size in in _.restParam.
Since we're putting `rest` at `start` index, `array.length; // => {start + 1}`
2015-03-17 08:50:41 -07:00
jdalton
05fd7cecf4 Add docs for baseSum and arraySum. [ci skip] 2015-03-17 08:48:21 -07:00
jdalton
2f52730b48 Use and consistently. [ci skip] 2015-03-17 08:44:51 -07:00
jdalton
4c1819c7dd Ensure _.sum provides the correct arguments when iterating an object. 2015-03-15 19:49:14 -07:00
jdalton
c58c0df30e Cleanup creator functions. 2015-03-15 17:12:33 -07:00
jdalton
c5902b3144 Cleanup _.sum. 2015-03-15 17:01:40 -07:00
qsona
519eb424e7 Documentation nits. [ci skip] 2015-03-15 14:57:53 -07:00
qsona
03478afea4 Add support for _.sum to take iteratee. 2015-03-15 14:57:13 -07:00
jdalton
306ef8addf Add creator functions. 2015-03-15 14:48:32 -07:00
jdalton
d4659b261d Add baseFindIndex. 2015-03-15 11:22:25 -07:00
jdalton
69ce41807a Add _.restParam. 2015-03-15 10:57:21 -07:00
jdalton
cc81da5aa4 Update Chrome version in saucelabs.js. 2015-03-14 00:14:21 -07:00
jdalton
eee714f52b Add iteratee guard to _.includes. 2015-03-13 13:39:14 -07:00
jdalton
c976b637d8 Adjust test descriptions to be more generic. 2015-03-13 12:33:19 -07:00
jdalton
ea93515d53 Add well-known symbols test for _.uniq. 2015-03-13 09:03:09 -07:00
jdalton
652499bdcf Cleanup sortedIndex test. 2015-03-13 08:51:56 -07:00
Benjamin Tan
819862199a Documentation: Rename predicate to iteratee.
Closes #1049.
[ci skip]
2015-03-13 08:43:05 -07:00
jdalton
6c1bc1d7bb Semicolons out colons in. [ci skip] 2015-03-13 08:43:00 -07:00
octref
36ebe76e0a Fix _.reduce doc 2015-03-13 08:39:10 -07:00
Benjamin Tan
8f8d35dec7 Simplify test/saucelabs.js.
Remove repeated assignment operations.
2015-03-13 19:29:39 +08:00
jdalton
ac1e436339 Simplify isCommon and isCombo checks in mergeData. 2015-03-13 00:12:51 -07:00
jdalton
78d4812b0e Whitespace nits. [ci skip] 2015-03-12 23:02:23 -07:00
jdalton
6a1b7626e3 Add NaN tests for _.indexOf and _.lastIndexOf with a fromIndex. 2015-03-12 22:42:02 -07:00
bryce-gibson
b6ccb4c96f Add example of alternative _.zipObject syntax. [ci skip] 2015-03-12 07:41:15 -07:00
jdalton
9712ac550c Set metadata for curried lazy lodash methods. 2015-03-11 23:41:41 -07:00
jdalton
5b173766c6 Add symbol tests for _.isObject and _.uniq. 2015-03-11 20:52:34 -07:00
jdalton
b535c4f321 Optimize _.reduce and _.reduceRight. 2015-03-11 11:40:51 -07:00
jdalton
56c5ebcb71 Ensure the result of _.difference is based on the values of the first param only. [#1038] 2015-03-10 21:31:46 -07:00
jdalton
028234ba86 Update guard info in _.reduce docs. [ci skip] 2015-03-10 09:21:38 -07:00
jdalton
f063b4d231 Add isIterateeCall guards to _.every and _.some. [closes #1035] 2015-03-10 09:21:01 -07:00
Teoman Soygul
508f27cc32 Fix _.property documentation typo. [ci skip] 2015-03-10 08:44:54 -07:00
jdalton
d4783170e5 Minor cleanup of setting __actions__ in _.mixin. 2015-03-09 08:33:19 -07:00
jdalton
51e459b386 Bump to v3.5.0. 2015-03-08 17:57:42 -07:00
jdalton
1253d254af Rebuild lodash and docs. 2015-03-08 17:57:22 -07:00
jdalton
5e70574396 Add parentheses and cleanup more complex code snippets. 2015-03-08 17:45:53 -07:00
jdalton
b5dce2f74b Optimize createBindWrapper, createPartialWrapper, and createHybridWrapper. 2015-03-08 01:00:04 -08:00
jdalton
6113da3e68 Remove unneeded tests. 2015-03-07 23:27:21 -08:00
jdalton
faf6406289 Ensure lazy drop when applied after filter works correctly. [closes #1026] 2015-03-07 23:20:26 -08:00
jdalton
7c443431d9 Add private guard param doc to _.sortByOrder. [ci skip] 2015-03-07 11:11:24 -08:00
jdalton
0f201e3fd8 Add more chaining tests join, replace, & split. 2015-03-07 00:30:42 -08:00
jdalton
bf96c30187 Cleanup string methods added to LodashWrapper. 2015-03-07 00:23:17 -08:00
octref
eb1b7b914a Add split and replace to LodashWrapper. [closes #1016] 2015-03-06 23:11:52 -08:00
octref
135bc2de52 Adjust _.sortByOrder doc example to better show effect. [ci skip] 2015-03-06 12:02:30 -08:00
jdalton
ab2269717d Bump to v3.4.0. 2015-03-06 00:55:11 -08:00
jdalton
b5a42cfa75 Rebuild lodash and docs. 2015-03-05 23:01:16 -08:00
jdalton
6693416d0a Tweak _.isEmpty and _.size docs. [ci skip] 2015-03-05 22:59:18 -08:00
jdalton
9cdf013933 Ensure length hit of for lazy eval is checked on initial lazy call. [closes #997] 2015-03-05 22:50:16 -08:00
jdalton
1dfaa30520 Add inRange and sortByOrder to lodash doc notes. [ci skip] 2015-03-05 08:27:51 -08:00
jdalton
d898fcee75 Simplify the root assignment. 2015-03-05 07:41:22 -08:00
jdalton
1e647a2058 Rename test module for consistency. 2015-03-04 08:43:37 -08:00
jdalton
10e379d862 Add _.sortByOrder tests. 2015-03-04 08:43:37 -08:00
jdalton
ee456493c4 Remove argument unrolling in LazyWrapper assignments. 2015-03-04 08:43:37 -08:00
jdalton
69e9c7d0be Expand _.defaults test for working with _.reduce. 2015-03-04 08:43:37 -08:00
jdalton
adce718d63 Another cleanup pass on createAssigner. 2015-03-04 08:43:37 -08:00
jdalton
3a94a65f12 Tweak root assignment to work with webpack in a web worker. [closes ##313] 2015-03-04 08:43:37 -08:00
jdalton
bbe30db1b7 Avoid test fails for npm builds. 2015-03-03 12:13:48 -08:00
jdalton
68f3c43805 Add createComposer to reduce the definition of _.flow and _.flowRight. 2015-03-03 11:40:24 -08:00
jdalton
3c99ecda60 Move more code out of the try-block in _.attempt. 2015-03-03 11:40:24 -08:00
jdalton
b1366696c4 Simplify guard check in _.sortByAll. 2015-03-03 11:40:24 -08:00
jdalton
534aeb4065 Use args alias of arguments in _.difference, _.pull, & _.memoize. 2015-03-03 11:40:24 -08:00
jdalton
cc77a36dd9 Cleanup createAssigner. 2015-03-03 11:40:17 -08:00
jdalton
5991068fdf Add more lazy chaining tests. 2015-03-03 09:22:59 -08:00
octref
913778d5ab Let createAssigner get correct customizer
When `_.defaults` is invoked using `_.reduce` / `_.reduceRight`
`createAssigner` discards the customizer, so the effect is
`_.assign` but not `_.defaults`

```
_.reduce([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "fred"}
_.reduceRight([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "barney"}

// Fixed
_.reduce([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "barney"}
_.reduceRight([{ 'user': 'barney' }, { 'user': 'fred' }], _.defaults)
// -> {user: "fred"}
```
2015-03-02 21:19:11 -08:00
h7lin
9a8345d4f9 Fix doc example in _.partition. [ci skip] 2015-03-02 20:25:29 -08:00
jdalton
ba9bd3bc76 Better match words with one character. [closes #1012] 2015-03-02 20:23:14 -08:00
jdalton
aad0070b77 Narrow new LodashWrapper to dropWhile. 2015-03-02 20:23:14 -08:00
jdalton
d192e69811 Break lazy chains before or . [closes #1011] 2015-03-02 09:19:05 -08:00
jdalton
ec8d919b93 Cleanup . 2015-03-02 09:17:16 -08:00
octref
4ce4f1d758 Add _.sortByOrder. 2015-03-01 14:04:00 -08:00
jdalton
3aa40d4df6 Simplify baseFlatten and always provide a fromIndex. 2015-03-01 01:22:38 -08:00
jdalton
ec1be41b62 Correct _.flatten benchmark. 2015-03-01 01:22:38 -08:00
jdalton
c15d81545a Update chalk in travis. 2015-03-01 01:22:38 -08:00
jdalton
1af8b9d16a Cleanup docs of _.flow, _.flowRight, _.defaults, _.range, _.inRange, & _.sum. [ci skip] 2015-02-28 21:12:10 -08:00
jdalton
d860cf834d Avoid testing the minified build on PRs in travis. 2015-02-28 19:18:38 -08:00
jdalton
63d5a3acbc Optimize baseIndexOf more consistently. 2015-02-28 12:42:14 -08:00
jdalton
132aacee89 Optimize lazy evaluation for 1 param. 2015-02-28 10:11:26 -08:00
jdalton
973038da6a Optimize baseIndexOf, indexOfNaN, and baseFlatten. 2015-02-27 21:43:30 -08:00
h7lin
584da3c39b Fix doc example in _.findLastIndex. [ci skip] 2015-02-27 19:56:12 -08:00
Mohsen Azimi
73c4829255 Escape the backtick in _.escape docs. [ci skip] 2015-02-27 19:56:06 -08:00
jdalton
68942f7ec4 Move _.max & _.min to Math category & make _.sum work on collections. 2015-02-27 09:20:57 -08:00
jdalton
e914b83a1b Add gitter badge to readme. [ci skip] [closes #983] 2015-02-27 08:26:09 -08:00
jdalton
2268376360 Update tested Firefox in saucelabs.js. 2015-02-26 19:41:22 -08:00
jdalton
6bb3b9a684 Disable lazy optimizations if the iteratee has more than one param. [closes #997] 2015-02-26 19:40:15 -08:00
jdalton
9f213c119c Add more chaining tests. 2015-02-25 23:35:16 -08:00
jdalton
f081e2b799 Cleanup _.sum tests. 2015-02-25 23:03:01 -08:00
jdalton
a024152c12 Add add and sum to lodash doc notes. [ci skip] 2015-02-25 23:01:50 -08:00
jdalton
42d23dbc70 Simplify _.sum. 2015-02-25 23:01:32 -08:00
John-David Dalton
74786e8a25 Merge pull request #987 from thejameskyle/math
Add math methods.
2015-02-25 19:00:06 -08:00
James Kyle
eeb4ede60d Add _.add/_.sum methods 2015-02-25 10:37:42 -08:00
Juliano Castilho
f2eee8896c Fix code example typo in _.dropRightWhile. [ci skip] 2015-02-25 00:19:53 -08:00
jdalton
bf4a70d91c Bump to v3.3.1. 2015-02-23 23:49:50 -08:00
jdalton
a35ab3937a Rebuild lodash and docs. 2015-02-23 23:49:40 -08:00
jdalton
5ef9a4be8a Ensure isIterateeCall doesn't error if index is an object without a toString method. [closes #994] 2015-02-23 23:48:49 -08:00
jdalton
d76d7582fe Simplify lazy filter, map, & takeWhile assignment. 2015-02-23 21:25:24 -08:00
jdalton
44006142c7 Ensure wait of _.debounce and _.throttle defaults to 0. [closes #991] 2015-02-23 08:28:20 -08:00
jdalton
6840b2cfe5 Consistent use of callCount variable. 2015-02-23 08:28:20 -08:00
jdalton
5613f60403 Ensure lazy takeWhile works with reverse and last`. [closes #990] 2015-02-23 02:05:09 -08:00
jdalton
76d3959f1a Use square in more places. 2015-02-23 01:26:07 -08:00
jdalton
b681759000 Remove unnecessary excused tests. 2015-02-23 00:35:24 -08:00
jdalton
d6336c4302 Fix code styling in _.template doc example. [ci skip] 2015-02-23 00:35:24 -08:00
jdalton
35b161450a Update benchmark and underscore vendor files. 2015-02-23 00:35:24 -08:00
jdalton
861aaf06c6 Optimize _.uniq and others in Firefox. 2015-02-23 00:35:23 -08:00
jdalton
a910884e7d Fix _.indexOf doc example typo. [closes #986] [ci skip] 2015-02-23 00:35:23 -08:00
Jarrett Meyer
0e7bef9014 Fixes missing single quotes in docs. [ci skip] 2015-02-23 00:35:23 -08:00
jdalton
d942189bc6 Bump to v3.3.0. 2015-02-23 00:35:23 -08:00
jdalton
eb16051b1e Rebuild lodash and docs. 2015-02-23 00:35:11 -08:00
jdalton
7749a7e41d Add gitter webhook to travis.yml. 2015-02-20 22:35:41 -08:00
jdalton
dc4cef17d4 Update ecstatic, istanbul, & sauce-tunnel in travis.yml. 2015-02-19 09:11:48 -08:00
jdalton
89ed40e4a4 Add _.merge. tests. 2015-02-19 00:14:59 -08:00
jdalton
10ee74d872 Cleanup clone tests. 2015-02-18 23:48:32 -08:00
jdalton
474ae1e91c Allow isDeep of _.clone to work with more truthy values. 2015-02-18 23:35:43 -08:00
jdalton
0dc70ca5f3 Semicolon nits. 2015-02-18 23:35:09 -08:00
jdalton
633b1663ca Tweak iteration methods test. 2015-02-18 23:22:03 -08:00
jdalton
153fe61b4b Avoid iterating strings in _.merge. [closes #978] 2015-02-18 21:05:39 -08:00
jdalton
9734fd0353 Increase _.merge test coverage. 2015-02-18 01:05:39 -08:00
jdalton
6209c120c0 Non-nits. 2015-02-18 01:03:53 -08:00
jdalton
3516881e7a Update tested Chrome in saucelabs.js. 2015-02-18 00:46:02 -08:00
jdalton
15398555b3 Ensure isIterateeCall works with NaN values. 2015-02-18 00:33:51 -08:00
jdalton
cb132fcbf4 Add more iteration method tests. 2015-02-18 00:03:50 -08:00
jdalton
f42f46c7d6 Adjust doc examples for smaller screens. [ci skip] 2015-02-17 10:08:38 -08:00
jdalton
f1046f1cf1 Consistent use of lodash when referencing a lodash wrapper. [ci skip] 2015-02-15 23:05:30 -08:00
jdalton
4a62287139 Cleanup baseLodash description. [ci skip] 2015-02-15 23:04:50 -08:00
jdalton
69cd56357f Tweak _.propertyOf usage example. [ci skip] 2015-02-15 22:42:16 -08:00
jdalton
b66a886682 Clarify _.noop docs. [ci skip] 2015-02-15 22:41:37 -08:00
jdalton
249504b7d6 Whitespace nits in docs. [ci skip] 2015-02-15 22:40:42 -08:00
jdalton
fa0086404d Add baseLodash. 2015-02-15 21:54:12 -08:00
Milos Zivadinovic
f243ebba91 Add _.inRange. 2015-02-15 18:01:05 -08:00
Austin Pray
540afb193b Fix type in _.some doc example. [closes #969] [ci skip] 2015-02-15 15:46:43 -08:00
jdalton
8294acdf1c Tweak null check tests of _.difference, _.intersection, _.union, & _.xor. 2015-02-15 00:37:18 -08:00
jdalton
7733d02938 Remove baseSlice from _.attempt. 2015-02-15 00:22:55 -08:00
jdalton
9b6342e7fa Add baseIsFunction. 2015-02-12 23:09:49 -08:00
jdalton
22c09cb31b Bump to v3.2.0. 2015-02-12 21:24:55 -08:00
jdalton
21e79cb54a Rebuild lodash and docs. 2015-02-12 21:24:48 -08:00
jdalton
b8cc829f4a Cleanup docs. [ci skip] 2015-02-12 21:13:45 -08:00
jdalton
ace0dacf15 Make baseMatches style consistent with baseMatchesProperty. 2015-02-12 20:18:26 -08:00
Graeme
5ca13098e3 Use predicate instead of iteratee. 2015-02-12 20:18:25 -08:00
jdalton
07b13eedec Cleanup _#plant and _.spread doc examples. [ci skip] 2015-02-12 12:47:54 -08:00
jdalton
d9168ed9ec Add proper jsdoc tags to _.fill. [ci skip] 2015-02-12 12:47:54 -08:00
jdalton
fb4e2c167c Add matchesProperty to lodash doc note. [ci skip] 2015-02-12 12:47:53 -08:00
jdalton
10ee3585f6 Fix spread doc and remove unused thisArg. 2015-02-12 01:59:16 -08:00
jdalton
5d4ba820dd Add _.matchesProperty shorthand tests. 2015-02-12 01:36:08 -08:00
jdalton
a51e00e69f Add _.matchesProperty tests. 2015-02-12 01:30:52 -08:00
jdalton
4dfa963851 Document "_.matchesProperty" shorthands. [ci skip] 2015-02-12 00:27:08 -08:00
jdalton
f2d4f6ccf6 Add _.matchesProperty. 2015-02-11 22:50:39 -08:00
jdalton
182cb8ab25 Simplify lazy pluck and where. 2015-02-11 22:50:22 -08:00
jdalton
ece341d868 Update android testing in saucelabs.js. 2015-02-11 20:25:25 -08:00
jdalton
d72e8c2687 Source cleanup from eslinting. 2015-02-11 20:25:13 -08:00
jdalton
b0ff6f4c7b Remove extraneous description from createAggregator docs. [ci skip] 2015-02-11 08:30:46 -08:00
jdalton
6ec5249492 Change intuitively to implicitly. 2015-02-11 08:29:41 -08:00
jdalton
c44cd76c5a Ensure commit and reverse track __chain__` settings. [closes #958] 2015-02-11 08:29:01 -08:00
jdalton
37f711d72a Adjust dep versions to better suite their range in package.json. 2015-02-11 00:15:11 -08:00
jdalton
fcf18fb965 Remove thisArg from _.spread. [closes #957] 2015-02-11 00:15:11 -08:00
jdalton
2efd6250fb Minor commit nit in test.js. [ci skip] 2015-02-11 00:15:11 -08:00
jdalton
1b4bd8523d Add _.slice assert. 2015-02-11 00:15:11 -08:00
jdalton
60c44910df Fix lazy slice when used after filter. [closes #955] 2015-02-11 00:15:03 -08:00
jdalton
faf67fae03 Update qunit to 1.17.1. 2015-02-10 20:16:27 -08:00
jdalton
e95f547950 Add doc notes on guarded methods. [ci skip] 2015-02-10 09:44:48 -08:00
jdalton
96b663b783 Ensure lazy slice handles floating-point start and end params. 2015-02-10 00:33:10 -08:00
jdalton
ce44f7e4b0 Add lazy compact and toArray. 2015-02-10 00:08:09 -08:00
jdalton
16a9c7d492 Improve label of unstable test. 2015-02-09 08:58:08 -08:00
jdalton
fc369c3448 Add _.fill and _.slice tests for default start and end params. 2015-02-09 08:39:09 -08:00
jdalton
b1a33edf0f Cleanup io.js testing in travis.yml. 2015-02-09 01:24:40 -08:00
jdalton
3b805f1a24 Rebuild lodash. 2015-02-09 01:14:55 -08:00
jdalton
954b4d8075 Add mutation note to _.fill docs. [ci skip] 2015-02-09 00:45:38 -08:00
jdalton
d073e2a881 Add _.fill to lodash docs. [ci skip] 2015-02-09 00:45:37 -08:00
jdalton
044dd2af94 Remove unneeded jsdoc Function type tags. [ci skip] 2015-02-09 00:45:37 -08:00
jdalton
ee489fa8c0 Cleanup tests. 2015-02-09 00:45:37 -08:00
jdalton
035ed5f49b Add _.fill. 2015-02-09 00:45:37 -08:00
jdalton
7dcd690f61 Add object test for _.max and _.min being used as an iteratee for _.map. 2015-02-09 00:45:37 -08:00
jdalton
1c9290aded Add _.includes, _.indexOf, _.lastIndexOf, _.map, _.mapValues, & a few other tests. 2015-02-09 00:45:37 -08:00
jdalton
0b922b1ed1 Move _.support tests to be in alphebetic API order. 2015-02-09 00:45:37 -08:00
jdalton
34eec362e5 Add methods to lodash docs. [ci skip] 2015-02-09 00:45:37 -08:00
jdalton
b829383864 Cleanup docs for _.callback. [ci skip] 2015-02-09 00:45:36 -08:00
jdalton
3960235428 Cleanup _.spread docs & tests. 2015-02-09 00:45:36 -08:00
Nicolas Chambrier
e91a662491 Add _.spread. 2015-02-09 00:45:36 -08:00
jdalton
ba4da24984 Add tests for arguments provided to callbacks of _.takeWhile and friends when in a lazy chain sequence. [closes #944] 2015-02-09 00:45:36 -08:00
jdalton
70378432b7 Minor cleanup of istanbul command in travis.yml. 2015-02-09 00:45:36 -08:00
jdalton
6b63009b14 Expand _.takeWhile, _.takeRightWhile, _.dropWhile, & _.dropRightWhile tests. 2015-02-09 00:45:36 -08:00
jdalton
dd45fea732 Add _#commit, _#plant, & _#run. 2015-02-09 00:45:36 -08:00
jdalton
ee09425cfb Simplify travis.yml. 2015-02-09 00:45:36 -08:00
jdalton
af02a1e024 Replace some _.isFunction checks with simple typeof checks and replace some typeof checks with _.isFunction checks based on likelihood of a problem value older enviros being passed. 2015-02-07 09:45:11 -08:00
jdalton
2a86f0776c Fix travis run. 2015-02-06 23:44:14 -08:00
jdalton
c6f73d9df8 Consistent apply(undefined, ...) use. 2015-02-06 23:14:03 -08:00
jdalton
5ab79f292b Allow _.attempt to provide additional arguments to func. [closes #929] 2015-02-06 23:09:52 -08:00
jdalton
82c7a22d27 Ensure _.flow and _.flowRight return an identity function when no arguments are provided. [closes #938] 2015-02-06 22:45:58 -08:00
jdalton
35fa977981 Update to Node.js 0.12 and simplify io.js install in travis.yml. 2015-02-06 21:57:08 -08:00
jdalton
ecbc46a91d Remove unused unshift variable. 2015-02-06 21:56:37 -08:00
jdalton
d2f6416e45 Add _.runInContext usage example to _.mixin docs. [ci skip] 2015-02-05 09:47:47 -08:00
jdalton
97a885a05c Use sauce-tunnel v2.1.1 to avoid hangs when closing tunnels. 2015-02-04 22:51:25 -08:00
jdalton
aa1edd6b94 Update tested io.js version in travis.yml. 2015-02-04 21:20:11 -08:00
jdalton
083e401717 Fix param doc typos in baseIsMatch, _.chunk, & _.isMatch. [ci skip] [closes #923] 2015-02-04 21:14:42 -08:00
jdalton
bdeca2edce Update .gitignore to ignore lodash.compat.min.js. [ci skip] 2015-02-04 21:14:42 -08:00
jdalton
c84e14db46 Bump to v3.1.0. 2015-02-04 21:14:42 -08:00
jdalton
919c5bd0b3 Rebuild lodash and docs. 2015-02-04 21:14:42 -08:00
jdalton
af8a8f1e3f Add spec note to isLength and update spec link for MAX_SAFE_INTEGER. [ci skip] 2015-02-04 21:14:42 -08:00
jdalton
41d08e123f Ensure isIterateeCall works correctly with objects. [closes #917] 2015-02-04 21:14:42 -08:00
jdalton
67d9656e35 Use baseProperty instead of _.property in more places. 2015-02-04 21:14:42 -08:00
jdalton
1a58a70494 Reduce deps on matches in favor of baseMatches. 2015-02-04 21:14:42 -08:00
jdalton
a477b2efd1 Add startCase to lodash docs. [ci skip] 2015-02-04 21:14:42 -08:00
jdalton
59c4546b8c Move _.startCase definition. 2015-02-04 21:14:42 -08:00
jdalton
ed1a75ef4c Add _.trunc test for floating-point lengths. 2015-02-04 21:14:42 -08:00
jdalton
0cd942f152 Cleanup case tests. 2015-02-04 21:14:41 -08:00
jdalton
fe7f082083 Cleanup case methods. 2015-02-04 21:14:41 -08:00
James Kyle
849fd71f76 Add _.startCase. 2015-02-04 21:14:41 -08:00
jdalton
4e3a72388d Add more lazy tests. 2015-02-04 21:14:41 -08:00
108 changed files with 17317 additions and 8066 deletions

2
.gitignore vendored
View File

@@ -2,5 +2,5 @@
*.custom.*
*.log
*.map
lodash.compat.js
lodash.compat.min.js
node_modules

View File

@@ -1,58 +1,72 @@
language: node_js
node_js:
- "0.10"
- "0.12"
env:
global:
- BIN="node" BUILD="compat" ISTANBUL=false NODE_BIN=$BIN OPTION=""
- IOJS_VERSION="v1.0.4" NPM_VERSION="^2.0.0" SAUCE_LABS=false SAUCE_USERNAME="lodash"
- PATTERN1="s|^.+?!support\.funcNames\b[\s\S]+?\.name\b[\s\S]+?\}\n||m"
- PATTERN2="s|\s*else\s*\{\s*iteratee\(index\);\s*\}||"
- BIN="node" BUILD="compat" ISTANBUL=false OPTION=""
- NPM_VERSION="^2.0.0" SAUCE_LABS=false SAUCE_USERNAME="lodash"
- secure: "tg1JFsIFnxzLaTboFPOnm+aJCuMm5+JdhLlESlqg9x3fwro++7KCnwHKLNovhchaPe4otC43ZMB/nfWhDnDm11dKbm/V6HlTkED+dadTsaLxVDg6J+7yK41QhokBPJOxLV78iDaNaAQVYEirAgZ0yn8kFubxmNKV+bpCGQNc9yU="
matrix:
- BUILD="compat"
- BUILD="modern"
- BUILD="modern"
- BUILD="modern" ISTANBUL=true
- BIN="iojs" BUILD="compat" NODE_BIN=$BIN
- BIN="iojs" BUILD="modern" NODE_BIN=$BIN
- BIN="phantomjs"
- BIN="rhino"
- BIN="rhino" OPTION="-require"
- BIN="rhino" OPTION="-opt -1"
- BIN="rhino" OPTION="-opt -1 -require"
- BIN="ringo"
matrix:
include:
- node_js: "io.js"
env:
- node_js: "io.js"
env: BUILD="modern"
- node_js: "0.8"
env: NPM_VERSION="~1.4.0"
- node_js: "0.8"
env: BUILD="modern" NPM_VERSION="~1.4.0"
- node_js: "0.10"
env: SAUCE_LABS=true
env:
- node_js: "0.10"
env: BUILD="modern"
- node_js: "0.12"
env: SAUCE_LABS=true
- node_js: "0.12"
env: SAUCE_LABS=true BUILD="modern"
git:
depth: 10
branches:
only:
- master
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/4aab6358b0e9aed0b628
on_success: change
on_failure: always
before_install:
- "nvm use $TRAVIS_NODE_VERSION"
- "npm config set loglevel error"
- "npm i -g npm@\"$NPM_VERSION\""
- "[ $SAUCE_LABS == false ] || npm i chalk@\"0.5.1\" ecstatic@\"0.5.8\" request@\"^2.0.0\" sauce-tunnel@\"^2.0.0\""
- "[ $ISTANBUL == false ] || (npm i -g coveralls@\"^2.0.0\" && npm i istanbul@\"0.3.5\")"
- "[ $BIN != 'iojs' ] || (wget https://iojs.org/dist/${IOJS_VERSION}/iojs-${IOJS_VERSION}-linux-x64.tar.xz && sudo tar xJf iojs-${IOJS_VERSION}-linux-x64.tar.xz -C /opt && rm iojs-${IOJS_VERSION}-linux-x64.tar.xz)"
- "[ $BIN != 'iojs' ] || (sudo ln -s /opt/iojs-${IOJS_VERSION}-linux-x64/bin/iojs /usr/local/bin/iojs && sudo chmod +x $_)"
- "[ $BIN != 'rhino' ] || (sudo mkdir /opt/rhino-1.7R5 && sudo wget --no-check-certificate -O $_/js.jar https://lodash.com/_travis/rhino-1.7R5.jar)"
- "[ $BIN != 'rhino' ] || (echo -e '#!/bin/sh\\njava -jar /opt/rhino-1.7R5/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino)"
- "[ $SAUCE_LABS == false ] || npm i chalk@\"^1.0.0\" ecstatic@\"0.7.6\" request@\"^2.0.0\" sauce-tunnel@\"2.2.3\""
- "[ $ISTANBUL == false ] || (npm i -g coveralls@\"^2.0.0\" && npm i istanbul@\"0.3.14\")"
- "[ $BIN != 'rhino' ] || (sudo mkdir /opt/rhino-1.7.6 && sudo wget --no-check-certificate -O $_/js.jar https://lodash.com/_travis/rhino-1.7.6.jar)"
- "[ $BIN != 'rhino' ] || (echo -e '#!/bin/sh\\njava -jar /opt/rhino-1.7.6/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino)"
- "[ $BIN != 'ringo' ] || (wget --no-check-certificate https://lodash.com/_travis/ringojs-0.11.zip && sudo unzip ringojs-0.11 -d /opt && rm ringojs-0.11.zip)"
- "[ $BIN != 'ringo' ] || (sudo ln -s /opt/ringojs-0.11/bin/ringo /usr/local/bin/ringo && sudo chmod +x $_)"
- "sed -i'' 's|\"lodash\"|\"lodash-compat\"|' ./package.json"
- "perl -pi -e 's|\"lodash\"|\"lodash-compat\"|' ./package.json"
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli.git ./node_modules/lodash-cli && mkdir $_/node_modules && cd $_ && ln -s ../../../ ./lodash-compat && cd ../ && npm i && cd ../../"
- "$NODE_BIN ./node_modules/lodash-cli/bin/lodash $BUILD -o ./lodash.$BUILD.js"
- "node ./node_modules/lodash-cli/bin/lodash $BUILD -o ./lodash.$BUILD.js"
script:
- "[ $ISTANBUL == false ] || (nvm install 0.11.11 && cp ./lodash.$BUILD.js ./lodash.js && $BIN --harmony ./node_modules/istanbul/lib/cli.js cover -x \"**/vendor/**\" --report lcovonly ./test/test.js -- ./lodash.js)"
- "([ $ISTANBUL == true ] && [ $TRAVIS_SECURE_ENV_VARS == true ] && nvm use $TRAVIS_NODE_VERSION && cat ./coverage/lcov.info | coveralls) || true"
- "[ $ISTANBUL == false ] || cp ./lodash.$BUILD.js ./lodash.js"
- "[ $ISTANBUL == false ] || perl -0pi -e \"$PATTERN1\" ./lodash.js && perl -0pi -e \"$PATTERN2\" $_"
- "[ $ISTANBUL == false ] || node ./node_modules/istanbul/lib/cli.js cover -x \"**/vendor/**\" --report lcovonly ./test/test.js -- ./lodash.js"
- "[ $ISTANBUL == false ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || (cat ./coverage/lcov.info | coveralls)"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || cd ./test"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || $BIN $OPTION ./test.js ../lodash.$BUILD.js"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || $BIN $OPTION ./test.js ../lodash.$BUILD.min.js"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || $BIN $OPTION ./test.js ../lodash.$BUILD.min.js"
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.js&noglobals=true\" tags=\"$BUILD,development\""
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.min.js&noglobals=true\" tags=\"$BUILD,production\""
- "[ $SAUCE_LABS == false ] || [ $BUILD != 'compat' ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.js\" tags=\"$BUILD,development,ie-compat\" compatMode=7"

View File

@@ -8,7 +8,9 @@ Please make sure to [search the issue tracker](https://github.com/lodash/lodash/
Include updated unit tests in the `test` directory as part of your pull request.
Dont worry about regenerating the documentation, lodash.js, or lodash.min.js.
You can run the tests from the command line via `node test/test`, or open `test/index.html` in a web browser.
Before running the unit tests youll need to install, `npm i`, [development dependencies](https://docs.npmjs.com/files/package.json#devdependencies).
Run unit tests from the command-line via `node test/test`, or open `test/index.html` in a web browser.
The `test/run-test.sh` script attempts to run the tests in [Rhino](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino), [RingoJS](http://ringojs.org/), [PhantomJS](http://phantomjs.org/), & [Node](http://nodejs.org/), before running them in your default browser.
The [Backbone](http://backbonejs.org/) & [Underscore](http://underscorejs.org/) test suites are included as well.

View File

@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining

View File

@@ -1,4 +1,4 @@
# lodash v3.0.1
# lodash v3.9.0
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) with packages for [Bower](http://bower.io/), [Component](http://component.github.io/), & [Volo](http://volojs.org/).
@@ -7,13 +7,17 @@ Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
$ lodash modern -o ./lodash.js
```
## Community
[![Join the chat at https://gitter.im/lodash/lodash](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/lodash/lodash)
## Module formats
lodash is also available in a variety of other builds & module formats.
* npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds
* AMD modules for [modern](https://github.com/lodash/lodash/tree/3.0.1-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.0.1-amd) builds
* ES modules for the [modern](https://github.com/lodash/lodash/tree/3.0.1-es) build
* AMD modules for [modern](https://github.com/lodash/lodash/tree/3.9.0-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.9.0-amd) builds
* ES modules for the [modern](https://github.com/lodash/lodash/tree/3.9.0-es) build
## Further Reading

View File

@@ -1,6 +1,6 @@
{
"name": "lodash",
"version": "3.0.1",
"version": "3.9.0",
"main": "lodash.js",
"ignore": [
".*",

View File

@@ -1,7 +1,7 @@
{
"name": "lodash",
"repo": "lodash/lodash",
"version": "3.0.1",
"version": "3.9.0",
"description": "The modern build of lodash.",
"license": "MIT",
"main": "lodash.js",

File diff suppressed because it is too large Load Diff

5637
lodash.js

File diff suppressed because it is too large Load Diff

175
lodash.min.js vendored
View File

@@ -1,85 +1,98 @@
/**
* @license
* lodash 3.0.1 (Custom Build) lodash.com/license | Underscore.js 1.7.0 underscorejs.org/LICENSE
* lodash 3.9.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* Build: `lodash modern -o ./lodash.js`
*/
;(function(){function n(n,t){if(n!==t){var r=n===n,e=t===t;if(n>t||!r||typeof n=="undefined"&&e)return 1;if(n<t||!e||typeof t=="undefined"&&r)return-1}return 0}function t(n,t,r){if(t!==t)return p(n,r);r=(r||0)-1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function r(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function e(n){return typeof n=="string"?n:null==n?"":n+""}function u(n){return n.charCodeAt(0)}function o(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););return r
}function i(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function a(t,r){return n(t.a,r.a)||t.b-r.b}function f(t,r){for(var e=-1,u=t.a,o=r.a,i=u.length;++e<i;){var a=n(u[e],o[e]);if(a)return a}return t.b-r.b}function l(n){return Wt[n]}function c(n){return Nt[n]}function s(n){return"\\"+Lt[n]}function p(n,t,r){var e=n.length;for(t=r?t||e:(t||0)-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function h(n){return n&&typeof n=="object"||false}function g(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)
}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]=B,o[++u]=r);return o}function d(n){for(var t=-1,r=n.length;++t<r&&g(n.charCodeAt(t)););return t}function y(n){for(var t=n.length;t--&&g(n.charCodeAt(t)););return t}function _(n){return Ft[n]}function m(g){function Wt(n){if(h(n)&&!To(n)){if(n instanceof Nt)return n;if(Nu.call(n,"__wrapped__"))return new Nt(n.__wrapped__,n.__chain__,zt(n.__actions__))}return new Nt(n)}function Nt(n,t,r){this.__actions__=r||[],this.__chain__=!!t,this.__wrapped__=n
}function Ft(n){this.actions=null,this.dir=1,this.dropCount=0,this.filtered=false,this.iteratees=null,this.takeCount=co,this.views=null,this.wrapped=n}function Ut(){this.__data__={}}function Lt(n){var t=n?n.length:0;for(this.data={hash:no(null),set:new Yu};t--;)this.push(n[t])}function Bt(n,t){var r=n.data;return(typeof t=="string"||Ge(t)?r.set.has(t):r.hash[t])?0:-1}function zt(n,t){var r=-1,e=n.length;for(t||(t=mu(e));++r<e;)t[r]=n[r];return t}function Mt(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););return n
}function qt(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Pt(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function Kt(n,t){for(var r=-1,e=n.length,u=mu(e);++r<e;)u[r]=t(n[r],r,n);return u}function Vt(n){for(var t=-1,r=n.length,e=lo;++t<r;){var u=n[t];u>e&&(e=u)}return e}function Yt(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function Zt(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);
return r}function Gt(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;return false}function Jt(n,t){return typeof n=="undefined"?t:n}function Xt(n,t,r,e){return typeof n!="undefined"&&Nu.call(e,r)?n:t}function Ht(n,t,r){var e=Fo(t);if(!r)return nr(t,n,e);for(var u=-1,o=e.length;++u<o;){var i=e[u],a=n[i],f=r(a,t[i],i,n,t);(f===f?f===a:a!==a)&&(typeof a!="undefined"||i in n)||(n[i]=f)}return n}function Qt(n,t){for(var r=-1,e=n.length,u=ue(e),o=t.length,i=mu(o);++r<o;){var a=t[r];u?(a=parseFloat(a),i[r]=re(a,e)?n[a]:b):i[r]=n[a]
}return i}function nr(n,t,r){r||(r=t,t={});for(var e=-1,u=r.length;++e<u;){var o=r[e];t[o]=n[o]}return t}function tr(n,t,r){var e=typeof n;if("function"==e){if(e=typeof t!="undefined"){var e=Wt.support,u=!(e.funcNames?n.name:e.funcDecomp);if(!u){var o=Su.call(n);e.funcNames||(u=!_t.test(o)),u||(u=kt.test(o)||Je(n),bo(n,u))}e=u}n=e?Wr(n,t,r):n}else n=null==n?gu:"object"==e?wr(n,!r):Ar(n+"");return n}function rr(n,t,r,e,u,o,i){var a;if(r&&(a=u?r(n,e,u):r(n)),typeof a!="undefined")return a;if(!Ge(n))return n;
if(e=To(n)){if(a=Qr(n),!t)return zt(n,a)}else{var f=Uu.call(n),l=f==K;if(f!=Y&&f!=z&&(!l||u))return Tt[f]?te(n,f,t):u?n:{};if(a=ne(l?{}:n),!t)return nr(n,a,Fo(n))}for(o||(o=[]),i||(i=[]),u=o.length;u--;)if(o[u]==n)return i[u];return o.push(n),i.push(a),(e?Mt:gr)(n,function(e,u){a[u]=rr(e,t,r,u,n,o,i)}),a}function er(n,t,r,e){if(!Ze(n))throw new Iu($);return Zu(function(){n.apply(b,Er(r,e))},t)}function ur(n,r){var e=n?n.length:0,u=[];if(!e)return u;var o=-1,i=Hr(),a=i==t,f=a&&200<=r.length&&wo(r),l=r.length;
f&&(i=Bt,a=false,r=f);n:for(;++o<e;)if(f=n[o],a&&f===f){for(var c=l;c--;)if(r[c]===f)continue n;u.push(f)}else 0>i(r,f)&&u.push(f);return u}function or(n,t){var r=n?n.length:0;if(!ue(r))return gr(n,t);for(var e=-1,u=se(n);++e<r&&false!==t(u[e],e,u););return n}function ir(n,t){var r=n?n.length:0;if(!ue(r))return vr(n,t);for(var e=se(n);r--&&false!==t(e[r],r,e););return n}function ar(n,t){var r=true;return or(n,function(n,e,u){return r=!!t(n,e,u)}),r}function fr(n,t){var r=[];return or(n,function(n,e,u){t(n,e,u)&&r.push(n)
}),r}function lr(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function cr(n,t,r,e){e=(e||0)-1;for(var u=n.length,o=-1,i=[];++e<u;){var a=n[e];if(h(a)&&ue(a.length)&&(To(a)||Ke(a))){t&&(a=cr(a,t,r));var f=-1,l=a.length;for(i.length+=l;++f<l;)i[++o]=a[f]}else r||(i[++o]=a)}return i}function sr(n,t,r){var e=-1,u=se(n);r=r(n);for(var o=r.length;++e<o;){var i=r[e];if(false===t(u[i],i,u))break}return n}function pr(n,t,r){var e=se(n);r=r(n);for(var u=r.length;u--;){var o=r[u];
if(false===t(e[o],o,e))break}return n}function hr(n,t){sr(n,t,eu)}function gr(n,t){return sr(n,t,Fo)}function vr(n,t){return pr(n,t,Fo)}function dr(n,t){for(var r=-1,e=t.length,u=-1,o=[];++r<e;){var i=t[r];Ze(n[i])&&(o[++u]=i)}return o}function yr(n,t,r){var e=-1,u=typeof t=="function",o=n?n.length:0,i=ue(o)?mu(o):[];return or(n,function(n){var o=u?t:null!=n&&n[t];i[++e]=o?o.apply(n,r):b}),i}function _r(n,t,r,e,u,o){if(n===t)return 0!==n||1/n==1/t;var i=typeof n,a=typeof t;if("function"!=i&&"object"!=i&&"function"!=a&&"object"!=a||null==n||null==t)n=n!==n&&t!==t;
else n:{var i=_r,a=To(n),f=To(t),l=D,c=D;a||(l=Uu.call(n),l==z?l=Y:l!=Y&&(a=nu(n))),f||(c=Uu.call(t),c==z?c=Y:c!=Y&&nu(t));var s=l==Y,f=c==Y,c=l==c;if(!c||a||s)if(l=s&&Nu.call(n,"__wrapped__"),f=f&&Nu.call(t,"__wrapped__"),l||f)n=i(l?n.value():n,f?t.value():t,r,e,u,o);else if(c){for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n){n=o[l]==t;break n}u.push(n),o.push(t),n=(a?Yr:Gr)(n,t,i,r,e,u,o),u.pop(),o.pop()}else n=false;else n=Zr(n,t,l)}return n}function mr(n,t,r,e,u){var o=t.length;if(null==n)return!o;
for(var i=-1,a=!u;++i<o;)if(a&&e[i]?r[i]!==n[t[i]]:!Nu.call(n,t[i]))return false;for(i=-1;++i<o;){var f=t[i];if(a&&e[i])f=Nu.call(n,f);else{var l=n[f],c=r[i],f=u?u(l,c,f):b;typeof f=="undefined"&&(f=_r(c,l,u,true))}if(!f)return false}return true}function br(n,t){var r=[];return or(n,function(n,e,u){r.push(t(n,e,u))}),r}function wr(n,t){var r=Fo(n),e=r.length;if(1==e){var u=r[0],o=n[u];if(oe(o))return function(n){return null!=n&&o===n[u]&&Nu.call(n,u)}}t&&(n=rr(n,true));for(var i=mu(e),a=mu(e);e--;)o=n[r[e]],i[e]=o,a[e]=oe(o);
return function(n){return mr(n,r,i,a)}}function xr(n,t,r,e,u){var o=ue(t.length)&&(To(t)||nu(t));return(o?Mt:gr)(t,function(t,i,a){if(h(t)){e||(e=[]),u||(u=[]);n:{t=e;for(var f=u,l=t.length,c=a[i];l--;)if(t[l]==c){n[i]=f[l],i=void 0;break n}l=n[i],a=r?r(l,c,i,n,a):b;var s=typeof a=="undefined";s&&(a=c,ue(c.length)&&(To(c)||nu(c))?a=To(l)?l:l?zt(l):[]:Wo(c)||Ke(c)?a=Ke(l)?tu(l):Wo(l)?l:{}:s=false),t.push(c),f.push(a),s?n[i]=xr(a,c,r,t,f):(a===a?a!==l:l===l)&&(n[i]=a),i=void 0}return i}f=n[i],a=r?r(f,t,i,n,a):b,(c=typeof a=="undefined")&&(a=t),!o&&typeof a=="undefined"||!c&&(a===a?a===f:f!==f)||(n[i]=a)
}),n}function Ar(n){return function(t){return null==t?b:t[n]}}function jr(n,t){return n+qu(fo()*(t-n+1))}function kr(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function Er(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r=typeof r=="undefined"||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=mu(u);++e<u;)r[e]=n[e+t];return r}function Rr(n,t){var r;return or(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function Ir(n,r){var e=-1,u=Hr(),o=n.length,i=u==t,a=i&&200<=o,f=a&&wo(),l=[];
f?(u=Bt,i=false):(a=false,f=r?[]:l);n:for(;++e<o;){var c=n[e],s=r?r(c,e,n):c;if(i&&c===c){for(var p=f.length;p--;)if(f[p]===s)continue n;r&&f.push(s),l.push(c)}else 0>u(f,s)&&((r||a)&&f.push(s),l.push(c))}return l}function Or(n,t){for(var r=-1,e=t.length,u=mu(e);++r<e;)u[r]=n[t[r]];return u}function Cr(n,t){var r=n;r instanceof Ft&&(r=r.value());for(var e=-1,u=t.length;++e<u;){var r=[r],o=t[e];Ku.apply(r,o.args),r=o.func.apply(o.thisArg,r)}return r}function Tr(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=ho){for(;e<u;){var o=e+u>>>1,i=n[o];
(r?i<=t:i<t)?e=o+1:u=o}return u}return Sr(n,t,gu,r)}function Sr(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,a=typeof t=="undefined";u<o;){var f=qu((u+o)/2),l=r(n[f]),c=l===l;(i?c||e:a?c&&(e||typeof l!="undefined"):e?l<=t:l<t)?u=f+1:o=f}return uo(o,po)}function Wr(n,t,r){if(typeof n!="function")return gu;if(typeof t=="undefined")return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)
};case 5:return function(r,e,u,o,i){return n.call(t,r,e,u,o,i)}}return function(){return n.apply(t,arguments)}}function Nr(n){return zu.call(n,0)}function Fr(n,t,r){for(var e=r.length,u=-1,o=eo(n.length-e,0),i=-1,a=t.length,f=mu(o+a);++i<a;)f[i]=t[i];for(;++u<e;)f[r[u]]=n[u];for(;o--;)f[i++]=n[u++];return f}function Ur(n,t,r){for(var e=-1,u=r.length,o=-1,i=eo(n.length-u,0),a=-1,f=t.length,l=mu(i+f);++o<i;)l[o]=n[o];for(i=o;++a<f;)l[i+a]=t[a];for(;++e<u;)l[i+r[e]]=n[o++];return l}function Lr(n,t){return function(r,e,u){var o=t?t():{};
if(e=Xr(e,u,3),To(r)){u=-1;for(var i=r.length;++u<i;){var a=r[u];n(o,a,e(a,u,r),r)}}else or(r,function(t,r,u){n(o,t,e(t,r,u),u)});return o}}function $r(n){return function(){var t=arguments.length,r=arguments[0];if(2>t||null==r)return r;if(3<t&&ee(arguments[1],arguments[2],arguments[3])&&(t=2),3<t&&"function"==typeof arguments[t-2])var e=Wr(arguments[--t-1],arguments[t--],5);else 2<t&&"function"==typeof arguments[t-1]&&(e=arguments[--t]);for(var u=0;++u<t;){var o=arguments[u];o&&n(r,o,e)}return r}
}function Br(n,t){function r(){return(this instanceof r?e:n).apply(t,arguments)}var e=Dr(n);return r}function zr(n){return function(t){var r=-1;t=cu(ou(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Dr(n){return function(){var t=mo(n.prototype),r=n.apply(t,arguments);return Ge(r)?r:t}}function Mr(n,t){return function(r,e,o){o&&ee(r,e,o)&&(e=null);var i=Xr(),a=null==e;if(i===tr&&a||(a=false,e=i(e,o,3)),a){if(e=To(r),e||!Qe(r))return n(e?r:ce(r));e=u}return Jr(r,e,t)}}function qr(n,t,r,e,u,o,i,a,f,l){function c(){for(var w=arguments.length,j=w,k=mu(w);j--;)k[j]=arguments[j];
if(e&&(k=Fr(k,e,u)),o&&(k=Ur(k,o,i)),g||y){var j=c.placeholder,E=v(k,j),w=w-E.length;if(w<l){var O=a?zt(a):null,w=eo(l-w,0),C=g?E:null,E=g?null:E,T=g?k:null,k=g?null:k;return t|=g?R:I,t&=~(g?I:R),d||(t&=~(x|A)),k=qr(n,t,r,T,C,k,E,O,f,w),k.placeholder=j,k}}if(j=p?r:this,h&&(n=j[m]),a)for(O=k.length,w=uo(a.length,O),C=zt(k);w--;)E=a[w],k[w]=re(E,O)?C[E]:b;return s&&f<k.length&&(k.length=f),(this instanceof c?_||Dr(n):n).apply(j,k)}var s=t&C,p=t&x,h=t&A,g=t&k,d=t&j,y=t&E,_=!h&&Dr(n),m=n;return c}function Pr(n,t,r){return n=n.length,t=+t,n<t&&to(t)?(t-=n,r=null==r?" ":r+"",fu(r,Du(t/r.length)).slice(0,t)):""
}function Kr(n,t,r,e){function u(){for(var t=-1,a=arguments.length,f=-1,l=e.length,c=mu(a+l);++f<l;)c[f]=e[f];for(;a--;)c[f++]=arguments[++t];return(this instanceof u?i:n).apply(o?r:this,c)}var o=t&x,i=Dr(n);return u}function Vr(n,t,r,e,u,o,i,a){var f=t&A;if(!f&&!Ze(n))throw new Iu($);var l=e?e.length:0;if(l||(t&=~(R|I),e=u=null),l-=u?u.length:0,t&I){var c=e,s=u;e=u=null}var p=!f&&xo(n);if(r=[n,t,r,e,u,c,s,o,i,a],p&&true!==p){e=r[1],t=p[1],a=e|t,o=C|O,u=x|A,i=o|u|j|E;var c=e&C&&!(t&C),s=e&O&&!(t&O),h=(s?r:p)[7],g=(c?r:p)[8];
o=a>=o&&a<=i&&(e<O||(s||c)&&h.length<=g),(!(e>=O&&t>u||e>u&&t>=O)||o)&&(t&x&&(r[2]=p[2],a|=e&x?0:j),(e=p[3])&&(u=r[3],r[3]=u?Fr(u,e,p[4]):zt(e),r[4]=u?v(r[3],B):zt(p[4])),(e=p[5])&&(u=r[5],r[5]=u?Ur(u,e,p[6]):zt(e),r[6]=u?v(r[5],B):zt(p[6])),(e=p[7])&&(r[7]=zt(e)),t&C&&(r[8]=null==r[8]?p[8]:uo(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=a),t=r[1],a=r[9]}return r[9]=null==a?f?0:n.length:eo(a-l,0)||0,(p?bo:Ao)(t==x?Br(r[0],r[2]):t!=R&&t!=(x|R)||r[4].length?qr.apply(null,r):Kr.apply(null,r),r)
}function Yr(n,t,r,e,u,o,i){var a=-1,f=n.length,l=t.length,c=true;if(f!=l&&(!u||l<=f))return false;for(;c&&++a<f;){var s=n[a],p=t[a],c=b;if(e&&(c=u?e(p,s,a):e(s,p,a)),typeof c=="undefined")if(u)for(var h=l;h--&&(p=t[h],!(c=s&&s===p||r(s,p,e,u,o,i))););else c=s&&s===p||r(s,p,e,u,o,i)}return!!c}function Zr(n,t,r){switch(r){case M:case q:return+n==+t;case P:return n.name==t.name&&n.message==t.message;case V:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case Z:case G:return n==t+""}return false}function Gr(n,t,r,e,u,o,i){var a=Fo(n),f=a.length,l=Fo(t).length;
if(f!=l&&!u)return false;for(var c,l=-1;++l<f;){var s=a[l],p=Nu.call(t,s);if(p){var h=n[s],g=t[s],p=b;e&&(p=u?e(g,h,s):e(h,g,s)),typeof p=="undefined"&&(p=h&&h===g||r(h,g,e,u,o,i))}if(!p)return false;c||(c="constructor"==s)}return c||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false}function Jr(n,t,r){var e=r?co:lo,u=e,o=u;return or(n,function(n,i,a){i=t(n,i,a),((r?i<u:i>u)||i===e&&i===o)&&(u=i,o=n)
}),o}function Xr(n,t,r){var e=Wt.callback||pu,e=e===pu?tr:e;return r?e(n,t,r):e}function Hr(n,r,e){var u=Wt.indexOf||de,u=u===de?t:u;return n?u(n,r,e):u}function Qr(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Nu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function ne(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=ku),new n}function te(n,t,r){var e=n.constructor;switch(t){case J:return Nr(n);case M:case q:return new e(+n);case X:case H:case Q:case nt:case tt:case rt:case et:case ut:case ot:return t=n.buffer,new e(r?Nr(t):t,n.byteOffset,n.length);
case V:case G:return new e(n);case Z:var u=new e(n.source,yt.exec(n));u.lastIndex=n.lastIndex}return u}function re(n,t){return n=+n,t=null==t?vo:t,-1<n&&0==n%1&&n<t}function ee(n,t,r){if(!Ge(r))return false;var e=typeof t;return"number"==e?(e=r.length,e=ue(e)&&re(t,e)):e="string"==e&&t in n,e&&r[t]===n}function ue(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=vo}function oe(n){return n===n&&(0===n?0<1/n:!Ge(n))}function ie(n,t){n=se(n);for(var r=-1,e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])
}return u}function ae(n,t){var r={};return hr(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function fe(n){var t;if(!h(n)||Uu.call(n)!=Y||!(Nu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return hr(n,function(n,t){r=t}),typeof r=="undefined"||Nu.call(n,r)}function le(n){for(var t=eu(n),r=t.length,e=r&&n.length,u=Wt.support,u=e&&ue(e)&&(To(n)||u.nonEnumArgs&&Ke(n)),o=-1,i=[];++o<r;){var a=t[o];(u&&re(a,e)||Nu.call(n,a))&&i.push(a)}return i}function ce(n){return null==n?[]:ue(n.length)?Ge(n)?n:ku(n):uu(n)
}function se(n){return Ge(n)?n:ku(n)}function pe(n,t,r){return n&&n.length?((r?ee(n,t,r):null==t)&&(t=1),Er(n,0>t?0:t)):[]}function he(n,t,r){var e=n?n.length:0;return e?((r?ee(n,t,r):null==t)&&(t=1),t=e-(+t||0),Er(n,0,0>t?0:t)):[]}function ge(n,t,r){var e=-1,u=n?n.length:0;for(t=Xr(t,r,3);++e<u;)if(t(n[e],e,n))return e;return-1}function ve(n){return n?n[0]:b}function de(n,r,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?eo(u+e,0):e||0;else if(e)return e=Tr(n,r),n=n[e],(r===r?r===n:n!==n)?e:-1;
return t(n,r,e)}function ye(n){return pe(n,1)}function _e(n,r,e,u){if(!n||!n.length)return[];typeof r!="boolean"&&null!=r&&(u=e,e=ee(n,r,u)?null:r,r=false);var o=Xr();if((o!==tr||null!=e)&&(e=o(e,u,3)),r&&Hr()==t){r=e;var i;e=-1,u=n.length;for(var o=-1,a=[];++e<u;){var f=n[e],l=r?r(f,e,n):f;e&&i===l||(i=l,a[++o]=f)}n=a}else n=Ir(n,e);return n}function me(n){for(var t=-1,r=(n&&n.length&&Vt(Kt(n,Wu)))>>>0,e=mu(r);++t<r;)e[t]=Kt(n,Ar(t));return e}function be(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||To(n[0])||(t=[]);++r<e;){var o=n[r];
t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function we(n){return n=Wt(n),n.__chain__=true,n}function xe(n,t,r){return t.call(r,n)}function Ae(n,t,r){var e=n?n.length:0;return ue(e)||(n=uu(n),e=n.length),e?(r=typeof r=="number"?0>r?eo(e+r,0):r||0:0,typeof n=="string"||!To(n)&&Qe(n)?r<e&&-1<n.indexOf(t,r):-1<Hr(n,t,r)):false}function je(n,t,r){var e=To(n)?qt:ar;return(typeof t!="function"||typeof r!="undefined")&&(t=Xr(t,r,3)),e(n,t)}function ke(n,t,r){var e=To(n)?Pt:fr;return t=Xr(t,r,3),e(n,t)}function Ee(n,t,r){return To(n)?(t=ge(n,t,r),-1<t?n[t]:b):(t=Xr(t,r,3),lr(n,t,or))
}function Re(n,t,r){return typeof t=="function"&&typeof r=="undefined"&&To(n)?Mt(n,t):or(n,Wr(t,r,3))}function Ie(n,t,r){if(typeof t=="function"&&typeof r=="undefined"&&To(n))for(r=n.length;r--&&false!==t(n[r],r,n););else n=ir(n,Wr(t,r,3));return n}function Oe(n,t,r){var e=To(n)?Kt:br;return t=Xr(t,r,3),e(n,t)}function Ce(n,t,r,e){return(To(n)?Yt:kr)(n,Xr(t,e,4),r,3>arguments.length,or)}function Te(n,t,r,e){return(To(n)?Zt:kr)(n,Xr(t,e,4),r,3>arguments.length,ir)}function Se(n,t,r){return(r?ee(n,t,r):null==t)?(n=ce(n),t=n.length,0<t?n[jr(0,t-1)]:b):(n=We(n),n.length=uo(0>t?0:+t||0,n.length),n)
}function We(n){n=ce(n);for(var t=-1,r=n.length,e=mu(r);++t<r;){var u=jr(0,t);t!=u&&(e[t]=e[u]),e[u]=n[t]}return e}function Ne(n,t,r){var e=To(n)?Gt:Rr;return(typeof t!="function"||typeof r!="undefined")&&(t=Xr(t,r,3)),e(n,t)}function Fe(n,t){var r;if(!Ze(t)){if(!Ze(n))throw new Iu($);var e=n;n=t,t=e}return function(){return 0<--n?r=t.apply(this,arguments):t=null,r}}function Ue(n,t){var r=x;if(2<arguments.length)var e=Er(arguments,2),u=v(e,Ue.placeholder),r=r|R;return Vr(n,r,t,e,u)}function Le(n,t){var r=x|A;
if(2<arguments.length)var e=Er(arguments,2),u=v(e,Le.placeholder),r=r|R;return Vr(t,r,n,e,u)}function $e(n,t,r){return r&&ee(n,t,r)&&(t=null),n=Vr(n,k,null,null,null,null,null,t),n.placeholder=$e.placeholder,n}function Be(n,t,r){return r&&ee(n,t,r)&&(t=null),n=Vr(n,E,null,null,null,null,null,t),n.placeholder=Be.placeholder,n}function ze(n,t,r){function e(){var r=t-(Co()-l);0>=r||r>t?(a&&Mu(a),r=p,a=s=p=b,r&&(h=Co(),f=n.apply(c,i),s||a||(i=c=null))):s=Zu(e,r)}function u(){s&&Mu(s),a=s=p=b,(v||g!==t)&&(h=Co(),f=n.apply(c,i),s||a||(i=c=null))
}function o(){if(i=arguments,l=Co(),c=this,p=v&&(s||!d),false===g)var r=d&&!s;else{a||d||(h=l);var o=g-(l-h),y=0>=o||o>g;y?(a&&(a=Mu(a)),h=l,f=n.apply(c,i)):a||(a=Zu(u,o))}return y&&s?s=Mu(s):s||t===g||(s=Zu(e,t)),r&&(y=true,f=n.apply(c,i)),!y||s||a||(i=c=null),f}var i,a,f,l,c,s,p,h=0,g=false,v=true;if(!Ze(n))throw new Iu($);if(t=0>t?0:t,true===r)var d=true,v=false;else Ge(r)&&(d=r.leading,g="maxWait"in r&&eo(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){s&&Mu(s),a&&Mu(a),a=s=p=b},o}function De(){var n=arguments,t=n.length-1;
if(0>t)return function(){};if(!qt(n,Ze))throw new Iu($);return function(){for(var r=t,e=n[r].apply(this,arguments);r--;)e=n[r].call(this,e);return e}}function Me(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):arguments[0];if(e.has(u))return e.get(u);var o=n.apply(this,arguments);return e.set(u,o),o}if(!Ze(n)||t&&!Ze(t))throw new Iu($);return r.cache=new Me.Cache,r}function qe(n){var t=Er(arguments,1),r=v(t,qe.placeholder);return Vr(n,R,null,t,r)}function Pe(n){var t=Er(arguments,1),r=v(t,Pe.placeholder);
return Vr(n,I,null,t,r)}function Ke(n){return ue(h(n)?n.length:b)&&Uu.call(n)==z||false}function Ve(n){return n&&1===n.nodeType&&h(n)&&-1<Uu.call(n).indexOf("Element")||false}function Ye(n){return h(n)&&typeof n.message=="string"&&Uu.call(n)==P||false}function Ze(n){return typeof n=="function"||false}function Ge(n){var t=typeof n;return"function"==t||n&&"object"==t||false}function Je(n){return null==n?false:Uu.call(n)==K?$u.test(Su.call(n)):h(n)&&bt.test(n)||false}function Xe(n){return typeof n=="number"||h(n)&&Uu.call(n)==V||false
}function He(n){return h(n)&&Uu.call(n)==Z||false}function Qe(n){return typeof n=="string"||h(n)&&Uu.call(n)==G||false}function nu(n){return h(n)&&ue(n.length)&&Ct[Uu.call(n)]||false}function tu(n){return nr(n,eu(n))}function ru(n){return dr(n,eu(n))}function eu(n){if(null==n)return[];Ge(n)||(n=ku(n));for(var t=n.length,t=t&&ue(t)&&(To(n)||_o.nonEnumArgs&&Ke(n))&&t||0,r=n.constructor,e=-1,r=typeof r=="function"&&r.prototype==n,u=mu(t),o=0<t;++e<t;)u[e]=e+"";for(var i in n)o&&re(i,t)||"constructor"==i&&(r||!Nu.call(n,i))||u.push(i);
return u}function uu(n){return Or(n,Fo(n))}function ou(n){return(n=e(n))&&n.replace(wt,l)}function iu(n){return(n=e(n))&&jt.test(n)?n.replace(At,"\\$&"):n}function au(n,t,r){return r&&ee(n,t,r)&&(t=0),ao(n,t)}function fu(n,t){var r="";if(n=e(n),t=+t,1>t||!n||!to(t))return r;do t%2&&(r+=n),t=qu(t/2),n+=n;while(t);return r}function lu(n,t,r){var u=n;return(n=e(n))?(r?ee(u,t,r):null==t)?n.slice(d(n),y(n)+1):(t=e(t),n.slice(o(n,t),i(n,t)+1)):n}function cu(n,t,r){return r&&ee(n,t,r)&&(t=null),n=e(n),n.match(t||Rt)||[]
}function su(n){try{return n()}catch(t){return Ye(t)?t:wu(t)}}function pu(n,t,r){return r&&ee(n,t,r)&&(t=null),tr(n,t)}function hu(n){return function(){return n}}function gu(n){return n}function vu(n){return wr(n,true)}function du(n,t,r){if(null==r){var e=Ge(t),u=e&&Fo(t);((u=u&&u.length&&dr(t,u))?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=dr(t,Fo(t)));var o=true,e=-1,i=Ze(n),a=u.length;false===r?o=false:Ge(r)&&"chain"in r&&(o=r.chain);for(;++e<a;){r=u[e];var f=t[r];n[r]=f,i&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;
if(o||r){var e=n(this.__wrapped__);return(e.__actions__=zt(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return r=[this.value()],Ku.apply(r,arguments),t.apply(n,r)}}(f))}return n}function yu(){}function _u(n){return Ar(n+"")}g=g?Dt.defaults($t.Object(),g,Dt.pick($t,Ot)):$t;var mu=g.Array,bu=g.Date,wu=g.Error,xu=g.Function,Au=g.Math,ju=g.Number,ku=g.Object,Eu=g.RegExp,Ru=g.String,Iu=g.TypeError,Ou=mu.prototype,Cu=ku.prototype,Tu=(Tu=g.window)&&Tu.document,Su=xu.prototype.toString,Wu=Ar("length"),Nu=Cu.hasOwnProperty,Fu=0,Uu=Cu.toString,Lu=g._,$u=Eu("^"+iu(Uu).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bu=Je(Bu=g.ArrayBuffer)&&Bu,zu=Je(zu=Bu&&new Bu(0).slice)&&zu,Du=Au.ceil,Mu=g.clearTimeout,qu=Au.floor,Pu=Je(Pu=ku.getPrototypeOf)&&Pu,Ku=Ou.push,Vu=Cu.propertyIsEnumerable,Yu=Je(Yu=g.Set)&&Yu,Zu=g.setTimeout,Gu=Ou.splice,Ju=Je(Ju=g.Uint8Array)&&Ju,Xu=Je(Xu=g.WeakMap)&&Xu,Hu=function(){try{var n=Je(n=g.Float64Array)&&n,t=new n(new Bu(10),0,1)&&n
}catch(r){}return t}(),Qu=Je(Qu=mu.isArray)&&Qu,no=Je(no=ku.create)&&no,to=g.isFinite,ro=Je(ro=ku.keys)&&ro,eo=Au.max,uo=Au.min,oo=Je(oo=bu.now)&&oo,io=Je(io=ju.isFinite)&&io,ao=g.parseInt,fo=Au.random,lo=ju.NEGATIVE_INFINITY,co=ju.POSITIVE_INFINITY,so=Au.pow(2,32)-1,po=so-1,ho=so>>>1,go=Hu?Hu.BYTES_PER_ELEMENT:0,vo=Au.pow(2,53)-1,yo=Xu&&new Xu,_o=Wt.support={};!function(n){_o.funcDecomp=!Je(g.WinRTError)&&kt.test(m),_o.funcNames=typeof xu.name=="string";try{_o.dom=11===Tu.createDocumentFragment().nodeType
}catch(t){_o.dom=false}try{_o.nonEnumArgs=!Vu.call(arguments,1)}catch(r){_o.nonEnumArgs=true}}(0,0),Wt.templateSettings={escape:ht,evaluate:gt,interpolate:vt,variable:"",imports:{_:Wt}};var mo=function(){function n(){}return function(t){if(Ge(t)){n.prototype=t;var r=new n;n.prototype=null}return r||g.Object()}}(),bo=yo?function(n,t){return yo.set(n,t),n}:gu;zu||(Nr=Bu&&Ju?function(n){var t=n.byteLength,r=Hu?qu(t/go):0,e=r*go,u=new Bu(t);if(r){var o=new Hu(u,0,r);o.set(new Hu(n,0,r))}return t!=e&&(o=new Ju(u,e),o.set(new Ju(n,e))),u
}:hu(null));var wo=no&&Yu?function(n){return new Lt(n)}:hu(null),xo=yo?function(n){return yo.get(n)}:yu,Ao=function(){var n=0,t=0;return function(r,e){var u=Co(),o=N-(u-t);if(t=u,0<o){if(++n>=W)return r}else n=0;return bo(r,e)}}(),jo=Lr(function(n,t,r){Nu.call(n,r)?++n[r]:n[r]=1}),ko=Lr(function(n,t,r){Nu.call(n,r)?n[r].push(t):n[r]=[t]}),Eo=Lr(function(n,t,r){n[r]=t}),Ro=Mr(Vt),Io=Mr(function(n){for(var t=-1,r=n.length,e=co;++t<r;){var u=n[t];u<e&&(e=u)}return e},true),Oo=Lr(function(n,t,r){n[r?0:1].push(t)
},function(){return[[],[]]}),Co=oo||function(){return(new bu).getTime()},To=Qu||function(n){return h(n)&&ue(n.length)&&Uu.call(n)==D||false};_o.dom||(Ve=function(n){return n&&1===n.nodeType&&h(n)&&!Wo(n)||false});var So=io||function(n){return typeof n=="number"&&to(n)};(Ze(/x/)||Ju&&!Ze(Ju))&&(Ze=function(n){return Uu.call(n)==K});var Wo=Pu?function(n){if(!n||Uu.call(n)!=Y)return false;var t=n.valueOf,r=Je(t)&&(r=Pu(t))&&Pu(r);return r?n==r||Pu(n)==r:fe(n)}:fe,No=$r(Ht),Fo=ro?function(n){if(n)var t=n.constructor,r=n.length;
return typeof t=="function"&&t.prototype===n||typeof n!="function"&&r&&ue(r)?le(n):Ge(n)?ro(n):[]}:le,Uo=$r(xr),Lo=zr(function(n,t,r){return t=t.toLowerCase(),r?n+t.charAt(0).toUpperCase()+t.slice(1):t}),$o=zr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()});8!=ao(It+"08")&&(au=function(n,t,r){return(r?ee(n,t,r):null==t)?t=0:t&&(t=+t),n=lu(n),ao(n,t||(mt.test(n)?16:10))});var Bo=zr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()});return Nt.prototype=Wt.prototype,Ut.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]
},Ut.prototype.get=function(n){return"__proto__"==n?b:this.__data__[n]},Ut.prototype.has=function(n){return"__proto__"!=n&&Nu.call(this.__data__,n)},Ut.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Lt.prototype.push=function(n){var t=this.data;typeof n=="string"||Ge(n)?t.set.add(n):t.hash[n]=true},Me.Cache=Ut,Wt.after=function(n,t){if(!Ze(t)){if(!Ze(n))throw new Iu($);var r=n;n=t,t=r}return n=to(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0}},Wt.ary=function(n,t,r){return r&&ee(n,t,r)&&(t=null),t=n&&null==t?n.length:eo(+t||0,0),Vr(n,C,null,null,null,null,t)
},Wt.assign=No,Wt.at=function(n){return ue(n?n.length:0)&&(n=ce(n)),Qt(n,cr(arguments,false,false,1))},Wt.before=Fe,Wt.bind=Ue,Wt.bindAll=function(n){for(var t=n,r=1<arguments.length?cr(arguments,false,false,1):ru(n),e=-1,u=r.length;++e<u;){var o=r[e];t[o]=Vr(t[o],x,t)}return t},Wt.bindKey=Le,Wt.callback=pu,Wt.chain=we,Wt.chunk=function(n,t,r){t=(r?ee(n,t,r):null==t)?1:eo(+t||1,1),r=0;for(var e=n?n.length:0,u=-1,o=mu(Du(e/t));r<e;)o[++u]=Er(n,r,r+=t);return o},Wt.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var o=n[t];
o&&(u[++e]=o)}return u},Wt.constant=hu,Wt.countBy=jo,Wt.create=function(n,t,r){var e=mo(n);return r&&ee(n,t,r)&&(t=null),t?nr(t,e,Fo(t)):e},Wt.curry=$e,Wt.curryRight=Be,Wt.debounce=ze,Wt.defaults=function(n){if(null==n)return n;var t=zt(arguments);return t.push(Jt),No.apply(b,t)},Wt.defer=function(n){return er(n,1,arguments,1)},Wt.delay=function(n,t){return er(n,t,arguments,2)},Wt.difference=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(To(r)||Ke(r))break}return ur(r,cr(arguments,false,true,++n))
},Wt.drop=pe,Wt.dropRight=he,Wt.dropRightWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];for(t=Xr(t,r,3);e--&&t(n[e],e,n););return Er(n,0,e+1)},Wt.dropWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];var u=-1;for(t=Xr(t,r,3);++u<e&&t(n[u],u,n););return Er(n,u)},Wt.filter=ke,Wt.flatten=function(n,t,r){var e=n?n.length:0;return r&&ee(n,t,r)&&(t=false),e?cr(n,t):[]},Wt.flattenDeep=function(n){return n&&n.length?cr(n,true):[]},Wt.flow=function(){var n=arguments,t=n.length;if(!t)return function(){};
if(!qt(n,Ze))throw new Iu($);return function(){for(var r=0,e=n[r].apply(this,arguments);++r<t;)e=n[r].call(this,e);return e}},Wt.flowRight=De,Wt.forEach=Re,Wt.forEachRight=Ie,Wt.forIn=function(n,t,r){return(typeof t!="function"||typeof r!="undefined")&&(t=Wr(t,r,3)),sr(n,t,eu)},Wt.forInRight=function(n,t,r){return t=Wr(t,r,3),pr(n,t,eu)},Wt.forOwn=function(n,t,r){return(typeof t!="function"||typeof r!="undefined")&&(t=Wr(t,r,3)),gr(n,t)},Wt.forOwnRight=function(n,t,r){return t=Wr(t,r,3),pr(n,t,Fo)
},Wt.functions=ru,Wt.groupBy=ko,Wt.indexBy=Eo,Wt.initial=function(n){return he(n,1)},Wt.intersection=function(){for(var n=[],r=-1,e=arguments.length,u=[],o=Hr(),i=o==t;++r<e;){var a=arguments[r];(To(a)||Ke(a))&&(n.push(a),u.push(i&&120<=a.length&&wo(r&&a)))}var e=n.length,i=n[0],f=-1,l=i?i.length:0,c=[],s=u[0];n:for(;++f<l;)if(a=i[f],0>(s?Bt(s,a):o(c,a))){for(r=e;--r;){var p=u[r];if(0>(p?Bt(p,a):o(n[r],a)))continue n}s&&s.push(a),c.push(a)}return c},Wt.invert=function(n,t,r){r&&ee(n,t,r)&&(t=null),r=-1;
for(var e=Fo(n),u=e.length,o={};++r<u;){var i=e[r],a=n[i];t?Nu.call(o,a)?o[a].push(i):o[a]=[i]:o[a]=i}return o},Wt.invoke=function(n,t){return yr(n,t,Er(arguments,2))},Wt.keys=Fo,Wt.keysIn=eu,Wt.map=Oe,Wt.mapValues=function(n,t,r){var e={};return t=Xr(t,r,3),gr(n,function(n,r,u){e[r]=t(n,r,u)}),e},Wt.matches=vu,Wt.memoize=Me,Wt.merge=Uo,Wt.mixin=du,Wt.negate=function(n){if(!Ze(n))throw new Iu($);return function(){return!n.apply(this,arguments)}},Wt.omit=function(n,t,r){if(null==n)return{};if(typeof t!="function"){var e=Kt(cr(arguments,false,false,1),Ru);
return ie(n,ur(eu(n),e))}return t=Wr(t,r,3),ae(n,function(n,r,e){return!t(n,r,e)})},Wt.once=function(n){return Fe(n,2)},Wt.pairs=function(n){for(var t=-1,r=Fo(n),e=r.length,u=mu(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},Wt.partial=qe,Wt.partialRight=Pe,Wt.partition=Oo,Wt.pick=function(n,t,r){return null==n?{}:typeof t=="function"?ae(n,Wr(t,r,3)):ie(n,cr(arguments,false,false,1))},Wt.pluck=function(n,t){return Oe(n,_u(t))},Wt.property=_u,Wt.propertyOf=function(n){return function(t){return null==n?b:n[t]
}},Wt.pull=function(){var n=arguments[0];if(!n||!n.length)return n;for(var t=0,r=Hr(),e=arguments.length;++t<e;)for(var u=0,o=arguments[t];-1<(u=r(n,o,u));)Gu.call(n,u,1);return n},Wt.pullAt=function(t){var r=t||[],e=cr(arguments,false,false,1),u=e.length,o=Qt(r,e);for(e.sort(n);u--;){var i=parseFloat(e[u]);if(i!=a&&re(i)){var a=i;Gu.call(r,i,1)}}return o},Wt.range=function(n,t,r){r&&ee(n,t,r)&&(t=r=null),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=eo(Du((t-n)/(r||1)),0);for(var u=mu(t);++e<t;)u[e]=n,n+=r;
return u},Wt.rearg=function(n){var t=cr(arguments,false,false,1);return Vr(n,O,null,null,null,t)},Wt.reject=function(n,t,r){var e=To(n)?Pt:fr;return t=Xr(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Wt.remove=function(n,t,r){var e=-1,u=n?n.length:0,o=[];for(t=Xr(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(o.push(r),Gu.call(n,e--,1),u--);return o},Wt.rest=ye,Wt.shuffle=We,Wt.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&ee(n,t,r)&&(t=0,r=e),Er(n,t,r)):[]},Wt.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=ue(o)?mu(o):[];
return e&&ee(n,t,e)&&(t=null),t=Xr(t,e,3),or(n,function(n,r,e){i[++u]={a:t(n,r,e),b:u,c:n}}),r(i,a)},Wt.sortByAll=function(n){var t=arguments;3<t.length&&ee(t[1],t[2],t[3])&&(t=[n,t[1]]);var e=-1,u=n?n.length:0,o=cr(t,false,false,1),i=ue(u)?mu(u):[];return or(n,function(n){for(var t=o.length,r=mu(t);t--;)r[t]=null==n?b:n[o[t]];i[++e]={a:r,b:e,c:n}}),r(i,f)},Wt.take=function(n,t,r){return n&&n.length?((r?ee(n,t,r):null==t)&&(t=1),Er(n,0,0>t?0:t)):[]},Wt.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?ee(n,t,r):null==t)&&(t=1),t=e-(+t||0),Er(n,0>t?0:t)):[]
},Wt.takeRightWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];for(t=Xr(t,r,3);e--&&t(n[e],e,n););return Er(n,e+1)},Wt.takeWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];var u=-1;for(t=Xr(t,r,3);++u<e&&t(n[u],u,n););return Er(n,0,u)},Wt.tap=function(n,t,r){return t.call(r,n),n},Wt.throttle=function(n,t,r){var e=true,u=true;if(!Ze(n))throw new Iu($);return false===r?e=false:Ge(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),St.leading=e,St.maxWait=+t,St.trailing=u,ze(n,t,St)
},Wt.thru=xe,Wt.times=function(n,t,r){if(n=+n,1>n||!to(n))return[];var e=-1,u=mu(uo(n,so));for(t=Wr(t,r,1);++e<n;)e<so?u[e]=t(e):t(e);return u},Wt.toArray=function(n){var t=n?n.length:0;return ue(t)?t?zt(n):[]:uu(n)},Wt.toPlainObject=tu,Wt.transform=function(n,t,r,e){var u=To(n)||nu(n);return t=Xr(t,e,4),null==r&&(u||Ge(n)?(e=n.constructor,r=u?To(n)?new e:[]:mo(typeof e=="function"&&e.prototype)):r={}),(u?Mt:gr)(n,function(n,e,u){return t(r,n,e,u)}),r},Wt.union=function(){return Ir(cr(arguments,false,true))
},Wt.uniq=_e,Wt.unzip=me,Wt.values=uu,Wt.valuesIn=function(n){return Or(n,eu(n))},Wt.where=function(n,t){return ke(n,vu(t))},Wt.without=function(n){return ur(n,Er(arguments,1))},Wt.wrap=function(n,t){return t=null==t?gu:t,Vr(t,R,null,[n],[])},Wt.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(To(r)||Ke(r))var e=e?ur(e,r).concat(ur(r,e)):r}return e?Ir(e):[]},Wt.zip=function(){for(var n=arguments.length,t=mu(n);n--;)t[n]=arguments[n];return me(t)},Wt.zipObject=be,Wt.backflow=De,Wt.collect=Oe,Wt.compose=De,Wt.each=Re,Wt.eachRight=Ie,Wt.extend=No,Wt.iteratee=pu,Wt.methods=ru,Wt.object=be,Wt.select=ke,Wt.tail=ye,Wt.unique=_e,du(Wt,Wt),Wt.attempt=su,Wt.camelCase=Lo,Wt.capitalize=function(n){return(n=e(n))&&n.charAt(0).toUpperCase()+n.slice(1)
},Wt.clone=function(n,t,r,e){return typeof t!="boolean"&&null!=t&&(e=r,r=ee(n,t,e)?null:t,t=false),r=typeof r=="function"&&Wr(r,e,1),rr(n,t,r)},Wt.cloneDeep=function(n,t,r){return t=typeof t=="function"&&Wr(t,r,1),rr(n,true,t)},Wt.deburr=ou,Wt.endsWith=function(n,t,r){n=e(n),t+="";var u=n.length;return r=(typeof r=="undefined"?u:uo(0>r?0:+r||0,u))-t.length,0<=r&&n.indexOf(t,r)==r},Wt.escape=function(n){return(n=e(n))&&pt.test(n)?n.replace(ct,c):n},Wt.escapeRegExp=iu,Wt.every=je,Wt.find=Ee,Wt.findIndex=ge,Wt.findKey=function(n,t,r){return t=Xr(t,r,3),lr(n,t,gr,true)
},Wt.findLast=function(n,t,r){return t=Xr(t,r,3),lr(n,t,ir)},Wt.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=Xr(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},Wt.findLastKey=function(n,t,r){return t=Xr(t,r,3),lr(n,t,vr,true)},Wt.findWhere=function(n,t){return Ee(n,vu(t))},Wt.first=ve,Wt.has=function(n,t){return n?Nu.call(n,t):false},Wt.identity=gu,Wt.includes=Ae,Wt.indexOf=de,Wt.isArguments=Ke,Wt.isArray=To,Wt.isBoolean=function(n){return true===n||false===n||h(n)&&Uu.call(n)==M||false},Wt.isDate=function(n){return h(n)&&Uu.call(n)==q||false
},Wt.isElement=Ve,Wt.isEmpty=function(n){if(null==n)return true;var t=n.length;return ue(t)&&(To(n)||Qe(n)||Ke(n)||h(n)&&Ze(n.splice))?!t:!Fo(n).length},Wt.isEqual=function(n,t,r,e){return r=typeof r=="function"&&Wr(r,e,3),!r&&oe(n)&&oe(t)?n===t:(e=r?r(n,t):b,typeof e=="undefined"?_r(n,t,r):!!e)},Wt.isError=Ye,Wt.isFinite=So,Wt.isFunction=Ze,Wt.isMatch=function(n,t,r,e){var u=Fo(t),o=u.length;if(r=typeof r=="function"&&Wr(r,e,3),!r&&1==o){var i=u[0];if(e=t[i],oe(e))return null!=n&&e===n[i]&&Nu.call(n,i)
}for(var i=mu(o),a=mu(o);o--;)e=i[o]=t[u[o]],a[o]=oe(e);return mr(n,u,i,a,r)},Wt.isNaN=function(n){return Xe(n)&&n!=+n},Wt.isNative=Je,Wt.isNull=function(n){return null===n},Wt.isNumber=Xe,Wt.isObject=Ge,Wt.isPlainObject=Wo,Wt.isRegExp=He,Wt.isString=Qe,Wt.isTypedArray=nu,Wt.isUndefined=function(n){return typeof n=="undefined"},Wt.kebabCase=$o,Wt.last=function(n){var t=n?n.length:0;return t?n[t-1]:b},Wt.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?eo(e+r,0):uo(r||0,e-1))+1;
else if(r)return u=Tr(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Wt.max=Ro,Wt.min=Io,Wt.noConflict=function(){return g._=Lu,this},Wt.noop=yu,Wt.now=Co,Wt.pad=function(n,t,r){n=e(n),t=+t;var u=n.length;return u<t&&to(t)?(u=(t-u)/2,t=qu(u),u=Du(u),r=Pr("",u,r),r.slice(0,t)+n+r):n},Wt.padLeft=function(n,t,r){return(n=e(n))&&Pr(n,t,r)+n},Wt.padRight=function(n,t,r){return(n=e(n))&&n+Pr(n,t,r)},Wt.parseInt=au,Wt.random=function(n,t,r){r&&ee(n,t,r)&&(t=r=null);
var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=fo(),uo(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):jr(n,t)},Wt.reduce=Ce,Wt.reduceRight=Te,Wt.repeat=fu,Wt.result=function(n,t,r){return t=null==n?b:n[t],typeof t=="undefined"&&(t=r),Ze(t)?t.call(n):t},Wt.runInContext=m,Wt.size=function(n){var t=n?n.length:0;return ue(t)?t:Fo(n).length},Wt.snakeCase=Bo,Wt.some=Ne,Wt.sortedIndex=function(n,t,r,e){var u=Xr(r);
return u===tr&&null==r?Tr(n,t):Sr(n,t,u(r,e,1))},Wt.sortedLastIndex=function(n,t,r,e){var u=Xr(r);return u===tr&&null==r?Tr(n,t,true):Sr(n,t,u(r,e,1),true)},Wt.startsWith=function(n,t,r){return n=e(n),r=null==r?0:uo(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Wt.template=function(n,t,r){var u=Wt.templateSettings;r&&ee(n,t,r)&&(t=r=null),n=e(n),t=Ht(Ht({},r||t),u,Xt),r=Ht(Ht({},t.imports),u.imports,Xt);var o,i,a=Fo(r),f=Or(r,a),l=0;r=t.interpolate||xt;var c="__p+='";r=Eu((t.escape||xt).source+"|"+r.source+"|"+(r===vt?dt:xt).source+"|"+(t.evaluate||xt).source+"|$","g");
var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,a,f){return e||(e=u),c+=n.slice(l,f).replace(Et,s),r&&(o=true,c+="'+__e("+r+")+'"),a&&(i=true,c+="';"+a+";\n__p+='"),e&&(c+="'+((__t=("+e+"))==null?'':__t)+'"),l=f+t.length,t}),c+="';",(t=t.variable)||(c="with(obj){"+c+"}"),c=(i?c.replace(it,""):c).replace(at,"$1").replace(ft,"$1;"),c="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}",t=su(function(){return xu(a,p+"return "+c).apply(b,f)
}),t.source=c,Ye(t))throw t;return t},Wt.trim=lu,Wt.trimLeft=function(n,t,r){var u=n;return(n=e(n))?n.slice((r?ee(u,t,r):null==t)?d(n):o(n,e(t))):n},Wt.trimRight=function(n,t,r){var u=n;return(n=e(n))?(r?ee(u,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,e(t))+1):n},Wt.trunc=function(n,t,r){r&&ee(n,t,r)&&(t=null);var u=T;if(r=S,null!=t)if(Ge(t)){var o="separator"in t?t.separator:o,u="length"in t?+t.length||0:u;r="omission"in t?e(t.omission):r}else u=+t||0;if(n=e(n),u>=n.length)return n;if(u-=r.length,1>u)return r;
if(t=n.slice(0,u),null==o)return t+r;if(He(o)){if(n.slice(u).search(o)){var i,a=n.slice(0,u);for(o.global||(o=Eu(o.source,(yt.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(a);)i=n.index;t=t.slice(0,null==i?u:i)}}else n.indexOf(o,u)!=u&&(o=t.lastIndexOf(o),-1<o&&(t=t.slice(0,o)));return t+r},Wt.unescape=function(n){return(n=e(n))&&st.test(n)?n.replace(lt,_):n},Wt.uniqueId=function(n){var t=++Fu;return e(n)+t},Wt.words=cu,Wt.all=je,Wt.any=Ne,Wt.contains=Ae,Wt.detect=Ee,Wt.foldl=Ce,Wt.foldr=Te,Wt.head=ve,Wt.include=Ae,Wt.inject=Ce,du(Wt,function(){var n={};
return gr(Wt,function(t,r){Wt.prototype[r]||(n[r]=t)}),n}(),false),Wt.sample=Se,Wt.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return Se(t,n)}):Se(this.value())},Wt.VERSION=w,Mt("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Wt[n].placeholder=Wt}),Mt(["filter","map","takeWhile"],function(n,t){var r=t==F;Ft.prototype[n]=function(n,e){var u=this.clone(),o=u.filtered,i=u.iteratees||(u.iteratees=[]);return u.filtered=o||r||t==L&&0>u.dir,i.push({iteratee:Xr(n,e,3),type:t}),u
}}),Mt(["drop","take"],function(n,t){var r=n+"Count",e=n+"While";Ft.prototype[n]=function(e){e=null==e?1:eo(+e||0,0);var u=this.clone();if(u.filtered){var o=u[r];u[r]=t?uo(o,e):o+e}else(u.views||(u.views=[])).push({size:e,type:n+(0>u.dir?"Right":"")});return u},Ft.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()},Ft.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[e](n,t).reverse()}}),Mt(["first","last"],function(n,t){var r="take"+(t?"Right":"");Ft.prototype[n]=function(){return this[r](1).value()[0]
}}),Mt(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");Ft.prototype[n]=function(){return this[r](1)}}),Mt(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?vu:_u;Ft.prototype[n]=function(n){return this[r](e(n))}}),Ft.prototype.dropWhile=function(n,t){var r,e,u=0>this.dir;return n=Xr(n,t,3),this.filter(function(t,o,i){return r=r&&(u?o<e:o>e),e=o,r||(r=!n(t,o,i))})},Ft.prototype.reject=function(n,t){return n=Xr(n,t,3),this.filter(function(t,r,e){return!n(t,r,e)})},Ft.prototype.slice=function(n,t){n=null==n?0:+n||0;
var r=0>n?this.takeRight(-n):this.drop(n);return typeof t!="undefined"&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},gr(Ft.prototype,function(n,t){var r=Wt[t],e=/^(?:first|last)$/.test(t);Wt.prototype[t]=function(){function t(n){return n=[n],Ku.apply(n,o),r.apply(Wt,n)}var u=this.__wrapped__,o=arguments,i=this.__chain__,a=!!this.__actions__.length,f=u instanceof Ft,l=f&&!a;return e&&!i?l?n.call(u):r.call(Wt,this.value()):f||To(u)?(u=n.apply(l?u:new Ft(this),o),e||!a&&!u.actions||(u.actions||(u.actions=[])).push({func:xe,args:[t],thisArg:Wt}),new Nt(u,i)):this.thru(t)
}}),Mt("concat join pop push shift sort splice unshift".split(" "),function(n){var t=Ou[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|shift)$/.test(n);Wt.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),Ft.prototype.clone=function(){var n=this.actions,t=this.iteratees,r=this.views,e=new Ft(this.wrapped);return e.actions=n?zt(n):null,e.dir=this.dir,e.dropCount=this.dropCount,e.filtered=this.filtered,e.iteratees=t?zt(t):null,e.takeCount=this.takeCount,e.views=r?zt(r):null,e
},Ft.prototype.reverse=function(){if(this.filtered){var n=new Ft(this);n.dir=-1,n.filtered=true}else n=this.clone(),n.dir*=-1;return n},Ft.prototype.value=function(){var n=this.wrapped.value();if(!To(n))return Cr(n,this.actions);var t,r=this.dir,e=0>r;t=n.length;for(var u=this.views,o=0,i=-1,a=u?u.length:0;++i<a;){var f=u[i],l=f.size;switch(f.type){case"drop":o+=l;break;case"dropRight":t-=l;break;case"take":t=uo(t,o+l);break;case"takeRight":o=eo(o,t-l)}}t={start:o,end:t},i=t.start,a=t.end,t=a-i,u=this.dropCount,o=uo(t,this.takeCount-u),e=e?a:i-1,a=(i=this.iteratees)?i.length:0,f=0,l=[];
n:for(;t--&&f<o;){for(var e=e+r,c=-1,s=n[e];++c<a;){var p=i[c],h=p.iteratee(s,e,n),p=p.type;if(p==U)s=h;else if(!h){if(p==F)continue n;break n}}u?u--:l[f++]=s}return l},Wt.prototype.chain=function(){return we(this)},Wt.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Ft?(this.__actions__.length&&(n=new Ft(this)),new Nt(n.reverse())):this.thru(function(n){return n.reverse()})},Wt.prototype.toString=function(){return this.value()+""},Wt.prototype.toJSON=Wt.prototype.valueOf=Wt.prototype.value=function(){return Cr(this.__wrapped__,this.__actions__)
},Wt.prototype.collect=Wt.prototype.map,Wt.prototype.head=Wt.prototype.first,Wt.prototype.select=Wt.prototype.filter,Wt.prototype.tail=Wt.prototype.rest,Wt}var b,w="3.0.1",x=1,A=2,j=4,k=8,E=16,R=32,I=64,O=128,C=256,T=30,S="...",W=150,N=16,F=0,U=1,L=2,$="Expected a function",B="__lodash_placeholder__",z="[object Arguments]",D="[object Array]",M="[object Boolean]",q="[object Date]",P="[object Error]",K="[object Function]",V="[object Number]",Y="[object Object]",Z="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nt="[object Int16Array]",tt="[object Int32Array]",rt="[object Uint8Array]",et="[object Uint8ClampedArray]",ut="[object Uint16Array]",ot="[object Uint32Array]",it=/\b__p\+='';/g,at=/\b(__p\+=)''\+/g,ft=/(__e\(.*?\)|\b__t\))\+'';/g,lt=/&(?:amp|lt|gt|quot|#39|#96);/g,ct=/[&<>"'`]/g,st=RegExp(lt.source),pt=RegExp(ct.source),ht=/<%-([\s\S]+?)%>/g,gt=/<%([\s\S]+?)%>/g,vt=/<%=([\s\S]+?)%>/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yt=/\w*$/,_t=/^\s*function[ \n\r\t]+\w/,mt=/^0[xX]/,bt=/^\[object .+?Constructor\]$/,wt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,xt=/($^)/,At=/[.*+?^${}()|[\]\/\\]/g,jt=RegExp(At.source),kt=/\bthis\b/,Et=/['\n\r\u2028\u2029\\]/g,Rt=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]{2,}(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),It=" \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",Ot="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window WinRTError".split(" "),Ct={};
Ct[X]=Ct[H]=Ct[Q]=Ct[nt]=Ct[tt]=Ct[rt]=Ct[et]=Ct[ut]=Ct[ot]=true,Ct[z]=Ct[D]=Ct[J]=Ct[M]=Ct[q]=Ct[P]=Ct[K]=Ct["[object Map]"]=Ct[V]=Ct[Y]=Ct[Z]=Ct["[object Set]"]=Ct[G]=Ct["[object WeakMap]"]=false;var Tt={};Tt[z]=Tt[D]=Tt[J]=Tt[M]=Tt[q]=Tt[X]=Tt[H]=Tt[Q]=Tt[nt]=Tt[tt]=Tt[V]=Tt[Y]=Tt[Z]=Tt[G]=Tt[rt]=Tt[et]=Tt[ut]=Tt[ot]=true,Tt[P]=Tt[K]=Tt["[object Map]"]=Tt["[object Set]"]=Tt["[object WeakMap]"]=false;var St={leading:false,maxWait:0,trailing:false},Wt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Nt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Ft={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Ut={"function":true,object:true},Lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$t=Ut[typeof window]&&window!==(this&&this.window)?window:this,Bt=Ut[typeof exports]&&exports&&!exports.nodeType&&exports,Ut=Ut[typeof module]&&module&&!module.nodeType&&module,zt=Bt&&Ut&&typeof global=="object"&&global;
!zt||zt.global!==zt&&zt.window!==zt&&zt.self!==zt||($t=zt);var zt=Ut&&Ut.exports===Bt&&Bt,Dt=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($t._=Dt, define(function(){return Dt})):Bt&&Ut?zt?(Ut.exports=Dt)._=Dt:Bt._=Dt:$t._=Dt}).call(this);
;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===m,u=n===n,i=null===t,o=t===m,f=t===t;if(n>t&&!i||!u||r&&!o&&f||e&&f)return 1;if(n<t&&!r||!f||i&&!e&&u||o&&u)return-1}return 0}function t(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function r(n,t,r){if(t!==t)return s(n,r);r-=1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function e(n){return typeof n=="function"||false}function u(n){return typeof n=="string"?n:null==n?"":n+""}function i(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););
return r}function o(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function f(t,r){return n(t.a,r.a)||t.b-r.b}function l(n){return Fn[n]}function a(n){return Ln[n]}function c(n){return"\\"+Bn[n]}function s(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function p(n){return!!n&&typeof n=="object"}function h(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n);
}function _(n,t){for(var r=-1,e=n.length,u=-1,i=[];++r<e;)n[r]===t&&(n[r]=N,i[++u]=r);return i}function v(n){for(var t=-1,r=n.length;++t<r&&h(n.charCodeAt(t)););return t}function g(n){for(var t=n.length;t--&&h(n.charCodeAt(t)););return t}function y(n){return Nn[n]}function d(h){function Fn(n){if(p(n)&&!(Ci(n)||n instanceof zn)){if(n instanceof Nn)return n;if(tu.call(n,"__chain__")&&tu.call(n,"__wrapped__"))return Br(n)}return new Nn(n)}function Ln(){}function Nn(n,t,r){this.__wrapped__=n,this.__actions__=r||[],
this.__chain__=!!t}function zn(n){this.__wrapped__=n,this.__actions__=null,this.__dir__=1,this.__filtered__=false,this.__iteratees__=null,this.__takeCount__=Eu,this.__views__=null}function Bn(){this.__data__={}}function Mn(n){var t=n?n.length:0;for(this.data={hash:mu(null),set:new hu};t--;)this.push(n[t])}function Pn(n,t){var r=n.data;return(typeof t=="string"||ve(t)?r.set.has(t):r.hash[t])?0:-1}function qn(n,t){var r=-1,e=n.length;for(t||(t=Be(e));++r<e;)t[r]=n[r];return t}function Dn(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););
return n}function Kn(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Yn(n,t){for(var r=-1,e=n.length,u=-1,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[++u]=o)}return i}function Jn(n,t){for(var r=-1,e=n.length,u=Be(e);++r<e;)u[r]=t(n[r],r,n);return u}function Xn(n,t,r,e){var u=-1,i=n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function Gn(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;return false}function Hn(n,t){return n===m?t:n}function Qn(n,t,r,e){
return n!==m&&tu.call(e,r)?n:t}function nt(n,t,r){for(var e=-1,u=Pi(t),i=u.length;++e<i;){var o=u[e],f=n[o],l=r(f,t[o],o,n,t);(l===l?l===f:f!==f)&&(f!==m||o in n)||(n[o]=l)}return n}function tt(n,t){return null==t?n:et(t,Pi(t),n)}function rt(n,t){for(var r=-1,e=null==n,u=!e&&Rr(n),i=u?n.length:0,o=t.length,f=Be(o);++r<o;){var l=t[r];f[r]=u?Ir(l,i)?n[l]:m:e?m:n[l]}return f}function et(n,t,r){r||(r={});for(var e=-1,u=t.length;++e<u;){var i=t[e];r[i]=n[i]}return r}function ut(n,t,r){var e=typeof n;return"function"==e?t===m?n:Bt(n,t,r):null==n?$e:"object"==e?bt(n):t===m?ze(n):xt(n,t);
}function it(n,t,r,e,u,i,o){var f;if(r&&(f=u?r(n,e,u):r(n)),f!==m)return f;if(!ve(n))return n;if(e=Ci(n)){if(f=jr(n),!t)return qn(n,f)}else{var l=eu.call(n),a=l==D;if(l!=Z&&l!=z&&(!a||u))return Tn[l]?kr(n,l,t):u?n:{};if(f=Ar(a?{}:n),!t)return tt(f,n)}for(i||(i=[]),o||(o=[]),u=i.length;u--;)if(i[u]==n)return o[u];return i.push(n),o.push(f),(e?Dn:_t)(n,function(e,u){f[u]=it(e,t,r,u,n,i,o)}),f}function ot(n,t,r){if(typeof n!="function")throw new Je(L);return _u(function(){n.apply(m,r)},t)}function ft(n,t){
var e=n?n.length:0,u=[];if(!e)return u;var i=-1,o=wr(),f=o==r,l=f&&200<=t.length?qu(t):null,a=t.length;l&&(o=Pn,f=false,t=l);n:for(;++i<e;)if(l=n[i],f&&l===l){for(var c=a;c--;)if(t[c]===l)continue n;u.push(l)}else 0>o(t,l,0)&&u.push(l);return u}function lt(n,t){var r=true;return Nu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function at(n,t,r,e){var u=e,i=u;return Nu(n,function(n,o,f){o=+t(n,o,f),(r(o,u)||o===e&&o===i)&&(u=o,i=n)}),i}function ct(n,t){var r=[];return Nu(n,function(n,e,u){t(n,e,u)&&r.push(n);
}),r}function st(n,t,r,e){var u;return r(n,function(n,r,i){return t(n,r,i)?(u=e?r:n,false):void 0}),u}function pt(n,t,r){for(var e=-1,u=n.length,i=-1,o=[];++e<u;){var f=n[e];if(p(f)&&Rr(f)&&(r||Ci(f)||se(f))){t&&(f=pt(f,t,r));for(var l=-1,a=f.length;++l<a;)o[++i]=f[l]}else r||(o[++i]=f)}return o}function ht(n,t){Bu(n,t,Ae)}function _t(n,t){return Bu(n,t,Pi)}function vt(n,t){return Mu(n,t,Pi)}function gt(n,t){for(var r=-1,e=t.length,u=-1,i=[];++r<e;){var o=t[r];Si(n[o])&&(i[++u]=o)}return i}function yt(n,t,r){
if(null!=n){r!==m&&r in Nr(n)&&(t=[r]),r=0;for(var e=t.length;null!=n&&r<e;)n=n[t[r++]];return r&&r==e?n:m}}function dt(n,t,r,e,u,i){if(n===t)n=true;else if(null==n||null==t||!ve(n)&&!ve(t))n=n!==n&&t!==t;else n:{var o=dt,f=Ci(n),l=Ci(t),a=B,c=B;f||(a=eu.call(n),a==z?a=Z:a!=Z&&(f=we(n))),l||(c=eu.call(t),c==z?c=Z:c!=Z&&we(t));var s=a==Z,l=c==Z,c=a==c;if(!c||f||s){if(!e&&(a=s&&tu.call(n,"__wrapped__"),l=l&&tu.call(t,"__wrapped__"),a||l)){n=o(a?n.value():n,l?t.value():t,r,e,u,i);break n}if(c){for(u||(u=[]),
i||(i=[]),a=u.length;a--;)if(u[a]==n){n=i[a]==t;break n}u.push(n),i.push(t),n=(f?vr:yr)(n,t,o,r,e,u,i),u.pop(),i.pop()}else n=false}else n=gr(n,t,a)}return n}function mt(n,t,r){var e=t.length,u=e,i=!r;if(null==n)return!u;for(n=Nr(n);e--;){var o=t[e];if(i&&o[2]?o[1]!==n[o[0]]:!(o[0]in n))return false}for(;++e<u;){var o=t[e],f=o[0],l=n[f],a=o[1];if(i&&o[2]){if(l===m&&!(f in n))return false}else if(o=r?r(l,a,f):m,o===m?!dt(a,l,r,true):!o)return false}return true}function wt(n,t){var r=-1,e=Rr(n)?Be(n.length):[];return Nu(n,function(n,u,i){
e[++r]=t(n,u,i)}),e}function bt(n){var t=br(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?false:n[r]===e&&(e!==m||r in Nr(n))}}return function(n){return mt(n,t)}}function xt(n,t){var r=Ci(n),e=Cr(n)&&t===t&&!ve(t),u=n+"";return n=zr(n),function(i){if(null==i)return false;var o=u;if(i=Nr(i),!(!r&&e||o in i)){if(i=1==n.length?i:yt(i,Et(n,0,-1)),null==i)return false;o=Kr(n),i=Nr(i)}return i[o]===t?t!==m||o in i:dt(t,i[o],m,true)}}function jt(n,t,r,e,u){if(!ve(n))return n;var i=Rr(t)&&(Ci(t)||we(t)),o=i?null:Pi(t);
return Dn(o||t,function(f,l){if(o&&(l=f,f=t[l]),p(f)){e||(e=[]),u||(u=[]);n:{for(var a=l,c=e,s=u,h=c.length,_=t[a];h--;)if(c[h]==_){n[a]=s[h];break n}var h=n[a],v=r?r(h,_,a,n,t):m,g=v===m;g&&(v=_,Rr(_)&&(Ci(_)||we(_))?v=Ci(h)?h:Rr(h)?qn(h):[]:Ui(_)||se(_)?v=se(h)?xe(h):Ui(h)?h:{}:g=false),c.push(_),s.push(v),g?n[a]=jt(v,_,r,c,s):(v===v?v!==h:h===h)&&(n[a]=v)}}else a=n[l],c=r?r(a,f,l,n,t):m,(s=c===m)&&(c=f),c===m&&(!i||l in n)||!s&&(c===c?c===a:a!==a)||(n[l]=c)}),n}function At(n){return function(t){return null==t?m:t[n];
}}function kt(n){var t=n+"";return n=zr(n),function(r){return yt(r,n,t)}}function Ot(n,t){for(var r=n?t.length:0;r--;){var e=t[r];if(e!=u&&Ir(e)){var u=e;vu.call(n,e,1)}}}function Rt(n,t){return n+cu(Iu()*(t-n+1))}function It(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function Et(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r=r===m||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Be(u);++e<u;)r[e]=n[e+t];return r}function Ct(n,t){var r;return Nu(n,function(n,e,u){
return r=t(n,e,u),!r}),!!r}function Wt(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function St(t,r,e){var u=dr(),i=-1;return r=Jn(r,function(n){return u(n)}),t=wt(t,function(n){return{a:Jn(r,function(t){return t(n)}),b:++i,c:n}}),Wt(t,function(t,r){var u;n:{u=-1;for(var i=t.a,o=r.a,f=i.length,l=e.length;++u<f;){var a=n(i[u],o[u]);if(a){u=u<l?a*(e[u]?1:-1):a;break n}}u=t.b-r.b}return u})}function Ut(n,t){var r=0;return Nu(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function Tt(n,t){var e=-1,u=wr(),i=n.length,o=u==r,f=o&&200<=i,l=f?qu():null,a=[];
l?(u=Pn,o=false):(f=false,l=t?[]:a);n:for(;++e<i;){var c=n[e],s=t?t(c,e,n):c;if(o&&c===c){for(var p=l.length;p--;)if(l[p]===s)continue n;t&&l.push(s),a.push(c)}else 0>u(l,s,0)&&((t||f)&&l.push(s),a.push(c))}return a}function $t(n,t){for(var r=-1,e=t.length,u=Be(e);++r<e;)u[r]=n[t[r]];return u}function Ft(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?Et(n,e?0:i,e?i+1:u):Et(n,e?i+1:0,e?u:i)}function Lt(n,t){var r=n;r instanceof zn&&(r=r.value());for(var e=-1,u=t.length;++e<u;){
var r=[r],i=t[e];pu.apply(r,i.args),r=i.func.apply(i.thisArg,r)}return r}function Nt(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=Wu){for(;e<u;){var i=e+u>>>1,o=n[i];(r?o<=t:o<t)&&null!==o?e=i+1:u=i}return u}return zt(n,t,$e,r)}function zt(n,t,r,e){t=r(t);for(var u=0,i=n?n.length:0,o=t!==t,f=null===t,l=t===m;u<i;){var a=cu((u+i)/2),c=r(n[a]),s=c!==m,p=c===c;(o?p||e:f?p&&s&&(e||null!=c):l?p&&(e||s):null==c?0:e?c<=t:c<t)?u=a+1:i=a}return Au(i,Cu)}function Bt(n,t,r){if(typeof n!="function")return $e;
if(t===m)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)};case 5:return function(r,e,u,i,o){return n.call(t,r,e,u,i,o)}}return function(){return n.apply(t,arguments)}}function Mt(n){return fu.call(n,0)}function Pt(n,t,r){for(var e=r.length,u=-1,i=ju(n.length-e,0),o=-1,f=t.length,l=Be(i+f);++o<f;)l[o]=t[o];for(;++u<e;)l[r[u]]=n[u];for(;i--;)l[o++]=n[u++];return l}function qt(n,t,r){
for(var e=-1,u=r.length,i=-1,o=ju(n.length-u,0),f=-1,l=t.length,a=Be(o+l);++i<o;)a[i]=n[i];for(o=i;++f<l;)a[o+f]=t[f];for(;++e<u;)a[o+r[e]]=n[i++];return a}function Dt(n,t){return function(r,e,u){var i=t?t():{};if(e=dr(e,u,3),Ci(r)){u=-1;for(var o=r.length;++u<o;){var f=r[u];n(i,f,e(f,u,r),r)}}else Nu(r,function(t,r,u){n(i,t,e(t,r,u),u)});return i}}function Kt(n){return ae(function(t,r){var e=-1,u=null==t?0:r.length,i=2<u?r[u-2]:m,o=2<u?r[2]:m,f=1<u?r[u-1]:m;for(typeof i=="function"?(i=Bt(i,f,5),
u-=2):(i=typeof f=="function"?f:m,u-=i?1:0),o&&Er(r[0],r[1],o)&&(i=3>u?m:i,u=1);++e<u;)(o=r[e])&&n(t,o,i);return t})}function Zt(n,t){return function(r,e){var u=r?Ku(r):0;if(!Sr(u))return n(r,e);for(var i=t?u:-1,o=Nr(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function Vt(n){return function(t,r,e){var u=Nr(t);e=e(t);for(var i=e.length,o=n?i:-1;n?o--:++o<i;){var f=e[o];if(false===r(u[f],f,u))break}return t}}function Yt(n,t){function r(){return(this&&this!==Zn&&this instanceof r?e:n).apply(t,arguments);
}var e=Xt(n);return r}function Jt(n){return function(t){var r=-1;t=Se(Re(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Xt(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4])}var r=Lu(n.prototype),t=n.apply(r,t);return ve(t)?t:r}}function Gt(n){function t(r,e,u){return u&&Er(r,e,u)&&(e=null),
r=_r(r,n,null,null,null,null,null,e),r.placeholder=t.placeholder,r}return t}function Ht(n,t){return function(r,e,u){if(u&&Er(r,e,u)&&(e=null),e=dr(e,u,3),1==e.length){u=r=Lr(r);for(var i=e,o=-1,f=u.length,l=t,a=l;++o<f;){var c=u[o],s=+i(c);n(s,l)&&(l=s,a=c)}if(u=a,!r.length||u!==t)return u}return at(r,e,n,t)}}function Qt(n,r){return function(e,u,i){return u=dr(u,i,3),Ci(e)?(u=t(e,u,r),-1<u?e[u]:m):st(e,u,n)}}function nr(n){return function(r,e,u){return r&&r.length?(e=dr(e,u,3),t(r,e,n)):-1}}function tr(n){
return function(t,r,e){return r=dr(r,e,3),st(t,r,n,true)}}function rr(n){return function(){for(var t,r=arguments.length,e=n?r:-1,u=0,i=Be(r);n?e--:++e<r;){var o=i[u++]=arguments[e];if(typeof o!="function")throw new Je(L);!t&&Nn.prototype.thru&&"wrapper"==mr(o)&&(t=new Nn([]))}for(e=t?-1:r;++e<r;){var o=i[e],u=mr(o),f="wrapper"==u?Du(o):null;t=f&&Wr(f[0])&&f[1]==(I|A|O|E)&&!f[4].length&&1==f[9]?t[mr(f[0])].apply(t,f[3]):1==o.length&&Wr(o)?t[u]():t.thru(o)}return function(){var n=arguments;if(t&&1==n.length&&Ci(n[0]))return t.plant(n[0]).value();
for(var e=0,n=r?i[e].apply(this,n):n[0];++e<r;)n=i[e].call(this,n);return n}}}function er(n,t){return function(r,e,u){return typeof e=="function"&&u===m&&Ci(r)?n(r,e):t(r,Bt(e,u,3))}}function ur(n){return function(t,r,e){return(typeof r!="function"||e!==m)&&(r=Bt(r,e,3)),n(t,r,Ae)}}function ir(n){return function(t,r,e){return(typeof r!="function"||e!==m)&&(r=Bt(r,e,3)),n(t,r)}}function or(n){return function(t,r,e){var u={};return r=dr(r,e,3),_t(t,function(t,e,i){i=r(t,e,i),e=n?i:e,t=n?t:i,u[e]=t}),
u}}function fr(n){return function(t,r,e){return t=u(t),(n?t:"")+sr(t,r,e)+(n?"":t)}}function lr(n){var t=ae(function(r,e){var u=_(e,t.placeholder);return _r(r,n,null,e,u)});return t}function ar(n,t){return function(r,e,u,i){var o=3>arguments.length;return typeof e=="function"&&i===m&&Ci(r)?n(r,e,u,o):It(r,dr(e,i,4),u,o,t)}}function cr(n,t,r,e,u,i,o,f,l,a){function c(){for(var w=arguments.length,j=w,A=Be(w);j--;)A[j]=arguments[j];if(e&&(A=Pt(A,e,u)),i&&(A=qt(A,i,o)),v||y){var j=c.placeholder,k=_(A,j),w=w-k.length;
if(w<a){var I=f?qn(f):null,w=ju(a-w,0),E=v?k:null,k=v?null:k,C=v?A:null,A=v?null:A;return t|=v?O:R,t&=~(v?R:O),g||(t&=~(b|x)),A=[n,t,r,C,E,A,k,I,l,w],I=cr.apply(m,A),Wr(n)&&Zu(I,A),I.placeholder=j,I}}if(j=p?r:this,I=h?j[n]:n,f)for(w=A.length,E=Au(f.length,w),k=qn(A);E--;)C=f[E],A[E]=Ir(C,w)?k[C]:m;return s&&l<A.length&&(A.length=l),this&&this!==Zn&&this instanceof c&&(I=d||Xt(n)),I.apply(j,A)}var s=t&I,p=t&b,h=t&x,v=t&A,g=t&j,y=t&k,d=h?null:Xt(n);return c}function sr(n,t,r){return n=n.length,t=+t,
n<t&&bu(t)?(t-=n,r=null==r?" ":r+"",Ce(r,lu(t/r.length)).slice(0,t)):""}function pr(n,t,r,e){function u(){for(var t=-1,f=arguments.length,l=-1,a=e.length,c=Be(f+a);++l<a;)c[l]=e[l];for(;f--;)c[l++]=arguments[++t];return(this&&this!==Zn&&this instanceof u?o:n).apply(i?r:this,c)}var i=t&b,o=Xt(n);return u}function hr(n){return function(t,r,e,u){var i=dr(e);return null==e&&i===ut?Nt(t,r,n):zt(t,r,i(e,u,1),n)}}function _r(n,t,r,e,u,i,o,f){var l=t&x;if(!l&&typeof n!="function")throw new Je(L);var a=e?e.length:0;
if(a||(t&=~(O|R),e=u=null),a-=u?u.length:0,t&R){var c=e,s=u;e=u=null}var p=l?null:Du(n);return r=[n,t,r,e,u,c,s,i,o,f],p&&(e=r[1],t=p[1],f=e|t,u=t==I&&e==A||t==I&&e==E&&r[7].length<=p[8]||t==(I|E)&&e==A,(f<I||u)&&(t&b&&(r[2]=p[2],f|=e&b?0:j),(e=p[3])&&(u=r[3],r[3]=u?Pt(u,e,p[4]):qn(e),r[4]=u?_(r[3],N):qn(p[4])),(e=p[5])&&(u=r[5],r[5]=u?qt(u,e,p[6]):qn(e),r[6]=u?_(r[5],N):qn(p[6])),(e=p[7])&&(r[7]=qn(e)),t&I&&(r[8]=null==r[8]?p[8]:Au(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=f),t=r[1],f=r[9]),
r[9]=null==f?l?0:n.length:ju(f-a,0)||0,(p?Pu:Zu)(t==b?Yt(r[0],r[2]):t!=O&&t!=(b|O)||r[4].length?cr.apply(m,r):pr.apply(m,r),r)}function vr(n,t,r,e,u,i,o){var f=-1,l=n.length,a=t.length;if(l!=a&&(!u||a<=l))return false;for(;++f<l;){var c=n[f],a=t[f],s=e?e(u?a:c,u?c:a,f):m;if(s!==m){if(s)continue;return false}if(u){if(!Gn(t,function(n){return c===n||r(c,n,e,u,i,o)}))return false}else if(c!==a&&!r(c,a,e,u,i,o))return false}return true}function gr(n,t,r){switch(r){case M:case P:return+n==+t;case q:return n.name==t.name&&n.message==t.message;
case K:return n!=+n?t!=+t:n==+t;case V:case Y:return n==t+""}return false}function yr(n,t,r,e,u,i,o){var f=Pi(n),l=f.length,a=Pi(t).length;if(l!=a&&!u)return false;for(a=l;a--;){var c=f[a];if(!(u?c in t:tu.call(t,c)))return false}for(var s=u;++a<l;){var c=f[a],p=n[c],h=t[c],_=e?e(u?h:p,u?p:h,c):m;if(_===m?!r(p,h,e,u,i,o):!_)return false;s||(s="constructor"==c)}return s||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false;
}function dr(n,t,r){var e=Fn.callback||Ue,e=e===Ue?ut:e;return r?e(n,t,r):e}function mr(n){for(var t=n.name,r=$u[t],e=r?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function wr(n,t,e){var u=Fn.indexOf||Dr,u=u===Dr?r:u;return n?u(n,t,e):u}function br(n){n=ke(n);for(var t=n.length;t--;){var r=n[t][1];n[t][2]=r===r&&!ve(r)}return n}function xr(n,t){var r=null==n?m:n[t];return ge(r)?r:m}function jr(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&tu.call(n,"index")&&(r.index=n.index,
r.input=n.input),r}function Ar(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Ze),new n}function kr(n,t,r){var e=n.constructor;switch(t){case J:return Mt(n);case M:case P:return new e(+n);case X:case G:case H:case Q:case nn:case tn:case rn:case en:case un:return t=n.buffer,new e(r?Mt(t):t,n.byteOffset,n.length);case K:case Y:return new e(n);case V:var u=new e(n.source,An.exec(n));u.lastIndex=n.lastIndex}return u}function Or(n,t,r){return null==n||Cr(t,n)||(t=zr(t),n=1==t.length?n:yt(n,Et(t,0,-1)),
t=Kr(t)),t=null==n?n:n[t],null==t?m:t.apply(n,r)}function Rr(n){return null!=n&&Sr(Ku(n))}function Ir(n,t){return n=typeof n=="number"?n:parseFloat(n),t=null==t?Uu:t,-1<n&&0==n%1&&n<t}function Er(n,t,r){if(!ve(r))return false;var e=typeof t;return("number"==e?Rr(r)&&Ir(t,r.length):"string"==e&&t in r)?(t=r[t],n===n?n===t:t!==t):false}function Cr(n,t){var r=typeof n;return"string"==r&&yn.test(n)||"number"==r?true:Ci(n)?false:!gn.test(n)||null!=t&&n in Nr(t)}function Wr(n){var t=mr(n);return!!t&&n===Fn[t]&&t in zn.prototype;
}function Sr(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=Uu}function Ur(n,t){n=Nr(n);for(var r=-1,e=t.length,u={};++r<e;){var i=t[r];i in n&&(u[i]=n[i])}return u}function Tr(n,t){var r={};return ht(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function $r(n){var t;if(!p(n)||eu.call(n)!=Z||!(tu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return ht(n,function(n,t){r=t}),r===m||tu.call(n,r)}function Fr(n){for(var t=Ae(n),r=t.length,e=r&&n.length,u=!!e&&Sr(e)&&(Ci(n)||se(n)),i=-1,o=[];++i<r;){
var f=t[i];(u&&Ir(f,e)||tu.call(n,f))&&o.push(f)}return o}function Lr(n){return null==n?[]:Rr(n)?ve(n)?n:Ze(n):Oe(n)}function Nr(n){return ve(n)?n:Ze(n)}function zr(n){if(Ci(n))return n;var t=[];return u(n).replace(dn,function(n,r,e,u){t.push(e?u.replace(xn,"$1"):r||n)}),t}function Br(n){return n instanceof zn?n.clone():new Nn(n.__wrapped__,n.__chain__,qn(n.__actions__))}function Mr(n,t,r){return n&&n.length?((r?Er(n,t,r):null==t)&&(t=1),Et(n,0>t?0:t)):[]}function Pr(n,t,r){var e=n?n.length:0;return e?((r?Er(n,t,r):null==t)&&(t=1),
t=e-(+t||0),Et(n,0,0>t?0:t)):[]}function qr(n){return n?n[0]:m}function Dr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?ju(u+e,0):e;else if(e)return e=Nt(n,t),n=n[e],(t===t?t===n:n!==n)?e:-1;return r(n,t,e||0)}function Kr(n){var t=n?n.length:0;return t?n[t-1]:m}function Zr(n){return Mr(n,1)}function Vr(n,t,e,u){if(!n||!n.length)return[];null!=t&&typeof t!="boolean"&&(u=e,e=Er(n,t,u)?null:t,t=false);var i=dr();if((null!=e||i!==ut)&&(e=i(e,u,3)),t&&wr()==r){t=e;var o;e=-1,u=n.length;
for(var i=-1,f=[];++e<u;){var l=n[e],a=t?t(l,e,n):l;e&&o===a||(o=a,f[++i]=l)}n=f}else n=Tt(n,e);return n}function Yr(n){if(!n||!n.length)return[];var t=-1,r=0;n=Yn(n,function(n){return Rr(n)?(r=ju(n.length,r),true):void 0});for(var e=Be(r);++t<r;)e[t]=Jn(n,At(t));return e}function Jr(n,t,r){return n&&n.length?(n=Yr(n),null==t?n:(t=Bt(t,r,4),Jn(n,function(n){return Xn(n,t,m,true)}))):[]}function Xr(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||Ci(n[0])||(t=[]);++r<e;){var i=n[r];t?u[i]=t[r]:i&&(u[i[0]]=i[1]);
}return u}function Gr(n){return n=Fn(n),n.__chain__=true,n}function Hr(n,t,r){return t.call(r,n)}function Qr(n,t,r){var e=Ci(n)?Kn:lt;return r&&Er(n,t,r)&&(t=null),(typeof t!="function"||r!==m)&&(t=dr(t,r,3)),e(n,t)}function ne(n,t,r){var e=Ci(n)?Yn:ct;return t=dr(t,r,3),e(n,t)}function te(n,t,r,e){var u=n?Ku(n):0;return Sr(u)||(n=Oe(n),u=n.length),u?(r=typeof r!="number"||e&&Er(t,r,e)?0:0>r?ju(u+r,0):r||0,typeof n=="string"||!Ci(n)&&me(n)?r<u&&-1<n.indexOf(t,r):-1<wr(n,t,r)):false}function re(n,t,r){
var e=Ci(n)?Jn:wt;return t=dr(t,r,3),e(n,t)}function ee(n,t,r){return(r?Er(n,t,r):null==t)?(n=Lr(n),t=n.length,0<t?n[Rt(0,t-1)]:m):(n=ue(n),n.length=Au(0>t?0:+t||0,n.length),n)}function ue(n){n=Lr(n);for(var t=-1,r=n.length,e=Be(r);++t<r;){var u=Rt(0,t);t!=u&&(e[t]=e[u]),e[u]=n[t]}return e}function ie(n,t,r){var e=Ci(n)?Gn:Ct;return r&&Er(n,t,r)&&(t=null),(typeof t!="function"||r!==m)&&(t=dr(t,r,3)),e(n,t)}function oe(n,t){var r;if(typeof t!="function"){if(typeof n!="function")throw new Je(L);var e=n;
n=t,t=e}return function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}}function fe(n,t,r){function e(){var r=t-(yi()-a);0>=r||r>t?(f&&au(f),r=p,f=s=p=m,r&&(h=yi(),l=n.apply(c,o),s||f||(o=c=null))):s=_u(e,r)}function u(){s&&au(s),f=s=p=m,(v||_!==t)&&(h=yi(),l=n.apply(c,o),s||f||(o=c=null))}function i(){if(o=arguments,a=yi(),c=this,p=v&&(s||!g),false===_)var r=g&&!s;else{f||g||(h=a);var i=_-(a-h),y=0>=i||i>_;y?(f&&(f=au(f)),h=a,l=n.apply(c,o)):f||(f=_u(u,i))}return y&&s?s=au(s):s||t===_||(s=_u(e,t)),
r&&(y=true,l=n.apply(c,o)),!y||s||f||(o=c=null),l}var o,f,l,a,c,s,p,h=0,_=false,v=true;if(typeof n!="function")throw new Je(L);if(t=0>t?0:+t||0,true===r)var g=true,v=false;else ve(r)&&(g=r.leading,_="maxWait"in r&&ju(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return i.cancel=function(){s&&au(s),f&&au(f),f=s=p=m},i}function le(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new Je(L);
return r.cache=new le.Cache,r}function ae(n,t){if(typeof n!="function")throw new Je(L);return t=ju(t===m?n.length-1:+t||0,0),function(){for(var r=arguments,e=-1,u=ju(r.length-t,0),i=Be(u);++e<u;)i[e]=r[t+e];switch(t){case 0:return n.call(this,i);case 1:return n.call(this,r[0],i);case 2:return n.call(this,r[0],r[1],i)}for(u=Be(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=i,n.apply(this,u)}}function ce(n,t){return n>t}function se(n){return p(n)&&Rr(n)&&eu.call(n)==z}function pe(n){return!!n&&1===n.nodeType&&p(n)&&-1<eu.call(n).indexOf("Element");
}function he(n,t,r,e){return e=(r=typeof r=="function"?Bt(r,e,3):m)?r(n,t):m,e===m?dt(n,t,r):!!e}function _e(n){return p(n)&&typeof n.message=="string"&&eu.call(n)==q}function ve(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function ge(n){return null==n?false:eu.call(n)==D?iu.test(nu.call(n)):p(n)&&On.test(n)}function ye(n){return typeof n=="number"||p(n)&&eu.call(n)==K}function de(n){return p(n)&&eu.call(n)==V}function me(n){return typeof n=="string"||p(n)&&eu.call(n)==Y}function we(n){return p(n)&&Sr(n.length)&&!!Un[eu.call(n)];
}function be(n,t){return n<t}function xe(n){return et(n,Ae(n))}function je(n){return gt(n,Ae(n))}function Ae(n){if(null==n)return[];ve(n)||(n=Ze(n));for(var t=n.length,t=t&&Sr(t)&&(Ci(n)||se(n))&&t||0,r=n.constructor,e=-1,r=typeof r=="function"&&r.prototype===n,u=Be(t),i=0<t;++e<t;)u[e]=e+"";for(var o in n)i&&Ir(o,t)||"constructor"==o&&(r||!tu.call(n,o))||u.push(o);return u}function ke(n){n=Nr(n);for(var t=-1,r=Pi(n),e=r.length,u=Be(e);++t<e;){var i=r[t];u[t]=[i,n[i]]}return u}function Oe(n){return $t(n,Pi(n));
}function Re(n){return(n=u(n))&&n.replace(Rn,l).replace(bn,"")}function Ie(n){return(n=u(n))&&wn.test(n)?n.replace(mn,"\\$&"):n}function Ee(n,t,r){return r&&Er(n,t,r)&&(t=0),Ru(n,t)}function Ce(n,t){var r="";if(n=u(n),t=+t,1>t||!n||!bu(t))return r;do t%2&&(r+=n),t=cu(t/2),n+=n;while(t);return r}function We(n,t,r){var e=n;return(n=u(n))?(r?Er(e,t,r):null==t)?n.slice(v(n),g(n)+1):(t+="",n.slice(i(n,t),o(n,t)+1)):n}function Se(n,t,r){return r&&Er(n,t,r)&&(t=null),n=u(n),n.match(t||Cn)||[]}function Ue(n,t,r){
return r&&Er(n,t,r)&&(t=null),p(n)?Fe(n):ut(n,t)}function Te(n){return function(){return n}}function $e(n){return n}function Fe(n){return bt(it(n,true))}function Le(n,t,r){if(null==r){var e=ve(t),u=e?Pi(t):null;((u=u&&u.length?gt(t,u):null)?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=gt(t,Pi(t)));var i=true,e=-1,o=Si(n),f=u.length;false===r?i=false:ve(r)&&"chain"in r&&(i=r.chain);for(;++e<f;){r=u[e];var l=t[r];n[r]=l,o&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);
return(e.__actions__=qn(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return r=[this.value()],pu.apply(r,arguments),t.apply(n,r)}}(l))}return n}function Ne(){}function ze(n){return Cr(n)?At(n):kt(n)}h=h?Vn.defaults(Zn.Object(),h,Vn.pick(Zn,Sn)):Zn;var Be=h.Array,Me=h.Date,Pe=h.Error,qe=h.Function,De=h.Math,Ke=h.Number,Ze=h.Object,Ve=h.RegExp,Ye=h.String,Je=h.TypeError,Xe=Be.prototype,Ge=Ze.prototype,He=Ye.prototype,Qe=(Qe=h.window)?Qe.document:null,nu=qe.prototype.toString,tu=Ge.hasOwnProperty,ru=0,eu=Ge.toString,uu=h._,iu=Ve("^"+Ie(nu.call(tu)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ou=xr(h,"ArrayBuffer"),fu=xr(ou&&new ou(0),"slice"),lu=De.ceil,au=h.clearTimeout,cu=De.floor,su=xr(Ze,"getPrototypeOf"),pu=Xe.push,hu=xr(h,"Set"),_u=h.setTimeout,vu=Xe.splice,gu=xr(h,"Uint8Array"),yu=xr(h,"WeakMap"),du=function(){
try{var n=xr(h,"Float64Array"),t=new n(new ou(10),0,1)&&n}catch(r){}return t||null}(),mu=xr(Ze,"create"),wu=xr(Be,"isArray"),bu=h.isFinite,xu=xr(Ze,"keys"),ju=De.max,Au=De.min,ku=xr(Me,"now"),Ou=xr(Ke,"isFinite"),Ru=h.parseInt,Iu=De.random,Eu=Ke.POSITIVE_INFINITY,Cu=4294967294,Wu=2147483647,Su=du?du.BYTES_PER_ELEMENT:0,Uu=9007199254740991,Tu=yu&&new yu,$u={},Fu=Fn.support={};!function(n){function t(){this.x=n}var r=[];t.prototype={valueOf:n,y:n};for(var e in new t)r.push(e);try{Fu.dom=11===Qe.createDocumentFragment().nodeType;
}catch(u){Fu.dom=false}}(1,0),Fn.templateSettings={escape:hn,evaluate:_n,interpolate:vn,variable:"",imports:{_:Fn}};var Lu=function(){function n(){}return function(t){if(ve(t)){n.prototype=t;var r=new n;n.prototype=null}return r||{}}}(),Nu=Zt(_t),zu=Zt(vt,true),Bu=Vt(),Mu=Vt(true),Pu=Tu?function(n,t){return Tu.set(n,t),n}:$e;fu||(Mt=ou&&gu?function(n){var t=n.byteLength,r=du?cu(t/Su):0,e=r*Su,u=new ou(t);if(r){var i=new du(u,0,r);i.set(new du(n,0,r))}return t!=e&&(i=new gu(u,e),i.set(new gu(n,e))),u}:Te(null));
var qu=mu&&hu?function(n){return new Mn(n)}:Te(null),Du=Tu?function(n){return Tu.get(n)}:Ne,Ku=At("length"),Zu=function(){var n=0,t=0;return function(r,e){var u=yi(),i=U-(u-t);if(t=u,0<i){if(++n>=S)return r}else n=0;return Pu(r,e)}}(),Vu=ae(function(n,t){return Rr(n)?ft(n,pt(t,false,true)):[]}),Yu=nr(),Ju=nr(true),Xu=ae(function(n){for(var t=n.length,e=t,u=Be(c),i=wr(),o=i==r,f=[];e--;){var l=n[e]=Rr(l=n[e])?l:[];u[e]=o&&120<=l.length?qu(e&&l):null}var o=n[0],a=-1,c=o?o.length:0,s=u[0];n:for(;++a<c;)if(l=o[a],
0>(s?Pn(s,l):i(f,l,0))){for(e=t;--e;){var p=u[e];if(0>(p?Pn(p,l):i(n[e],l,0)))continue n}s&&s.push(l),f.push(l)}return f}),Gu=ae(function(t,r){r=pt(r);var e=rt(t,r);return Ot(t,r.sort(n)),e}),Hu=hr(),Qu=hr(true),ni=ae(function(n){return Tt(pt(n,false,true))}),ti=ae(function(n,t){return Rr(n)?ft(n,t):[]}),ri=ae(Yr),ei=ae(function(n){var t=n.length,r=2<t?n[t-2]:m,e=1<t?n[t-1]:m;return 2<t&&typeof r=="function"?t-=2:(r=1<t&&typeof e=="function"?(--t,e):m,e=m),n.length=t,Jr(n,r,e)}),ui=ae(function(n,t){return rt(n,pt(t));
}),ii=Dt(function(n,t,r){tu.call(n,r)?++n[r]:n[r]=1}),oi=Qt(Nu),fi=Qt(zu,true),li=er(Dn,Nu),ai=er(function(n,t){for(var r=n.length;r--&&false!==t(n[r],r,n););return n},zu),ci=Dt(function(n,t,r){tu.call(n,r)?n[r].push(t):n[r]=[t]}),si=Dt(function(n,t,r){n[r]=t}),pi=ae(function(n,t,r){var e=-1,u=typeof t=="function",i=Cr(t),o=Rr(n)?Be(n.length):[];return Nu(n,function(n){var f=u?t:i&&null!=n?n[t]:null;o[++e]=f?f.apply(n,r):Or(n,t,r)}),o}),hi=Dt(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),_i=ar(Xn,Nu),vi=ar(function(n,t,r,e){
var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r},zu),gi=ae(function(n,t){if(null==n)return[];var r=t[2];return r&&Er(t[0],t[1],r)&&(t.length=1),St(n,pt(t),[])}),yi=ku||function(){return(new Me).getTime()},di=ae(function(n,t,r){var e=b;if(r.length)var u=_(r,di.placeholder),e=e|O;return _r(n,e,t,r,u)}),mi=ae(function(n,t){t=t.length?pt(t):je(n);for(var r=-1,e=t.length;++r<e;){var u=t[r];n[u]=_r(n[u],b,n)}return n}),wi=ae(function(n,t,r){var e=b|x;if(r.length)var u=_(r,wi.placeholder),e=e|O;
return _r(t,e,n,r,u)}),bi=Gt(A),xi=Gt(k),ji=ae(function(n,t){return ot(n,1,t)}),Ai=ae(function(n,t,r){return ot(n,t,r)}),ki=rr(),Oi=rr(true),Ri=lr(O),Ii=lr(R),Ei=ae(function(n,t){return _r(n,E,null,null,null,pt(t))}),Ci=wu||function(n){return p(n)&&Sr(n.length)&&eu.call(n)==B};Fu.dom||(pe=function(n){return!!n&&1===n.nodeType&&p(n)&&!Ui(n)});var Wi=Ou||function(n){return typeof n=="number"&&bu(n)},Si=e(/x/)||gu&&!e(gu)?function(n){return eu.call(n)==D}:e,Ui=su?function(n){if(!n||eu.call(n)!=Z)return false;
var t=xr(n,"valueOf"),r=t&&(r=su(t))&&su(r);return r?n==r||su(n)==r:$r(n)}:$r,Ti=Kt(function(n,t,r){return r?nt(n,t,r):tt(n,t)}),$i=ae(function(n){var t=n[0];return null==t?t:(n.push(Hn),Ti.apply(m,n))}),Fi=tr(_t),Li=tr(vt),Ni=ur(Bu),zi=ur(Mu),Bi=ir(_t),Mi=ir(vt),Pi=xu?function(n){var t=null==n?null:n.constructor;return typeof t=="function"&&t.prototype===n||typeof n!="function"&&Rr(n)?Fr(n):ve(n)?xu(n):[]}:Fr,qi=or(true),Di=or(),Ki=Kt(jt),Zi=ae(function(n,t){if(null==n)return{};if("function"!=typeof t[0])return t=Jn(pt(t),Ye),
Ur(n,ft(Ae(n),t));var r=Bt(t[0],t[1],3);return Tr(n,function(n,t,e){return!r(n,t,e)})}),Vi=ae(function(n,t){return null==n?{}:"function"==typeof t[0]?Tr(n,Bt(t[0],t[1],3)):Ur(n,pt(t))}),Yi=Jt(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t)}),Ji=Jt(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Xi=fr(),Gi=fr(true);8!=Ru(Wn+"08")&&(Ee=function(n,t,r){return(r?Er(n,t,r):null==t)?t=0:t&&(t=+t),n=We(n),Ru(n,t||(kn.test(n)?16:10))});var Hi=Jt(function(n,t,r){return n+(r?"_":"")+t.toLowerCase();
}),Qi=Jt(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),no=ae(function(n,t){try{return n.apply(m,t)}catch(r){return _e(r)?r:new Pe(r)}}),to=ae(function(n,t){return function(r){return Or(r,n,t)}}),ro=ae(function(n,t){return function(r){return Or(n,r,t)}}),eo=Ht(ce,-(1/0)),uo=Ht(be,1/0);return Fn.prototype=Ln.prototype,Nn.prototype=Lu(Ln.prototype),Nn.prototype.constructor=Nn,zn.prototype=Lu(Ln.prototype),zn.prototype.constructor=zn,Bn.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n];
},Bn.prototype.get=function(n){return"__proto__"==n?m:this.__data__[n]},Bn.prototype.has=function(n){return"__proto__"!=n&&tu.call(this.__data__,n)},Bn.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Mn.prototype.push=function(n){var t=this.data;typeof n=="string"||ve(n)?t.set.add(n):t.hash[n]=true},le.Cache=Bn,Fn.after=function(n,t){if(typeof t!="function"){if(typeof n!="function")throw new Je(L);var r=n;n=t,t=r}return n=bu(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0;
}},Fn.ary=function(n,t,r){return r&&Er(n,t,r)&&(t=null),t=n&&null==t?n.length:ju(+t||0,0),_r(n,I,null,null,null,null,t)},Fn.assign=Ti,Fn.at=ui,Fn.before=oe,Fn.bind=di,Fn.bindAll=mi,Fn.bindKey=wi,Fn.callback=Ue,Fn.chain=Gr,Fn.chunk=function(n,t,r){t=(r?Er(n,t,r):null==t)?1:ju(+t||1,1),r=0;for(var e=n?n.length:0,u=-1,i=Be(lu(e/t));r<e;)i[++u]=Et(n,r,r+=t);return i},Fn.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var i=n[t];i&&(u[++e]=i)}return u},Fn.constant=Te,Fn.countBy=ii,Fn.create=function(n,t,r){
var e=Lu(n);return r&&Er(n,t,r)&&(t=null),t?tt(e,t):e},Fn.curry=bi,Fn.curryRight=xi,Fn.debounce=fe,Fn.defaults=$i,Fn.defer=ji,Fn.delay=Ai,Fn.difference=Vu,Fn.drop=Mr,Fn.dropRight=Pr,Fn.dropRightWhile=function(n,t,r){return n&&n.length?Ft(n,dr(t,r,3),true,true):[]},Fn.dropWhile=function(n,t,r){return n&&n.length?Ft(n,dr(t,r,3),true):[]},Fn.fill=function(n,t,r,e){var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&Er(n,t,r)&&(r=0,e=u),u=n.length,r=null==r?0:+r||0,0>r&&(r=-r>u?0:u+r),e=e===m||e>u?u:+e||0,
0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;r<u;)n[r++]=t;return n},Fn.filter=ne,Fn.flatten=function(n,t,r){var e=n?n.length:0;return r&&Er(n,t,r)&&(t=false),e?pt(n,t):[]},Fn.flattenDeep=function(n){return n&&n.length?pt(n,true):[]},Fn.flow=ki,Fn.flowRight=Oi,Fn.forEach=li,Fn.forEachRight=ai,Fn.forIn=Ni,Fn.forInRight=zi,Fn.forOwn=Bi,Fn.forOwnRight=Mi,Fn.functions=je,Fn.groupBy=ci,Fn.indexBy=si,Fn.initial=function(n){return Pr(n,1)},Fn.intersection=Xu,Fn.invert=function(n,t,r){r&&Er(n,t,r)&&(t=null),r=-1;for(var e=Pi(n),u=e.length,i={};++r<u;){
var o=e[r],f=n[o];t?tu.call(i,f)?i[f].push(o):i[f]=[o]:i[f]=o}return i},Fn.invoke=pi,Fn.keys=Pi,Fn.keysIn=Ae,Fn.map=re,Fn.mapKeys=qi,Fn.mapValues=Di,Fn.matches=Fe,Fn.matchesProperty=function(n,t){return xt(n,it(t,true))},Fn.memoize=le,Fn.merge=Ki,Fn.method=to,Fn.methodOf=ro,Fn.mixin=Le,Fn.negate=function(n){if(typeof n!="function")throw new Je(L);return function(){return!n.apply(this,arguments)}},Fn.omit=Zi,Fn.once=function(n){return oe(2,n)},Fn.pairs=ke,Fn.partial=Ri,Fn.partialRight=Ii,Fn.partition=hi,
Fn.pick=Vi,Fn.pluck=function(n,t){return re(n,ze(t))},Fn.property=ze,Fn.propertyOf=function(n){return function(t){return yt(n,zr(t),t+"")}},Fn.pull=function(){var n=arguments,t=n[0];if(!t||!t.length)return t;for(var r=0,e=wr(),u=n.length;++r<u;)for(var i=0,o=n[r];-1<(i=e(t,o,i));)vu.call(t,i,1);return t},Fn.pullAt=Gu,Fn.range=function(n,t,r){r&&Er(n,t,r)&&(t=r=null),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=ju(lu((t-n)/(r||1)),0);for(var u=Be(t);++e<t;)u[e]=n,n+=r;return u},Fn.rearg=Ei,
Fn.reject=function(n,t,r){var e=Ci(n)?Yn:ct;return t=dr(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Fn.remove=function(n,t,r){var e=[];if(!n||!n.length)return e;var u=-1,i=[],o=n.length;for(t=dr(t,r,3);++u<o;)r=n[u],t(r,u,n)&&(e.push(r),i.push(u));return Ot(n,i),e},Fn.rest=Zr,Fn.restParam=ae,Fn.set=function(n,t,r){if(null==n)return n;var e=t+"";t=null!=n[e]||Cr(t,n)?[e]:zr(t);for(var e=-1,u=t.length,i=u-1,o=n;null!=o&&++e<u;){var f=t[e];ve(o)&&(e==i?o[f]=r:null==o[f]&&(o[f]=Ir(t[e+1])?[]:{})),o=o[f];
}return n},Fn.shuffle=ue,Fn.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&Er(n,t,r)&&(t=0,r=e),Et(n,t,r)):[]},Fn.sortBy=function(n,t,r){if(null==n)return[];r&&Er(n,t,r)&&(t=null);var e=-1;return t=dr(t,r,3),n=wt(n,function(n,r,u){return{a:t(n,r,u),b:++e,c:n}}),Wt(n,f)},Fn.sortByAll=gi,Fn.sortByOrder=function(n,t,r,e){return null==n?[]:(e&&Er(t,r,e)&&(r=null),Ci(t)||(t=null==t?[]:[t]),Ci(r)||(r=null==r?[]:[r]),St(n,t,r))},Fn.spread=function(n){if(typeof n!="function")throw new Je(L);
return function(t){return n.apply(this,t)}},Fn.take=function(n,t,r){return n&&n.length?((r?Er(n,t,r):null==t)&&(t=1),Et(n,0,0>t?0:t)):[]},Fn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?Er(n,t,r):null==t)&&(t=1),t=e-(+t||0),Et(n,0>t?0:t)):[]},Fn.takeRightWhile=function(n,t,r){return n&&n.length?Ft(n,dr(t,r,3),false,true):[]},Fn.takeWhile=function(n,t,r){return n&&n.length?Ft(n,dr(t,r,3)):[]},Fn.tap=function(n,t,r){return t.call(r,n),n},Fn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Je(L);
return false===r?e=false:ve(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),$n.leading=e,$n.maxWait=+t,$n.trailing=u,fe(n,t,$n)},Fn.thru=Hr,Fn.times=function(n,t,r){if(n=cu(n),1>n||!bu(n))return[];var e=-1,u=Be(Au(n,4294967295));for(t=Bt(t,r,1);++e<n;)4294967295>e?u[e]=t(e):t(e);return u},Fn.toArray=function(n){var t=n?Ku(n):0;return Sr(t)?t?qn(n):[]:Oe(n)},Fn.toPlainObject=xe,Fn.transform=function(n,t,r,e){var u=Ci(n)||we(n);return t=dr(t,e,4),null==r&&(u||ve(n)?(e=n.constructor,r=u?Ci(n)?new e:[]:Lu(Si(e)?e.prototype:null)):r={}),
(u?Dn:_t)(n,function(n,e,u){return t(r,n,e,u)}),r},Fn.union=ni,Fn.uniq=Vr,Fn.unzip=Yr,Fn.unzipWith=Jr,Fn.values=Oe,Fn.valuesIn=function(n){return $t(n,Ae(n))},Fn.where=function(n,t){return ne(n,bt(t))},Fn.without=ti,Fn.wrap=function(n,t){return t=null==t?$e:t,_r(t,O,null,[n],[])},Fn.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(Rr(r))var e=e?ft(e,r).concat(ft(r,e)):r}return e?Tt(e):[]},Fn.zip=ri,Fn.zipObject=Xr,Fn.zipWith=ei,Fn.backflow=Oi,Fn.collect=re,Fn.compose=Oi,
Fn.each=li,Fn.eachRight=ai,Fn.extend=Ti,Fn.iteratee=Ue,Fn.methods=je,Fn.object=Xr,Fn.select=ne,Fn.tail=Zr,Fn.unique=Vr,Le(Fn,Fn),Fn.add=function(n,t){return(+n||0)+(+t||0)},Fn.attempt=no,Fn.camelCase=Yi,Fn.capitalize=function(n){return(n=u(n))&&n.charAt(0).toUpperCase()+n.slice(1)},Fn.clone=function(n,t,r,e){return t&&typeof t!="boolean"&&Er(n,t,r)?t=false:typeof t=="function"&&(e=r,r=t,t=false),typeof r=="function"?it(n,t,Bt(r,e,1)):it(n,t)},Fn.cloneDeep=function(n,t,r){return typeof t=="function"?it(n,true,Bt(t,r,1)):it(n,true);
},Fn.deburr=Re,Fn.endsWith=function(n,t,r){n=u(n),t+="";var e=n.length;return r=r===m?e:Au(0>r?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Fn.escape=function(n){return(n=u(n))&&pn.test(n)?n.replace(cn,a):n},Fn.escapeRegExp=Ie,Fn.every=Qr,Fn.find=oi,Fn.findIndex=Yu,Fn.findKey=Fi,Fn.findLast=fi,Fn.findLastIndex=Ju,Fn.findLastKey=Li,Fn.findWhere=function(n,t){return oi(n,bt(t))},Fn.first=qr,Fn.get=function(n,t,r){return n=null==n?m:yt(n,zr(t),t+""),n===m?r:n},Fn.gt=ce,Fn.gte=function(n,t){return n>=t;
},Fn.has=function(n,t){if(null==n)return false;var r=tu.call(n,t);if(!r&&!Cr(t)){if(t=zr(t),n=1==t.length?n:yt(n,Et(t,0,-1)),null==n)return false;t=Kr(t),r=tu.call(n,t)}return r||Sr(n.length)&&Ir(t,n.length)&&(Ci(n)||se(n))},Fn.identity=$e,Fn.includes=te,Fn.indexOf=Dr,Fn.inRange=function(n,t,r){return t=+t||0,"undefined"===typeof r?(r=t,t=0):r=+r||0,n>=Au(t,r)&&n<ju(t,r)},Fn.isArguments=se,Fn.isArray=Ci,Fn.isBoolean=function(n){return true===n||false===n||p(n)&&eu.call(n)==M},Fn.isDate=function(n){return p(n)&&eu.call(n)==P;
},Fn.isElement=pe,Fn.isEmpty=function(n){return null==n?true:Rr(n)&&(Ci(n)||me(n)||se(n)||p(n)&&Si(n.splice))?!n.length:!Pi(n).length},Fn.isEqual=he,Fn.isError=_e,Fn.isFinite=Wi,Fn.isFunction=Si,Fn.isMatch=function(n,t,r,e){return r=typeof r=="function"?Bt(r,e,3):m,mt(n,br(t),r)},Fn.isNaN=function(n){return ye(n)&&n!=+n},Fn.isNative=ge,Fn.isNull=function(n){return null===n},Fn.isNumber=ye,Fn.isObject=ve,Fn.isPlainObject=Ui,Fn.isRegExp=de,Fn.isString=me,Fn.isTypedArray=we,Fn.isUndefined=function(n){
return n===m},Fn.kebabCase=Ji,Fn.last=Kr,Fn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?ju(e+r,0):Au(r||0,e-1))+1;else if(r)return u=Nt(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return s(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Fn.lt=be,Fn.lte=function(n,t){return n<=t},Fn.max=eo,Fn.min=uo,Fn.noConflict=function(){return h._=uu,this},Fn.noop=Ne,Fn.now=yi,Fn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return e<t&&bu(t)?(e=(t-e)/2,
t=cu(e),e=lu(e),r=sr("",e,r),r.slice(0,t)+n+r):n},Fn.padLeft=Xi,Fn.padRight=Gi,Fn.parseInt=Ee,Fn.random=function(n,t,r){r&&Er(n,t,r)&&(t=r=null);var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Iu(),Au(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):Rt(n,t)},Fn.reduce=_i,Fn.reduceRight=vi,Fn.repeat=Ce,Fn.result=function(n,t,r){var e=null==n?m:n[t];return e===m&&(null==n||Cr(t,n)||(t=zr(t),
n=1==t.length?n:yt(n,Et(t,0,-1)),e=null==n?m:n[Kr(t)]),e=e===m?r:e),Si(e)?e.call(n):e},Fn.runInContext=d,Fn.size=function(n){var t=n?Ku(n):0;return Sr(t)?t:Pi(n).length},Fn.snakeCase=Hi,Fn.some=ie,Fn.sortedIndex=Hu,Fn.sortedLastIndex=Qu,Fn.startCase=Qi,Fn.startsWith=function(n,t,r){return n=u(n),r=null==r?0:Au(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Fn.sum=function(n,t,r){r&&Er(n,t,r)&&(t=null);var e=dr(),u=null==t;if(u&&e===ut||(u=false,t=e(t,r,3)),u){for(n=Ci(n)?n:Lr(n),t=n.length,r=0;t--;)r+=+n[t]||0;
n=r}else n=Ut(n,t);return n},Fn.template=function(n,t,r){var e=Fn.templateSettings;r&&Er(n,t,r)&&(t=r=null),n=u(n),t=nt(tt({},r||t),e,Qn),r=nt(tt({},t.imports),e.imports,Qn);var i,o,f=Pi(r),l=$t(r,f),a=0;r=t.interpolate||In;var s="__p+='";r=Ve((t.escape||In).source+"|"+r.source+"|"+(r===vn?jn:In).source+"|"+(t.evaluate||In).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,l){return e||(e=u),s+=n.slice(a,l).replace(En,c),r&&(i=true,s+="'+__e("+r+")+'"),
f&&(o=true,s+="';"+f+";\n__p+='"),e&&(s+="'+((__t=("+e+"))==null?'':__t)+'"),a=l+t.length,t}),s+="';",(t=t.variable)||(s="with(obj){"+s+"}"),s=(o?s.replace(on,""):s).replace(fn,"$1").replace(ln,"$1;"),s="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(i?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+s+"return __p}",t=no(function(){return qe(f,p+"return "+s).apply(m,l)}),t.source=s,_e(t))throw t;return t},Fn.trim=We,Fn.trimLeft=function(n,t,r){
var e=n;return(n=u(n))?n.slice((r?Er(e,t,r):null==t)?v(n):i(n,t+"")):n},Fn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?Er(e,t,r):null==t)?n.slice(0,g(n)+1):n.slice(0,o(n,t+"")+1):n},Fn.trunc=function(n,t,r){r&&Er(n,t,r)&&(t=null);var e=C;if(r=W,null!=t)if(ve(t)){var i="separator"in t?t.separator:i,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==i)return t+r;if(de(i)){if(n.slice(e).search(i)){
var o,f=n.slice(0,e);for(i.global||(i=Ve(i.source,(An.exec(i)||"")+"g")),i.lastIndex=0;n=i.exec(f);)o=n.index;t=t.slice(0,null==o?e:o)}}else n.indexOf(i,e)!=e&&(i=t.lastIndexOf(i),-1<i&&(t=t.slice(0,i)));return t+r},Fn.unescape=function(n){return(n=u(n))&&sn.test(n)?n.replace(an,y):n},Fn.uniqueId=function(n){var t=++ru;return u(n)+t},Fn.words=Se,Fn.all=Qr,Fn.any=ie,Fn.contains=te,Fn.eq=he,Fn.detect=oi,Fn.foldl=_i,Fn.foldr=vi,Fn.head=qr,Fn.include=te,Fn.inject=_i,Le(Fn,function(){var n={};return _t(Fn,function(t,r){
Fn.prototype[r]||(n[r]=t)}),n}(),false),Fn.sample=ee,Fn.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return ee(t,n)}):ee(this.value())},Fn.VERSION=w,Dn("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Fn[n].placeholder=Fn}),Dn(["dropWhile","filter","map","takeWhile"],function(n,t){var r=t!=F,e=t==T;zn.prototype[n]=function(n,u){var i=this.__filtered__,o=i&&e?new zn(this):this.clone();return(o.__iteratees__||(o.__iteratees__=[])).push({done:false,
count:0,index:0,iteratee:dr(n,u,1),limit:-1,type:t}),o.__filtered__=i||r,o}}),Dn(["drop","take"],function(n,t){var r=n+"While";zn.prototype[n]=function(r){var e=this.__filtered__,u=e&&!t?this.dropWhile():this.clone();return r=null==r?1:ju(cu(r)||0,0),e?t?u.__takeCount__=Au(u.__takeCount__,r):Kr(u.__iteratees__).limit=r:(u.__views__||(u.__views__=[])).push({size:r,type:n+(0>u.__dir__?"Right":"")}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()},zn.prototype[n+"RightWhile"]=function(n,t){
return this.reverse()[r](n,t).reverse()}}),Dn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Dn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this[r](1)}}),Dn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?bt:ze;zn.prototype[n]=function(n){return this[r](e(n))}}),zn.prototype.compact=function(){return this.filter($e)},zn.prototype.reject=function(n,t){return n=dr(n,t,1),
this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return 0>n?r=this.takeRight(-n):n&&(r=this.drop(n)),t!==m&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},zn.prototype.toArray=function(){return this.drop(0)},_t(zn.prototype,function(n,t){var r=Fn[t];if(r){var e=/^(?:filter|map|reject)|While$/.test(t),u=/^(?:first|last)$/.test(t);Fn.prototype[t]=function(){function t(n){return n=[n],pu.apply(n,i),r.apply(Fn,n)}var i=arguments,o=this.__chain__,f=this.__wrapped__,l=!!this.__actions__.length,a=f instanceof zn,c=i[0],s=a||Ci(f);
return s&&e&&typeof c=="function"&&1!=c.length&&(a=s=false),a=a&&!l,u&&!o?a?n.call(f):r.call(Fn,this.value()):s?(f=n.apply(a?f:new zn(this),i),u||!l&&!f.__actions__||(f.__actions__||(f.__actions__=[])).push({func:Hr,args:[t],thisArg:Fn}),new Nn(f,o)):this.thru(t)}}}),Dn("concat join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?He:Xe)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(n);Fn.prototype[n]=function(){
var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),_t(zn.prototype,function(n,t){var r=Fn[t];if(r){var e=r.name;($u[e]||($u[e]=[])).push({name:t,func:r})}}),$u[cr(null,x).name]=[{name:"wrapper",func:null}],zn.prototype.clone=function(){var n=this.__actions__,t=this.__iteratees__,r=this.__views__,e=new zn(this.__wrapped__);return e.__actions__=n?qn(n):null,e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=t?qn(t):null,
e.__takeCount__=this.__takeCount__,e.__views__=r?qn(r):null,e},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){var n=this.__wrapped__.value();if(!Ci(n))return Lt(n,this.__actions__);var t,r=this.__dir__,e=0>r;t=n.length;for(var u=this.__views__,i=0,o=-1,f=u?u.length:0;++o<f;){var l=u[o],a=l.size;switch(l.type){case"drop":i+=a;break;case"dropRight":t-=a;break;case"take":
t=Au(t,i+a);break;case"takeRight":i=ju(i,t-a)}}t={start:i,end:t},u=t.start,i=t.end,t=i-u,u=e?i:u-1,i=Au(t,this.__takeCount__),f=(o=this.__iteratees__)?o.length:0,l=0,a=[];n:for(;t--&&l<i;){for(var u=u+r,c=-1,s=n[u];++c<f;){var p=o[c],h=p.iteratee,_=p.type;if(_==T){if(p.done&&(e?u>p.index:u<p.index)&&(p.count=0,p.done=false),p.index=u,!(p.done||(_=p.limit,p.done=-1<_?p.count++>=_:!h(s))))continue n}else if(p=h(s),_==F)s=p;else if(!p){if(_==$)continue n;break n}}a[l++]=s}return a},Fn.prototype.chain=function(){
return Gr(this)},Fn.prototype.commit=function(){return new Nn(this.value(),this.__chain__)},Fn.prototype.plant=function(n){for(var t,r=this;r instanceof Ln;){var e=Br(r);t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},Fn.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof zn?(this.__actions__.length&&(n=new zn(this)),new Nn(n.reverse(),this.__chain__)):this.thru(function(n){return n.reverse()})},Fn.prototype.toString=function(){return this.value()+""},Fn.prototype.run=Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){
return Lt(this.__wrapped__,this.__actions__)},Fn.prototype.collect=Fn.prototype.map,Fn.prototype.head=Fn.prototype.first,Fn.prototype.select=Fn.prototype.filter,Fn.prototype.tail=Fn.prototype.rest,Fn}var m,w="3.9.0",b=1,x=2,j=4,A=8,k=16,O=32,R=64,I=128,E=256,C=30,W="...",S=150,U=16,T=0,$=1,F=2,L="Expected a function",N="__lodash_placeholder__",z="[object Arguments]",B="[object Array]",M="[object Boolean]",P="[object Date]",q="[object Error]",D="[object Function]",K="[object Number]",Z="[object Object]",V="[object RegExp]",Y="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",G="[object Float64Array]",H="[object Int8Array]",Q="[object Int16Array]",nn="[object Int32Array]",tn="[object Uint8Array]",rn="[object Uint8ClampedArray]",en="[object Uint16Array]",un="[object Uint32Array]",on=/\b__p\+='';/g,fn=/\b(__p\+=)''\+/g,ln=/(__e\(.*?\)|\b__t\))\+'';/g,an=/&(?:amp|lt|gt|quot|#39|#96);/g,cn=/[&<>"'`]/g,sn=RegExp(an.source),pn=RegExp(cn.source),hn=/<%-([\s\S]+?)%>/g,_n=/<%([\s\S]+?)%>/g,vn=/<%=([\s\S]+?)%>/g,gn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,yn=/^\w*$/,dn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,mn=/[.*+?^${}()|[\]\/\\]/g,wn=RegExp(mn.source),bn=/[\u0300-\u036f\ufe20-\ufe23]/g,xn=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,An=/\w*$/,kn=/^0[xX]/,On=/^\[object .+?Constructor\]$/,Rn=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,In=/($^)/,En=/['\n\r\u2028\u2029\\]/g,Cn=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),Wn=" \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",Sn="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window".split(" "),Un={};
Un[X]=Un[G]=Un[H]=Un[Q]=Un[nn]=Un[tn]=Un[rn]=Un[en]=Un[un]=true,Un[z]=Un[B]=Un[J]=Un[M]=Un[P]=Un[q]=Un[D]=Un["[object Map]"]=Un[K]=Un[Z]=Un[V]=Un["[object Set]"]=Un[Y]=Un["[object WeakMap]"]=false;var Tn={};Tn[z]=Tn[B]=Tn[J]=Tn[M]=Tn[P]=Tn[X]=Tn[G]=Tn[H]=Tn[Q]=Tn[nn]=Tn[K]=Tn[Z]=Tn[V]=Tn[Y]=Tn[tn]=Tn[rn]=Tn[en]=Tn[un]=true,Tn[q]=Tn[D]=Tn["[object Map]"]=Tn["[object Set]"]=Tn["[object WeakMap]"]=false;var $n={leading:false,maxWait:0,trailing:false},Fn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A",
"\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u",
"\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ln={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Nn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},zn={"function":true,object:true},Bn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,Pn=zn[typeof module]&&module&&!module.nodeType&&module,qn=zn[typeof self]&&self&&self.Object&&self,Dn=zn[typeof window]&&window&&window.Object&&window,Kn=Pn&&Pn.exports===Mn&&Mn,Zn=Mn&&Pn&&typeof global=="object"&&global&&global.Object&&global||Dn!==(this&&this.window)&&Dn||qn||this,Vn=d();
typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=Vn, define(function(){return Vn})):Mn&&Pn?Kn?(Pn.exports=Vn)._=Vn:Mn._=Vn:Zn._=Vn}).call(this);

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,16 @@
{
"name": "lodash",
"version": "3.0.1",
"version": "3.9.0",
"main": "lodash.src.js",
"private": true,
"devDependencies": {
"curl-amd": "0.8.12",
"dojo": "~1.10.2",
"jquery": "~1.11.2",
"dojo": "~1.10.0",
"jquery": "~1.11.0",
"platform": "~1.3.0",
"qunit-extras": "~1.4.0",
"qunitjs": "~1.16.0",
"requirejs": "~2.1.15"
"qunitjs": "~1.18.0",
"requirejs": "~2.1.0"
},
"volo": {
"type": "directory",

View File

@@ -18,7 +18,7 @@
params = root.arguments,
system = root.system;
/** Add `console.log()` support for Narwhal, Rhino, and RingoJS. */
/** Add `console.log()` support for Rhino and RingoJS. */
var console = root.console || (root.console = { 'log': root.print });
/** The file path of the lodash file to test. */
@@ -306,6 +306,10 @@
}\
var strNumbers = numbers + "";\
\
if (typeof assign != "undefined") {\
var _assign = _.assign || _.extend,\
lodashAssign = lodash.assign;\
}\
if (typeof bind != "undefined") {\
var thisArg = { "name": "fred" };\
\
@@ -412,7 +416,7 @@
}\
if (typeof flatten != "undefined") {\
var _flattenDeep = _.flatten([[1]])[0] !== 1,\
lodashFlattenDeep = lodash.flatten([[1]]) !== 1;\
lodashFlattenDeep = lodash.flatten([[1]])[0] !== 1;\
}\
if (typeof isEqual != "undefined") {\
var objectOfPrimitives = {\
@@ -458,10 +462,10 @@
var source = { "num": 9 };\
\
var _findWhere = _.findWhere || _.find,\
_match = (_.matches || _.createCallback || _.noop)(source);\
_matcher = (_.matches || _.createCallback || _.noop)(source);\
\
var lodashFindWhere = lodash.findWhere || lodash.find,\
lodashMatch = (lodash.matches || lodash.createCallback || lodash.noop)(source);\
lodashMatcher = (lodash.matches || lodash.createCallback || lodash.noop)(source);\
}\
if (typeof multiArrays != "undefined") {\
var twentyValues = belt.shuffle(belt.range(20)),\
@@ -564,6 +568,32 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.assign`')
.add(buildName, {
'fn': 'lodashAssign({}, object)',
'teardown': 'function assign(){}'
})
.add(otherName, {
'fn': '_assign({}, object)',
'teardown': 'function assign(){}'
})
);
suites.push(
Benchmark.Suite('`_.assign` with multiple sources')
.add(buildName, {
'fn': 'lodashAssign({}, object, object)',
'teardown': 'function assign(){}'
})
.add(otherName, {
'fn': '_assign({}, object, object)',
'teardown': 'function assign(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.bind` (slow path)')
.add(buildName, {
@@ -866,18 +896,6 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.extend`')
.add(buildName, '\
lodash.extend({}, object)'
)
.add(otherName, '\
_.extend({}, object)'
)
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.filter` iterating an array')
.add(buildName, '\
@@ -920,6 +938,18 @@
)
);
suites.push(
Benchmark.Suite('`_.filter` with `_.matches` predicate')
.add(buildName, {
'fn': 'lodash.filter(objects, lodashMatcher)',
'teardown': 'function matches(){}'
})
.add(otherName, {
'fn': '_.filter(objects, _matcher)',
'teardown': 'function matches(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
@@ -950,10 +980,10 @@
)
);
// Avoid Underscore induced `OutOfMemoryError` in Rhino, Narwhal, and Ringo.
// Avoid Underscore induced `OutOfMemoryError` in Rhino and Ringo.
if (!isJava) {
suites.push(
Benchmark.Suite('`_.find` with `properties`')
Benchmark.Suite('`_.find` with `_.matches` shorthand')
.add(buildName, {
'fn': 'lodashFindWhere(objects, source)',
'teardown': 'function matches(){}'
@@ -1206,7 +1236,7 @@
);
suites.push(
Benchmark.Suite('`_.invoke` with a function for `methodName` iterating an array')
Benchmark.Suite('`_.invoke` with a function for `path` iterating an array')
.add(buildName, '\
lodash.invoke(numbers, Number.prototype.toFixed, 1)'
)
@@ -1441,20 +1471,6 @@
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.matches` predicate')
.add(buildName, {
'fn': 'lodash.filter(objects, lodashMatch)',
'teardown': 'function matches(){}'
})
.add(otherName, {
'fn': '_.filter(objects, _match)',
'teardown': 'function matches(){}'
})
);
/*--------------------------------------------------------------------------*/
suites.push(
Benchmark.Suite('`_.max`')
.add(buildName, '\

View File

@@ -9,17 +9,28 @@
/** Used as the `Set#toString` return value. */
var nativeString = String(Object.prototype.toString).replace(/toString/g, 'Set');
/** Used as a reference to the global object. */
var root = (objectTypes[typeof window] && window) || this;
/** Detect free variable `exports`. */
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
/** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */
var freeGlobal = objectTypes[typeof global] && global;
if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
root = freeGlobal;
}
/** Detect free variable `module`. */
var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
/** Detect free variable `global` from Node.js. */
var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;
/** Detect free variable `self`. */
var freeSelf = objectTypes[typeof self] && self && self.Object && self;
/** Detect free variable `window`. */
var freeWindow = objectTypes[typeof window] && window && window.Object && window;
/**
* Used as a reference to the global object.
*
* The `this` value is used if it is the global object to avoid Greasemonkey's
* restricted `window` object, otherwise the `window` object is used.
*/
var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
/*--------------------------------------------------------------------------*/

View File

@@ -9,17 +9,28 @@
/** Used as the `WeakMap#toString` return value. */
var nativeString = String(Object.prototype.toString).replace(/toString/g, 'WeakMap');
/** Used as a reference to the global object. */
var root = (objectTypes[typeof window] && window) || this;
/** Detect free variable `exports`. */
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
/** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */
var freeGlobal = objectTypes[typeof global] && global;
if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
root = freeGlobal;
}
/** Detect free variable `module`. */
var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
/** Detect free variable `global` from Node.js. */
var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;
/** Detect free variable `self`. */
var freeSelf = objectTypes[typeof self] && self && self.Object && self;
/** Detect free variable `window`. */
var freeWindow = objectTypes[typeof window] && window && window.Object && window;
/**
* Used as a reference to the global object.
*
* The `this` value is used if it is the global object to avoid Greasemonkey's
* restricted `window` object, otherwise the `window` object is used.
*/
var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
/*--------------------------------------------------------------------------*/

View File

@@ -6,14 +6,8 @@
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture">
<div id='testElement'>
<h1>Test</h1>
</div>
</div>
<script>
// avoid reporting tests to Sauce Labs when script errors occur
// Avoid reporting tests to Sauce Labs when script errors occur.
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
@@ -42,25 +36,17 @@
}());
QUnit.config.asyncRetries = 10;
QUnit.config.hidepassed = true;
QUnit.begin(function() {
QUnit.config.hidepassed = true;
document.getElementById('qunit-tests').className += ' hidepass';
document.getElementById('qunit-urlconfig-hidepassed').checked = true;
});
// load lodash
if (!ui.isModularize) {
document.write('<script src="' + ui.buildPath + '"><\/script>');
}
// load test scripts
// Load test scripts.
document.write(ui.urlParams.loader != 'none'
? '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
: ([
'<script src="' + ui.buildPath + '"><\/script>',
'<script src="../node_modules/jquery/dist/jquery.js"><\/script>',
'<script src="../vendor/backbone/backbone.js"><\/script>',
'<script src="../vendor/backbone/test/environment.js"><\/script>',
'<script src="../vendor/backbone/test/setup/dom-setup.js"><\/script>',
'<script src="../vendor/backbone/test/setup/environment.js"><\/script>',
'<script src="../vendor/backbone/test/noconflict.js"><\/script>',
'<script src="../vendor/backbone/test/events.js"><\/script>',
'<script src="../vendor/backbone/test/model.js"><\/script>',
@@ -100,7 +86,7 @@
'name': 'test',
'location': '../vendor/backbone/test',
'config': {
// work around no global being exported
// Work around no global being exported.
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
@@ -128,7 +114,8 @@
window._ = lodash;
}
require(getConfig(), [
'test/environment',
'test/setup/dom-setup',
'test/setup/environment',
'test/noconflict',
'test/events',
'test/model',

View File

@@ -12,7 +12,7 @@
</head>
<body>
<script>
// avoid reporting tests to Sauce Labs when script errors occur
// Avoid reporting tests to Sauce Labs when script errors occur.
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
@@ -56,6 +56,7 @@
fnToString = funcProto.toString,
nativeString = fnToString.call(objectProto.toString),
noop = function() {},
parseInt = window.parseInt,
propertyIsEnumerable = objectProto.propertyIsEnumerable,
reToString = /toString/g,
whitespace = ' \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';
@@ -68,7 +69,7 @@
function createToString(funcName) {
return constant(nativeString.replace(reToString, funcName));
}
// allow bypassing native checks
// Allow bypassing native checks.
setProperty(funcProto, 'toString', (function() {
function wrapper() {
setProperty(funcProto, 'toString', fnToString);
@@ -79,10 +80,10 @@
return wrapper;
}()));
// add extensions
// Add prototype extensions.
funcProto._method = noop;
// set bad shims
// Set bad shims.
setProperty(Array, '_isArray', Array.isArray);
setProperty(Array, 'isArray', noop);
@@ -97,10 +98,10 @@
setProperty(objectProto, '_propertyIsEnumerable', propertyIsEnumerable);
setProperty(objectProto, 'propertyIsEnumerable', function(key) {
if (key == '1' && this && typeof this == 'object' && this.length === 2 &&
if (key == '1' && this && typeof this == 'object' &&
hasOwnProperty.call(this, 'callee') &&
!propertyIsEnumerable.call(this, 'callee') &&
this[0] === 0 && this[1] === 0) {
this.length === 2 && this[0] === 1 && this[1] === 0) {
throw new Error;
}
return propertyIsEnumerable.call(this, key);
@@ -150,9 +151,9 @@
setProperty(window, 'WeakMap', noop);
setProperty(window, '_parseInt', parseInt);
setProperty(window, 'parseInt', (function(_parseInt) {
setProperty(window, 'parseInt', (function() {
var checkStr = whitespace + '08',
isFaked = _parseInt(checkStr) != 8,
isFaked = parseInt(checkStr) != 8,
reHexPrefix = /^0[xX]/,
reTrim = RegExp('^[' + whitespace + ']+|[' + whitespace + ']+$');
@@ -162,18 +163,18 @@
return 0;
}
value = String(value == null ? '' : value).replace(reTrim, '');
return _parseInt(value, +radix || (reHexPrefix.test(value) ? 16 : 10));
return parseInt(value, +radix || (reHexPrefix.test(value) ? 16 : 10));
};
}(_parseInt)));
}()));
// fake lack of DOM support
// Fake lack of DOM support.
setProperty(document, '_createDocumentFragment', document.createDocumentFragment);
document.createDocumentFragment = noop;
// fake `WinRTError`
// Fake `WinRTError`.
setProperty(window, 'WinRTError', Error);
// fake free variable `global`
// Fake free variable `global`.
setProperty(window, 'exports', window);
setProperty(window, 'global', window);
setProperty(window, 'module', {});
@@ -240,27 +241,26 @@
delete Array._isArray;
delete Date._now;
delete funcProto._method;
delete Object._create;
delete Object._getPrototypeOf;
delete Object._keys;
delete funcProto._method;
delete objectProto._propertyIsEnumerable;
}
// load lodash and expose it to the bad extensions/shims
// Load lodash to expose it to the bad extensions/shims.
if (!ui.isModularize) {
addBizarroMethods();
document.write('<script src="' + ui.buildPath + '"><\/script>');
}
</script>
<script>
// store lodash to test for bad extensions/shims
// Store lodash to test for bad extensions/shims.
if (!ui.isModularize) {
var lodashBizarro = window._;
window._ = undefined;
removeBizarroMethods();
}
// load test scripts
// Load test scripts.
document.write((ui.isForeign || ui.urlParams.loader == 'none')
? '<script src="' + ui.buildPath + '"><\/script><script src="test.js"><\/script>'
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
@@ -298,7 +298,7 @@
'location': basePath + 'test',
'main': 'test',
'config': {
// work around no global being exported
// Work around no global being exported.
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
@@ -389,7 +389,7 @@
}
}());
// set a more readable browser name
// Set a more readable browser name.
window.onload = function() {
var timeoutId = setInterval(function() {
var ua = document.getElementById('qunit-userAgent');

View File

@@ -102,21 +102,20 @@ var browserNameMap = {
/** List of platforms to load the runner on. */
var platforms = [
['Linux', 'android', '4.3'],
['Linux', 'android', '5.0'],
['Linux', 'android', '4.4'],
['Linux', 'android', '4.0'],
['Windows 8.1', 'firefox', '35'],
['Windows 8.1', 'firefox', '34'],
['Windows 8.1', 'firefox', '37'],
['Windows 8.1', 'firefox', '36'],
['Windows 8.1', 'firefox', '20'],
['Windows 8.1', 'chrome', '39'],
['Windows 8.1', 'chrome', '38'],
['Windows 8.1', 'chrome', '42'],
['Windows 8.1', 'chrome', '41'],
['Windows 8.1', 'internet explorer', '11'],
['Windows 8', 'internet explorer', '10'],
['Windows 7', 'internet explorer', '9'],
['Windows 7', 'internet explorer', '8'],
['Windows XP', 'internet explorer', '7'],
['Windows XP', 'internet explorer', '6'],
['Windows 7', 'opera', '12'],
['Windows 7', 'opera', '11'],
['OS X 10.9', 'ipad', '8.1'],
['OS X 10.6', 'ipad', '4'],
['OS X 10.10', 'safari', '8'],
@@ -160,6 +159,7 @@ if (isBackbone) {
switch (browser) {
case 'Firefox': return version >= 4;
case 'Internet Explorer': return version >= 7;
case 'iPad': return version >= 5;
case 'Opera': return version >= 12;
}
@@ -542,9 +542,6 @@ function Job(properties) {
EventEmitter.call(this);
this.options = {};
this.retries = maxJobRetries;
this.statusInterval = statusInterval;
_.merge(this, properties);
_.defaults(this.options, _.cloneDeep(jobOptions));
@@ -705,7 +702,6 @@ Job.prototype.stop = function(callback) {
function Tunnel(properties) {
EventEmitter.call(this);
this.retries = maxTunnelRetries;
_.merge(this, properties);
var active = [],

File diff suppressed because it is too large Load Diff

View File

@@ -4,23 +4,11 @@
<meta charset="utf-8">
<title>Underscore Test Suite</title>
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
<style>
iframe {
display: none;
}
</style>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture">
<div id="map-test">
<div id="id1"></div>
<div id="id2"></div>
</div>
<img id="chart_image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">
</div>
<script>
// avoid reporting tests to Sauce Labs when script errors occur
// Avoid reporting tests to Sauce Labs when script errors occur.
if (location.port == '9001') {
window.onerror = function(message) {
if (window.QUnit) {
@@ -37,14 +25,9 @@
<script src="./asset/test-ui.js"></script>
<script>
QUnit.config.asyncRetries = 10;
QUnit.config.hidepassed = true;
QUnit.begin(function() {
QUnit.config.hidepassed = true;
$('#qunit-tests').addClass('hidepass');
$('#qunit-urlconfig-hidepassed').prop('checked', true);
});
// excuse tests we intentionally fail or those with problems
// Excuse tests we intentionally fail or those with problems.
QUnit.config.excused = {
'Arrays': {
'drop': [
@@ -56,6 +39,7 @@
'0'
],
'flatten': [
'Flattens empty arrays',
'can flatten nested arrays',
'can shallowly flatten nested arrays',
'works on an arguments object',
@@ -67,9 +51,7 @@
'initial works on arguments object'
],
'intersection': [
'can perform an OO-style intersection',
'returns an empty array when passed null as first argument',
'returns an empty array when passed null as argument beyond the first'
'can perform an OO-style intersection'
],
'last': [
'can pass an index to last',
@@ -88,12 +70,9 @@
]
},
'Chaining': {
'select/reject/sortBy': [
'Died on test #1'
],
'select/reject/sortBy in functional style': [
'Died on test #1'
],
'pop': true,
'shift': true,
'splice': true,
'reverse/concat/unshift/pop/map': [
'can chain together array functions.'
]
@@ -102,21 +81,18 @@
'filter': [
'OO-filter'
],
'invoke': [
'handles null & undefined'
],
'map': [
'OO-style doubled numbers'
],
'reduce': [
'handles a null (without initial value) properly',
'throws an error for empty arrays with no initial value'
],
'reduceRight': [
'handles a null (without initial value) properly',
'throws an error for empty arrays with no initial value'
'Resistant to collection length and properties changing while iterating': [
'Died on test #50'
]
},
'Functions': {
'bind': [
'can bind without specifying a context',
'Died on test #2'
],
'bindAll': [
@@ -132,14 +108,29 @@
'debounce asap': true
},
'Objects': {
'#1929 Typed Array constructors are functions': true,
'allKeys': true,
'extendOwn': true,
'mapObject': true,
'matcher': true,
'matcher ': true,
'extend': [
'extend copies all properties from source'
],
'isEqual': [
'Died on test #60',
'Died on test #63'
'`0` is not equal to `-0`',
'Commutative equality is implemented for `0` and `-0`',
'`new Number(0)` and `-0` are not equal',
'Commutative equality is implemented for `new Number(0)` and `-0`'
],
'isFinite': [
'Numeric strings are numbers',
'Number instances can be finite'
],
'isMatch': [
'inherited and own properties are checked on the test object',
'doesnt falsey match constructor on undefined/null'
],
'keys': [
'is not fooled by sparse arrays; see issue #95',
'[]'
@@ -153,32 +144,21 @@
'now': [
'Produces the correct time in milliseconds'
],
'_.templateSettings.variable': [
'"x"'
],
'times': [
'Died on test #1',
'works as a wrapper'
],
'uniqueId': [
'Died on test #1'
]
}
};
// only excuse in Sauce Labs (buggy Safari and timers)
// Only excuse in Sauce Labs (buggy Safari and timers).
if (!ui.isSauceLabs) {
QUnit.config.excused.Utility.times.shift();
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.uniqueId;
delete QUnit.config.excused.Utility.now;
}
// load test scripts
// Load test scripts.
document.write(ui.urlParams.loader != 'none'
? '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
: ([
@@ -187,6 +167,7 @@
'<script src="../vendor/underscore/test/arrays.js"><\/script>',
'<script src="../vendor/underscore/test/functions.js"><\/script>',
'<script src="../vendor/underscore/test/objects.js"><\/script>',
'<script src="../vendor/underscore/test/cross-document.js"><\/script>',
'<script src="../vendor/underscore/test/utility.js"><\/script>',
'<script src="../vendor/underscore/test/chaining.js"><\/script>'
].join('\n'))
@@ -218,7 +199,7 @@
'name': 'test',
'location': '../vendor/underscore/test',
'config': {
// work around no global being exported
// Work around no global being exported.
'exports': 'QUnit',
'loader': 'curl/loader/legacy'
}
@@ -248,6 +229,7 @@
'test/arrays',
'test/functions',
'test/objects',
'test/cross-document',
'test/utility',
'test/chaining'
], function() {
@@ -256,11 +238,5 @@
});
}());
</script>
<script type="text/html" id="template">
<%
// a comment
if (data) { data += 12345; }; %>
<li><%= data %></li>
</script>
</body>
</html>

View File

@@ -1,4 +1,4 @@
Copyright (c) 2010-2014 Jeremy Ashkenas, DocumentCloud
Copyright (c) 2010-2015 Jeremy Ashkenas, DocumentCloud
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

File diff suppressed because it is too large Load Diff

View File

@@ -16,23 +16,20 @@
});
test("new and sort", 9, function() {
test("new and sort", 6, function() {
var counter = 0;
col.on('sort', function(){ counter++; });
equal(col.first(), a, "a should be first");
equal(col.last(), d, "d should be last");
deepEqual(col.pluck('label'), ['a', 'b', 'c', 'd']);
col.comparator = function(a, b) {
return a.id > b.id ? -1 : 1;
};
col.sort();
equal(counter, 1);
equal(col.first(), a, "a should be first");
equal(col.last(), d, "d should be last");
deepEqual(col.pluck('label'), ['a', 'b', 'c', 'd']);
col.comparator = function(model) { return model.id; };
col.sort();
equal(counter, 2);
equal(col.first(), d, "d should be first");
equal(col.last(), a, "a should be last");
deepEqual(col.pluck('label'), ['d', 'c', 'b', 'a']);
equal(col.length, 4);
});
@@ -60,6 +57,20 @@
strictEqual(collection.last().get('a'), 4);
});
test("clone preserves model and comparator", 3, function() {
var Model = Backbone.Model.extend();
var comparator = function(model){ return model.id; };
var collection = new Backbone.Collection([{id: 1}], {
model: Model,
comparator: comparator
}).clone();
collection.add({id: 2});
ok(collection.at(0) instanceof Model);
ok(collection.at(1) instanceof Model);
strictEqual(collection.comparator, comparator);
});
test("get", 6, function() {
equal(col.get(0), d);
equal(col.get(d.clone()), d);
@@ -70,10 +81,9 @@
});
test("get with non-default ids", 5, function() {
var col = new Backbone.Collection();
var MongoModel = Backbone.Model.extend({idAttribute: '_id'});
var model = new MongoModel({_id: 100});
col.add(model);
var col = new Backbone.Collection([model], {model: MongoModel});
equal(col.get(100), model);
equal(col.get(model.cid), model);
equal(col.get(model), model);
@@ -88,7 +98,7 @@
test('get with "undefined" id', function() {
var collection = new Backbone.Collection([{id: 1}, {id: 'undefined'}]);
equal(collection.get(1).id, 1);
}),
});
test("update index when id changes", 4, function() {
var col = new Backbone.Collection();
@@ -104,8 +114,9 @@
equal(col.get(101).get('name'), 'dalmatians');
});
test("at", 1, function() {
test("at", 2, function() {
equal(col.at(2), c);
equal(col.at(-2), c);
});
test("pluck", 1, function() {
@@ -287,9 +298,10 @@
deepEqual(col.pluck('id'), [1, 2, 3]);
});
test("remove", 5, function() {
test("remove", 7, function() {
var removed = null;
var otherRemoved = null;
var result = null;
col.on('remove', function(model, col, options) {
removed = model.get('label');
equal(options.index, 3);
@@ -297,8 +309,12 @@
otherCol.on('remove', function(model, col, options) {
otherRemoved = true;
});
col.remove(d);
result = col.remove(d);
equal(removed, 'd');
strictEqual(result, d);
//if we try to remove d again, it's not going to actually get removed
result = col.remove(d);
strictEqual(result, undefined);
equal(col.length, 3);
equal(col.first(), a);
equal(otherRemoved, null);
@@ -464,6 +480,21 @@
collection.fetch();
});
test("#3283 - fetch with an error response calls error with context", 1, function () {
var collection = new Backbone.Collection();
var obj = {};
var options = {
context: obj,
error: function() {
equal(this, obj);
}
};
collection.sync = function (method, model, options) {
options.error.call(options.context);
};
collection.fetch(options);
});
test("ensure fetch only parses once", 1, function() {
var collection = new Backbone.Collection;
var counter = 0;
@@ -504,6 +535,30 @@
equal(col.create({"foo":"bar"}, {validate:true}), false);
});
test("create will pass extra options to success callback", 1, function () {
var Model = Backbone.Model.extend({
sync: function (method, model, options) {
_.extend(options, {specialSync: true});
return Backbone.Model.prototype.sync.call(this, method, model, options);
}
});
var Collection = Backbone.Collection.extend({
model: Model,
url: '/test'
});
var collection = new Collection;
var success = function (model, response, options) {
ok(options.specialSync, "Options were passed correctly to callback");
};
collection.create({}, {success: success});
this.ajaxSettings.success();
});
test("a failing create returns model with errors", function() {
var ValidatingModel = Backbone.Model.extend({
validate: function(attrs) {
@@ -634,6 +689,16 @@
});
});
test("reset does not alter options by reference", 2, function() {
var col = new Backbone.Collection([{id:1}]);
var origOpts = {};
col.on("reset", function(col, opts){
equal(origOpts.previousModels, undefined);
equal(opts.previousModels[0].id, 1);
});
col.reset([], origOpts);
});
test("trigger custom events on models", 1, function() {
var fired = null;
a.on("custom", function() { fired = true; });
@@ -672,22 +737,22 @@
equal(col.length, 0);
});
test("#861, adding models to a collection which do not pass validation, with validate:true", function() {
var Model = Backbone.Model.extend({
validate: function(attrs) {
if (attrs.id == 3) return "id can't be 3";
}
});
test("#861, adding models to a collection which do not pass validation, with validate:true", 2, function() {
var Model = Backbone.Model.extend({
validate: function(attrs) {
if (attrs.id == 3) return "id can't be 3";
}
});
var Collection = Backbone.Collection.extend({
model: Model
});
var Collection = Backbone.Collection.extend({
model: Model
});
var collection = new Collection;
collection.on("error", function() { ok(true); });
var collection = new Collection;
collection.on("invalid", function() { ok(true); });
collection.add([{id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}, {id: 6}], {validate:true});
deepEqual(collection.pluck('id'), [1, 2, 4, 5, 6]);
collection.add([{id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}, {id: 6}], {validate:true});
deepEqual(collection.pluck("id"), [1, 2, 4, 5, 6]);
});
test("Invalid models are discarded with validate:true.", 5, function() {
@@ -756,12 +821,13 @@
var m = new Backbone.Model({x:1});
var col = new Backbone.Collection();
var opts = {
success: function(collection, resp, options){
ok(options);
opts: true,
success: function(collection, resp, options) {
ok(options.opts);
}
};
col.sync = m.sync = function( method, collection, options ){
options.success(collection, [], options);
options.success({});
};
col.fetch(opts);
col.create(m, opts);
@@ -791,6 +857,24 @@
collection.off();
});
test("#3283 - fetch, create calls success with context", 2, function() {
var collection = new Backbone.Collection;
collection.url = '/test';
Backbone.ajax = function(settings) {
settings.success.call(settings.context);
};
var obj = {};
var options = {
context: obj,
success: function() {
equal(this, obj);
}
};
collection.fetch(options);
collection.create({id: 1}, options);
});
test("#1447 - create with wait adds model.", 1, function() {
var collection = new Backbone.Collection;
var model = new Backbone.Model;
@@ -1085,9 +1169,7 @@
test("#1894 - Push should not trigger a sort", 0, function() {
var Collection = Backbone.Collection.extend({
comparator: 'id',
sort: function() {
ok(false);
}
sort: function() { ok(false); }
});
new Collection().push({id: 1});
});
@@ -1111,7 +1193,7 @@
test("#1894 - `sort` can optionally be turned off", 0, function() {
var Collection = Backbone.Collection.extend({
comparator: 'id',
sort: function() { ok(true); }
sort: function() { ok(false); }
});
new Collection().add({id: 1}, {sort: false});
});
@@ -1146,6 +1228,25 @@
Backbone.ajax = ajax;
});
test("fetch will pass extra options to success callback", 1, function () {
var SpecialSyncCollection = Backbone.Collection.extend({
url: '/test',
sync: function (method, collection, options) {
_.extend(options, { specialSync: true });
return Backbone.Collection.prototype.sync.call(this, method, collection, options);
}
});
var collection = new SpecialSyncCollection();
var onSuccess = function (collection, resp, options) {
ok(options.specialSync, "Options were passed correctly to callback");
};
collection.fetch({ success: onSuccess });
this.ajaxSettings.success();
});
test("`add` only `sort`s when necessary", 2, function () {
var collection = new (Backbone.Collection.extend({
comparator: 'a'
@@ -1175,15 +1276,15 @@
});
test("Attach options to collection.", 2, function() {
var model = new Backbone.Model;
var Model = Backbone.Model;
var comparator = function(){};
var collection = new Backbone.Collection([], {
model: model,
model: Model,
comparator: comparator
});
ok(collection.model === model);
ok(collection.model === Model);
ok(collection.comparator === comparator);
});
@@ -1309,7 +1410,7 @@
equal(this._byId[model.id], void 0);
equal(this._byId[model.cid], void 0);
equal(model.collection, void 0);
equal(model._events.all, void 0);
equal(model._events, void 0);
}
});
@@ -1335,4 +1436,173 @@
equal(c.models.length, 1);
});
test('#3020: #set with {add: false} should not throw.', 2, function() {
var collection = new Backbone.Collection;
collection.set([{id: 1}], {add: false});
strictEqual(collection.length, 0);
strictEqual(collection.models.length, 0);
});
test("create with wait, model instance, #3028", 1, function() {
var collection = new Backbone.Collection();
var model = new Backbone.Model({id: 1});
model.sync = function(){
equal(this.collection, collection);
};
collection.create(model, {wait: true});
});
test("modelId", function() {
var Stooge = Backbone.Model.extend();
var StoogeCollection = Backbone.Collection.extend({model: Stooge});
// Default to using `Collection::model::idAttribute`.
equal(StoogeCollection.prototype.modelId({id: 1}), 1);
Stooge.prototype.idAttribute = '_id';
equal(StoogeCollection.prototype.modelId({_id: 1}), 1);
});
test('Polymorphic models work with "simple" constructors', function () {
var A = Backbone.Model.extend();
var B = Backbone.Model.extend();
var C = Backbone.Collection.extend({
model: function (attrs) {
return attrs.type === 'a' ? new A(attrs) : new B(attrs);
}
});
var collection = new C([{id: 1, type: 'a'}, {id: 2, type: 'b'}]);
equal(collection.length, 2);
ok(collection.at(0) instanceof A);
equal(collection.at(0).id, 1);
ok(collection.at(1) instanceof B);
equal(collection.at(1).id, 2);
});
test('Polymorphic models work with "advanced" constructors', function () {
var A = Backbone.Model.extend({idAttribute: '_id'});
var B = Backbone.Model.extend({idAttribute: '_id'});
var C = Backbone.Collection.extend({
model: Backbone.Model.extend({
constructor: function (attrs) {
return attrs.type === 'a' ? new A(attrs) : new B(attrs);
},
idAttribute: '_id'
})
});
var collection = new C([{_id: 1, type: 'a'}, {_id: 2, type: 'b'}]);
equal(collection.length, 2);
ok(collection.at(0) instanceof A);
equal(collection.at(0), collection.get(1));
ok(collection.at(1) instanceof B);
equal(collection.at(1), collection.get(2));
C = Backbone.Collection.extend({
model: function (attrs) {
return attrs.type === 'a' ? new A(attrs) : new B(attrs);
},
modelId: function (attrs) {
return attrs.type + '-' + attrs.id;
}
});
collection = new C([{id: 1, type: 'a'}, {id: 1, type: 'b'}]);
equal(collection.length, 2);
ok(collection.at(0) instanceof A);
equal(collection.at(0), collection.get('a-1'));
ok(collection.at(1) instanceof B);
equal(collection.at(1), collection.get('b-1'));
});
test("#3039: adding at index fires with correct at", 3, function() {
var col = new Backbone.Collection([{at: 0}, {at: 4}]);
col.on('add', function(model, col, options) {
equal(model.get('at'), options.index);
});
col.add([{at: 1}, {at: 2}, {at: 3}], {at: 1});
});
test("#3039: index is not sent when at is not specified", 2, function() {
var col = new Backbone.Collection([{at: 0}]);
col.on('add', function(model, col, options) {
equal(undefined, options.index);
});
col.add([{at: 1}, {at: 2}]);
});
test('#3199 - Order changing should trigger a sort', 1, function() {
var one = new Backbone.Model({id: 1});
var two = new Backbone.Model({id: 2});
var three = new Backbone.Model({id: 3});
var collection = new Backbone.Collection([one, two, three]);
collection.on('sort', function() {
ok(true);
});
collection.set([{id: 3}, {id: 2}, {id: 1}]);
});
test('#3199 - Adding a model should trigger a sort', 1, function() {
var one = new Backbone.Model({id: 1});
var two = new Backbone.Model({id: 2});
var three = new Backbone.Model({id: 3});
var collection = new Backbone.Collection([one, two, three]);
collection.on('sort', function() {
ok(true);
});
collection.set([{id: 3}, {id: 2}, {id: 1}, {id: 0}]);
})
test('#3199 - Order not changing should not trigger a sort', 0, function() {
var one = new Backbone.Model({id: 1});
var two = new Backbone.Model({id: 2});
var three = new Backbone.Model({id: 3});
var collection = new Backbone.Collection([one, two, three]);
collection.on('sort', function() {
ok(false);
});
collection.set([{id: 1}, {id: 2}, {id: 3}]);
});
test("add supports negative indexes", 1, function() {
var collection = new Backbone.Collection([{id: 1}]);
collection.add([{id: 2}, {id: 3}], {at: -1});
collection.add([{id: 2.5}], {at: -2});
equal(collection.pluck('id').join(','), "1,2,2.5,3");
});
test("#set accepts options.at as a string", 1, function() {
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
collection.add([{id: 3}], {at: '1'});
deepEqual(collection.pluck('id'), [1, 3, 2]);
});
test("adding multiple models triggers `set` event once", 1, function() {
var collection = new Backbone.Collection;
collection.on('update', function() { ok(true); });
collection.add([{id: 1}, {id: 2}, {id: 3}]);
});
test("removing models triggers `set` event once", 1, function() {
var collection = new Backbone.Collection([{id: 1}, {id: 2}, {id: 3}]);
collection.on('update', function() { ok(true); });
collection.remove([{id: 1}, {id: 2}]);
});
test("remove does not trigger `set` when nothing removed", 0, function() {
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
collection.on('update', function() { ok(false); });
collection.remove([{id: 3}]);
});
test("set triggers `set` event once", 1, function() {
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
collection.on('update', function() { ok(true); });
collection.set([{id: 1}, {id: 3}]);
});
test("set does not trigger `set` event when nothing added nor removed", 0, function() {
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
collection.on('update', function() { ok(false); });
collection.set([{id: 1}, {id: 2}]);
});
})();

View File

@@ -106,6 +106,19 @@
b.trigger('event2');
});
test("listenToOnce", 2, function() {
// Same as the previous test, but we use once rather than having to explicitly unbind
var obj = { counterA: 0, counterB: 0 };
_.extend(obj, Backbone.Events);
var incrA = function(){ obj.counterA += 1; obj.trigger('event'); };
var incrB = function(){ obj.counterB += 1; };
obj.listenToOnce(obj, 'event', incrA);
obj.listenToOnce(obj, 'event', incrB);
obj.trigger('event');
equal(obj.counterA, 1, 'counterA should have only been incremented once.');
equal(obj.counterB, 1, 'counterB should have only been incremented once.');
});
test("listenToOnce and stopListening", 1, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
@@ -152,18 +165,72 @@
e.trigger("foo");
});
test("stopListening cleans up references", 4, function() {
test("stopListening cleans up references", 12, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
var fn = function() {};
a.listenTo(b, 'all', fn).stopListening();
b.on('event', fn);
a.listenTo(b, 'event', fn).stopListening();
equal(_.size(a._listeningTo), 0);
a.listenTo(b, 'all', fn).stopListening(b);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn).stopListening(b);
equal(_.size(a._listeningTo), 0);
a.listenTo(b, 'all', fn).stopListening(null, 'all');
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn).stopListening(b, 'event');
equal(_.size(a._listeningTo), 0);
a.listenTo(b, 'all', fn).stopListening(null, null, fn);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn).stopListening(b, 'event', fn);
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
});
test("stopListening cleans up references from listenToOnce", 12, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
var fn = function() {};
b.on('event', fn);
a.listenToOnce(b, 'event', fn).stopListening();
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenToOnce(b, 'event', fn).stopListening(b);
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenToOnce(b, 'event', fn).stopListening(b, 'event');
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
a.listenToOnce(b, 'event', fn).stopListening(b, 'event', fn);
equal(_.size(a._listeningTo), 0);
equal(_.size(b._events.event), 1);
equal(_.size(b._listeners), 0);
});
test("listenTo and off cleaning up references", 8, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
var fn = function() {};
a.listenTo(b, 'event', fn);
b.off();
equal(_.size(a._listeningTo), 0);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn);
b.off('event');
equal(_.size(a._listeningTo), 0);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn);
b.off(null, fn);
equal(_.size(a._listeningTo), 0);
equal(_.size(b._listeners), 0);
a.listenTo(b, 'event', fn);
b.off(null, null, a);
equal(_.size(a._listeningTo), 0);
equal(_.size(b._listeners), 0);
});
test("listenTo and stopListening cleaning up references", 2, function() {
@@ -174,7 +241,36 @@
a.listenTo(b, 'other', function(){ ok(false); });
a.stopListening(b, 'other');
a.stopListening(b, 'all');
equal(_.keys(a._listeningTo).length, 0);
equal(_.size(a._listeningTo), 0);
});
test("listenToOnce without context cleans up references after the event has fired", 2, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenToOnce(b, 'all', function(){ ok(true); });
b.trigger('anything');
equal(_.size(a._listeningTo), 0);
});
test("listenToOnce with event maps cleans up references", 2, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenToOnce(b, {
one: function() { ok(true); },
two: function() { ok(false); }
});
b.trigger('one');
equal(_.size(a._listeningTo), 1);
});
test("listenToOnce with event maps binds the correct `this`", 1, function() {
var a = _.extend({}, Backbone.Events);
var b = _.extend({}, Backbone.Events);
a.listenToOnce(b, {
one: function() { ok(this === a); },
two: function() { ok(false); }
});
b.trigger('one');
});
test("listenTo with empty callback doesn't throw an error", 1, function(){
@@ -277,15 +373,14 @@
test("callback list is not altered during trigger", 2, function () {
var counter = 0, obj = _.extend({}, Backbone.Events);
var incr = function(){ counter++; };
obj.on('event', function(){ obj.on('event', incr).on('all', incr); })
.trigger('event');
equal(counter, 0, 'bind does not alter callback list');
obj.off()
.on('event', function(){ obj.off('event', incr).off('all', incr); })
.on('event', incr)
.on('all', incr)
.trigger('event');
equal(counter, 2, 'unbind does not alter callback list');
var incrOn = function(){ obj.on('event all', incr); };
var incrOff = function(){ obj.off('event all', incr); };
obj.on('event all', incrOn).trigger('event');
equal(counter, 0, 'on does not alter callback list');
obj.off().on('event', incrOff).on('event all', incr).trigger('event');
equal(counter, 2, 'off does not alter callback list');
});
test("#1282 - 'all' callback list is retrieved after each event.", 1, function() {
@@ -305,7 +400,7 @@
test("if callback is truthy but not a function, `on` should throw an error just like jQuery", 1, function() {
var view = _.extend({}, Backbone.Events).on('test', 'noop');
raises(function() {
throws(function() {
view.trigger('test');
});
});
@@ -457,6 +552,11 @@
_.extend({}, Backbone.Events).once('event').trigger('event');
});
test("listenToOnce without a callback is a noop", 0, function() {
var obj = _.extend({}, Backbone.Events);
obj.listenToOnce(obj, 'event').trigger('event');
});
test("event functions are chainable", function() {
var obj = _.extend({}, Backbone.Events);
var obj2 = _.extend({}, Backbone.Events);
@@ -474,4 +574,15 @@
equal(obj, obj.stopListening());
});
test("#3448 - listenToOnce with space-separated events", 2, function() {
var one = _.extend({}, Backbone.Events);
var two = _.extend({}, Backbone.Events);
var count = 1;
one.listenToOnce(two, 'x y', function(n) { ok(n === count++); });
two.trigger('x', 1);
two.trigger('x', 1);
two.trigger('y', 2);
two.trigger('y', 2);
});
})();

View File

@@ -83,7 +83,7 @@
doc.collection.url = '/collection/';
equal(doc.url(), '/collection/1-the-tempest');
doc.collection = null;
raises(function() { doc.url(); });
throws(function() { doc.url(); });
doc.collection = collection;
});
@@ -120,6 +120,11 @@
deepEqual(model.omit('foo', 'bar'), {'baz': 'c'});
});
test("chain", function() {
var model = new Backbone.Model({ a: 0, b: 1, c: 2 });
deepEqual(model.chain().pick("a", "b", "c").values().compact().value(), [1, 2]);
});
test("clone", 10, function() {
var a = new Backbone.Model({ 'foo': 1, 'bar': 2, 'baz': 3});
var b = a.clone();
@@ -199,6 +204,32 @@
strictEqual(model.has('undefined'), false);
});
test("matches", 4, function() {
var model = new Backbone.Model();
strictEqual(model.matches({'name': 'Jonas', 'cool': true}), false);
model.set({name: 'Jonas', 'cool': true});
strictEqual(model.matches({'name': 'Jonas'}), true);
strictEqual(model.matches({'name': 'Jonas', 'cool': true}), true);
strictEqual(model.matches({'name': 'Jonas', 'cool': false}), false);
});
test("matches with predicate", function() {
var model = new Backbone.Model({a: 0});
strictEqual(model.matches(function(attr) {
return attr.a > 1 && attr.b != null;
}), false);
model.set({a: 3, b: true});
strictEqual(model.matches(function(attr) {
return attr.a > 1 && attr.b != null;
}), true);
})
test("set and unset", 8, function() {
var a = new Backbone.Model({id: 'id', foo: 1, bar: 2, baz: 3});
var changeCount = 0;
@@ -312,6 +343,31 @@
equal(model.isNew(), true);
});
test("setting an alternative cid prefix", 4, function() {
var Model = Backbone.Model.extend({
cidPrefix: 'm'
});
var model = new Model();
equal(model.cid.charAt(0), 'm');
model = new Backbone.Model();
equal(model.cid.charAt(0), 'c');
var Collection = Backbone.Collection.extend({
model: Model
});
var collection = new Collection([{id: 'c5'}, {id: 'c6'}, {id: 'c7'}]);
equal(collection.get('c6').cid.charAt(0), 'm');
collection.set([{id: 'c6', value: 'test'}], {
merge: true,
add: true,
remove: false
});
ok(collection.get('c6').has('value'));
});
test("set an empty string", 1, function() {
var model = new Backbone.Model({name : "Model"});
model.set({name : ''});
@@ -460,6 +516,40 @@
model.destroy();
});
test("#3283 - save, fetch, destroy calls success with context", 3, function () {
var model = new Backbone.Model();
var obj = {};
var options = {
context: obj,
success: function() {
equal(this, obj);
}
};
model.sync = function (method, model, options) {
options.success.call(options.context);
};
model.save({data: 2, id: 1}, options);
model.fetch(options);
model.destroy(options);
});
test("#3283 - save, fetch, destroy calls error with context", 3, function () {
var model = new Backbone.Model();
var obj = {};
var options = {
context: obj,
error: function() {
equal(this, obj);
}
};
model.sync = function (method, model, options) {
options.error.call(options.context);
};
model.save({data: 2, id: 1}, options);
model.fetch(options);
model.destroy(options);
});
test("save with PATCH", function() {
doc.clear().set({id: 1, a: 1, b: 2, c: 3, d: 4});
doc.save();
@@ -474,6 +564,14 @@
equal(this.ajaxSettings.data, "{\"b\":2,\"d\":4}");
});
test("save with PATCH and different attrs", function() {
doc.clear().save({b: 2, d: 4}, {patch: true, attrs: {B: 1, D: 3}});
equal(this.syncArgs.options.attrs.D, 3);
equal(this.syncArgs.options.attrs.d, undefined);
equal(this.ajaxSettings.data, "{\"B\":1,\"D\":3}");
deepEqual(doc.attributes, {b: 2, d: 4});
});
test("save in positional style", 1, function() {
var model = new Backbone.Model();
model.sync = function(method, model, options) {
@@ -496,12 +594,59 @@
});
});
test("save with wait and supplied id", function() {
var Model = Backbone.Model.extend({
urlRoot: '/collection'
});
var model = new Model();
model.save({id: 42}, {wait: true});
equal(this.ajaxSettings.url, '/collection/42');
});
test("save will pass extra options to success callback", 1, function () {
var SpecialSyncModel = Backbone.Model.extend({
sync: function (method, model, options) {
_.extend(options, { specialSync: true });
return Backbone.Model.prototype.sync.call(this, method, model, options);
},
urlRoot: '/test'
});
var model = new SpecialSyncModel();
var onSuccess = function (model, response, options) {
ok(options.specialSync, "Options were passed correctly to callback");
};
model.save(null, { success: onSuccess });
this.ajaxSettings.success();
});
test("fetch", 2, function() {
doc.fetch();
equal(this.syncArgs.method, 'read');
ok(_.isEqual(this.syncArgs.model, doc));
});
test("fetch will pass extra options to success callback", 1, function () {
var SpecialSyncModel = Backbone.Model.extend({
sync: function (method, model, options) {
_.extend(options, { specialSync: true });
return Backbone.Model.prototype.sync.call(this, method, model, options);
},
urlRoot: '/test'
});
var model = new SpecialSyncModel();
var onSuccess = function (model, response, options) {
ok(options.specialSync, "Options were passed correctly to callback");
};
model.fetch({ success: onSuccess });
this.ajaxSettings.success();
});
test("destroy", 3, function() {
doc.destroy();
equal(this.syncArgs.method, 'delete');
@@ -511,6 +656,25 @@
equal(newModel.destroy(), false);
});
test("destroy will pass extra options to success callback", 1, function () {
var SpecialSyncModel = Backbone.Model.extend({
sync: function (method, model, options) {
_.extend(options, { specialSync: true });
return Backbone.Model.prototype.sync.call(this, method, model, options);
},
urlRoot: '/test'
});
var model = new SpecialSyncModel({ id: 'id' });
var onSuccess = function (model, response, options) {
ok(options.specialSync, "Options were passed correctly to callback");
};
model.destroy({ success: onSuccess });
this.ajaxSettings.success();
});
test("non-persisted destroy", 1, function() {
var a = new Backbone.Model({ 'foo': 1, 'bar': 2, 'baz': 3});
a.sync = function() { throw "should not be called"; };
@@ -967,11 +1131,14 @@
model.destroy();
});
test("#1365 - Destroy: New models execute success callback.", 2, function() {
asyncTest("#1365 - Destroy: New models execute success callback.", 2, function() {
new Backbone.Model()
.on('sync', function() { ok(false); })
.on('destroy', function(){ ok(true); })
.destroy({ success: function(){ ok(true); }});
.destroy({ success: function(){
ok(true);
start();
}});
});
test("#1433 - Save: An invalid model cannot be persisted.", 1, function() {

View File

@@ -331,6 +331,36 @@
Backbone.history.checkUrl();
});
test("No events are triggered if #execute returns false.", 1, function() {
var Router = Backbone.Router.extend({
routes: {
foo: function() {
ok(true);
}
},
execute: function(callback, args) {
callback.apply(this, args);
return false;
}
});
var router = new Router;
router.on('route route:foo', function() {
ok(false);
});
Backbone.history.on('route', function() {
ok(false);
});
location.replace('http://example.com#foo');
Backbone.history.checkUrl();
});
test("#933, #908 - leading slash", 2, function() {
location.replace('http://example.com/root/foo');
@@ -345,14 +375,6 @@
strictEqual(Backbone.history.getFragment(), 'foo');
});
test("#1003 - History is started before navigate is called", 1, function() {
Backbone.history.stop();
Backbone.history.navigate = function(){ ok(Backbone.History.started); };
Backbone.history.start();
// If this is not an old IE navigate will not be called.
if (!Backbone.history.iframe) ok(true);
});
test("#967 - Route callback gets passed encoded values.", 3, function() {
var route = 'has%2Fslash/complex-has%23hash/has%20space';
Backbone.history.navigate(route, {trigger: true});
@@ -375,7 +397,7 @@
Backbone.history.navigate('charñ', {trigger: true});
equal(router.charType, 'UTF');
Backbone.history.navigate('char%C3%B1', {trigger: true});
equal(router.charType, 'escaped');
equal(router.charType, 'UTF');
});
test("#1185 - Use pathname when hashChange is not wanted.", 1, function() {
@@ -543,7 +565,7 @@
Backbone.history.stop();
location.replace('http://example.com/root/x/y?a=b');
location.replace = function(url) {
strictEqual(url, '/root/#x/y?a=b');
strictEqual(url, '/root#x/y?a=b');
};
Backbone.history = _.extend(new Backbone.History, {
location: location,
@@ -711,6 +733,21 @@
Backbone.history.navigate('');
});
test('#2656 - No trailing slash on root.', 1, function() {
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
pushState: function(state, title, url){
strictEqual(url, '/root?x=1');
}
}
});
location.replace('http://example.com/root/path');
Backbone.history.start({pushState: true, hashChange: false, root: 'root'});
Backbone.history.navigate('?x=1');
});
test('#2765 - Fragment matching sans query/hash.', 2, function() {
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {
@@ -738,12 +775,12 @@
var Router = Backbone.Router.extend({
routes: {
path: function(params){
strictEqual(params, 'x=y%20z');
strictEqual(params, 'x=y%3Fz');
}
}
});
var router = new Router;
Backbone.history.navigate('path?x=y%20z', true);
Backbone.history.navigate('path?x=y%3Fz', true);
});
test('Navigate to a hash url.', function() {
@@ -792,6 +829,22 @@
Backbone.history.start({pushState: true});
});
test('unicode pathname with % in a parameter', 1, function() {
location.replace('http://example.com/myyjä/foo%20%25%3F%2f%40%25%20bar');
location.pathname = '/myyj%C3%A4/foo%20%25%3F%2f%40%25%20bar';
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {
'myyjä/:query': function(query) {
strictEqual(query, 'foo %?/@% bar');
}
}
});
new Router;
Backbone.history.start({pushState: true});
});
test('newline in route', 1, function() {
location.replace('http://example.com/stuff%0Anonsense?param=foo%0Abar');
Backbone.history.stop();
@@ -807,4 +860,139 @@
Backbone.history.start({pushState: true});
});
test('Router#execute receives callback, args, name.', 3, function() {
location.replace('http://example.com#foo/123/bar?x=y');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {'foo/:id/bar': 'foo'},
foo: function(){},
execute: function(callback, args, name) {
strictEqual(callback, this.foo);
deepEqual(args, ['123', 'x=y']);
strictEqual(name, 'foo');
}
});
var router = new Router;
Backbone.history.start();
});
test("pushState to hashChange with only search params.", 1, function() {
Backbone.history.stop();
location.replace('http://example.com?a=b');
location.replace = function(url) {
strictEqual(url, '/#?a=b');
};
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: null
});
Backbone.history.start({pushState: true});
});
test("#3123 - History#navigate decodes before comparison.", 1, function() {
Backbone.history.stop();
location.replace('http://example.com/shop/search?keyword=short%20dress');
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
pushState: function(){ ok(false); },
replaceState: function(){ ok(false); }
}
});
Backbone.history.start({pushState: true});
Backbone.history.navigate('shop/search?keyword=short%20dress', true);
strictEqual(Backbone.history.fragment, 'shop/search?keyword=short dress');
});
test('#3175 - Urls in the params', 1, function() {
Backbone.history.stop();
location.replace('http://example.com#login?a=value&backUrl=https%3A%2F%2Fwww.msn.com%2Fidp%2Fidpdemo%3Fspid%3Dspdemo%26target%3Db');
Backbone.history = _.extend(new Backbone.History, {location: location});
var router = new Backbone.Router;
router.route('login', function(params) {
strictEqual(params, 'a=value&backUrl=https%3A%2F%2Fwww.msn.com%2Fidp%2Fidpdemo%3Fspid%3Dspdemo%26target%3Db');
});
Backbone.history.start();
});
test('#3358 - pushState to hashChange transition with search params', 1, function() {
Backbone.history.stop();
location.replace('/root?foo=bar');
location.replace = function(url) {
strictEqual(url, '/root#?foo=bar');
};
Backbone.history = _.extend(new Backbone.History, {
location: location,
history: {
pushState: undefined,
replaceState: undefined
}
});
Backbone.history.start({root: '/root', pushState: true});
});
test("Paths that don't match the root should not match no root", 0, function() {
location.replace('http://example.com/foo');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {
foo: function(){
ok(false, 'should not match unless root matches');
}
}
});
var router = new Router;
Backbone.history.start({root: 'root', pushState: true});
});
test("Paths that don't match the root should not match roots of the same length", 0, function() {
location.replace('http://example.com/xxxx/foo');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {
foo: function(){
ok(false, 'should not match unless root matches');
}
}
});
var router = new Router;
Backbone.history.start({root: 'root', pushState: true});
});
test("roots with regex characters", 1, function() {
location.replace('http://example.com/x+y.z/foo');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {foo: function(){ ok(true); }}
});
var router = new Router;
Backbone.history.start({root: 'x+y.z', pushState: true});
});
test("roots with unicode characters", 1, function() {
location.replace('http://example.com/®ooτ/foo');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {foo: function(){ ok(true); }}
});
var router = new Router;
Backbone.history.start({root: '®ooτ', pushState: true});
});
test("roots without slash", 1, function() {
location.replace('http://example.com/®ooτ');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
routes: {'': function(){ ok(true); }}
});
var router = new Router;
Backbone.history.start({root: '®ooτ', pushState: true});
});
})();

View File

@@ -0,0 +1,6 @@
$('body').append(
'<div id="qunit"></div>' +
'<div id="qunit-fixture">' +
'<div id="testElement"><h1>Test</h1></div>' +
'</div>'
);

View File

@@ -131,7 +131,7 @@
test("urlError", 2, function() {
var model = new Backbone.Model();
raises(function() {
throws(function() {
model.fetch();
});
model.fetch({url: '/one/two'});
@@ -207,4 +207,15 @@
strictEqual(this.ajaxSettings.beforeSend(xhr), false);
});
test('#2928 - Pass along `textStatus` and `errorThrown`.', 2, function() {
var model = new Backbone.Model;
model.url = '/test';
model.on('error', function(model, xhr, options) {
strictEqual(options.textStatus, 'textStatus');
strictEqual(options.errorThrown, 'errorThrown');
});
model.fetch();
this.ajaxSettings.error({}, 'textStatus', 'errorThrown');
});
})();

View File

@@ -20,10 +20,22 @@
equal(view.el.other, void 0);
});
test("jQuery", 1, function() {
test("$", 2, function() {
var view = new Backbone.View;
view.setElement('<p><a><b>test</b></a></p>');
strictEqual(view.$('a b').html(), 'test');
var result = view.$('a b');
strictEqual(result[0].innerHTML, 'test');
ok(result.length === +result.length);
});
test("$el", 3, function() {
var view = new Backbone.View;
view.setElement('<p><a><b>test</b></a></p>');
strictEqual(view.el.nodeType, 1);
ok(view.$el instanceof Backbone.$);
strictEqual(view.$el[0], view.el);
});
test("initialize", 1, function() {
@@ -60,6 +72,17 @@
equal(counter2, 3);
});
test("delegate", 2, function() {
var view = new Backbone.View({el: '#testElement'});
view.delegate('click', 'h1', function() {
ok(true);
});
view.delegate('click', function() {
ok(true);
});
view.$('h1').trigger('click');
});
test("delegateEvents allows functions for callbacks", 3, function() {
var view = new Backbone.View({el: '<p></p>'});
view.counter = 0;
@@ -114,6 +137,63 @@
equal(counter2, 3);
});
test("undelegate", 0, function() {
view = new Backbone.View({el: '#testElement'});
view.delegate('click', function() { ok(false); });
view.delegate('click', 'h1', function() { ok(false); });
view.undelegate('click');
view.$('h1').trigger('click');
view.$el.trigger('click');
});
test("undelegate with passed handler", 1, function() {
view = new Backbone.View({el: '#testElement'});
var listener = function() { ok(false); };
view.delegate('click', listener);
view.delegate('click', function() { ok(true); });
view.undelegate('click', listener);
view.$el.trigger('click');
});
test("undelegate with selector", 2, function() {
view = new Backbone.View({el: '#testElement'});
view.delegate('click', function() { ok(true); });
view.delegate('click', 'h1', function() { ok(false); });
view.undelegate('click', 'h1');
view.$('h1').trigger('click');
view.$el.trigger('click');
});
test("undelegate with handler and selector", 2, function() {
view = new Backbone.View({el: '#testElement'});
view.delegate('click', function() { ok(true); });
var handler = function(){ ok(false); };
view.delegate('click', 'h1', handler);
view.undelegate('click', 'h1', handler);
view.$('h1').trigger('click');
view.$el.trigger('click');
});
test("tagName can be provided as a string", 1, function() {
var View = Backbone.View.extend({
tagName: 'span'
});
equal(new View().el.tagName, 'SPAN');
});
test("tagName can be provided as a function", 1, function() {
var View = Backbone.View.extend({
tagName: function() {
return 'p';
}
});
ok(new View().$el.is('p'));
});
test("_ensureElement with DOM node el", 1, function() {
var View = Backbone.View.extend({
el: document.body
@@ -201,26 +281,19 @@
equal(5, count);
});
test("custom events, with namespaces", 2, function() {
var count = 0;
test("custom events", 2, function() {
var View = Backbone.View.extend({
el: $('body'),
events: function() {
return {"fake$event.namespaced": "run"};
},
run: function() {
count++;
events: {
"fake$event": function() { ok(true); }
}
});
var view = new View;
$('body').trigger('fake$event').trigger('fake$event');
equal(count, 2);
$('body').off('.namespaced');
$('body').off('fake$event');
$('body').trigger('fake$event');
equal(count, 2);
});
test("#1048 - setElement uses provided object.", 2, function() {
@@ -264,21 +337,11 @@
ok(!view2.el.id);
});
test("#1228 - tagName can be provided as a function", 1, function() {
var View = Backbone.View.extend({
tagName: function() {
return 'p';
}
});
ok(new View().$el.is('p'));
});
test("views stopListening", 0, function() {
var View = Backbone.View.extend({
initialize: function() {
this.listenTo(this.model, 'all x', function(){ ok(false); }, this);
this.listenTo(this.collection, 'all x', function(){ ok(false); }, this);
this.listenTo(this.model, 'all x', function(){ ok(false); });
this.listenTo(this.collection, 'all x', function(){ ok(false); });
}
});
@@ -324,4 +387,19 @@
equal(counter, 2);
});
test("remove", 1, function() {
var view = new Backbone.View;
document.body.appendChild(view.el);
view.delegate('click', function() { ok(false); });
view.listenTo(view, 'all x', function() { ok(false); });
view.remove();
view.$el.trigger('click');
view.trigger('x');
// In IE8 and below, parentNode still exists but is not document.body.
notEqual(view.el.parentNode, document.body);
});
})();

File diff suppressed because it is too large Load Diff

0
vendor/firebug-lite/license.txt vendored Executable file → Normal file
View File

0
vendor/firebug-lite/skin/xp/blank.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

0
vendor/firebug-lite/skin/xp/buttonBg.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 167 B

0
vendor/firebug-lite/skin/xp/buttonBgHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 171 B

0
vendor/firebug-lite/skin/xp/debugger.css vendored Executable file → Normal file
View File

0
vendor/firebug-lite/skin/xp/detach.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 655 B

After

Width:  |  Height:  |  Size: 655 B

0
vendor/firebug-lite/skin/xp/detachHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 586 B

0
vendor/firebug-lite/skin/xp/disable.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 340 B

0
vendor/firebug-lite/skin/xp/disable.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 543 B

0
vendor/firebug-lite/skin/xp/disableHover.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 344 B

0
vendor/firebug-lite/skin/xp/disableHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 512 B

After

Width:  |  Height:  |  Size: 512 B

0
vendor/firebug-lite/skin/xp/down.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 637 B

After

Width:  |  Height:  |  Size: 637 B

0
vendor/firebug-lite/skin/xp/downActive.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 543 B

0
vendor/firebug-lite/skin/xp/downHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 526 B

0
vendor/firebug-lite/skin/xp/errorIcon-sm.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 447 B

After

Width:  |  Height:  |  Size: 447 B

0
vendor/firebug-lite/skin/xp/errorIcon.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 365 B

After

Width:  |  Height:  |  Size: 365 B

0
vendor/firebug-lite/skin/xp/errorIcon.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 457 B

28
vendor/firebug-lite/skin/xp/firebug-1.3a2.css vendored Executable file → Normal file
View File

@@ -70,7 +70,7 @@ html, body {
body {
font-family: Lucida Grande, Tahoma, sans-serif;
font-size: 11px;
background: #fff;
background: #fff;
}
.clear {
@@ -103,7 +103,7 @@ body {
border: 1px solid #ccc;
margin: 0 5px 0 0;
background: #fff url(search.png) no-repeat 4px 2px;
padding-left: 20px;
padding-left: 20px;
font-size: 11px;
}
@@ -124,7 +124,7 @@ body {
height: 14px;
background: url(errorIcon.png) no-repeat;
color: #f00;
font-weight: bold;
font-weight: bold;
}
#fbMiniErrors {
@@ -139,7 +139,7 @@ body {
margin: 3px 4px 0;
height: 20px;
width: 20px;
float: right;
float: right;
background: url(sprite.png) 0 -135px;
cursor: pointer;
}
@@ -192,10 +192,10 @@ body {
}
/************************************************************************************************
Sub-Layout
Sub-Layout
*************************************************************************************************/
/* fbToolbar
/* fbToolbar
*************************************************************************************************/
#fbToolbarIcon {
float: left;
@@ -237,7 +237,7 @@ body {
position: relative;
top: 5px;
line-height: 19px;
cursor: default;
cursor: default;
}
.fbToolbarSeparator{
@@ -262,7 +262,7 @@ body {
.fbStatusBar span a:hover {
color: blue;
cursor: pointer;
cursor: pointer;
}
@@ -307,7 +307,7 @@ body {
padding-left: 10px;
}
/* body
/* body
*************************************************************************************************/
.fbPanel {
display: none;
@@ -340,7 +340,7 @@ body {
visibility: hidden !important;
}
/* fbBottom
/* fbBottom
*************************************************************************************************/
#fbCommand {
@@ -391,7 +391,7 @@ div.fbFitHeight {
Layout Controls
*************************************************************************************************/
/* fbToolbar buttons
/* fbToolbar buttons
*************************************************************************************************/
#fbWindowButtons a {
font-size: 1px;
@@ -420,7 +420,7 @@ div.fbFitHeight {
background: url(sprite.png) -48px -119px;
}
/* fbPanelBarBox tabs
/* fbPanelBarBox tabs
*************************************************************************************************/
.fbTab {
text-decoration: none;
@@ -475,7 +475,7 @@ a.fbTab:hover .fbTabR {
background: url(sprite.png) -8px -96px !important;
}
/* splitters
/* splitters
*************************************************************************************************/
#fbHSplitter {
position: absolute;
@@ -571,7 +571,7 @@ div.objectBox-element {
color: #fff !important;
}
/* Webkit CSS Hack - bug in "highlight" named color */
/* Webkit CSS Hack - bug in "highlight" named color */
@media screen and (-webkit-min-device-pixel-ratio:0) {
.selectedElement{
background: #316AC5;

0
vendor/firebug-lite/skin/xp/firebug.IE6.css vendored Executable file → Normal file
View File

68
vendor/firebug-lite/skin/xp/firebug.css vendored Executable file → Normal file
View File

@@ -136,10 +136,10 @@ h1.groupHeader {
position: relative;
top: -7px;
left: -5px;
outline: none;
resize: none;
/*
_border: 1px solid #999 !important;
_padding: 1px !important;
@@ -311,17 +311,17 @@ h1.groupHeader {
outline: none;
background-color: transparent
}
.useA11y .a11yCSSView .focusRow:focus .cssSelector,
.useA11y .a11yCSSView .focusRow:focus .cssPropName,
.useA11y .a11yCSSView .focusRow:focus .cssSelector,
.useA11y .a11yCSSView .focusRow:focus .cssPropName,
.useA11y .a11yCSSView .focusRow:focus .cssPropValue,
.useA11y .a11yCSSView .computedStyleRow:focus,
.useA11y .a11yCSSView .computedStyleRow:focus,
.useA11y .a11yCSSView .groupHeader:focus {
outline: 2px solid #FF9933;
outline-offset: -2px;
background-color: #FFFFD6;
}
.useA11y .a11yCSSView .groupHeader:focus {
outline-offset: -2px;
}
@@ -731,7 +731,7 @@ h1.groupHeader {
/* Time Info tip */
.timeInfoTip {
width: 150px;
width: 150px;
height: 40px
}
@@ -944,7 +944,7 @@ h1.groupHeader {
/*overflow-x: auto; HTML is damaged in case of big (2-3MB) responses */
}
/* replaced by .netInfoTextSelected for IE6 support
/* replaced by .netInfoTextSelected for IE6 support
.netInfoText[selected="true"] {
display: block;
}
@@ -963,7 +963,7 @@ h1.groupHeader {
}
.netInfoPostText .netInfoParamName {
width: 1px; /* Google Chrome need this otherwise the first column of
width: 1px; /* Google Chrome need this otherwise the first column of
the post variables table will be larger than expected */
}
@@ -1148,7 +1148,7 @@ h1.groupHeader {
}
* html .opened .spyHead .spyTitle,
* html .opened .logGroupLabel,
* html .opened .logGroupLabel,
* html .opened .memberLabelCell .memberLabel {
background-image: url(tree_close.gif);
background-repeat: no-repeat;
@@ -1677,7 +1677,7 @@ h1.groupHeader {
/*
.logRow-errorMessage > .hasTwisty > .errorTitle,
.logRow-spy .spyHead .spyTitle,
.logGroup > .logRow
.logGroup > .logRow
*/
.logRow-errorMessage .hasTwisty .errorTitle,
.logRow-spy .spyHead .spyTitle,
@@ -2056,11 +2056,11 @@ h1.groupHeader {
width: 10px;
height: 10px;
margin-top: 6px;
background: url(tabMenuTarget.png);
background: url(tabMenuTarget.png);
}
.fbTabMenuTarget:hover {
background: url(tabMenuTargetHover.png);
background: url(tabMenuTargetHover.png);
}
.fbShadow {
@@ -2098,7 +2098,7 @@ h1.groupHeader {
padding: 1px 18px 0;
text-decoration: none;
color: #000;
cursor: default;
cursor: default;
background: #ACA899;
margin: 4px 0;
}
@@ -2149,7 +2149,7 @@ h1.groupHeader {
}
.fbMenuShortcut {
padding-right: 85px;
padding-right: 85px;
}
.fbMenuShortcutKey {
@@ -2274,7 +2274,7 @@ h1.groupHeader {
margin: 0;
padding: 0;
overflow: hidden;
font-family: Lucida Grande, Tahoma, sans-serif;
font-size: 11px;
background: #fff;
@@ -2311,7 +2311,7 @@ h1.groupHeader {
margin: 0 5px 0 0;
background: #fff url(search.png) no-repeat 4px 2px !important;
background: #fff url(search.gif) no-repeat 4px 2px;
padding-left: 20px;
padding-left: 20px;
font-size: 11px;
}
@@ -2333,7 +2333,7 @@ h1.groupHeader {
background: url(errorIcon.png) no-repeat !important;
background: url(errorIcon.gif) no-repeat;
color: #f00;
font-weight: bold;
font-weight: bold;
}
#fbMiniErrors {
@@ -2348,7 +2348,7 @@ h1.groupHeader {
margin: 3px 4px 0;
height: 20px;
width: 20px;
float: right;
float: right;
background: url(sprite.png) 0 -135px;
cursor: pointer;
}
@@ -2403,10 +2403,10 @@ h1.groupHeader {
}
/************************************************************************************************
Sub-Layout
Sub-Layout
*************************************************************************************************/
/* fbToolbar
/* fbToolbar
*************************************************************************************************/
#fbToolbarIcon {
float: left;
@@ -2472,7 +2472,7 @@ h1.groupHeader {
#fbStatusBarBox {
top: 4px;
cursor: default;
cursor: default;
}
.fbToolbarSeparator {
@@ -2500,7 +2500,7 @@ h1.groupHeader {
.fbStatusBar a:hover {
color: blue;
cursor: pointer;
cursor: pointer;
}
@@ -2545,7 +2545,7 @@ h1.groupHeader {
padding-left: 4px;
}
/* body
/* body
*************************************************************************************************/
.fbPanel {
display: none;
@@ -2609,7 +2609,7 @@ h1.groupHeader {
position: absolute;
right: 2px;
bottom: 3px;
z-index: 99;
}
@@ -2624,7 +2624,7 @@ h1.groupHeader {
visibility: hidden !important;
}
/* fbBottom
/* fbBottom
*************************************************************************************************/
#fbCommand {
@@ -2689,7 +2689,7 @@ div.fbFitHeight {
Layout Controls
*************************************************************************************************/
/* fbToolbar buttons
/* fbToolbar buttons
*************************************************************************************************/
.fbSmallButton {
overflow: hidden;
@@ -2729,7 +2729,7 @@ div.fbFitHeight {
}
/* fbPanelBarBox tabs
/* fbPanelBarBox tabs
*************************************************************************************************/
.fbTab {
text-decoration: none;
@@ -2785,7 +2785,7 @@ a.fbTab:hover .fbTabR {
background: url(sprite.png) -8px -96px !important;
}
/* splitters
/* splitters
*************************************************************************************************/
#fbHSplitter {
position: fixed;
@@ -2888,7 +2888,7 @@ div.objectBox-element {
position: relative;
}
/* Webkit CSS Hack - bug in "highlight" named color */
/* Webkit CSS Hack - bug in "highlight" named color */
@media screen and (-webkit-min-device-pixel-ratio:0) {
.selectedElement{
background: #316AC5;
@@ -2903,7 +2903,7 @@ div.objectBox-element {
}
/* TODO: remove this? */
/* TODO: xxxpedro - IE need this in windowless mode (cnn.com) check if the issue is related to
/* TODO: xxxpedro - IE need this in windowless mode (cnn.com) check if the issue is related to
position. if so, override it at chrome.js initialization when creating the div */
.logRow {
position: relative;
@@ -2939,9 +2939,9 @@ position. if so, override it at chrome.js initialization when creating the div *
.objectBox-string {
color: red;
/* TODO: xxxpedro make long strings break line */
/*white-space: pre; */
/*white-space: pre; */
}
.objectBox-number {

80
vendor/firebug-lite/skin/xp/firebug.html vendored Executable file → Normal file
View File

@@ -14,71 +14,71 @@
<tr>
<!-- Interface - Top Area -->
<td id="fbTop" colspan="2">
<!--
<!--
<div>
--><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
--><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
<input type="text" id="fbToolbarSearch" />
</div>
-->
<!-- Window Buttons -->
<div id="fbWindowButtons">
<a id="fbWindow_btDeactivate" class="fbSmallButton fbHover" title="Deactivate Firebug for this web page">&nbsp;</a>
<a id="fbWindow_btDetach" class="fbSmallButton fbHover" title="Open Firebug in popup window">&nbsp;</a>
<a id="fbWindow_btClose" class="fbSmallButton fbHover" title="Minimize Firebug">&nbsp;</a>
</div>
<!-- Toolbar buttons and Status Bar -->
<div id="fbToolbar">
<div id="fbToolbarContent">
<!-- Firebug Button -->
<span id="fbToolbarIcon">
<a id="fbFirebugButton" class="fbIconButton" class="fbHover" target="_blank">&nbsp;</a>
</span>
<!--
<!--
<span id="fbLeftToolbarErrors" class="fbErrors">2 errors</span>
-->
<!-- Toolbar Buttons -->
<span id="fbToolbarButtons">
<!-- Fixed Toolbar Buttons -->
<span id="fbFixedButtons">
<a id="fbChrome_btInspect" class="fbButton fbHover" title="Click an element in the page to inspect">Inspect</a>
</span>
<!-- Console Panel Toolbar Buttons -->
<span id="fbConsoleButtons" class="fbToolbarButtons">
<a id="fbConsole_btClear" class="fbButton fbHover" title="Clear the console">Clear</a>
</span>
<!-- HTML Panel Toolbar Buttons -->
<!--
<!--
<span id="fbHTMLButtons" class="fbToolbarButtons">
<a id="fbHTML_btEdit" class="fbHover" title="Edit this HTML">Edit</a>
</span>
-->
</span>
<!-- Status Bar -->
<span id="fbStatusBarBox">
<span class="fbToolbarSeparator"></span>
<!-- HTML Panel Status Bar -->
<!--
<!--
<span id="fbHTMLStatusBar" class="fbStatusBar fbToolbarButtons">
</span>
-->
</span>
</div>
</div>
<!-- PanelBars -->
<div id="fbPanelBarBox">
<!-- Main PanelBar -->
<div id="fbPanelBar1" class="fbPanelBar">
<a id="fbConsoleTab" class="fbTab fbHover">
@@ -112,7 +112,7 @@
<!-- Side PanelBars -->
<div id="fbPanelBar2Box" class="hide">
<div id="fbPanelBar2" class="fbPanelBar">
<!--
<!--
<a class="fbTab fbHover">
<span class="fbTabL"></span>
<span class="fbTabText">Style</span>
@@ -131,18 +131,18 @@
-->
</div>
</div>
</div>
<!-- Horizontal Splitter -->
<div id="fbHSplitter">&nbsp;</div>
</td>
</tr>
<!-- Interface - Main Area -->
<tr id="fbContent">
<!-- Panels -->
<td id="fbPanelBox1">
<div id="fbPanel1" class="fbFitHeight">
@@ -150,41 +150,41 @@
<div id="fbHTML" class="fbPanel"></div>
</div>
</td>
<!-- Side Panel Box -->
<td id="fbPanelBox2" class="hide">
<!-- VerticalSplitter -->
<div id="fbVSplitter" class="fbVSplitter">&nbsp;</div>
<!-- Side Panels -->
<div id="fbPanel2" class="fbFitHeight">
<!-- HTML Side Panels -->
<div id="fbHTML_Style" class="fbPanel"></div>
<div id="fbHTML_Layout" class="fbPanel"></div>
<div id="fbHTML_DOM" class="fbPanel"></div>
</div>
<!-- Large Command Line -->
<textarea id="fbLargeCommandLine" class="fbFitHeight"></textarea>
<!-- Large Command Line Buttons -->
<div id="fbLargeCommandButtons">
<a id="fbCommand_btRun" class="fbButton fbHover">Run</a>
<a id="fbCommand_btClear" class="fbButton fbHover">Clear</a>
<a id="fbSmallCommandLineIcon" class="fbSmallButton fbHover"></a>
</div>
</td>
</tr>
<!-- Interface - Bottom Area -->
<tr id="fbBottom" class="hide">
<!-- Command Line -->
<td id="fbCommand" colspan="2">
<div id="fbCommandBox">
@@ -193,18 +193,18 @@
<a id="fbLargeCommandLineIcon" class="fbSmallButton fbHover"></a>
</div>
</td>
</tr>
</tbody>
</table>
</table>
<span id="fbMiniChrome">
<span id="fbMiniContent">
<span id="fbMiniIcon" title="Open Firebug Lite"></span>
<span id="fbMiniErrors" class="fbErrors"><!-- 2 errors --></span>
</span>
</span>
<!--
<!--
<div id="fbErrorPopup">
<div id="fbErrorPopupContent">
<div id="fbErrorIndicator" class="fbErrors">2 errors</div>

0
vendor/firebug-lite/skin/xp/firebug.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
vendor/firebug-lite/skin/xp/group.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 158 B

0
vendor/firebug-lite/skin/xp/html.css vendored Executable file → Normal file
View File

0
vendor/firebug-lite/skin/xp/infoIcon.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 359 B

0
vendor/firebug-lite/skin/xp/infoIcon.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 524 B

0
vendor/firebug-lite/skin/xp/loading_16.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
vendor/firebug-lite/skin/xp/min.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 552 B

0
vendor/firebug-lite/skin/xp/minHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 485 B

After

Width:  |  Height:  |  Size: 485 B

0
vendor/firebug-lite/skin/xp/off.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 742 B

After

Width:  |  Height:  |  Size: 742 B

0
vendor/firebug-lite/skin/xp/offHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 680 B

0
vendor/firebug-lite/skin/xp/pixel_transparent.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

0
vendor/firebug-lite/skin/xp/roundCorner.svg vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

0
vendor/firebug-lite/skin/xp/search.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 550 B

0
vendor/firebug-lite/skin/xp/search.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 685 B

After

Width:  |  Height:  |  Size: 685 B

0
vendor/firebug-lite/skin/xp/shadow.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

0
vendor/firebug-lite/skin/xp/shadow2.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

0
vendor/firebug-lite/skin/xp/shadowAlpha.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

0
vendor/firebug-lite/skin/xp/sprite.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

0
vendor/firebug-lite/skin/xp/tabHoverLeft.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 438 B

After

Width:  |  Height:  |  Size: 438 B

0
vendor/firebug-lite/skin/xp/tabHoverMid.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 261 B

0
vendor/firebug-lite/skin/xp/tabHoverRight.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 436 B

0
vendor/firebug-lite/skin/xp/tabLeft.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 449 B

0
vendor/firebug-lite/skin/xp/tabMenuCheckbox.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

0
vendor/firebug-lite/skin/xp/tabMenuPin.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 207 B

0
vendor/firebug-lite/skin/xp/tabMenuRadio.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 192 B

0
vendor/firebug-lite/skin/xp/tabMenuTarget.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 142 B

0
vendor/firebug-lite/skin/xp/tabMenuTargetHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 148 B

0
vendor/firebug-lite/skin/xp/tabMid.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 262 B

0
vendor/firebug-lite/skin/xp/tabRight.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 448 B

After

Width:  |  Height:  |  Size: 448 B

0
vendor/firebug-lite/skin/xp/textEditorBorders.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 117 B

After

Width:  |  Height:  |  Size: 117 B

0
vendor/firebug-lite/skin/xp/textEditorBorders.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
vendor/firebug-lite/skin/xp/textEditorCorners.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

0
vendor/firebug-lite/skin/xp/textEditorCorners.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

0
vendor/firebug-lite/skin/xp/titlebarMid.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 273 B

0
vendor/firebug-lite/skin/xp/toolbarMid.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 242 B

0
vendor/firebug-lite/skin/xp/tree_close.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 300 B

0
vendor/firebug-lite/skin/xp/tree_open.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 202 B

0
vendor/firebug-lite/skin/xp/twistyClosed.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 334 B

0
vendor/firebug-lite/skin/xp/twistyOpen.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 309 B

After

Width:  |  Height:  |  Size: 309 B

0
vendor/firebug-lite/skin/xp/up.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 619 B

0
vendor/firebug-lite/skin/xp/upActive.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 551 B

After

Width:  |  Height:  |  Size: 551 B

0
vendor/firebug-lite/skin/xp/upHover.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 526 B

0
vendor/firebug-lite/skin/xp/warningIcon.gif vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 357 B

0
vendor/firebug-lite/skin/xp/warningIcon.png vendored Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 516 B

After

Width:  |  Height:  |  Size: 516 B

2
vendor/firebug-lite/src/firebug-lite-debug.js vendored Executable file → Normal file
View File

@@ -6258,7 +6258,7 @@ FBL.Firebug =
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
version: "Firebug Lite 1.4.0",
revision: "$Revision: 11967 $",
revision: "$Revision$",
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
modules: modules,

View File

@@ -1,6 +1,6 @@
/*
json2.js
2014-02-04
2015-05-03
Public Domain.
@@ -17,7 +17,9 @@
This file creates a global JSON object containing two methods: stringify
and parse.
and parse. This file is provides the ES5 JSON capability to ES3 systems.
If a project might run on IE8 or earlier, then this file should be included.
This file does nothing on ES5 systems.
JSON.stringify(value, replacer, space)
value any JavaScript value, usually an object or array.
@@ -48,7 +50,9 @@
Date.prototype.toJSON = function (key) {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
return n < 10
? '0' + n
: n;
}
return this.getUTCFullYear() + '-' +
@@ -94,8 +98,9 @@
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
text = JSON.stringify([new Date()], function (key, value) {
return this[key] instanceof Date ?
'Date(' + this[key] + ')' : value;
return this[key] instanceof Date
? 'Date(' + this[key] + ')'
: value;
});
// text is '["Date(---current time---)"]'
@@ -146,10 +151,12 @@
redistribute.
*/
/*jslint evil: true, regexp: true */
/*jslint
eval, for, this
*/
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
/*property
JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
lastIndex, length, parse, prototype, push, replace, slice, stringify,
test, toJSON, toString, valueOf
@@ -165,10 +172,23 @@ if (typeof JSON !== 'object') {
(function () {
'use strict';
var rx_one = /^[\],:{}\s]*$/,
rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
rx_three = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
rx_four = /(?:^|:|,)(?:\s*\[)+/g,
rx_escapable = /[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
return n < 10
? '0' + n
: n;
}
function this_value() {
return this.valueOf();
}
if (typeof Date.prototype.toJSON !== 'function') {
@@ -176,25 +196,21 @@ if (typeof JSON !== 'object') {
Date.prototype.toJSON = function () {
return isFinite(this.valueOf())
? this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z'
? this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z'
: null;
};
String.prototype.toJSON =
Number.prototype.toJSON =
Boolean.prototype.toJSON = function () {
return this.valueOf();
};
Boolean.prototype.toJSON = this_value;
Number.prototype.toJSON = this_value;
String.prototype.toJSON = this_value;
}
var cx,
escapable,
gap,
var gap,
indent,
meta,
rep;
@@ -207,13 +223,15 @@ if (typeof JSON !== 'object') {
// Otherwise we must also replace the offending characters with safe escape
// sequences.
escapable.lastIndex = 0;
return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
var c = meta[a];
return typeof c === 'string'
? c
: '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' : '"' + string + '"';
rx_escapable.lastIndex = 0;
return rx_escapable.test(string)
? '"' + string.replace(rx_escapable, function (a) {
var c = meta[a];
return typeof c === 'string'
? c
: '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"'
: '"' + string + '"';
}
@@ -253,7 +271,9 @@ if (typeof JSON !== 'object') {
// JSON numbers must be finite. Encode non-finite numbers as null.
return isFinite(value) ? String(value) : 'null';
return isFinite(value)
? String(value)
: 'null';
case 'boolean':
case 'null':
@@ -299,8 +319,8 @@ if (typeof JSON !== 'object') {
v = partial.length === 0
? '[]'
: gap
? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
: '[' + partial.join(',') + ']';
? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
: '[' + partial.join(',') + ']';
gap = mind;
return v;
}
@@ -314,7 +334,11 @@ if (typeof JSON !== 'object') {
k = rep[i];
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
partial.push(quote(k) + (
gap
? ': '
: ':'
) + v);
}
}
}
@@ -326,7 +350,11 @@ if (typeof JSON !== 'object') {
if (Object.prototype.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
partial.push(quote(k) + (
gap
? ': '
: ':'
) + v);
}
}
}
@@ -338,8 +366,8 @@ if (typeof JSON !== 'object') {
v = partial.length === 0
? '{}'
: gap
? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
: '{' + partial.join(',') + '}';
? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
: '{' + partial.join(',') + '}';
gap = mind;
return v;
}
@@ -348,14 +376,13 @@ if (typeof JSON !== 'object') {
// If the JSON object does not yet have a stringify method, give it one.
if (typeof JSON.stringify !== 'function') {
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
meta = { // table of character substitutions
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"',
'"': '\\"',
'\\': '\\\\'
};
JSON.stringify = function (value, replacer, space) {
@@ -405,7 +432,6 @@ if (typeof JSON !== 'object') {
// If the JSON object does not yet have a parse method, give it one.
if (typeof JSON.parse !== 'function') {
cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
JSON.parse = function (text, reviver) {
// The parse method takes a text and an optional reviver function, and returns
@@ -440,11 +466,11 @@ if (typeof JSON !== 'object') {
// incorrectly, either silently deleting them, or treating them as line endings.
text = String(text);
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {
rx_dangerous.lastIndex = 0;
if (rx_dangerous.test(text)) {
text = text.replace(rx_dangerous, function (a) {
return '\\u' +
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
});
}
@@ -461,10 +487,14 @@ if (typeof JSON !== 'object') {
// we look to see that the remaining characters are only whitespace or ']' or
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
if (/^[\],:{}\s]*$/
.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
if (
rx_one.test(
text
.replace(rx_two, '@')
.replace(rx_three, ']')
.replace(rx_four, '')
)
) {
// In the third stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity

View File

@@ -1,4 +1,4 @@
Copyright (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative
Copyright (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative
Reporters & Editors
Permission is hereby granted, free of charge, to any person

View File

@@ -1,6 +1,7 @@
(function() {
var _ = typeof require == 'function' ? require('..') : window._;
module('Arrays');
QUnit.module('Arrays');
test('first', function() {
equal(_.first([1, 2, 3]), 1, 'can pull out the first element of an array');
@@ -79,6 +80,12 @@
});
test('flatten', function() {
deepEqual(_.flatten(null), [], 'Flattens supports null');
deepEqual(_.flatten(void 0), [], 'Flattens supports undefined');
deepEqual(_.flatten([[], [[]], []]), [], 'Flattens empty arrays');
deepEqual(_.flatten([[], [[]], []], true), [[]], 'Flattens empty arrays');
var list = [1, [2], [3, [[[4]]]]];
deepEqual(_.flatten(list), [1, 2, 3, 4], 'can flatten nested arrays');
deepEqual(_.flatten(list, true), [1, 2, 3, [[[4]]]], 'can shallowly flatten nested arrays');
@@ -86,6 +93,11 @@
deepEqual(result, [1, 2, 3, 4], 'works on an arguments object');
list = [[1], [2], [3], [[4]]];
deepEqual(_.flatten(list, true), [1, 2, 3, [4]], 'can shallowly flatten arrays containing only other arrays');
equal(_.flatten([_.range(10), _.range(10), 5, 1, 3], true).length, 23);
equal(_.flatten([_.range(10), _.range(10), 5, 1, 3]).length, 23);
equal(_.flatten([new Array(1000000), _.range(56000), 5, 1, 3]).length, 1056003, 'Flatten can handle massive collections');
equal(_.flatten([new Array(1000000), _.range(56000), 5, 1, 3], true).length, 1056003, 'Flatten can handle massive collections');
});
test('without', function() {
@@ -99,6 +111,32 @@
equal(_.without(list, list[0]).length, 1, 'ditto.');
});
test('sortedIndex', function() {
var numbers = [10, 20, 30, 40, 50], num = 35;
var indexForNum = _.sortedIndex(numbers, num);
equal(indexForNum, 3, '35 should be inserted at index 3');
var indexFor30 = _.sortedIndex(numbers, 30);
equal(indexFor30, 2, '30 should be inserted at index 2');
var objects = [{x: 10}, {x: 20}, {x: 30}, {x: 40}];
var iterator = function(obj){ return obj.x; };
strictEqual(_.sortedIndex(objects, {x: 25}, iterator), 2);
strictEqual(_.sortedIndex(objects, {x: 35}, 'x'), 3);
var context = {1: 2, 2: 3, 3: 4};
iterator = function(obj){ return this[obj]; };
strictEqual(_.sortedIndex([1, 3], 2, iterator, context), 1);
var values = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, 2147483647];
var array = Array(Math.pow(2, 32) - 1);
var length = values.length;
while (length--) {
array[values[length]] = values[length];
}
equal(_.sortedIndex(array, 2147483648), 2147483648, 'should work with large indexes');
});
test('uniq', function() {
var list = [1, 2, 1, 3, 1, 4];
deepEqual(_.uniq(list), [1, 2, 3, 4], 'can find the unique values of an unsorted array');
@@ -116,6 +154,20 @@
list = [1, 2, 2, 3, 4, 4];
deepEqual(_.uniq(list, true, iterator), [1, 2, 3, 4], 'iterator works with sorted array');
var kittens = [
{kitten: 'Celery', cuteness: 8},
{kitten: 'Juniper', cuteness: 10},
{kitten: 'Spottis', cuteness: 10}
];
var expected = [
{kitten: 'Celery', cuteness: 8},
{kitten: 'Juniper', cuteness: 10}
];
deepEqual(_.uniq(kittens, true, 'cuteness'), expected, 'string iterator works with sorted array');
var result = (function(){ return _.uniq(arguments); }(1, 2, 1, 3, 1, 4));
deepEqual(result, [1, 2, 3, 4], 'works on an arguments object');
@@ -209,6 +261,19 @@
deepEqual(_.zip(), [], '_.zip() returns []');
});
test('unzip', function() {
deepEqual(_.unzip(null), [], 'handles null');
deepEqual(_.unzip([['a', 'b'], [1, 2]]), [['a', 1], ['b', 2]]);
// complements zip
var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
deepEqual(_.unzip(zipped), [['fred', 'barney'], [30, 40], [true, false]]);
zipped = _.zip(['moe', 30], ['larry', 40], ['curly', 50, 'extra data']);
deepEqual(_.unzip(zipped), [['moe', 30, void 0], ['larry', 40, void 0], ['curly', 50, 'extra data']], 'Uses length of largest array');
});
test('object', function() {
var result = _.object(['moe', 'larry', 'curly'], [30, 40, 50]);
var shouldBe = {moe: 30, larry: 40, curly: 50};
@@ -229,7 +294,14 @@
equal(_.indexOf(numbers, 2), 1, 'can compute indexOf');
var result = (function(){ return _.indexOf(arguments, 2); }(1, 2, 3));
equal(result, 1, 'works on an arguments object');
equal(_.indexOf(null, 2), -1, 'handles nulls properly');
_.each([null, void 0, [], false], function(val) {
var msg = 'Handles: ' + (_.isArray(val) ? '[]' : val);
equal(_.indexOf(val, 2), -1, msg);
equal(_.indexOf(val, 2, -1), -1, msg);
equal(_.indexOf(val, 2, -20), -1, msg);
equal(_.indexOf(val, 2, 15), -1, msg);
});
var num = 35;
numbers = [10, 20, 30, 40, 50];
@@ -263,6 +335,28 @@
strictEqual(_.indexOf(array, 1, fromIndex), 0);
});
strictEqual(_.indexOf([1, 2, 3], 1, true), 0);
index = _.indexOf([], undefined, true);
equal(index, -1, 'empty array with truthy `isSorted` returns -1');
});
test('indexOf with NaN', function() {
strictEqual(_.indexOf([1, 2, NaN, NaN], NaN), 2, 'Expected [1, 2, NaN] to contain NaN');
strictEqual(_.indexOf([1, 2, Infinity], NaN), -1, 'Expected [1, 2, NaN] to contain NaN');
strictEqual(_.indexOf([1, 2, NaN, NaN], NaN, 1), 2, 'startIndex does not affect result');
strictEqual(_.indexOf([1, 2, NaN, NaN], NaN, -2), 2, 'startIndex does not affect result');
(function() {
strictEqual(_.indexOf(arguments, NaN), 2, 'Expected arguments [1, 2, NaN] to contain NaN');
}(1, 2, NaN, NaN));
});
test('indexOf with +- 0', function() {
_.each([-0, +0], function(val) {
strictEqual(_.indexOf([1, 2, val, val], val), 2);
strictEqual(_.indexOf([1, 2, val, val], -val), 2);
});
});
test('lastIndexOf', function() {
@@ -276,7 +370,14 @@
equal(_.lastIndexOf(numbers, 0), 8, 'lastIndexOf the other element');
var result = (function(){ return _.lastIndexOf(arguments, 1); }(1, 0, 1, 0, 0, 1, 0, 0, 0));
equal(result, 5, 'works on an arguments object');
equal(_.lastIndexOf(null, 2), -1, 'handles nulls properly');
_.each([null, void 0, [], false], function(val) {
var msg = 'Handles: ' + (_.isArray(val) ? '[]' : val);
equal(_.lastIndexOf(val, 2), -1, msg);
equal(_.lastIndexOf(val, 2, -1), -1, msg);
equal(_.lastIndexOf(val, 2, -20), -1, msg);
equal(_.lastIndexOf(val, 2, 15), -1, msg);
});
numbers = [1, 2, 3, 1, 2, 3, 1, 2, 3];
var index = _.lastIndexOf(numbers, 2, 2);
@@ -316,6 +417,112 @@
}), [0, -1, -1]);
});
test('lastIndexOf with NaN', function() {
strictEqual(_.lastIndexOf([1, 2, NaN, NaN], NaN), 3, 'Expected [1, 2, NaN] to contain NaN');
strictEqual(_.lastIndexOf([1, 2, Infinity], NaN), -1, 'Expected [1, 2, NaN] to contain NaN');
strictEqual(_.lastIndexOf([1, 2, NaN, NaN], NaN, 2), 2, 'fromIndex does not affect result');
strictEqual(_.lastIndexOf([1, 2, NaN, NaN], NaN, -2), 2, 'fromIndex does not affect result');
(function() {
strictEqual(_.lastIndexOf(arguments, NaN), 3, 'Expected arguments [1, 2, NaN] to contain NaN');
}(1, 2, NaN, NaN));
});
test('lastIndexOf with +- 0', function() {
_.each([-0, +0], function(val) {
strictEqual(_.lastIndexOf([1, 2, val, val], val), 3);
strictEqual(_.lastIndexOf([1, 2, val, val], -val), 3);
strictEqual(_.lastIndexOf([-1, 1, 2], -val), -1);
});
});
test('findIndex', function() {
var objects = [
{'a': 0, 'b': 0},
{'a': 1, 'b': 1},
{'a': 2, 'b': 2},
{'a': 0, 'b': 0}
];
equal(_.findIndex(objects, function(obj) {
return obj.a === 0;
}), 0);
equal(_.findIndex(objects, function(obj) {
return obj.b * obj.a === 4;
}), 2);
equal(_.findIndex(objects, 'a'), 1, 'Uses lookupIterator');
equal(_.findIndex(objects, function(obj) {
return obj.b * obj.a === 5;
}), -1);
equal(_.findIndex(null, _.noop), -1);
strictEqual(_.findIndex(objects, function(a) {
return a.foo === null;
}), -1);
_.findIndex([{a: 1}], function(a, key, obj) {
equal(key, 0);
deepEqual(obj, [{a: 1}]);
strictEqual(this, objects, 'called with context');
}, objects);
var sparse = [];
sparse[20] = {'a': 2, 'b': 2};
equal(_.findIndex(sparse, function(obj) {
return obj && obj.b * obj.a === 4;
}), 20, 'Works with sparse arrays');
var array = [1, 2, 3, 4];
array.match = 55;
strictEqual(_.findIndex(array, function(x) { return x === 55; }), -1, 'doesn\'t match array-likes keys');
});
test('findLastIndex', function() {
var objects = [
{'a': 0, 'b': 0},
{'a': 1, 'b': 1},
{'a': 2, 'b': 2},
{'a': 0, 'b': 0}
];
equal(_.findLastIndex(objects, function(obj) {
return obj.a === 0;
}), 3);
equal(_.findLastIndex(objects, function(obj) {
return obj.b * obj.a === 4;
}), 2);
equal(_.findLastIndex(objects, 'a'), 2, 'Uses lookupIterator');
equal(_.findLastIndex(objects, function(obj) {
return obj.b * obj.a === 5;
}), -1);
equal(_.findLastIndex(null, _.noop), -1);
strictEqual(_.findLastIndex(objects, function(a) {
return a.foo === null;
}), -1);
_.findLastIndex([{a: 1}], function(a, key, obj) {
equal(key, 0);
deepEqual(obj, [{a: 1}]);
strictEqual(this, objects, 'called with context');
}, objects);
var sparse = [];
sparse[20] = {'a': 2, 'b': 2};
equal(_.findLastIndex(sparse, function(obj) {
return obj && obj.b * obj.a === 4;
}), 20, 'Works with sparse arrays');
var array = [1, 2, 3, 4];
array.match = 55;
strictEqual(_.findLastIndex(array, function(x) { return x === 55; }), -1, 'doesn\'t match array-likes keys');
});
test('range', function() {
deepEqual(_.range(0), [], 'range with 0 as a first argument generates an empty array');
deepEqual(_.range(4), [0, 1, 2, 3], 'range with a single positive argument generates an array of elements 0,1,2,...,n-1');

Some files were not shown because too many files have changed in this diff Show More