Compare commits

...

530 Commits
4.0.1 ... 4.8.1

Author SHA1 Message Date
John-David Dalton
7a6b64b2f6 Bump to v4.8.1. 2016-04-04 11:43:03 -07:00
John-David Dalton
bca11bd21e Rebuild lodash and docs. 2016-04-04 11:42:50 -07:00
John-David Dalton
bf39a31907 Fix typo in _falseOptions.jst. 2016-04-04 08:51:04 -07:00
John-David Dalton
792bfbb604 Bump to v4.8.0. 2016-04-03 23:47:26 -07:00
John-David Dalton
1ef96896d5 Rebuild lodash and docs. 2016-04-03 23:47:26 -07:00
John-David Dalton
2293de07a7 Add _falseOptions module. 2016-04-03 23:47:26 -07:00
John-David Dalton
804ad3d805 Move private key higher. [ci skip] 2016-04-03 22:44:28 -07:00
John-David Dalton
c797f83ca5 Add fp convert test for unconverted methods. 2016-04-03 21:55:30 -07:00
John-David Dalton
a71ac53fa7 Add jsdoc comments to fp/_baseConvert. [ci skip] 2016-04-03 21:55:30 -07:00
John-David Dalton
7165ef6f5e Minor doc tweak to _.rearg. [ci skip] 2016-04-03 21:55:30 -07:00
John-David Dalton
c01e0cd7d1 Simplify references to partial or provided arguments. [ci skip] 2016-04-03 21:55:30 -07:00
John-David Dalton
a5990a4c4e Use thru instead of through in docs. [ci skip] 2016-04-03 21:55:30 -07:00
John-David Dalton
75d196b01b Allow convert to work on methods that aren't converted by default. 2016-04-03 21:55:08 -07:00
John-David Dalton
69ce7cde7d Convert methods not found in aryMethod mapping. 2016-04-02 22:49:17 -07:00
John-David Dalton
6861734010 Add matchesStrictComparable helper. 2016-04-02 14:49:25 -07:00
John-David Dalton
0f75d967d0 Add convert method to modules that pass thru. 2016-04-02 14:19:19 -07:00
John-David Dalton
012bff97e0 Add fp/placeholder module. 2016-04-02 14:19:13 -07:00
John-David Dalton
2b58525816 Update many es5 spec links to es6. [ci skip] 2016-04-02 10:33:13 -07:00
John-David Dalton
579cf00d10 Update _.isNaN doc note with a reference to Number.isNaN. [ci skip] 2016-04-02 08:02:36 -07:00
John-David Dalton
cfd25cec75 Minor Lodash letter case nit in readme. [ci skip] 2016-04-02 08:01:35 -07:00
John-David Dalton
c267c4e06b Excuse Underscore _.chunk test. 2016-04-01 20:56:19 -07:00
John-David Dalton
c4a78445b3 Add _.isNative test for Promise. 2016-04-01 19:17:52 -07:00
John-David Dalton
4c8836a24a Cleanup _.isNative. 2016-04-01 19:06:36 -07:00
John-David Dalton
972624297b Add variation to falsey _.slice test. 2016-04-01 18:18:37 -07:00
John-David Dalton
ebf9904e8a Add toSource helper. 2016-04-01 18:18:37 -07:00
John-David Dalton
64652c263f Update _.map doc note on guarded methods. [ci skip] 2016-04-01 18:18:37 -07:00
John-David Dalton
58f93567fc Make _.sampleSize default n to 1 instead of 0. 2016-04-01 18:18:37 -07:00
John-David Dalton
f599c4817a Make _.chunk default size to 1 instead of 0. 2016-04-01 18:18:36 -07:00
John-David Dalton
930b034da5 Make _.repeat default n to 1 instead of 0. 2016-04-01 18:18:36 -07:00
John-David Dalton
c21174f7f9 Add bizarro test for _.isEmpty. 2016-04-01 18:18:36 -07:00
John-David Dalton
e22be612e2 Remove dataViewCtorString branch of getTag for coverage tests. 2016-04-01 18:18:36 -07:00
Craig Martin
669bc1520e Run scripts synchronous in foreground. 2016-04-01 18:18:27 -07:00
John-David Dalton
b257bb9c9e Allow over, overEvery, and overSome to accept matchesProperty shorthands. [closes #2193] 2016-04-01 09:14:13 -07:00
John-David Dalton
b8096df6d8 Fix leaked var. 2016-04-01 09:13:54 -07:00
greenkeeperio-bot
43d530ead9 Update dojo to 1.11.1. 2016-04-01 09:10:36 -07:00
John-David Dalton
9dbd665d05 Space nit in _.toNumber. [ci skip] 2016-04-01 09:10:36 -07:00
John-David Dalton
3902fd1a67 Ensure has treats nested sparse arrays consistently. 2016-04-01 09:10:35 -07:00
John-David Dalton
642d248f99 Cleanup deep property tests of has methods. 2016-04-01 09:10:35 -07:00
John-David Dalton
8bd9a4d2c3 Ensure _.has returns false for nullish objects. [closes #2190] 2016-04-01 09:10:24 -07:00
John-David Dalton
e96ee69f1c Remove rogue comment delimiter from fp wiki template. [ci skip] 2016-04-01 09:10:24 -07:00
John-David Dalton
5bb899a700 Add array path examples to _.set and _.unset docs. [ci skip] 2016-04-01 09:10:24 -07:00
John-David Dalton
431e0fa2f6 Add line number to error message in web worker. 2016-04-01 09:10:24 -07:00
John-David Dalton
ec92292c38 Wrap funcToString call in _.isNative in a try-catch. 2016-04-01 09:10:24 -07:00
Oskar Segersvärd
45953b2ac1 Set the jsdoc type of apply's args parameter to Array. [ci skip] 2016-04-01 09:10:24 -07:00
John-David Dalton
d9f93d0895 Increment package version to enable ci tests. 2016-04-01 09:10:24 -07:00
John-David Dalton
252ea445ca Bump to v4.7.0. 2016-03-31 00:51:19 -07:00
John-David Dalton
9826d9bd46 Rebuild lodash and docs. 2016-03-31 00:51:19 -07:00
John-David Dalton
b53f178c46 Sort reargs and aliases in fp wiki template. 2016-03-31 00:51:19 -07:00
John-David Dalton
5ad5eb8f5d Add divide and multiply to lodash doc block. [ci skip] 2016-03-31 00:28:04 -07:00
John-David Dalton
7add87739a Add _.concat test for shallow cloning array. 2016-03-30 23:32:21 -07:00
John-David Dalton
2cd12c38e3 Temporarily remove ghooks. 2016-03-30 21:27:19 -07:00
Jordan Eldredge
ad72b5b565 Simplify _.result. 2016-03-30 19:52:46 -07:00
Craig Martin
608e74a111 Ensure all background jobs finish before continuing. 2016-03-30 19:50:23 -07:00
John-David Dalton
c36d0af5cd Avoid a JIT bug in Safari 9 for baseIteratee. 2016-03-30 19:50:13 -07:00
John-David Dalton
55c3299d5c Use getIteratee in more places. 2016-03-30 12:17:28 -07:00
greenkeeperio-bot
7a3dda6105 Update ghooks to 1.1.1. 2016-03-30 08:43:30 -07:00
John-David Dalton
171d9eab78 Use copyArray in concat. 2016-03-30 08:43:30 -07:00
John-David Dalton
ab9d2056da Add bindKey to fp aryMethod mapping. 2016-03-30 08:43:30 -07:00
John-David Dalton
4310329971 Add bind and bindKey to fp skipRearg mapping. 2016-03-30 08:43:30 -07:00
John-David Dalton
d038315f61 Add link to github reactions. [ci skip] 2016-03-30 00:54:28 -07:00
John-David Dalton
c0f91c9169 Minor newline nits. 2016-03-29 22:51:25 -07:00
John-David Dalton
519a02ff34 Update fred ages in doc examples. [ci skip] 2016-03-29 22:33:43 -07:00
John-David Dalton
643ce1da74 Revert createPadding behavior for chars that coerce to empty strings. 2016-03-29 22:23:00 -07:00
greenkeeperio-bot
4c789197f9 Update chalk to 1.1.3 and opt-cli to 1.4.0. 2016-03-29 22:22:12 -07:00
John-David Dalton
277c9bdc7c Make shouldInvoke explicitly return true if it's the first call. 2016-03-29 09:53:35 -07:00
John-David Dalton
455eace9c5 Cleanup _.debounce tests. 2016-03-29 00:28:43 -07:00
John-David Dalton
f263a87983 Update excused Underscore tests. 2016-03-28 22:11:56 -07:00
John-David Dalton
4f92fb7007 Ensure cancel resets lastCallTime and lastInvokeTime. 2016-03-28 21:06:11 -07:00
John-David Dalton
4fd43f7fe7 Minor value consistency nits. 2016-03-28 19:27:55 -07:00
John-David Dalton
3fe2efa311 Ensure _.concat cases wraps nullish array values in an array. 2016-03-28 17:44:13 -07:00
John-David Dalton
a7bf3352df Ensure _.concat casts non-array array values to arrays. 2016-03-28 12:34:09 -07:00
John-David Dalton
2ddd893ca2 Update vendor/underscore. 2016-03-28 09:35:41 -07:00
John-David Dalton
5d92b37550 Add updateWith to lodash sequence doc note. [ci skip] 2016-03-28 09:26:03 -07:00
John-David Dalton
dcec882262 Ensure _.words detects compound words where an all caps word is next to a capitalized word. [closes #2163] 2016-03-28 07:57:37 -07:00
John-David Dalton
de53132692 Add args param doc for _.attempt. [closes #2164] [ci skip] 2016-03-28 07:05:08 -07:00
greenkeeperio-bot
23a7871e2d Update docdown to 0.5.0. 2016-03-27 16:32:20 -07:00
John-David Dalton
792347978a Add shim path back to _.isEmpty. 2016-03-27 13:35:14 -07:00
John-David Dalton
61c740a4eb Move isObjectLike condition up in _.isEmpty. 2016-03-27 13:07:28 -07:00
John-David Dalton
c3a614858b Add support for maps and sets to _.isEmpty. [closes #2159] 2016-03-27 13:04:51 -07:00
John-David Dalton
75727d073b More pad optimizations. 2016-03-27 12:37:09 -07:00
John-David Dalton
b1d7450052 Fix typo in pad test label. 2016-03-27 12:31:14 -07:00
John-David Dalton
60e557b059 Reduce lines creeping over 80 characters in length. 2016-03-27 11:43:44 -07:00
John-David Dalton
071e13363c Add "Array" to predicate types. [ci skip] [closes #2157] 2016-03-27 09:59:48 -07:00
John-David Dalton
acf4651c0e Minor newline nit. [ci skip] 2016-03-27 09:59:37 -07:00
John-David Dalton
9b15dc2017 Fix fail in PhantomJS. 2016-03-27 01:23:58 -07:00
John-David Dalton
f4f0791e0c Fix fail in Node 0.10. 2016-03-27 01:23:58 -07:00
John-David Dalton
654976c826 Add DataView support to getTag. 2016-03-27 01:23:58 -07:00
John-David Dalton
50e86c70bd Add other realm tests for comparing array views with _.isEqual. 2016-03-27 01:23:58 -07:00
Dan Levy
d135b846db Adding support for cloning and comparing DataView. 2016-03-27 01:23:58 -07:00
John-David Dalton
ee2153364d Add bizarro Promise test. 2016-03-27 01:23:58 -07:00
John-David Dalton
6d76cdc1b7 Update snippet removals for coverage runs. 2016-03-27 01:23:52 -07:00
John-David Dalton
259bdb6151 Add realm tests for maps, promises, and sets. 2016-03-26 14:09:36 -07:00
John-David Dalton
12438fa0d7 Ensure _.isEqual compares promises by reference. 2016-03-26 13:59:53 -07:00
John-David Dalton
654df6f7f8 Optimize createPadding for the common case. 2016-03-26 13:21:54 -07:00
John-David Dalton
0dfe176fe6 Make pad methods default to a chars of " " if chars is an empty string. 2016-03-26 12:14:02 -07:00
John-David Dalton
0f3338013e Update sauce browsers. 2016-03-25 19:03:47 -07:00
John-David Dalton
dcc239b070 Add falsey iteratee tests. 2016-03-25 16:36:47 -07:00
John-David Dalton
613488eaf8 Use in instead of relying on behavior. 2016-03-25 15:50:49 -07:00
John-David Dalton
97193b9680 Update vendor/backbone. 2016-03-25 14:14:52 -07:00
greenkeeperio-bot
71c0861675 Update opt-cli to 1.3.0, coveralls to 2.11.9, & qunitjs to 1.23.0. 2016-03-25 14:13:42 -07:00
John-David Dalton
f3b35919ef Add baseMean helper. 2016-03-25 14:13:42 -07:00
Tucker Whitehouse
06316f1d47 Add _.meanBy. 2016-03-24 21:41:41 -07:00
Federico De Giuli
271f64ee3f Make _.isEmpty work as expected on buffers. 2016-03-24 21:41:41 -07:00
Kent C. Dodds
583b03ba5f Add git hook instructions to CONTRIBUTING.md. [ci skip] 2016-03-24 21:41:35 -07:00
John-David Dalton
16e2c06ab4 Remove dead code from baseClone. 2016-03-24 10:54:23 -07:00
John-David Dalton
016de80ce7 Add debounce/throttle test for calling cancel and flush without anything queued. 2016-03-24 10:54:23 -07:00
John-David Dalton
577226bbd0 Add number object tests to number coercion methods. 2016-03-24 10:54:23 -07:00
John-David Dalton
1670800df3 Add test for crawling functions with _.result. 2016-03-24 10:54:23 -07:00
Kent C. Dodds
9674d67693 add opt-in githook to config 2016-03-23 10:18:57 -06:00
John-David Dalton
f65d36b3c1 Make _.result resolve values of functions as it deep crawls over them. 2016-03-23 00:44:36 -07:00
John-David Dalton
8d93455076 Add more options docs. [ci skip] 2016-03-22 22:26:34 -07:00
John-David Dalton
cfe5ea264d Remove parens from default options value doc of _.truncate. [ci skip] 2016-03-22 08:44:23 -07:00
John-David Dalton
9a4e11f6f7 Add chars param fix to postprocess. [ci skip] 2016-03-21 22:11:40 -07:00
John-David Dalton
24cef1a919 Add other realm maps/sets tests for _.size. 2016-03-21 21:00:29 -07:00
John-David Dalton
5fe373f7aa Add support for deep cloning maps and sets. 2016-03-21 21:00:19 -07:00
John-David Dalton
25eb4df563 Add support for maps and sets to _.size. 2016-03-21 20:16:15 -07:00
John-David Dalton
6d587bdf34 Add -0 test for math operator methods. 2016-03-21 20:04:46 -07:00
John-David Dalton
03dd9df78e Remove unneeded assert in indexOf test. 2016-03-21 08:46:23 -07:00
greenkeeperio-bot
96c60bab46 Update dojo to 1.11.0. 2016-03-21 00:44:32 -07:00
John-David Dalton
811341efa1 Add code examples to fp wiki. [ci skip] 2016-03-20 14:18:24 -07:00
John-David Dalton
5f94723d7f Add always fp alias. 2016-03-20 11:53:38 -07:00
John-David Dalton
9d1536799b Add complement fp alias. 2016-03-20 11:43:32 -07:00
John-David Dalton
85057d588c Move "Chaining" section lower. [ci skip] 2016-03-20 11:40:34 -07:00
John-David Dalton
234e693d92 Flip priority of "object" and "collection" in _.isEmpty doc description. [ci skip] 2016-03-20 11:29:22 -07:00
John-David Dalton
51833b91d0 Add invertObj and juxt fp aliases. 2016-03-20 11:23:12 -07:00
John-David Dalton
dfb7a4c078 Don't make without an alias so it can be reverted with convert. 2016-03-20 11:16:18 -07:00
John-David Dalton
04ddaf49f5 Organize aliases. 2016-03-20 11:13:24 -07:00
John-David Dalton
b7a6560d90 Add identical fp alias. 2016-03-20 11:13:06 -07:00
John-David Dalton
7d8531d6ed Add _.divide and _.multiply tests. 2016-03-20 11:03:29 -07:00
John-David Dalton
ab77d9d83a Add more math operation method tests. 2016-03-20 10:16:03 -07:00
John-David Dalton
37454b8f42 Add eq and isEqual to fp skipRearg mapping. 2016-03-20 10:02:46 -07:00
John-David Dalton
ef95f165ff Fix npm build tests. 2016-03-20 01:10:23 -07:00
John-David Dalton
6494a072d2 Fix test fails in Safari. 2016-03-20 01:02:53 -07:00
John-David Dalton
984bcc556e Add fp.isMatchWith test. 2016-03-20 00:26:58 -07:00
John-David Dalton
be77e7366c Remove "with" methods from iterateeAry mapping. 2016-03-19 23:43:11 -07:00
John-David Dalton
01d961bad8 Ensure fp.isEqualWith rearg is (c,a,b). [closes #2131] 2016-03-19 23:40:14 -07:00
John-David Dalton
6eb0cb1565 Add _.divide and _.multiply. 2016-03-19 23:01:40 -07:00
John-David Dalton
b2bff1ad45 Ensure array sequence methods don't error for falsey values. 2016-03-19 22:51:32 -07:00
John-David Dalton
6ed9c005d7 Make fp.invokeArgs and fp.invokeArgsMap arg signature (b,c,a). 2016-03-18 08:29:41 -07:00
John-David Dalton
6ef8693bf0 Update case examples. 2016-03-17 21:11:32 -07:00
John-David Dalton
8c5025f935 Move upperFirst definition lower. 2016-03-17 21:11:32 -07:00
John-David Dalton
9735961090 Ensure _.startCase only uppercases the first character of each word. 2016-03-17 21:11:32 -07:00
greenkeeperio-bot
8d7058e6ad Update fs-extra to 0.26.7, jquery to 2.2.2, & requirejs to 2.2.0. 2016-03-17 21:10:36 -07:00
John-David Dalton
4d89d9a1b7 Add fp.convert to "Convert" section. 2016-03-17 21:10:36 -07:00
John-David Dalton
594f414b1a Move the "Convert" section to the bottom. 2016-03-17 21:10:36 -07:00
John-David Dalton
b61d30da1a Make fp.without an alias of fp.difference. [closes #2122] 2016-03-17 21:10:36 -07:00
John-David Dalton
412e19006b Fix fp aliases for all, any, and anyPass. 2016-03-17 21:10:36 -07:00
Jeroen Engels
b8ebceadaf Add missing param for _.reverse. [ci skip] 2016-03-17 21:10:36 -07:00
John-David Dalton
2b4f271899 Add fp.invokeArgsMap. 2016-03-17 21:10:36 -07:00
John-David Dalton
c83857c42a Minor non- nits. [ci skip] 2016-03-15 08:38:55 -07:00
John-David Dalton
b95d1d6123 Ensure _.mergeWith sources are cloned when customizer returns undefiend. [closes #2111] 2016-03-15 08:32:23 -07:00
John-David Dalton
7d1d7d909a Add fp padChars methods. 2016-03-14 22:17:46 -07:00
John-David Dalton
c89a80357c Cleanup fp convert tests. 2016-03-14 22:16:20 -07:00
John-David Dalton
1bbb24fa0c Add fp.convert. 2016-03-14 10:53:40 -07:00
John-David Dalton
dd0aa991ff Add since tag to _.isArray. [ci skip] 2016-03-13 19:59:50 -07:00
John-David Dalton
6f9b1b1822 Simplify _.method example. [ci skip] 2016-03-13 16:35:52 -07:00
John-David Dalton
65fd579ed2 Add fp.invokeArgs. 2016-03-13 16:34:07 -07:00
John-David Dalton
f3279b7ee1 Wrap fp.getOr test in an IIFE. 2016-03-13 15:30:32 -07:00
John-David Dalton
4d185ae7b5 Add fp.restFrom and fp.spreadFrom. 2016-03-13 15:30:01 -07:00
John-David Dalton
81ee5d76b8 Use "sequence" to descript chaining in more places. [ci skip] 2016-03-13 14:49:28 -07:00
John-David Dalton
8bed7137c7 Add chaining note to fp wiki template. [ci skip] 2016-03-13 14:44:58 -07:00
libreninja
f8bcc5b917 Break before unnecessary string concats in _.repeat. 2016-03-13 12:39:05 -07:00
John-David Dalton
81f8518d15 Simplify assocIndexOf description. [ci skip] 2016-03-12 09:01:06 -08:00
John-David Dalton
f88d27ccda Fix param descriptions for assocDelete, mapSet, and stackSet. [ci skip] 2016-03-11 20:00:08 -08:00
John-David Dalton
40ed92d2af More _.debounce cleanup. 2016-03-11 08:04:39 -08:00
John-David Dalton
c7319d004d Add non-function constructor tests for _.isMap, _.isSet, and _.isWeakMap. 2016-03-10 16:33:29 -08:00
John-David Dalton
51a3c5d4e8 Cleanup _.debounce. 2016-03-10 07:59:31 -08:00
John-David Dalton
ecfa002a05 Update Edge testing in Sauce. 2016-03-09 16:55:34 -08:00
John-David Dalton
62962791b3 Rename debounce helper to invokeFunc to fix builds. 2016-03-08 06:58:39 -08:00
Brandon Wallace
864e14cb20 Refactor debounce to simplify, reduce timers, fix bugs. 2016-03-07 22:24:04 -08:00
John-David Dalton
092f90d2fc Cleanup sorting test results. 2016-03-07 08:11:59 -08:00
John-David Dalton
49b33d667d Add toPairs test for inherited string keyed properties. 2016-03-07 08:04:11 -08:00
John-David Dalton
63b097329c Minor curried label nits. [ci skip] 2016-03-07 07:41:18 -08:00
John-David Dalton
2c3ab276ea Add _.entries and _.entriesIn aliases. 2016-03-06 22:56:48 -08:00
John-David Dalton
c30c43d69e Add more since tags. [ci skip] 2016-03-06 22:12:42 -08:00
John-David Dalton
230c18d5d6 Add fp.flatMapDepth test. 2016-03-06 19:13:43 -08:00
John-David Dalton
c16e64cd36 Remove unneeded flatMap lazy chaining tests. 2016-03-06 19:12:47 -08:00
John-David Dalton
64704e16c1 Add _.flatMapDeep and _.flatMapDepth. 2016-03-06 11:15:04 -08:00
greenkeeperio-bot
b41103ee6b Update glob to 7.0.3. 2016-03-05 18:35:22 -08:00
John-David Dalton
8ac1d54858 Add fast path for numbers in _.toNumber. 2016-03-05 16:56:59 -08:00
John-David Dalton
0a9af2968e Add primitives tests. 2016-03-05 16:54:37 -08:00
John-David Dalton
7eba5a2221 Ensure _.toNumber works with symbol objects without a valueOf method. 2016-03-05 16:16:49 -08:00
John-David Dalton
19a8b3886e Flip assignment order for consistency. [ci skip] 2016-03-05 08:43:42 -08:00
John-David Dalton
03716f62e8 Remove runInContext call in convert. 2016-03-05 08:39:00 -08:00
John-David Dalton
d38000bc33 Minor format nit for baseCastPath. [ci skip] 2016-03-05 08:38:34 -08:00
John-David Dalton
a6c88a173b Ensure _.toPath returns a new array. 2016-03-04 18:02:28 -08:00
John-David Dalton
0bad210dec Add tests for number coercion methods. 2016-03-04 18:00:05 -08:00
John-David Dalton
62cc7574fc Remove dead code branch from baseCastPath. 2016-03-04 10:41:09 -08:00
John-David Dalton
f5a134bcbd Remove unused baseForIn. 2016-03-04 10:37:29 -08:00
John-David Dalton
a7bb6b5383 Add getPrototype helper. 2016-03-04 09:17:00 -08:00
John-David Dalton
e02ce1ea8b Ensure _.toPath works with symbols. 2016-03-04 08:09:39 -08:00
John-David Dalton
760a00b82f Make a distinction between property names and identifiers. [ci skip] 2016-03-04 07:51:12 -08:00
John-David Dalton
e6929e801b Add getAllKeysIn helper. 2016-03-04 07:50:40 -08:00
John-David Dalton
8682da4962 Update V8 bug links. [ci skip] 2016-03-04 07:33:32 -08:00
John-David Dalton
8e6f3e48d0 Ensure getOwnPropertySymbols is passed an object to avoid errors in V8. 2016-03-04 07:33:16 -08:00
John-David Dalton
0589dd6909 Ensure _.omit works with symbols. 2016-03-04 02:03:23 -08:00
John-David Dalton
1b8071d2c4 Replace Dojo Foundation references with jQuery Foundation in contributing.md. [ci skip] 2016-03-04 01:24:43 -08:00
John-David Dalton
4debf155d7 Update and add tests for fp convert method. 2016-03-04 00:55:59 -08:00
John-David Dalton
f6df126c43 Cleanup license urls. 2016-03-03 22:58:41 -08:00
Esa-Matti Suuronen
c406e33fcc Add reconvert method to fp functions. 2016-03-03 22:47:30 -08:00
John-David Dalton
9e11ebb62a Ensure _.isPlainObject returns false for objects with a custom [[Prototype]]. [closes #2085] 2016-03-03 22:46:23 -08:00
John-David Dalton
16ed42b188 Add tests for symbol paths. 2016-03-03 22:42:58 -08:00
John-David Dalton
a19890469e Minor format nit. 2016-03-03 22:42:29 -08:00
John-David Dalton
cc1c1c127e Cleanup path test labels. 2016-03-03 22:41:56 -08:00
John-David Dalton
3c1e95a3c2 Cleanup foo references. 2016-03-03 22:41:22 -08:00
John-David Dalton
d4c0777d2c Minor format nits for Foo test functions. 2016-03-03 20:40:20 -08:00
John-David Dalton
8f00000676 Minor format nit of isIterateeCall. 2016-03-03 20:07:10 -08:00
John-David Dalton
4240f737d1 Add symbol support to baseCastPath, isKey, and toNumber. 2016-03-03 20:04:37 -08:00
John-David Dalton
25121a86bb Specify string keyed properties. [closes #2081] [ci skip] 2016-03-03 18:02:47 -08:00
John-David Dalton
e4b3cde0a4 Memoize stringToPath. 2016-03-03 15:58:23 -08:00
Dave Methvin
cf74ebeb71 Update license to the jQuery Foundation. [ci skip] 2016-03-03 12:03:26 -08:00
Jeroen Engels
d682357189 Add @since to the method jsdocs. [ci skip] 2016-03-03 07:47:26 -08:00
John-David Dalton
ddd4c391a1 Add _.updateWith test for a customizer. 2016-03-02 22:25:51 -08:00
greenkeeperio-bot
930ee1d650 Update jscs to 2.11.0. 2016-03-02 14:15:50 -08:00
John-David Dalton
c5344d5336 Ensure _.has returns false for nested inherited properties. [closes #2073] 2016-03-02 07:54:27 -08:00
John-David Dalton
d59c644a10 Use baseGet in parent and _.result. 2016-03-02 07:47:37 -08:00
John-David Dalton
28171945e9 Use smaller objects for _.assign bench. 2016-03-02 07:39:08 -08:00
John-David Dalton
ddf9354d26 Bump to v4.6.1. 2016-03-01 21:55:32 -08:00
John-David Dalton
5f58b65c04 Rebuild lodash and docs. 2016-03-01 21:55:09 -08:00
John-David Dalton
1ec20c5281 Use propertyIsEnumerable var. 2016-03-01 20:33:17 -08:00
John-David Dalton
3421fab58a Update lodash dev dep. 2016-03-01 19:40:05 -08:00
John-David Dalton
deeaf27b54 Avoid cloning symbols internally. 2016-03-01 19:37:44 -08:00
John-David Dalton
429be57b8a Bump to v4.6.0. 2016-03-01 10:58:13 -08:00
John-David Dalton
7f00e8f2f1 Rebuild lodash and docs. 2016-03-01 10:58:13 -08:00
John-David Dalton
89f891ac86 Ensure placeholder uses func when its a lib. 2016-03-01 10:58:13 -08:00
John-David Dalton
63147cd145 Update our code of conduct. [ci skip] 2016-02-29 22:04:07 -08:00
John-David Dalton
2c5f026d3c Add doc note to associate _.merge with _.assign. [ci skip] 2016-02-29 08:17:10 -08:00
John-David Dalton
c10146e2f0 Set constructor of lodash.prototype. 2016-02-29 00:02:13 -08:00
John-David Dalton
548fe881d6 Add _.pullAllWith comparator test. 2016-02-28 20:05:54 -08:00
John-David Dalton
b560b7047b Cleanup "With" tests. 2016-02-28 20:05:27 -08:00
John-David Dalton
6f470abdff Add _.pullAllWith test. 2016-02-28 12:23:32 -08:00
John-David Dalton
eabe95c4e3 Add _.updateWith fp support. 2016-02-28 12:16:21 -08:00
John-David Dalton
fab50ec384 Add _.updateWith tests. 2016-02-28 11:55:09 -08:00
John-David Dalton
0f298de36a Add _.updateWith. 2016-02-28 11:30:16 -08:00
John-David Dalton
f8132e3be4 Add more _.update tests. 2016-02-28 10:54:40 -08:00
John-David Dalton
dfd865dadc Only use SetCache in baseIntersection only when arrays[0] is large. 2016-02-27 21:26:51 -08:00
John-David Dalton
98bdd67cf2 Simplify array mapping in basePullAll and baseOrderBy. 2016-02-27 18:42:24 -08:00
John-David Dalton
e842bec025 Optimize _.intersection to stop search once it matches the size of its smallest array. 2016-02-27 18:35:18 -08:00
John-David Dalton
8278d38a8e Add update to lodash doc note. [ci skip] 2016-02-27 17:03:23 -08:00
John-David Dalton
0699d4cf3d Simplify regexp test. 2016-02-27 17:00:56 -08:00
John-David Dalton
8865633ccd Move baseUpdate and update definitions. 2016-02-27 17:00:46 -08:00
John-David Dalton
7066b9a5c7 Rearrange tests. 2016-02-27 17:00:11 -08:00
John-David Dalton
63f8b1dcec Ensure _.defaultsDeep does not overwrite regexp values. 2016-02-27 14:35:20 -08:00
John-David Dalton
2e790fb865 Add IE 11 doc note to addMapEntry. [ci skip] 2016-02-27 11:13:51 -08:00
John-David Dalton
ac62c24c4a Cleanup passing stack around since Stac#set returns the stack. 2016-02-27 11:06:01 -08:00
John-David Dalton
629de594d5 Avoid deep cloning source values if a customizer is provided. 2016-02-27 10:20:51 -08:00
John-David Dalton
7a69a45ccc Add template sentence tweaks from the wiki. 2016-02-27 10:20:51 -08:00
greenkeeperio-bot
916431118e Update coveralls to 2.11.8. 2016-02-27 10:20:50 -08:00
John-David Dalton
83e584d579 Split circular reference tests up. 2016-02-26 22:08:03 -08:00
Danny Fallon
bbd536fc04 Add test for mergeWith with multi-ref source object. 2016-02-26 22:07:24 -08:00
John-David Dalton
0b76654b71 Ensure stack is popped after recursive merge so that it doesn't affect sibling properties. [closes #2060] 2016-02-26 09:42:42 -08:00
Jeroen Engels
ff7d79d5fc Remove custom rearg for update. 2016-02-26 09:31:58 -08:00
Hassan Zamani
b40b555386 Add _.update. 2016-02-26 01:55:47 -08:00
John-David Dalton
efa1ebff16 Clarify result value order of _.xor. [ci skip] 2016-02-26 00:04:20 -08:00
John-David Dalton
8f0dcde98f Clarify result value origin and order of difference methods. [ci skip] 2016-02-26 00:01:52 -08:00
John-David Dalton
3b1efb635b Clarify result value origin and order of intersection methods. [ci skip] 2016-02-25 23:59:41 -08:00
John-David Dalton
055fdfa0b4 Add _.pullAllWith. 2016-02-25 23:24:13 -08:00
John-David Dalton
a5a21235dc Add mdn references to _.toLower and _.toUpper. [ci skip] 2016-02-25 08:34:43 -08:00
Francis De Brabandere
dfbcfdb0ae Clarify intersection docs on what is returned. [ci skip] 2016-02-24 10:24:40 -08:00
John-David Dalton
a1e917bac2 Remove the word "Added" from alias list. [ci skip] 2016-02-24 01:02:11 -08:00
John-David Dalton
62a9208944 Include aliases in lodash chain doc note. [ci skip] [closes #2044] 2016-02-24 00:48:57 -08:00
John-David Dalton
1bf8eb8cac Update qunit and qunit-extras. 2016-02-23 23:13:34 -08:00
John-David Dalton
893573485c Escape bang in pattern. 2016-02-23 21:22:07 -08:00
John-David Dalton
d5231ad94b Add source tests for _.assign and _.assignIn. 2016-02-23 21:16:32 -08:00
John-David Dalton
a578935621 Remove unhit condition in getNative. 2016-02-23 20:13:08 -08:00
Jeroen Engels
c88c7ff6bb Fix order of arguments in FP docs. [ci skip] 2016-02-23 14:19:48 -08:00
John-David Dalton
21f9cfa6d3 Remove unneeded Ctor variables. 2016-02-23 10:58:27 -08:00
John-David Dalton
45d2fb8a30 Fix _.transform test fail in Safari 8. 2016-02-23 10:58:27 -08:00
John-David Dalton
9c162624fe Cleanup symbolTag case in equalByTag. 2016-02-23 10:58:27 -08:00
John-David Dalton
80b5731709 Leak msWDfn in test/test-fp.js to prevent false fails in Edge on sauce. 2016-02-23 10:58:27 -08:00
John-David Dalton
bab4ffff62 Remove unstable test from local testing. 2016-02-23 08:31:04 -08:00
John-David Dalton
f644c82da4 Replace Symbol checks with Symbol methods as checks instead. [closes #2039] 2016-02-23 08:30:48 -08:00
John-David Dalton
54294f15ef Update _.assign and _.assignIn fast paths. 2016-02-23 08:23:13 -08:00
John-David Dalton
dfe77571fb Remove _.keys fast path. 2016-02-23 08:23:05 -08:00
John-David Dalton
f40f66d29b Remove a isTypedArray check and unnecessary stack creation from baseIsEqualDeep. 2016-02-22 23:38:19 -08:00
John-David Dalton
af06529283 Ensure _.isEqual works with maps and sets with circular references. 2016-02-22 23:38:18 -08:00
John-David Dalton
d8da7a2142 Use isFunction check without the typeof check. 2016-02-22 23:38:18 -08:00
John-David Dalton
c1f8e31775 Use typeof for function checks instead of isFunction. 2016-02-22 23:38:18 -08:00
John-David Dalton
cc4b49226b Use postfix increment operators. 2016-02-22 23:38:18 -08:00
John-David Dalton
f9a2f74716 Optimize _.assign, _.assignIn, & _.keys. 2016-02-22 23:38:18 -08:00
John-David Dalton
a326a6badf Update contributing text with 👍's. [ci skip] 2016-02-22 23:38:18 -08:00
John-David Dalton
e21f4862e1 Update contributing link to tagged release. [ci skip] 2016-02-22 23:38:18 -08:00
greenkeeperio-bot
f0c3ac1789 Update jquery to 2.2.1, uglify-js to 2.6.2, and webpack to 1.12.14. 2016-02-22 23:37:38 -08:00
John-David Dalton
e24513e6e2 Clarify _.isEmpty docs. [ci skip] 2016-02-22 12:19:08 -08:00
John-David Dalton
a224b6f1b0 Add core.min.js and lodash.min.js to the fp module ignored list. 2016-02-22 10:28:34 -08:00
John-David Dalton
26299eb364 Update _.isEmpty doc param type for value. [ci skip] 2016-02-22 10:24:20 -08:00
John-David Dalton
772c461a33 Bump to v4.5.1. 2016-02-21 22:58:49 -08:00
John-David Dalton
110ca4d1b5 Rebuild lodash and docs. 2016-02-21 22:58:49 -08:00
John-David Dalton
aafb05b675 Update for lodash v4 api. 2016-02-21 22:58:49 -08:00
John-David Dalton
ff6fc56a15 Use _baseConvert in fp module. 2016-02-21 21:07:21 -08:00
John-David Dalton
2dfbe9fe77 Use minified lodash in fp module. 2016-02-21 21:07:09 -08:00
John-David Dalton
4a0fe2c17b Use lodash in test/remove.js. 2016-02-21 19:35:08 -08:00
John-David Dalton
9f7e626b9a Make build-module create core.min.js and lodash.min.js. 2016-02-21 19:35:08 -08:00
John-David Dalton
f2985bda5f Add copyFile, minFile, and writeFile to lib/common/util.js. 2016-02-21 19:35:01 -08:00
John-David Dalton
1517745a6a Update placeholder param description of createRecurryWrapper. [ci skip] 2016-02-21 16:57:06 -08:00
John-David Dalton
887cb55919 Add _.placeholder tests. 2016-02-21 13:48:46 -08:00
John-David Dalton
5c42d0ef31 Add intersection tests for two arrays. 2016-02-21 09:59:51 -08:00
John-David Dalton
837d47a309 Update lodash paths travis.yml, test/test.js, and test/index.html. 2016-02-20 23:53:35 -08:00
John-David Dalton
f3766cf889 Add getPlaceholder helper. 2016-02-20 18:07:11 -08:00
John-David Dalton
2b8b63e59f Allow placeholders to persist through more than 1 curried call. 2016-02-20 18:07:05 -08:00
John-David Dalton
d64583b743 Cleanup bitmask groupings in mergeData. 2016-02-20 16:40:59 -08:00
John-David Dalton
9ec65d5ed5 Fix newHolders typo. 2016-02-20 11:28:11 -08:00
John-David Dalton
9fe6afcdcc Use lodashStable.bind in unzip/zip test. 2016-02-20 11:28:11 -08:00
Benjamim Sonntag
6a4e0fb41b Links _.remove and _.pull in the docs. [ci skip] 2016-02-20 11:28:00 -08:00
John-David Dalton
b570884bb3 Remove npm "prepublish" script to avoid running on npm i. 2016-02-19 10:51:48 -08:00
John-David Dalton
8f8f8e288c Update internal module references in tests. 2016-02-19 10:39:38 -08:00
John-David Dalton
8698a5e0e8 Add tests for setting the [[Prototype]] of clones for values where constructor is incorrect. 2016-02-19 08:18:56 -08:00
John-David Dalton
ad5e30e189 Move _.merge test for augmenting objects. 2016-02-19 08:17:44 -08:00
Benjamin Tan
19ee0c74f8 Update link to CONTRIBUTING.md in readme. [ci skip] 2016-02-19 08:02:57 -08:00
John-David Dalton
007e5aa27a Increment package version to enable ci tests. 2016-02-19 01:23:07 -08:00
John-David Dalton
2509f562b5 Update fp wiki template. 2016-02-19 01:23:02 -08:00
John-David Dalton
a58a276ffd Replace "iteratee function" with "iteratee". [ci skip] 2016-02-19 01:04:36 -08:00
John-David Dalton
1a5b9dcce1 Add iteratee signature to _.mapKeys. [ci skip] 2016-02-19 01:04:19 -08:00
John-David Dalton
1240a0dfdd Move contributing text to .github. [ci skip] 2016-02-19 00:46:06 -08:00
Henrik Hjelte
0194169e79 Clarify docs on omitBy predicate params. [ci skip] 2016-02-19 00:11:33 -08:00
John-David Dalton
a71c19e1b5 Avoid unnecessary cloning in fp set methods. [closes #2017] 2016-02-19 00:11:20 -08:00
John-David Dalton
bfbfa719ff Ensure assignValue assigns values if they aren't the same own value. [closes #2022] 2016-02-19 00:01:33 -08:00
John-David Dalton
49389d0a2f Ducktype in _.isError for ES6 support. 2016-02-18 21:52:53 -08:00
John-David Dalton
e380062403 Use getPrototypeOf to set inheritance when constructor is a function. [closes #2018] 2016-02-18 21:52:19 -08:00
John-David Dalton
b83abfa9c1 Make fp arity for orderBy three instead of two. [closes #2019] 2016-02-18 13:37:16 -08:00
John-David Dalton
48dbf203a5 Ensure fp pickBy and omitBy provide value and key arguments. 2016-02-18 01:08:19 -08:00
John-David Dalton
23768398c5 Add iterateeRearg fp mapping back for mapKeys. 2016-02-17 22:21:48 -08:00
John-David Dalton
ab73503859 Bump to v4.5.0. 2016-02-17 22:21:48 -08:00
John-David Dalton
a4f7d4cc2a Rebuild lodash and docs. 2016-02-17 22:21:47 -08:00
Myles Borins
cca5ac60d6 Fix npm-test by removing the call to test-docs. 2016-02-17 22:21:47 -08:00
John-David Dalton
9f7f9fc3c5 Adjust heading order. [ci skip] 2016-02-17 01:26:28 -08:00
John-David Dalton
6e2fb92e9a Remove unused baseArity. 2016-02-16 22:29:41 -08:00
John-David Dalton
4f702e2381 Specify utf8 encoding. 2016-02-16 22:04:47 -08:00
John-David Dalton
b188f903ce Add fp tests for iteratee shorthands. 2016-02-16 21:27:08 -08:00
John-David Dalton
7b93dc9c32 Ensure clone methods clone expando properties of boolean, number, & string objects. [closes #2008] 2016-02-16 21:27:03 -08:00
John-David Dalton
664d66a89e Make string tests more consistent. 2016-02-16 20:44:55 -08:00
John-David Dalton
d9dc0e6fd1 Add _.invertBy tests. 2016-02-16 19:30:23 -08:00
John-David Dalton
53168e4cfd Remove dup _.invertBy test. 2016-02-16 18:49:43 -08:00
John-David Dalton
7998632685 Add castArray chaining test. 2016-02-16 18:48:57 -08:00
John-David Dalton
86f2a1061c Simplify readme. [ci skip] 2016-02-16 18:48:11 -08:00
John-David Dalton
9ca02a448e Update cdn links. [ci skip] 2016-02-16 08:52:49 -08:00
John-David Dalton
17091d3a0e Simplify shorthand test labels. 2016-02-16 08:42:29 -08:00
John-David Dalton
c94b1488e9 Make iteraeeAry pass thru non-functions. [closes #2007] 2016-02-16 07:46:54 -08:00
John-David Dalton
7b2274cb44 Add methods to lodash doc notes. [ci skip] 2016-02-16 01:29:25 -08:00
John-David Dalton
7c27a6f51e Make wording of entries align closer to their titles. [ci skip] 2016-02-16 01:29:25 -08:00
John-David Dalton
e91371d406 Increment package version to enable ci tests. 2016-02-16 01:29:25 -08:00
John-David Dalton
e878559fb9 Bump to v4.4.0. 2016-02-15 23:08:19 -08:00
John-David Dalton
36af8de116 Rebuild lodash and docs. 2016-02-15 23:07:07 -08:00
John-David Dalton
09dd3a8fea Remove noConflict call from the node fp module template. 2016-02-15 23:07:07 -08:00
John-David Dalton
5dd6b90692 Minor comma nit from contributing.md. [ci skip] 2016-02-15 21:30:16 -08:00
John-David Dalton
97fd94744e Add mapping section to fp wiki template. [ci skip] 2016-02-15 17:38:30 -08:00
John-David Dalton
0da3674d5e Update fp doc template. 2016-02-15 17:00:01 -08:00
John-David Dalton
01d530d65e Cleanup fp/build-modules. 2016-02-15 16:59:43 -08:00
John-David Dalton
10dd42b6e4 Restore bizarro tests for Object.create. 2016-02-15 16:47:31 -08:00
John-David Dalton
ba2d3f7704 Use != instead of !== when value is guaranteed to be a string. 2016-02-15 16:36:20 -08:00
Graeme Yeates
607fe2a5f6 Use Object.create in baseCreate (even if shimmed). 2016-02-15 16:35:20 -08:00
John-David Dalton
4643679d79 Remove fp caps mapping. 2016-02-15 13:51:20 -08:00
greenkeeperio-bot
04180c7c96 Update jscs to 2.10.1. 2016-02-15 11:12:14 -08:00
John-David Dalton
3846348f8a Clarify how undefined source values are handled in _.merge. [ci skip] 2016-02-15 10:22:25 -08:00
John-David Dalton
dc2fc9428d Cross reference _.matches and _.isMatch in docs. [ci skip] 2016-02-15 10:22:04 -08:00
John-David Dalton
6e399ce311 Cleanup long lines in isEqualWith docs. [ci skip] 2016-02-15 10:21:19 -08:00
John-David Dalton
641b544801 Add castArray to lodash chaining doc note. [ci skip] 2016-02-15 10:20:40 -08:00
John-David Dalton
761a100397 Ensure _.valuesIn returns results. [closes #2000] 2016-02-15 09:14:10 -08:00
John-David Dalton
cf1a4f893f Update fp doc generation. 2016-02-15 00:18:12 -08:00
John-David Dalton
19613be861 Add isArray to _util.jst. 2016-02-14 23:47:45 -08:00
John-David Dalton
c163659713 Rename fp mapping rename to remap. 2016-02-14 23:47:45 -08:00
John-David Dalton
aae02af265 Cleanup Date shims. 2016-02-14 19:20:17 -08:00
John-David Dalton
cb96bf15b7 Reduce the length of some lines. 2016-02-14 19:14:17 -08:00
John-David Dalton
c006c28f55 Add lib/common/util. 2016-02-14 12:57:34 -08:00
John-David Dalton
d358d00531 Ensure fp castArray shallow clones arrays. 2016-02-14 12:09:17 -08:00
John-David Dalton
abcebb4f48 Remove exposed castFunction and castPath. 2016-02-14 11:02:11 -08:00
John-David Dalton
6e74724c0f Add _.compat test for lazy sequence with a custom _.iteratee. 2016-02-14 09:21:07 -08:00
John-David Dalton
c5f6c43326 Add default wrapper value to jsdoc of _.wrap. [ci skip] 2016-02-14 08:57:28 -08:00
John-David Dalton
a9e8c0ba76 Add changelog mention to the wiki link in readme. [ci skip] 2016-02-14 08:41:43 -08:00
John-David Dalton
5388d8a7b0 Rename _.asArray to _.castArray and add _.castFunction and _.castPath. 2016-02-13 13:40:04 -08:00
Graeme Yeates
ee499b36ea Add _.asArray method. 2016-02-13 09:04:19 -08:00
John-David Dalton
13e4b959a4 Rename skipTest to skipAssert. 2016-02-13 08:32:47 -08:00
John-David Dalton
5a336403f9 Fix fp browser test fails. 2016-02-13 08:31:04 -08:00
John-David Dalton
26265c011a Fix failing _.isError test in phantomjs. 2016-02-13 02:18:37 -08:00
John-David Dalton
4a390bca1c Update tests for es6. 2016-02-13 02:18:15 -08:00
John-David Dalton
af46ead30d Fix caller access in strict mode es6 modules. 2016-02-13 02:01:46 -08:00
John-David Dalton
de0f936e92 Ensure fp convert works with category modules. 2016-02-13 01:23:07 -08:00
John-David Dalton
bf9dcfe89c Add jsdoc constructor tags. [ci skip] 2016-02-12 22:51:26 -08:00
John-David Dalton
df0ecd2a93 Ensure _.isError works with subclasses values. [closes #1994] 2016-02-12 22:51:26 -08:00
John-David Dalton
b3ebb3c3d3 Add _.fromPairs to mention to _.toPairs and _.toPairsIn. [ci skip] 2016-02-12 22:51:26 -08:00
Jeroen Engels
0bead0c69a Update closed issue link in contributing.md to link to enhancement issues. [ci skip] 2016-02-12 22:51:26 -08:00
John-David Dalton
a055b0a04f Fix fp rearg order for zipWith. 2016-02-12 22:51:26 -08:00
John-David Dalton
d6f6007692 Add wiki link to "Further Reading" section of readme. [ci skip] 2016-02-12 22:51:26 -08:00
John-David Dalton
8ee7ffb2ab Add more currying to fp tests. 2016-02-12 22:51:26 -08:00
John-David Dalton
40ff04911e Remove unneeded copyArray from baseMergeDeep. 2016-02-12 22:51:25 -08:00
John-David Dalton
a3676618af Reorg templates. 2016-02-12 22:51:19 -08:00
John-David Dalton
b1ed66c6f5 Add another fp.inRange test. 2016-02-11 22:57:25 -08:00
John-David Dalton
53b3f81abe Ensure _.merge deep clones array/typed-array/plain-object sources. [closes #1987] 2016-02-11 22:56:33 -08:00
John-David Dalton
bd2428dde5 Remove fp doc to be simplified in a later commit. 2016-02-11 21:02:44 -08:00
Jeroen Engels
b7ae5f0885 Add paragraph about making feature requests in docs [ci skip] 2016-02-11 19:57:04 -08:00
John-David Dalton
8c5b64c7d7 Have browser fp convert auto wrap lodash if found. 2016-02-11 15:49:32 -08:00
John-David Dalton
641112dd4d Attempt two to fix bizarro buffer test in Node v0.12. 2016-02-11 10:55:26 -08:00
John-David Dalton
1c47acd040 Ensure maxWait isn't processed on a leading invocation ifleading is false and there isn't an max delay queued. [closes #1964] 2016-02-11 00:18:08 -08:00
greenkeeperio-bot
d58d6f45cc Update glob to 7.0.0. 2016-02-11 00:18:07 -08:00
Artur Baybulatov
7efa921bab Add a note about browser usage of lodash-fp. [ci skip] 2016-02-10 10:54:40 -08:00
John-David Dalton
feafdb3c6a Fix jsdoc type tags. [closes #1976] [ci skip] 2016-02-10 08:26:43 -08:00
John-David Dalton
784ee6a086 Remove fp iterateeRearg mapping. [closes #1971] 2016-02-10 08:19:59 -08:00
John-David Dalton
3014f20b6c Remove copyArray dep from _.flattenDepth. 2016-02-10 00:43:03 -08:00
John-David Dalton
40bb035b09 Minor label cleanup. 2016-02-10 00:15:08 -08:00
John-David Dalton
ba32bf3b8d Cleanup flatten methods and add more flattenDepth tests. 2016-02-10 00:14:10 -08:00
John-David Dalton
e9edc06aaf Enable convert to work when given lodash and options. 2016-02-09 21:56:49 -08:00
Jordan Eldredge
c91196d240 Run style checks before publishing. 2016-02-09 19:39:32 -08:00
Jeroen Engels
08c7bf3c85 Fix code style error and doc nit. [ci skip] 2016-02-09 19:39:32 -08:00
Michael Morgan
046470a8db Added _.flattenDepth for variable-depth flatten. 2016-02-09 19:39:32 -08:00
Billy Janitsch
2b1eedb036 Fix FP rearg for _.zipWith and _.inRange. 2016-02-09 19:39:31 -08:00
Jeroen Engels
02bea6534c fp docs - Remove notes about mutation in description. 2016-02-09 19:36:37 -08:00
Jeroen Engels
6f4099c20b fp docs - Split lib/doc/apply-fp-mapping into multiples files. 2016-02-09 19:36:37 -08:00
Jeroen Engels
39735df82f fp docs - Inject default values and cap args. 2016-02-09 19:36:37 -08:00
Jeroen Engels
5062f22839 fp docs - Remove console.log() from examples. 2016-02-09 19:36:36 -08:00
Jeroen Engels
e397707dc9 fp docs - translate ...args to args[] in example and params. 2016-02-09 19:36:36 -08:00
Jeroen Engels
66d6e226a9 Add scripts to generate the docs for lodash/fp. 2016-02-09 19:36:36 -08:00
Benjamin Tan
fbfa578c11 Write fp docs to a different file. 2016-02-09 19:36:36 -08:00
John-David Dalton
5cd7208ef3 Fix test fail in phantomjs. 2016-02-09 17:11:02 -08:00
John-David Dalton
e5bc6a0315 Fix bizarro buffer test in Node v0.12. 2016-02-09 17:11:02 -08:00
John-David Dalton
495c890aac Add bizarro test for _.isBuffer. 2016-02-09 17:11:02 -08:00
John-David Dalton
5fe4a1b05d Add fp placeholder test for converted partial. 2016-02-09 17:11:02 -08:00
John-David Dalton
d8bf62995b Ensure fp options works when applied individually. 2016-02-09 17:11:02 -08:00
John-David Dalton
e36f7e7161 Enable testing fp/convert in the browser. 2016-02-09 17:11:02 -08:00
John-David Dalton
285b667c3e Update "Why Lodash" section of readme. [ci skip] 2016-02-09 17:11:02 -08:00
John-David Dalton
aefbdbb6d5 Increment package version to enable ci tests. 2016-02-08 00:31:19 -08:00
John-David Dalton
8debfc6e6c Bump to v4.3.0. 2016-02-08 00:31:19 -08:00
John-David Dalton
c9ca772a32 Rebuild lodash and docs. 2016-02-08 00:31:19 -08:00
John-David Dalton
dc65792776 Add fp tests for add, subtract, gt, gte, lt, & lte. 2016-02-08 00:31:19 -08:00
John-David Dalton
18ae1d7c18 Ensure _.add and _.subtract return 0 when no arguments are given. 2016-02-08 00:31:19 -08:00
John-David Dalton
d790a1b3c6 Adjust "provided"/"given" use. [ci skip] 2016-02-08 00:31:18 -08:00
John-David Dalton
349c627110 Add options to baseConvert. 2016-02-08 00:31:13 -08:00
John-David Dalton
db23fcfe9f Rename num params to n. 2016-02-07 22:47:15 -08:00
John-David Dalton
d5a6a75639 Clarify pull request notes in contributing.md. [ci skip] 2016-02-07 22:47:15 -08:00
Robert T. Stewart
404a7181a8 Add 'What is Lodash' section to README.md. [ci skip] 2016-02-07 22:47:15 -08:00
Corbacho
e392b8e240 Improve accuracy of _.throttle. 2016-02-07 22:47:14 -08:00
John-David Dalton
6752d75ad0 Add _.isMap, _.isSet, _.isWeakMap, & _.isWeakSet. 2016-02-07 22:47:14 -08:00
John-David Dalton
e00d9821a8 Add gt, gte, lt, lte to fp skipRearg mapping. 2016-02-07 22:47:14 -08:00
John-David Dalton
1cf7093f46 Allow undefined realm values. 2016-02-07 22:47:14 -08:00
John-David Dalton
88708ec00f Minor test order nit. 2016-02-07 22:47:14 -08:00
John-David Dalton
984b0af883 Add deep clone test for buffers. 2016-02-07 22:47:14 -08:00
John-David Dalton
8810754ada Add _.isArrayBuffer test. 2016-02-07 22:47:14 -08:00
John-David Dalton
0d340b378b Add _.isBuffer test. 2016-02-07 22:47:14 -08:00
John-David Dalton
e30dc968ef Move _.isNull test. 2016-02-07 22:47:13 -08:00
John-David Dalton
ea942b0642 Upgrade sauce tested versions of Chrome and Firefox. 2016-02-07 22:47:13 -08:00
Tyler Garrett
7e9d49b300 Fix DevDoc link in readme. [ci skip] 2016-02-07 22:47:13 -08:00
John-David Dalton
ce60ac4274 Add isDeep flag to cloneBuffer. 2016-02-07 22:47:13 -08:00
John-David Dalton
a04fc310b4 Fix buffer test fails. 2016-02-07 22:47:13 -08:00
John-David Dalton
4a805ea666 Add _.isArrayBuffer and _.isBuffer. 2016-02-07 22:47:13 -08:00
John-David Dalton
1595651780 Add support for cloning buffers. [closes #1940] 2016-02-07 22:47:13 -08:00
John-David Dalton
fc85cac91d Update sauce-tunnel and webpack deps. 2016-02-07 22:47:13 -08:00
John-David Dalton
73134f9dcc Update the readme. 2016-02-07 22:47:13 -08:00
John-David Dalton
eb72bbe6f7 Update license to github formatting. 2016-02-07 22:47:12 -08:00
John-David Dalton
a5ae078f8f Increment package version to enable ci tests. 2016-02-05 00:24:51 -08:00
John-David Dalton
1cd9dc49a9 Bump to v4.2.1. 2016-02-03 01:31:34 -08:00
John-David Dalton
d64a97195b Rebuild lodash and docs. 2016-02-03 01:16:58 -08:00
John-David Dalton
c6a3ace553 Skip pseudo-private aliases. 2016-02-03 01:16:58 -08:00
John-David Dalton
497d57ca95 Ensure fp add and subtract don't have rearg applied. 2016-02-03 00:16:07 -08:00
John-David Dalton
3a07b411fb Add fp tests for placeholders. 2016-02-03 00:16:07 -08:00
John-David Dalton
b0c2a8d5fd Add fp _.partial tests for convert by name. 2016-02-03 00:16:06 -08:00
John-David Dalton
e404d214aa Add _.placeholder support so wrapped functions may support placeholders. 2016-02-03 00:16:06 -08:00
Nathan Tran
7f295dc6e8 Make _baseConvert use spread and not rest. 2016-02-03 00:16:06 -08:00
Prayag Verma
d2a8203efb Remove duplicate to and the words from docs. [ci skip] 2016-02-03 00:16:06 -08:00
John-David Dalton
33bfa8f961 Add trimChars fp mapping. 2016-02-03 00:16:06 -08:00
John-David Dalton
f944254cb8 Cleanup fp.curryN test label. 2016-02-03 00:16:06 -08:00
John-David Dalton
30339cfd86 Add fp.getOr test. 2016-02-03 00:16:06 -08:00
John-David Dalton
7dd5549b05 Increment lodash package version to enable ci tests. 2016-02-03 00:16:06 -08:00
John-David Dalton
b6b59d93d7 Bump to 4.2.0. 2016-02-02 00:33:16 -08:00
John-David Dalton
5af68bbf94 Rebuild lodash and docs. 2016-02-02 00:33:16 -08:00
John-David Dalton
db7debd3da Move benchmark.js to a dev dep. 2016-02-02 00:33:16 -08:00
laispace
29bc8d965b Fix _.sortedUniqBy doc example. [ci skip] 2016-02-01 23:55:34 -08:00
John-David Dalton
daeb55e99d Rename mapping rekey to rename. 2016-02-01 23:53:19 -08:00
John-David Dalton
fa4d85897c Add mutation notes to _.mergeWith, _.set, _.setWith, and _.unset. [ci skip] 2016-02-01 22:53:05 -08:00
John-David Dalton
983363e0cd Cleanup readme. [ci skip] 2016-02-01 22:37:56 -08:00
John-David Dalton
d95dad76b8 Remove dead code. 2016-02-01 22:37:56 -08:00
John-David Dalton
18f74aa5b2 Rename spreadArgs to otherArgs. 2016-02-01 22:37:56 -08:00
John-David Dalton
e96a8f7bc6 Cleanup map tests. 2016-02-01 22:37:56 -08:00
John-David Dalton
29f39be6ad Add _.flapMap tests for collections. 2016-02-01 22:37:56 -08:00
John-David Dalton
7a17967d79 Add _.spread tests for the start param. 2016-02-01 22:37:56 -08:00
John-David Dalton
de5bd32aba Rename rp vars to rest. 2016-02-01 22:37:56 -08:00
Jason Trill
199b2e1a3a Reword docs for _.tap and _.thru. [ci skip] 2016-02-01 22:37:56 -08:00
John-David Dalton
a43e4f10ef Update vendors. 2016-02-01 22:37:55 -08:00
Trevor Hudson
5522e4641d Update _.pickBy docs to include value as an iteratee param. [ci skip] 2016-02-01 22:37:55 -08:00
greenkeeperio-bot
6c82ea8fc3 Update qunitjs to 1.21.0. 2016-02-01 22:37:55 -08:00
John-David Dalton
b4b45b7139 Update docdown. 2016-02-01 22:37:55 -08:00
John-David Dalton
7ebb033016 Add _.at chaining test for objects with index keys. 2016-02-01 22:37:55 -08:00
John-David Dalton
163fdb46f0 Ensure fp _.partial and _.partialRight accept an args param. 2016-02-01 22:37:55 -08:00
John-David Dalton
b38cf204f7 Add start param to _.spread. 2016-02-01 22:37:55 -08:00
John-David Dalton
fe5381b0f4 Cleanup fp mapping. 2016-02-01 22:37:55 -08:00
John-David Dalton
c99e7f1337 Make _.flatMap a "Collection" method. 2016-02-01 22:37:55 -08:00
Mohammed Nauage
b61b674fec Remove sorted behavior from _.indexOf docs. [ci skip] 2016-02-01 22:37:55 -08:00
John-David Dalton
3bdaf99cfa Ensure _.iteratee clones sources for "_.matchesProperty" shorthand. 2016-02-01 22:37:54 -08:00
John-David Dalton
6c85e7015a Add assocPath and dissocPath fp aliases. 2016-02-01 22:37:54 -08:00
John-David Dalton
9788f7101b Ensure fp unset is immutable. [closes #1913] 2016-02-01 22:37:54 -08:00
Billy Janitsch
d0d5a3802d Alias set to assoc in FP. 2016-02-01 22:37:54 -08:00
John-David Dalton
1f160b31ff Make doc code sample comments match source comment style. [ci skip] 2016-01-30 01:02:49 -08:00
Ivan Tanev
13659e87cb Ensure _.attempt preserves custom errors. 2016-01-30 01:02:49 -08:00
John-David Dalton
ac9b0bfc1b Increment package version to enable ci tests. 2016-01-30 01:02:48 -08:00
John-David Dalton
07f7a3f3c5 Bump to 4.1.0. 2016-01-29 14:22:08 -08:00
John-David Dalton
22984f4eb2 Rebuild lodash and docs. 2016-01-29 14:21:44 -08:00
John-David Dalton
2286283f98 Add babel-plugin-lodash mention to readme. [ci skip] 2016-01-29 14:21:37 -08:00
Florent Cailhol
5ca26e6ae0 Remove V8 JIT bug fix for _.isObject. 2016-01-29 01:09:23 -08:00
John-David Dalton
e7c3afc1e5 Add index.js and lodash.js to the list of ignored files when generating fp modules. 2016-01-28 23:58:16 -08:00
John-David Dalton
82e9b4197b Add more fp mutation tests for deep objects. 2016-01-28 23:01:28 -08:00
John-David Dalton
820939f014 Update docdown. 2016-01-28 22:11:48 -08:00
John-David Dalton
e4c9916e17 Add default accumulator values to doc examples. [ci skip] 2016-01-28 22:11:43 -08:00
John-David Dalton
ce88b120eb Use npm config shorthand. 2016-01-28 18:11:53 -08:00
John-David Dalton
23c5101227 Make doc postprocess fix for symbol identifers more generic. 2016-01-28 14:45:15 -08:00
Craig Martin
de3eeb2d47 Use npm pretest hook. 2016-01-28 12:36:13 -08:00
John-David Dalton
03f7205e6d Ensure _.clone and _.cloneDeep work on prototype objects. 2016-01-28 01:05:25 -08:00
John-David Dalton
7bf7ab954b Update vendors and dev deps. 2016-01-28 01:05:25 -08:00
John-David Dalton
97612f3b31 Disable npm progress bar in travis for quicker installs. 2016-01-27 07:38:08 -08:00
John-David Dalton
71702d058c Ignore more files. 2016-01-27 01:19:03 -08:00
John-David Dalton
6a4164d9f3 Ensure remapped fp method modules are created. 2016-01-27 00:47:31 -08:00
John-David Dalton
d3b0eae84c Use mapping for aliasToReal. 2016-01-27 00:47:31 -08:00
John-David Dalton
0105b93f38 Ensure fp convert can work with aliases as name. 2016-01-27 00:19:06 -08:00
John-David Dalton
cae0d2c707 Add aliasToReal fp mapping. 2016-01-27 00:19:06 -08:00
John-David Dalton
dcb1572240 Reorg fp tests. 2016-01-27 00:19:06 -08:00
John-David Dalton
e20f43018b Separate fp _mapping into individual exports. 2016-01-27 00:19:06 -08:00
John-David Dalton
01e176694f Correct fp arg order of assignWith, assignInWith, merge, mergeWith, defaults, and defaultsDeep. 2016-01-27 00:19:06 -08:00
John-David Dalton
a239ccaa9a Add main:modules npm run script. 2016-01-26 21:32:22 -08:00
Jeroen Engels
b97a05b7f2 Add npm scripts to build docs. 2016-01-26 21:32:16 -08:00
John-David Dalton
c86754afde Cleanup hasPath and indexKeys. 2016-01-26 18:20:51 -08:00
John-David Dalton
95da9c0dd4 Optimize _.isEmpty. [closes #1888] 2016-01-26 18:20:50 -08:00
John-David Dalton
567171993b Define trim_trailing_whitespace rule for all files. 2016-01-26 18:20:50 -08:00
Kent C. Dodds
60a0d554a0 Run scripts in parallel. 2016-01-26 10:10:16 -08:00
John-David Dalton
f87af6c642 Add more npm run-scripts. 2016-01-26 08:41:38 -08:00
John-David Dalton
df849e8698 Fix style nits. 2016-01-26 08:41:38 -08:00
John-David Dalton
7a8ef7aeb7 Ensure _.sum and _.sumBy return 0 for empty arrays. [closes #1883] 2016-01-26 01:29:59 -08:00
John-David Dalton
25c7c8b153 Update dev deps. 2016-01-26 00:29:41 -08:00
John-David Dalton
8048f015e5 Ensure _.mergeWith overwrites primitives with source object clones. [closes #1880] 2016-01-26 00:28:38 -08:00
John-David Dalton
8a7fce41bb Add invokeMap to the excused methods in Backbone tests. 2016-01-26 00:28:38 -08:00
John-David Dalton
094a272443 Add _.invertBy. 2016-01-26 00:28:37 -08:00
John-David Dalton
552be2f5fb Remove multiVal param from _.invert. 2016-01-26 00:28:37 -08:00
John-David Dalton
d99954133c Add _.zipObjectDeep. 2016-01-26 00:28:37 -08:00
John-David Dalton
c49ace5587 Add back fp build-modules files. 2016-01-26 00:28:30 -08:00
67 changed files with 17159 additions and 11082 deletions

View File

@@ -8,7 +8,5 @@ charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
[**.{html,js,json,md}]
insert_final_newline = true
trim_trailing_whitespace = true

78
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,78 @@
# Contributing to Lodash
Contributions are always welcome. Before contributing please read the
[code of conduct](https://github.com/lodash/lodash/blob/master/CODE_OF_CONDUCT.md)
& [search the issue tracker](https://github.com/lodash/lodash/issues); your issue
may have already been discussed or fixed in `master`. To contribute,
[fork](https://help.github.com/articles/fork-a-repo/) Lodash, commit your changes,
& [send a pull request](https://help.github.com/articles/using-pull-requests/).
## Feature Requests
Feature requests should be submitted in the
[issue tracker](https://github.com/lodash/lodash/issues), with a description of
the expected behavior & use case, where theyll remain closed until sufficient interest,
[e.g. :+1: reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/),
has been shown by the community. Before submitting a request, please search for
similar ones in the
[closed issues](https://github.com/lodash/lodash/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement).
## Pull Requests
For additions or bug fixes you should only need to modify `lodash.js`. Include
updated unit tests in the `test` directory as part of your pull request. Dont
worry about regenerating the `dist/` or `doc/` files.
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 `npm test`, or open `test/index.html` &
`test/fp.html` in a web browser. The [Backbone](http://backbonejs.org/) &
[Underscore](http://underscorejs.org/) test suites are included as well.
## Contributor License Agreement
Lodash is a member of the [jQuery Foundation](https://jquery.org/).
As such, we request that all contributors sign the jQuery Foundation
[contributor license agreement (CLA)](https://contribute.jquery.org/CLA/).
For more information about CLAs, please check out Alex Russells excellent post,
[“Why Do I Need to Sign This?”](http://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
## Coding Guidelines
In addition to the following guidelines, please follow the conventions already
established in the code.
- **Spacing**:<br>
Use two spaces for indentation. No tabs.
- **Naming**:<br>
Keep variable & method names concise & descriptive.<br>
Variable names `index`, `collection`, & `callback` are preferable to
`i`, `arr`, & `fn`.
- **Quotes**:<br>
Single-quoted strings are preferred to double-quoted strings; however,
please use a double-quoted string if the value contains a single-quote
character to avoid unnecessary escaping.
- **Comments**:<br>
Please use single-line comments to annotate significant additions, &
[JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for
functions.
Guidelines are enforced using [JSCS](https://www.npmjs.com/package/jscs):
```bash
$ npm run style
```
## Tips
You can opt-in to a pre-push git hook by adding an `.opt-in` file to the root of
the project containing:
```txt
pre-push
```
With that, when you `git push`, the pre-push git hook will trigger and execute
`npm run validate`.

2
.gitignore vendored
View File

@@ -5,3 +5,5 @@
lodash.compat.min.js
coverage
node_modules
.opt-in
.opt-out

View File

@@ -77,7 +77,6 @@
"disallowKeywords": ["with"],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": true,

View File

@@ -33,16 +33,17 @@ notifications:
on_failure: always
before_install:
- "nvm use $TRAVIS_NODE_VERSION"
- "npm config set loglevel error"
- "npm set loglevel error"
- "npm set progress false"
- "npm i -g npm@\"^2.0.0\""
- |
PATTERN[0]="|\s*if\s*\(isHostObject\b[\s\S]+?\}(?=\n)|"
PATTERN[1]="|\s*if\s*\(enumerate\b[\s\S]+?\};\s*\}|"
PATTERN[2]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|"
PATTERN[3]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|"
PATTERN[4]="|\s*if\s*\(ctorString\b[\s\S]+?\}\s*\}|"
PATTERN[4]="|\bcase\s+(?:dataView|set|map|weakMap)CtorString:.+|g"
PATTERN[5]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|"
PATTERN[6]="|\s*if\s*\(!lodashFunc\)\s*\{\s*return;\s*\}|"
PATTERN[6]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|"
PATTERN[7]="|\s*define\([\s\S]+?\);|"
PATTERN[8]="|\s*root\._\s*=\s*_;|"
@@ -62,7 +63,7 @@ script:
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || $BIN $OPTION ./test.js ../lodash.js"
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || $BIN $OPTION ./test.js ../dist/lodash.min.js"
- "[ $SAUCE_LABS == false ] || rm -rf ./node_modules/lodash"
- "[ $SAUCE_LABS == false ] || ($BIN ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./node_modules/lodash && node ./node_modules/lodash-cli/bin/lodash -d -o ./node_modules/lodash/index.js)"
- "[ $SAUCE_LABS == false ] || ($BIN ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./node_modules/lodash && node ./node_modules/lodash-cli/bin/lodash -d -o ./node_modules/lodash/lodash.js)"
- "[ $SAUCE_LABS == false ] || $BIN ./node_modules/lodash-cli/bin/lodash core -o ./dist/lodash.core.js"
- "[ $SAUCE_LABS == false ] || npm run build"
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../dist/lodash.js&noglobals=true\" tags=\"development\""

View File

@@ -1,24 +1,41 @@
# Contributor Code of Conduct
# Contributor Covenant Code of Conduct
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.
## Our Pledge
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
@@ -26,24 +43,32 @@ that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.
## Scope
This code of conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer at
[coc@lodash.com](mailto:coc@lodash.com). All complaints will be reviewed and
investigated and will result in a response that is deemed necessary and
appropriate to the circumstances. Maintainers are obligated to maintain
confidentiality with regard to the reporter of an incident.
reported by contacting the project team at [coc@lodash.com](mailto:coc@lodash.com).
The project team will review and investigate all complaints, and will respond in
a way that it deems appropriate to the circumstances. The project team is obligated
to maintain confidentiality with regard to the reporter of an incident. Further
details of specific enforcement policies may be posted separately.
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version]
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/
[version]: http://contributor-covenant.org/version/1/4/

View File

@@ -1,43 +0,0 @@
# Contributing to lodash
Contributions are always welcome. Before contributing, please read the [code of conduct](https://github.com/lodash/lodash/blob/master/CODE_OF_CONDUCT.md) & [search the issue tracker](https://github.com/lodash/lodash/issues);
your issue may have already been discussed or fixed in `master`. To contribute, [fork](https://help.github.com/articles/fork-a-repo/) lodash, commit your changes, & [send a pull request](https://help.github.com/articles/using-pull-requests/).
## Tests
Include updated unit tests in the `test` directory as part of your pull request.
Dont worry about regenerating the `dist/` or `doc/` files.
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 `npm test`, or open `test/index.html` & `test/fp.html` in a web browser.
The [Backbone](http://backbonejs.org/) & [Underscore](http://underscorejs.org/) test suites are included as well.
## Contributor License Agreement
lodash is a member of the [Dojo Foundation](http://dojofoundation.org/).
As such, we request that all contributors sign the Dojo Foundation [contributor license agreement](http://dojofoundation.org/about/claForm).
For more information about CLAs, please check out Alex Russells excellent post, [“Why Do I Need to Sign This?”](http://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
## Coding Guidelines
In addition to the following guidelines, please follow the conventions already established in the code.
- **Spacing**:<br>
Use two spaces for indentation. No tabs.
- **Naming**:<br>
Keep variable & method names concise & descriptive.<br>
Variable names `index`, `collection`, & `callback` are preferable to `i`, `arr`, & `fn`.
- **Quotes**:<br>
Single-quoted strings are preferred to double-quoted strings; however, please use a double-quoted string if the value contains a single-quote character to avoid unnecessary escaping.
- **Comments**:<br>
Please use single-line comments to annotate significant additions, & [JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for functions.
Guidelines are enforced using [JSCS](https://www.npmjs.com/package/jscs):
```bash
$ npm run style
```

29
LICENSE
View File

@@ -1,7 +1,17 @@
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
Copyright jQuery Foundation and other contributors <https://jquery.org/>
Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/lodash/lodash
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -20,3 +30,18 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====
Copyright and related rights for sample code are waived via CC0. Sample
code is defined as all source code displayed within the prose of the
documentation.
CC0: http://creativecommons.org/publicdomain/zero/1.0/
====
Files located in the node_modules and vendor directories are externally
maintained libraries used by this software which have their own
licenses; we recommend you read them, as their terms may differ from the
terms above.

View File

@@ -1,6 +1,6 @@
# lodash v4.0.1
# lodash v4.8.1
The [lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.
The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
```bash
@@ -11,20 +11,42 @@ $ lodash core -o ./dist/lodash.core.js
## Community
[![Join the chat at https://gitter.im/lodash/lodash](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/lodash/lodash)
[![Gitter](https://badges.gitter.im/lodash/lodash.svg)](https://gitter.im/lodash/lodash)
## Module formats
## Documentation
Lodash is also available in a variety of other builds & module formats.
* [API Documentation](https://lodash.com/docs)
* [FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide)
* [lodash](https://www.npmjs.com/package/lodash) & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) packages
* [lodash-amd](https://github.com/lodash/lodash/tree/4.0.1-amd)
* [lodash-es](https://github.com/lodash/lodash/tree/4.0.1-es)
## Download
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.8.1/LICENSE) & supports [modern environments](#support).<br>
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one thats right for you.
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.8.1/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.8.1/dist/lodash.core.min.js))
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.8.1/dist/lodash.js) ([~22 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.8.1/dist/lodash.min.js))
* [CDN copies](https://www.jsdelivr.com/projects/lodash)
## Why Lodash?
Lodash makes JavaScript easier by taking the hassle out of working with arrays,<br>
numbers, objects, strings, etc. Lodashs modular methods are great for:
* Iterating arrays, objects, & strings
* Manipulating & testing values
* Creating composite functions
## Module Formats
Lodash is available in a [variety of builds](https://lodash.com/custom-builds) & module formats.
* [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/browse/keyword/lodash-modularized)
* [lodash-amd](https://www.npmjs.com/package/lodash-amd)
* [lodash-es](https://www.npmjs.com/package/lodash-es) & [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash)
* [lodash/fp](https://github.com/lodash/lodash/tree/4.8.1-npm/fp)
## Further Reading
* [API Documentation](https://lodash.com/docs)
* [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences)
* [Changelog](https://github.com/lodash/lodash/wiki/Changelog)
* [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap)
* [More Resources](https://github.com/lodash/lodash/wiki/Resources)
* [Contributing](https://github.com/lodash/lodash/blob/4.8.1/.github/CONTRIBUTING.md)
* [Release Notes](https://github.com/lodash/lodash/releases/tag/4.0.0)
* [Wiki (Changelog, Roadmap, etc.)](https://github.com/lodash/lodash/wiki)

1017
dist/lodash.core.js vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,30 +1,30 @@
/**
* @license
* lodash 4.0.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* lodash 4.8.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* Build: `lodash core -o ./dist/lodash.core.js`
*/
;(function(){function n(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function t(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===ln?i===i:r(i,c)))var c=i,f=o}return f}function r(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return w(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return vn[n];
}function c(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function f(n,t){return n=typeof n=="number"||hn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){if(Z(n)&&!Vn(n)){if(n instanceof l)return n;if(En.call(n,"__wrapped__")){var t=new l(n.__wrapped__,n.__chain__);return t.__actions__=k(n.__actions__),t}}return new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){return n===ln||H(n,xn[r])&&!En.call(e,r)?t:n;
}function s(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(ln,r)},t)}function h(n,t){var r=true;return $n(n,function(n,e,u){return r=!!t(n,e,u)}),r}function v(n,t){var r=[];return $n(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function y(t,r,e,u){u||(u=[]);for(var o=-1,i=t.length;++o<i;){var c=t[o];Z(c)&&Q(c)&&(e||Vn(c)||L(c))?r?y(c,r,e,u):n(u,c):e||(u[u.length]=c)}return u}function _(n,t){return n&&qn(n,t,un)}function g(n,t){return v(t,function(t){
return W(n[t])})}function b(n,t,r,e,u){return n===t?true:null==n||null==t||!Y(n)&&!Z(t)?n!==n&&t!==t:j(n,t,b,r,e,u)}function j(n,t,r,e,u,o){var i=Vn(n),f=Vn(t),a="[object Array]",l="[object Array]";i||(a=kn.call(n),"[object Arguments]"==a&&(a="[object Object]")),f||(l=kn.call(t),"[object Arguments]"==l&&(l="[object Object]"));var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t);return!(l=a==l)||i||p?2&u||(a=p&&En.call(n,"__wrapped__"),f=f&&En.call(t,"__wrapped__"),!a&&!f)?l?(o||(o=[]),(a=C(o,function(t){
return t[0]===n}))&&a[1]?a[1]==t:(o.push([n,t]),t=(i?R:$)(n,t,r,e,u,o),o.pop(),t)):false:r(a?n.value():n,f?t.value():t,e,u,o):I(n,t,a)}function m(n){var t=typeof n;return"function"==t?n:null==n?fn:("object"==t?O:E)(n)}function d(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function w(n,t){var r=-1,e=Q(n)?Array(n.length):[];return $n(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function O(n){var t=un(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];
if(!(u in r&&b(n[u],r[u],ln,3)))return false}return true}}function x(n,t){return n=Object(n),J(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function E(n){return function(t){return null==t?ln:t[n]}}function A(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function k(n){return A(n,0,n.length)}function N(n,t){var r;return $n(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function S(t,r){return J(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args));
},t)}function T(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];(!H(a,c)||H(a,xn[i])&&!En.call(f,i)||c===ln&&!(i in f))&&(f[i]=c)}return r}function F(n){return V(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:ln,o=typeof o=="function"?(u--,o):ln;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function B(n){return function(){var t=arguments,r=In(n.prototype),t=n.apply(r,t);return Y(t)?t:r}}function D(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==wn&&this instanceof e?u:n;++c<f;)a[c]=r[c];
for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=B(n);return e}function R(n,t,r,e,u,o){var i=-1,c=1&u,f=n.length,a=t.length;if(f!=a&&!(2&u&&a>f))return false;for(a=true;++i<f;){var l=n[i],p=t[i];if(void 0!==ln){a=false;break}if(c){if(!N(t,function(n){return l===n||r(l,n,e,u,o)})){a=false;break}}else if(l!==p&&!r(l,p,e,u,o)){a=false;break}}return a}function I(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":
return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""}return false}function $(n,t,r,e,u,o){var i=2&u,c=un(n),f=c.length,a=un(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:En.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==ln||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(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)&&(a=false)),
a}function q(n){var t=n?n.length:ln;if(X(t)&&(Vn(n)||tn(n)||L(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}function M(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||xn)}function z(n){return n?n[0]:ln}function C(n,t){return r(n,m(t),$n)}function G(n,t){return $n(n,typeof t=="function"?t:fn)}function J(n,t,r){return e(n,m(t),r,3>arguments.length,$n)}function P(n){return null==n?0:(n=Q(n)?n:un(n),n.length)}function U(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");
return n=Hn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=ln),r}}function V(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=Rn(t===ln?n.length-1:Hn(t),0),function(){for(var r=arguments,e=-1,u=Rn(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function H(n,t){return n===t||n!==n&&t!==t}function K(n,t){return n>t}function L(n){return Z(n)&&Q(n)&&En.call(n,"callee")&&(!Fn.call(n,"callee")||"[object Arguments]"==kn.call(n));
}function Q(n){return null!=n&&!(typeof n=="function"&&W(n))&&X(Mn(n))}function W(n){return n=Y(n)?kn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function X(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function Y(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function Z(n){return!!n&&typeof n=="object"}function nn(n){return typeof n=="number"||Z(n)&&"[object Number]"==kn.call(n)}function tn(n){return typeof n=="string"||!Vn(n)&&Z(n)&&"[object String]"==kn.call(n);
}function rn(n,t){return t>n}function en(n){return typeof n=="string"?n:null==n?"":n+""}function un(n){var t=M(n);if(!t&&!Q(n))return Dn(Object(n));var r,e=q(n),u=!!e,e=e||[],o=e.length;for(r in n)!En.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);return e}function on(n){for(var t=-1,r=M(n),e=d(n),u=e.length,o=q(n),i=!!o,o=o||[],c=o.length;++t<u;){var a=e[t];i&&("length"==a||f(a,c))||"constructor"==a&&(r||!En.call(n,a))||o.push(a)}return o}function cn(n){return n?u(n,un(n)):[];
}function fn(n){return n}function an(t,r,e){var u=un(r),o=g(r,u);null!=e||Y(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=g(r,un(r)));var i=Y(e)&&"chain"in e?e.chain:true,c=W(t);return $n(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=k(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var ln,pn=/[&<>"'`]/g,sn=RegExp(pn.source),hn=/^(?:0|[1-9]\d*)$/,vn={
"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},yn={"function":true,object:true},_n=yn[typeof exports]&&exports&&!exports.nodeType?exports:null,gn=yn[typeof module]&&module&&!module.nodeType?module:null,bn=o(yn[typeof self]&&self),jn=o(yn[typeof window]&&window),mn=gn&&gn.exports===_n?_n:null,dn=o(yn[typeof this]&&this),wn=o(_n&&gn&&typeof global=="object"&&global)||jn!==(dn&&dn.window)&&jn||bn||dn||Function("return this")(),On=Array.prototype,xn=Object.prototype,En=xn.hasOwnProperty,An=0,kn=xn.toString,Nn=wn._,Sn=wn.f,Tn=Sn?Sn.g:ln,Fn=xn.propertyIsEnumerable,Bn=wn.isFinite,Dn=Object.keys,Rn=Math.max,In=function(){
function n(){}return function(t){if(Y(t)){n.prototype=t;var r=new n;n.prototype=ln}return r||{}}}(),$n=function(n,t){return function(r,e){if(null==r)return r;if(!Q(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(_),qn=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}();Tn&&!Fn.call({valueOf:1},"valueOf")&&(d=function(n){n=Tn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);
return r});var Mn=E("length"),zn=V(function(t,r){return Vn(t)||(t=null==t?[]:[Object(t)]),y(r),n(k(t),cn)}),Cn=V(function(n,t,r){var e=typeof t=="function";return w(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})}),Gn=Date.now,Jn=V(function(n,t,r){return D(n,t,r)}),Pn=V(function(n,t){return s(n,1,t)}),Un=V(function(n,t,r){return s(n,Kn(t)||0,r)}),Vn=Array.isArray,Hn=Number,Kn=Number,Ln=F(function(n,t){T(t,un(t),n)}),Qn=F(function(n,t){T(t,on(t),n)}),Wn=F(function(n,t,r,e){T(t,on(t),n,e);
}),Xn=V(function(n){return n.push(ln,p),Wn.apply(ln,n)}),Yn=V(function(n,t){return null==n?{}:x(n,y(t))}),Zn=m;l.prototype=In(a.prototype),l.prototype.constructor=l,a.assignIn=Qn,a.before=U,a.bind=Jn,a.chain=function(n){return n=a(n),n.__chain__=true,n},a.compact=function(n){return v(n,Boolean)},a.concat=zn,a.create=function(n,t){var r=In(n);return t?Ln(r,t):r},a.defaults=Xn,a.defer=Pn,a.delay=Un,a.filter=function(n,t){return v(n,m(t))},a.flatten=function(n){return n&&n.length?y(n):[]},a.flattenDeep=function(n){
return n&&n.length?y(n,true):[]},a.invokeMap=Cn,a.iteratee=Zn,a.keys=un,a.map=function(n,t){return w(n,m(t))},a.matches=function(n){return O(Ln({},n))},a.mixin=an,a.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},a.once=function(n){return U(2,n)},a.pick=Yn,a.slice=function(n,t,r){var e=n?n.length:0;return r=r===ln?e:+r,e?A(n,null==t?0:+t,r):[]},a.sortBy=function(n,t){var r=0;return t=m(t),w(w(n,function(n,e,u){
return{c:n,b:r++,a:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.a;var e=t.a;if(r!==e){var u=null===r,o=r===ln,i=r===r,c=null===e,f=e===ln,a=e===e;if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b}),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return Q(n)?n.length?k(n):[]:cn(n)},a.values=cn,a.extend=Qn,an(a,a),a.clone=function(n){return Y(n)?Vn(n)?k(n):T(n,un(n)):n},a.escape=function(n){
return(n=en(n))&&sn.test(n)?n.replace(pn,i):n},a.every=function(n,t,r){return t=r?ln:t,h(n,m(t))},a.find=C,a.forEach=G,a.has=function(n,t){return null!=n&&En.call(n,t)},a.head=z,a.identity=fn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?Rn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1},a.isArguments=L,a.isArray=Vn,a.isBoolean=function(n){return true===n||false===n||Z(n)&&"[object Boolean]"==kn.call(n)},a.isDate=function(n){return Z(n)&&"[object Date]"==kn.call(n);
},a.isEmpty=function(n){return!Z(n)||W(n.splice)?!P(n):!un(n).length},a.isEqual=function(n,t){return b(n,t)},a.isFinite=function(n){return typeof n=="number"&&Bn(n)},a.isFunction=W,a.isNaN=function(n){return nn(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=nn,a.isObject=Y,a.isRegExp=function(n){return Y(n)&&"[object RegExp]"==kn.call(n)},a.isString=tn,a.isUndefined=function(n){return n===ln},a.last=function(n){var t=n?n.length:0;return t?n[t-1]:ln},a.max=function(n){return n&&n.length?t(n,fn,K):ln;
},a.min=function(n){return n&&n.length?t(n,fn,rn):ln},a.noConflict=function(){return wn._===this&&(wn._=Nn),this},a.noop=function(){},a.now=Gn,a.reduce=J,a.result=function(n,t,r){return t=null==n?ln:n[t],t===ln&&(t=r),W(t)?t.call(n):t},a.size=P,a.some=function(n,t,r){return t=r?ln:t,N(n,m(t))},a.uniqueId=function(n){var t=++An;return en(n)+t},a.each=G,a.first=z,an(a,function(){var n={};return _(a,function(t,r){En.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.0.1",$n("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
var t=(/^(?:replace|split)$/.test(n)?String.prototype:On)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);a.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return S(this.__wrapped__,this.__actions__)},(jn||bn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){
return a}):_n&&gn?(mn&&((gn.exports=a)._=a),_n._=a):wn._=a}).call(this);
;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===ln?i===i:r(i,c)))var c=i,f=o}return f}function r(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return w(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return yn[n]}function c(n){var t=false;if(null!=n&&typeof n.toString!="function")try{
t=!!(n+"")}catch(r){}return t}function f(n,t){return n=typeof n=="number"||vn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){return n instanceof l?n:new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){var u;return(u=n===ln)||(u=An[r],u=(n===u||n!==n&&u!==u)&&!En.call(e,r)),u?t:n}function s(n){return Y(n)?Rn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){
n.apply(ln,r)},t)}function v(n,t){var r=true;return zn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return zn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function g(t,r,e,u){u||(u=[]);for(var o=-1,i=t.length;++o<i;){var c=t[o];r>0&&Z(c)&&Q(c)&&(e||Un(c)||L(c))?r>1?g(c,r-1,e,u):n(u,c):e||(u[u.length]=c)}return u}function b(n,t){return n&&Cn(n,t,un)}function _(n,t){return y(t,function(t){return W(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!Y(n)&&!Z(t)?n!==n&&t!==t:d(n,t,j,r,e,u);
}function d(n,t,r,e,u,o){var i=Un(n),f=Un(t),a="[object Array]",l="[object Array]";i||(a=Nn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=Nn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t),l=a==l;o||(o=[]);var s=J(o,function(t){return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(r=i||isTypedArray(n)?I(n,t,r,e,u,o):$(n,t,a),o.pop(),r):2&u||(i=p&&En.call(n,"__wrapped__"),a=f&&En.call(t,"__wrapped__"),!i&&!a)?l?(r=q(n,t,r,e,u,o),
o.pop(),r):false:(i=i?n.value():n,t=a?t.value():t,r=r(i,t,e,u,o),o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?fn:(typeof n=="object"?x:E)(n)}function O(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function w(n,t){var r=-1,e=Q(n)?Array(n.length):[];return zn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function x(n){var t=un(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&j(n[u],r[u],ln,3)))return false}return true}}function A(n,t){
return n=Object(n),P(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function E(n){return function(t){return null==t?ln:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function N(n){return k(n,0,n.length)}function S(n,t){var r;return zn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function T(t,r){return P(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},t)}function F(n,t,r,e){r||(r={});
for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];En.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==ln||i in f)||(f[i]=c)}return r}function R(n){return V(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:ln,o=typeof o=="function"?(u--,o):ln;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function B(n){return function(){var t=arguments,r=s(n.prototype),t=n.apply(r,t);return Y(t)?t:r}}function D(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==wn&&this instanceof e?u:n;++c<f;)a[c]=r[c];
for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=B(n);return e}function I(n,t,r,e,u,o){var i=-1,c=1&u,f=n.length,a=t.length;if(f!=a&&!(2&u&&a>f))return false;for(a=true;++i<f;){var l=n[i],p=t[i];if(void 0!==ln){a=false;break}if(c){if(!S(t,function(n){return l===n||r(l,n,e,u,o)})){a=false;break}}else if(l!==p&&!r(l,p,e,u,o)){a=false;break}}return a}function $(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":
return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""}return false}function q(n,t,r,e,u,o){var i=2&u,c=un(n),f=c.length,a=un(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:En.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==ln||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(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)&&(a=false)),
a}function z(n){var t=n?n.length:ln;if(X(t)&&(Un(n)||tn(n)||L(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}function C(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||An)}function G(n){return n?n[0]:ln}function J(n,t){return r(n,m(t),zn)}function M(n,t){return zn(n,m(t))}function P(n,t,r){return e(n,m(t),r,3>arguments.length,zn)}function U(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Vn(n),function(){
return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=ln),r}}function V(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=$n(t===ln?n.length-1:Vn(t),0),function(){for(var r=arguments,e=-1,u=$n(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function H(){if(!arguments.length)return[];var n=arguments[0];return Un(n)?n:[n]}function K(n,t){return n>t}function L(n){return Z(n)&&Q(n)&&En.call(n,"callee")&&(!Bn.call(n,"callee")||"[object Arguments]"==Nn.call(n));
}function Q(n){return null!=n&&X(Gn(n))&&!W(n)}function W(n){return n=Y(n)?Nn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function X(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function Y(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function Z(n){return!!n&&typeof n=="object"}function nn(n){return typeof n=="number"||Z(n)&&"[object Number]"==Nn.call(n)}function tn(n){return typeof n=="string"||!Un(n)&&Z(n)&&"[object String]"==Nn.call(n)}function rn(n,t){
return t>n}function en(n){return typeof n=="string"?n:null==n?"":n+""}function un(n){var t=C(n);if(!t&&!Q(n))return In(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!En.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);return e}function on(n){for(var t=-1,r=C(n),e=O(n),u=e.length,o=z(n),i=!!o,o=o||[],c=o.length;++t<u;){var a=e[t];i&&("length"==a||f(a,c))||"constructor"==a&&(r||!En.call(n,a))||o.push(a)}return o}function cn(n){return n?u(n,un(n)):[]}function fn(n){return n;
}function an(t,r,e){var u=un(r),o=_(r,u);null!=e||Y(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=_(r,un(r)));var i=Y(e)&&"chain"in e?e.chain:true,c=W(t);return zn(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=N(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var ln,pn=1/0,sn=/[&<>"'`]/g,hn=RegExp(sn.source),vn=/^(?:0|[1-9]\d*)$/,yn={
"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},gn={"function":true,object:true},bn=gn[typeof exports]&&exports&&!exports.nodeType?exports:ln,_n=gn[typeof module]&&module&&!module.nodeType?module:ln,jn=_n&&_n.exports===bn?bn:ln,dn=o(gn[typeof self]&&self),mn=o(gn[typeof window]&&window),On=o(gn[typeof this]&&this),wn=o(bn&&_n&&typeof global=="object"&&global)||mn!==(On&&On.window)&&mn||dn||On||Function("return this")(),xn=Array.prototype,An=Object.prototype,En=An.hasOwnProperty,kn=0,Nn=An.toString,Sn=wn._,Tn=wn.Reflect,Fn=Tn?Tn.f:ln,Rn=Object.create,Bn=An.propertyIsEnumerable,Dn=wn.isFinite,In=Object.keys,$n=Math.max,qn=!Bn.call({
valueOf:1},"valueOf");l.prototype=s(a.prototype),l.prototype.constructor=l;var zn=function(n,t){return function(r,e){if(null==r)return r;if(!Q(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(b),Cn=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}();Fn&&!Bn.call({valueOf:1},"valueOf")&&(O=function(n){n=Fn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);
return r});var Gn=E("length"),Jn=V(function(n,t,r){return D(n,t,r)}),Mn=V(function(n,t){return h(n,1,t)}),Pn=V(function(n,t,r){return h(n,Hn(t)||0,r)}),Un=Array.isArray,Vn=Number,Hn=Number,Kn=R(function(n,t){F(t,un(t),n)}),Ln=R(function(n,t){F(t,on(t),n)}),Qn=R(function(n,t,r,e){F(t,on(t),n,e)}),Wn=V(function(n){return n.push(ln,p),Qn.apply(ln,n)}),Xn=V(function(n,t){return null==n?{}:A(n,g(t,1))}),Yn=m;a.assignIn=Ln,a.before=U,a.bind=Jn,a.chain=function(n){return n=a(n),n.__chain__=true,n},a.compact=function(n){
return y(n,Boolean)},a.concat=function(){var t=arguments.length,r=H(arguments[0]);if(2>t)return t?N(r):[];for(var e=Array(t-1);t--;)e[t-1]=arguments[t];return g(e,1),n(N(r),cn)},a.create=function(n,t){var r=s(n);return t?Kn(r,t):r},a.defaults=Wn,a.defer=Mn,a.delay=Pn,a.filter=function(n,t){return y(n,m(t))},a.flatten=function(n){return n&&n.length?g(n,1):[]},a.flattenDeep=function(n){return n&&n.length?g(n,pn):[]},a.iteratee=Yn,a.keys=un,a.map=function(n,t){return w(n,m(t))},a.matches=function(n){
return x(Kn({},n))},a.mixin=an,a.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},a.once=function(n){return U(2,n)},a.pick=Xn,a.slice=function(n,t,r){var e=n?n.length:0;return r=r===ln?e:+r,e?k(n,null==t?0:+t,r):[]},a.sortBy=function(n,t){var r=0;return t=m(t),w(w(n,function(n,e,u){return{c:n,b:r++,a:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.a;var e=t.a;if(r!==e){var u=null===r,o=r===ln,i=r===r,c=null===e,f=e===ln,a=e===e;
if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b}),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return Q(n)?n.length?N(n):[]:cn(n)},a.values=cn,a.extend=Ln,an(a,a),a.clone=function(n){return Y(n)?Un(n)?N(n):F(n,un(n)):n},a.escape=function(n){return(n=en(n))&&hn.test(n)?n.replace(sn,i):n},a.every=function(n,t,r){return t=r?ln:t,v(n,m(t))},a.find=J,a.forEach=M,a.has=function(n,t){return null!=n&&En.call(n,t);
},a.head=G,a.identity=fn,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?$n(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1},a.isArguments=L,a.isArray=Un,a.isBoolean=function(n){return true===n||false===n||Z(n)&&"[object Boolean]"==Nn.call(n)},a.isDate=function(n){return Z(n)&&"[object Date]"==Nn.call(n)},a.isEmpty=function(n){if(Q(n)&&(Un(n)||tn(n)||W(n.splice)||L(n)))return!n.length;for(var t in n)if(En.call(n,t))return false;return!(qn&&un(n).length);
},a.isEqual=function(n,t){return j(n,t)},a.isFinite=function(n){return typeof n=="number"&&Dn(n)},a.isFunction=W,a.isNaN=function(n){return nn(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=nn,a.isObject=Y,a.isRegExp=function(n){return Y(n)&&"[object RegExp]"==Nn.call(n)},a.isString=tn,a.isUndefined=function(n){return n===ln},a.last=function(n){var t=n?n.length:0;return t?n[t-1]:ln},a.max=function(n){return n&&n.length?t(n,fn,K):ln},a.min=function(n){return n&&n.length?t(n,fn,rn):ln},
a.noConflict=function(){return wn._===this&&(wn._=Sn),this},a.noop=function(){},a.reduce=P,a.result=function(n,t,r){return t=null==n?ln:n[t],t===ln&&(t=r),W(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=Q(n)?n:un(n),n.length)},a.some=function(n,t,r){return t=r?ln:t,S(n,m(t))},a.uniqueId=function(n){var t=++kn;return en(n)+t},a.each=M,a.first=G,an(a,function(){var n={};return b(a,function(t,r){En.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.8.1",zn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
var t=(/^(?:replace|split)$/.test(n)?String.prototype:xn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);a.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Un(u)?u:[],n)}return this[r](function(r){return t.apply(Un(r)?r:[],n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return T(this.__wrapped__,this.__actions__)},(mn||dn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){
return a}):bn&&_n?(jn&&((_n.exports=a)._=a),bn._=a):wn._=a}).call(this);

981
dist/lodash.fp.js vendored

File diff suppressed because it is too large Load Diff

28
dist/lodash.fp.min.js vendored
View File

@@ -1,11 +1,17 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.fp=t():e.fp=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){function n(e){return i(e,e)}var i=r(1);e.exports=n},function(e,t,r){function n(e,t,r){
if("function"!=typeof r&&(r=t,t=void 0),null==r)throw new TypeError;var u=void 0===t&&"string"==typeof r.VERSION,s=u?r:{ary:e.ary,cloneDeep:e.cloneDeep,curry:e.curry,forEach:e.forEach,isFunction:e.isFunction,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg},c=s.ary,f=s.cloneDeep,p=s.curry,l=s.forEach,h=s.isFunction,d=s.keys,y=s.rearg,g=function(e,t){return 2==t?function(t,r){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}},m=function(e,t){return 2==t?function(t,r){return e(t,r);
}:function(t){return e(t)}},v=function(e){for(var t=e?e.length:0,r=Array(t);t--;)r[t]=e[t];return r},W=function(e){return function(t){return e({},t)}},R=function(e,t){return O(e,t,!0)},x=function(e,t){return O(e,function(e){return m(e,t)})},I=function(e,t){return O(e,function(e){var r=t.length;return g(y(m(e,r),t),r)})},O=function(e,t,r){return function(){for(var n=arguments.length,i=Array(n);n--;)i[n]=arguments[n];i[0]=t(i[0]);var a=e.apply(void 0,i);return r?i[0]:a}},k={iteratee:function(e){return function(){
var t=arguments[0],r=arguments[1];r=r>2?r-2:1,t=e(t);var n=t.length;return n&&r>=n?t:m(t,r)}},mixin:function(e){return function(t){var r=this;if(!h(r))return e(r,Object(t));var n=[],i=[];return l(d(t),function(e){var a=t[e];h(a)&&(i.push(e),n.push(r.prototype[e]))}),e(r,Object(t)),l(i,function(e,t){var i=n[t];h(i)?r.prototype[e]=i:delete r.prototype[e]}),r}},runInContext:function(t){return function(r){return n(e,t(r))}}},E=function(e,t){var r=k[e];if(r)return r(t);a.array[e]?t=R(t,v):a.object[e]?t=R(t,W(t)):a.set[e]&&(t=R(t,f));
var n;return l(i.caps,function(r){return l(i.aryMethod[r],function(a){if(e==a){var o=i.iterateeRearg[e],s=!u&&i.aryIteratee[e];return n=c(t,r),r>1&&!i.skipRearg[e]&&(n=y(n,i.methodRearg[e]||i.aryRearg[r])),o?n=I(n,o):s&&(n=x(n,s)),r>1&&(n=p(n,r)),!1}}),!n}),n||(n=t),i.placeholder[e]&&(n.placeholder=o),n};if(!u)return E(t,r);var B=[];return l(i.caps,function(e){l(i.aryMethod[e],function(e){var t=s[i.key[e]||e];t&&B.push([e,E(e,t)])})}),l(B,function(e){s[e[0]]=e[1]}),l(d(s),function(e){l(i.alias[e]||[],function(t){
s[t]=s[e]})}),s}var i=r(2),a=i.mutate,o={};e.exports=n},function(e,t){e.exports={alias:{ary:["nAry"],assignIn:["extend"],assignInWith:["extendWith"],filter:["whereEq"],flatten:["unnest"],flow:["pipe"],flowRight:["compose"],forEach:["each"],forEachRight:["eachRight"],get:["path","prop"],getOr:["pathOr","propOr"],head:["first"],includes:["contains"],initial:["init"],isEqual:["equals"],mapValues:["mapObj"],matchesProperty:["pathEq"],omit:["dissoc","omitAll"],overArgs:["useWith"],overEvery:["allPass"],
overSome:["somePass"],pick:["pickAll"],propertyOf:["propOf"],rest:["unapply"],some:["all"],spread:["apply"],zipObject:["zipObj"]},aryIteratee:{assignWith:2,assignInWith:2,cloneDeepWith:1,cloneWith:1,dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findIndex:1,findKey:1,findLast:1,findLastIndex:1,findLastKey:1,flatMap:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,isEqualWith:2,isMatchWith:2,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,
some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},aryMethod:{1:["attempt","ceil","create","curry","curryRight","floor","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","template","trim","trimEnd","trimStart","uniqueId","words"],2:["add","after","ary","assign","at","before","bind","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","extend","filter","find","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","merge","minBy","omit","omitBy","orderBy","overArgs","pad","padEnd","padStart","parseInt","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject"],
3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","getOr","inRange","intersectionBy","intersectionWith","isEqualWith","isMatchWith","mergeWith","pullAllBy","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","xorBy","xorWith","zipWith"],4:["fill","setWith"]},aryRearg:{2:[1,0],3:[2,1,0],4:[3,2,0,1]},iterateeRearg:{findKey:[1],findLastKey:[1],mapKeys:[1]},methodRearg:{clamp:[2,0,1],reduce:[2,0,1],reduceRight:[2,0,1],
set:[2,0,1],setWith:[3,1,2,0],slice:[2,0,1],transform:[2,0,1]},caps:[1,2,3,4],key:{curryN:"curry",curryRightN:"curryRight",getOr:"get"},mutate:{array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsDeep:!0,merge:!0,mergeWith:!0},set:{set:!0,setWith:!0}},placeholder:{bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},skipRearg:{assign:!0,assignIn:!0,concat:!0,defaults:!0,defaultsDeep:!0,
difference:!0,matchesProperty:!0,merge:!0,random:!0,range:!0,rangeRight:!0,zip:!0,zipObject:!0}}}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&(_=n(_.runInContext())),
t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){var r=arguments.length;if(!r)return i;for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n),
i}}function u(t,e,r,d){function f(t,e){e=F(e);for(var r=-1,n=e.length,i=M(Object(t)),a=i;null!=a&&++r<n;){var o=e[r],s=a[o];null!=s&&(a[o]=M(Object(s))),a=a[o]}return i}function h(t){return N.runInContext.convert(t)(void 0)}function y(t,e){var r=d;return function(n){var i=R?B:j,a=R?B[t]:e,o=w(w({},r),n);return u(i,t,a,o)}}function g(t,e){return v(t,function(t){return"function"==typeof t?i(t,e):t})}function m(t,e){return v(t,function(t){var r=e.length;return n(L(i(t,r),e),r)})}function v(t,e){return function(){
var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=I.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}}function x(t,e){t=p.aliasToReal[t]||t;var r,n=e,i=_[t];return i?n=i(e):I.immutable&&(l.array[t]?n=s(e,a):l.object[t]?n=s(e,o(e)):l.set[t]&&(n=s(e,f))),S(T,function(e){return S(p.aryMethod[e],function(i){if(t==i){var a=!R&&p.iterateeAry[t],o=p.iterateeRearg[t],s=p.methodSpread[t];return r=n,!I.fixed||!O&&p.skipFixed[t]||(r=void 0===s?C(r,e):D(r,s)),I.rearg&&e>1&&(k||!p.skipRearg[t])&&(r=L(r,p.methodRearg[t]||p.aryRearg[e])),
I.cap&&(o?r=m(r,o):a&&(r=g(r,a))),(b||I.curry&&e>1)&&(b&&console.log(b,t),r=q(r,e)),!1}}),!r}),r||(r=n),r==e&&(r=b?q(r,1):function(){return e.apply(this,arguments)}),r.convert=y(t,e),p.placeholder[t]&&(W=!0,r.placeholder=e.placeholder=E),r}var W,R="function"==typeof e,A=e===Object(e);if(A&&(d=r,r=e,e=void 0),null==r)throw new TypeError;d||(d={});var I={cap:"cap"in d?d.cap:!0,curry:"curry"in d?d.curry:!0,fixed:"fixed"in d?d.fixed:!0,immutable:"immutable"in d?d.immutable:!0,rearg:"rearg"in d?d.rearg:!0
},b="curry"in d&&d.curry,O="fixed"in d&&d.fixed,k="rearg"in d&&d.rearg,E=R?r:c,B=R?r.runInContext():void 0,j=R?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,spread:t.spread,toPath:t.toPath},C=j.ary,w=j.assign,M=j.clone,q=j.curry,S=j.forEach,P=j.isArray,z=j.isFunction,K=j.keys,L=j.rearg,D=j.spread,F=j.toPath,T=K(p.aryMethod),_={castArray:function(t){return function(){var e=arguments[0];
return P(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return I.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&r>=a?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!z(r))return t(r,Object(e));var n=[],i=[];return S(K(e),function(t){var a=e[t];z(a)&&(i.push(t),n.push(r.prototype[t]))}),t(r,Object(e)),S(i,function(t,e){var i=n[e];z(i)?r.prototype[t]=i:delete r.prototype[t]}),r}},runInContext:function(e){
return function(r){return u(t,e(r),d)}}};if(!A)return x(e,r);var N=r,V=[];return S(T,function(t){S(p.aryMethod[t],function(t){var e=N[p.remap[t]||t];e&&V.push([t,x(t,e)])})}),S(K(N),function(t){var e=N[t];if("function"==typeof e){for(var r=V.length;r--;)if(V[r][0]==t)return;e.convert=y(t,e),V.push([t,e])}}),S(V,function(t){N[t[0]]=t[1]}),N.convert=h,W&&(N.placeholder=E),S(K(N),function(t){S(p.realToAlias[t]||[],function(e){N[e]=N[t]})}),N}var p=r(2),l=p.mutate,c=r(3);t.exports=u},function(t,e){e.aliasToReal={
each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendWith:"assignInWith",first:"head",__:"placeholder",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",equals:"isEqual",identical:"eq",init:"initial",invertObj:"invert",juxt:"over",mapObj:"mapValues",omitAll:"omit",nAry:"ary",path:"get",
pathEq:"matchesProperty",pathOr:"getOr",pickAll:"pick",pipe:"flow",prop:"get",propOf:"propertyOf",propOr:"getOr",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},e.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words"],
2:["add","after","ary","assign","assignIn","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","minBy","multiply","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],
3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","getOr","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],
4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findIndex:1,findKey:1,findLast:1,findLastIndex:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInWith:[1,2,0],assignWith:[1,2,0],getOr:[2,1,0],isEqualWith:[1,2,0],
isMatchWith:[2,1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],updateWith:[3,1,2,0],zipWith:[1,2,0]},e.methodSpread={invokeArgs:2,invokeArgsMap:2,over:0,overArgs:1,overEvery:0,overSome:0,partial:1,partialRight:1,without:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,
assignWith:!0,defaults:!0,defaultsDeep:!0,merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={curryN:"curry",curryRightN:"curryRight",getOr:"get",invokeArgs:"invoke",invokeArgsMap:"invokeMap",padChars:"pad",padCharsEnd:"padEnd",
padCharsStart:"padStart",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,without:!0,zip:!0,zipObject:!0
}},function(t,e){t.exports={}}])});

4315
dist/lodash.js vendored

File diff suppressed because it is too large Load Diff

233
dist/lodash.min.js vendored
View File

@@ -1,118 +1,123 @@
/**
* @license
* lodash 4.0.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* lodash 4.8.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
* Build: `lodash -o ./dist/lodash.js`
*/
;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r?r.length:0){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););return n}function u(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function o(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 i(n,t){return!!n.length&&-1<v(n,t,0)}function f(n,t,r){for(var e=-1,u=n.length;++e<u;)if(r(t,n[e]))return true;return false}function c(n,t){for(var r=-1,e=n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(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 s(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 h(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;
return false}function p(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(f===Z?i===i:r(i,f)))var f=i,c=o}return c}function _(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 g(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 v(n,t,r){if(t!==t)return W(n,r);--r;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function d(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function y(n,t){
var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function b(n,t){for(var r,e=-1,u=n.length;++e<u;){var o=t(n[e]);o!==Z&&(r=r===Z?o:r+o)}return r}function x(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function m(n,t){return c(t,function(t){return[t,n[t]]})}function j(n){return function(t){return n(t)}}function w(n,t){return c(t,function(t){return n[t]})}function A(n,t){for(var r=-1,e=n.length;++r<e&&-1<v(t,n[r],0););return r}function O(n,t){for(var r=n.length;r--&&-1<v(t,n[r],0););
return r}function E(n){return n&&n.Object===Object?n:null}function k(n,t){if(n!==t){var r=null===n,e=n===Z,u=n===n,o=null===t,i=t===Z,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(t>n&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function I(n){return Un[n]}function R(n){return Bn[n]}function S(n){return"\\"+$n[n]}function W(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 C(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}
return t}function U(n,t){return n=typeof n=="number"||dn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function B(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function z(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function L(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]="__lodash_placeholder__",o[++u]=r);return o}function $(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function F(n){if(!n||!En.test(n))return n.length;
for(var t=On.lastIndex=0;On.test(n);)t++;return t}function M(n){return zn[n]}function N(E){function dn(n){if(_e(n)&&!Wo(n)&&!(n instanceof wn)){if(n instanceof jn)return n;if(tu.call(n,"__wrapped__"))return zr(n)}return new jn(n)}function mn(){}function jn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=Z}function wn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[];
}function Un(){}function Bn(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function zn(n){var t=-1,r=n?n.length:0;for(this.__data__=new Bn;++t<r;)this.push(n[t])}function Ln(n,t){var r=n.__data__;return kr(t)?(r=r.__data__,"__lodash_hash_undefined__"===(typeof t=="string"?r.string:r.hash)[t]):r.has(t)}function $n(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Nn(n,t){var r=Dn(n,t);return 0>r?false:(r==n.length-1?n.pop():du.call(n,r,1),
!0)}function Zn(n,t){var r=Dn(n,t);return 0>r?Z:n[r][1]}function Dn(n,t){for(var r=n.length;r--;)if(ue(n[r][0],t))return r;return-1}function qn(n,t,r){var e=Dn(n,t);0>e?n.push([t,r]):n[e][1]=r}function Pn(n,t,r,e){return n===Z||ue(n,Xe[r])&&!tu.call(e,r)?t:n}function Tn(n,t,r){(r!==Z&&!ue(n[t],r)||typeof t=="number"&&r===Z&&!(t in n))&&(n[t]=r)}function Vn(n,t,r){var e=n[t];(!ue(e,r)||ue(e,Xe[t])&&!tu.call(n,t)||r===Z&&!(t in n))&&(n[t]=r)}function Jn(n,t){return n&&Tt(t,Ce(t),n)}function Yn(n,t){
for(var r=-1,e=null==n,u=t.length,o=Array(u);++r<u;)o[r]=e?Z:Re(n,t[r]);return o}function Hn(n,t,r){return n===n&&(r!==Z&&(n=n>r?r:n),t!==Z&&(n=t>n?t:n)),n}function Qn(n,t,r,u,o,i){var f;if(r&&(f=o?r(n,u,o,i):r(n)),f!==Z)return f;if(!pe(n))return n;if(u=Wo(n)){if(f=mr(n),!t)return Pt(n,f)}else{var c=br(n),a="[object Function]"==c||"[object GeneratorFunction]"==c;if("[object Object]"!=c&&"[object Arguments]"!=c&&(!a||o))return Cn[c]?wr(n,c,t):o?n:{};if(C(n))return o?n:{};if(f=jr(a?{}:n),!t)return Gt(n,Jn(f,n));
}return i||(i=new $n),(o=i.get(n))?o:(i.set(n,f),(u?e:it)(n,function(e,u){Vn(f,u,Qn(e,t,r,u,n,i))}),u?f:Gt(n,f))}function Xn(n){var t=Ce(n),r=t.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=t[u],i=n[o],f=e[o];if(f===Z&&!(o in Object(e))||!i(f))return false}return true}}function nt(n,t,r){if(typeof n!="function")throw new He("Expected a function");return vu(function(){n.apply(Z,r)},t)}function tt(n,t,r,e){var u=-1,o=i,a=true,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,j(r))),
e?(o=f,a=false):t.length>=200&&(o=Ln,a=false,t=new zn(t));n:for(;++u<l;){var p=n[u],_=r?r(p):p;if(a&&_===_){for(var g=h;g--;)if(t[g]===_)continue n;s.push(p)}else o(t,_,e)||s.push(p)}return s}function rt(n,t){var r=true;return Nu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function et(n,t){var r=[];return Nu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ut(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++u<o;){var i=n[u];ce(i)&&(r||Wo(i)||ie(i))?t?ut(i,t,r,e):a(e,i):r||(e[e.length]=i)}return e}function ot(n,t){
null==n||Du(n,t,Ue)}function it(n,t){return n&&Du(n,t,Ce)}function ft(n,t){return n&&qu(n,t,Ce)}function ct(n,t){return o(t,function(t){return le(n[t])})}function at(n,t){t=Er(t,n)?[t+""]:Lt(t);for(var r=0,e=t.length;null!=n&&e>r;)n=n[t[r++]];return r&&r==e?n:Z}function lt(n,t){return tu.call(n,t)||typeof n=="object"&&t in n&&null===hu(n)}function st(n,t){return t in Object(n)}function ht(n,t,r){for(var e=r?f:i,u=n.length,o=u,a=Array(u),l=[];o--;){var s=n[o];o&&t&&(s=c(s,j(t))),a[o]=r||!t&&120>s.length?Z:new zn(o&&s);
}var s=n[0],h=-1,p=s.length,_=a[0];n:for(;++h<p;){var g=s[h],v=t?t(g):g;if(_?!Ln(_,v):!e(l,v,r)){for(o=u;--o;){var d=a[o];if(d?!Ln(d,v):!e(n[o],v,r))continue n}_&&_.push(v),l.push(g)}}return l}function pt(n,t,e){return Er(t,n)||(t=Lt(t),n=Wr(n,t),t=Mr(t)),t=null==n?n:n[t],null==t?Z:r(t,n,e)}function _t(n,t,r,e,u){if(n===t)n=true;else if(null==n||null==t||!pe(n)&&!_e(t))n=n!==n&&t!==t;else n:{var o=Wo(n),i=Wo(t),f="[object Array]",c="[object Array]";o||(f=br(n),"[object Arguments]"==f?f="[object Object]":"[object Object]"!=f&&(o=me(n))),
i||(c=br(t),"[object Arguments]"==c?c="[object Object]":"[object Object]"!=c&&me(t));var a="[object Object]"==f&&!C(n),i="[object Object]"==c&&!C(t),c=f==c;if(!c||o||a){if(!(2&e)&&(f=a&&tu.call(n,"__wrapped__"),i=i&&tu.call(t,"__wrapped__"),f||i)){n=_t(f?n.value():n,i?t.value():t,r,e,u);break n}c?(u||(u=new $n),n=(o?hr:_r)(n,t,_t,r,e,u)):n=false}else n=pr(n,t,f,_t,r,e)}return n}function gt(n,t,r,e){var u=r.length,o=u,i=!e;if(null==n)return!o;for(n=Object(n);u--;){var f=r[u];if(i&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false;
}for(;++u<o;){var f=r[u],c=f[0],a=n[c],l=f[1];if(i&&f[2]){if(a===Z&&!(c in n))return false}else if(f=new $n,c=e?e(a,l,c,n,t,f):Z,c===Z?!_t(l,a,e,3,f):!c)return false}return true}function vt(n){var t=typeof n;return"function"==t?n:null==n?Ne:"object"==t?Wo(n)?xt(n[0],n[1]):bt(n):Te(n)}function dt(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function yt(n,t){var r=-1,e=fe(n)?Array(n.length):[];return Nu(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function bt(n){var t=dr(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!==Z||r in Object(n))}}return function(r){return r===n||gt(r,n,t)}}function xt(n,t){return function(r){var e=Re(r,n);return e===Z&&e===t?We(r,n):_t(t,e,Z,3)}}function mt(n,t,r,u,o){if(n!==t){var i=Wo(t)||me(t)?Z:Ue(t);e(i||t,function(e,f){if(i&&(f=e,e=t[f]),pe(e)){o||(o=new $n);var c=f,a=o,l=n[c],s=t[c],h=a.get(s)||a.get(l);if(h)Tn(n,c,h);else{var h=u?u(l,s,c+"",n,t,a):Z,p=h===Z;p&&(h=s,Wo(s)||me(s)?h=Wo(l)?r?Pt(l):l:ce(l)?Pt(l):Qn(s):de(s)||ie(s)?h=ie(l)?ke(l):!pe(l)||r&&le(l)?Qn(s):r?Qn(l):l:p=false),
a.set(s,h),p&&mt(h,s,r,u,a),Tn(n,c,h)}}else c=u?u(n[f],e,f+"",n,t,o):Z,c===Z&&(c=e),Tn(n,f,c)})}}function jt(n,t,r){var e=-1,u=vr();return t=c(t.length?t:Array(1),function(n){return u(n)}),n=yt(n,function(n){return{a:c(t,function(t){return t(n)}),b:++e,c:n}}),y(n,function(n,t){var e;n:{e=-1;for(var u=n.a,o=t.a,i=u.length,f=r.length;++e<i;){var c=k(u[e],o[e]);if(c){e=f>e?c*("desc"==r[e]?-1:1):c;break n}}e=n.b-t.b}return e})}function wt(n,t){return n=Object(n),l(t,function(t,r){return r in n&&(t[r]=n[r]),
t},{})}function At(n,t){var r={};return ot(n,function(n,e){t(n,e)&&(r[e]=n)}),r}function Ot(n){return function(t){return null==t?Z:t[n]}}function Et(n){return function(t){return at(t,n)}}function kt(n,t,r){var e=-1,u=t.length,o=n;for(r&&(o=c(n,function(n){return r(n)}));++e<u;)for(var i=0,f=t[e],f=r?r(f):f;-1<(i=v(o,f,i));)o!==n&&du.call(o,i,1),du.call(n,i,1);return n}function It(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(e==r||u!=o){var o=u;if(U(u))du.call(n,u,1);else if(Er(u,n))delete n[u];else{
var u=Lt(u),i=Wr(n,u);null!=i&&delete i[Mr(u)]}}}}function Rt(n,t){return n+bu(Eu()*(t-n+1))}function St(n,t,r,e){t=Er(t,n)?[t+""]:Lt(t);for(var u=-1,o=t.length,i=o-1,f=n;null!=f&&++u<o;){var c=t[u];if(pe(f)){var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):Z;a===Z&&(a=null==l?U(t[u+1])?[]:{}:l)}Vn(f,c,a)}f=f[c]}return n}function Wt(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(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 Ut(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=n[o];(r?t>=i:t>i)&&null!==i?e=o+1:u=o}return u}return Bt(n,t,Ne,r)}function Bt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=null===t,c=t===Z;o>u;){var a=bu((u+o)/2),l=r(n[a]),s=l!==Z,h=l===l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null==l?0:e?t>=l:t>l)?u=a+1:o=a}return Au(o,4294967294)}function zt(n,t){for(var r=0,e=n.length,u=n[0],o=t?t(u):u,i=o,f=0,c=[u];++r<e;)u=n[r],
o=t?t(u):u,ue(o,i)||(i=o,c[++f]=u);return c}function Lt(n){return Wo(n)?n:Cr(n)}function $t(n,t,r){var e=-1,u=i,o=n.length,c=true,a=[],l=a;if(r)c=false,u=f;else if(o<200)l=t?[]:a;else{if(u=t?null:Tu(n))return $(u);c=false,u=Ln,l=new zn}n:for(;++e<o;){var s=n[e],h=t?t(s):s;if(c&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function Ft(n,t,r,e){for(var u=n.length,o=e?u:-1;(e?o--:++o<u)&&t(n[o],o,n););return r?Wt(n,e?0:o,e?o+1:u):Wt(n,e?o+1:0,e?u:o);
}function Mt(n,t){var r=n;return r instanceof wn&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function Nt(n,t,r){for(var e=-1,u=n.length;++e<u;)var o=o?a(tt(o,n[e],t,r),tt(n[e],o,t,r)):n[e];return o&&o.length?$t(o,t,r):[]}function Zt(n){var t=new n.constructor(n.byteLength);return new au(t).set(new au(n)),t}function Dt(n,t,r){for(var e=r.length,u=-1,o=wu(n.length-e,0),i=-1,f=t.length,c=Array(f+o);++i<f;)c[i]=t[i];for(;++u<e;)c[r[u]]=n[u];for(;o--;)c[i++]=n[u++];
return c}function qt(n,t,r){for(var e=-1,u=r.length,o=-1,i=wu(n.length-u,0),f=-1,c=t.length,a=Array(i+c);++o<i;)a[o]=n[o];for(i=o;++f<c;)a[i+f]=t[f];for(;++e<u;)a[i+r[e]]=n[o++];return a}function Pt(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r<e;)t[r]=n[r];return t}function Tt(n,t,r){return Kt(n,t,r)}function Kt(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],f=e?e(r[i],n[i],i,r,n):n[i];Vn(r,i,f)}return r}function Gt(n,t){return Tt(n,Vu(n),t)}function Vt(n,t){return function(r,e){
var u=t?t():{};if(e=vr(e),Wo(r))for(var o=-1,i=r.length;++o<i;){var f=r[o];n(u,f,e(f),r)}else Nu(r,function(t,r,o){n(u,t,e(t),o)});return u}}function Jt(n){return ee(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:Z,i=u>2?r[2]:Z,o=typeof o=="function"?(u--,o):Z;for(i&&Or(r[0],r[1],i)&&(o=3>u?Z:o,u=1),t=Object(t);++e<u;)(i=r[e])&&n(t,i,e,o);return t})}function Yt(n,t){return function(r,e){if(null==r)return r;if(!fe(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););
return r}}function Ht(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var f=e[n?i:++u];if(false===r(o[f],f,o))break}return t}}function Qt(n,t,r){function e(){return(this&&this!==Kn&&this instanceof e?o:n).apply(u?r:this,arguments)}var u=1&t,o=tr(n);return e}function Xt(n){return function(t){t=Ie(t);var r=En.test(t)?t.match(On):Z,e=r?r[0]:t.charAt(0);return t=r?r.slice(1).join(""):t.slice(1),e[n]()+t}}function nr(n){return function(t){return l(Me($e(t)),n,"")}}function tr(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]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Mu(n.prototype),t=n.apply(r,t);return pe(t)?t:r}}function rr(n,t,e){function u(){for(var i=arguments.length,f=i,c=Array(i),a=this&&this!==Kn&&this instanceof u?o:n,l=u.placeholder;f--;)c[f]=arguments[f];
return f=3>i&&c[0]!==l&&c[i-1]!==l?[]:L(c,l),i-=f.length,e>i?ar(n,t,ur,l,Z,c,f,Z,Z,e-i):r(a,this,c)}var o=tr(n);return u}function er(n){return ee(function(t){t=ut(t);var r=t.length,e=r,u=jn.prototype.thru;for(n&&t.reverse();e--;){var o=t[e];if(typeof o!="function")throw new He("Expected a function");if(u&&!i&&"wrapper"==gr(o))var i=new jn([],true)}for(e=i?e:r;++e<r;)var o=t[e],u=gr(o),f="wrapper"==u?Ku(o):Z,i=f&&Ir(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[gr(f[0])].apply(i,f[3]):1==o.length&&Ir(o)?i[u]():i.thru(o);
return function(){var n=arguments,e=n[0];if(i&&1==n.length&&Wo(e)&&e.length>=200)return i.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function ur(n,t,r,e,u,o,i,f,c,a){function l(){for(var y=arguments.length,b=y,x=Array(y);b--;)x[b]=arguments[b];if(e&&(x=Dt(x,e,u)),o&&(x=qt(x,o,i)),_||g){var b=l.placeholder,m=L(x,b),y=y-m.length;if(a>y)return ar(n,t,ur,b,r,x,m,f,c,a-y)}if(y=h?r:this,b=p?y[n]:n,f)for(var m=x.length,j=Au(f.length,m),w=Pt(x);j--;){var A=f[j];
x[j]=U(A,m)?w[A]:Z}else v&&x.length>1&&x.reverse();return s&&x.length>c&&(x.length=c),this&&this!==Kn&&this instanceof l&&(b=d||tr(b)),b.apply(y,x)}var s=128&t,h=1&t,p=2&t,_=8&t,g=16&t,v=512&t,d=p?Z:tr(n);return l}function or(n){return ee(function(t){return t=c(ut(t),vr()),ee(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function ir(n,t,r){return t=Ae(t),n=F(n),t&&t>n?(t-=n,r=r===Z?" ":r+"",n=Fe(r,yu(t/F(r))),En.test(r)?n.match(On).slice(0,t).join(""):n.slice(0,t)):""}function fr(n,t,e,u){
function o(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Kn&&this instanceof o?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,i?e:this,s)}var i=1&t,f=tr(n);return o}function cr(n){return function(t,r,e){e&&typeof e!="number"&&Or(t,r,e)&&(r=e=Z),t=Ee(t),t=t===t?t:0,r===Z?(r=t,t=0):r=Ee(r)||0,e=e===Z?r>t?1:-1:Ee(e)||0;var u=-1;r=wu(yu((r-t)/(e||1)),0);for(var o=Array(r);r--;)o[n?r:++u]=t,t+=e;return o}}function ar(n,t,r,e,u,o,i,f,c,a){var l=8&t;f=f?Pt(f):Z;
var s=l?i:Z;i=l?Z:i;var h=l?o:Z;return o=l?Z:o,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),t=[n,t,u,h,s,o,i,f,c,a],r=r.apply(Z,t),Ir(n)&&Ju(r,t),r.placeholder=e,r}function lr(n){var t=Je[n];return function(n,r){if(n=Ee(n),r=Ae(r)){var e=(Ie(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(Ie(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function sr(n,t,r,e,u,o,i,f){var c=2&t;if(!c&&typeof n!="function")throw new He("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=Z),i=i===Z?i:wu(Ae(i),0),
f=f===Z?f:Ae(f),a-=u?u.length:0,64&t){var l=e,s=u;e=u=Z}var h=c?Z:Ku(n);return o=[n,t,r,e,u,l,s,o,i,f],h&&(r=o[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&h[8]>=o[7].length||384==n&&h[8]>=h[7].length&&8==r,131>t||e)&&(1&n&&(o[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?Dt(e,r,h[4]):Pt(r),o[4]=e?L(o[3],"__lodash_placeholder__"):Pt(h[4])),(r=h[5])&&(e=o[5],o[5]=e?qt(e,r,h[6]):Pt(r),o[6]=e?L(o[5],"__lodash_placeholder__"):Pt(h[6])),(r=h[7])&&(o[7]=Pt(r)),128&n&&(o[8]=null==o[8]?h[8]:Au(o[8],h[8])),
null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=t),n=o[0],t=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:n.length:wu(o[9]-a,0),!f&&24&t&&(t&=-25),(h?Pu:Ju)(t&&1!=t?8==t||16==t?rr(n,t,f):32!=t&&33!=t||u.length?ur.apply(Z,o):fr(n,t,r,e):Qt(n,t,r),o)}function hr(n,t,r,e,u,o){var i=-1,f=2&u,c=1&u,a=n.length,l=t.length;if(!(a==l||f&&l>a))return false;if(l=o.get(n))return l==t;for(l=true,o.set(n,t);++i<a;){var s=n[i],p=t[i];if(e)var _=f?e(p,s,i,t,n,o):e(s,p,i,n,t,o);if(_!==Z){if(_)continue;l=false;break}if(c){if(!h(t,function(n){
return s===n||r(s,n,e,u,o)})){l=false;break}}else if(s!==p&&!r(s,p,e,u,o)){l=false;break}}return o["delete"](n),l}function pr(n,t,r,e,u,o){switch(r){case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!e(new au(n),new au(t)))break;return true;case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var i=z;case"[object Set]":
return i||(i=$),(2&o||n.size==t.size)&&e(i(n),i(t),u,1|o);case"[object Symbol]":return!!cu&&Lu.call(n)==Lu.call(t)}return false}function _r(n,t,r,e,u,o){var i=2&u,f=Ce(n),c=f.length,a=Ce(t).length;if(c!=a&&!i)return false;for(var l=c;l--;){var s=f[l];if(!(i?s in t:lt(t,s)))return false}if(a=o.get(n))return a==t;a=true,o.set(n,t);for(var h=i;++l<c;){var s=f[l],p=n[s],_=t[s];if(e)var g=i?e(_,p,s,t,n,o):e(p,_,s,n,t,o);if(g===Z?p!==_&&!r(p,_,e,u,o):!g){a=false;break}h||(h="constructor"==s)}return a&&!h&&(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)&&(a=false)),o["delete"](n),a}function gr(n){for(var t=n.name+"",r=Fu[t],e=tu.call(Fu,t)?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}function vr(){var n=dn.iteratee||Ze,n=n===Ze?vt:n;return arguments.length?n(arguments[0],arguments[1]):n}function dr(n){n=Be(n);for(var t=n.length;t--;){var r=n[t][1];n[t][2]=r===r&&!pe(r)}return n}function yr(n,t){
var r=null==n?Z:n[t];return ge(r)?r:Z}function br(n){return uu.call(n)}function xr(n,t,r){if(null==n)return false;var e=r(n,t);return e||Er(t)||(t=Lt(t),n=Wr(n,t),null!=n&&(t=Mr(t),e=r(n,t))),e||he(n&&n.length)&&U(t,n.length)&&(Wo(n)||be(n)||ie(n))}function mr(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&tu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function jr(n){return n=n.constructor,Mu(le(n)?n.prototype:Z)}function wr(r,e,u){var o=r.constructor;switch(e){case"[object ArrayBuffer]":
return Zt(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return e=r.buffer,new r.constructor(u?Zt(e):e,r.byteOffset,r.length);case"[object Map]":return u=r.constructor,l(z(r),n,new u);case"[object Number]":case"[object String]":return new o(r);
case"[object RegExp]":return u=new r.constructor(r.source,sn.exec(r)),u.lastIndex=r.lastIndex,u;case"[object Set]":return u=r.constructor,l($(r),t,new u);case"[object Symbol]":return cu?Object(Lu.call(r)):{}}}function Ar(n){var t=n?n.length:Z;return he(t)&&(Wo(n)||be(n)||ie(n))?x(t,String):null}function Or(n,t,r){if(!pe(r))return false;var e=typeof t;return("number"==e?fe(r)&&U(t,r.length):"string"==e&&t in r)?ue(r[t],n):false}function Er(n,t){return typeof n=="number"?true:!Wo(n)&&(tn.test(n)||!nn.test(n)||null!=t&&n in Object(t));
}function kr(n){var t=typeof n;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!==n||null==n}function Ir(n){var t=gr(n),r=dn[t];return typeof r=="function"&&t in wn.prototype?n===r?true:(t=Ku(r),!!t&&n===t[0]):false}function Rr(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||Xe)}function Sr(n,t,r,e,u,o){return pe(n)&&pe(t)&&(o.set(t,n),mt(n,t,Z,Sr,o)),n}function Wr(n,t){return 1==t.length?n:Re(n,Wt(t,0,-1))}function Cr(n){var t=[];return Ie(n).replace(rn,function(n,r,e,u){
t.push(e?u.replace(an,"$1"):r||n)}),t}function Ur(n){return ce(n)?n:[]}function Br(n){return typeof n=="function"?n:Ne}function zr(n){if(n instanceof wn)return n.clone();var t=new jn(n.__wrapped__,n.__chain__);return t.__actions__=Pt(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Lr(n,t,r){var e=n?n.length:0;return e?(t=r||t===Z?1:Ae(t),Wt(n,0>t?0:t,e)):[]}function $r(n,t,r){var e=n?n.length:0;return e?(t=r||t===Z?1:Ae(t),t=e-t,Wt(n,0,0>t?0:t)):[]}function Fr(n){return n?n[0]:Z;
}function Mr(n){var t=n?n.length:0;return t?n[t-1]:Z}function Nr(n,t){return n&&n.length&&t&&t.length?kt(n,t):n}function Zr(n){return n?ku.call(n):n}function Dr(n){if(!n||!n.length)return[];var t=0;return n=o(n,function(n){return ce(n)?(t=wu(n.length,t),true):void 0}),x(t,function(t){return c(n,Ot(t))})}function qr(n,t){if(!n||!n.length)return[];var e=Dr(n);return null==t?e:c(e,function(n){return r(t,Z,n)})}function Pr(n){return n=dn(n),n.__chain__=true,n}function Tr(n,t){return t(n)}function Kr(){return this;
}function Gr(n,t){return typeof t=="function"&&Wo(n)?e(n,t):Nu(n,Br(t))}function Vr(n,t){var r;if(typeof t=="function"&&Wo(n)){for(r=n.length;r--&&false!==t(n[r],r,n););r=n}else r=Zu(n,Br(t));return r}function Jr(n,t){var r=-1,e=we(n),u=e.length,o=u-1;for(t=Hn(Ae(t),0,u);++r<t;){var u=Rt(r,o),i=e[u];e[u]=e[r],e[r]=i}return e.length=t,e}function Yr(n){if(null==n)return 0;if(fe(n)){var t=n.length;return t&&be(n)?F(n):t}return Ce(n).length}function Hr(n,t,r){return t=r?Z:t,t=n&&null==t?n.length:t,sr(n,128,Z,Z,Z,Z,t);
}function Qr(n,t){var r;if(typeof t!="function")throw new He("Expected a function");return n=Ae(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function Xr(n,t,r){return t=r?Z:t,n=sr(n,8,Z,Z,Z,Z,Z,t),n.placeholder=Xr.placeholder,n}function ne(n,t,r){return t=r?Z:t,n=sr(n,16,Z,Z,Z,Z,Z,t),n.placeholder=ne.placeholder,n}function te(n,t,r){function e(){p&&lu(p),a&&lu(a),g=0,c=a=h=p=_=Z}function u(t,r){r&&lu(r),a=p=_=Z,t&&(g=jo(),l=n.apply(h,c),p||a||(c=h=Z))}function o(){var n=t-(jo()-s);
0>=n||n>t?u(_,a):p=vu(o,n)}function i(){u(y,p)}function f(){if(c=arguments,s=jo(),h=this,_=y&&(p||!v),false===d)var r=v&&!p;else{a||v||(g=s);var e=d-(s-g),u=0>=e||e>d;u?(a&&(a=lu(a)),g=s,l=n.apply(h,c)):a||(a=vu(i,e))}return u&&p?p=lu(p):p||t===d||(p=vu(o,t)),r&&(u=true,l=n.apply(h,c)),!u||p||a||(c=h=Z),l}var c,a,l,s,h,p,_,g=0,v=false,d=false,y=true;if(typeof n!="function")throw new He("Expected a function");return t=Ee(t)||0,pe(r)&&(v=!!r.leading,d="maxWait"in r&&wu(Ee(r.maxWait)||0,t),y="trailing"in r?!!r.trailing:y),
f.cancel=e,f.flush=function(){return(p&&_||a&&y)&&(l=n.apply(h,c)),e(),l},f}function re(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new He("Expected a function");return r.cache=new re.Cache,r}function ee(n,t){if(typeof n!="function")throw new He("Expected a function");return t=wu(t===Z?n.length-1:Ae(t),0),function(){for(var e=arguments,u=-1,o=wu(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];
switch(t){case 0:return n.call(this,i);case 1:return n.call(this,e[0],i);case 2:return n.call(this,e[0],e[1],i)}for(o=Array(t+1),u=-1;++u<t;)o[u]=e[u];return o[t]=i,r(n,this,o)}}function ue(n,t){return n===t||n!==n&&t!==t}function oe(n,t){return n>t}function ie(n){return ce(n)&&tu.call(n,"callee")&&(!gu.call(n,"callee")||"[object Arguments]"==uu.call(n))}function fe(n){return null!=n&&!(typeof n=="function"&&le(n))&&he(Gu(n))}function ce(n){return _e(n)&&fe(n)}function ae(n){return _e(n)&&typeof n.message=="string"&&"[object Error]"==uu.call(n);
}function le(n){return n=pe(n)?uu.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function se(n){return typeof n=="number"&&n==Ae(n)}function he(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function pe(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function _e(n){return!!n&&typeof n=="object"}function ge(n){return null==n?false:le(n)?iu.test(nu.call(n)):_e(n)&&(C(n)?iu:gn).test(n)}function ve(n){return typeof n=="number"||_e(n)&&"[object Number]"==uu.call(n);
}function de(n){if(!_e(n)||"[object Object]"!=uu.call(n)||C(n))return false;var t=Xe;return typeof n.constructor=="function"&&(t=hu(n)),null===t?true:(n=t.constructor,typeof n=="function"&&n instanceof n&&nu.call(n)==eu)}function ye(n){return pe(n)&&"[object RegExp]"==uu.call(n)}function be(n){return typeof n=="string"||!Wo(n)&&_e(n)&&"[object String]"==uu.call(n)}function xe(n){return typeof n=="symbol"||_e(n)&&"[object Symbol]"==uu.call(n)}function me(n){return _e(n)&&he(n.length)&&!!Wn[uu.call(n)]}function je(n,t){
return t>n}function we(n){if(!n)return[];if(fe(n))return be(n)?n.match(On):Pt(n);if(_u&&n[_u])return B(n[_u]());var t=br(n);return("[object Map]"==t?z:"[object Set]"==t?$:ze)(n)}function Ae(n){if(!n)return 0===n?n:0;if(n=Ee(n),n===D||n===-D)return 1.7976931348623157e308*(0>n?-1:1);var t=n%1;return n===n?t?n-t:n:0}function Oe(n){return n?Hn(Ae(n),0,4294967295):0}function Ee(n){if(pe(n)&&(n=le(n.valueOf)?n.valueOf():n,n=pe(n)?n+"":n),typeof n!="string")return 0===n?n:+n;n=n.replace(on,"");var t=_n.test(n);
return t||vn.test(n)?Mn(n.slice(2),t?2:8):pn.test(n)?q:+n}function ke(n){return Tt(n,Ue(n))}function Ie(n){if(typeof n=="string")return n;if(null==n)return"";if(xe(n))return cu?$u.call(n):"";var t=n+"";return"0"==t&&1/n==-D?"-0":t}function Re(n,t,r){return n=null==n?Z:at(n,t),n===Z?r:n}function Se(n,t){return xr(n,t,lt)}function We(n,t){return xr(n,t,st)}function Ce(n){var t=Rr(n);if(!t&&!fe(n))return ju(Object(n));var r,e=Ar(n),u=!!e,e=e||[],o=e.length;for(r in n)!lt(n,r)||u&&("length"==r||U(r,o))||t&&"constructor"==r||e.push(r);
return e}function Ue(n){for(var t=-1,r=Rr(n),e=dt(n),u=e.length,o=Ar(n),i=!!o,o=o||[],f=o.length;++t<u;){var c=e[t];i&&("length"==c||U(c,f))||"constructor"==c&&(r||!tu.call(n,c))||o.push(c)}return o}function Be(n){return m(n,Ce(n))}function ze(n){return n?w(n,Ce(n)):[]}function Le(n){return Vo(Ie(n).toLowerCase())}function $e(n){return(n=Ie(n))&&n.replace(yn,I).replace(An,"")}function Fe(n,t){n=Ie(n),t=Ae(t);var r="";if(!n||1>t||t>9007199254740991)return r;do t%2&&(r+=n),t=bu(t/2),n+=n;while(t);return r;
}function Me(n,t,r){return n=Ie(n),t=r?Z:t,t===Z&&(t=Rn.test(n)?In:kn),n.match(t)||[]}function Ne(n){return n}function Ze(n){return _e(n)&&!Wo(n)?De(n):vt(n)}function De(n){return bt(Qn(n,true))}function qe(n,t,r){var u=Ce(t),o=ct(t,u);null!=r||pe(t)&&(o.length||!u.length)||(r=t,t=n,n=this,o=ct(t,Ce(t)));var i=pe(r)&&"chain"in r?r.chain:true,f=le(n);return e(o,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=Pt(this.__actions__)).push({
func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Pe(){}function Te(n){return Er(n)?Ot(n):Et(n)}function Ke(n){return n&&n.length?b(n,Ne):Z}E=E?Gn.defaults({},E,Gn.pick(Kn,Sn)):Kn;var Ge=E.Date,Ve=E.Error,Je=E.Math,Ye=E.RegExp,He=E.TypeError,Qe=E.Array.prototype,Xe=E.Object.prototype,nu=E.Function.prototype.toString,tu=Xe.hasOwnProperty,ru=0,eu=nu.call(Object),uu=Xe.toString,ou=Kn._,iu=Ye("^"+nu.call(tu).replace(en,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fu=E.f,cu=E.Symbol,au=E.Uint8Array,lu=E.clearTimeout,su=fu?fu.g:Z,hu=Object.getPrototypeOf,pu=Object.getOwnPropertySymbols,_u=typeof(_u=cu&&cu.iterator)=="symbol"?_u:Z,gu=Xe.propertyIsEnumerable,vu=E.setTimeout,du=Qe.splice,yu=Je.ceil,bu=Je.floor,xu=E.isFinite,mu=Qe.join,ju=Object.keys,wu=Je.max,Au=Je.min,Ou=E.parseInt,Eu=Je.random,ku=Qe.reverse,Iu=yr(E,"Map"),Ru=yr(E,"Set"),Su=yr(E,"WeakMap"),Wu=yr(Object,"create"),Cu=Su&&new Su,Uu=Iu?nu.call(Iu):"",Bu=Ru?nu.call(Ru):"",zu=cu?cu.prototype:Z,Lu=cu?zu.valueOf:Z,$u=cu?zu.toString:Z,Fu={};
dn.templateSettings={escape:H,evaluate:Q,interpolate:X,variable:"",imports:{_:dn}};var Mu=function(){function n(){}return function(t){if(pe(t)){n.prototype=t;var r=new n;n.prototype=Z}return r||{}}}(),Nu=Yt(it),Zu=Yt(ft,true),Du=Ht(),qu=Ht(true);su&&!gu.call({valueOf:1},"valueOf")&&(dt=function(n){return B(su(n))});var Pu=Cu?function(n,t){return Cu.set(n,t),n}:Ne,Tu=Ru&&2===new Ru([1,2]).size?function(n){return new Ru(n)}:Pe,Ku=Cu?function(n){return Cu.get(n)}:Pe,Gu=Ot("length"),Vu=pu||function(){return[];
};(Iu&&"[object Map]"!=br(new Iu)||Ru&&"[object Set]"!=br(new Ru))&&(br=function(n){var t=uu.call(n);if(n="[object Object]"==t?n.constructor:null,n=typeof n=="function"?nu.call(n):""){if(n==Uu)return"[object Map]";if(n==Bu)return"[object Set]"}return t});var Ju=function(){var n=0,t=0;return function(r,e){var u=jo(),o=16-(u-t);if(t=u,o>0){if(150<=++n)return r}else n=0;return Pu(r,e)}}(),Yu=ee(function(n,t){Wo(n)||(n=null==n?[]:[Object(n)]),t=ut(t);for(var r=n,e=t,u=-1,o=r.length,i=-1,f=e.length,c=Array(o+f);++u<o;)c[u]=r[u];
for(;++i<f;)c[u++]=e[i];return c}),Hu=ee(function(n,t){return ce(n)?tt(n,ut(t,false,true)):[]}),Qu=ee(function(n,t){var r=Mr(t);return ce(r)&&(r=Z),ce(n)?tt(n,ut(t,false,true),vr(r)):[]}),Xu=ee(function(n,t){var r=Mr(t);return ce(r)&&(r=Z),ce(n)?tt(n,ut(t,false,true),Z,r):[]}),no=ee(function(n){var t=c(n,Ur);return t.length&&t[0]===n[0]?ht(t):[]}),to=ee(function(n){var t=Mr(n),r=c(n,Ur);return t===Mr(r)?t=Z:r.pop(),r.length&&r[0]===n[0]?ht(r,vr(t)):[]}),ro=ee(function(n){var t=Mr(n),r=c(n,Ur);return t===Mr(r)?t=Z:r.pop(),
r.length&&r[0]===n[0]?ht(r,Z,t):[]}),eo=ee(Nr),uo=ee(function(n,t){t=c(ut(t),String);var r=Yn(n,t);return It(n,t.sort(k)),r}),oo=ee(function(n){return $t(ut(n,false,true))}),io=ee(function(n){var t=Mr(n);return ce(t)&&(t=Z),$t(ut(n,false,true),vr(t))}),fo=ee(function(n){var t=Mr(n);return ce(t)&&(t=Z),$t(ut(n,false,true),Z,t)}),co=ee(function(n,t){return ce(n)?tt(n,t):[]}),ao=ee(function(n){return Nt(o(n,ce))}),lo=ee(function(n){var t=Mr(n);return ce(t)&&(t=Z),Nt(o(n,ce),vr(t))}),so=ee(function(n){var t=Mr(n);return ce(t)&&(t=Z),
Nt(o(n,ce),Z,t)}),ho=ee(Dr),po=ee(function(n){var t=n.length,t=t>1?n[t-1]:Z,t=typeof t=="function"?(n.pop(),t):Z;return qr(n,t)}),_o=ee(function(n){function t(t){return Yn(t,n)}n=ut(n);var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return 1>=r&&!this.__actions__.length&&u instanceof wn&&U(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:Tr,args:[t],thisArg:Z}),new jn(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(Z),n})):this.thru(t)}),go=Vt(function(n,t,r){tu.call(n,r)?++n[r]:n[r]=1;
}),vo=Vt(function(n,t,r){tu.call(n,r)?n[r].push(t):n[r]=[t]}),yo=ee(function(n,t,e){var u=-1,o=typeof t=="function",i=Er(t),f=fe(n)?Array(n.length):[];return Nu(n,function(n){var c=o?t:i&&null!=n?n[t]:Z;f[++u]=c?r(c,n,e):pt(n,t,e)}),f}),bo=Vt(function(n,t,r){n[r]=t}),xo=Vt(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),mo=ee(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Or(n,t[0],t[1])?t=[]:r>2&&Or(t[0],t[1],t[2])&&(t.length=1),jt(n,ut(t),[])}),jo=Ge.now,wo=ee(function(n,t,r){
var e=1;if(r.length)var u=L(r,wo.placeholder),e=32|e;return sr(n,e,t,r,u)}),Ao=ee(function(n,t,r){var e=3;if(r.length)var u=L(r,Ao.placeholder),e=32|e;return sr(t,e,n,r,u)}),Oo=ee(function(n,t){return nt(n,1,t)}),Eo=ee(function(n,t,r){return nt(n,Ee(t)||0,r)}),ko=ee(function(n,t){t=c(ut(t),vr());var e=t.length;return ee(function(u){for(var o=-1,i=Au(u.length,e);++o<i;)u[o]=t[o].call(this,u[o]);return r(n,this,u)})}),Io=ee(function(n,t){var r=L(t,Io.placeholder);return sr(n,32,Z,t,r)}),Ro=ee(function(n,t){
var r=L(t,Ro.placeholder);return sr(n,64,Z,t,r)}),So=ee(function(n,t){return sr(n,256,Z,Z,Z,ut(t))}),Wo=Array.isArray,Co=Jt(function(n,t){Tt(t,Ce(t),n)}),Uo=Jt(function(n,t){Tt(t,Ue(t),n)}),Bo=Jt(function(n,t,r,e){Kt(t,Ue(t),n,e)}),zo=Jt(function(n,t,r,e){Kt(t,Ce(t),n,e)}),Lo=ee(function(n,t){return Yn(n,ut(t))}),$o=ee(function(n){return n.push(Z,Pn),r(Bo,Z,n)}),Fo=ee(function(n){return n.push(Z,Sr),r(Zo,Z,n)}),Mo=ee(pt),No=Jt(function(n,t,r){mt(n,t,r)}),Zo=Jt(function(n,t,r,e){mt(n,t,r,e)}),Do=ee(function(n,t){
return null==n?{}:(t=c(ut(t),String),wt(n,tt(Ue(n),t)))}),qo=ee(function(n,t){return null==n?{}:wt(n,ut(t))}),Po=nr(function(n,t,r){return t=t.toLowerCase(),n+(r?Le(t):t)}),To=nr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Ko=nr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Go=Xt("toLowerCase"),Vo=Xt("toUpperCase"),Jo=nr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Yo=nr(function(n,t,r){return n+(r?" ":"")+Le(t)}),Ho=nr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase();
}),Qo=ee(function(n,t){try{return r(n,Z,t)}catch(e){return ae(e)?e:new Ve(e)}}),Xo=ee(function(n,t){return e(ut(t),function(t){n[t]=wo(n[t],n)}),n}),ni=er(),ti=er(true),ri=ee(function(n,t){return function(r){return pt(r,n,t)}}),ei=ee(function(n,t){return function(r){return pt(n,r,t)}}),ui=or(c),oi=or(u),ii=or(h),fi=cr(),ci=cr(true),ai=lr("ceil"),li=lr("floor"),si=lr("round");return dn.prototype=mn.prototype,jn.prototype=Mu(mn.prototype),jn.prototype.constructor=jn,wn.prototype=Mu(mn.prototype),wn.prototype.constructor=wn,
Un.prototype=Wu?Wu(null):Xe,Bn.prototype.clear=function(){this.__data__={hash:new Un,map:Iu?new Iu:[],string:new Un}},Bn.prototype["delete"]=function(n){var t=this.__data__;return kr(n)?(t=typeof n=="string"?t.string:t.hash,n=(Wu?t[n]!==Z:tu.call(t,n))&&delete t[n]):n=Iu?t.map["delete"](n):Nn(t.map,n),n},Bn.prototype.get=function(n){var t=this.__data__;return kr(n)?(t=typeof n=="string"?t.string:t.hash,Wu?(n=t[n],n="__lodash_hash_undefined__"===n?Z:n):n=tu.call(t,n)?t[n]:Z):n=Iu?t.map.get(n):Zn(t.map,n),
n},Bn.prototype.has=function(n){var t=this.__data__;return kr(n)?(t=typeof n=="string"?t.string:t.hash,n=Wu?t[n]!==Z:tu.call(t,n)):n=Iu?t.map.has(n):-1<Dn(t.map,n),n},Bn.prototype.set=function(n,t){var r=this.__data__;return kr(n)?(typeof n=="string"?r.string:r.hash)[n]=Wu&&t===Z?"__lodash_hash_undefined__":t:Iu?r.map.set(n,t):qn(r.map,n,t),this},zn.prototype.push=function(n){var t=this.__data__;kr(n)?(t=t.__data__,(typeof n=="string"?t.string:t.hash)[n]="__lodash_hash_undefined__"):t.set(n,"__lodash_hash_undefined__");
},$n.prototype.clear=function(){this.__data__={array:[],map:null}},$n.prototype["delete"]=function(n){var t=this.__data__,r=t.array;return r?Nn(r,n):t.map["delete"](n)},$n.prototype.get=function(n){var t=this.__data__,r=t.array;return r?Zn(r,n):t.map.get(n)},$n.prototype.has=function(n){var t=this.__data__,r=t.array;return r?-1<Dn(r,n):t.map.has(n)},$n.prototype.set=function(n,t){var r=this.__data__,e=r.array;return e&&(199>e.length?qn(e,n,t):(r.array=null,r.map=new Bn(e))),(r=r.map)&&r.set(n,t),
this},re.Cache=Bn,dn.after=function(n,t){if(typeof t!="function")throw new He("Expected a function");return n=Ae(n),function(){return 1>--n?t.apply(this,arguments):void 0}},dn.ary=Hr,dn.assign=Co,dn.assignIn=Uo,dn.assignInWith=Bo,dn.assignWith=zo,dn.at=Lo,dn.before=Qr,dn.bind=wo,dn.bindAll=Xo,dn.bindKey=Ao,dn.chain=Pr,dn.chunk=function(n,t){t=wu(Ae(t),0);var r=n?n.length:0;if(!r||1>t)return[];for(var e=0,u=-1,o=Array(yu(r/t));r>e;)o[++u]=Wt(n,e,e+=t);return o},dn.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},dn.concat=Yu,dn.cond=function(n){var t=n?n.length:0,e=vr();return n=t?c(n,function(n){if("function"!=typeof n[1])throw new He("Expected a function");return[e(n[0]),n[1]]}):[],ee(function(e){for(var u=-1;++u<t;){var o=n[u];if(r(o[0],this,e))return r(o[1],this,e)}})},dn.conforms=function(n){return Xn(Qn(n,true))},dn.constant=function(n){return function(){return n}},dn.countBy=go,dn.create=function(n,t){var r=Mu(n);return t?Jn(r,t):r},dn.curry=Xr,dn.curryRight=ne,dn.debounce=te,
dn.defaults=$o,dn.defaultsDeep=Fo,dn.defer=Oo,dn.delay=Eo,dn.difference=Hu,dn.differenceBy=Qu,dn.differenceWith=Xu,dn.drop=Lr,dn.dropRight=$r,dn.dropRightWhile=function(n,t){return n&&n.length?Ft(n,vr(t,3),true,true):[]},dn.dropWhile=function(n,t){return n&&n.length?Ft(n,vr(t,3),true):[]},dn.fill=function(n,t,r,e){var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&Or(n,t,r)&&(r=0,e=u),u=n.length,r=Ae(r),0>r&&(r=-r>u?0:u+r),e=e===Z||e>u?u:Ae(e),0>e&&(e+=u),e=r>e?0:Oe(e);e>r;)n[r++]=t;return n},
dn.filter=function(n,t){return(Wo(n)?o:et)(n,vr(t,3))},dn.flatMap=function(n,t){return n&&n.length?ut(c(n,vr(t,3))):[]},dn.flatten=function(n){return n&&n.length?ut(n):[]},dn.flattenDeep=function(n){return n&&n.length?ut(n,true):[]},dn.flip=function(n){return sr(n,512)},dn.flow=ni,dn.flowRight=ti,dn.fromPairs=function(n){for(var t=-1,r=n?n.length:0,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e},dn.functions=function(n){return null==n?[]:ct(n,Ce(n))},dn.functionsIn=function(n){return null==n?[]:ct(n,Ue(n));
},dn.groupBy=vo,dn.initial=function(n){return $r(n,1)},dn.intersection=no,dn.intersectionBy=to,dn.intersectionWith=ro,dn.invert=function(n,t,r){return l(Ce(n),function(e,u){var o=n[u];return t&&!r?tu.call(e,o)?e[o].push(u):e[o]=[u]:e[o]=u,e},{})},dn.invokeMap=yo,dn.iteratee=Ze,dn.keyBy=bo,dn.keys=Ce,dn.keysIn=Ue,dn.map=function(n,t){return(Wo(n)?c:yt)(n,vr(t,3))},dn.mapKeys=function(n,t){var r={};return t=vr(t,3),it(n,function(n,e,u){r[t(n,e,u)]=n}),r},dn.mapValues=function(n,t){var r={};return t=vr(t,3),
it(n,function(n,e,u){r[e]=t(n,e,u)}),r},dn.matches=De,dn.matchesProperty=function(n,t){return xt(n,Qn(t,true))},dn.memoize=re,dn.merge=No,dn.mergeWith=Zo,dn.method=ri,dn.methodOf=ei,dn.mixin=qe,dn.negate=function(n){if(typeof n!="function")throw new He("Expected a function");return function(){return!n.apply(this,arguments)}},dn.nthArg=function(n){return n=Ae(n),function(){return arguments[n]}},dn.omit=Do,dn.omitBy=function(n,t){return t=vr(t,2),At(n,function(n,r){return!t(n,r)})},dn.once=function(n){
return Qr(2,n)},dn.orderBy=function(n,t,r,e){return null==n?[]:(Wo(t)||(t=null==t?[]:[t]),r=e?Z:r,Wo(r)||(r=null==r?[]:[r]),jt(n,t,r))},dn.over=ui,dn.overArgs=ko,dn.overEvery=oi,dn.overSome=ii,dn.partial=Io,dn.partialRight=Ro,dn.partition=xo,dn.pick=qo,dn.pickBy=function(n,t){return null==n?{}:At(n,vr(t,2))},dn.property=Te,dn.propertyOf=function(n){return function(t){return null==n?Z:at(n,t)}},dn.pull=eo,dn.pullAll=Nr,dn.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?kt(n,t,vr(r)):n},dn.pullAt=uo,
dn.range=fi,dn.rangeRight=ci,dn.rearg=So,dn.reject=function(n,t){var r=Wo(n)?o:et;return t=vr(t,3),r(n,function(n,r,e){return!t(n,r,e)})},dn.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],o=n.length;for(t=vr(t,3);++e<o;){var i=n[e];t(i,e,n)&&(r.push(i),u.push(e))}return It(n,u),r},dn.rest=ee,dn.reverse=Zr,dn.sampleSize=Jr,dn.set=function(n,t,r){return null==n?n:St(n,t,r)},dn.setWith=function(n,t,r,e){return e=typeof e=="function"?e:Z,null==n?n:St(n,t,r,e)},dn.shuffle=function(n){
return Jr(n,4294967295)},dn.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&Or(n,t,r)?(t=0,r=e):(t=null==t?0:Ae(t),r=r===Z?e:Ae(r)),Wt(n,t,r)):[]},dn.sortBy=mo,dn.sortedUniq=function(n){return n&&n.length?zt(n):[]},dn.sortedUniqBy=function(n,t){return n&&n.length?zt(n,vr(t)):[]},dn.split=function(n,t,r){return Ie(n).split(t,r)},dn.spread=function(n){if(typeof n!="function")throw new He("Expected a function");return function(t){return r(n,this,t)}},dn.tail=function(n){return Lr(n,1);
},dn.take=function(n,t,r){return n&&n.length?(t=r||t===Z?1:Ae(t),Wt(n,0,0>t?0:t)):[]},dn.takeRight=function(n,t,r){var e=n?n.length:0;return e?(t=r||t===Z?1:Ae(t),t=e-t,Wt(n,0>t?0:t,e)):[]},dn.takeRightWhile=function(n,t){return n&&n.length?Ft(n,vr(t,3),false,true):[]},dn.takeWhile=function(n,t){return n&&n.length?Ft(n,vr(t,3)):[]},dn.tap=function(n,t){return t(n),n},dn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new He("Expected a function");return pe(r)&&(e="leading"in r?!!r.leading:e,
u="trailing"in r?!!r.trailing:u),te(n,t,{leading:e,maxWait:t,trailing:u})},dn.thru=Tr,dn.toArray=we,dn.toPairs=Be,dn.toPairsIn=function(n){return m(n,Ue(n))},dn.toPath=function(n){return Wo(n)?c(n,String):Cr(n)},dn.toPlainObject=ke,dn.transform=function(n,t,r){var u=Wo(n)||me(n);if(t=vr(t,4),null==r)if(u||pe(n)){var o=n.constructor;r=u?Wo(n)?new o:[]:Mu(le(o)?o.prototype:Z)}else r={};return(u?e:it)(n,function(n,e,u){return t(r,n,e,u)}),r},dn.unary=function(n){return Hr(n,1)},dn.union=oo,dn.unionBy=io,
dn.unionWith=fo,dn.uniq=function(n){return n&&n.length?$t(n):[]},dn.uniqBy=function(n,t){return n&&n.length?$t(n,vr(t)):[]},dn.uniqWith=function(n,t){return n&&n.length?$t(n,Z,t):[]},dn.unset=function(n,t){var r;if(null==n)r=true;else{r=n;var e=t,e=Er(e,r)?[e+""]:Lt(e);r=Wr(r,e),e=Mr(e),r=null!=r&&Se(r,e)?delete r[e]:true}return r},dn.unzip=Dr,dn.unzipWith=qr,dn.values=ze,dn.valuesIn=function(n){return null==n?w(n,Ue(n)):[]},dn.without=co,dn.words=Me,dn.wrap=function(n,t){return t=null==t?Ne:t,Io(t,n);
},dn.xor=ao,dn.xorBy=lo,dn.xorWith=so,dn.zip=ho,dn.zipObject=function(n,t){for(var r=-1,e=n?n.length:0,u=t?t.length:0,o={};++r<e;)St(o,n[r],u>r?t[r]:Z);return o},dn.zipWith=po,dn.extend=Uo,dn.extendWith=Bo,qe(dn,dn),dn.add=function(n,t){var r;return n!==Z&&(r=n),t!==Z&&(r=r===Z?t:r+t),r},dn.attempt=Qo,dn.camelCase=Po,dn.capitalize=Le,dn.ceil=ai,dn.clamp=function(n,t,r){return r===Z&&(r=t,t=Z),r!==Z&&(r=Ee(r),r=r===r?r:0),t!==Z&&(t=Ee(t),t=t===t?t:0),Hn(Ee(n),t,r)},dn.clone=function(n){return Qn(n);
},dn.cloneDeep=function(n){return Qn(n,true)},dn.cloneDeepWith=function(n,t){return Qn(n,true,t)},dn.cloneWith=function(n,t){return Qn(n,false,t)},dn.deburr=$e,dn.endsWith=function(n,t,r){n=Ie(n),t=typeof t=="string"?t:t+"";var e=n.length;return r=r===Z?e:Hn(Ae(r),0,e),r-=t.length,r>=0&&n.indexOf(t,r)==r},dn.eq=ue,dn.escape=function(n){return(n=Ie(n))&&Y.test(n)?n.replace(V,R):n},dn.escapeRegExp=function(n){return(n=Ie(n))&&un.test(n)?n.replace(en,"\\$&"):n},dn.every=function(n,t,r){var e=Wo(n)?u:rt;return r&&Or(n,t,r)&&(t=Z),
e(n,vr(t,3))},dn.find=function(n,t){if(t=vr(t,3),Wo(n)){var r=g(n,t);return r>-1?n[r]:Z}return _(n,t,Nu)},dn.findIndex=function(n,t){return n&&n.length?g(n,vr(t,3)):-1},dn.findKey=function(n,t){return _(n,vr(t,3),it,true)},dn.findLast=function(n,t){if(t=vr(t,3),Wo(n)){var r=g(n,t,true);return r>-1?n[r]:Z}return _(n,t,Zu)},dn.findLastIndex=function(n,t){return n&&n.length?g(n,vr(t,3),true):-1},dn.findLastKey=function(n,t){return _(n,vr(t,3),ft,true)},dn.floor=li,dn.forEach=Gr,dn.forEachRight=Vr,dn.forIn=function(n,t){
return null==n?n:Du(n,Br(t),Ue)},dn.forInRight=function(n,t){return null==n?n:qu(n,Br(t),Ue)},dn.forOwn=function(n,t){return n&&it(n,Br(t))},dn.forOwnRight=function(n,t){return n&&ft(n,Br(t))},dn.get=Re,dn.gt=oe,dn.gte=function(n,t){return n>=t},dn.has=Se,dn.hasIn=We,dn.head=Fr,dn.identity=Ne,dn.includes=function(n,t,r,e){return n=fe(n)?n:ze(n),r=r&&!e?Ae(r):0,e=n.length,0>r&&(r=wu(e+r,0)),be(n)?e>=r&&-1<n.indexOf(t,r):!!e&&-1<v(n,t,r)},dn.indexOf=function(n,t,r){var e=n?n.length:0;return e?(r=Ae(r),
0>r&&(r=wu(e+r,0)),v(n,t,r)):-1},dn.inRange=function(n,t,r){return t=Ee(t)||0,r===Z?(r=t,t=0):r=Ee(r)||0,n=Ee(n),n>=Au(t,r)&&n<wu(t,r)},dn.invoke=Mo,dn.isArguments=ie,dn.isArray=Wo,dn.isArrayLike=fe,dn.isArrayLikeObject=ce,dn.isBoolean=function(n){return true===n||false===n||_e(n)&&"[object Boolean]"==uu.call(n)},dn.isDate=function(n){return _e(n)&&"[object Date]"==uu.call(n)},dn.isElement=function(n){return!!n&&1===n.nodeType&&_e(n)&&!de(n)},dn.isEmpty=function(n){return!_e(n)||le(n.splice)?!Yr(n):!Ce(n).length;
},dn.isEqual=function(n,t){return _t(n,t)},dn.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:Z)?r(n,t):Z;return e===Z?_t(n,t,r):!!e},dn.isError=ae,dn.isFinite=function(n){return typeof n=="number"&&xu(n)},dn.isFunction=le,dn.isInteger=se,dn.isLength=he,dn.isMatch=function(n,t){return n===t||gt(n,t,dr(t))},dn.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:Z,gt(n,t,dr(t),r)},dn.isNaN=function(n){return ve(n)&&n!=+n},dn.isNative=ge,dn.isNil=function(n){return null==n},dn.isNull=function(n){
return null===n},dn.isNumber=ve,dn.isObject=pe,dn.isObjectLike=_e,dn.isPlainObject=de,dn.isRegExp=ye,dn.isSafeInteger=function(n){return se(n)&&n>=-9007199254740991&&9007199254740991>=n},dn.isString=be,dn.isSymbol=xe,dn.isTypedArray=me,dn.isUndefined=function(n){return n===Z},dn.join=function(n,t){return n?mu.call(n,t):""},dn.kebabCase=To,dn.last=Mr,dn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(r!==Z&&(u=Ae(r),u=(0>u?wu(e+u,0):Au(u,e-1))+1),t!==t)return W(n,u,true);for(;u--;)if(n[u]===t)return u;
return-1},dn.lowerCase=Ko,dn.lowerFirst=Go,dn.lt=je,dn.lte=function(n,t){return t>=n},dn.max=function(n){return n&&n.length?p(n,Ne,oe):Z},dn.maxBy=function(n,t){return n&&n.length?p(n,vr(t),oe):Z},dn.mean=function(n){return Ke(n)/(n?n.length:0)},dn.min=function(n){return n&&n.length?p(n,Ne,je):Z},dn.minBy=function(n,t){return n&&n.length?p(n,vr(t),je):Z},dn.noConflict=function(){return Kn._===this&&(Kn._=ou),this},dn.noop=Pe,dn.now=jo,dn.pad=function(n,t,r){n=Ie(n),t=Ae(t);var e=F(n);return t&&t>e?(e=(t-e)/2,
t=bu(e),e=yu(e),ir("",t,r)+n+ir("",e,r)):n},dn.padEnd=function(n,t,r){return n=Ie(n),n+ir(n,t,r)},dn.padStart=function(n,t,r){return n=Ie(n),ir(n,t,r)+n},dn.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),n=Ie(n).replace(on,""),Ou(n,t||(hn.test(n)?16:10))},dn.random=function(n,t,r){if(r&&typeof r!="boolean"&&Or(n,t,r)&&(t=r=Z),r===Z&&(typeof t=="boolean"?(r=t,t=Z):typeof n=="boolean"&&(r=n,n=Z)),n===Z&&t===Z?(n=0,t=1):(n=Ee(n)||0,t===Z?(t=n,n=0):t=Ee(t)||0),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Eu(),
Au(n+r*(t-n+Fn("1e-"+((r+"").length-1))),t)):Rt(n,t)},dn.reduce=function(n,t,r){var e=Wo(n)?l:d,u=3>arguments.length;return e(n,vr(t,4),r,u,Nu)},dn.reduceRight=function(n,t,r){var e=Wo(n)?s:d,u=3>arguments.length;return e(n,vr(t,4),r,u,Zu)},dn.repeat=Fe,dn.replace=function(){var n=arguments,t=Ie(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},dn.result=function(n,t,r){if(Er(t,n))e=null==n?Z:n[t];else{t=Lt(t);var e=Re(n,t);n=Wr(n,t)}return e===Z&&(e=r),le(e)?e.call(n):e},dn.round=si,dn.runInContext=N,
dn.sample=function(n){n=fe(n)?n:ze(n);var t=n.length;return t>0?n[Rt(0,t-1)]:Z},dn.size=Yr,dn.snakeCase=Jo,dn.some=function(n,t,r){var e=Wo(n)?h:Ct;return r&&Or(n,t,r)&&(t=Z),e(n,vr(t,3))},dn.sortedIndex=function(n,t){return Ut(n,t)},dn.sortedIndexBy=function(n,t,r){return Bt(n,t,vr(r))},dn.sortedIndexOf=function(n,t){var r=n?n.length:0;if(r){var e=Ut(n,t);if(r>e&&ue(n[e],t))return e}return-1},dn.sortedLastIndex=function(n,t){return Ut(n,t,true)},dn.sortedLastIndexBy=function(n,t,r){return Bt(n,t,vr(r),true);
},dn.sortedLastIndexOf=function(n,t){if(n&&n.length){var r=Ut(n,t,true)-1;if(ue(n[r],t))return r}return-1},dn.startCase=Yo,dn.startsWith=function(n,t,r){return n=Ie(n),r=Hn(Ae(r),0,n.length),n.lastIndexOf(t,r)==r},dn.subtract=function(n,t){var r;return n!==Z&&(r=n),t!==Z&&(r=r===Z?t:r-t),r},dn.sum=Ke,dn.sumBy=function(n,t){return n&&n.length?b(n,vr(t)):Z},dn.template=function(n,t,r){var e=dn.templateSettings;r&&Or(n,t,r)&&(t=Z),n=Ie(n),t=Bo({},t,e,Pn),r=Bo({},t.imports,e.imports,Pn);var u,o,i=Ce(r),f=w(r,i),c=0;
r=t.interpolate||bn;var a="__p+='";r=Ye((t.escape||bn).source+"|"+r.source+"|"+(r===X?ln:bn).source+"|"+(t.evaluate||bn).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,i,f,l){return e||(e=i),a+=n.slice(c,l).replace(xn,S),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(P,""):a).replace(T,"$1").replace(K,"$1;"),
a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=Qo(function(){return Function(i,l+"return "+a).apply(Z,f)}),t.source=a,ae(t))throw t;return t},dn.times=function(n,t){if(n=Ae(n),1>n||n>9007199254740991)return[];var r=4294967295,e=Au(n,4294967295);for(t=Br(t),n-=4294967295,e=x(e,t);++r<n;)t(r);return e},dn.toInteger=Ae,dn.toLength=Oe,dn.toLower=function(n){
return Ie(n).toLowerCase()},dn.toNumber=Ee,dn.toSafeInteger=function(n){return Hn(Ae(n),-9007199254740991,9007199254740991)},dn.toString=Ie,dn.toUpper=function(n){return Ie(n).toUpperCase()},dn.trim=function(n,t,r){return(n=Ie(n))?r||t===Z?n.replace(on,""):(t+="")?(n=n.match(On),t=t.match(On),n.slice(A(n,t),O(n,t)+1).join("")):n:n},dn.trimEnd=function(n,t,r){return(n=Ie(n))?r||t===Z?n.replace(cn,""):(t+="")?(n=n.match(On),n.slice(0,O(n,t.match(On))+1).join("")):n:n},dn.trimStart=function(n,t,r){return(n=Ie(n))?r||t===Z?n.replace(fn,""):(t+="")?(n=n.match(On),
n.slice(A(n,t.match(On))).join("")):n:n},dn.truncate=function(n,t){var r=30,e="...";if(pe(t))var u="separator"in t?t.separator:u,r="length"in t?Ae(t.length):r,e="omission"in t?Ie(t.omission):e;n=Ie(n);var o=n.length;if(En.test(n))var i=n.match(On),o=i.length;if(r>=o)return n;if(o=r-F(e),1>o)return e;if(r=i?i.slice(0,o).join(""):n.slice(0,o),u===Z)return r+e;if(i&&(o+=r.length-o),ye(u)){if(n.slice(o).search(u)){var f=r;for(u.global||(u=Ye(u.source,Ie(sn.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;
r=r.slice(0,c===Z?o:c)}}else n.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},dn.unescape=function(n){return(n=Ie(n))&&J.test(n)?n.replace(G,M):n},dn.uniqueId=function(n){var t=++ru;return Ie(n)+t},dn.upperCase=Ho,dn.upperFirst=Vo,dn.each=Gr,dn.eachRight=Vr,dn.first=Fr,qe(dn,function(){var n={};return it(dn,function(t,r){tu.call(dn.prototype,r)||(n[r]=t)}),n}(),{chain:false}),dn.VERSION="4.0.1",e("bind bindKey curry curryRight partial partialRight".split(" "),function(n){dn[n].placeholder=dn;
}),e(["drop","take"],function(n,t){wn.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new wn(this);r=r===Z?1:wu(Ae(r),0);var u=this.clone();return e?u.__takeCount__=Au(r,u.__takeCount__):u.__views__.push({size:Au(r,4294967295),type:n+(0>u.__dir__?"Right":"")}),u},wn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),e(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;wn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({
iteratee:vr(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),e(["head","last"],function(n,t){var r="take"+(t?"Right":"");wn.prototype[n]=function(){return this[r](1).value()[0]}}),e(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");wn.prototype[n]=function(){return this.__filtered__?new wn(this):this[r](1)}}),wn.prototype.compact=function(){return this.filter(Ne)},wn.prototype.find=function(n){return this.filter(n).head()},wn.prototype.findLast=function(n){return this.reverse().find(n);
},wn.prototype.invokeMap=ee(function(n,t){return typeof n=="function"?new wn(this):this.map(function(r){return pt(r,n,t)})}),wn.prototype.reject=function(n){return n=vr(n,3),this.filter(function(t){return!n(t)})},wn.prototype.slice=function(n,t){n=Ae(n);var r=this;return r.__filtered__&&(n>0||0>t)?new wn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Z&&(t=Ae(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},wn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},wn.prototype.toArray=function(){
return this.take(4294967295)},it(wn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=dn[e?"take"+("last"==t?"Right":""):t],o=e||/^find/.test(t);u&&(dn.prototype[t]=function(){function t(n){return n=u.apply(dn,a([n],f)),e&&h?n[0]:n}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof wn,l=f[0],s=c||Wo(i);s&&r&&typeof l=="function"&&1!=l.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,l=o&&!h,c=c&&!p;return!o&&s?(i=c?i:new wn(this),
i=n.apply(i,f),i.__actions__.push({func:Tr,args:[t],thisArg:Z}),new jn(i,h)):l&&c?n.apply(this,f):(i=this.thru(t),l?e?i.value()[0]:i.value():i)})}),e("pop push shift sort splice unshift".split(" "),function(n){var t=Qe[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);dn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),it(wn.prototype,function(n,t){var r=dn[t];if(r){var e=r.name+"";(Fu[e]||(Fu[e]=[])).push({
name:t,func:r})}}),Fu[ur(Z,2).name]=[{name:"wrapper",func:Z}],wn.prototype.clone=function(){var n=new wn(this.__wrapped__);return n.__actions__=Pt(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Pt(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Pt(this.__views__),n},wn.prototype.reverse=function(){if(this.__filtered__){var n=new wn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},wn.prototype.value=function(){
var n,t=this.__wrapped__.value(),r=this.__dir__,e=Wo(t),u=0>r,o=e?t.length:0;n=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=Au(n,f+s);break;case"takeRight":f=wu(f,n-s)}}if(n={start:f,end:n},i=n.start,f=n.end,n=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=Au(n,this.__takeCount__),!e||200>o||o==n&&a==n)return Mt(t,this.__actions__);e=[];n:for(;n--&&a>c;){for(u+=r,o=-1,l=t[u];++o<f;){var h=i[o],s=h.type,h=(0,
h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue n;break n}}e[c++]=l}return e},dn.prototype.at=_o,dn.prototype.chain=function(){return Pr(this)},dn.prototype.commit=function(){return new jn(this.value(),this.__chain__)},dn.prototype.flatMap=function(n){return this.map(n).flatten()},dn.prototype.next=function(){this.__values__===Z&&(this.__values__=we(this.value()));var n=this.__index__>=this.__values__.length,t=n?Z:this.__values__[this.__index__++];return{done:n,value:t}},dn.prototype.plant=function(n){
for(var t,r=this;r instanceof mn;){var e=zr(r);e.__index__=0,e.__values__=Z,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},dn.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof wn?(this.__actions__.length&&(n=new wn(this)),n=n.reverse(),n.__actions__.push({func:Tr,args:[Zr],thisArg:Z}),new jn(n,this.__chain__)):this.thru(Zr)},dn.prototype.toJSON=dn.prototype.valueOf=dn.prototype.value=function(){return Mt(this.__wrapped__,this.__actions__)},_u&&(dn.prototype[_u]=Kr),
dn}var Z,D=1/0,q=NaN,P=/\b__p\+='';/g,T=/\b(__p\+=)''\+/g,K=/(__e\(.*?\)|\b__t\))\+'';/g,G=/&(?:amp|lt|gt|quot|#39|#96);/g,V=/[&<>"'`]/g,J=RegExp(G.source),Y=RegExp(V.source),H=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,nn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tn=/^\w*$/,rn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,en=/[\\^$.*+?()[\]{}|]/g,un=RegExp(en.source),on=/^\s+|\s+$/g,fn=/^\s+/,cn=/\s+$/,an=/\\(\\)?/g,ln=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,sn=/\w*$/,hn=/^0x/i,pn=/^[-+]0x[0-9a-f]+$/i,_n=/^0b[01]+$/i,gn=/^\[object .+?Constructor\]$/,vn=/^0o[0-7]+$/i,dn=/^(?:0|[1-9]\d*)$/,yn=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,bn=/($^)/,xn=/['\n\r\u2028\u2029\\]/g,mn="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",jn="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+mn,wn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",An=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),On=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+wn+mn,"g"),En=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),kn=/[a-zA-Z0-9]+/g,In=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|\\d+",jn].join("|"),"g"),Rn=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Sn="Array Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Wn={};
Wn["[object Float32Array]"]=Wn["[object Float64Array]"]=Wn["[object Int8Array]"]=Wn["[object Int16Array]"]=Wn["[object Int32Array]"]=Wn["[object Uint8Array]"]=Wn["[object Uint8ClampedArray]"]=Wn["[object Uint16Array]"]=Wn["[object Uint32Array]"]=true,Wn["[object Arguments]"]=Wn["[object Array]"]=Wn["[object ArrayBuffer]"]=Wn["[object Boolean]"]=Wn["[object Date]"]=Wn["[object Error]"]=Wn["[object Function]"]=Wn["[object Map]"]=Wn["[object Number]"]=Wn["[object Object]"]=Wn["[object RegExp]"]=Wn["[object Set]"]=Wn["[object String]"]=Wn["[object WeakMap]"]=false;
var Cn={};Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object Date]"]=Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object Symbol]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,
Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object WeakMap]"]=false;var Un={"\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"},Bn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},zn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Ln={"function":true,object:true},$n={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"
},Fn=parseFloat,Mn=parseInt,Nn=Ln[typeof exports]&&exports&&!exports.nodeType?exports:null,Zn=Ln[typeof module]&&module&&!module.nodeType?module:null,Dn=E(Ln[typeof self]&&self),qn=E(Ln[typeof window]&&window),Pn=Zn&&Zn.exports===Nn?Nn:null,Tn=E(Ln[typeof this]&&this),Kn=E(Nn&&Zn&&typeof global=="object"&&global)||qn!==(Tn&&Tn.window)&&qn||Dn||Tn||Function("return this")(),Gn=N();(qn||Dn||{})._=Gn,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Gn}):Nn&&Zn?(Pn&&((Zn.exports=Gn)._=Gn),
Nn._=Gn):Kn._=Gn}).call(this);
;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t.length;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t.length;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=-1,e=t.length;++r<e;)if(!n(t[r],r,t))return false;
return true}function i(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function f(t,n){return!!t.length&&-1<d(t,n,0)}function c(t,n,r){for(var e=-1,u=t.length;++e<u;)if(r(n,t[e]))return true;return false}function a(t,n){for(var r=-1,e=t.length,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function l(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function s(t,n,r,e){var u=-1,o=t.length;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function h(t,n,r,e){
var u=t.length;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function p(t,n){for(var r=-1,e=t.length;++r<e;)if(n(t[r],r,t))return true;return false}function _(t,n,r){for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===T?i===i:r(i,f)))var f=i,c=o}return c}function v(t,n,r,e){var u;return r(t,function(t,r,o){return n(t,r,o)?(u=e?r:t,false):void 0}),u}function g(t,n,r){for(var e=t.length,u=r?e:-1;r?u--:++u<e;)if(n(t[u],u,t))return u;return-1}function d(t,n,r){if(n!==n)return U(t,r);--r;for(var e=t.length;++r<e;)if(t[r]===n)return r;
return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;return-1}function b(t,n){var r=t?t.length:0;return r?m(t,n)/r:K}function x(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function j(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function m(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==T&&(r=r===T?o:r+o)}return r}function w(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function A(t,n){return a(n,function(n){return[n,t[n]];
})}function O(t){return function(n){return t(n)}}function k(t,n){return a(n,function(n){return t[n]})}function E(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function I(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function S(t){return t&&t.Object===Object?t:null}function R(t,n){if(t!==n){var r=null===t,e=t===T,u=t===t,o=null===n,i=n===T,f=n===n;if(t>n&&!o||!u||r&&!i&&f||e&&f)return 1;if(n>t&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function W(t){return function(n,r){var e;
return n===T&&r===T?0:(n!==T&&(e=n),r!==T&&(e=e===T?r:t(e,r)),e)}}function B(t){return Mt[t]}function C(t){return Lt[t]}function z(t){return"\\"+Ft[t]}function U(t,n,r){var e=t.length;for(n+=r?0:-1;r?n--:++n<e;){var u=t[n];if(u!==u)return n}return-1}function M(t){var n=false;if(null!=t&&typeof t.toString!="function")try{n=!!(t+"")}catch(r){}return n}function L(t,n){return t=typeof t=="number"||xt.test(t)?+t:-1,t>-1&&0==t%1&&(null==n?9007199254740991:n)>t}function $(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);
return r}function D(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function F(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];i!==n&&"__lodash_placeholder__"!==i||(t[r]="__lodash_placeholder__",o[u++]=r)}return o}function N(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function P(t){if(!t||!St.test(t))return t.length;for(var n=It.lastIndex=0;It.test(t);)n++;return n}function Z(t){return $t[t]}function q(S){function xt(t){if(Se(t)&&!Qo(t)&&!(t instanceof kt)){
if(t instanceof Ot)return t;if(vu.call(t,"__wrapped__"))return Jr(t)}return new Ot(t)}function At(){}function Ot(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=T}function kt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mt(){}function Lt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function $t(t){var n=-1,r=t?t.length:0;
for(this.__data__=new Lt;++n<r;)this.push(t[n])}function Dt(t,n){var r=t.__data__;return Pr(n)?(r=r.__data__,"__lodash_hash_undefined__"===(typeof n=="string"?r.string:r.hash)[n]):r.has(n)}function Ft(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Zt(t,n){var r=Vt(t,n);return 0>r?false:(r==t.length-1?t.pop():Bu.call(t,r,1),true)}function qt(t,n){var r=Vt(t,n);return 0>r?T:t[r][1]}function Vt(t,n){for(var r=t.length;r--;)if(be(t[r][0],n))return r;return-1}function Kt(t,n,r){
var e=Vt(t,n);0>e?t.push([n,r]):t[e][1]=r}function Gt(t,n,r,e){return t===T||be(t,pu[r])&&!vu.call(e,r)?n:t}function Ht(t,n,r){(r===T||be(t[n],r))&&(typeof n!="number"||r!==T||n in t)||(t[n]=r)}function Qt(t,n,r){var e=t[n];vu.call(t,n)&&be(e,r)&&(r!==T||n in t)||(t[n]=r)}function Xt(t,n,r,e){return fo(t,function(t,u,o){n(e,t,r(t),o)}),e}function tn(t,n){return t&&ur(n,Ke(n),t)}function nn(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++r<u;)o[r]=e?T:qe(t,n[r]);return o}function rn(t){return we(t)?t:[];
}function en(t){return typeof t=="string"||Ue(t)?t:t+""}function un(t){return Qo(t)?t:yo(t)}function on(t,n,r){return t===t&&(r!==T&&(t=t>r?r:t),n!==T&&(t=n>t?n:t)),t}function fn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==T)return c;if(!Ie(t))return t;if(o=Qo(t)){if(c=Mr(t),!n)return er(t,c)}else{var a=zr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(Xo(t))return Xn(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(M(t))return i?t:{};if(c=Lr(l?{}:t),!n)return ir(t,tn(c,t));
}else{if(!Ut[a])return i?t:{};c=$r(t,a,fn,n)}}if(f||(f=new Ft),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?bn(t,Ke,Cr):Ke(t);return u(s||t,function(u,o){s&&(o=u,u=t[o]),Qt(c,o,fn(u,n,r,e,o,t,f))}),c}function cn(t){var n=Ke(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===T&&!(o in Object(e))||!i(f))return false}return true}}function an(t){return Ie(t)?Su(t):{}}function ln(t,n,r){if(typeof t!="function")throw new su("Expected a function");return Wu(function(){
t.apply(T,r)},n)}function sn(t,n,r,e){var u=-1,o=f,i=true,l=t.length,s=[],h=n.length;if(!l)return s;r&&(n=a(n,O(r))),e?(o=c,i=false):n.length>=200&&(o=Dt,i=false,n=new $t(n));t:for(;++u<l;){var p=t[u],_=r?r(p):p;if(i&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else o(n,_,e)||s.push(p)}return s}function hn(t,n){var r=true;return fo(t,function(t,e,u){return r=!!n(t,e,u)}),r}function pn(t,n){var r=[];return fo(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function _n(t,n,r,e){e||(e=[]);for(var u=-1,o=t.length;++u<o;){
var i=t[u];n>0&&we(i)&&(r||Qo(i)||je(i))?n>1?_n(i,n-1,r,e):l(e,i):r||(e[e.length]=i)}return e}function vn(t,n){return t&&ao(t,n,Ke)}function gn(t,n){return t&&lo(t,n,Ke)}function dn(t,n){return i(n,function(n){return Oe(t[n])})}function yn(t,n){n=Nr(n,t)?[n]:un(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[n[r++]];return r&&r==e?t:T}function bn(t,n,r){return n=n(t),Qo(t)?n:l(n,r(t))}function xn(t,n){return vu.call(t,n)||typeof t=="object"&&n in t&&null===Uu(Object(t))}function jn(t,n){return n in Object(t);
}function mn(t,n,r){for(var e=r?c:f,u=t[0].length,o=t.length,i=o,l=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=a(p,O(n))),s=Fu(p.length,s),l[i]=r||!n&&(120>u||120>p.length)?T:new $t(i&&p)}var p=t[0],_=-1,v=l[0];t:for(;++_<u&&s>h.length;){var g=p[_],d=n?n(g):g;if(v?!Dt(v,d):!e(h,d,r)){for(i=o;--i;){var y=l[i];if(y?!Dt(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function wn(t,n,r){var e={};return vn(t,function(t,u,o){n(e,r(t),u,o)}),e}function An(t,n,e){return Nr(n,t)||(n=un(n),
t=Kr(t,n),n=Xr(n)),n=null==t?t:t[n],null==n?T:r(n,t,e)}function On(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!Ie(t)&&!Se(n))n=t!==t&&n!==n;else t:{var o=Qo(t),i=Qo(n),f="[object Array]",c="[object Array]";o||(f=zr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=zr(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!M(t),i="[object Object]"==c&&!M(n);if((c=f==c)&&!a)u||(u=new Ft),n=o||Me(t)?kr(t,n,On,r,e,u):Er(t,n,f,On,r,e,u);else{if(!(2&e)&&(o=a&&vu.call(t,"__wrapped__"),
f=i&&vu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new Ft),n=On(t,n,r,e,u);break t}if(c)n:if(u||(u=new Ft),o=2&e,f=Ke(t),i=f.length,c=Ke(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:xn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{c=true,u.set(t,n);for(var s=o;++a<i;){var l=f[a],h=t[l],p=n[l];if(r)var _=o?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===T?h!==p&&!On(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),
u["delete"](t),n=c}}else n=false;else n=false}}return n}function kn(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Object(t);u--;){var f=r[u];if(i&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false}for(;++u<o;){var f=r[u],c=f[0],a=t[c],l=f[1];if(i&&f[2]){if(a===T&&!(c in t))return false}else{if(f=new Ft,e)var s=e(a,l,c,t,n,f);if(s===T?!On(l,a,e,3,f):!s)return false}}return true}function En(t){return typeof t=="function"?t:null==t?ru:typeof t=="object"?Qo(t)?Wn(t[0],t[1]):Rn(t):iu(t)}function In(t){t=null==t?t:Object(t);
var n,r=[];for(n in t)r.push(n);return r}function Sn(t,n){var r=-1,e=me(t)?Array(t.length):[];return fo(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function Rn(t){var n=Rr(t);return 1==n.length&&n[0][2]?Tr(n[0][0],n[0][1]):function(r){return r===t||kn(r,t,n)}}function Wn(t,n){return Nr(t)&&n===n&&!Ie(n)?Tr(t,n):function(r){var e=qe(r,t);return e===T&&e===n?Ve(r,t):On(n,e,T,3)}}function Bn(t,n,r,e,o){if(t!==n){if(!Qo(n)&&!Me(n))var i=Ge(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),Ie(u)){o||(o=new Ft);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);
if(h)Ht(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):T,p=h===T;p&&(h=s,Qo(s)||Me(s)?Qo(l)?h=l:we(l)?h=er(l):(p=false,h=fn(s,true)):Be(s)||je(s)?je(l)?h=Pe(l):!Ie(l)||r&&Oe(l)?(p=false,h=fn(s,true)):h=l:p=false),a.set(s,h),p&&Bn(h,s,r,e,a),a["delete"](s),Ht(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):T,c===T&&(c=u),Ht(t,f,c)})}}function Cn(t,n,r){var e=-1;return n=a(n.length?n:[ru],Sr()),t=Sn(t,function(t){return{a:a(n,function(n){return n(t)}),b:++e,c:t}}),j(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e<i;){
var c=R(u[e],o[e]);if(c){e=f>e?c*("desc"==r[e]?-1:1):c;break t}}e=t.b-n.b}return e})}function zn(t,n){return t=Object(t),s(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function Un(t,n){for(var r=-1,e=bn(t,Ge,vo),u=e.length,o={};++r<u;){var i=e[r],f=t[i];n(f,i)&&(o[i]=f)}return o}function Mn(t){return function(n){return null==n?T:n[t]}}function Ln(t){return function(n){return yn(n,t)}}function $n(t,n,r,e){var u=e?y:d,o=-1,i=n.length,f=t;for(r&&(f=a(t,O(r)));++o<i;)for(var c=0,l=n[o],l=r?r(l):l;-1<(c=u(f,l,c,e));)f!==t&&Bu.call(f,c,1),
Bu.call(t,c,1);return t}function Dn(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(e==r||u!=o){var o=u;if(L(u))Bu.call(t,u,1);else if(Nr(u,t))delete t[u];else{var u=un(u),i=Kr(t,u);null!=i&&delete i[Xr(u)]}}}}function Fn(t,n){return t+zu(Pu()*(n-t+1))}function Nn(t,n){var r="";if(!t||1>n||n>9007199254740991)return r;do n%2&&(r+=t),(n=zu(n/2))&&(t+=t);while(n);return r}function Pn(t,n,r,e){n=Nr(n,t)?[n]:un(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){var c=n[u];if(Ie(f)){var a=r;if(u!=i){
var l=f[c],a=e?e(l,c,f):T;a===T&&(a=null==l?L(n[u+1])?[]:{}:l)}Qt(f,c,a)}f=f[c]}return t}function Zn(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e<u;)r[e]=t[e+n];return r}function qn(t,n){var r;return fo(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function Tn(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=t[o];(r?n>=i:n>i)&&null!==i?e=o+1:u=o}return u}return Vn(t,n,ru,r)}function Vn(t,n,r,e){
n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=n===T;o>u;){var a=zu((u+o)/2),l=r(t[a]),s=l!==T,h=l===l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null==l?0:e?n>=l:n>l)?u=a+1:o=a}return Fu(o,4294967294)}function Kn(t,n){for(var r=0,e=t.length,u=t[0],o=n?n(u):u,i=o,f=1,c=[u];++r<e;)u=t[r],o=n?n(u):u,be(o,i)||(i=o,c[f++]=u);return c}function Gn(t,n,r){var e=-1,u=f,o=t.length,i=true,a=[],l=a;if(r)i=false,u=c;else if(o<200)l=n?[]:a;else{if(u=n?null:ho(t))return N(u);i=false,u=Dt,l=new $t}t:for(;++e<o;){
var s=t[e],h=n?n(s):s;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;n&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function Jn(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?Zn(t,e?0:o,e?o+1:u):Zn(t,e?o+1:0,e?u:o)}function Yn(t,n){var r=t;return r instanceof kt&&(r=r.value()),s(n,function(t,n){return n.func.apply(n.thisArg,l([t],n.args))},r)}function Hn(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?l(sn(o,t[e],n,r),sn(t[e],o,n,r)):t[e];
return o&&o.length?Gn(o,n,r):[]}function Qn(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],o>e?n[e]:T);return i}function Xn(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function tr(t){var n=new t.constructor(t.byteLength);return new Au(n).set(new Au(t)),n}function nr(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Du(o-i,0),l=Array(c+a);for(e=!e;++f<c;)l[f]=n[f];for(;++u<i;)(e||o>u)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function rr(t,n,r,e){
var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Du(o-f,0),s=Array(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++i<f;)(e||o>u)&&(s[l+r[i]]=t[u++]);return s}function er(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n}function ur(t,n,r){return or(t,n,r)}function or(t,n,r,e){r||(r={});for(var u=-1,o=n.length;++u<o;){var i=n[u],f=e?e(r[i],t[i],i,r,t):t[i];Qt(r,i,f)}return r}function ir(t,n){return ur(t,Cr(t),n)}function fr(t,n){return function(r,u){var o=Qo(r)?e:Xt,i=n?n():{};
return o(r,t,Sr(u),i)}}function cr(t){return de(function(n,r){var e=-1,u=r.length,o=u>1?r[u-1]:T,i=u>2?r[2]:T,o=typeof o=="function"?(u--,o):T;for(i&&Fr(r[0],r[1],i)&&(o=3>u?T:o,u=1),n=Object(n);++e<u;)(i=r[e])&&t(n,i,e,o);return n})}function ar(t,n){return function(r,e){if(null==r)return r;if(!me(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Object(r);(n?o--:++o<u)&&false!==e(i[o],o,i););return r}}function lr(t){return function(n,r,e){var u=-1,o=Object(n);e=e(n);for(var i=e.length;i--;){var f=e[t?i:++u];
if(false===r(o[f],f,o))break}return n}}function sr(t,n,r){function e(){return(this&&this!==Jt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=_r(t);return e}function hr(t){return function(n){n=Ze(n);var r=St.test(n)?n.match(It):T,e=r?r[0]:n.charAt(0);return n=r?r.slice(1).join(""):n.slice(1),e[t]()+n}}function pr(t){return function(n){return s(tu(Xe(n)),t,"")}}function _r(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);
case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=an(t.prototype),n=t.apply(r,n);return Ie(n)?n:r}}function vr(t,n,e){function u(){for(var i=arguments.length,f=Array(i),c=i,a=Br(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:F(f,a),i-=c.length,e>i?wr(t,n,dr,u.placeholder,T,f,c,T,T,e-i):r(this&&this!==Jt&&this instanceof u?o:t,this,f);
}var o=_r(t);return u}function gr(t){return de(function(n){n=_n(n,1);var r=n.length,e=r,u=Ot.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new su("Expected a function");if(u&&!i&&"wrapper"==Ir(o))var i=new Ot([],true)}for(e=i?e:r;++e<r;)var o=n[e],u=Ir(o),f="wrapper"==u?po(o):T,i=f&&Zr(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[Ir(f[0])].apply(i,f[3]):1==o.length&&Zr(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&Qo(e)&&e.length>=200)return i.plant(e).value();
for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function dr(t,n,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=d,b=Array(d);y--;)b[y]=arguments[y];if(_){var x,j=Br(l),y=b.length;for(x=0;y--;)b[y]===j&&x++}if(e&&(b=nr(b,e,u,_)),o&&(b=rr(b,o,i,_)),d-=x,_&&a>d)return j=F(b,j),wr(t,n,dr,l.placeholder,r,b,j,f,c,a-d);if(j=h?r:this,y=p?j[t]:t,d=b.length,f){x=b.length;for(var m=Fu(f.length,x),w=er(b);m--;){var A=f[m];b[m]=L(A,x)?w[A]:T}}else v&&d>1&&b.reverse();return s&&d>c&&(b.length=c),
this&&this!==Jt&&this instanceof l&&(y=g||_r(y)),y.apply(j,b)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?T:_r(t);return l}function yr(t,n){return function(r,e){return wn(r,t,n(e))}}function br(t){return de(function(n){return n=a(n,Sr()),de(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function xr(t,n){n=n===T?" ":n+"";var r=n.length;return 2>r?r?Nn(n,t):n:(r=Nn(n,Cu(t/P(n))),St.test(n)?r.match(It).slice(0,t).join(""):r.slice(0,t))}function jr(t,n,e,u){function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Jt&&this instanceof o?f:t;++a<l;)s[a]=u[a];
for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=_r(t);return o}function mr(t){return function(n,r,e){e&&typeof e!="number"&&Fr(n,r,e)&&(r=e=T),n=Ne(n),n=n===n?n:0,r===T?(r=n,n=0):r=Ne(r)||0,e=e===T?r>n?1:-1:Ne(e)||0;var u=-1;r=Du(Cu((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function wr(t,n,r,e,u,o,i,f,c,a){var l=8&n;f=f?er(f):T;var s=l?i:T;i=l?T:i;var h=l?o:T;return o=l?T:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(T,n),
Zr(t)&&go(r,n),r.placeholder=e,r}function Ar(t){var n=au[t];return function(t,r){if(t=Ne(t),r=De(r)){var e=(Ze(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(Ze(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Or(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new su("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=T),i=i===T?i:Du(De(i),0),f=f===T?f:De(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=T}var h=c?T:po(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],
n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?nr(e,r,h[4]):er(r),o[4]=e?F(o[3],"__lodash_placeholder__"):er(h[4])),(r=h[5])&&(e=o[5],o[5]=e?rr(e,r,h[6]):er(r),o[6]=e?F(o[5],"__lodash_placeholder__"):er(h[6])),(r=h[7])&&(o[7]=er(r)),128&t&&(o[8]=null==o[8]?h[8]:Fu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Du(o[9]-a,0),
!f&&24&n&&(n&=-25),(h?so:go)(n&&1!=n?8==n||16==n?vr(t,n,f):32!=n&&33!=n||u.length?dr.apply(T,o):jr(t,n,r,e):sr(t,n,r),o)}function kr(t,n,r,e,u,o){var i=-1,f=2&u,c=1&u,a=t.length,l=n.length;if(!(a==l||f&&l>a))return false;if(l=o.get(t))return l==n;for(l=true,o.set(t,n);++i<a;){var s=t[i],h=n[i];if(e)var _=f?e(h,s,i,n,t,o):e(s,h,i,t,n,o);if(_!==T){if(_)continue;l=false;break}if(c){if(!p(n,function(t){return s===t||r(s,t,e,u,o)})){l=false;break}}else if(s!==h&&!r(s,h,e,u,o)){l=false;break}}return o["delete"](t),l}
function Er(t,n,r,e,u,o,i){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":if(t.byteLength!=n.byteLength||!e(new Au(t),new Au(n)))break;return true;case"[object Boolean]":case"[object Date]":return+t==+n;case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object Number]":return t!=+t?n!=+n:t==+n;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=D;case"[object Set]":
if(f||(f=N),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),kr(f(t),f(n),e,u,o,i));case"[object Symbol]":if(oo)return oo.call(t)==oo.call(n)}return false}function Ir(t){for(var n=t.name+"",r=Qu[n],e=vu.call(Qu,n)?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function Sr(){var t=xt.iteratee||eu,t=t===eu?En:t;return arguments.length?t(arguments[0],arguments[1]):t}function Rr(t){t=Je(t);for(var n=t.length;n--;){var r=t[n][1];t[n][2]=r===r&&!Ie(r)}return t;
}function Wr(t,n){var r=t[n];return Re(r)?r:T}function Br(t){return(vu.call(xt,"placeholder")?xt:t).placeholder}function Cr(t){return Eu(Object(t))}function zr(t){return yu.call(t)}function Ur(t,n,r){n=Nr(n,t)?[n]:un(n);for(var e,u=-1,o=n.length;++u<o;){var i=n[u];if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&Ee(o)&&L(i,o)&&(Qo(t)||ze(t)||je(t)))}function Mr(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&vu.call(t,"index")&&(r.index=t.index,r.input=t.input),
r}function Lr(t){return typeof t.constructor!="function"||qr(t)?{}:an(Uu(Object(t)))}function $r(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return tr(r);case"[object Boolean]":case"[object Date]":return new i(+r);case"[object DataView]":return e=o?tr(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":
case"[object Uint16Array]":case"[object Uint32Array]":return e=o?tr(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return e=o?u(D(r),true):D(r),s(e,t,new r.constructor);case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return e=new r.constructor(r.source,_t.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=o?u(N(r),true):N(r),s(e,n,new r.constructor);case"[object Symbol]":return oo?Object(oo.call(r)):{}}}function Dr(t){var n=t?t.length:T;
return Ee(n)&&(Qo(t)||ze(t)||je(t))?w(n,String):null}function Fr(t,n,r){if(!Ie(r))return false;var e=typeof n;return("number"==e?me(r)&&L(n,r.length):"string"==e&&n in r)?be(r[n],t):false}function Nr(t,n){var r=typeof t;return"number"==r||"symbol"==r?true:!Qo(t)&&(Ue(t)||ot.test(t)||!ut.test(t)||null!=n&&t in Object(n))}function Pr(t){var n=typeof t;return"number"==n||"boolean"==n||"string"==n&&"__proto__"!=t||null==t}function Zr(t){var n=Ir(t),r=xt[n];return typeof r=="function"&&n in kt.prototype?t===r?true:(n=po(r),
!!n&&t===n[0]):false}function qr(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||pu)}function Tr(t,n){return function(r){return null==r?false:r[t]===n&&(n!==T||t in Object(r))}}function Vr(t,n,r,e,u,o){return Ie(t)&&Ie(n)&&Bn(t,n,T,Vr,o.set(n,t)),t}function Kr(t,n){return 1==n.length?t:yn(t,Zn(n,0,-1))}function Gr(t){if(Oe(t))try{return _u.call(t)}catch(n){}return Ze(t)}function Jr(t){if(t instanceof kt)return t.clone();var n=new Ot(t.__wrapped__,t.__chain__);return n.__actions__=er(t.__actions__),
n.__index__=t.__index__,n.__values__=t.__values__,n}function Yr(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:De(n),Zn(t,0>n?0:n,e)):[]}function Hr(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:De(n),n=e-n,Zn(t,0,0>n?0:n)):[]}function Qr(t){return t?t[0]:T}function Xr(t){var n=t?t.length:0;return n?t[n-1]:T}function te(t,n){return t&&t.length&&n&&n.length?$n(t,n):t}function ne(t){return t?Zu.call(t):t}function re(t){if(!t||!t.length)return[];var n=0;return t=i(t,function(t){return we(t)?(n=Du(t.length,n),
!0):void 0}),w(n,function(n){return a(t,Mn(n))})}function ee(t,n){if(!t||!t.length)return[];var e=re(t);return null==n?e:a(e,function(t){return r(n,T,t)})}function ue(t){return t=xt(t),t.__chain__=true,t}function oe(t,n){return n(t)}function ie(){return this}function fe(t,n){return typeof n=="function"&&Qo(t)?u(t,n):fo(t,Sr(n))}function ce(t,n){var r;if(typeof n=="function"&&Qo(t)){for(r=t.length;r--&&false!==n(t[r],r,t););r=t}else r=co(t,Sr(n));return r}function ae(t,n){return(Qo(t)?a:Sn)(t,Sr(n,3))}function le(t,n,r){
var e=-1,u=$e(t),o=u.length,i=o-1;for(n=(r?Fr(t,n,r):n===T)?1:on(De(n),0,o);++e<n;)t=Fn(e,i),r=u[t],u[t]=u[e],u[e]=r;return u.length=n,u}function se(t,n,r){return n=r?T:n,n=t&&null==n?t.length:n,Or(t,128,T,T,T,T,n)}function he(t,n){var r;if(typeof n!="function")throw new su("Expected a function");return t=De(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=T),r}}function pe(t,n,r){return n=r?T:n,t=Or(t,8,T,T,T,T,T,n),t.placeholder=pe.placeholder,t}function _e(t,n,r){return n=r?T:n,
t=Or(t,16,T,T,T,T,T,n),t.placeholder=_e.placeholder,t}function ve(t,n,r){function e(n){var r=c,e=a;return c=a=T,p=n,l=t.apply(e,r)}function u(t){var r=t-h;return t-=p,!h||r>=n||0>r||false!==v&&t>=v}function o(){var t=Zo();if(u(t))return i(t);var r;r=t-p,t=n-(t-h),r=false===v?t:Fu(t,v-r),s=Wu(o,r)}function i(t){return Ou(s),s=T,g&&c?e(t):(c=a=T,l)}function f(){var t=Zo(),r=u(t);return c=arguments,a=this,h=t,r?s===T?(p=t=h,s=Wu(o,n),_?e(t):l):(Ou(s),s=Wu(o,n),e(h)):l}var c,a,l,s,h=0,p=0,_=false,v=false,g=true;if(typeof t!="function")throw new su("Expected a function");
return n=Ne(n)||0,Ie(r)&&(_=!!r.leading,v="maxWait"in r&&Du(Ne(r.maxWait)||0,n),g="trailing"in r?!!r.trailing:g),f.cancel=function(){s!==T&&Ou(s),h=p=0,c=a=s=T},f.flush=function(){return s===T?l:i(Zo())},f}function ge(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new su("Expected a function");return r.cache=new(ge.Cache||Lt),r}function de(t,n){if(typeof t!="function")throw new su("Expected a function");
return n=Du(n===T?t.length-1:De(n),0),function(){for(var e=arguments,u=-1,o=Du(e.length-n,0),i=Array(o);++u<o;)i[u]=e[n+u];switch(n){case 0:return t.call(this,i);case 1:return t.call(this,e[0],i);case 2:return t.call(this,e[0],e[1],i)}for(o=Array(n+1),u=-1;++u<n;)o[u]=e[u];return o[n]=i,r(t,this,o)}}function ye(){if(!arguments.length)return[];var t=arguments[0];return Qo(t)?t:[t]}function be(t,n){return t===n||t!==t&&n!==n}function xe(t,n){return t>n}function je(t){return we(t)&&vu.call(t,"callee")&&(!Ru.call(t,"callee")||"[object Arguments]"==yu.call(t));
}function me(t){return null!=t&&Ee(_o(t))&&!Oe(t)}function we(t){return Se(t)&&me(t)}function Ae(t){return Se(t)?"[object Error]"==yu.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function Oe(t){return t=Ie(t)?yu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function ke(t){return typeof t=="number"&&t==De(t)}function Ee(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t}function Ie(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Se(t){
return!!t&&typeof t=="object"}function Re(t){return Ie(t)?(Oe(t)||M(t)?xu:yt).test(Gr(t)):false}function We(t){return typeof t=="number"||Se(t)&&"[object Number]"==yu.call(t)}function Be(t){return!Se(t)||"[object Object]"!=yu.call(t)||M(t)?false:(t=Uu(Object(t)),null===t?true:(t=vu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&_u.call(t)==du))}function Ce(t){return Ie(t)&&"[object RegExp]"==yu.call(t)}function ze(t){return typeof t=="string"||!Qo(t)&&Se(t)&&"[object String]"==yu.call(t);
}function Ue(t){return typeof t=="symbol"||Se(t)&&"[object Symbol]"==yu.call(t)}function Me(t){return Se(t)&&Ee(t.length)&&!!zt[yu.call(t)]}function Le(t,n){return n>t}function $e(t){if(!t)return[];if(me(t))return ze(t)?t.match(It):er(t);if(Iu&&t[Iu])return $(t[Iu]());var n=zr(t);return("[object Map]"==n?D:"[object Set]"==n?N:He)(t)}function De(t){if(!t)return 0===t?t:0;if(t=Ne(t),t===V||t===-V)return 1.7976931348623157e308*(0>t?-1:1);var n=t%1;return t===t?n?t-n:t:0}function Fe(t){return t?on(De(t),0,4294967295):0;
}function Ne(t){if(typeof t=="number")return t;if(Ue(t))return K;if(Ie(t)&&(t=Oe(t.valueOf)?t.valueOf():t,t=Ie(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(at,"");var n=dt.test(t);return n||bt.test(t)?Pt(t.slice(2),n?2:8):gt.test(t)?K:+t}function Pe(t){return ur(t,Ge(t))}function Ze(t){if(typeof t=="string")return t;if(null==t)return"";if(Ue(t))return io?io.call(t):"";var n=t+"";return"0"==n&&1/t==-V?"-0":n}function qe(t,n,r){return t=null==t?T:yn(t,n),t===T?r:t}function Te(t,n){return null!=t&&Ur(t,n,xn);
}function Ve(t,n){return null!=t&&Ur(t,n,jn)}function Ke(t){var n=qr(t);if(!n&&!me(t))return $u(Object(t));var r,e=Dr(t),u=!!e,e=e||[],o=e.length;for(r in t)!xn(t,r)||u&&("length"==r||L(r,o))||n&&"constructor"==r||e.push(r);return e}function Ge(t){for(var n=-1,r=qr(t),e=In(t),u=e.length,o=Dr(t),i=!!o,o=o||[],f=o.length;++n<u;){var c=e[n];i&&("length"==c||L(c,f))||"constructor"==c&&(r||!vu.call(t,c))||o.push(c)}return o}function Je(t){return A(t,Ke(t))}function Ye(t){return A(t,Ge(t))}function He(t){
return t?k(t,Ke(t)):[]}function Qe(t){return ji(Ze(t).toLowerCase())}function Xe(t){return(t=Ze(t))&&t.replace(jt,B).replace(Et,"")}function tu(t,n,r){return t=Ze(t),n=r?T:n,n===T&&(n=Bt.test(t)?Wt:Rt),t.match(n)||[]}function nu(t){return function(){return t}}function ru(t){return t}function eu(t){return En(typeof t=="function"?t:fn(t,true))}function uu(t,n,r){var e=Ke(n),o=dn(n,e);null!=r||Ie(n)&&(o.length||!e.length)||(r=n,n=t,t=this,o=dn(n,Ke(n)));var i=Ie(r)&&"chain"in r?r.chain:true,f=Oe(t);return u(o,function(r){
var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=er(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,l([this.value()],arguments))})}),t}function ou(){}function iu(t){return Nr(t)?Mn(t):Ln(t)}S=S?Yt.defaults({},S,Yt.pick(Jt,Ct)):Jt;var fu=S.Date,cu=S.Error,au=S.Math,lu=S.RegExp,su=S.TypeError,hu=S.Array.prototype,pu=S.Object.prototype,_u=S.Function.prototype.toString,vu=pu.hasOwnProperty,gu=0,du=_u.call(Object),yu=pu.toString,bu=Jt._,xu=lu("^"+_u.call(vu).replace(ft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ju=Tt?S.Buffer:T,mu=S.Reflect,wu=S.Symbol,Au=S.Uint8Array,Ou=S.clearTimeout,ku=mu?mu.f:T,Eu=Object.getOwnPropertySymbols,Iu=typeof(Iu=wu&&wu.iterator)=="symbol"?Iu:T,Su=Object.create,Ru=pu.propertyIsEnumerable,Wu=S.setTimeout,Bu=hu.splice,Cu=au.ceil,zu=au.floor,Uu=Object.getPrototypeOf,Mu=S.isFinite,Lu=hu.join,$u=Object.keys,Du=au.max,Fu=au.min,Nu=S.parseInt,Pu=au.random,Zu=hu.reverse,qu=Wr(S,"DataView"),Tu=Wr(S,"Map"),Vu=Wr(S,"Promise"),Ku=Wr(S,"Set"),Gu=Wr(S,"WeakMap"),Ju=Wr(Object,"create"),Yu=Gu&&new Gu,Hu=!Ru.call({
valueOf:1},"valueOf"),Qu={},Xu=Gr(qu),to=Gr(Tu),no=Gr(Vu),ro=Gr(Ku),eo=Gr(Gu),uo=wu?wu.prototype:T,oo=uo?uo.valueOf:T,io=uo?uo.toString:T;xt.templateSettings={escape:nt,evaluate:rt,interpolate:et,variable:"",imports:{_:xt}},xt.prototype=At.prototype,xt.prototype.constructor=xt,Ot.prototype=an(At.prototype),Ot.prototype.constructor=Ot,kt.prototype=an(At.prototype),kt.prototype.constructor=kt,Mt.prototype=Ju?Ju(null):pu,Lt.prototype.clear=function(){this.__data__={hash:new Mt,map:Tu?new Tu:[],string:new Mt
}},Lt.prototype["delete"]=function(t){var n=this.__data__;return Pr(t)?(n=typeof t=="string"?n.string:n.hash,t=(Ju?n[t]!==T:vu.call(n,t))&&delete n[t]):t=Tu?n.map["delete"](t):Zt(n.map,t),t},Lt.prototype.get=function(t){var n=this.__data__;return Pr(t)?(n=typeof t=="string"?n.string:n.hash,Ju?(t=n[t],t="__lodash_hash_undefined__"===t?T:t):t=vu.call(n,t)?n[t]:T):t=Tu?n.map.get(t):qt(n.map,t),t},Lt.prototype.has=function(t){var n=this.__data__;return Pr(t)?(n=typeof t=="string"?n.string:n.hash,t=Ju?n[t]!==T:vu.call(n,t)):t=Tu?n.map.has(t):-1<Vt(n.map,t),
t},Lt.prototype.set=function(t,n){var r=this.__data__;return Pr(t)?(typeof t=="string"?r.string:r.hash)[t]=Ju&&n===T?"__lodash_hash_undefined__":n:Tu?r.map.set(t,n):Kt(r.map,t,n),this},$t.prototype.push=function(t){var n=this.__data__;Pr(t)?(n=n.__data__,(typeof t=="string"?n.string:n.hash)[t]="__lodash_hash_undefined__"):n.set(t,"__lodash_hash_undefined__")},Ft.prototype.clear=function(){this.__data__={array:[],map:null}},Ft.prototype["delete"]=function(t){var n=this.__data__,r=n.array;return r?Zt(r,t):n.map["delete"](t);
},Ft.prototype.get=function(t){var n=this.__data__,r=n.array;return r?qt(r,t):n.map.get(t)},Ft.prototype.has=function(t){var n=this.__data__,r=n.array;return r?-1<Vt(r,t):n.map.has(t)},Ft.prototype.set=function(t,n){var r=this.__data__,e=r.array;return e&&(199>e.length?Kt(e,t,n):(r.array=null,r.map=new Lt(e))),(r=r.map)&&r.set(t,n),this};var fo=ar(vn),co=ar(gn,true),ao=lr(),lo=lr(true);ku&&!Ru.call({valueOf:1},"valueOf")&&(In=function(t){return $(ku(t))});var so=Yu?function(t,n){return Yu.set(t,n),t}:ru,ho=Ku&&2===new Ku([1,2]).size?function(t){
return new Ku(t)}:ou,po=Yu?function(t){return Yu.get(t)}:ou,_o=Mn("length");Eu||(Cr=function(){return[]});var vo=Eu?function(t){for(var n=[];t;)l(n,Cr(t)),t=Uu(Object(t));return n}:Cr;(qu&&"[object DataView]"!=zr(new qu(new ArrayBuffer(1)))||Tu&&"[object Map]"!=zr(new Tu)||Vu&&"[object Promise]"!=zr(Vu.resolve())||Ku&&"[object Set]"!=zr(new Ku)||Gu&&"[object WeakMap]"!=zr(new Gu))&&(zr=function(t){var n=yu.call(t);if(t=Gr("[object Object]"==n?t.constructor:null))switch(t){case Xu:return"[object DataView]";
case to:return"[object Map]";case no:return"[object Promise]";case ro:return"[object Set]";case eo:return"[object WeakMap]"}return n});var go=function(){var t=0,n=0;return function(r,e){var u=Zo(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return so(r,e)}}(),yo=ge(function(t){var n=[];return Ze(t).replace(it,function(t,r,e,u){n.push(e?u.replace(ht,"$1"):r||t)}),n}),bo=de(function(t,n){return we(t)?sn(t,_n(n,1,true)):[]}),xo=de(function(t,n){var r=Xr(n);return we(r)&&(r=T),we(t)?sn(t,_n(n,1,true),Sr(r)):[];
}),jo=de(function(t,n){var r=Xr(n);return we(r)&&(r=T),we(t)?sn(t,_n(n,1,true),T,r):[]}),mo=de(function(t){var n=a(t,rn);return n.length&&n[0]===t[0]?mn(n):[]}),wo=de(function(t){var n=Xr(t),r=a(t,rn);return n===Xr(r)?n=T:r.pop(),r.length&&r[0]===t[0]?mn(r,Sr(n)):[]}),Ao=de(function(t){var n=Xr(t),r=a(t,rn);return n===Xr(r)?n=T:r.pop(),r.length&&r[0]===t[0]?mn(r,T,n):[]}),Oo=de(te),ko=de(function(t,n){n=a(_n(n,1),String);var r=nn(t,n);return Dn(t,n.sort(R)),r}),Eo=de(function(t){return Gn(_n(t,1,true));
}),Io=de(function(t){var n=Xr(t);return we(n)&&(n=T),Gn(_n(t,1,true),Sr(n))}),So=de(function(t){var n=Xr(t);return we(n)&&(n=T),Gn(_n(t,1,true),T,n)}),Ro=de(function(t,n){return we(t)?sn(t,n):[]}),Wo=de(function(t){return Hn(i(t,we))}),Bo=de(function(t){var n=Xr(t);return we(n)&&(n=T),Hn(i(t,we),Sr(n))}),Co=de(function(t){var n=Xr(t);return we(n)&&(n=T),Hn(i(t,we),T,n)}),zo=de(re),Uo=de(function(t){var n=t.length,n=n>1?t[n-1]:T,n=typeof n=="function"?(t.pop(),n):T;return ee(t,n)}),Mo=de(function(t){function n(n){
return nn(n,t)}t=_n(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return 1>=r&&!this.__actions__.length&&u instanceof kt&&L(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:oe,args:[n],thisArg:T}),new Ot(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(T),t})):this.thru(n)}),Lo=fr(function(t,n,r){vu.call(t,r)?++t[r]:t[r]=1}),$o=fr(function(t,n,r){vu.call(t,r)?t[r].push(n):t[r]=[n]}),Do=de(function(t,n,e){var u=-1,o=typeof n=="function",i=Nr(n),f=me(t)?Array(t.length):[];return fo(t,function(t){
var c=o?n:i&&null!=t?t[n]:T;f[++u]=c?r(c,t,e):An(t,n,e)}),f}),Fo=fr(function(t,n,r){t[r]=n}),No=fr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Po=de(function(t,n){if(null==t)return[];var r=n.length;return r>1&&Fr(t,n[0],n[1])?n=[]:r>2&&Fr(n[0],n[1],n[2])&&(n.length=1),Cn(t,_n(n,1),[])}),Zo=fu.now,qo=de(function(t,n,r){var e=1;if(r.length)var u=F(r,Br(qo)),e=32|e;return Or(t,e,n,r,u)}),To=de(function(t,n,r){var e=3;if(r.length)var u=F(r,Br(To)),e=32|e;return Or(n,e,t,r,u)}),Vo=de(function(t,n){
return ln(t,1,n)}),Ko=de(function(t,n,r){return ln(t,Ne(n)||0,r)});ge.Cache=Lt;var Go=de(function(t,n){n=a(n,Sr());var e=n.length;return de(function(u){for(var o=-1,i=Fu(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]);return r(t,this,u)})}),Jo=de(function(t,n){var r=F(n,Br(Jo));return Or(t,32,T,n,r)}),Yo=de(function(t,n){var r=F(n,Br(Yo));return Or(t,64,T,n,r)}),Ho=de(function(t,n){return Or(t,256,T,T,T,_n(n,1))}),Qo=Array.isArray,Xo=ju?function(t){return t instanceof ju}:nu(false),ti=cr(function(t,n){
if(Hu||qr(n)||me(n))ur(n,Ke(n),t);else for(var r in n)vu.call(n,r)&&Qt(t,r,n[r])}),ni=cr(function(t,n){if(Hu||qr(n)||me(n))ur(n,Ge(n),t);else for(var r in n)Qt(t,r,n[r])}),ri=cr(function(t,n,r,e){or(n,Ge(n),t,e)}),ei=cr(function(t,n,r,e){or(n,Ke(n),t,e)}),ui=de(function(t,n){return nn(t,_n(n,1))}),oi=de(function(t){return t.push(T,Gt),r(ri,T,t)}),ii=de(function(t){return t.push(T,Vr),r(si,T,t)}),fi=yr(function(t,n,r){t[n]=r},nu(ru)),ci=yr(function(t,n,r){vu.call(t,n)?t[n].push(r):t[n]=[r]},Sr),ai=de(An),li=cr(function(t,n,r){
Bn(t,n,r)}),si=cr(function(t,n,r,e){Bn(t,n,r,e)}),hi=de(function(t,n){return null==t?{}:(n=a(_n(n,1),en),zn(t,sn(bn(t,Ge,vo),n)))}),pi=de(function(t,n){return null==t?{}:zn(t,_n(n,1))}),_i=pr(function(t,n,r){return n=n.toLowerCase(),t+(r?Qe(n):n)}),vi=pr(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),gi=pr(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),di=hr("toLowerCase"),yi=pr(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),bi=pr(function(t,n,r){return t+(r?" ":"")+ji(n)}),xi=pr(function(t,n,r){
return t+(r?" ":"")+n.toUpperCase()}),ji=hr("toUpperCase"),mi=de(function(t,n){try{return r(t,T,n)}catch(e){return Ae(e)?e:new cu(e)}}),wi=de(function(t,n){return u(_n(n,1),function(n){t[n]=qo(t[n],t)}),t}),Ai=gr(),Oi=gr(true),ki=de(function(t,n){return function(r){return An(r,t,n)}}),Ei=de(function(t,n){return function(r){return An(t,r,n)}}),Ii=br(a),Si=br(o),Ri=br(p),Wi=mr(),Bi=mr(true),Ci=W(function(t,n){return t+n}),zi=Ar("ceil"),Ui=W(function(t,n){return t/n}),Mi=Ar("floor"),Li=W(function(t,n){return t*n;
}),$i=Ar("round"),Di=W(function(t,n){return t-n});return xt.after=function(t,n){if(typeof n!="function")throw new su("Expected a function");return t=De(t),function(){return 1>--t?n.apply(this,arguments):void 0}},xt.ary=se,xt.assign=ti,xt.assignIn=ni,xt.assignInWith=ri,xt.assignWith=ei,xt.at=ui,xt.before=he,xt.bind=qo,xt.bindAll=wi,xt.bindKey=To,xt.castArray=ye,xt.chain=ue,xt.chunk=function(t,n,r){if(n=(r?Fr(t,n,r):n===T)?1:Du(De(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Array(Cu(r/n));r>e;)o[u++]=Zn(t,e,e+=n);
return o},xt.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){var o=t[n];o&&(u[e++]=o)}return u},xt.concat=function(){var t=arguments.length,n=ye(arguments[0]);if(2>t)return t?er(n):[];for(var r=Array(t-1);t--;)r[t-1]=arguments[t];for(var t=_n(r,1),r=-1,e=n.length,u=-1,o=t.length,i=Array(e+o);++r<e;)i[r]=n[r];for(;++u<o;)i[r++]=t[u];return i},xt.cond=function(t){var n=t?t.length:0,e=Sr();return t=n?a(t,function(t){if("function"!=typeof t[1])throw new su("Expected a function");return[e(t[0]),t[1]];
}):[],de(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e)}})},xt.conforms=function(t){return cn(fn(t,true))},xt.constant=nu,xt.countBy=Lo,xt.create=function(t,n){var r=an(t);return n?tn(r,n):r},xt.curry=pe,xt.curryRight=_e,xt.debounce=ve,xt.defaults=oi,xt.defaultsDeep=ii,xt.defer=Vo,xt.delay=Ko,xt.difference=bo,xt.differenceBy=xo,xt.differenceWith=jo,xt.drop=Yr,xt.dropRight=Hr,xt.dropRightWhile=function(t,n){return t&&t.length?Jn(t,Sr(n,3),true,true):[]},xt.dropWhile=function(t,n){
return t&&t.length?Jn(t,Sr(n,3),true):[]},xt.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&Fr(t,n,r)&&(r=0,e=u),u=t.length,r=De(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:De(e),0>e&&(e+=u),e=r>e?0:Fe(e);e>r;)t[r++]=n;return t},xt.filter=function(t,n){return(Qo(t)?i:pn)(t,Sr(n,3))},xt.flatMap=function(t,n){return _n(ae(t,n),1)},xt.flatMapDeep=function(t,n){return _n(ae(t,n),V)},xt.flatMapDepth=function(t,n,r){return r=r===T?1:De(r),_n(ae(t,n),r)},xt.flatten=function(t){
return t&&t.length?_n(t,1):[]},xt.flattenDeep=function(t){return t&&t.length?_n(t,V):[]},xt.flattenDepth=function(t,n){return t&&t.length?(n=n===T?1:De(n),_n(t,n)):[]},xt.flip=function(t){return Or(t,512)},xt.flow=Ai,xt.flowRight=Oi,xt.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},xt.functions=function(t){return null==t?[]:dn(t,Ke(t))},xt.functionsIn=function(t){return null==t?[]:dn(t,Ge(t))},xt.groupBy=$o,xt.initial=function(t){return Hr(t,1)},xt.intersection=mo,
xt.intersectionBy=wo,xt.intersectionWith=Ao,xt.invert=fi,xt.invertBy=ci,xt.invokeMap=Do,xt.iteratee=eu,xt.keyBy=Fo,xt.keys=Ke,xt.keysIn=Ge,xt.map=ae,xt.mapKeys=function(t,n){var r={};return n=Sr(n,3),vn(t,function(t,e,u){r[n(t,e,u)]=t}),r},xt.mapValues=function(t,n){var r={};return n=Sr(n,3),vn(t,function(t,e,u){r[e]=n(t,e,u)}),r},xt.matches=function(t){return Rn(fn(t,true))},xt.matchesProperty=function(t,n){return Wn(t,fn(n,true))},xt.memoize=ge,xt.merge=li,xt.mergeWith=si,xt.method=ki,xt.methodOf=Ei,
xt.mixin=uu,xt.negate=function(t){if(typeof t!="function")throw new su("Expected a function");return function(){return!t.apply(this,arguments)}},xt.nthArg=function(t){return t=De(t),function(){return arguments[t]}},xt.omit=hi,xt.omitBy=function(t,n){return n=Sr(n),Un(t,function(t,r){return!n(t,r)})},xt.once=function(t){return he(2,t)},xt.orderBy=function(t,n,r,e){return null==t?[]:(Qo(n)||(n=null==n?[]:[n]),r=e?T:r,Qo(r)||(r=null==r?[]:[r]),Cn(t,n,r))},xt.over=Ii,xt.overArgs=Go,xt.overEvery=Si,xt.overSome=Ri,
xt.partial=Jo,xt.partialRight=Yo,xt.partition=No,xt.pick=pi,xt.pickBy=function(t,n){return null==t?{}:Un(t,Sr(n))},xt.property=iu,xt.propertyOf=function(t){return function(n){return null==t?T:yn(t,n)}},xt.pull=Oo,xt.pullAll=te,xt.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?$n(t,n,Sr(r)):t},xt.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?$n(t,n,T,r):t},xt.pullAt=ko,xt.range=Wi,xt.rangeRight=Bi,xt.rearg=Ho,xt.reject=function(t,n){var r=Qo(t)?i:pn;return n=Sr(n,3),r(t,function(t,r,e){
return!n(t,r,e)})},xt.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=Sr(n,3);++e<o;){var i=t[e];n(i,e,t)&&(r.push(i),u.push(e))}return Dn(t,u),r},xt.rest=de,xt.reverse=ne,xt.sampleSize=le,xt.set=function(t,n,r){return null==t?t:Pn(t,n,r)},xt.setWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null==t?t:Pn(t,n,r,e)},xt.shuffle=function(t){return le(t,4294967295)},xt.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&Fr(t,n,r)?(n=0,
r=e):(n=null==n?0:De(n),r=r===T?e:De(r)),Zn(t,n,r)):[]},xt.sortBy=Po,xt.sortedUniq=function(t){return t&&t.length?Kn(t):[]},xt.sortedUniqBy=function(t,n){return t&&t.length?Kn(t,Sr(n)):[]},xt.split=function(t,n,r){return Ze(t).split(n,r)},xt.spread=function(t,n){if(typeof t!="function")throw new su("Expected a function");return n=n===T?0:Du(De(n),0),de(function(e){var u=e[n];return e=e.slice(0,n),u&&l(e,u),r(t,this,e)})},xt.tail=function(t){return Yr(t,1)},xt.take=function(t,n,r){return t&&t.length?(n=r||n===T?1:De(n),
Zn(t,0,0>n?0:n)):[]},xt.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:De(n),n=e-n,Zn(t,0>n?0:n,e)):[]},xt.takeRightWhile=function(t,n){return t&&t.length?Jn(t,Sr(n,3),false,true):[]},xt.takeWhile=function(t,n){return t&&t.length?Jn(t,Sr(n,3)):[]},xt.tap=function(t,n){return n(t),t},xt.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new su("Expected a function");return Ie(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),ve(t,n,{leading:e,maxWait:n,
trailing:u})},xt.thru=oe,xt.toArray=$e,xt.toPairs=Je,xt.toPairsIn=Ye,xt.toPath=function(t){return Qo(t)?a(t,en):Ue(t)?[t]:er(yo(t))},xt.toPlainObject=Pe,xt.transform=function(t,n,r){var e=Qo(t)||Me(t);if(n=Sr(n,4),null==r)if(e||Ie(t)){var o=t.constructor;r=e?Qo(t)?new o:[]:Oe(o)?an(Uu(Object(t))):{}}else r={};return(e?u:vn)(t,function(t,e,u){return n(r,t,e,u)}),r},xt.unary=function(t){return se(t,1)},xt.union=Eo,xt.unionBy=Io,xt.unionWith=So,xt.uniq=function(t){return t&&t.length?Gn(t):[]},xt.uniqBy=function(t,n){
return t&&t.length?Gn(t,Sr(n)):[]},xt.uniqWith=function(t,n){return t&&t.length?Gn(t,T,n):[]},xt.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=Nr(e,r)?[e]:un(e);r=Kr(r,e),e=Xr(e),r=null!=r&&Te(r,e)?delete r[e]:true}return r},xt.unzip=re,xt.unzipWith=ee,xt.update=function(t,n,r){return null==t?t:Pn(t,n,(typeof r=="function"?r:ru)(yn(t,n)),void 0)},xt.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null!=t&&(t=Pn(t,n,(typeof r=="function"?r:ru)(yn(t,n)),e)),t},xt.values=He,
xt.valuesIn=function(t){return null==t?[]:k(t,Ge(t))},xt.without=Ro,xt.words=tu,xt.wrap=function(t,n){return n=null==n?ru:n,Jo(n,t)},xt.xor=Wo,xt.xorBy=Bo,xt.xorWith=Co,xt.zip=zo,xt.zipObject=function(t,n){return Qn(t||[],n||[],Qt)},xt.zipObjectDeep=function(t,n){return Qn(t||[],n||[],Pn)},xt.zipWith=Uo,xt.entries=Je,xt.entriesIn=Ye,xt.extend=ni,xt.extendWith=ri,uu(xt,xt),xt.add=Ci,xt.attempt=mi,xt.camelCase=_i,xt.capitalize=Qe,xt.ceil=zi,xt.clamp=function(t,n,r){return r===T&&(r=n,n=T),r!==T&&(r=Ne(r),
r=r===r?r:0),n!==T&&(n=Ne(n),n=n===n?n:0),on(Ne(t),n,r)},xt.clone=function(t){return fn(t,false,true)},xt.cloneDeep=function(t){return fn(t,true,true)},xt.cloneDeepWith=function(t,n){return fn(t,true,true,n)},xt.cloneWith=function(t,n){return fn(t,false,true,n)},xt.deburr=Xe,xt.divide=Ui,xt.endsWith=function(t,n,r){t=Ze(t),n=typeof n=="string"?n:n+"";var e=t.length;return r=r===T?e:on(De(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},xt.eq=be,xt.escape=function(t){return(t=Ze(t))&&tt.test(t)?t.replace(Q,C):t},xt.escapeRegExp=function(t){
return(t=Ze(t))&&ct.test(t)?t.replace(ft,"\\$&"):t},xt.every=function(t,n,r){var e=Qo(t)?o:hn;return r&&Fr(t,n,r)&&(n=T),e(t,Sr(n,3))},xt.find=function(t,n){if(n=Sr(n,3),Qo(t)){var r=g(t,n);return r>-1?t[r]:T}return v(t,n,fo)},xt.findIndex=function(t,n){return t&&t.length?g(t,Sr(n,3)):-1},xt.findKey=function(t,n){return v(t,Sr(n,3),vn,true)},xt.findLast=function(t,n){if(n=Sr(n,3),Qo(t)){var r=g(t,n,true);return r>-1?t[r]:T}return v(t,n,co)},xt.findLastIndex=function(t,n){return t&&t.length?g(t,Sr(n,3),true):-1;
},xt.findLastKey=function(t,n){return v(t,Sr(n,3),gn,true)},xt.floor=Mi,xt.forEach=fe,xt.forEachRight=ce,xt.forIn=function(t,n){return null==t?t:ao(t,Sr(n),Ge)},xt.forInRight=function(t,n){return null==t?t:lo(t,Sr(n),Ge)},xt.forOwn=function(t,n){return t&&vn(t,Sr(n))},xt.forOwnRight=function(t,n){return t&&gn(t,Sr(n))},xt.get=qe,xt.gt=xe,xt.gte=function(t,n){return t>=n},xt.has=Te,xt.hasIn=Ve,xt.head=Qr,xt.identity=ru,xt.includes=function(t,n,r,e){return t=me(t)?t:He(t),r=r&&!e?De(r):0,e=t.length,0>r&&(r=Du(e+r,0)),
ze(t)?e>=r&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},xt.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=De(r),0>r&&(r=Du(e+r,0)),d(t,n,r)):-1},xt.inRange=function(t,n,r){return n=Ne(n)||0,r===T?(r=n,n=0):r=Ne(r)||0,t=Ne(t),t>=Fu(n,r)&&t<Du(n,r)},xt.invoke=ai,xt.isArguments=je,xt.isArray=Qo,xt.isArrayBuffer=function(t){return Se(t)&&"[object ArrayBuffer]"==yu.call(t)},xt.isArrayLike=me,xt.isArrayLikeObject=we,xt.isBoolean=function(t){return true===t||false===t||Se(t)&&"[object Boolean]"==yu.call(t)},xt.isBuffer=Xo,
xt.isDate=function(t){return Se(t)&&"[object Date]"==yu.call(t)},xt.isElement=function(t){return!!t&&1===t.nodeType&&Se(t)&&!Be(t)},xt.isEmpty=function(t){if(me(t)&&(Qo(t)||ze(t)||Oe(t.splice)||je(t)||Xo(t)))return!t.length;if(Se(t)){var n=zr(t);if("[object Map]"==n||"[object Set]"==n)return!t.size}for(var r in t)if(vu.call(t,r))return false;return!(Hu&&Ke(t).length)},xt.isEqual=function(t,n){return On(t,n)},xt.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:T)?r(t,n):T;return e===T?On(t,n,r):!!e;
},xt.isError=Ae,xt.isFinite=function(t){return typeof t=="number"&&Mu(t)},xt.isFunction=Oe,xt.isInteger=ke,xt.isLength=Ee,xt.isMap=function(t){return Se(t)&&"[object Map]"==zr(t)},xt.isMatch=function(t,n){return t===n||kn(t,n,Rr(n))},xt.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:T,kn(t,n,Rr(n),r)},xt.isNaN=function(t){return We(t)&&t!=+t},xt.isNative=Re,xt.isNil=function(t){return null==t},xt.isNull=function(t){return null===t},xt.isNumber=We,xt.isObject=Ie,xt.isObjectLike=Se,xt.isPlainObject=Be,
xt.isRegExp=Ce,xt.isSafeInteger=function(t){return ke(t)&&t>=-9007199254740991&&9007199254740991>=t},xt.isSet=function(t){return Se(t)&&"[object Set]"==zr(t)},xt.isString=ze,xt.isSymbol=Ue,xt.isTypedArray=Me,xt.isUndefined=function(t){return t===T},xt.isWeakMap=function(t){return Se(t)&&"[object WeakMap]"==zr(t)},xt.isWeakSet=function(t){return Se(t)&&"[object WeakSet]"==yu.call(t)},xt.join=function(t,n){return t?Lu.call(t,n):""},xt.kebabCase=vi,xt.last=Xr,xt.lastIndexOf=function(t,n,r){var e=t?t.length:0;
if(!e)return-1;var u=e;if(r!==T&&(u=De(r),u=(0>u?Du(e+u,0):Fu(u,e-1))+1),n!==n)return U(t,u,true);for(;u--;)if(t[u]===n)return u;return-1},xt.lowerCase=gi,xt.lowerFirst=di,xt.lt=Le,xt.lte=function(t,n){return n>=t},xt.max=function(t){return t&&t.length?_(t,ru,xe):T},xt.maxBy=function(t,n){return t&&t.length?_(t,Sr(n),xe):T},xt.mean=function(t){return b(t,ru)},xt.meanBy=function(t,n){return b(t,Sr(n))},xt.min=function(t){return t&&t.length?_(t,ru,Le):T},xt.minBy=function(t,n){return t&&t.length?_(t,Sr(n),Le):T;
},xt.multiply=Li,xt.noConflict=function(){return Jt._===this&&(Jt._=bu),this},xt.noop=ou,xt.now=Zo,xt.pad=function(t,n,r){t=Ze(t);var e=(n=De(n))?P(t):0;return n&&n>e?(n=(n-e)/2,xr(zu(n),r)+t+xr(Cu(n),r)):t},xt.padEnd=function(t,n,r){t=Ze(t);var e=(n=De(n))?P(t):0;return n&&n>e?t+xr(n-e,r):t},xt.padStart=function(t,n,r){t=Ze(t);var e=(n=De(n))?P(t):0;return n&&n>e?xr(n-e,r)+t:t},xt.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=Ze(t).replace(at,""),Nu(t,n||(vt.test(t)?16:10))},xt.random=function(t,n,r){
if(r&&typeof r!="boolean"&&Fr(t,n,r)&&(n=r=T),r===T&&(typeof n=="boolean"?(r=n,n=T):typeof t=="boolean"&&(r=t,t=T)),t===T&&n===T?(t=0,n=1):(t=Ne(t)||0,n===T?(n=t,t=0):n=Ne(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Pu(),Fu(t+r*(n-t+Nt("1e-"+((r+"").length-1))),n)):Fn(t,n)},xt.reduce=function(t,n,r){var e=Qo(t)?s:x,u=3>arguments.length;return e(t,Sr(n,4),r,u,fo)},xt.reduceRight=function(t,n,r){var e=Qo(t)?h:x,u=3>arguments.length;return e(t,Sr(n,4),r,u,co)},xt.repeat=function(t,n,r){return n=(r?Fr(t,n,r):n===T)?1:De(n),
Nn(Ze(t),n)},xt.replace=function(){var t=arguments,n=Ze(t[0]);return 3>t.length?n:n.replace(t[1],t[2])},xt.result=function(t,n,r){n=Nr(n,t)?[n]:un(n);var e=-1,u=n.length;for(u||(t=T,u=1);++e<u;){var o=null==t?T:t[n[e]];o===T&&(e=u,o=r),t=Oe(o)?o.call(t):o}return t},xt.round=$i,xt.runInContext=q,xt.sample=function(t){t=me(t)?t:He(t);var n=t.length;return n>0?t[Fn(0,n-1)]:T},xt.size=function(t){if(null==t)return 0;if(me(t)){var n=t.length;return n&&ze(t)?P(t):n}return Se(t)&&(n=zr(t),"[object Map]"==n||"[object Set]"==n)?t.size:Ke(t).length;
},xt.snakeCase=yi,xt.some=function(t,n,r){var e=Qo(t)?p:qn;return r&&Fr(t,n,r)&&(n=T),e(t,Sr(n,3))},xt.sortedIndex=function(t,n){return Tn(t,n)},xt.sortedIndexBy=function(t,n,r){return Vn(t,n,Sr(r))},xt.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Tn(t,n);if(r>e&&be(t[e],n))return e}return-1},xt.sortedLastIndex=function(t,n){return Tn(t,n,true)},xt.sortedLastIndexBy=function(t,n,r){return Vn(t,n,Sr(r),true)},xt.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Tn(t,n,true)-1;if(be(t[r],n))return r;
}return-1},xt.startCase=bi,xt.startsWith=function(t,n,r){return t=Ze(t),r=on(De(r),0,t.length),t.lastIndexOf(n,r)==r},xt.subtract=Di,xt.sum=function(t){return t&&t.length?m(t,ru):0},xt.sumBy=function(t,n){return t&&t.length?m(t,Sr(n)):0},xt.template=function(t,n,r){var e=xt.templateSettings;r&&Fr(t,n,r)&&(n=T),t=Ze(t),n=ri({},n,e,Gt),r=ri({},n.imports,e.imports,Gt);var u,o,i=Ke(r),f=k(r,i),c=0;r=n.interpolate||mt;var a="__p+='";r=lu((n.escape||mt).source+"|"+r.source+"|"+(r===et?pt:mt).source+"|"+(n.evaluate||mt).source+"|$","g");
var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(wt,z),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(G,""):a).replace(J,"$1").replace(Y,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",
n=mi(function(){return Function(i,l+"return "+a).apply(T,f)}),n.source=a,Ae(n))throw n;return n},xt.times=function(t,n){if(t=De(t),1>t||t>9007199254740991)return[];var r=4294967295,e=Fu(t,4294967295);for(n=Sr(n),t-=4294967295,e=w(e,n);++r<t;)n(r);return e},xt.toInteger=De,xt.toLength=Fe,xt.toLower=function(t){return Ze(t).toLowerCase()},xt.toNumber=Ne,xt.toSafeInteger=function(t){return on(De(t),-9007199254740991,9007199254740991)},xt.toString=Ze,xt.toUpper=function(t){return Ze(t).toUpperCase()},
xt.trim=function(t,n,r){return(t=Ze(t))?r||n===T?t.replace(at,""):(n+="")?(t=t.match(It),n=n.match(It),t.slice(E(t,n),I(t,n)+1).join("")):t:t},xt.trimEnd=function(t,n,r){return(t=Ze(t))?r||n===T?t.replace(st,""):(n+="")?(t=t.match(It),t.slice(0,I(t,n.match(It))+1).join("")):t:t},xt.trimStart=function(t,n,r){return(t=Ze(t))?r||n===T?t.replace(lt,""):(n+="")?(t=t.match(It),t.slice(E(t,n.match(It))).join("")):t:t},xt.truncate=function(t,n){var r=30,e="...";if(Ie(n))var u="separator"in n?n.separator:u,r="length"in n?De(n.length):r,e="omission"in n?Ze(n.omission):e;
t=Ze(t);var o=t.length;if(St.test(t))var i=t.match(It),o=i.length;if(r>=o)return t;if(o=r-P(e),1>o)return e;if(r=i?i.slice(0,o).join(""):t.slice(0,o),u===T)return r+e;if(i&&(o+=r.length-o),Ce(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=lu(u.source,Ze(_t.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===T?o:c)}}else t.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},xt.unescape=function(t){return(t=Ze(t))&&X.test(t)?t.replace(H,Z):t},xt.uniqueId=function(t){
var n=++gu;return Ze(t)+n},xt.upperCase=xi,xt.upperFirst=ji,xt.each=fe,xt.eachRight=ce,xt.first=Qr,uu(xt,function(){var t={};return vn(xt,function(n,r){vu.call(xt.prototype,r)||(t[r]=n)}),t}(),{chain:false}),xt.VERSION="4.8.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){xt[t].placeholder=xt}),u(["drop","take"],function(t,n){kt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new kt(this);r=r===T?1:Du(De(r),0);var u=this.clone();return e?u.__takeCount__=Fu(r,u.__takeCount__):u.__views__.push({
size:Fu(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},kt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;kt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Sr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");kt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");
kt.prototype[t]=function(){return this.__filtered__?new kt(this):this[r](1)}}),kt.prototype.compact=function(){return this.filter(ru)},kt.prototype.find=function(t){return this.filter(t).head()},kt.prototype.findLast=function(t){return this.reverse().find(t)},kt.prototype.invokeMap=de(function(t,n){return typeof t=="function"?new kt(this):this.map(function(r){return An(r,t,n)})}),kt.prototype.reject=function(t){return t=Sr(t,3),this.filter(function(n){return!t(n)})},kt.prototype.slice=function(t,n){
t=De(t);var r=this;return r.__filtered__&&(t>0||0>n)?new kt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==T&&(n=De(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},kt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},kt.prototype.toArray=function(){return this.take(4294967295)},vn(kt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=xt[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(xt.prototype[n]=function(){
function n(t){return t=u.apply(xt,l([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof kt,a=f[0],s=c||Qo(i);s&&r&&typeof a=="function"&&1!=a.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&s?(i=c?i:new kt(this),i=t.apply(i,f),i.__actions__.push({func:oe,args:[n],thisArg:T}),new Ot(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=hu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);
xt.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(Qo(u)?u:[],t)}return this[r](function(r){return n.apply(Qo(r)?r:[],t)})}}),vn(kt.prototype,function(t,n){var r=xt[n];if(r){var e=r.name+"";(Qu[e]||(Qu[e]=[])).push({name:n,func:r})}}),Qu[dr(T,2).name]=[{name:"wrapper",func:T}],kt.prototype.clone=function(){var t=new kt(this.__wrapped__);return t.__actions__=er(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=er(this.__iteratees__),
t.__takeCount__=this.__takeCount__,t.__views__=er(this.__views__),t},kt.prototype.reverse=function(){if(this.__filtered__){var t=new kt(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},kt.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=Qo(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=Fu(t,f+s);break;case"takeRight":
f=Du(f,t-s)}}if(t={start:f,end:t},i=t.start,f=t.end,t=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=Fu(t,this.__takeCount__),!e||200>o||o==t&&a==t)return Yn(n,this.__actions__);e=[];t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue t;break t}}e[c++]=l}return e},xt.prototype.at=Mo,xt.prototype.chain=function(){return ue(this)},xt.prototype.commit=function(){return new Ot(this.value(),this.__chain__)},xt.prototype.next=function(){
this.__values__===T&&(this.__values__=$e(this.value()));var t=this.__index__>=this.__values__.length,n=t?T:this.__values__[this.__index__++];return{done:t,value:n}},xt.prototype.plant=function(t){for(var n,r=this;r instanceof At;){var e=Jr(r);e.__index__=0,e.__values__=T,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},xt.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof kt?(this.__actions__.length&&(t=new kt(this)),t=t.reverse(),t.__actions__.push({func:oe,
args:[ne],thisArg:T}),new Ot(t,this.__chain__)):this.thru(ne)},xt.prototype.toJSON=xt.prototype.valueOf=xt.prototype.value=function(){return Yn(this.__wrapped__,this.__actions__)},Iu&&(xt.prototype[Iu]=ie),xt}var T,V=1/0,K=NaN,G=/\b__p\+='';/g,J=/\b(__p\+=)''\+/g,Y=/(__e\(.*?\)|\b__t\))\+'';/g,H=/&(?:amp|lt|gt|quot|#39|#96);/g,Q=/[&<>"'`]/g,X=RegExp(H.source),tt=RegExp(Q.source),nt=/<%-([\s\S]+?)%>/g,rt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,ut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ot=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,ft=/[\\^$.*+?()[\]{}|]/g,ct=RegExp(ft.source),at=/^\s+|\s+$/g,lt=/^\s+/,st=/\s+$/,ht=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_t=/\w*$/,vt=/^0x/i,gt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,jt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,mt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,At="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",Ot="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+At,kt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Et=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),It=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kt+At,"g"),St=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Rt=/[a-zA-Z0-9]+/g,Wt=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|\\d+",Ot].join("|"),"g"),Bt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ct="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),zt={};
zt["[object Float32Array]"]=zt["[object Float64Array]"]=zt["[object Int8Array]"]=zt["[object Int16Array]"]=zt["[object Int32Array]"]=zt["[object Uint8Array]"]=zt["[object Uint8ClampedArray]"]=zt["[object Uint16Array]"]=zt["[object Uint32Array]"]=true,zt["[object Arguments]"]=zt["[object Array]"]=zt["[object ArrayBuffer]"]=zt["[object Boolean]"]=zt["[object DataView]"]=zt["[object Date]"]=zt["[object Error]"]=zt["[object Function]"]=zt["[object Map]"]=zt["[object Number]"]=zt["[object Object]"]=zt["[object RegExp]"]=zt["[object Set]"]=zt["[object String]"]=zt["[object WeakMap]"]=false;
var Ut={};Ut["[object Arguments]"]=Ut["[object Array]"]=Ut["[object ArrayBuffer]"]=Ut["[object DataView]"]=Ut["[object Boolean]"]=Ut["[object Date]"]=Ut["[object Float32Array]"]=Ut["[object Float64Array]"]=Ut["[object Int8Array]"]=Ut["[object Int16Array]"]=Ut["[object Int32Array]"]=Ut["[object Map]"]=Ut["[object Number]"]=Ut["[object Object]"]=Ut["[object RegExp]"]=Ut["[object Set]"]=Ut["[object String]"]=Ut["[object Symbol]"]=Ut["[object Uint8Array]"]=Ut["[object Uint8ClampedArray]"]=Ut["[object Uint16Array]"]=Ut["[object Uint32Array]"]=true,
Ut["[object Error]"]=Ut["[object Function]"]=Ut["[object WeakMap]"]=false;var Mt={"\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"},Lt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},$t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Dt={"function":true,object:true},Ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"
},Nt=parseFloat,Pt=parseInt,Zt=Dt[typeof exports]&&exports&&!exports.nodeType?exports:T,qt=Dt[typeof module]&&module&&!module.nodeType?module:T,Tt=qt&&qt.exports===Zt?Zt:T,Vt=S(Dt[typeof self]&&self),Kt=S(Dt[typeof window]&&window),Gt=S(Dt[typeof this]&&this),Jt=S(Zt&&qt&&typeof global=="object"&&global)||Kt!==(Gt&&Gt.window)&&Kt||Vt||Gt||Function("return this")(),Yt=q();(Kt||Vt||{})._=Yt,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Yt}):Zt&&qt?(Tt&&((qt.exports=Yt)._=Yt),
Zt._=Yt):Jt._=Yt}).call(this);

475
dist/mapping.fp.js vendored
View File

@@ -54,209 +54,298 @@ return /******/ (function(modules) { // webpackBootstrap
/* 0 */
/***/ function(module, exports) {
module.exports = {
/** Used to map aliases to their real names. */
exports.aliasToReal = {
/** Used to map method names to their aliases. */
'alias': {
'ary': ['nAry'],
'assignIn': ['extend'],
'assignInWith': ['extendWith'],
'filter': ['whereEq'],
'flatten': ['unnest'],
'flow': ['pipe'],
'flowRight': ['compose'],
'forEach': ['each'],
'forEachRight': ['eachRight'],
'get': ['path', 'prop'],
'getOr': ['pathOr', 'propOr'],
'head': ['first'],
'includes': ['contains'],
'initial': ['init'],
'isEqual': ['equals'],
'mapValues': ['mapObj'],
'matchesProperty': ['pathEq'],
'omit': ['dissoc', 'omitAll'],
'overArgs': ['useWith'],
'overEvery': ['allPass'],
'overSome': ['somePass'],
'pick': ['pickAll'],
'propertyOf': ['propOf'],
'rest': ['unapply'],
'some': ['all'],
'spread': ['apply'],
'zipObject': ['zipObj']
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
// Ramda aliases.
'__': 'placeholder',
'all': 'every',
'allPass': 'overEvery',
'always': 'constant',
'any': 'some',
'anyPass': 'overSome',
'apply': 'spread',
'assoc': 'set',
'assocPath': 'set',
'complement': 'negate',
'compose': 'flowRight',
'contains': 'includes',
'dissoc': 'unset',
'dissocPath': 'unset',
'equals': 'isEqual',
'identical': 'eq',
'init': 'initial',
'invertObj': 'invert',
'juxt': 'over',
'mapObj': 'mapValues',
'omitAll': 'omit',
'nAry': 'ary',
'path': 'get',
'pathEq': 'matchesProperty',
'pathOr': 'getOr',
'pickAll': 'pick',
'pipe': 'flow',
'prop': 'get',
'propOf': 'propertyOf',
'propOr': 'getOr',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
'whereEq': 'filter',
'zipObj': 'zipObject'
};
/** Used to map ary to method names. */
exports.aryMethod = {
'1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
'eq', 'every', 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast',
'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'omit', 'omitBy',
'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', 'partialRight',
'partition', 'pick', 'pickBy', 'pull', 'pullAll', 'pullAt', 'random', 'range',
'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'restFrom', 'result',
'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex',
'sortedLastIndexOf', 'sortedUniqBy', 'split', 'spreadFrom', 'startsWith',
'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap',
'throttle', 'thru', 'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart',
'truncate', 'union', 'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without',
'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep'
],
'3': [
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs',
'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'mergeWith',
'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy',
'pullAllWith', 'reduce', 'reduceRight', 'replace', 'set', 'slice',
'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith',
'update', 'xorBy', 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith', 'updateWith'
]
};
/** Used to map ary to rearg configs. */
exports.aryRearg = {
'2': [1, 0],
'3': [2, 0, 1],
'4': [3, 2, 0, 1]
};
/** Used to map method names to their iteratee ary. */
exports.iterateeAry = {
'dropRightWhile': 1,
'dropWhile': 1,
'every': 1,
'filter': 1,
'find': 1,
'findIndex': 1,
'findKey': 1,
'findLast': 1,
'findLastIndex': 1,
'findLastKey': 1,
'flatMap': 1,
'flatMapDeep': 1,
'flatMapDepth': 1,
'forEach': 1,
'forEachRight': 1,
'forIn': 1,
'forInRight': 1,
'forOwn': 1,
'forOwnRight': 1,
'map': 1,
'mapKeys': 1,
'mapValues': 1,
'partition': 1,
'reduce': 2,
'reduceRight': 2,
'reject': 1,
'remove': 1,
'some': 1,
'takeRightWhile': 1,
'takeWhile': 1,
'times': 1,
'transform': 2
};
/** Used to map method names to iteratee rearg configs. */
exports.iterateeRearg = {
'mapKeys': [1]
};
/** Used to map method names to rearg configs. */
exports.methodRearg = {
'assignInWith': [1, 2, 0],
'assignWith': [1, 2, 0],
'getOr': [2, 1, 0],
'isEqualWith': [1, 2, 0],
'isMatchWith': [2, 1, 0],
'mergeWith': [1, 2, 0],
'padChars': [2, 1, 0],
'padCharsEnd': [2, 1, 0],
'padCharsStart': [2, 1, 0],
'pullAllBy': [2, 1, 0],
'pullAllWith': [2, 1, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
'updateWith': [3, 1, 2, 0],
'zipWith': [1, 2, 0]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'invokeArgs': 2,
'invokeArgsMap': 2,
'over': 0,
'overArgs': 1,
'overEvery': 0,
'overSome': 0,
'partial': 1,
'partialRight': 1,
'without': 1
};
/** Used to identify methods which mutate arrays or objects. */
exports.mutate = {
'array': {
'fill': true,
'pull': true,
'pullAll': true,
'pullAllBy': true,
'pullAllWith': true,
'pullAt': true,
'remove': true,
'reverse': true
},
/** Used to map method names to their iteratee ary. */
'aryIteratee': {
'assignWith': 2,
'assignInWith': 2,
'cloneDeepWith': 1,
'cloneWith': 1,
'dropRightWhile': 1,
'dropWhile': 1,
'every': 1,
'filter': 1,
'find': 1,
'findIndex': 1,
'findKey': 1,
'findLast': 1,
'findLastIndex': 1,
'findLastKey': 1,
'flatMap': 1,
'forEach': 1,
'forEachRight': 1,
'forIn': 1,
'forInRight': 1,
'forOwn': 1,
'forOwnRight': 1,
'isEqualWith': 2,
'isMatchWith': 2,
'map': 1,
'mapKeys': 1,
'mapValues': 1,
'partition': 1,
'reduce': 2,
'reduceRight': 2,
'reject': 1,
'remove': 1,
'some': 1,
'takeRightWhile': 1,
'takeWhile': 1,
'times': 1,
'transform': 2
},
/** Used to map ary to method names. */
'aryMethod': {
1:[
'attempt', 'ceil', 'create', 'curry', 'curryRight', 'floor', 'fromPairs',
'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin', 'over',
'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext',
'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words'
],
2:[
'add', 'after', 'ary', 'assign', 'at', 'before', 'bind', 'bindKey',
'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
'every', 'extend', 'filter', 'find', 'find', 'findIndex', 'findKey',
'findLast', 'findLastIndex', 'findLastKey', 'flatMap', 'forEach',
'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',
'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',
'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf',
'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', 'maxBy',
'merge', 'minBy', 'omit', 'omitBy', 'orderBy', 'overArgs', 'pad', 'padEnd',
'padStart', 'parseInt', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
'repeat', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
'split', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile',
'takeWhile', 'tap', 'throttle', 'thru', 'times', 'truncate', 'union', 'uniqBy',
'uniqWith', 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject'
],
3:[
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'isEqualWith',
'isMatchWith', 'mergeWith', 'pullAllBy', 'reduce', 'reduceRight', 'replace',
'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
'unionWith', 'xorBy', 'xorWith', 'zipWith'
],
4:[
'fill', 'setWith'
]
},
/** Used to map ary to rearg configs. */
'aryRearg': {
2: [1, 0],
3: [2, 1, 0],
4: [3, 2, 0, 1]
},
/** Used to map method names to iteratee rearg configs. */
'iterateeRearg': {
'findKey': [1],
'findLastKey': [1],
'mapKeys': [1]
},
/** Used to map method names to rearg configs. */
'methodRearg': {
'clamp': [2, 0, 1],
'reduce': [2, 0, 1],
'reduceRight': [2, 0, 1],
'set': [2, 0, 1],
'setWith': [3, 1, 2, 0],
'slice': [2, 0, 1],
'transform': [2, 0, 1]
},
/** Used to iterate `mapping.aryMethod` keys. */
'caps': [1, 2, 3, 4],
/** Used to map keys to other keys. */
'key': {
'curryN': 'curry',
'curryRightN': 'curryRight',
'getOr': 'get'
},
/** Used to identify methods which mutate arrays or objects. */
'mutate': {
'array': {
'fill': true,
'pull': true,
'pullAll': true,
'pullAllBy': true,
'pullAt': true,
'remove': true,
'reverse': true
},
'object': {
'assign': true,
'assignIn': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'merge': true,
'mergeWith': true
},
'set': {
'set': true,
'setWith': true
}
},
/** Used to track methods with placeholder support */
'placeholder': {
'bind': true,
'bindKey': true,
'curry': true,
'curryRight': true,
'partial': true,
'partialRight': true
},
/** Used to track methods that skip `_.rearg`. */
'skipRearg': {
'object': {
'assign': true,
'assignIn': true,
'concat': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'difference': true,
'matchesProperty': true,
'merge': true,
'random': true,
'range': true,
'rangeRight': true,
'zip': true,
'zipObject': true
'mergeWith': true
},
'set': {
'set': true,
'setWith': true,
'unset': true,
'update': true,
'updateWith': true
}
};
/** Used to track methods with placeholder support */
exports.placeholder = {
'bind': true,
'bindKey': true,
'curry': true,
'curryRight': true,
'partial': true,
'partialRight': true
};
/** Used to map real names to their aliases. */
exports.realToAlias = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
object = exports.aliasToReal,
result = {};
for (var key in object) {
var value = object[key];
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}
return result;
}());
/** Used to map method names to other names. */
exports.remap = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'getOr': 'get',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'runInContext': true
};
/** Used to track methods that skip rearranging arguments. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'bind': true,
'bindKey': true,
'concat': true,
'difference': true,
'divide': true,
'eq': true,
'gt': true,
'gte': true,
'isEqual': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'multiply': true,
'overArgs': true,
'partial': true,
'partialRight': true,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'without': true,
'zip': true,
'zipObject': true
};
/***/ }
/******/ ])

File diff suppressed because it is too large Load Diff

View File

@@ -1,114 +1,186 @@
var mapping = require('./_mapping'),
mutateMap = mapping.mutate,
placeholder = {};
fallbackHolder = require('./placeholder');
/**
* Creates a function, with an arity of `n`, that invokes `func` with the
* arguments it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} n The arity of the new function.
* @returns {Function} Returns the new function.
*/
function baseArity(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
}
/**
* Creates a function that invokes `func`, with up to `n` arguments, ignoring
* any additional arguments.
*
* @private
* @param {Function} func The function to cap arguments for.
* @param {number} n The arity cap.
* @returns {Function} Returns the new function.
*/
function baseAry(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
: function(a) { return func(a); };
}
/**
* Creates a clone of `array`.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the cloned array.
*/
function cloneArray(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
}
/**
* Creates a function that clones a given object using the assignment `func`.
*
* @private
* @param {Function} func The assignment function.
* @returns {Function} Returns the new cloner function.
*/
function createCloner(func) {
return function(object) {
return func({}, object);
};
}
/**
* Creates a function that wraps `func` and uses `cloner` to clone the first
* argument it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} cloner The function to clone arguments.
* @returns {Function} Returns the new immutable function.
*/
function immutWrap(func, cloner) {
return function() {
var length = arguments.length;
if (!length) {
return result;
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var result = args[0] = cloner.apply(undefined, args);
func.apply(undefined, args);
return result;
};
}
/**
* The base implementation of `convert` which accepts a `util` object of methods
* required to perform conversions.
*
* @param {Object} util The util object.
* @param {string} name The name of the function to wrap.
* @param {Function} func The function to wrap.
* @param {string} name The name of the function to convert.
* @param {Function} func The function to convert.
* @param {Object} [options] The options object.
* @param {boolean} [options.cap=true] Specify capping iteratee arguments.
* @param {boolean} [options.curry=true] Specify currying.
* @param {boolean} [options.fixed=true] Specify fixed arity.
* @param {boolean} [options.immutable=true] Specify immutable operations.
* @param {boolean} [options.rearg=true] Specify rearranging arguments.
* @returns {Function|Object} Returns the converted function or object.
*/
function baseConvert(util, name, func) {
if (typeof func != 'function') {
function baseConvert(util, name, func, options) {
var setPlaceholder,
isLib = typeof name == 'function',
isObj = name === Object(name);
if (isObj) {
options = func;
func = name;
name = undefined;
}
if (func == null) {
throw new TypeError;
}
var isLib = name === undefined && typeof func.VERSION == 'string';
options || (options = {});
var _ = isLib ? func : {
var config = {
'cap': 'cap' in options ? options.cap : true,
'curry': 'curry' in options ? options.curry : true,
'fixed': 'fixed' in options ? options.fixed : true,
'immutable': 'immutable' in options ? options.immutable : true,
'rearg': 'rearg' in options ? options.rearg : true
};
var forceCurry = ('curry' in options) && options.curry,
forceFixed = ('fixed' in options) && options.fixed,
forceRearg = ('rearg' in options) && options.rearg,
placeholder = isLib ? func : fallbackHolder,
pristine = isLib ? func.runInContext() : undefined;
var helpers = isLib ? func : {
'ary': util.ary,
'cloneDeep': util.cloneDeep,
'assign': util.assign,
'clone': util.clone,
'curry': util.curry,
'forEach': util.forEach,
'isArray': util.isArray,
'isFunction': util.isFunction,
'iteratee': util.iteratee,
'keys': util.keys,
'rearg': util.rearg
'rearg': util.rearg,
'spread': util.spread,
'toPath': util.toPath
};
var ary = _.ary,
cloneDeep = _.cloneDeep,
curry = _.curry,
each = _.forEach,
isFunction = _.isFunction,
keys = _.keys,
rearg = _.rearg;
var ary = helpers.ary,
assign = helpers.assign,
clone = helpers.clone,
curry = helpers.curry,
each = helpers.forEach,
isArray = helpers.isArray,
isFunction = helpers.isFunction,
keys = helpers.keys,
rearg = helpers.rearg,
spread = helpers.spread,
toPath = helpers.toPath;
var baseArity = function(func, n) {
return n == 2
? function(a, b) { return func.apply(undefined, arguments); }
: function(a) { return func.apply(undefined, arguments); };
};
var baseAry = function(func, n) {
return n == 2
? function(a, b) { return func(a, b); }
: function(a) { return func(a); };
};
var cloneArray = function(array) {
var length = array ? array.length : 0,
result = Array(length);
while (length--) {
result[length] = array[length];
}
return result;
};
var createCloner = function(func) {
return function(object) {
return func({}, object);
};
};
var immutWrap = function(func, cloner) {
return overArg(func, cloner, true);
};
var iterateeAry = function(func, n) {
return overArg(func, function(func) {
return baseAry(func, n);
});
};
var iterateeRearg = function(func, indexes) {
return overArg(func, function(func) {
var n = indexes.length;
return baseArity(rearg(baseAry(func, n), indexes), n);
});
};
var overArg = function(func, iteratee, retArg) {
return function() {
var length = arguments.length,
args = Array(length);
while (length--) {
args[length] = arguments[length];
}
args[0] = iteratee(args[0]);
var result = func.apply(undefined, args);
return retArg ? args[0] : result;
};
};
var aryMethodKeys = keys(mapping.aryMethod);
var wrappers = {
'castArray': function(castArray) {
return function() {
var value = arguments[0];
return isArray(value)
? castArray(cloneArray(value))
: castArray.apply(undefined, arguments);
};
},
'iteratee': function(iteratee) {
return function() {
var func = arguments[0],
arity = arguments[1];
arity = arguments[1],
result = iteratee(func, arity),
length = result.length;
arity = arity > 2 ? (arity - 2) : 1;
func = iteratee(func);
var length = func.length;
return (length && length <= arity) ? func : baseAry(func, arity);
if (config.cap && typeof arity == 'number') {
arity = arity > 2 ? (arity - 2) : 1;
return (length && length <= arity) ? result : baseAry(result, arity);
}
return result;
};
},
'mixin': function(mixin) {
@@ -143,43 +215,184 @@ function baseConvert(util, name, func) {
},
'runInContext': function(runInContext) {
return function(context) {
return baseConvert(util, runInContext(context));
return baseConvert(util, runInContext(context), options);
};
}
};
var wrap = function(name, func) {
var wrapper = wrappers[name];
if (wrapper) {
return wrapper(func);
}
if (mutateMap.array[name]) {
func = immutWrap(func, cloneArray);
}
else if (mutateMap.object[name]) {
func = immutWrap(func, createCloner(func));
}
else if (mutateMap.set[name]) {
func = immutWrap(func, cloneDeep);
}
var result;
each(mapping.caps, function(cap) {
each(mapping.aryMethod[cap], function(otherName) {
if (name == otherName) {
var indexes = mapping.iterateeRearg[name],
n = !isLib && mapping.aryIteratee[name];
/*--------------------------------------------------------------------------*/
result = ary(func, cap);
if (cap > 1 && !mapping.skipRearg[name]) {
result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[cap]);
/**
* Creates a clone of `object` by `path`.
*
* @private
* @param {Object} object The object to clone.
* @param {Array|string} path The path to clone by.
* @returns {Object} Returns the cloned object.
*/
function cloneByPath(object, path) {
path = toPath(path);
var index = -1,
length = path.length,
result = clone(Object(object)),
nested = result;
while (nested != null && ++index < length) {
var key = path[index],
value = nested[key];
if (value != null) {
nested[key] = clone(Object(value));
}
nested = nested[key];
}
return result;
}
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
* version with conversion `options` applied.
*
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
function convertLib(options) {
return _.runInContext.convert(options)(undefined);
}
/**
* Create a converter function for `func` of `name`.
*
* @param {string} name The name of the function to convert.
* @param {Function} func The function to convert.
* @returns {Function} Returns the new converter function.
*/
function createConverter(name, func) {
var oldOptions = options;
return function(options) {
var newUtil = isLib ? pristine : helpers,
newFunc = isLib ? pristine[name] : func,
newOptions = assign(assign({}, oldOptions), options);
return baseConvert(newUtil, name, newFunc, newOptions);
};
}
/**
* Creates a function that wraps `func` to invoke its iteratee, with up to `n`
* arguments, ignoring any additional arguments.
*
* @private
* @param {Function} func The function to cap iteratee arguments for.
* @param {number} n The arity cap.
* @returns {Function} Returns the new function.
*/
function iterateeAry(func, n) {
return overArg(func, function(func) {
return typeof func == 'function' ? baseAry(func, n) : func;
});
}
/**
* Creates a function that wraps `func` to invoke its iteratee with arguments
* arranged according to the specified `indexes` where the argument value at
* the first index is provided as the first argument, the argument value at
* the second index is provided as the second argument, and so on.
*
* @private
* @param {Function} func The function to rearrange iteratee arguments for.
* @param {number[]} indexes The arranged argument indexes.
* @returns {Function} Returns the new function.
*/
function iterateeRearg(func, indexes) {
return overArg(func, function(func) {
var n = indexes.length;
return baseArity(rearg(baseAry(func, n), indexes), n);
});
}
/**
* Creates a function that invokes `func` with its first argument passed
* thru `transform`.
*
* @private
* @param {Function} func The function to wrap.
* @param {...Function} transform The functions to transform the first argument.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function() {
var length = arguments.length;
if (!length) {
return func();
}
var args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var index = config.rearg ? 0 : (length - 1);
args[index] = transform(args[index]);
return func.apply(undefined, args);
};
}
/**
* Creates a function that wraps `func` and applys the conversions
* rules by `name`.
*
* @private
* @param {string} name The name of the function to wrap.
* @param {Function} func The function to wrap.
* @returns {Function} Returns the converted function.
*/
function wrap(name, func) {
name = mapping.aliasToReal[name] || name;
var result,
wrapped = func,
wrapper = wrappers[name];
if (wrapper) {
wrapped = wrapper(func);
}
else if (config.immutable) {
if (mutateMap.array[name]) {
wrapped = immutWrap(func, cloneArray);
}
else if (mutateMap.object[name]) {
wrapped = immutWrap(func, createCloner(func));
}
else if (mutateMap.set[name]) {
wrapped = immutWrap(func, cloneByPath);
}
}
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(otherName) {
if (name == otherName) {
var aryN = !isLib && mapping.iterateeAry[name],
reargIndexes = mapping.iterateeRearg[name],
spreadStart = mapping.methodSpread[name];
result = wrapped;
if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
result = spreadStart === undefined
? ary(result, aryKey)
: spread(result, spreadStart);
}
if (indexes) {
result = iterateeRearg(result, indexes);
} else if (n) {
result = iterateeAry(result, n);
if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) {
result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]);
}
if (cap > 1) {
result = curry(result, cap);
if (config.cap) {
if (reargIndexes) {
result = iterateeRearg(result, reargIndexes);
} else if (aryN) {
result = iterateeAry(result, aryN);
}
}
if (forceCurry || (config.curry && aryKey > 1)) {
forceCurry && console.log(forceCurry, name);
result = curry(result, aryKey);
}
return false;
}
@@ -187,35 +400,65 @@ function baseConvert(util, name, func) {
return !result;
});
result || (result = func);
result || (result = wrapped);
if (result == func) {
result = forceCurry ? curry(result, 1) : function() {
return func.apply(this, arguments);
};
}
result.convert = createConverter(name, func);
if (mapping.placeholder[name]) {
result.placeholder = placeholder;
setPlaceholder = true;
result.placeholder = func.placeholder = placeholder;
}
return result;
};
}
if (!isLib) {
/*--------------------------------------------------------------------------*/
if (!isObj) {
return wrap(name, func);
}
// Iterate over methods for the current ary cap.
var _ = func;
// Convert methods by ary cap.
var pairs = [];
each(mapping.caps, function(cap) {
each(mapping.aryMethod[cap], function(key) {
var func = _[mapping.key[key] || key];
each(aryMethodKeys, function(aryKey) {
each(mapping.aryMethod[aryKey], function(key) {
var func = _[mapping.remap[key] || key];
if (func) {
pairs.push([key, wrap(key, func)]);
}
});
});
// Convert remaining methods.
each(keys(_), function(key) {
var func = _[key];
if (typeof func == 'function') {
var length = pairs.length;
while (length--) {
if (pairs[length][0] == key) {
return;
}
}
func.convert = createConverter(key, func);
pairs.push([key, func]);
}
});
// Assign to `_` leaving `_.prototype` unchanged to allow chaining.
each(pairs, function(pair) {
_[pair[0]] = pair[1];
});
// Wrap the lodash method and its aliases.
_.convert = convertLib;
if (setPlaceholder) {
_.placeholder = placeholder;
}
// Assign aliases.
each(keys(_), function(key) {
each(mapping.alias[key] || [], function(alias) {
each(mapping.realToAlias[key] || [], function(alias) {
_[alias] = _[key];
});
});

View File

@@ -1,13 +1,18 @@
var baseConvert = require('./_baseConvert');
/**
* Converts `lodash` to an immutable auto-curried iteratee-first data-last version.
* Converts `lodash` to an immutable auto-curried iteratee-first data-last
* version with conversion `options` applied.
*
* @param {Function} lodash The lodash function.
* @param {Function} lodash The lodash function to convert.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
function browserConvert(lodash) {
return baseConvert(lodash, lodash);
function browserConvert(lodash, options) {
return baseConvert(lodash, lodash, options);
}
if (typeof _ == 'function') {
_ = browserConvert(_.runInContext());
}
module.exports = browserConvert;

View File

@@ -1,202 +1,291 @@
module.exports = {
/** Used to map aliases to their real names. */
exports.aliasToReal = {
/** Used to map method names to their aliases. */
'alias': {
'ary': ['nAry'],
'assignIn': ['extend'],
'assignInWith': ['extendWith'],
'filter': ['whereEq'],
'flatten': ['unnest'],
'flow': ['pipe'],
'flowRight': ['compose'],
'forEach': ['each'],
'forEachRight': ['eachRight'],
'get': ['path', 'prop'],
'getOr': ['pathOr', 'propOr'],
'head': ['first'],
'includes': ['contains'],
'initial': ['init'],
'isEqual': ['equals'],
'mapValues': ['mapObj'],
'matchesProperty': ['pathEq'],
'omit': ['dissoc', 'omitAll'],
'overArgs': ['useWith'],
'overEvery': ['allPass'],
'overSome': ['somePass'],
'pick': ['pickAll'],
'propertyOf': ['propOf'],
'rest': ['unapply'],
'some': ['all'],
'spread': ['apply'],
'zipObject': ['zipObj']
// Lodash aliases.
'each': 'forEach',
'eachRight': 'forEachRight',
'entries': 'toPairs',
'entriesIn': 'toPairsIn',
'extend': 'assignIn',
'extendWith': 'assignInWith',
'first': 'head',
// Ramda aliases.
'__': 'placeholder',
'all': 'every',
'allPass': 'overEvery',
'always': 'constant',
'any': 'some',
'anyPass': 'overSome',
'apply': 'spread',
'assoc': 'set',
'assocPath': 'set',
'complement': 'negate',
'compose': 'flowRight',
'contains': 'includes',
'dissoc': 'unset',
'dissocPath': 'unset',
'equals': 'isEqual',
'identical': 'eq',
'init': 'initial',
'invertObj': 'invert',
'juxt': 'over',
'mapObj': 'mapValues',
'omitAll': 'omit',
'nAry': 'ary',
'path': 'get',
'pathEq': 'matchesProperty',
'pathOr': 'getOr',
'pickAll': 'pick',
'pipe': 'flow',
'prop': 'get',
'propOf': 'propertyOf',
'propOr': 'getOr',
'unapply': 'rest',
'unnest': 'flatten',
'useWith': 'overArgs',
'whereEq': 'filter',
'zipObj': 'zipObject'
};
/** Used to map ary to method names. */
exports.aryMethod = {
'1': [
'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
'uniqueId', 'words'
],
'2': [
'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
'eq', 'every', 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast',
'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'omit', 'omitBy',
'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', 'partialRight',
'partition', 'pick', 'pickBy', 'pull', 'pullAll', 'pullAt', 'random', 'range',
'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'restFrom', 'result',
'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex',
'sortedLastIndexOf', 'sortedUniqBy', 'split', 'spreadFrom', 'startsWith',
'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap',
'throttle', 'thru', 'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart',
'truncate', 'union', 'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without',
'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep'
],
'3': [
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs',
'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'mergeWith',
'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy',
'pullAllWith', 'reduce', 'reduceRight', 'replace', 'set', 'slice',
'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith',
'update', 'xorBy', 'xorWith', 'zipWith'
],
'4': [
'fill', 'setWith', 'updateWith'
]
};
/** Used to map ary to rearg configs. */
exports.aryRearg = {
'2': [1, 0],
'3': [2, 0, 1],
'4': [3, 2, 0, 1]
};
/** Used to map method names to their iteratee ary. */
exports.iterateeAry = {
'dropRightWhile': 1,
'dropWhile': 1,
'every': 1,
'filter': 1,
'find': 1,
'findIndex': 1,
'findKey': 1,
'findLast': 1,
'findLastIndex': 1,
'findLastKey': 1,
'flatMap': 1,
'flatMapDeep': 1,
'flatMapDepth': 1,
'forEach': 1,
'forEachRight': 1,
'forIn': 1,
'forInRight': 1,
'forOwn': 1,
'forOwnRight': 1,
'map': 1,
'mapKeys': 1,
'mapValues': 1,
'partition': 1,
'reduce': 2,
'reduceRight': 2,
'reject': 1,
'remove': 1,
'some': 1,
'takeRightWhile': 1,
'takeWhile': 1,
'times': 1,
'transform': 2
};
/** Used to map method names to iteratee rearg configs. */
exports.iterateeRearg = {
'mapKeys': [1]
};
/** Used to map method names to rearg configs. */
exports.methodRearg = {
'assignInWith': [1, 2, 0],
'assignWith': [1, 2, 0],
'getOr': [2, 1, 0],
'isEqualWith': [1, 2, 0],
'isMatchWith': [2, 1, 0],
'mergeWith': [1, 2, 0],
'padChars': [2, 1, 0],
'padCharsEnd': [2, 1, 0],
'padCharsStart': [2, 1, 0],
'pullAllBy': [2, 1, 0],
'pullAllWith': [2, 1, 0],
'setWith': [3, 1, 2, 0],
'sortedIndexBy': [2, 1, 0],
'sortedLastIndexBy': [2, 1, 0],
'updateWith': [3, 1, 2, 0],
'zipWith': [1, 2, 0]
};
/** Used to map method names to spread configs. */
exports.methodSpread = {
'invokeArgs': 2,
'invokeArgsMap': 2,
'over': 0,
'overArgs': 1,
'overEvery': 0,
'overSome': 0,
'partial': 1,
'partialRight': 1,
'without': 1
};
/** Used to identify methods which mutate arrays or objects. */
exports.mutate = {
'array': {
'fill': true,
'pull': true,
'pullAll': true,
'pullAllBy': true,
'pullAllWith': true,
'pullAt': true,
'remove': true,
'reverse': true
},
/** Used to map method names to their iteratee ary. */
'aryIteratee': {
'assignWith': 2,
'assignInWith': 2,
'cloneDeepWith': 1,
'cloneWith': 1,
'dropRightWhile': 1,
'dropWhile': 1,
'every': 1,
'filter': 1,
'find': 1,
'findIndex': 1,
'findKey': 1,
'findLast': 1,
'findLastIndex': 1,
'findLastKey': 1,
'flatMap': 1,
'forEach': 1,
'forEachRight': 1,
'forIn': 1,
'forInRight': 1,
'forOwn': 1,
'forOwnRight': 1,
'isEqualWith': 2,
'isMatchWith': 2,
'map': 1,
'mapKeys': 1,
'mapValues': 1,
'partition': 1,
'reduce': 2,
'reduceRight': 2,
'reject': 1,
'remove': 1,
'some': 1,
'takeRightWhile': 1,
'takeWhile': 1,
'times': 1,
'transform': 2
},
/** Used to map ary to method names. */
'aryMethod': {
1:[
'attempt', 'ceil', 'create', 'curry', 'curryRight', 'floor', 'fromPairs',
'invert', 'iteratee', 'memoize', 'method', 'methodOf', 'mixin', 'over',
'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext',
'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words'
],
2:[
'add', 'after', 'ary', 'assign', 'at', 'before', 'bind', 'bindKey',
'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
'every', 'extend', 'filter', 'find', 'find', 'findIndex', 'findKey',
'findLast', 'findLastIndex', 'findLastKey', 'flatMap', 'forEach',
'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',
'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',
'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf',
'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', 'maxBy',
'merge', 'minBy', 'omit', 'omitBy', 'orderBy', 'overArgs', 'pad', 'padEnd',
'padStart', 'parseInt', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
'repeat', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
'split', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile',
'takeWhile', 'tap', 'throttle', 'thru', 'times', 'truncate', 'union', 'uniqBy',
'uniqWith', 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject'
],
3:[
'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'isEqualWith',
'isMatchWith', 'mergeWith', 'pullAllBy', 'reduce', 'reduceRight', 'replace',
'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy',
'unionWith', 'xorBy', 'xorWith', 'zipWith'
],
4:[
'fill', 'setWith'
]
},
/** Used to map ary to rearg configs. */
'aryRearg': {
2: [1, 0],
3: [2, 1, 0],
4: [3, 2, 0, 1]
},
/** Used to map method names to iteratee rearg configs. */
'iterateeRearg': {
'findKey': [1],
'findLastKey': [1],
'mapKeys': [1]
},
/** Used to map method names to rearg configs. */
'methodRearg': {
'clamp': [2, 0, 1],
'reduce': [2, 0, 1],
'reduceRight': [2, 0, 1],
'set': [2, 0, 1],
'setWith': [3, 1, 2, 0],
'slice': [2, 0, 1],
'transform': [2, 0, 1]
},
/** Used to iterate `mapping.aryMethod` keys. */
'caps': [1, 2, 3, 4],
/** Used to map keys to other keys. */
'key': {
'curryN': 'curry',
'curryRightN': 'curryRight',
'getOr': 'get'
},
/** Used to identify methods which mutate arrays or objects. */
'mutate': {
'array': {
'fill': true,
'pull': true,
'pullAll': true,
'pullAllBy': true,
'pullAt': true,
'remove': true,
'reverse': true
},
'object': {
'assign': true,
'assignIn': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'merge': true,
'mergeWith': true
},
'set': {
'set': true,
'setWith': true
}
},
/** Used to track methods with placeholder support */
'placeholder': {
'bind': true,
'bindKey': true,
'curry': true,
'curryRight': true,
'partial': true,
'partialRight': true
},
/** Used to track methods that skip `_.rearg`. */
'skipRearg': {
'object': {
'assign': true,
'assignIn': true,
'concat': true,
'assignInWith': true,
'assignWith': true,
'defaults': true,
'defaultsDeep': true,
'difference': true,
'matchesProperty': true,
'merge': true,
'random': true,
'range': true,
'rangeRight': true,
'zip': true,
'zipObject': true
'mergeWith': true
},
'set': {
'set': true,
'setWith': true,
'unset': true,
'update': true,
'updateWith': true
}
};
/** Used to track methods with placeholder support */
exports.placeholder = {
'bind': true,
'bindKey': true,
'curry': true,
'curryRight': true,
'partial': true,
'partialRight': true
};
/** Used to map real names to their aliases. */
exports.realToAlias = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
object = exports.aliasToReal,
result = {};
for (var key in object) {
var value = object[key];
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}
return result;
}());
/** Used to map method names to other names. */
exports.remap = {
'curryN': 'curry',
'curryRightN': 'curryRight',
'getOr': 'get',
'invokeArgs': 'invoke',
'invokeArgsMap': 'invokeMap',
'padChars': 'pad',
'padCharsEnd': 'padEnd',
'padCharsStart': 'padStart',
'restFrom': 'rest',
'spreadFrom': 'spread',
'trimChars': 'trim',
'trimCharsEnd': 'trimEnd',
'trimCharsStart': 'trimStart'
};
/** Used to track methods that skip fixing their arity. */
exports.skipFixed = {
'castArray': true,
'flow': true,
'flowRight': true,
'iteratee': true,
'mixin': true,
'runInContext': true
};
/** Used to track methods that skip rearranging arguments. */
exports.skipRearg = {
'add': true,
'assign': true,
'assignIn': true,
'bind': true,
'bindKey': true,
'concat': true,
'difference': true,
'divide': true,
'eq': true,
'gt': true,
'gte': true,
'isEqual': true,
'lt': true,
'lte': true,
'matchesProperty': true,
'merge': true,
'multiply': true,
'overArgs': true,
'partial': true,
'partialRight': true,
'random': true,
'range': true,
'rangeRight': true,
'subtract': true,
'without': true,
'zip': true,
'zipObject': true
};

6
fp/placeholder.js Normal file
View File

@@ -0,0 +1,6 @@
/**
* The default argument placeholder value for methods.
*
* @type {Object}
*/
module.exports = {};

View File

@@ -4,23 +4,23 @@ var _ = require('lodash'),
fs = require('fs-extra'),
uglify = require('uglify-js');
var uglifyOptions = require('./uglify.options.js');
var uglifyOptions = require('./uglify.options');
/*----------------------------------------------------------------------------*/
function minify(inpath, outpath, callback, options) {
if (_.isFunction(outpath)) {
function minify(srcPath, destPath, callback, options) {
if (_.isFunction(destPath)) {
if (_.isObject(callback)) {
options = callback;
}
callback = outpath;
outpath = undefined;
callback = destPath;
destPath = undefined;
}
if (!outpath) {
outpath = inpath.replace(/(?=\.js$)/, '.min');
if (!destPath) {
destPath = srcPath.replace(/(?=\.js$)/, '.min');
}
var output = uglify.minify(inpath, _.defaults(options || {}, uglifyOptions));
fs.writeFile(outpath, output.code, 'utf-8', callback);
var output = uglify.minify(srcPath, _.defaults(options || {}, uglifyOptions));
fs.writeFile(destPath, output.code, 'utf-8', callback);
}
module.exports = minify;

36
lib/common/util.js Normal file
View File

@@ -0,0 +1,36 @@
'use strict';
var _ = require('lodash'),
fs = require('fs-extra'),
glob = require('glob'),
path = require('path');
var minify = require('../common/minify.js');
/*----------------------------------------------------------------------------*/
function copyFile(srcPath, destPath) {
return _.partial(fs.copy, srcPath, destPath);
}
function globTemplate(pattern) {
return _.transform(glob.sync(pattern), function(result, filePath) {
var key = path.basename(filePath, path.extname(filePath));
result[key] = _.template(fs.readFileSync(filePath, 'utf8'));
}, {});
}
function minFile(srcPath, destPath) {
return _.partial(minify, srcPath, destPath);
}
function writeFile(filePath, data) {
return _.partial(fs.writeFile, filePath, data);
}
module.exports = {
'copyFile': copyFile,
'globTemplate': globTemplate,
'minFile': minFile,
'writeFile': writeFile
};

View File

@@ -5,7 +5,7 @@ var _ = require('lodash'),
path = require('path'),
webpack = require('webpack');
var minify = require('../common/minify.js');
var util = require('../common/util');
var basePath = path.join(__dirname, '..', '..'),
distPath = path.join(basePath, 'dist'),
@@ -44,8 +44,12 @@ function onComplete(error) {
}
}
async.series([
_.partial(webpack, mappingConfig),
_.partial(webpack, fpConfig),
_.partial(minify, path.join(distPath, filename))
], onComplete);
function build() {
async.series([
_.partial(webpack, mappingConfig),
_.partial(webpack, fpConfig),
util.minFile(path.join(distPath, filename))
], onComplete);
}
build();

64
lib/fp/build-doc.js Normal file
View File

@@ -0,0 +1,64 @@
'use strict';
var _ = require('lodash'),
fs = require('fs-extra'),
path = require('path'),
util = require('../common/util');
var mapping = require('../../fp/_mapping'),
templatePath = path.join(__dirname, 'template/doc'),
template = util.globTemplate(path.join(templatePath, '*.jst'));
var argNames = ['a', 'b', 'c', 'd'];
var templateData = {
'mapping': mapping,
'toArgOrder': toArgOrder,
'toFuncList': toFuncList
};
function toArgOrder(array) {
var reordered = [];
_.each(array, function(newIndex, index) {
reordered[newIndex] = argNames[index];
});
return '`(' + reordered.join(', ') + ')`';
}
function toFuncList(array) {
var chunks = _.chunk(array.slice().sort(), 5),
lastChunk = _.last(chunks),
last = lastChunk ? lastChunk.pop() : undefined;
chunks = _.reject(chunks, _.isEmpty);
lastChunk = _.last(chunks);
var result = '`' + _.map(chunks, function(chunk) {
return chunk.join('`, `') + '`';
}).join(',\n`');
if (last == null) {
return result;
}
if (_.size(chunks) > 1 || _.size(lastChunk) > 1) {
result += ',';
}
result += ' &';
result += _.size(lastChunk) < 5 ? ' ' : '\n';
return result + '`' + last + '`';
}
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build(target) {
target = path.resolve(target);
fs.writeFile(target, template.wiki(templateData), onComplete);
}
build(_.last(process.argv));

120
lib/fp/build-modules.js Normal file
View File

@@ -0,0 +1,120 @@
'use strict';
var _ = require('lodash'),
async = require('async'),
glob = require('glob'),
path = require('path');
var util = require('../common/util');
var mapping = require('../../fp/_mapping'),
templatePath = path.join(__dirname, 'template/modules'),
template = util.globTemplate(path.join(templatePath, '*.jst'));
var aryMethods = _.union(
mapping.aryMethod[1],
mapping.aryMethod[2],
mapping.aryMethod[3],
mapping.aryMethod[4]
);
var categories = [
'array',
'collection',
'date',
'function',
'lang',
'math',
'number',
'object',
'seq',
'string',
'util'
];
var ignored = [
'_*.js',
'core.js',
'core.min.js',
'fp.js',
'index.js',
'lodash.js',
'lodash.min.js'
];
function isAlias(funcName) {
return _.has(mapping.aliasToReal, funcName);
}
function isCategory(funcName) {
return _.includes(categories, funcName);
}
function isThru(funcName) {
return !_.includes(aryMethods, funcName);
}
function getTemplate(moduleName) {
var data = {
'name': _.result(mapping.aliasToReal, moduleName, moduleName),
'mapping': mapping
};
if (isAlias(moduleName)) {
return template.alias(data);
}
if (isCategory(moduleName)) {
return template.category(data);
}
if (isThru(moduleName)) {
return template.thru(data);
}
return template.module(data);
}
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build(target) {
target = path.resolve(target);
var fpPath = path.join(target, 'fp');
// Glob existing lodash module paths.
var modulePaths = glob.sync(path.join(target, '*.js'), {
'nodir': true,
'ignore': ignored.map(function(filename) {
return path.join(target, filename);
})
});
// Add FP alias and remapped module paths.
_.each([mapping.aliasToReal, mapping.remap], function(data) {
_.forOwn(data, function(realName, alias) {
var modulePath = path.join(target, alias + '.js');
if (!_.includes(modulePaths, modulePath)) {
modulePaths.push(modulePath);
}
});
});
var actions = modulePaths.map(function(modulePath) {
var moduleName = path.basename(modulePath, '.js');
return util.writeFile(path.join(fpPath, moduleName + '.js'), getTemplate(moduleName));
});
actions.unshift(util.copyFile(path.join(__dirname, '../../fp'), fpPath));
actions.push(util.writeFile(path.join(fpPath, '_falseOptions.js'), template._falseOptions()));
actions.push(util.writeFile(path.join(fpPath, '_util.js'), template._util()));
actions.push(util.writeFile(path.join(target, 'fp.js'), template.fp()));
actions.push(util.writeFile(path.join(fpPath, 'convert.js'), template.convert()));
async.series(actions, onComplete);
}
build(_.last(process.argv));

View File

@@ -1,10 +0,0 @@
module.exports = {
'ary': require('../ary'),
'cloneDeep': require('../cloneDeep'),
'curry': require('../curry'),
'forEach': require('../internal/arrayEach'),
'isFunction': require('../isFunction'),
'iteratee': require('../iteratee'),
'keys': require('../internal/baseKeys'),
'rearg': require('../rearg')
};

View File

@@ -0,0 +1,184 @@
## lodash/fp
The `lodash/fp` module is an instance of `lodash` with its methods wrapped to
produce immutable auto-curried iteratee-first data-last methods.
## Installation
In a browser:
```html
<script src='path/to/lodash.js'></script>
<script src='path/to/lodash.fp.js'></script>
```
In Node.js:
```js
// Load the fp build.
var fp = require('lodash/fp');
// Load a method category.
var object = require('lodash/fp/object');
// Load a single method for smaller builds with browserify/rollup/webpack.
var extend = require('lodash/fp/extend');
```
## Mapping
Immutable auto-curried iteratee-first data-last methods sound great, but what
does that really mean for each method? Below is a breakdown of the mapping used
to convert each method.
#### Capped Iteratee Arguments
Iteratee arguments are capped to avoid gotchas with variadic iteratees.
```js
// The `lodash/map` iteratee recieves three arguments: (value, index|key, collection).
_.map(['6', '8', '10'], parseInt);
// → [6, NaN, 2]
// The `lodash/fp/map` iteratee is capped at one argument: (value).
fp.map(parseInt)(['6', '8', '10']);
// → [6, 8, 10]
```
Methods that cap iteratees to one argument:<br>
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 1)))) %>
Methods that cap iteratees to two arguments:<br>
<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %>
The iteratee of `mapKeys` is invoked with one argument: (key)
#### Fixed Arity
Methods have fixed arities to support auto-currying.
```js
// The `lodash/padStart` method accepts an optional `chars` param.
_.padStart('a', 3, '-')
// → '--a'
// The `lodash/fp/padStart` method does not.
fp.padStart(3)('a');
// → ' a'
fp.padCharsStart('-')(3)('a');
// → '--a'
```
Methods with a fixed arity of one:<br>
<%= toFuncList(mapping.aryMethod[1]) %>
Methods with a fixed arity of two:<br>
<%= toFuncList(mapping.aryMethod[2]) %>
Methods with a fixed arity of three:<br>
<%= toFuncList(mapping.aryMethod[3]) %>
Methods with a fixed arity of four:<br>
<%= toFuncList(mapping.aryMethod[4]) %>
#### Rearranged Arguments
Method arguments are rearranged to make composition easier.
```js
// The `lodash/filter` method accepts (collection, iteratee).
var compact = _.partial(_.filter, _, Boolean);
compact(['a', null, 'c']);
// → ['a', 'c']
// The `lodash/fp/filter` method accepts (iteratee, collection)
var compact = fp.filter(Boolean);
compact(['a', null, 'c']);
// → ['a', 'c']
```
Methods with a fixed arity of two have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[2]) %>
Methods with a fixed arity of three have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[3]) %>
Methods with a fixed arity of four have an argument order of:<br>
<%= toArgOrder(mapping.aryRearg[4]) %>
Methods with custom argument orders:<br>
<%= _.map(_.keys(mapping.methodRearg), function(methodName) {
var orders = mapping.methodRearg[methodName];
return ' * `_.' + methodName + '` has an order of ' + toArgOrder(orders);
}).join('\n') %>
Methods with unchanged argument orders:<br>
<%= toFuncList(_.keys(mapping.skipRearg)) %>
The methods `partial` & `partialRight` accept an array of arguments to partially
apply as their second parameter.
#### New Methods
Not all variadic methods have corresponding new method variants. Feel free to
[request](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md#feature-requests)
any additions.
Methods created to accommodate Lodashs variadic methods:<br>
<%= toFuncList(_.keys(mapping.remap)) %>
#### Aliases
There are <%= _.size(mapping.aliasToReal) %> method aliases:<br>
<%= _.map(_.keys(mapping.aliasToReal).sort(), function(alias) {
var realName = mapping.aliasToReal[alias];
return ' * `_.' + alias + '` is an alias of `_.' + realName + '`';
}).join('\n') %>
## Chaining
The `lodash/fp` module **does not** convert chain sequence methods. See
[Izaak Schroeders article](https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba)
for more details.
## Convert
Although `lodash/fp` & its method modules come pre-converted, there are times
when you may want to customize the conversion. Thats when the `convert` method
comes in handy.
```js
// Every option is `true` by default.
var _fp = fp.convert({
// Specify capping iteratee arguments.
'cap': true,
// Specify currying.
'curry': true,
// Specify fixed arity.
'fixed': true,
// Specify immutable operations.
'immutable': true,
// Specify rearranging arguments.
'rearg': true
});
// The `convert` method is available on each method too.
var mapValuesWithKey = fp.mapValues.convert({ 'cap': false });
// Heres an example of disabling iteratee argument caps to access the `key` param.
mapValuesWithKey(function(value, key) {
return key == 'a' ? -1 : value;
})({ 'a': 1, 'b': 1 });
// => { 'a': -1, 'b': 1 }
```
Manual conversions are also possible with the `convert` module.
```js
var convert = require('lodash/fp/convert');
// Convert by name.
var assign = convert('assign', require('lodash.assign'));
// Convert by object.
var fp = convert({
'assign': require('lodash.assign'),
'chunk': require('lodash.chunk')
});
// Convert by `lodash` instance.
var fp = convert(lodash.runInContext());
```

View File

@@ -0,0 +1,7 @@
module.exports = {
'cap': false,
'curry': false,
'fixed': false,
'immutable': false,
'rearg': false
};

View File

@@ -0,0 +1,14 @@
module.exports = {
'ary': require('../ary'),
'assign': require('../_baseAssign'),
'clone': require('../clone'),
'curry': require('../curry'),
'forEach': require('../_arrayEach'),
'isArray': require('../isArray'),
'isFunction': require('../isFunction'),
'iteratee': require('../iteratee'),
'keys': require('../_baseKeys'),
'rearg': require('../rearg'),
'spread': require('../spread'),
'toPath': require('../toPath')
};

View File

@@ -0,0 +1 @@
module.exports = require('./<%= name %>');

View File

@@ -0,0 +1,2 @@
var convert = require('./convert');
module.exports = convert(require('../<%= name %>'));

View File

@@ -3,14 +3,16 @@ var baseConvert = require('./_baseConvert'),
/**
* Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
* version. If `name` is an object its methods will be converted.
* version with conversion `options` applied. If `name` is an object its methods
* will be converted.
*
* @param {string} name The name of the function to wrap.
* @param {Function} [func] The function to wrap.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function|Object} Returns the converted function or object.
*/
function convert(name, func) {
return baseConvert(util, name, func);
function convert(name, func, options) {
return baseConvert(util, name, func, options);
}
module.exports = convert;

View File

@@ -0,0 +1,2 @@
var _ = require('./lodash.min').runInContext();
module.exports = require('./fp/_baseConvert')(_, _);

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -2,10 +2,9 @@
var _ = require('lodash'),
async = require('async'),
fs = require('fs-extra'),
path = require('path');
var minify = require('../common/minify.js');
var util = require('../common/util');
var basePath = path.join(__dirname, '..', '..'),
distPath = path.join(basePath, 'dist'),
@@ -22,7 +21,11 @@ function onComplete(error) {
}
}
async.series([
_.partial(fs.copy, baseLodash, distLodash),
_.partial(minify, distLodash)
], onComplete);
function build() {
async.series([
util.copyFile(baseLodash, distLodash),
util.minFile(distLodash)
], onComplete);
}
build();

60
lib/main/build-doc.js Normal file
View File

@@ -0,0 +1,60 @@
'use strict';
var _ = require('lodash'),
docdown = require('docdown'),
fs = require('fs-extra'),
path = require('path');
var basePath = path.join(__dirname, '..', '..'),
docPath = path.join(basePath, 'doc'),
readmePath = path.join(docPath, 'README.md');
var pkg = require('../../package.json'),
version = pkg.version;
var config = {
'base': {
'entryLinks': [
'<% if (name == "templateSettings" || !/^(?:methods|properties|seq)$/i.test(category)) {' +
'print("[&#x24C3;](https://www.npmjs.com/package/lodash." + name.toLowerCase() + " \\"See the npm package\\")")' +
'} %>'
],
'path': path.join(basePath, 'lodash.js'),
'title': '<a href="https://lodash.com/">lodash</a> <span>v' + version + '</span>',
'toc': 'categories',
'url': 'https://github.com/lodash/lodash/blob/' + version + '/lodash.js'
},
'github': {
'hash': 'github'
},
'site': {
'tocLink': '#docs'
}
};
function postprocess(string) {
// Fix docdown bugs.
return string
// Repair the default value of `chars`.
// See https://github.com/eslint/doctrine/issues/157 for more details.
.replace(/\bchars=''/g, "chars=' '")
// Wrap symbol property identifiers in brackets.
.replace(/\.(Symbol\.(?:[a-z]+[A-Z]?)+)/g, '[$1]');
}
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build(type) {
var options = _.defaults({}, config.base, config[type]),
markdown = docdown(options);
fs.writeFile(readmePath, postprocess(markdown), onComplete);
}
build(_.last(process.argv));

34
lib/main/build-modules.js Normal file
View File

@@ -0,0 +1,34 @@
'use strict';
var _ = require('lodash'),
async = require('async'),
path = require('path');
var util = require('../common/util');
var basePath = path.join(__dirname, '..', '..'),
distPath = path.join(basePath, 'dist');
var filePairs = [
[path.join(distPath, 'lodash.core.js'), 'core.js'],
[path.join(distPath, 'lodash.core.min.js'), 'core.min.js'],
[path.join(distPath, 'lodash.min.js'), 'lodash.min.js']
];
/*----------------------------------------------------------------------------*/
function onComplete(error) {
if (error) {
throw error;
}
}
function build(target) {
var actions = _.map(filePairs, function(pair) {
return util.copyFile(pair[0], path.join(target, pair[1]));
});
async.series(actions, onComplete);
}
build(_.last(process.argv));

4316
lodash.js

File diff suppressed because it is too large Load Diff

View File

@@ -1,35 +1,52 @@
{
"name": "lodash",
"version": "4.0.1",
"main": "lodash.js",
"version": "4.8.1",
"license": "MIT",
"private": true,
"main": "lodash.js",
"devDependencies": {
"async": "^1.5.2",
"chalk": "^1.1.1",
"benchmark": "^2.1.0",
"chalk": "^1.1.3",
"codecov.io": "~0.1.6",
"coveralls": "^2.11.6",
"coveralls": "^2.11.9",
"curl-amd": "~0.8.12",
"docdown": "~0.3.0",
"dojo": "^1.10.4",
"docdown": "~0.5.0",
"dojo": "^1.11.1",
"ecstatic": "^1.4.0",
"fs-extra": "~0.26.4",
"glob": "^6.0.4",
"fs-extra": "~0.26.7",
"glob": "^7.0.3",
"istanbul": "0.4.2",
"jquery": "^2.2.0",
"jscs": "^2.8.0",
"lodash": "^3.10.1",
"jquery": "^2.2.2",
"jscs": "^2.11.0",
"lodash": "4.5.0",
"platform": "^1.3.1",
"qunit-extras": "^1.4.5",
"qunitjs": "~1.20.0",
"request": "^2.67.0",
"requirejs": "^2.1.22",
"sauce-tunnel": "2.3.0",
"uglify-js": "2.6.1",
"webpack": "^1.12.11"
"qunit-extras": "^1.5.0",
"qunitjs": "~1.23.0",
"request": "^2.69.0",
"requirejs": "^2.2.0",
"sauce-tunnel": "^2.4.0",
"uglify-js": "2.6.2",
"webpack": "^1.12.14"
},
"scripts": {
"build": "node lib/main/build-dist.js && node lib/fp/build-dist.js",
"style": "jscs lodash.js lib/**/*.js",
"test": "npm run build && node test/test && node test/test-fp"
"build": "npm run build:main && npm run build:fp",
"build:fp": "node lib/fp/build-dist.js",
"build:fp-modules": "node lib/fp/build-modules.js",
"build:main": "node lib/main/build-dist.js",
"build:main-modules": "node lib/main/build-modules.js",
"doc": "node lib/main/build-doc github",
"doc:fp": "node lib/fp/build-doc",
"doc:site": "node lib/main/build-doc site",
"pretest": "npm run build",
"style": "npm run style:main && npm run style:fp && npm run style:perf && npm run style:test",
"style:fp": "jscs fp/*.js lib/**/*.js",
"style:main": "jscs lodash.js",
"style:perf": "jscs perf/*.js perf/**/*.js",
"style:test": "jscs test/*.js test/**/*.js",
"test": "npm run test:main && npm run test:fp",
"test:fp": "node test/test-fp",
"test:main": "node test/test",
"validate": "npm run style && npm run test"
}
}

View File

@@ -24,9 +24,9 @@
</head>
<body>
<div id="perf-toolbar"></div>
<script src="../node_modules/platform/platform.js"></script>
<script src="../lodash.js"></script>
<script src="../vendor/benchmark.js/benchmark.js"></script>
<script src="../node_modules/platform/platform.js"></script>
<script src="../node_modules/benchmark/benchmark.js"></script>
<script src="../vendor/firebug-lite/src/firebug-lite-debug.js"></script>
<script src="./asset/perf-ui.js"></script>
<script>

View File

@@ -43,11 +43,11 @@
if (!amd) {
try {
result = require('fs').realpathSync(result);
} catch(e) {}
} catch (e) {}
try {
result = require.resolve(result);
} catch(e) {}
} catch (e) {}
}
return result;
}());
@@ -109,7 +109,7 @@
/** Load Benchmark.js. */
var Benchmark = root.Benchmark || (root.Benchmark = (
Benchmark = load('../vendor/benchmark.js/benchmark.js') || root.Benchmark,
Benchmark = load('../node_modules/benchmark/benchmark.js') || root.Benchmark,
Benchmark = Benchmark.Benchmark || Benchmark,
Benchmark.runInContext(lodash.extend({}, root, { '_': lodash }))
));
@@ -565,11 +565,11 @@
suites.push(
Benchmark.Suite('`_.assign`')
.add(buildName, {
'fn': 'lodashAssign({}, object)',
'fn': 'lodashAssign({}, { "a": 1, "b": 2, "c": 3 })',
'teardown': 'function assign(){}'
})
.add(otherName, {
'fn': '_assign({}, object)',
'fn': '_assign({}, { "a": 1, "b": 2, "c": 3 })',
'teardown': 'function assign(){}'
})
);
@@ -577,11 +577,11 @@
suites.push(
Benchmark.Suite('`_.assign` with multiple sources')
.add(buildName, {
'fn': 'lodashAssign({}, object, object)',
'fn': 'lodashAssign({}, { "a": 1, "b": 2 }, { "c": 3, "d": 4 })',
'teardown': 'function assign(){}'
})
.add(otherName, {
'fn': '_assign({}, object, object)',
'fn': '_assign({}, { "a": 1, "b": 2 }, { "c": 3, "d": 4 })',
'teardown': 'function assign(){}'
})
);

View File

@@ -154,13 +154,13 @@
ui.isForeign = RegExp('^(\\w+:)?//').test(build);
// Used to indicate testing a modularized build.
ui.isModularize = /\b(?:amd|commonjs|es6?|node|npm|(index|main)\.js)\b/.test([location.pathname, location.search]);
ui.isModularize = /\b(?:amd|commonjs|es|node|npm|(index|main)\.js)\b/.test([location.pathname, location.search]);
// Used to indicate testing in Sauce Labs' automated test cloud.
ui.isSauceLabs = location.port == '9001';
// Used to indicate that lodash is in strict mode.
ui.isStrict = /\bes6?\b/.test([location.pathname, location.search]);
ui.isStrict = /\bes\b/.test([location.pathname, location.search]);
ui.urlParams = { 'build': build, 'loader': loader };
ui.timing = { 'loadEventEnd': 0 };

View File

@@ -4,8 +4,11 @@ addEventListener('message', function(e) {
if (e.data) {
try {
importScripts('../' + e.data);
} catch(e) {
self._ = { 'VERSION': e.message };
} catch (e) {
var lineNumber = e.lineNumber,
message = (lineNumber == null ? '' : (lineNumber + ': ')) + e.message;
self._ = { 'VERSION': message };
}
postMessage(_.VERSION);
}

View File

@@ -51,6 +51,7 @@
'groupBy',
'includes',
'invert',
'invokeMap',
'keyBy',
'omit',
'partition',

View File

@@ -22,7 +22,7 @@
};
}
</script>
<script src="../node_modules/lodash/index.js"></script>
<script src="../node_modules/lodash/lodash.js"></script>
<script>var lodashStable = _.noConflict();</script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/qunit-extras/qunit-extras.js"></script>
@@ -82,6 +82,22 @@
funcProto._method = noop;
// Set bad shims.
setProperty(Object, '_create', Object.create);
setProperty(Object, 'create', (function() {
function object() {}
return function(prototype) {
if (prototype === Object(prototype)) {
object.prototype = prototype;
var result = new object;
object.prototype = undefined;
}
return result || {};
};
}()));
setProperty(Object, '_getOwnPropertySymbols', Object.getOwnPropertySymbols);
setProperty(Object, 'getOwnPropertySymbols', undefined);
setProperty(objectProto, '_propertyIsEnumerable', propertyIsEnumerable);
setProperty(objectProto, 'propertyIsEnumerable', function(key) {
return !(key == 'valueOf' && this && this.valueOf === 1) && _propertyIsEnumerable.call(this, key);
@@ -103,11 +119,8 @@
setProperty(Map, 'toString', createToString('Map'));
}
setProperty(Object, '_create', Object.create);
setProperty(Object, 'create', noop);
setProperty(Object, '_getOwnPropertySymbols', Object.getOwnPropertySymbols);
setProperty(Object, 'getOwnPropertySymbols', undefined);
setProperty(window, '_Promise', window.Promise);
setProperty(window, 'Promise', noop);
setProperty(window, '_Set', window.Set);
setProperty(window, 'Set', noop);
@@ -131,6 +144,8 @@
var funcProto = Function.prototype,
objectProto = Object.prototype;
setProperty(objectProto, 'propertyIsEnumerable', objectProto._propertyIsEnumerable);
if (Object._create) {
Object.create = Object._create;
} else {
@@ -146,6 +161,11 @@
} else {
setProperty(window, 'Map', undefined);
}
if (_Promise) {
Promise = _Promise;
} else {
setProperty(window, 'Promise', undefined);
}
if (_Set) {
Set = _Set;
} else {
@@ -159,9 +179,8 @@
} else {
setProperty(window, 'WeakMap', undefined);
}
setProperty(objectProto, 'propertyIsEnumerable', objectProto._propertyIsEnumerable);
setProperty(window, '_Map', undefined);
setProperty(window, '_Promise', undefined);
setProperty(window, '_Set', undefined);
setProperty(window, '_Symbol', undefined);
setProperty(window, '_WeakMap', undefined);
@@ -173,9 +192,9 @@
setProperty(window, 'module', document.getElementById('module'));
delete funcProto._method;
delete objectProto._propertyIsEnumerable;
delete Object._create;
delete Object._getOwnPropertySymbols;
delete objectProto._propertyIsEnumerable;
}
// Load lodash to expose it to the bad extensions/shims.
@@ -286,9 +305,9 @@
if (ui.isModularize) {
require(getConfig(), [
'lodash/internal/baseEach',
'lodash/internal/isIndex',
'lodash/internal/isIterateeCall'
'lodash/_baseEach',
'lodash/_isIndex',
'lodash/_isIterateeCall'
], function(baseEach, isIndex, isIterateeCall) {
lodash._baseEach = baseEach;
lodash._isIndex = isIndex;

View File

@@ -1,15 +1,15 @@
#!/usr/bin/env node
'use strict';
var fs = require('fs'),
var _ = require('../lodash'),
fs = require('fs'),
path = require('path');
var args = (args = process.argv)
.slice((args[0] === process.execPath || args[0] === 'node') ? 2 : 0);
var filePath = path.resolve(args[1]),
reLine = /.*/gm,
slice = Array.prototype.slice;
reLine = /.*/gm;
var pattern = (function() {
var result = args[0],
@@ -22,6 +22,6 @@ var pattern = (function() {
/*----------------------------------------------------------------------------*/
fs.writeFileSync(filePath, fs.readFileSync(filePath, 'utf8').replace(pattern, function(match) {
var snippet = slice.call(arguments, -3, -1)[0];
var snippet = _.slice(arguments, -3, -2)[0];
return match.replace(snippet, snippet.replace(reLine, ''));
}));

View File

@@ -97,17 +97,18 @@ var browserNameMap = {
'googlechrome': 'Chrome',
'iehta': 'Internet Explorer',
'ipad': 'iPad',
'iphone': 'iPhone'
'iphone': 'iPhone',
'microsoftedge': 'Edge'
};
/** List of platforms to load the runner on. */
var platforms = [
['Linux', 'android', '5.1'],
['Windows 10', 'chrome', '47'],
['Windows 10', 'chrome', '46'],
['Windows 10', 'firefox', '43'],
['Windows 10', 'firefox', '42'],
['Windows 10', 'microsoftedge', '20.10240'],
['Windows 10', 'chrome', '49'],
['Windows 10', 'chrome', '48'],
['Windows 10', 'firefox', '45'],
['Windows 10', 'firefox', '44'],
['Windows 10', 'microsoftedge', '13'],
['Windows 10', 'internet explorer', '11'],
['Windows 8', 'internet explorer', '10'],
['Windows 7', 'internet explorer', '9'],

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -29,6 +29,12 @@
QUnit.config.hidepassed = true;
QUnit.config.excused = {
'Arrays': {
'chunk': [
'defaults to empty array (chunk size 0)'
],
'difference': [
'can perform an OO-style difference'
],
'drop': [
'is an alias for rest'
],
@@ -99,11 +105,15 @@
'is an alias for first'
],
'uniq': [
'can find the unique values of an array using a custom iterator',
'can find the unique values of an array using a custom iterator without specifying whether array is sorted',
'string iterator works with sorted array',
'can use pluck like iterator',
'uses the result of `iterator` for uniqueness comparisons (unsorted case)',
'`sorted` argument defaults to false when omitted',
'when `iterator` is a string, uses that key for comparisons (unsorted case)',
'uses the result of `iterator` for uniqueness comparisons (sorted case)',
'when `iterator` is a string, uses that key for comparisons (sorted case)',
'can use falsey pluck like iterator'
],
'union': [
'can perform an OO-style union'
]
},
'Chaining': {
@@ -284,6 +294,9 @@
'isMatch': [
'doesnt falsey match constructor on undefined/null'
],
'isSet': [
'Died on test #9'
],
'findKey': [
'called with context'
],
@@ -374,8 +387,6 @@
// Only excuse in Sauce Labs.
if (!ui.isSauceLabs) {
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.Utility.now;
}

View File

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

View File

@@ -1,6 +1,6 @@
// Backbone.js 1.2.3
// Backbone.js 1.3.2
// (c) 2010-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// (c) 2010-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
@@ -9,8 +9,8 @@
// Establish the root object, `window` (`self`) in the browser, or `global` on the server.
// We use `self` instead of `window` for `WebWorker` support.
var root = (typeof self == 'object' && self.self == self && self) ||
(typeof global == 'object' && global.global == global && global);
var root = (typeof self == 'object' && self.self === self && self) ||
(typeof global == 'object' && global.global === global && global);
// Set up Backbone appropriately for the environment. Start with AMD.
if (typeof define === 'function' && define.amd) {
@@ -44,7 +44,7 @@
var slice = Array.prototype.slice;
// Current version of the library. Keep in sync with `package.json`.
Backbone.VERSION = '1.2.3';
Backbone.VERSION = '1.3.2';
// For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
// the `$` variable.
@@ -146,7 +146,7 @@
events = eventsApi(iteratee, events, names[i], name[names[i]], opts);
}
} else if (name && eventSplitter.test(name)) {
// Handle space separated event names by delegating them individually.
// Handle space-separated event names by delegating them individually.
for (names = name.split(eventSplitter); i < names.length; i++) {
events = iteratee(events, names[i], callback, opts);
}
@@ -242,7 +242,6 @@
listening.obj.off(name, callback, this);
}
if (_.isEmpty(listeningTo)) this._listeningTo = void 0;
return this;
};
@@ -299,7 +298,7 @@
delete events[name];
}
}
if (_.size(events)) return events;
return events;
};
// Bind an event to only be triggered a single time. After the first time
@@ -309,7 +308,8 @@
Events.once = function(name, callback, context) {
// Map the event into a `{event: once}` object.
var events = eventsApi(onceMap, {}, name, callback, _.bind(this.off, this));
return this.on(events, void 0, context);
if (typeof name === 'string' && context == null) callback = void 0;
return this.on(events, callback, context);
};
// Inversion-of-control versions of `once`.
@@ -348,7 +348,7 @@
};
// Handles triggering the appropriate event callbacks.
var triggerApi = function(objEvents, name, cb, args) {
var triggerApi = function(objEvents, name, callback, args) {
if (objEvents) {
var events = objEvents[name];
var allEvents = objEvents.all;
@@ -398,7 +398,8 @@
this.attributes = {};
if (options.collection) this.collection = options.collection;
if (options.parse) attrs = this.parse(attrs, options) || {};
attrs = _.defaults({}, attrs, _.result(this, 'defaults'));
var defaults = _.result(this, 'defaults');
attrs = _.defaults(_.extend({}, defaults, attrs), defaults);
this.set(attrs, options);
this.changed = {};
this.initialize.apply(this, arguments);
@@ -714,7 +715,7 @@
// Check if the model is currently in a valid state.
isValid: function(options) {
return this._validate({}, _.defaults({validate: true}, options));
return this._validate({}, _.extend({}, options, {validate: true}));
},
// Run validation against the next complete set of model attributes,
@@ -769,7 +770,8 @@
at = Math.min(Math.max(at, 0), array.length);
var tail = Array(array.length - at);
var length = insert.length;
for (var i = 0; i < tail.length; i++) tail[i] = array[i + at];
var i;
for (i = 0; i < tail.length; i++) tail[i] = array[i + at];
for (i = 0; i < length; i++) array[i + at] = insert[i];
for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i];
};
@@ -809,7 +811,10 @@
var singular = !_.isArray(models);
models = singular ? [models] : models.slice();
var removed = this._removeModels(models, options);
if (!options.silent && removed.length) this.trigger('update', this, options);
if (!options.silent && removed.length) {
options.changes = {added: [], merged: [], removed: removed};
this.trigger('update', this, options);
}
return singular ? removed[0] : removed;
},
@@ -820,18 +825,22 @@
set: function(models, options) {
if (models == null) return;
options = _.defaults({}, options, setOptions);
if (options.parse && !this._isModel(models)) models = this.parse(models, options);
options = _.extend({}, setOptions, options);
if (options.parse && !this._isModel(models)) {
models = this.parse(models, options) || [];
}
var singular = !_.isArray(models);
models = singular ? (models ? [models] : []) : models.slice();
models = singular ? [models] : models.slice();
var at = options.at;
if (at != null) at = +at;
if (at > this.length) at = this.length;
if (at < 0) at += this.length + 1;
var set = [];
var toAdd = [];
var toMerge = [];
var toRemove = [];
var modelMap = {};
@@ -845,8 +854,8 @@
// Turn bare objects into model references, and prevent invalid models
// from being added.
var model;
for (var i = 0; i < models.length; i++) {
var model, i;
for (i = 0; i < models.length; i++) {
model = models[i];
// If a duplicate is found, prevent it from being added and
@@ -857,6 +866,7 @@
var attrs = this._isModel(model) ? model.attributes : model;
if (options.parse) attrs = existing.parse(attrs, options);
existing.set(attrs, options);
toMerge.push(existing);
if (sortable && !sort) sort = existing.hasChanged(sortAttr);
}
if (!modelMap[existing.cid]) {
@@ -890,8 +900,8 @@
var orderChanged = false;
var replace = !sortable && add && remove;
if (set.length && replace) {
orderChanged = this.length != set.length || _.some(this.models, function(model, index) {
return model !== set[index];
orderChanged = this.length !== set.length || _.some(this.models, function(m, index) {
return m !== set[index];
});
this.models.length = 0;
splice(this.models, set, 0);
@@ -905,7 +915,7 @@
// Silently sort the collection if appropriate.
if (sort) this.sort({silent: true});
// Unless silenced, it's time to fire all appropriate add/sort events.
// Unless silenced, it's time to fire all appropriate add/sort/update events.
if (!options.silent) {
for (i = 0; i < toAdd.length; i++) {
if (at != null) options.index = at + i;
@@ -913,7 +923,14 @@
model.trigger('add', model, this, options);
}
if (sort || orderChanged) this.trigger('sort', this, options);
if (toAdd.length || toRemove.length) this.trigger('update', this, options);
if (toAdd.length || toRemove.length || toMerge.length) {
options.changes = {
added: toAdd,
removed: toRemove,
merged: toMerge
};
this.trigger('update', this, options);
}
}
// Return the added (or merged) model (or models).
@@ -963,11 +980,18 @@
return slice.apply(this.models, arguments);
},
// Get a model from the set by id.
// Get a model from the set by id, cid, model object with id or cid
// properties, or an attributes object that is transformed through modelId.
get: function(obj) {
if (obj == null) return void 0;
var id = this.modelId(this._isModel(obj) ? obj.attributes : obj);
return this._byId[obj] || this._byId[id] || this._byId[obj.cid];
return this._byId[obj] ||
this._byId[this.modelId(obj.attributes || obj)] ||
obj.cid && this._byId[obj.cid];
},
// Returns `true` if the model is in the collection.
has: function(obj) {
return this.get(obj) != null;
},
// Get the model at the given index.
@@ -1042,9 +1066,9 @@
if (!wait) this.add(model, options);
var collection = this;
var success = options.success;
options.success = function(model, resp, callbackOpts) {
if (wait) collection.add(model, callbackOpts);
if (success) success.call(callbackOpts.context, model, resp, callbackOpts);
options.success = function(m, resp, callbackOpts) {
if (wait) collection.add(m, callbackOpts);
if (success) success.call(callbackOpts.context, m, resp, callbackOpts);
};
model.save(null, options);
return model;
@@ -1584,8 +1608,8 @@
// Does the pathname match the root?
matchRoot: function() {
var path = this.decodeFragment(this.location.pathname);
var root = path.slice(0, this.root.length - 1) + '/';
return root === this.root;
var rootPath = path.slice(0, this.root.length - 1) + '/';
return rootPath === this.root;
},
// Unicode characters in `location.pathname` are percent encoded so they're
@@ -1657,8 +1681,8 @@
// If we've started off with a route from a `pushState`-enabled
// browser, but we're currently in a browser that doesn't support it...
if (!this._hasPushState && !this.atRoot()) {
var root = this.root.slice(0, -1) || '/';
this.location.replace(root + '#' + this.getPath());
var rootPath = this.root.slice(0, -1) || '/';
this.location.replace(rootPath + '#' + this.getPath());
// Return immediately as browser will do redirect to new url
return true;
@@ -1782,11 +1806,11 @@
fragment = this.getFragment(fragment || '');
// Don't include a trailing slash on the root.
var root = this.root;
var rootPath = this.root;
if (fragment === '' || fragment.charAt(0) === '?') {
root = root.slice(0, -1) || '/';
rootPath = rootPath.slice(0, -1) || '/';
}
var url = root + fragment;
var url = rootPath + fragment;
// Strip the hash and decode for matching.
fragment = this.decodeFragment(fragment.replace(pathStripper, ''));
@@ -1893,5 +1917,4 @@
};
return Backbone;
});

File diff suppressed because it is too large Load Diff

View File

@@ -352,8 +352,8 @@
_.extend(obj, Backbone.Events);
obj.on('all', function(event) {
obj.counter++;
if (event == 'a') a = true;
if (event == 'b') b = true;
if (event === 'a') a = true;
if (event === 'b') b = true;
})
.trigger('a b');
assert.ok(a);
@@ -417,6 +417,18 @@
assert.equal(obj.counterB, 1, 'counterB should have only been incremented once.');
});
QUnit.test('bind a callback with a default context when none supplied', function(assert) {
assert.expect(1);
var obj = _.extend({
assertTrue: function() {
assert.equal(this, obj, '`this` was bound to the callback');
}
}, Backbone.Events);
obj.once('event', obj.assertTrue);
obj.trigger('event');
});
QUnit.test('bind a callback with a supplied context', function(assert) {
assert.expect(1);
var TestClass = function() {
@@ -477,7 +489,7 @@
QUnit.test('if callback is truthy but not a function, `on` should throw an error just like jQuery', function(assert) {
assert.expect(1);
var view = _.extend({}, Backbone.Events).on('test', 'noop');
assert.throws(function() {
assert.raises(function() {
view.trigger('test');
});
});
@@ -587,6 +599,19 @@
assert.equal(obj.counter, 3);
});
QUnit.test('bind a callback with a supplied context using once with object notation', function(assert) {
assert.expect(1);
var obj = {counter: 0};
var context = {};
_.extend(obj, Backbone.Events);
obj.once({
a: function() {
assert.strictEqual(this, context, 'defaults `context` to `callback` param');
}
}, context).trigger('a');
});
QUnit.test('once with off only by context', function(assert) {
assert.expect(0);
var context = {};

View File

@@ -34,6 +34,12 @@
assert.equal(model.collection, collection);
});
QUnit.test('Object.prototype properties are overridden by attributes', function(assert) {
assert.expect(1);
var model = new Backbone.Model({hasOwnProperty: true});
assert.equal(model.get('hasOwnProperty'), true);
});
QUnit.test('initialize with attributes and options', function(assert) {
assert.expect(1);
var Model = Backbone.Model.extend({
@@ -57,19 +63,6 @@
assert.equal(model.get('value'), 2);
});
QUnit.test('initialize with defaults', function(assert) {
assert.expect(2);
var Model = Backbone.Model.extend({
defaults: {
firstName: 'Unknown',
lastName: 'Unknown'
}
});
var model = new Model({'firstName': 'John'});
assert.equal(model.get('firstName'), 'John');
assert.equal(model.get('lastName'), 'Unknown');
});
QUnit.test('parse can return null', function(assert) {
assert.expect(1);
var Model = Backbone.Model.extend({
@@ -89,7 +82,7 @@
doc.collection.url = '/collection/';
assert.equal(doc.url(), '/collection/1-the-tempest');
doc.collection = null;
assert.throws(function() { doc.url(); });
assert.raises(function() { doc.url(); });
doc.collection = collection;
});
@@ -251,12 +244,12 @@
var changeCount = 0;
a.on('change:foo', function() { changeCount += 1; });
a.set({foo: 2});
assert.ok(a.get('foo') == 2, 'Foo should have changed.');
assert.ok(changeCount == 1, 'Change count should have incremented.');
assert.equal(a.get('foo'), 2, 'Foo should have changed.');
assert.equal(changeCount, 1, 'Change count should have incremented.');
// set with value that is not new shouldn't fire change event
a.set({foo: 2});
assert.ok(a.get('foo') == 2, 'Foo should NOT have changed, still 2');
assert.ok(changeCount == 1, 'Change count should NOT have incremented.');
assert.equal(a.get('foo'), 2, 'Foo should NOT have changed, still 2');
assert.equal(changeCount, 1, 'Change count should NOT have incremented.');
a.validate = function(attrs) {
assert.equal(attrs.foo, void 0, 'validate:true passed while unsetting');
@@ -264,7 +257,7 @@
a.unset('foo', {validate: true});
assert.equal(a.get('foo'), void 0, 'Foo should have changed');
delete a.validate;
assert.ok(changeCount == 2, 'Change count should have incremented for unset.');
assert.equal(changeCount, 2, 'Change count should have incremented for unset.');
a.unset('id');
assert.equal(a.id, undefined, 'Unsetting the id should remove the id property.');
@@ -273,8 +266,8 @@
QUnit.test('#2030 - set with failed validate, followed by another set triggers change', function(assert) {
var attr = 0, main = 0, error = 0;
var Model = Backbone.Model.extend({
validate: function(attr) {
if (attr.x > 1) {
validate: function(attrs) {
if (attrs.x > 1) {
error++;
return 'this is an error';
}
@@ -379,15 +372,15 @@
var Collection = Backbone.Collection.extend({
model: Model
});
var collection = new Collection([{id: 'c5'}, {id: 'c6'}, {id: 'c7'}]);
var col = new Collection([{id: 'c5'}, {id: 'c6'}, {id: 'c7'}]);
assert.equal(collection.get('c6').cid.charAt(0), 'm');
collection.set([{id: 'c6', value: 'test'}], {
assert.equal(col.get('c6').cid.charAt(0), 'm');
col.set([{id: 'c6', value: 'test'}], {
merge: true,
add: true,
remove: false
});
assert.ok(collection.get('c6').has('value'));
assert.ok(col.get('c6').has('value'));
});
QUnit.test('set an empty string', function(assert) {
@@ -428,7 +421,7 @@
});
QUnit.test('defaults', function(assert) {
assert.expect(4);
assert.expect(9);
var Defaulted = Backbone.Model.extend({
defaults: {
one: 1,
@@ -438,6 +431,9 @@
var model = new Defaulted({two: undefined});
assert.equal(model.get('one'), 1);
assert.equal(model.get('two'), 2);
model = new Defaulted({two: 3});
assert.equal(model.get('one'), 1);
assert.equal(model.get('two'), 3);
Defaulted = Backbone.Model.extend({
defaults: function() {
return {
@@ -449,6 +445,15 @@
model = new Defaulted({two: undefined});
assert.equal(model.get('one'), 3);
assert.equal(model.get('two'), 4);
Defaulted = Backbone.Model.extend({
defaults: {hasOwnProperty: true}
});
model = new Defaulted();
assert.equal(model.get('hasOwnProperty'), true);
model = new Defaulted({hasOwnProperty: undefined});
assert.equal(model.get('hasOwnProperty'), true);
model = new Defaulted({hasOwnProperty: false});
assert.equal(model.get('hasOwnProperty'), false);
});
QUnit.test('change, hasChanged, changedAttributes, previous, previousAttributes', function(assert) {
@@ -480,8 +485,8 @@
assert.expect(2);
var value;
var model = new Backbone.Model({name: 'Rob'});
model.on('change', function(model, options) {
value = options.prefix + model.get('name');
model.on('change', function(m, options) {
value = options.prefix + m.get('name');
});
model.set({name: 'Bob'}, {prefix: 'Mr. '});
assert.equal(value, 'Mr. Bob');
@@ -517,10 +522,10 @@
model.validate = function(attrs) {
if (attrs.admin) return "Can't change admin status.";
};
model.sync = function(method, model, options) {
model.sync = function(method, m, options) {
options.success.call(this, {admin: true});
};
model.on('invalid', function(model, error) {
model.on('invalid', function(m, error) {
lastError = error;
});
model.save(null);
@@ -542,7 +547,7 @@
model.on('error', function() {
assert.ok(true);
});
model.sync = function(method, model, options) {
model.sync = function(method, m, options) {
options.error();
};
model.save({data: 2, id: 1});
@@ -560,8 +565,8 @@
assert.equal(this, obj);
}
};
model.sync = function(method, model, options) {
options.success.call(options.context);
model.sync = function(method, m, opts) {
opts.success.call(opts.context);
};
model.save({data: 2, id: 1}, options);
model.fetch(options);
@@ -578,8 +583,8 @@
assert.equal(this, obj);
}
};
model.sync = function(method, model, options) {
options.error.call(options.context);
model.sync = function(method, m, opts) {
opts.error.call(opts.context);
};
model.save({data: 2, id: 1}, options);
model.fetch(options);
@@ -593,7 +598,7 @@
model.parse = function() {
assert.ok(false);
};
model.sync = function(method, model, options) {
model.sync = function(method, m, options) {
options.success({i: ++i});
};
model.fetch({parse: false});
@@ -627,7 +632,7 @@
QUnit.test('save in positional style', function(assert) {
assert.expect(1);
var model = new Backbone.Model();
model.sync = function(method, model, options) {
model.sync = function(method, m, options) {
options.success();
};
model.save('title', 'Twelfth Night');
@@ -637,13 +642,13 @@
QUnit.test('save with non-object success response', function(assert) {
assert.expect(2);
var model = new Backbone.Model();
model.sync = function(method, model, options) {
model.sync = function(method, m, options) {
options.success('', options);
options.success(null, options);
};
model.save({testing: 'empty'}, {
success: function(model) {
assert.deepEqual(model.attributes, {testing: 'empty'});
success: function(m) {
assert.deepEqual(m.attributes, {testing: 'empty'});
}
});
});
@@ -660,16 +665,16 @@
QUnit.test('save will pass extra options to success callback', function(assert) {
assert.expect(1);
var SpecialSyncModel = Backbone.Model.extend({
sync: function(method, model, options) {
sync: function(method, m, options) {
_.extend(options, {specialSync: true});
return Backbone.Model.prototype.sync.call(this, method, model, options);
return Backbone.Model.prototype.sync.call(this, method, m, options);
},
urlRoot: '/test'
});
var model = new SpecialSyncModel();
var onSuccess = function(model, response, options) {
var onSuccess = function(m, response, options) {
assert.ok(options.specialSync, 'Options were passed correctly to callback');
};
@@ -687,16 +692,16 @@
QUnit.test('fetch will pass extra options to success callback', function(assert) {
assert.expect(1);
var SpecialSyncModel = Backbone.Model.extend({
sync: function(method, model, options) {
sync: function(method, m, options) {
_.extend(options, {specialSync: true});
return Backbone.Model.prototype.sync.call(this, method, model, options);
return Backbone.Model.prototype.sync.call(this, method, m, options);
},
urlRoot: '/test'
});
var model = new SpecialSyncModel();
var onSuccess = function(model, response, options) {
var onSuccess = function(m, response, options) {
assert.ok(options.specialSync, 'Options were passed correctly to callback');
};
@@ -717,16 +722,16 @@
QUnit.test('destroy will pass extra options to success callback', function(assert) {
assert.expect(1);
var SpecialSyncModel = Backbone.Model.extend({
sync: function(method, model, options) {
sync: function(method, m, options) {
_.extend(options, {specialSync: true});
return Backbone.Model.prototype.sync.call(this, method, model, options);
return Backbone.Model.prototype.sync.call(this, method, m, options);
},
urlRoot: '/test'
});
var model = new SpecialSyncModel({id: 'id'});
var onSuccess = function(model, response, options) {
var onSuccess = function(m, response, options) {
assert.ok(options.specialSync, 'Options were passed correctly to callback');
};
@@ -746,9 +751,9 @@
var lastError;
var model = new Backbone.Model();
model.validate = function(attrs) {
if (attrs.admin != this.get('admin')) return "Can't change admin status.";
if (attrs.admin !== this.get('admin')) return "Can't change admin status.";
};
model.on('invalid', function(model, error) {
model.on('invalid', function(m, error) {
lastError = error;
});
var result = model.set({a: 100});
@@ -793,7 +798,7 @@
model.validate = function(attrs) {
if (attrs.admin) return "Can't change admin status.";
};
model.on('invalid', function(model, error) {
model.on('invalid', function(m, error) {
boundError = true;
});
var result = model.set({a: 100}, {validate: true});
@@ -848,14 +853,14 @@
QUnit.test("Nested change events don't clobber previous attributes", function(assert) {
assert.expect(4);
new Backbone.Model()
.on('change:state', function(model, newState) {
assert.equal(model.previous('state'), undefined);
.on('change:state', function(m, newState) {
assert.equal(m.previous('state'), undefined);
assert.equal(newState, 'hello');
// Fire a nested change event.
model.set({other: 'whatever'});
m.set({other: 'whatever'});
})
.on('change:state', function(model, newState) {
assert.equal(model.previous('state'), undefined);
.on('change:state', function(m, newState) {
assert.equal(m.previous('state'), undefined);
assert.equal(newState, 'hello');
})
.set({state: 'hello'});
@@ -989,8 +994,8 @@
QUnit.test('`previous` for falsey keys', function(assert) {
assert.expect(2);
var model = new Backbone.Model({0: true, '': true});
model.set({0: false, '': false}, {silent: true});
var model = new Backbone.Model({'0': true, '': true});
model.set({'0': false, '': false}, {silent: true});
assert.equal(model.previous(0), true);
assert.equal(model.previous(''), true);
});
@@ -1021,7 +1026,7 @@
QUnit.test('#1030 - `save` with `wait` results in correct attributes if success is called during sync', function(assert) {
assert.expect(2);
var model = new Backbone.Model({x: 1, y: 2});
model.sync = function(method, model, options) {
model.sync = function(method, m, options) {
options.success();
};
model.on('change:x', function() { assert.ok(true); });
@@ -1038,7 +1043,7 @@
QUnit.test('save turns on parse flag', function(assert) {
var Model = Backbone.Model.extend({
sync: function(method, model, options) { assert.ok(options.parse); }
sync: function(method, m, options) { assert.ok(options.parse); }
});
new Model().save();
});
@@ -1142,7 +1147,7 @@
model.set({y: 1}, {silent: true});
model.set({y: 2});
});
model.on('change:y', function(model, val) {
model.on('change:y', function(m, val) {
assert.equal(val, 2);
});
model.set({x: true});
@@ -1152,7 +1157,7 @@
assert.expect(1);
var changes = [];
var model = new Backbone.Model();
model.on('change:b', function(model, val) { changes.push(val); });
model.on('change:b', function(m, val) { changes.push(val); });
model.on('change', function() {
model.set({b: 1});
});
@@ -1202,11 +1207,11 @@
assert.expect(3);
var model = new Backbone.Model();
var opts = {
success: function( model, resp, options ) {
success: function( m, resp, options ) {
assert.ok(options);
}
};
model.sync = function(method, model, options) {
model.sync = function(method, m, options) {
options.success();
};
model.save({id: 1}, opts);
@@ -1217,7 +1222,7 @@
QUnit.test("#1412 - Trigger 'sync' event.", function(assert) {
assert.expect(3);
var model = new Backbone.Model({id: 1});
model.sync = function(method, model, options) { options.success(); };
model.sync = function(method, m, options) { options.success(); };
model.on('sync', function(){ assert.ok(true); });
model.fetch();
model.save();
@@ -1248,7 +1253,7 @@
assert.expect(1);
var Model = Backbone.Model.extend({
url: '/test/',
sync: function(method, model, options){ options.success(); },
sync: function(method, m, options){ options.success(); },
validate: function(){ return 'invalid'; }
});
var model = new Model({id: 1});
@@ -1271,7 +1276,7 @@
var done = assert.async();
assert.expect(0);
var Model = Backbone.Model.extend({
sync: function(method, model, options) {
sync: function(method, m, options) {
setTimeout(function(){
options.success();
done();
@@ -1301,7 +1306,7 @@
model.set({b: 2}, {silent: true});
model.unset('c', {silent: true});
});
model.on('change:a change:b change:c', function(model, val) { changes.push(val); });
model.on('change:a change:b change:c', function(m, val) { changes.push(val); });
model.set({a: 'a', b: 1, c: 'item'});
assert.deepEqual(changes, ['a', 1, 'item']);
assert.deepEqual(model.attributes, {a: 'c', b: 2});
@@ -1319,7 +1324,7 @@
assert.expect(2);
var changes = [];
var model = new Backbone.Model();
model.on('change:a change:b change:c', function(model, val) { changes.push(val); });
model.on('change:a change:b change:c', function(m, val) { changes.push(val); });
model.on('change', function() {
model.set({a: 'c'}, {silent: true});
});

View File

@@ -5,7 +5,7 @@
var lastRoute = null;
var lastArgs = [];
var onRoute = function(router, route, args) {
var onRoute = function(routerParam, route, args) {
lastRoute = route;
lastArgs = args;
};
@@ -134,7 +134,7 @@
},
optionalItem: function(arg){
this.arg = arg != void 0 ? arg : null;
this.arg = arg !== void 0 ? arg : null;
},
splat: function(args) {
@@ -354,7 +354,7 @@
QUnit.test('No events are triggered if #execute returns false.', function(assert) {
assert.expect(1);
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {
foo: function() {
@@ -369,9 +369,9 @@
});
var router = new Router;
var myRouter = new MyRouter;
router.on('route route:foo', function() {
myRouter.on('route route:foo', function() {
assert.ok(false);
});
@@ -639,14 +639,14 @@
QUnit.test('#1746 - Router allows empty route.', function(assert) {
assert.expect(1);
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {'': 'empty'},
empty: function(){},
route: function(route){
assert.strictEqual(route, '');
}
});
new Router;
new MyRouter;
});
QUnit.test('#1794 - Trailing space in fragments.', function(assert) {
@@ -698,8 +698,8 @@
}
});
var router = new RouterExtended();
assert.deepEqual({home: 'root', index: 'index.html', show: 'show', search: 'search'}, router.routes);
var myRouter = new RouterExtended();
assert.deepEqual({home: 'root', index: 'index.html', show: 'show', search: 'search'}, myRouter.routes);
});
QUnit.test('#2538 - hashChange to pushState only if both requested.', function(assert) {
@@ -731,12 +731,12 @@
}
});
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {
hash: function() { assert.ok(false); }
}
});
var router = new Router;
var myRouter = new MyRouter;
location.replace('http://example.com/');
Backbone.history.start({
@@ -807,12 +807,12 @@
}
});
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {
path: function() { assert.ok(true); }
}
});
var router = new Router;
var myRouter = new MyRouter;
location.replace('http://example.com/');
Backbone.history.start({pushState: true, hashChange: false});
@@ -821,14 +821,14 @@
QUnit.test('Do not decode the search params.', function(assert) {
assert.expect(1);
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {
path: function(params){
assert.strictEqual(params, 'x=y%3Fz');
}
}
});
var router = new Router;
var myRouter = new MyRouter;
Backbone.history.navigate('path?x=y%3Fz', true);
});
@@ -837,14 +837,14 @@
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
Backbone.history.start({pushState: true});
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {
path: function(params) {
assert.strictEqual(params, 'x=y');
}
}
});
var router = new Router;
var myRouter = new MyRouter;
location.replace('http://example.com/path?x=y#hash');
Backbone.history.checkUrl();
});
@@ -854,14 +854,14 @@
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
Backbone.history.start({pushState: true});
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {
path: function(params) {
assert.strictEqual(params, 'x=y');
}
}
});
var router = new Router;
var myRouter = new MyRouter;
Backbone.history.navigate('path?x=y#hash', true);
});
@@ -870,14 +870,14 @@
location.replace('http://example.com/myyjä');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {
myyjä: function() {
assert.ok(true);
}
}
});
new Router;
new MyRouter;
Backbone.history.start({pushState: true});
});
@@ -887,14 +887,14 @@
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({
var MyRouter = Backbone.Router.extend({
routes: {
'myyjä/:query': function(query) {
assert.strictEqual(query, 'foo %?/@% bar');
}
}
});
new Router;
new MyRouter;
Backbone.history.start({pushState: true});
});
@@ -903,14 +903,14 @@
location.replace('http://example.com/stuff%0Anonsense?param=foo%0Abar');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {
'stuff\nnonsense': function() {
assert.ok(true);
}
}
});
new Router;
new MyRouter;
Backbone.history.start({pushState: true});
});
@@ -919,7 +919,7 @@
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({
var MyRouter = Backbone.Router.extend({
routes: {'foo/:id/bar': 'foo'},
foo: function(){},
execute: function(callback, args, name) {
@@ -928,7 +928,7 @@
assert.strictEqual(name, 'foo');
}
});
var router = new Router;
var myRouter = new MyRouter;
Backbone.history.start();
});
@@ -967,8 +967,8 @@
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) {
var myRouter = new Backbone.Router;
myRouter.route('login', function(params) {
assert.strictEqual(params, 'a=value&backUrl=https%3A%2F%2Fwww.msn.com%2Fidp%2Fidpdemo%3Fspid%3Dspdemo%26target%3Db');
});
Backbone.history.start();
@@ -996,14 +996,14 @@
location.replace('http://example.com/foo');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {
foo: function(){
assert.ok(false, 'should not match unless root matches');
}
}
});
var router = new Router;
var myRouter = new MyRouter;
Backbone.history.start({root: 'root', pushState: true});
});
@@ -1012,14 +1012,14 @@
location.replace('http://example.com/xxxx/foo');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {
foo: function(){
assert.ok(false, 'should not match unless root matches');
}
}
});
var router = new Router;
var myRouter = new MyRouter;
Backbone.history.start({root: 'root', pushState: true});
});
@@ -1028,10 +1028,10 @@
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({
var MyRouter = Backbone.Router.extend({
routes: {foo: function(){ assert.ok(true); }}
});
var router = new Router;
var myRouter = new MyRouter;
Backbone.history.start({root: 'x+y.z', pushState: true});
});
@@ -1040,10 +1040,10 @@
location.replace('http://example.com/®ooτ/foo');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {foo: function(){ assert.ok(true); }}
});
var router = new Router;
var myRouter = new MyRouter;
Backbone.history.start({root: '®ooτ', pushState: true});
});
@@ -1052,10 +1052,10 @@
location.replace('http://example.com/®ooτ');
Backbone.history.stop();
Backbone.history = _.extend(new Backbone.History, {location: location});
var Router = Backbone.Router.extend({
var MyRouter = Backbone.Router.extend({
routes: {'': function(){ assert.ok(true); }}
});
var router = new Router;
var myRouter = new MyRouter;
Backbone.history.start({root: '®ooτ', pushState: true});
});

View File

@@ -142,7 +142,7 @@
QUnit.test('urlError', function(assert) {
assert.expect(2);
var model = new Backbone.Model();
assert.throws(function() {
assert.raises(function() {
model.fetch();
});
model.fetch({url: '/one/two'});
@@ -228,7 +228,7 @@
assert.expect(2);
var model = new Backbone.Model;
model.url = '/test';
model.on('error', function(model, xhr, options) {
model.on('error', function(m, xhr, options) {
assert.strictEqual(options.textStatus, 'textStatus');
assert.strictEqual(options.errorThrown, 'errorThrown');
});

View File

@@ -27,9 +27,9 @@
QUnit.test('$', function(assert) {
assert.expect(2);
var view = new Backbone.View;
view.setElement('<p><a><b>test</b></a></p>');
var result = view.$('a b');
var myView = new Backbone.View;
myView.setElement('<p><a><b>test</b></a></p>');
var result = myView.$('a b');
assert.strictEqual(result[0].innerHTML, 'test');
assert.ok(result.length === +result.length);
@@ -37,12 +37,12 @@
QUnit.test('$el', function(assert) {
assert.expect(3);
var view = new Backbone.View;
view.setElement('<p><a><b>test</b></a></p>');
assert.strictEqual(view.el.nodeType, 1);
var myView = new Backbone.View;
myView.setElement('<p><a><b>test</b></a></p>');
assert.strictEqual(myView.el.nodeType, 1);
assert.ok(view.$el instanceof Backbone.$);
assert.strictEqual(view.$el[0], view.el);
assert.ok(myView.$el instanceof Backbone.$);
assert.strictEqual(myView.$el[0], myView.el);
});
QUnit.test('initialize', function(assert) {
@@ -58,53 +58,53 @@
QUnit.test('render', function(assert) {
assert.expect(1);
var view = new Backbone.View;
assert.equal(view.render(), view, '#render returns the view instance');
var myView = new Backbone.View;
assert.equal(myView.render(), myView, '#render returns the view instance');
});
QUnit.test('delegateEvents', function(assert) {
assert.expect(6);
var counter1 = 0, counter2 = 0;
var view = new Backbone.View({el: '#testElement'});
view.increment = function(){ counter1++; };
view.$el.on('click', function(){ counter2++; });
var myView = new Backbone.View({el: '#testElement'});
myView.increment = function(){ counter1++; };
myView.$el.on('click', function(){ counter2++; });
var events = {'click h1': 'increment'};
view.delegateEvents(events);
view.$('h1').trigger('click');
myView.delegateEvents(events);
myView.$('h1').trigger('click');
assert.equal(counter1, 1);
assert.equal(counter2, 1);
view.$('h1').trigger('click');
myView.$('h1').trigger('click');
assert.equal(counter1, 2);
assert.equal(counter2, 2);
view.delegateEvents(events);
view.$('h1').trigger('click');
myView.delegateEvents(events);
myView.$('h1').trigger('click');
assert.equal(counter1, 3);
assert.equal(counter2, 3);
});
QUnit.test('delegate', function(assert) {
assert.expect(3);
var view = new Backbone.View({el: '#testElement'});
view.delegate('click', 'h1', function() {
var myView = new Backbone.View({el: '#testElement'});
myView.delegate('click', 'h1', function() {
assert.ok(true);
});
view.delegate('click', function() {
myView.delegate('click', function() {
assert.ok(true);
});
view.$('h1').trigger('click');
myView.$('h1').trigger('click');
assert.equal(view.delegate(), view, '#delegate returns the view instance');
assert.equal(myView.delegate(), myView, '#delegate returns the view instance');
});
QUnit.test('delegateEvents allows functions for callbacks', function(assert) {
assert.expect(3);
var view = new Backbone.View({el: '<p></p>'});
view.counter = 0;
var myView = new Backbone.View({el: '<p></p>'});
myView.counter = 0;
var events = {
click: function() {
@@ -112,97 +112,97 @@
}
};
view.delegateEvents(events);
view.$el.trigger('click');
assert.equal(view.counter, 1);
myView.delegateEvents(events);
myView.$el.trigger('click');
assert.equal(myView.counter, 1);
view.$el.trigger('click');
assert.equal(view.counter, 2);
myView.$el.trigger('click');
assert.equal(myView.counter, 2);
view.delegateEvents(events);
view.$el.trigger('click');
assert.equal(view.counter, 3);
myView.delegateEvents(events);
myView.$el.trigger('click');
assert.equal(myView.counter, 3);
});
QUnit.test('delegateEvents ignore undefined methods', function(assert) {
assert.expect(0);
var view = new Backbone.View({el: '<p></p>'});
view.delegateEvents({'click': 'undefinedMethod'});
view.$el.trigger('click');
var myView = new Backbone.View({el: '<p></p>'});
myView.delegateEvents({'click': 'undefinedMethod'});
myView.$el.trigger('click');
});
QUnit.test('undelegateEvents', function(assert) {
assert.expect(7);
var counter1 = 0, counter2 = 0;
var view = new Backbone.View({el: '#testElement'});
view.increment = function(){ counter1++; };
view.$el.on('click', function(){ counter2++; });
var myView = new Backbone.View({el: '#testElement'});
myView.increment = function(){ counter1++; };
myView.$el.on('click', function(){ counter2++; });
var events = {'click h1': 'increment'};
view.delegateEvents(events);
view.$('h1').trigger('click');
myView.delegateEvents(events);
myView.$('h1').trigger('click');
assert.equal(counter1, 1);
assert.equal(counter2, 1);
view.undelegateEvents();
view.$('h1').trigger('click');
myView.undelegateEvents();
myView.$('h1').trigger('click');
assert.equal(counter1, 1);
assert.equal(counter2, 2);
view.delegateEvents(events);
view.$('h1').trigger('click');
myView.delegateEvents(events);
myView.$('h1').trigger('click');
assert.equal(counter1, 2);
assert.equal(counter2, 3);
assert.equal(view.undelegateEvents(), view, '#undelegateEvents returns the view instance');
assert.equal(myView.undelegateEvents(), myView, '#undelegateEvents returns the view instance');
});
QUnit.test('undelegate', function(assert) {
assert.expect(1);
view = new Backbone.View({el: '#testElement'});
view.delegate('click', function() { assert.ok(false); });
view.delegate('click', 'h1', function() { assert.ok(false); });
var myView = new Backbone.View({el: '#testElement'});
myView.delegate('click', function() { assert.ok(false); });
myView.delegate('click', 'h1', function() { assert.ok(false); });
view.undelegate('click');
myView.undelegate('click');
view.$('h1').trigger('click');
view.$el.trigger('click');
myView.$('h1').trigger('click');
myView.$el.trigger('click');
assert.equal(view.undelegate(), view, '#undelegate returns the view instance');
assert.equal(myView.undelegate(), myView, '#undelegate returns the view instance');
});
QUnit.test('undelegate with passed handler', function(assert) {
assert.expect(1);
view = new Backbone.View({el: '#testElement'});
var myView = new Backbone.View({el: '#testElement'});
var listener = function() { assert.ok(false); };
view.delegate('click', listener);
view.delegate('click', function() { assert.ok(true); });
view.undelegate('click', listener);
view.$el.trigger('click');
myView.delegate('click', listener);
myView.delegate('click', function() { assert.ok(true); });
myView.undelegate('click', listener);
myView.$el.trigger('click');
});
QUnit.test('undelegate with selector', function(assert) {
assert.expect(2);
view = new Backbone.View({el: '#testElement'});
view.delegate('click', function() { assert.ok(true); });
view.delegate('click', 'h1', function() { assert.ok(false); });
view.undelegate('click', 'h1');
view.$('h1').trigger('click');
view.$el.trigger('click');
var myView = new Backbone.View({el: '#testElement'});
myView.delegate('click', function() { assert.ok(true); });
myView.delegate('click', 'h1', function() { assert.ok(false); });
myView.undelegate('click', 'h1');
myView.$('h1').trigger('click');
myView.$el.trigger('click');
});
QUnit.test('undelegate with handler and selector', function(assert) {
assert.expect(2);
view = new Backbone.View({el: '#testElement'});
view.delegate('click', function() { assert.ok(true); });
var myView = new Backbone.View({el: '#testElement'});
myView.delegate('click', function() { assert.ok(true); });
var handler = function(){ assert.ok(false); };
view.delegate('click', 'h1', handler);
view.undelegate('click', 'h1', handler);
view.$('h1').trigger('click');
view.$el.trigger('click');
myView.delegate('click', 'h1', handler);
myView.undelegate('click', 'h1', handler);
myView.$('h1').trigger('click');
myView.$el.trigger('click');
});
QUnit.test('tagName can be provided as a string', function(assert) {
@@ -302,11 +302,11 @@
}
});
var view = new View;
assert.strictEqual(view.el.className, 'backboneClass');
assert.strictEqual(view.el.id, 'backboneId');
assert.strictEqual(view.$el.attr('class'), 'backboneClass');
assert.strictEqual(view.$el.attr('id'), 'backboneId');
var myView = new View;
assert.strictEqual(myView.el.className, 'backboneClass');
assert.strictEqual(myView.el.id, 'backboneId');
assert.strictEqual(myView.$el.attr('class'), 'backboneClass');
assert.strictEqual(myView.$el.attr('id'), 'backboneId');
});
QUnit.test('multiple views per element', function(assert) {
@@ -345,7 +345,7 @@
}
});
var view = new View;
var myView = new View;
$('body').trigger('fake$event').trigger('fake$event');
$('body').off('fake$event');
@@ -356,11 +356,11 @@
assert.expect(2);
var $el = $('body');
var view = new Backbone.View({el: $el});
assert.ok(view.$el === $el);
var myView = new Backbone.View({el: $el});
assert.ok(myView.$el === $el);
view.setElement($el = $($el));
assert.ok(view.$el === $el);
myView.setElement($el = $($el));
assert.ok(myView.$el === $el);
});
QUnit.test('#986 - Undelegate before changing element.', function(assert) {
@@ -371,13 +371,13 @@
var View = Backbone.View.extend({
events: {
click: function(e) {
assert.ok(view.el === e.target);
assert.ok(myView.el === e.target);
}
}
});
var view = new View({el: button1});
view.setElement(button2);
var myView = new View({el: button1});
myView.setElement(button2);
button1.trigger('click');
button2.trigger('click');
@@ -405,14 +405,14 @@
}
});
var view = new View({
var myView = new View({
model: new Backbone.Model,
collection: new Backbone.Collection
});
view.stopListening();
view.model.trigger('x');
view.collection.trigger('x');
myView.stopListening();
myView.model.trigger('x');
myView.collection.trigger('x');
});
QUnit.test('Provide function for el.', function(assert) {
@@ -423,9 +423,9 @@
}
});
var view = new View;
assert.ok(view.$el.is('p'));
assert.ok(view.$el.has('a'));
var myView = new View;
assert.ok(myView.$el.is('p'));
assert.ok(myView.$el.has('a'));
});
QUnit.test('events passed in options', function(assert) {
@@ -439,52 +439,52 @@
}
});
var view = new View({
var myView = new View({
events: {
'click h1': 'increment'
}
});
view.$('h1').trigger('click').trigger('click');
myView.$('h1').trigger('click').trigger('click');
assert.equal(counter, 2);
});
QUnit.test('remove', function(assert) {
assert.expect(2);
var view = new Backbone.View;
var myView = new Backbone.View;
document.body.appendChild(view.el);
view.delegate('click', function() { assert.ok(false); });
view.listenTo(view, 'all x', function() { assert.ok(false); });
myView.delegate('click', function() { assert.ok(false); });
myView.listenTo(myView, 'all x', function() { assert.ok(false); });
assert.equal(view.remove(), view, '#remove returns the view instance');
view.$el.trigger('click');
view.trigger('x');
assert.equal(myView.remove(), myView, '#remove returns the view instance');
myView.$el.trigger('click');
myView.trigger('x');
// In IE8 and below, parentNode still exists but is not document.body.
assert.notEqual(view.el.parentNode, document.body);
assert.notEqual(myView.el.parentNode, document.body);
});
QUnit.test('setElement', function(assert) {
assert.expect(3);
var view = new Backbone.View({
var myView = new Backbone.View({
events: {
click: function() { assert.ok(false); }
}
});
view.events = {
myView.events = {
click: function() { assert.ok(true); }
};
var oldEl = view.el;
var $oldEl = view.$el;
var oldEl = myView.el;
var $oldEl = myView.$el;
view.setElement(document.createElement('div'));
myView.setElement(document.createElement('div'));
$oldEl.click();
view.$el.click();
myView.$el.click();
assert.notEqual(oldEl, view.el);
assert.notEqual($oldEl, view.$el);
assert.notEqual(oldEl, myView.el);
assert.notEqual($oldEl, myView.$el);
});
})();

View File

@@ -1,22 +0,0 @@
Copyright 2010-2015 Mathias Bynens <http://mathiasbynens.be/>
Based on JSLitmus.js, copyright Robert Kieffer <http://broofa.com/>
Modified by John-David Dalton <http://allyoucanleet.com/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -143,33 +143,23 @@
QUnit.test('uniq', function(assert) {
var list = [1, 2, 1, 3, 1, 4];
assert.deepEqual(_.uniq(list), [1, 2, 3, 4], 'can find the unique values of an unsorted array');
list = [1, 1, 1, 2, 2, 3];
assert.deepEqual(_.uniq(list, true), [1, 2, 3], 'can find the unique values of a sorted array faster');
list = [{name: 'moe'}, {name: 'curly'}, {name: 'larry'}, {name: 'curly'}];
var iterator = function(value) { return value.name; };
assert.deepEqual(_.map(_.uniq(list, false, iterator), iterator), ['moe', 'curly', 'larry'], 'can find the unique values of an array using a custom iterator');
list = [{name: 'Moe'}, {name: 'Curly'}, {name: 'Larry'}, {name: 'Curly'}];
var expected = [{name: 'Moe'}, {name: 'Curly'}, {name: 'Larry'}];
var iterator = function(stooge) { return stooge.name; };
assert.deepEqual(_.uniq(list, false, iterator), expected, 'uses the result of `iterator` for uniqueness comparisons (unsorted case)');
assert.deepEqual(_.uniq(list, iterator), expected, '`sorted` argument defaults to false when omitted');
assert.deepEqual(_.uniq(list, 'name'), expected, 'when `iterator` is a string, uses that key for comparisons (unsorted case)');
assert.deepEqual(_.map(_.uniq(list, iterator), iterator), ['moe', 'curly', 'larry'], 'can find the unique values of an array using a custom iterator without specifying whether array is sorted');
iterator = function(value) { return value + 1; };
list = [1, 2, 2, 3, 4, 4];
assert.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}
];
assert.deepEqual(_.uniq(kittens, true, 'cuteness'), expected, 'string iterator works with sorted array');
list = [{score: 8}, {score: 10}, {score: 10}];
expected = [{score: 8}, {score: 10}];
iterator = function(item) { return item.score; };
assert.deepEqual(_.uniq(list, true, iterator), expected, 'uses the result of `iterator` for uniqueness comparisons (sorted case)');
assert.deepEqual(_.uniq(list, true, 'score'), expected, 'when `iterator` is a string, uses that key for comparisons (sorted case)');
assert.deepEqual(_.uniq([{0: 1}, {0: 1}, {0: 1}, {0: 2}], 0), [{0: 1}, {0: 2}], 'can use falsey pluck like iterator');
var result = (function(){ return _.uniq(arguments); }(1, 2, 1, 3, 1, 4));
assert.deepEqual(result, [1, 2, 3, 4], 'works on an arguments object');
@@ -177,19 +167,17 @@
var a = {}, b = {}, c = {};
assert.deepEqual(_.uniq([a, b, a, b, c]), [a, b, c], 'works on values that can be tested for equivalency but not ordered');
assert.deepEqual(_.uniq(null), []);
assert.deepEqual(_.uniq(null), [], 'returns an empty array when `array` is not iterable');
var context = {};
list = [3];
_.uniq(list, function(value, index, array) {
assert.strictEqual(this, context);
assert.strictEqual(value, 3);
assert.strictEqual(index, 0);
assert.strictEqual(array, list);
assert.strictEqual(this, context, 'executes its iterator in the given context');
assert.strictEqual(value, 3, 'passes its iterator the value');
assert.strictEqual(index, 0, 'passes its iterator the index');
assert.strictEqual(array, list, 'passes its iterator the entire array');
}, context);
assert.deepEqual(_.uniq([{a: 1, b: 1}, {a: 1, b: 2}, {a: 1, b: 3}, {a: 2, b: 1}], 'a'), [{a: 1, b: 1}, {a: 2, b: 1}], 'can use pluck like iterator');
assert.deepEqual(_.uniq([{0: 1, b: 1}, {0: 1, b: 2}, {0: 1, b: 3}, {0: 2, b: 1}], 0), [{0: 1, b: 1}, {0: 2, b: 1}], 'can use falsey pluck like iterator');
});
QUnit.test('unique', function(assert) {
@@ -198,44 +186,54 @@
QUnit.test('intersection', function(assert) {
var stooges = ['moe', 'curly', 'larry'], leaders = ['moe', 'groucho'];
assert.deepEqual(_.intersection(stooges, leaders), ['moe'], 'can take the set intersection of two arrays');
assert.deepEqual(_.intersection(stooges, leaders), ['moe'], 'can find the set intersection of two arrays');
assert.deepEqual(_(stooges).intersection(leaders), ['moe'], 'can perform an OO-style intersection');
var result = (function(){ return _.intersection(arguments, leaders); }('moe', 'curly', 'larry'));
assert.deepEqual(result, ['moe'], 'works on an arguments object');
var theSixStooges = ['moe', 'moe', 'curly', 'curly', 'larry', 'larry'];
assert.deepEqual(_.intersection(theSixStooges, leaders), ['moe'], 'returns a duplicate-free array');
result = _.intersection([2, 4, 3, 1], [1, 2, 3]);
assert.deepEqual(result, [2, 3, 1], 'preserves order of first array');
assert.deepEqual(result, [2, 3, 1], 'preserves the order of the first array');
result = _.intersection(null, [1, 2, 3]);
assert.equal(Object.prototype.toString.call(result), '[object Array]', 'returns an empty array when passed null as first argument');
assert.equal(result.length, 0, 'returns an empty array when passed null as first argument');
assert.deepEqual(result, [], 'returns an empty array when passed null as the first argument');
result = _.intersection([1, 2, 3], null);
assert.equal(Object.prototype.toString.call(result), '[object Array]', 'returns an empty array when passed null as argument beyond the first');
assert.equal(result.length, 0, 'returns an empty array when passed null as argument beyond the first');
assert.deepEqual(result, [], 'returns an empty array when passed null as an argument beyond the first');
});
QUnit.test('union', function(assert) {
var result = _.union([1, 2, 3], [2, 30, 1], [1, 40]);
assert.deepEqual(result, [1, 2, 3, 30, 40], 'takes the union of a list of arrays');
assert.deepEqual(result, [1, 2, 3, 30, 40], 'can find the union of a list of arrays');
result = _([1, 2, 3]).union([2, 30, 1], [1, 40]);
assert.deepEqual(result, [1, 2, 3, 30, 40], 'can perform an OO-style union');
result = _.union([1, 2, 3], [2, 30, 1], [1, 40, [1]]);
assert.deepEqual(result, [1, 2, 3, 30, 40, [1]], 'takes the union of a list of nested arrays');
assert.deepEqual(result, [1, 2, 3, 30, 40, [1]], 'can find the union of a list of nested arrays');
var args = null;
(function(){ args = arguments; }(1, 2, 3));
result = _.union(args, [2, 30, 1], [1, 40]);
assert.deepEqual(result, [1, 2, 3, 30, 40], 'takes the union of a list of arrays');
result = _.union([10, 20], [1, 30, 10], [0, 40]);
assert.deepEqual(result, [10, 20, 1, 30, 0, 40], 'orders values by their first encounter');
result = _.union([1, 2, 3], 4);
assert.deepEqual(result, [1, 2, 3], 'restrict the union to arrays only');
result = (function(){ return _.union(arguments, [2, 30, 1], [1, 40]); }(1, 2, 3));
assert.deepEqual(result, [1, 2, 3, 30, 40], 'works on an arguments object');
assert.deepEqual(_.union([1, 2, 3], 4), [1, 2, 3], 'restricts the union to arrays only');
});
QUnit.test('difference', function(assert) {
var result = _.difference([1, 2, 3], [2, 30, 40]);
assert.deepEqual(result, [1, 3], 'takes the difference of two arrays');
assert.deepEqual(result, [1, 3], 'can find the difference of two arrays');
result = _([1, 2, 3]).difference([2, 30, 40]);
assert.deepEqual(result, [1, 3], 'can perform an OO-style difference');
result = _.difference([1, 2, 3, 4], [2, 30, 40], [1, 11, 111]);
assert.deepEqual(result, [3, 4], 'takes the difference of three arrays');
assert.deepEqual(result, [3, 4], 'can find the difference of three arrays');
result = _.difference([8, 9, 3, 1], [3, 8]);
assert.deepEqual(result, [9, 1], 'preserves the order of the first array');
result = (function(){ return _.difference(arguments, [2, 30, 40]); }(1, 2, 3));
assert.deepEqual(result, [1, 3], 'works on an arguments object');
result = _.difference([1, 2, 3], 1);
assert.deepEqual(result, [1, 2, 3], 'restrict the difference to arrays only');

View File

@@ -475,9 +475,9 @@
});
QUnit.test('debounce asap', function(assert) {
assert.expect(4);
assert.expect(6);
var done = assert.async();
var a, b;
var a, b, c;
var counter = 0;
var incr = function(){ return ++counter; };
var debouncedIncr = _.debounce(incr, 64, true);
@@ -489,7 +489,13 @@
_.delay(debouncedIncr, 16);
_.delay(debouncedIncr, 32);
_.delay(debouncedIncr, 48);
_.delay(function(){ assert.equal(counter, 1, 'incr was debounced'); done(); }, 128);
_.delay(function(){
assert.equal(counter, 1, 'incr was debounced');
c = debouncedIncr();
assert.equal(c, 2);
assert.equal(counter, 2, 'incr was called again');
done();
}, 128);
});
QUnit.test('debounce asap cancel', function(assert) {

View File

@@ -565,6 +565,14 @@
assert.equal(_.isEqual({a: 0}, {a: -0}), false);
assert.equal(_.isEqual([NaN], [NaN]), true);
assert.equal(_.isEqual({a: NaN}, {a: NaN}), true);
if (typeof Symbol !== 'undefined') {
var symbol = Symbol('x');
assert.strictEqual(_.isEqual(symbol, symbol), true, 'A symbol is equal to itself');
assert.strictEqual(_.isEqual(symbol, Object(symbol)), true, 'Even when wrapped in Object()');
assert.strictEqual(_.isEqual(symbol, null), false, 'Different types are not equal');
}
});
QUnit.test('isEmpty', function(assert) {
@@ -639,6 +647,17 @@
assert.strictEqual(_.isString(1), false);
});
QUnit.test('isSymbol', function(assert) {
assert.ok(!_.isSymbol(0), 'numbers are not symbols');
assert.ok(!_.isSymbol(''), 'strings are not symbols');
assert.ok(!_.isSymbol(_.isSymbol), 'functions are not symbols');
if (typeof Symbol === 'function') {
assert.ok(_.isSymbol(Symbol()), 'symbols are symbols');
assert.ok(_.isSymbol(Symbol('description')), 'described symbols are symbols');
assert.ok(_.isSymbol(Object(Symbol())), 'boxed symbols are symbols');
}
});
QUnit.test('isNumber', function(assert) {
assert.ok(!_.isNumber('string'), 'a string is not a number');
assert.ok(!_.isNumber(arguments), 'the arguments object is not a number');
@@ -662,6 +681,100 @@
assert.ok(_.isBoolean(false), 'and so is false');
});
QUnit.test('isMap', function(assert) {
assert.ok(!_.isMap('string'), 'a string is not a map');
assert.ok(!_.isMap(2), 'a number is not a map');
assert.ok(!_.isMap({}), 'an object is not a map');
assert.ok(!_.isMap(false), 'a boolean is not a map');
assert.ok(!_.isMap(void 0), 'undefined is not a map');
assert.ok(!_.isMap([1, 2, 3]), 'an array is not a map');
if (typeof Set === 'function') {
assert.ok(!_.isMap(new Set()), 'a set is not a map');
}
if (typeof WeakSet === 'function') {
assert.ok(!_.isMap(new WeakSet()), 'a weakset is not a map');
}
if (typeof WeakMap === 'function') {
assert.ok(!_.isMap(new WeakMap()), 'a weakmap is not a map');
}
if (typeof Map === 'function') {
var keyString = 'a string';
var obj = new Map();
obj.set(keyString, 'value');
assert.ok(_.isMap(obj), 'but a map is');
}
});
QUnit.test('isWeakMap', function(assert) {
assert.ok(!_.isWeakMap('string'), 'a string is not a weakmap');
assert.ok(!_.isWeakMap(2), 'a number is not a weakmap');
assert.ok(!_.isWeakMap({}), 'an object is not a weakmap');
assert.ok(!_.isWeakMap(false), 'a boolean is not a weakmap');
assert.ok(!_.isWeakMap(void 0), 'undefined is not a weakmap');
assert.ok(!_.isWeakMap([1, 2, 3]), 'an array is not a weakmap');
if (typeof Set === 'function') {
assert.ok(!_.isWeakMap(new Set()), 'a set is not a weakmap');
}
if (typeof WeakSet === 'function') {
assert.ok(!_.isWeakMap(new WeakSet()), 'a weakset is not a weakmap');
}
if (typeof Map === 'function') {
assert.ok(!_.isWeakMap(new Map()), 'a map is not a weakmap');
}
if (typeof WeakMap === 'function') {
var keyObj = {}, obj = new WeakMap();
obj.set(keyObj, 'value');
assert.ok(_.isWeakMap(obj), 'but a weakmap is');
}
});
QUnit.test('isSet', function(assert) {
assert.ok(!_.isSet('string'), 'a string is not a set');
assert.ok(!_.isSet(2), 'a number is not a set');
assert.ok(!_.isSet({}), 'an object is not a set');
assert.ok(!_.isSet(false), 'a boolean is not a set');
assert.ok(!_.isSet(void 0), 'undefined is not a set');
assert.ok(!_.isSet([1, 2, 3]), 'an array is not a set');
if (typeof Map === 'function') {
assert.ok(!_.isSet(new Map()), 'a map is not a set');
}
if (typeof WeakMap === 'function') {
assert.ok(!_.isSet(new WeakMap()), 'a weakmap is not a set');
}
if (typeof WeakSet === 'function') {
assert.ok(!_.isSet(new WeakSet()), 'a weakset is not a set');
}
if (typeof Set === 'function') {
var obj = new Set();
obj.add(1).add('string').add(false).add({});
assert.ok(_.isSet(obj), 'but a set is');
}
});
QUnit.test('isWeakSet', function(assert) {
assert.ok(!_.isWeakSet('string'), 'a string is not a weakset');
assert.ok(!_.isWeakSet(2), 'a number is not a weakset');
assert.ok(!_.isWeakSet({}), 'an object is not a weakset');
assert.ok(!_.isWeakSet(false), 'a boolean is not a weakset');
assert.ok(!_.isWeakSet(void 0), 'undefined is not a weakset');
assert.ok(!_.isWeakSet([1, 2, 3]), 'an array is not a weakset');
if (typeof Map === 'function') {
assert.ok(!_.isWeakSet(new Map()), 'a map is not a weakset');
}
if (typeof WeakMap === 'function') {
assert.ok(!_.isWeakSet(new WeakMap()), 'a weakmap is not a weakset');
}
if (typeof Set === 'function') {
assert.ok(!_.isWeakSet(new Set()), 'a set is not a weakset');
}
if (typeof WeakSet === 'function') {
var obj = new WeakSet();
obj.add({x: 1}, {y: 'string'}).add({y: 'string'}).add({z: [1, 2, 3]});
assert.ok(_.isWeakSet(obj), 'but a weakset is');
}
});
QUnit.test('isFunction', function(assert) {
assert.ok(!_.isFunction(void 0), 'undefined vars are not functions');
assert.ok(!_.isFunction([1, 2, 3]), 'arrays are not functions');
@@ -717,6 +830,11 @@
assert.ok(_.isFinite(0), '0 is finite');
assert.ok(_.isFinite(123), 'Ints are finite');
assert.ok(_.isFinite(-12.44), 'Floats are finite');
if (typeof Symbol === 'function') {
assert.ok(!_.isFinite(Symbol()), 'symbols are not numbers');
assert.ok(!_.isFinite(Symbol('description')), 'described symbols are not numbers');
assert.ok(!_.isFinite(Object(Symbol())), 'boxed symbols are not numbers');
}
});
QUnit.test('isNaN', function(assert) {

View File

@@ -1,6 +1,6 @@
// Underscore.js 1.8.3
// http://underscorejs.org
// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// (c) 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Underscore may be freely distributed under the MIT license.
(function() {
@@ -20,6 +20,7 @@
// Save bytes in the minified (but not gzipped) version:
var ArrayProto = Array.prototype, ObjProto = Object.prototype;
var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
// Create quick reference variables for speed access to core prototypes.
var push = ArrayProto.push,
@@ -93,7 +94,7 @@
return _.property(value);
};
// An external wrapper for the internal callback generator
// An external wrapper for the internal callback generator.
_.iteratee = function(value, context) {
return cb(value, context, Infinity);
};
@@ -218,12 +219,8 @@
// Return the first value which passes a truth test. Aliased as `detect`.
_.find = _.detect = function(obj, predicate, context) {
var key;
if (isArrayLike(obj)) {
key = _.findIndex(obj, predicate, context);
} else {
key = _.findKey(obj, predicate, context);
}
var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey;
var key = keyFinder(obj, predicate, context);
if (key !== void 0 && key !== -1) return obj[key];
};
@@ -442,7 +439,7 @@
// Keep surrogate pair characters together
return obj.match(reStrSymbol);
}
if (isArrayLike(obj)) return _.map(obj, _.identity);
if (isArrayLike(obj)) return _.map(obj);
return _.values(obj);
};
@@ -494,7 +491,7 @@
// Trim out all falsy values from an array.
_.compact = function(array) {
return _.filter(array, _.identity);
return _.filter(array);
};
// Internal implementation of a recursive `flatten` function.
@@ -504,7 +501,7 @@
for (var i = 0, length = getLength(input); i < length; i++) {
var value = input[i];
if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {
// Flatten current level of array or arguments object
// Flatten current level of array or arguments object.
if (shallow) {
var j = 0, len = value.length;
while (j < len) output[idx++] = value[j++];
@@ -592,7 +589,7 @@
});
// Complement of _.zip. Unzip accepts an array of arrays and groups
// each array's elements on shared indices
// each array's elements on shared indices.
_.unzip = function(array) {
var length = array && _.max(array, getLength).length || 0;
var result = Array(length);
@@ -622,7 +619,7 @@
return result;
};
// Generator function to create the findIndex and findLastIndex functions
// Generator function to create the findIndex and findLastIndex functions.
var createPredicateIndexFinder = function(dir) {
return function(array, predicate, context) {
predicate = cb(predicate, context);
@@ -635,7 +632,7 @@
};
};
// Returns the first index on an array-like that passes a predicate test
// Returns the first index on an array-like that passes a predicate test.
_.findIndex = createPredicateIndexFinder(1);
_.findLastIndex = createPredicateIndexFinder(-1);
@@ -652,7 +649,7 @@
return low;
};
// Generator function to create the indexOf and lastIndexOf functions
// Generator function to create the indexOf and lastIndexOf functions.
var createIndexFinder = function(dir, predicateFind, sortedIndex) {
return function(array, item, idx) {
var i = 0, length = getLength(array);
@@ -707,7 +704,7 @@
};
// Split an **array** into several arrays containing **count** or less elements
// of initial array
// of initial array.
_.chunk = function(array, count) {
if (count == null || count < 1) return [];
@@ -723,7 +720,7 @@
// ------------------
// Determines whether to execute a function as a constructor
// or a normal function with the provided arguments
// or a normal function with the provided arguments.
var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {
if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
var self = baseCreate(sourceFunc.prototype);
@@ -859,12 +856,12 @@
};
var debounced = restArgs(function(args) {
var callNow = immediate && !timeout;
if (timeout) clearTimeout(timeout);
if (callNow) {
if (immediate) {
var callNow = !timeout;
timeout = setTimeout(later, wait);
result = func.apply(this, args);
} else if (!immediate) {
if (callNow) result = func.apply(this, args);
} else {
timeout = _.delay(later, wait, this, args);
}
@@ -959,7 +956,7 @@
};
// Retrieve the names of an object's own properties.
// Delegates to **ECMAScript 5**'s native `Object.keys`
// Delegates to **ECMAScript 5**'s native `Object.keys`.
_.keys = function(obj) {
if (!_.isObject(obj)) return [];
if (nativeKeys) return nativeKeys(obj);
@@ -991,8 +988,8 @@
return values;
};
// Returns the results of applying the iteratee to each element of the object
// In contrast to _.map it returns an object
// Returns the results of applying the iteratee to each element of the object.
// In contrast to _.map it returns an object.
_.mapObject = function(obj, iteratee, context) {
iteratee = cb(iteratee, context);
var keys = _.keys(obj),
@@ -1027,7 +1024,7 @@
};
// Return a sorted list of the function names available on the object.
// Aliased as `methods`
// Aliased as `methods`.
_.functions = _.methods = function(obj) {
var names = [];
for (var key in obj) {
@@ -1058,11 +1055,11 @@
// Extend a given object with all the properties in passed-in object(s).
_.extend = createAssigner(_.allKeys);
// Assigns a given object with all the own properties in the passed-in object(s)
// Assigns a given object with all the own properties in the passed-in object(s).
// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
_.extendOwn = _.assign = createAssigner(_.keys);
// Returns the first key on an object that passes a predicate test
// Returns the first key on an object that passes a predicate test.
_.findKey = function(obj, predicate, context) {
predicate = cb(predicate, context);
var keys = _.keys(obj), key;
@@ -1185,7 +1182,7 @@
return '' + a === '' + b;
case '[object Number]':
// `NaN`s are equivalent, but non-reflexive.
// Object(NaN) is equivalent to NaN
// Object(NaN) is equivalent to NaN.
if (+a !== +a) return +b !== +b;
// An `egal` comparison is performed for other numeric values.
return +a === 0 ? 1 / +a === 1 / b : +a === +b;
@@ -1195,6 +1192,8 @@
// millisecond representations. Note that invalid dates with millisecond representations
// of `NaN` are not equivalent.
return +a === +b;
case '[object Symbol]':
return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
}
var areArrays = className === '[object Array]';
@@ -1285,8 +1284,8 @@
return type === 'function' || type === 'object' && !!obj;
};
// Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.
_.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {
// Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.
_.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) {
_['is' + name] = function(obj) {
return toString.call(obj) === '[object ' + name + ']';
};
@@ -1311,7 +1310,7 @@
// Is a given object a finite number?
_.isFinite = function(obj) {
return isFinite(obj) && !isNaN(parseFloat(obj));
return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));
};
// Is the given value `NaN`?
@@ -1420,7 +1419,7 @@
var escaper = function(match) {
return map[match];
};
// Regexes for identifying a key that needs to be escaped
// Regexes for identifying a key that needs to be escaped.
var source = '(?:' + _.keys(map).join('|') + ')';
var testRegexp = RegExp(source);
var replaceRegexp = RegExp(source, 'g');