Compare commits
499 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15841b191d | ||
|
|
65514d89ad | ||
|
|
c6f8896826 | ||
|
|
882d84f1e6 | ||
|
|
0eba3a3678 | ||
|
|
756b28c3ab | ||
|
|
d78ebc40ae | ||
|
|
58aea21b82 | ||
|
|
c2b1d61dd1 | ||
|
|
f4d72dba06 | ||
|
|
31e81d7be2 | ||
|
|
6c9123beee | ||
|
|
0fa0397da2 | ||
|
|
b652fc7e1a | ||
|
|
c42fea0d3d | ||
|
|
48a56a848a | ||
|
|
d6937baa8e | ||
|
|
3490f8acb5 | ||
|
|
46ace7e8e8 | ||
|
|
698956e130 | ||
|
|
b25cd39953 | ||
|
|
de4f5eb2ca | ||
|
|
ccc5fa3981 | ||
|
|
b899a19184 | ||
|
|
6af7fac344 | ||
|
|
49ef2b4d54 | ||
|
|
fcc09a7375 | ||
|
|
8e9ad4df97 | ||
|
|
4dfcfd2542 | ||
|
|
12081c9bd6 | ||
|
|
abee7fdfa2 | ||
|
|
ca0bc0632b | ||
|
|
e465750cd2 | ||
|
|
934b08f720 | ||
|
|
78cc98840b | ||
|
|
d4cd7a120f | ||
|
|
4b6c91bbf1 | ||
|
|
e3be2b4451 | ||
|
|
c6ff845ecb | ||
|
|
846bde35ff | ||
|
|
69990ae226 | ||
|
|
415fc81577 | ||
|
|
b675566e23 | ||
|
|
190da0dcd4 | ||
|
|
5c40f93ca3 | ||
|
|
879c1e4992 | ||
|
|
311334c9e1 | ||
|
|
dc5268b0c0 | ||
|
|
d77ace6dc3 | ||
|
|
f0b3c1a9ab | ||
|
|
9efb73f592 | ||
|
|
569b4b29aa | ||
|
|
a61bde5b78 | ||
|
|
542dd67892 | ||
|
|
172eca6081 | ||
|
|
004aaed783 | ||
|
|
a1b15df648 | ||
|
|
b5d5bef678 | ||
|
|
421df0dff3 | ||
|
|
5b5e29cb7b | ||
|
|
db67ae12ec | ||
|
|
7dfd7ad5b9 | ||
|
|
ca5fa9e84d | ||
|
|
1afcfa4406 | ||
|
|
95b1455b62 | ||
|
|
d825937411 | ||
|
|
ee182df533 | ||
|
|
14651d8ea8 | ||
|
|
7e4ed7c1a9 | ||
|
|
13fe88c03f | ||
|
|
7b80a780c7 | ||
|
|
2b465bdf82 | ||
|
|
6d52119597 | ||
|
|
b75041173c | ||
|
|
23eba0a029 | ||
|
|
566781cab2 | ||
|
|
0ea1fc5602 | ||
|
|
2ce9e09e8b | ||
|
|
6cab7ceb0f | ||
|
|
8ae7d8aa07 | ||
|
|
ce6ccef2d0 | ||
|
|
2c6d880542 | ||
|
|
bf89287c56 | ||
|
|
df176dfe8a | ||
|
|
141a32d388 | ||
|
|
37786b76ed | ||
|
|
02b920f259 | ||
|
|
31e25f88a0 | ||
|
|
231c8a468e | ||
|
|
ae346f564f | ||
|
|
fcc0608cf2 | ||
|
|
641cd63462 | ||
|
|
0b907a3efa | ||
|
|
ce180cf2bf | ||
|
|
d97276404c | ||
|
|
d5a9b4344b | ||
|
|
e317fdfa3d | ||
|
|
150ea2639a | ||
|
|
a551348b40 | ||
|
|
3429b5d661 | ||
|
|
c8314b215b | ||
|
|
5929f7d23b | ||
|
|
85a7df3d27 | ||
|
|
e6c5a0e848 | ||
|
|
92dee72b10 | ||
|
|
4d6e57a5e6 | ||
|
|
936a1c2764 | ||
|
|
a08a3c6096 | ||
|
|
82be40eace | ||
|
|
20ba0bd1dc | ||
|
|
75ce6b82e8 | ||
|
|
9749ac56ba | ||
|
|
746f9bb778 | ||
|
|
f2dae588aa | ||
|
|
9f3f0a76aa | ||
|
|
30f28a51ca | ||
|
|
3e22344782 | ||
|
|
0b20d89d62 | ||
|
|
80d892c744 | ||
|
|
53326bef33 | ||
|
|
f05a5a3abb | ||
|
|
8581be4977 | ||
|
|
0e8277ba9e | ||
|
|
3cc2f83912 | ||
|
|
177034a498 | ||
|
|
f4d06e5183 | ||
|
|
637a6b5f7e | ||
|
|
75445b8b98 | ||
|
|
f96de55ac7 | ||
|
|
c4d4af3b5a | ||
|
|
5dfee44340 | ||
|
|
99f5857d84 | ||
|
|
520f7c6812 | ||
|
|
63d493aa1f | ||
|
|
38ab42f855 | ||
|
|
bc3771f3af | ||
|
|
9d90af409b | ||
|
|
20183bbd57 | ||
|
|
1d8efe1cf8 | ||
|
|
23354d413f | ||
|
|
715f03f5f1 | ||
|
|
ff6bbaed19 | ||
|
|
f82cbbab1c | ||
|
|
5a1b526b6c | ||
|
|
1ef92c87fb | ||
|
|
0aef515522 | ||
|
|
9b5c97666a | ||
|
|
a55d822f9a | ||
|
|
5b2bde6e0d | ||
|
|
020c5b27dc | ||
|
|
65457208e5 | ||
|
|
6eb1b98975 | ||
|
|
a927bab6b3 | ||
|
|
48e3e3e8cb | ||
|
|
b5d095401d | ||
|
|
b3e58d4794 | ||
|
|
79b064320e | ||
|
|
335b8326ee | ||
|
|
e777020e44 | ||
|
|
745d97ebe1 | ||
|
|
bb06d98a43 | ||
|
|
3500b0016c | ||
|
|
7ec916b777 | ||
|
|
3c71f79929 | ||
|
|
a83e70104c | ||
|
|
85af554bac | ||
|
|
885722afde | ||
|
|
b2f094da01 | ||
|
|
1e85ec6758 | ||
|
|
c8974aac3e | ||
|
|
ad318c04e5 | ||
|
|
db73e48206 | ||
|
|
d13972e0b8 | ||
|
|
df74b2bfcb | ||
|
|
b94b75726d | ||
|
|
9a2d38acff | ||
|
|
537f8f401e | ||
|
|
04f1a799dc | ||
|
|
74adb2f540 | ||
|
|
a129a2509f | ||
|
|
cc0b8e9d10 | ||
|
|
af8fcf234f | ||
|
|
e0dc2daf54 | ||
|
|
c066e655dc | ||
|
|
2698e6f0ea | ||
|
|
63902bde9c | ||
|
|
c876004fb2 | ||
|
|
633f37bfb6 | ||
|
|
d70bc74dc8 | ||
|
|
d7a4524e70 | ||
|
|
fe1e27fd40 | ||
|
|
8a7a099073 | ||
|
|
1b53b5f9eb | ||
|
|
8b758ee25a | ||
|
|
81c24a8478 | ||
|
|
a6f3e0b6af | ||
|
|
6e9e8127b6 | ||
|
|
63d43275d3 | ||
|
|
cb2bf7f8fa | ||
|
|
1fae760ccd | ||
|
|
4195c4c4bf | ||
|
|
13e7a1ed93 | ||
|
|
ea4357ca98 | ||
|
|
5e8255d24d | ||
|
|
003d6ec43f | ||
|
|
9749ff7c67 | ||
|
|
c88589e0e5 | ||
|
|
32ef1bb7a5 | ||
|
|
206c65904f | ||
|
|
219d4688e4 | ||
|
|
adc687f0a0 | ||
|
|
88e59c9a5a | ||
|
|
71a89a575f | ||
|
|
e3dc8dfcf4 | ||
|
|
2dd77d5bc7 | ||
|
|
0192226bb3 | ||
|
|
faf2658da2 | ||
|
|
9a1c00d2dc | ||
|
|
4a8695caff | ||
|
|
b28016bfeb | ||
|
|
4758a9e66d | ||
|
|
97bd1ef4ec | ||
|
|
2adac8bdae | ||
|
|
3c56914822 | ||
|
|
c5cc907838 | ||
|
|
0907aabacd | ||
|
|
f4290bda7f | ||
|
|
4bdb82a7a2 | ||
|
|
6a696dde3a | ||
|
|
8481684a82 | ||
|
|
03aa8b3356 | ||
|
|
64bfed2640 | ||
|
|
2edcc89303 | ||
|
|
18313f2e90 | ||
|
|
0ff96418bd | ||
|
|
1480abf0e8 | ||
|
|
e7ba75d533 | ||
|
|
044291d940 | ||
|
|
ad62efcb9e | ||
|
|
0dc59d9481 | ||
|
|
11ab3034b1 | ||
|
|
c594bda77f | ||
|
|
8218b74fb3 | ||
|
|
3d0beb1a2e | ||
|
|
515cfd48d8 | ||
|
|
1448bab5b3 | ||
|
|
2884f8acb8 | ||
|
|
075cae4efb | ||
|
|
d2b98323dd | ||
|
|
b1a81a85b1 | ||
|
|
668384649a | ||
|
|
a7252b1a7f | ||
|
|
a4e58e4d55 | ||
|
|
4241e01364 | ||
|
|
d7d7952138 | ||
|
|
9cc2253339 | ||
|
|
6831802590 | ||
|
|
9d79cc7e87 | ||
|
|
763b003a11 | ||
|
|
d560e2a558 | ||
|
|
f914f080b1 | ||
|
|
600a4e86e1 | ||
|
|
e7b4ada65f | ||
|
|
95f31be096 | ||
|
|
ad6db7eaae | ||
|
|
d7a99c6618 | ||
|
|
f20d8f5cc0 | ||
|
|
8930e6b393 | ||
|
|
f26886acb0 | ||
|
|
820ab8d486 | ||
|
|
8e425fb358 | ||
|
|
6006f499ac | ||
|
|
3caa740fc4 | ||
|
|
007ea9ea20 | ||
|
|
5d248d261d | ||
|
|
26908cba64 | ||
|
|
18d118746e | ||
|
|
9a633f5f2e | ||
|
|
5aa44e98d5 | ||
|
|
33916fa975 | ||
|
|
eab18df403 | ||
|
|
002caceb05 | ||
|
|
c250aa804a | ||
|
|
94ca50883f | ||
|
|
462c482873 | ||
|
|
e28e04a990 | ||
|
|
6438385d64 | ||
|
|
bfb08ce003 | ||
|
|
3590a06f40 | ||
|
|
23ca6c5e10 | ||
|
|
1aea5bcd50 | ||
|
|
82c5d8ed28 | ||
|
|
5dcd58a75f | ||
|
|
dc605a4ee1 | ||
|
|
fec940ab8b | ||
|
|
05fd7cecf4 | ||
|
|
2f52730b48 | ||
|
|
4c1819c7dd | ||
|
|
c58c0df30e | ||
|
|
c5902b3144 | ||
|
|
519eb424e7 | ||
|
|
03478afea4 | ||
|
|
306ef8addf | ||
|
|
d4659b261d | ||
|
|
69ce41807a | ||
|
|
cc81da5aa4 | ||
|
|
eee714f52b | ||
|
|
c976b637d8 | ||
|
|
ea93515d53 | ||
|
|
652499bdcf | ||
|
|
819862199a | ||
|
|
6c1bc1d7bb | ||
|
|
36ebe76e0a | ||
|
|
8f8d35dec7 | ||
|
|
ac1e436339 | ||
|
|
78d4812b0e | ||
|
|
6a1b7626e3 | ||
|
|
b6ccb4c96f | ||
|
|
9712ac550c | ||
|
|
5b173766c6 | ||
|
|
b535c4f321 | ||
|
|
56c5ebcb71 | ||
|
|
028234ba86 | ||
|
|
f063b4d231 | ||
|
|
508f27cc32 | ||
|
|
d4783170e5 | ||
|
|
51e459b386 | ||
|
|
1253d254af | ||
|
|
5e70574396 | ||
|
|
b5dce2f74b | ||
|
|
6113da3e68 | ||
|
|
faf6406289 | ||
|
|
7c443431d9 | ||
|
|
0f201e3fd8 | ||
|
|
bf96c30187 | ||
|
|
eb1b7b914a | ||
|
|
135bc2de52 | ||
|
|
ab2269717d | ||
|
|
b5a42cfa75 | ||
|
|
6693416d0a | ||
|
|
9cdf013933 | ||
|
|
1dfaa30520 | ||
|
|
d898fcee75 | ||
|
|
1e647a2058 | ||
|
|
10e379d862 | ||
|
|
ee456493c4 | ||
|
|
69e9c7d0be | ||
|
|
adce718d63 | ||
|
|
3a94a65f12 | ||
|
|
bbe30db1b7 | ||
|
|
68f3c43805 | ||
|
|
3c99ecda60 | ||
|
|
b1366696c4 | ||
|
|
534aeb4065 | ||
|
|
cc77a36dd9 | ||
|
|
5991068fdf | ||
|
|
913778d5ab | ||
|
|
9a8345d4f9 | ||
|
|
ba9bd3bc76 | ||
|
|
aad0070b77 | ||
|
|
d192e69811 | ||
|
|
ec8d919b93 | ||
|
|
4ce4f1d758 | ||
|
|
3aa40d4df6 | ||
|
|
ec1be41b62 | ||
|
|
c15d81545a | ||
|
|
1af8b9d16a | ||
|
|
d860cf834d | ||
|
|
63d5a3acbc | ||
|
|
132aacee89 | ||
|
|
973038da6a | ||
|
|
584da3c39b | ||
|
|
73c4829255 | ||
|
|
68942f7ec4 | ||
|
|
e914b83a1b | ||
|
|
2268376360 | ||
|
|
6bb3b9a684 | ||
|
|
9f213c119c | ||
|
|
f081e2b799 | ||
|
|
a024152c12 | ||
|
|
42d23dbc70 | ||
|
|
74786e8a25 | ||
|
|
eeb4ede60d | ||
|
|
f2eee8896c | ||
|
|
bf4a70d91c | ||
|
|
a35ab3937a | ||
|
|
5ef9a4be8a | ||
|
|
d76d7582fe | ||
|
|
44006142c7 | ||
|
|
6840b2cfe5 | ||
|
|
5613f60403 | ||
|
|
76d3959f1a | ||
|
|
b681759000 | ||
|
|
d6336c4302 | ||
|
|
35b161450a | ||
|
|
861aaf06c6 | ||
|
|
a910884e7d | ||
|
|
0e7bef9014 | ||
|
|
d942189bc6 | ||
|
|
eb16051b1e | ||
|
|
7749a7e41d | ||
|
|
dc4cef17d4 | ||
|
|
89ed40e4a4 | ||
|
|
10ee74d872 | ||
|
|
474ae1e91c | ||
|
|
0dc70ca5f3 | ||
|
|
633b1663ca | ||
|
|
153fe61b4b | ||
|
|
9734fd0353 | ||
|
|
6209c120c0 | ||
|
|
3516881e7a | ||
|
|
15398555b3 | ||
|
|
cb132fcbf4 | ||
|
|
f42f46c7d6 | ||
|
|
f1046f1cf1 | ||
|
|
4a62287139 | ||
|
|
69cd56357f | ||
|
|
b66a886682 | ||
|
|
249504b7d6 | ||
|
|
fa0086404d | ||
|
|
f243ebba91 | ||
|
|
540afb193b | ||
|
|
8294acdf1c | ||
|
|
7733d02938 | ||
|
|
9b6342e7fa | ||
|
|
22c09cb31b | ||
|
|
21e79cb54a | ||
|
|
b8cc829f4a | ||
|
|
ace0dacf15 | ||
|
|
5ca13098e3 | ||
|
|
07b13eedec | ||
|
|
d9168ed9ec | ||
|
|
fb4e2c167c | ||
|
|
10ee3585f6 | ||
|
|
5d4ba820dd | ||
|
|
a51e00e69f | ||
|
|
4dfa963851 | ||
|
|
f2d4f6ccf6 | ||
|
|
182cb8ab25 | ||
|
|
ece341d868 | ||
|
|
d72e8c2687 | ||
|
|
b0ff6f4c7b | ||
|
|
6ec5249492 | ||
|
|
c44cd76c5a | ||
|
|
37f711d72a | ||
|
|
fcf18fb965 | ||
|
|
2efd6250fb | ||
|
|
1b4bd8523d | ||
|
|
60c44910df | ||
|
|
faf67fae03 | ||
|
|
e95f547950 | ||
|
|
96b663b783 | ||
|
|
ce44f7e4b0 | ||
|
|
16a9c7d492 | ||
|
|
fc369c3448 | ||
|
|
b1a33edf0f | ||
|
|
3b805f1a24 | ||
|
|
954b4d8075 | ||
|
|
d073e2a881 | ||
|
|
044dd2af94 | ||
|
|
ee489fa8c0 | ||
|
|
035ed5f49b | ||
|
|
7dcd690f61 | ||
|
|
1c9290aded | ||
|
|
0b922b1ed1 | ||
|
|
34eec362e5 | ||
|
|
b829383864 | ||
|
|
3960235428 | ||
|
|
e91a662491 | ||
|
|
ba4da24984 | ||
|
|
70378432b7 | ||
|
|
6b63009b14 | ||
|
|
dd45fea732 | ||
|
|
ee09425cfb | ||
|
|
af02a1e024 | ||
|
|
2a86f0776c | ||
|
|
c6f73d9df8 | ||
|
|
5ab79f292b | ||
|
|
82c7a22d27 | ||
|
|
35fa977981 | ||
|
|
ecbc46a91d | ||
|
|
d2f6416e45 | ||
|
|
97a885a05c | ||
|
|
aa1edd6b94 | ||
|
|
083e401717 | ||
|
|
bdeca2edce | ||
|
|
c84e14db46 | ||
|
|
919c5bd0b3 | ||
|
|
af8a8f1e3f | ||
|
|
41d08e123f | ||
|
|
67d9656e35 | ||
|
|
1a58a70494 | ||
|
|
a477b2efd1 | ||
|
|
59c4546b8c | ||
|
|
ed1a75ef4c | ||
|
|
0cd942f152 | ||
|
|
fe7f082083 | ||
|
|
849fd71f76 | ||
|
|
4e3a72388d |
2
.gitignore
vendored
@@ -2,5 +2,5 @@
|
||||
*.custom.*
|
||||
*.log
|
||||
*.map
|
||||
lodash.compat.js
|
||||
lodash.compat.min.js
|
||||
node_modules
|
||||
|
||||
52
.travis.yml
@@ -1,58 +1,72 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.10"
|
||||
- "0.12"
|
||||
env:
|
||||
global:
|
||||
- BIN="node" BUILD="compat" ISTANBUL=false NODE_BIN=$BIN OPTION=""
|
||||
- IOJS_VERSION="v1.0.4" NPM_VERSION="^2.0.0" SAUCE_LABS=false SAUCE_USERNAME="lodash"
|
||||
- PATTERN1="s|^.+?!support\.funcNames\b[\s\S]+?\.name\b[\s\S]+?\}\n||m"
|
||||
- PATTERN2="s|\s*else\s*\{\s*iteratee\(index\);\s*\}||"
|
||||
- BIN="node" BUILD="compat" ISTANBUL=false OPTION=""
|
||||
- NPM_VERSION="^2.0.0" SAUCE_LABS=false SAUCE_USERNAME="lodash"
|
||||
- secure: "tg1JFsIFnxzLaTboFPOnm+aJCuMm5+JdhLlESlqg9x3fwro++7KCnwHKLNovhchaPe4otC43ZMB/nfWhDnDm11dKbm/V6HlTkED+dadTsaLxVDg6J+7yK41QhokBPJOxLV78iDaNaAQVYEirAgZ0yn8kFubxmNKV+bpCGQNc9yU="
|
||||
matrix:
|
||||
- BUILD="compat"
|
||||
- BUILD="modern"
|
||||
- BUILD="modern"
|
||||
- BUILD="modern" ISTANBUL=true
|
||||
- BIN="iojs" BUILD="compat" NODE_BIN=$BIN
|
||||
- BIN="iojs" BUILD="modern" NODE_BIN=$BIN
|
||||
- BIN="phantomjs"
|
||||
- BIN="rhino"
|
||||
- BIN="rhino" OPTION="-require"
|
||||
- BIN="rhino" OPTION="-opt -1"
|
||||
- BIN="rhino" OPTION="-opt -1 -require"
|
||||
- BIN="ringo"
|
||||
matrix:
|
||||
include:
|
||||
- node_js: "io.js"
|
||||
env:
|
||||
- node_js: "io.js"
|
||||
env: BUILD="modern"
|
||||
- node_js: "0.8"
|
||||
env: NPM_VERSION="~1.4.0"
|
||||
- node_js: "0.8"
|
||||
env: BUILD="modern" NPM_VERSION="~1.4.0"
|
||||
- node_js: "0.10"
|
||||
env: SAUCE_LABS=true
|
||||
env:
|
||||
- node_js: "0.10"
|
||||
env: BUILD="modern"
|
||||
- node_js: "0.12"
|
||||
env: SAUCE_LABS=true
|
||||
- node_js: "0.12"
|
||||
env: SAUCE_LABS=true BUILD="modern"
|
||||
git:
|
||||
depth: 10
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
notifications:
|
||||
webhooks:
|
||||
urls:
|
||||
- https://webhooks.gitter.im/e/4aab6358b0e9aed0b628
|
||||
on_success: change
|
||||
on_failure: always
|
||||
before_install:
|
||||
- "nvm use $TRAVIS_NODE_VERSION"
|
||||
- "npm config set loglevel error"
|
||||
- "npm i -g npm@\"$NPM_VERSION\""
|
||||
- "[ $SAUCE_LABS == false ] || npm i chalk@\"0.5.1\" ecstatic@\"0.5.8\" request@\"^2.0.0\" sauce-tunnel@\"^2.0.0\""
|
||||
- "[ $ISTANBUL == false ] || (npm i -g coveralls@\"^2.0.0\" && npm i istanbul@\"0.3.5\")"
|
||||
- "[ $BIN != 'iojs' ] || (wget https://iojs.org/dist/${IOJS_VERSION}/iojs-${IOJS_VERSION}-linux-x64.tar.xz && sudo tar xJf iojs-${IOJS_VERSION}-linux-x64.tar.xz -C /opt && rm iojs-${IOJS_VERSION}-linux-x64.tar.xz)"
|
||||
- "[ $BIN != 'iojs' ] || (sudo ln -s /opt/iojs-${IOJS_VERSION}-linux-x64/bin/iojs /usr/local/bin/iojs && sudo chmod +x $_)"
|
||||
- "[ $BIN != 'rhino' ] || (sudo mkdir /opt/rhino-1.7R5 && sudo wget --no-check-certificate -O $_/js.jar https://lodash.com/_travis/rhino-1.7R5.jar)"
|
||||
- "[ $BIN != 'rhino' ] || (echo -e '#!/bin/sh\\njava -jar /opt/rhino-1.7R5/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino)"
|
||||
- "[ $SAUCE_LABS == false ] || npm i chalk@\"^1.0.0\" ecstatic@\"0.7.6\" request@\"^2.0.0\" sauce-tunnel@\"2.2.3\""
|
||||
- "[ $ISTANBUL == false ] || (npm i -g coveralls@\"^2.0.0\" && npm i istanbul@\"0.3.14\")"
|
||||
- "[ $BIN != 'rhino' ] || (sudo mkdir /opt/rhino-1.7.6 && sudo wget --no-check-certificate -O $_/js.jar https://lodash.com/_travis/rhino-1.7.6.jar)"
|
||||
- "[ $BIN != 'rhino' ] || (echo -e '#!/bin/sh\\njava -jar /opt/rhino-1.7.6/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino)"
|
||||
- "[ $BIN != 'ringo' ] || (wget --no-check-certificate https://lodash.com/_travis/ringojs-0.11.zip && sudo unzip ringojs-0.11 -d /opt && rm ringojs-0.11.zip)"
|
||||
- "[ $BIN != 'ringo' ] || (sudo ln -s /opt/ringojs-0.11/bin/ringo /usr/local/bin/ringo && sudo chmod +x $_)"
|
||||
- "sed -i'' 's|\"lodash\"|\"lodash-compat\"|' ./package.json"
|
||||
- "perl -pi -e 's|\"lodash\"|\"lodash-compat\"|' ./package.json"
|
||||
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli.git ./node_modules/lodash-cli && mkdir $_/node_modules && cd $_ && ln -s ../../../ ./lodash-compat && cd ../ && npm i && cd ../../"
|
||||
- "$NODE_BIN ./node_modules/lodash-cli/bin/lodash $BUILD -o ./lodash.$BUILD.js"
|
||||
- "node ./node_modules/lodash-cli/bin/lodash $BUILD -o ./lodash.$BUILD.js"
|
||||
script:
|
||||
- "[ $ISTANBUL == false ] || (nvm install 0.11.11 && cp ./lodash.$BUILD.js ./lodash.js && $BIN --harmony ./node_modules/istanbul/lib/cli.js cover -x \"**/vendor/**\" --report lcovonly ./test/test.js -- ./lodash.js)"
|
||||
- "([ $ISTANBUL == true ] && [ $TRAVIS_SECURE_ENV_VARS == true ] && nvm use $TRAVIS_NODE_VERSION && cat ./coverage/lcov.info | coveralls) || true"
|
||||
- "[ $ISTANBUL == false ] || cp ./lodash.$BUILD.js ./lodash.js"
|
||||
- "[ $ISTANBUL == false ] || perl -0pi -e \"$PATTERN1\" ./lodash.js && perl -0pi -e \"$PATTERN2\" $_"
|
||||
- "[ $ISTANBUL == false ] || node ./node_modules/istanbul/lib/cli.js cover -x \"**/vendor/**\" --report lcovonly ./test/test.js -- ./lodash.js"
|
||||
- "[ $ISTANBUL == false ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || (cat ./coverage/lcov.info | coveralls)"
|
||||
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || cd ./test"
|
||||
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || $BIN $OPTION ./test.js ../lodash.$BUILD.js"
|
||||
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || $BIN $OPTION ./test.js ../lodash.$BUILD.min.js"
|
||||
- "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || $BIN $OPTION ./test.js ../lodash.$BUILD.min.js"
|
||||
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.js&noglobals=true\" tags=\"$BUILD,development\""
|
||||
- "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.min.js&noglobals=true\" tags=\"$BUILD,production\""
|
||||
- "[ $SAUCE_LABS == false ] || [ $BUILD != 'compat' ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../lodash.$BUILD.js\" tags=\"$BUILD,development,ie-compat\" compatMode=7"
|
||||
|
||||
@@ -8,7 +8,9 @@ Please make sure to [search the issue tracker](https://github.com/lodash/lodash/
|
||||
Include updated unit tests in the `test` directory as part of your pull request.
|
||||
Don’t worry about regenerating the documentation, lodash.js, or lodash.min.js.
|
||||
|
||||
You can run the tests from the command line via `node test/test`, or open `test/index.html` in a web browser.
|
||||
Before running the unit tests you’ll need to install, `npm i`, [development dependencies](https://docs.npmjs.com/files/package.json#devdependencies).
|
||||
Run unit tests from the command-line via `node test/test`, or open `test/index.html` in a web browser.
|
||||
|
||||
The `test/run-test.sh` script attempts to run the tests in [Rhino](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino), [RingoJS](http://ringojs.org/), [PhantomJS](http://phantomjs.org/), & [Node](http://nodejs.org/), before running them in your default browser.
|
||||
The [Backbone](http://backbonejs.org/) & [Underscore](http://underscorejs.org/) test suites are included as well.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
|
||||
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
||||
10
README.md
@@ -1,4 +1,4 @@
|
||||
# lodash v3.0.1
|
||||
# lodash v3.9.0
|
||||
|
||||
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) with packages for [Bower](http://bower.io/), [Component](http://component.github.io/), & [Volo](http://volojs.org/).
|
||||
|
||||
@@ -7,13 +7,17 @@ Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
|
||||
$ lodash modern -o ./lodash.js
|
||||
```
|
||||
|
||||
## Community
|
||||
|
||||
[](https://gitter.im/lodash/lodash)
|
||||
|
||||
## Module formats
|
||||
|
||||
lodash is also available in a variety of other builds & module formats.
|
||||
|
||||
* npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds
|
||||
* AMD modules for [modern](https://github.com/lodash/lodash/tree/3.0.1-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.0.1-amd) builds
|
||||
* ES modules for the [modern](https://github.com/lodash/lodash/tree/3.0.1-es) build
|
||||
* AMD modules for [modern](https://github.com/lodash/lodash/tree/3.9.0-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.9.0-amd) builds
|
||||
* ES modules for the [modern](https://github.com/lodash/lodash/tree/3.9.0-es) build
|
||||
|
||||
## Further Reading
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"version": "3.0.1",
|
||||
"version": "3.9.0",
|
||||
"main": "lodash.js",
|
||||
"ignore": [
|
||||
".*",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"repo": "lodash/lodash",
|
||||
"version": "3.0.1",
|
||||
"version": "3.9.0",
|
||||
"description": "The modern build of lodash.",
|
||||
"license": "MIT",
|
||||
"main": "lodash.js",
|
||||
|
||||
3211
doc/README.md
175
lodash.min.js
vendored
@@ -1,85 +1,98 @@
|
||||
/**
|
||||
* @license
|
||||
* lodash 3.0.1 (Custom Build) lodash.com/license | Underscore.js 1.7.0 underscorejs.org/LICENSE
|
||||
* lodash 3.9.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* Build: `lodash modern -o ./lodash.js`
|
||||
*/
|
||||
;(function(){function n(n,t){if(n!==t){var r=n===n,e=t===t;if(n>t||!r||typeof n=="undefined"&&e)return 1;if(n<t||!e||typeof t=="undefined"&&r)return-1}return 0}function t(n,t,r){if(t!==t)return p(n,r);r=(r||0)-1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function r(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function e(n){return typeof n=="string"?n:null==n?"":n+""}function u(n){return n.charCodeAt(0)}function o(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););return r
|
||||
}function i(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function a(t,r){return n(t.a,r.a)||t.b-r.b}function f(t,r){for(var e=-1,u=t.a,o=r.a,i=u.length;++e<i;){var a=n(u[e],o[e]);if(a)return a}return t.b-r.b}function l(n){return Wt[n]}function c(n){return Nt[n]}function s(n){return"\\"+Lt[n]}function p(n,t,r){var e=n.length;for(t=r?t||e:(t||0)-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function h(n){return n&&typeof n=="object"||false}function g(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n)
|
||||
}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]=B,o[++u]=r);return o}function d(n){for(var t=-1,r=n.length;++t<r&&g(n.charCodeAt(t)););return t}function y(n){for(var t=n.length;t--&&g(n.charCodeAt(t)););return t}function _(n){return Ft[n]}function m(g){function Wt(n){if(h(n)&&!To(n)){if(n instanceof Nt)return n;if(Nu.call(n,"__wrapped__"))return new Nt(n.__wrapped__,n.__chain__,zt(n.__actions__))}return new Nt(n)}function Nt(n,t,r){this.__actions__=r||[],this.__chain__=!!t,this.__wrapped__=n
|
||||
}function Ft(n){this.actions=null,this.dir=1,this.dropCount=0,this.filtered=false,this.iteratees=null,this.takeCount=co,this.views=null,this.wrapped=n}function Ut(){this.__data__={}}function Lt(n){var t=n?n.length:0;for(this.data={hash:no(null),set:new Yu};t--;)this.push(n[t])}function Bt(n,t){var r=n.data;return(typeof t=="string"||Ge(t)?r.set.has(t):r.hash[t])?0:-1}function zt(n,t){var r=-1,e=n.length;for(t||(t=mu(e));++r<e;)t[r]=n[r];return t}function Mt(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););return n
|
||||
}function qt(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Pt(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function Kt(n,t){for(var r=-1,e=n.length,u=mu(e);++r<e;)u[r]=t(n[r],r,n);return u}function Vt(n){for(var t=-1,r=n.length,e=lo;++t<r;){var u=n[t];u>e&&(e=u)}return e}function Yt(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function Zt(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);
|
||||
return r}function Gt(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;return false}function Jt(n,t){return typeof n=="undefined"?t:n}function Xt(n,t,r,e){return typeof n!="undefined"&&Nu.call(e,r)?n:t}function Ht(n,t,r){var e=Fo(t);if(!r)return nr(t,n,e);for(var u=-1,o=e.length;++u<o;){var i=e[u],a=n[i],f=r(a,t[i],i,n,t);(f===f?f===a:a!==a)&&(typeof a!="undefined"||i in n)||(n[i]=f)}return n}function Qt(n,t){for(var r=-1,e=n.length,u=ue(e),o=t.length,i=mu(o);++r<o;){var a=t[r];u?(a=parseFloat(a),i[r]=re(a,e)?n[a]:b):i[r]=n[a]
|
||||
}return i}function nr(n,t,r){r||(r=t,t={});for(var e=-1,u=r.length;++e<u;){var o=r[e];t[o]=n[o]}return t}function tr(n,t,r){var e=typeof n;if("function"==e){if(e=typeof t!="undefined"){var e=Wt.support,u=!(e.funcNames?n.name:e.funcDecomp);if(!u){var o=Su.call(n);e.funcNames||(u=!_t.test(o)),u||(u=kt.test(o)||Je(n),bo(n,u))}e=u}n=e?Wr(n,t,r):n}else n=null==n?gu:"object"==e?wr(n,!r):Ar(n+"");return n}function rr(n,t,r,e,u,o,i){var a;if(r&&(a=u?r(n,e,u):r(n)),typeof a!="undefined")return a;if(!Ge(n))return n;
|
||||
if(e=To(n)){if(a=Qr(n),!t)return zt(n,a)}else{var f=Uu.call(n),l=f==K;if(f!=Y&&f!=z&&(!l||u))return Tt[f]?te(n,f,t):u?n:{};if(a=ne(l?{}:n),!t)return nr(n,a,Fo(n))}for(o||(o=[]),i||(i=[]),u=o.length;u--;)if(o[u]==n)return i[u];return o.push(n),i.push(a),(e?Mt:gr)(n,function(e,u){a[u]=rr(e,t,r,u,n,o,i)}),a}function er(n,t,r,e){if(!Ze(n))throw new Iu($);return Zu(function(){n.apply(b,Er(r,e))},t)}function ur(n,r){var e=n?n.length:0,u=[];if(!e)return u;var o=-1,i=Hr(),a=i==t,f=a&&200<=r.length&&wo(r),l=r.length;
|
||||
f&&(i=Bt,a=false,r=f);n:for(;++o<e;)if(f=n[o],a&&f===f){for(var c=l;c--;)if(r[c]===f)continue n;u.push(f)}else 0>i(r,f)&&u.push(f);return u}function or(n,t){var r=n?n.length:0;if(!ue(r))return gr(n,t);for(var e=-1,u=se(n);++e<r&&false!==t(u[e],e,u););return n}function ir(n,t){var r=n?n.length:0;if(!ue(r))return vr(n,t);for(var e=se(n);r--&&false!==t(e[r],r,e););return n}function ar(n,t){var r=true;return or(n,function(n,e,u){return r=!!t(n,e,u)}),r}function fr(n,t){var r=[];return or(n,function(n,e,u){t(n,e,u)&&r.push(n)
|
||||
}),r}function lr(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function cr(n,t,r,e){e=(e||0)-1;for(var u=n.length,o=-1,i=[];++e<u;){var a=n[e];if(h(a)&&ue(a.length)&&(To(a)||Ke(a))){t&&(a=cr(a,t,r));var f=-1,l=a.length;for(i.length+=l;++f<l;)i[++o]=a[f]}else r||(i[++o]=a)}return i}function sr(n,t,r){var e=-1,u=se(n);r=r(n);for(var o=r.length;++e<o;){var i=r[e];if(false===t(u[i],i,u))break}return n}function pr(n,t,r){var e=se(n);r=r(n);for(var u=r.length;u--;){var o=r[u];
|
||||
if(false===t(e[o],o,e))break}return n}function hr(n,t){sr(n,t,eu)}function gr(n,t){return sr(n,t,Fo)}function vr(n,t){return pr(n,t,Fo)}function dr(n,t){for(var r=-1,e=t.length,u=-1,o=[];++r<e;){var i=t[r];Ze(n[i])&&(o[++u]=i)}return o}function yr(n,t,r){var e=-1,u=typeof t=="function",o=n?n.length:0,i=ue(o)?mu(o):[];return or(n,function(n){var o=u?t:null!=n&&n[t];i[++e]=o?o.apply(n,r):b}),i}function _r(n,t,r,e,u,o){if(n===t)return 0!==n||1/n==1/t;var i=typeof n,a=typeof t;if("function"!=i&&"object"!=i&&"function"!=a&&"object"!=a||null==n||null==t)n=n!==n&&t!==t;
|
||||
else n:{var i=_r,a=To(n),f=To(t),l=D,c=D;a||(l=Uu.call(n),l==z?l=Y:l!=Y&&(a=nu(n))),f||(c=Uu.call(t),c==z?c=Y:c!=Y&&nu(t));var s=l==Y,f=c==Y,c=l==c;if(!c||a||s)if(l=s&&Nu.call(n,"__wrapped__"),f=f&&Nu.call(t,"__wrapped__"),l||f)n=i(l?n.value():n,f?t.value():t,r,e,u,o);else if(c){for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n){n=o[l]==t;break n}u.push(n),o.push(t),n=(a?Yr:Gr)(n,t,i,r,e,u,o),u.pop(),o.pop()}else n=false;else n=Zr(n,t,l)}return n}function mr(n,t,r,e,u){var o=t.length;if(null==n)return!o;
|
||||
for(var i=-1,a=!u;++i<o;)if(a&&e[i]?r[i]!==n[t[i]]:!Nu.call(n,t[i]))return false;for(i=-1;++i<o;){var f=t[i];if(a&&e[i])f=Nu.call(n,f);else{var l=n[f],c=r[i],f=u?u(l,c,f):b;typeof f=="undefined"&&(f=_r(c,l,u,true))}if(!f)return false}return true}function br(n,t){var r=[];return or(n,function(n,e,u){r.push(t(n,e,u))}),r}function wr(n,t){var r=Fo(n),e=r.length;if(1==e){var u=r[0],o=n[u];if(oe(o))return function(n){return null!=n&&o===n[u]&&Nu.call(n,u)}}t&&(n=rr(n,true));for(var i=mu(e),a=mu(e);e--;)o=n[r[e]],i[e]=o,a[e]=oe(o);
|
||||
return function(n){return mr(n,r,i,a)}}function xr(n,t,r,e,u){var o=ue(t.length)&&(To(t)||nu(t));return(o?Mt:gr)(t,function(t,i,a){if(h(t)){e||(e=[]),u||(u=[]);n:{t=e;for(var f=u,l=t.length,c=a[i];l--;)if(t[l]==c){n[i]=f[l],i=void 0;break n}l=n[i],a=r?r(l,c,i,n,a):b;var s=typeof a=="undefined";s&&(a=c,ue(c.length)&&(To(c)||nu(c))?a=To(l)?l:l?zt(l):[]:Wo(c)||Ke(c)?a=Ke(l)?tu(l):Wo(l)?l:{}:s=false),t.push(c),f.push(a),s?n[i]=xr(a,c,r,t,f):(a===a?a!==l:l===l)&&(n[i]=a),i=void 0}return i}f=n[i],a=r?r(f,t,i,n,a):b,(c=typeof a=="undefined")&&(a=t),!o&&typeof a=="undefined"||!c&&(a===a?a===f:f!==f)||(n[i]=a)
|
||||
}),n}function Ar(n){return function(t){return null==t?b:t[n]}}function jr(n,t){return n+qu(fo()*(t-n+1))}function kr(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function Er(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r=typeof r=="undefined"||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=mu(u);++e<u;)r[e]=n[e+t];return r}function Rr(n,t){var r;return or(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function Ir(n,r){var e=-1,u=Hr(),o=n.length,i=u==t,a=i&&200<=o,f=a&&wo(),l=[];
|
||||
f?(u=Bt,i=false):(a=false,f=r?[]:l);n:for(;++e<o;){var c=n[e],s=r?r(c,e,n):c;if(i&&c===c){for(var p=f.length;p--;)if(f[p]===s)continue n;r&&f.push(s),l.push(c)}else 0>u(f,s)&&((r||a)&&f.push(s),l.push(c))}return l}function Or(n,t){for(var r=-1,e=t.length,u=mu(e);++r<e;)u[r]=n[t[r]];return u}function Cr(n,t){var r=n;r instanceof Ft&&(r=r.value());for(var e=-1,u=t.length;++e<u;){var r=[r],o=t[e];Ku.apply(r,o.args),r=o.func.apply(o.thisArg,r)}return r}function Tr(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=ho){for(;e<u;){var o=e+u>>>1,i=n[o];
|
||||
(r?i<=t:i<t)?e=o+1:u=o}return u}return Sr(n,t,gu,r)}function Sr(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,a=typeof t=="undefined";u<o;){var f=qu((u+o)/2),l=r(n[f]),c=l===l;(i?c||e:a?c&&(e||typeof l!="undefined"):e?l<=t:l<t)?u=f+1:o=f}return uo(o,po)}function Wr(n,t,r){if(typeof n!="function")return gu;if(typeof t=="undefined")return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)
|
||||
};case 5:return function(r,e,u,o,i){return n.call(t,r,e,u,o,i)}}return function(){return n.apply(t,arguments)}}function Nr(n){return zu.call(n,0)}function Fr(n,t,r){for(var e=r.length,u=-1,o=eo(n.length-e,0),i=-1,a=t.length,f=mu(o+a);++i<a;)f[i]=t[i];for(;++u<e;)f[r[u]]=n[u];for(;o--;)f[i++]=n[u++];return f}function Ur(n,t,r){for(var e=-1,u=r.length,o=-1,i=eo(n.length-u,0),a=-1,f=t.length,l=mu(i+f);++o<i;)l[o]=n[o];for(i=o;++a<f;)l[i+a]=t[a];for(;++e<u;)l[i+r[e]]=n[o++];return l}function Lr(n,t){return function(r,e,u){var o=t?t():{};
|
||||
if(e=Xr(e,u,3),To(r)){u=-1;for(var i=r.length;++u<i;){var a=r[u];n(o,a,e(a,u,r),r)}}else or(r,function(t,r,u){n(o,t,e(t,r,u),u)});return o}}function $r(n){return function(){var t=arguments.length,r=arguments[0];if(2>t||null==r)return r;if(3<t&&ee(arguments[1],arguments[2],arguments[3])&&(t=2),3<t&&"function"==typeof arguments[t-2])var e=Wr(arguments[--t-1],arguments[t--],5);else 2<t&&"function"==typeof arguments[t-1]&&(e=arguments[--t]);for(var u=0;++u<t;){var o=arguments[u];o&&n(r,o,e)}return r}
|
||||
}function Br(n,t){function r(){return(this instanceof r?e:n).apply(t,arguments)}var e=Dr(n);return r}function zr(n){return function(t){var r=-1;t=cu(ou(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Dr(n){return function(){var t=mo(n.prototype),r=n.apply(t,arguments);return Ge(r)?r:t}}function Mr(n,t){return function(r,e,o){o&&ee(r,e,o)&&(e=null);var i=Xr(),a=null==e;if(i===tr&&a||(a=false,e=i(e,o,3)),a){if(e=To(r),e||!Qe(r))return n(e?r:ce(r));e=u}return Jr(r,e,t)}}function qr(n,t,r,e,u,o,i,a,f,l){function c(){for(var w=arguments.length,j=w,k=mu(w);j--;)k[j]=arguments[j];
|
||||
if(e&&(k=Fr(k,e,u)),o&&(k=Ur(k,o,i)),g||y){var j=c.placeholder,E=v(k,j),w=w-E.length;if(w<l){var O=a?zt(a):null,w=eo(l-w,0),C=g?E:null,E=g?null:E,T=g?k:null,k=g?null:k;return t|=g?R:I,t&=~(g?I:R),d||(t&=~(x|A)),k=qr(n,t,r,T,C,k,E,O,f,w),k.placeholder=j,k}}if(j=p?r:this,h&&(n=j[m]),a)for(O=k.length,w=uo(a.length,O),C=zt(k);w--;)E=a[w],k[w]=re(E,O)?C[E]:b;return s&&f<k.length&&(k.length=f),(this instanceof c?_||Dr(n):n).apply(j,k)}var s=t&C,p=t&x,h=t&A,g=t&k,d=t&j,y=t&E,_=!h&&Dr(n),m=n;return c}function Pr(n,t,r){return n=n.length,t=+t,n<t&&to(t)?(t-=n,r=null==r?" ":r+"",fu(r,Du(t/r.length)).slice(0,t)):""
|
||||
}function Kr(n,t,r,e){function u(){for(var t=-1,a=arguments.length,f=-1,l=e.length,c=mu(a+l);++f<l;)c[f]=e[f];for(;a--;)c[f++]=arguments[++t];return(this instanceof u?i:n).apply(o?r:this,c)}var o=t&x,i=Dr(n);return u}function Vr(n,t,r,e,u,o,i,a){var f=t&A;if(!f&&!Ze(n))throw new Iu($);var l=e?e.length:0;if(l||(t&=~(R|I),e=u=null),l-=u?u.length:0,t&I){var c=e,s=u;e=u=null}var p=!f&&xo(n);if(r=[n,t,r,e,u,c,s,o,i,a],p&&true!==p){e=r[1],t=p[1],a=e|t,o=C|O,u=x|A,i=o|u|j|E;var c=e&C&&!(t&C),s=e&O&&!(t&O),h=(s?r:p)[7],g=(c?r:p)[8];
|
||||
o=a>=o&&a<=i&&(e<O||(s||c)&&h.length<=g),(!(e>=O&&t>u||e>u&&t>=O)||o)&&(t&x&&(r[2]=p[2],a|=e&x?0:j),(e=p[3])&&(u=r[3],r[3]=u?Fr(u,e,p[4]):zt(e),r[4]=u?v(r[3],B):zt(p[4])),(e=p[5])&&(u=r[5],r[5]=u?Ur(u,e,p[6]):zt(e),r[6]=u?v(r[5],B):zt(p[6])),(e=p[7])&&(r[7]=zt(e)),t&C&&(r[8]=null==r[8]?p[8]:uo(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=a),t=r[1],a=r[9]}return r[9]=null==a?f?0:n.length:eo(a-l,0)||0,(p?bo:Ao)(t==x?Br(r[0],r[2]):t!=R&&t!=(x|R)||r[4].length?qr.apply(null,r):Kr.apply(null,r),r)
|
||||
}function Yr(n,t,r,e,u,o,i){var a=-1,f=n.length,l=t.length,c=true;if(f!=l&&(!u||l<=f))return false;for(;c&&++a<f;){var s=n[a],p=t[a],c=b;if(e&&(c=u?e(p,s,a):e(s,p,a)),typeof c=="undefined")if(u)for(var h=l;h--&&(p=t[h],!(c=s&&s===p||r(s,p,e,u,o,i))););else c=s&&s===p||r(s,p,e,u,o,i)}return!!c}function Zr(n,t,r){switch(r){case M:case q:return+n==+t;case P:return n.name==t.name&&n.message==t.message;case V:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case Z:case G:return n==t+""}return false}function Gr(n,t,r,e,u,o,i){var a=Fo(n),f=a.length,l=Fo(t).length;
|
||||
if(f!=l&&!u)return false;for(var c,l=-1;++l<f;){var s=a[l],p=Nu.call(t,s);if(p){var h=n[s],g=t[s],p=b;e&&(p=u?e(g,h,s):e(h,g,s)),typeof p=="undefined"&&(p=h&&h===g||r(h,g,e,u,o,i))}if(!p)return false;c||(c="constructor"==s)}return c||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false}function Jr(n,t,r){var e=r?co:lo,u=e,o=u;return or(n,function(n,i,a){i=t(n,i,a),((r?i<u:i>u)||i===e&&i===o)&&(u=i,o=n)
|
||||
}),o}function Xr(n,t,r){var e=Wt.callback||pu,e=e===pu?tr:e;return r?e(n,t,r):e}function Hr(n,r,e){var u=Wt.indexOf||de,u=u===de?t:u;return n?u(n,r,e):u}function Qr(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Nu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function ne(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=ku),new n}function te(n,t,r){var e=n.constructor;switch(t){case J:return Nr(n);case M:case q:return new e(+n);case X:case H:case Q:case nt:case tt:case rt:case et:case ut:case ot:return t=n.buffer,new e(r?Nr(t):t,n.byteOffset,n.length);
|
||||
case V:case G:return new e(n);case Z:var u=new e(n.source,yt.exec(n));u.lastIndex=n.lastIndex}return u}function re(n,t){return n=+n,t=null==t?vo:t,-1<n&&0==n%1&&n<t}function ee(n,t,r){if(!Ge(r))return false;var e=typeof t;return"number"==e?(e=r.length,e=ue(e)&&re(t,e)):e="string"==e&&t in n,e&&r[t]===n}function ue(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=vo}function oe(n){return n===n&&(0===n?0<1/n:!Ge(n))}function ie(n,t){n=se(n);for(var r=-1,e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])
|
||||
}return u}function ae(n,t){var r={};return hr(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function fe(n){var t;if(!h(n)||Uu.call(n)!=Y||!(Nu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return hr(n,function(n,t){r=t}),typeof r=="undefined"||Nu.call(n,r)}function le(n){for(var t=eu(n),r=t.length,e=r&&n.length,u=Wt.support,u=e&&ue(e)&&(To(n)||u.nonEnumArgs&&Ke(n)),o=-1,i=[];++o<r;){var a=t[o];(u&&re(a,e)||Nu.call(n,a))&&i.push(a)}return i}function ce(n){return null==n?[]:ue(n.length)?Ge(n)?n:ku(n):uu(n)
|
||||
}function se(n){return Ge(n)?n:ku(n)}function pe(n,t,r){return n&&n.length?((r?ee(n,t,r):null==t)&&(t=1),Er(n,0>t?0:t)):[]}function he(n,t,r){var e=n?n.length:0;return e?((r?ee(n,t,r):null==t)&&(t=1),t=e-(+t||0),Er(n,0,0>t?0:t)):[]}function ge(n,t,r){var e=-1,u=n?n.length:0;for(t=Xr(t,r,3);++e<u;)if(t(n[e],e,n))return e;return-1}function ve(n){return n?n[0]:b}function de(n,r,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?eo(u+e,0):e||0;else if(e)return e=Tr(n,r),n=n[e],(r===r?r===n:n!==n)?e:-1;
|
||||
return t(n,r,e)}function ye(n){return pe(n,1)}function _e(n,r,e,u){if(!n||!n.length)return[];typeof r!="boolean"&&null!=r&&(u=e,e=ee(n,r,u)?null:r,r=false);var o=Xr();if((o!==tr||null!=e)&&(e=o(e,u,3)),r&&Hr()==t){r=e;var i;e=-1,u=n.length;for(var o=-1,a=[];++e<u;){var f=n[e],l=r?r(f,e,n):f;e&&i===l||(i=l,a[++o]=f)}n=a}else n=Ir(n,e);return n}function me(n){for(var t=-1,r=(n&&n.length&&Vt(Kt(n,Wu)))>>>0,e=mu(r);++t<r;)e[t]=Kt(n,Ar(t));return e}function be(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||To(n[0])||(t=[]);++r<e;){var o=n[r];
|
||||
t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function we(n){return n=Wt(n),n.__chain__=true,n}function xe(n,t,r){return t.call(r,n)}function Ae(n,t,r){var e=n?n.length:0;return ue(e)||(n=uu(n),e=n.length),e?(r=typeof r=="number"?0>r?eo(e+r,0):r||0:0,typeof n=="string"||!To(n)&&Qe(n)?r<e&&-1<n.indexOf(t,r):-1<Hr(n,t,r)):false}function je(n,t,r){var e=To(n)?qt:ar;return(typeof t!="function"||typeof r!="undefined")&&(t=Xr(t,r,3)),e(n,t)}function ke(n,t,r){var e=To(n)?Pt:fr;return t=Xr(t,r,3),e(n,t)}function Ee(n,t,r){return To(n)?(t=ge(n,t,r),-1<t?n[t]:b):(t=Xr(t,r,3),lr(n,t,or))
|
||||
}function Re(n,t,r){return typeof t=="function"&&typeof r=="undefined"&&To(n)?Mt(n,t):or(n,Wr(t,r,3))}function Ie(n,t,r){if(typeof t=="function"&&typeof r=="undefined"&&To(n))for(r=n.length;r--&&false!==t(n[r],r,n););else n=ir(n,Wr(t,r,3));return n}function Oe(n,t,r){var e=To(n)?Kt:br;return t=Xr(t,r,3),e(n,t)}function Ce(n,t,r,e){return(To(n)?Yt:kr)(n,Xr(t,e,4),r,3>arguments.length,or)}function Te(n,t,r,e){return(To(n)?Zt:kr)(n,Xr(t,e,4),r,3>arguments.length,ir)}function Se(n,t,r){return(r?ee(n,t,r):null==t)?(n=ce(n),t=n.length,0<t?n[jr(0,t-1)]:b):(n=We(n),n.length=uo(0>t?0:+t||0,n.length),n)
|
||||
}function We(n){n=ce(n);for(var t=-1,r=n.length,e=mu(r);++t<r;){var u=jr(0,t);t!=u&&(e[t]=e[u]),e[u]=n[t]}return e}function Ne(n,t,r){var e=To(n)?Gt:Rr;return(typeof t!="function"||typeof r!="undefined")&&(t=Xr(t,r,3)),e(n,t)}function Fe(n,t){var r;if(!Ze(t)){if(!Ze(n))throw new Iu($);var e=n;n=t,t=e}return function(){return 0<--n?r=t.apply(this,arguments):t=null,r}}function Ue(n,t){var r=x;if(2<arguments.length)var e=Er(arguments,2),u=v(e,Ue.placeholder),r=r|R;return Vr(n,r,t,e,u)}function Le(n,t){var r=x|A;
|
||||
if(2<arguments.length)var e=Er(arguments,2),u=v(e,Le.placeholder),r=r|R;return Vr(t,r,n,e,u)}function $e(n,t,r){return r&&ee(n,t,r)&&(t=null),n=Vr(n,k,null,null,null,null,null,t),n.placeholder=$e.placeholder,n}function Be(n,t,r){return r&&ee(n,t,r)&&(t=null),n=Vr(n,E,null,null,null,null,null,t),n.placeholder=Be.placeholder,n}function ze(n,t,r){function e(){var r=t-(Co()-l);0>=r||r>t?(a&&Mu(a),r=p,a=s=p=b,r&&(h=Co(),f=n.apply(c,i),s||a||(i=c=null))):s=Zu(e,r)}function u(){s&&Mu(s),a=s=p=b,(v||g!==t)&&(h=Co(),f=n.apply(c,i),s||a||(i=c=null))
|
||||
}function o(){if(i=arguments,l=Co(),c=this,p=v&&(s||!d),false===g)var r=d&&!s;else{a||d||(h=l);var o=g-(l-h),y=0>=o||o>g;y?(a&&(a=Mu(a)),h=l,f=n.apply(c,i)):a||(a=Zu(u,o))}return y&&s?s=Mu(s):s||t===g||(s=Zu(e,t)),r&&(y=true,f=n.apply(c,i)),!y||s||a||(i=c=null),f}var i,a,f,l,c,s,p,h=0,g=false,v=true;if(!Ze(n))throw new Iu($);if(t=0>t?0:t,true===r)var d=true,v=false;else Ge(r)&&(d=r.leading,g="maxWait"in r&&eo(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return o.cancel=function(){s&&Mu(s),a&&Mu(a),a=s=p=b},o}function De(){var n=arguments,t=n.length-1;
|
||||
if(0>t)return function(){};if(!qt(n,Ze))throw new Iu($);return function(){for(var r=t,e=n[r].apply(this,arguments);r--;)e=n[r].call(this,e);return e}}function Me(n,t){function r(){var e=r.cache,u=t?t.apply(this,arguments):arguments[0];if(e.has(u))return e.get(u);var o=n.apply(this,arguments);return e.set(u,o),o}if(!Ze(n)||t&&!Ze(t))throw new Iu($);return r.cache=new Me.Cache,r}function qe(n){var t=Er(arguments,1),r=v(t,qe.placeholder);return Vr(n,R,null,t,r)}function Pe(n){var t=Er(arguments,1),r=v(t,Pe.placeholder);
|
||||
return Vr(n,I,null,t,r)}function Ke(n){return ue(h(n)?n.length:b)&&Uu.call(n)==z||false}function Ve(n){return n&&1===n.nodeType&&h(n)&&-1<Uu.call(n).indexOf("Element")||false}function Ye(n){return h(n)&&typeof n.message=="string"&&Uu.call(n)==P||false}function Ze(n){return typeof n=="function"||false}function Ge(n){var t=typeof n;return"function"==t||n&&"object"==t||false}function Je(n){return null==n?false:Uu.call(n)==K?$u.test(Su.call(n)):h(n)&&bt.test(n)||false}function Xe(n){return typeof n=="number"||h(n)&&Uu.call(n)==V||false
|
||||
}function He(n){return h(n)&&Uu.call(n)==Z||false}function Qe(n){return typeof n=="string"||h(n)&&Uu.call(n)==G||false}function nu(n){return h(n)&&ue(n.length)&&Ct[Uu.call(n)]||false}function tu(n){return nr(n,eu(n))}function ru(n){return dr(n,eu(n))}function eu(n){if(null==n)return[];Ge(n)||(n=ku(n));for(var t=n.length,t=t&&ue(t)&&(To(n)||_o.nonEnumArgs&&Ke(n))&&t||0,r=n.constructor,e=-1,r=typeof r=="function"&&r.prototype==n,u=mu(t),o=0<t;++e<t;)u[e]=e+"";for(var i in n)o&&re(i,t)||"constructor"==i&&(r||!Nu.call(n,i))||u.push(i);
|
||||
return u}function uu(n){return Or(n,Fo(n))}function ou(n){return(n=e(n))&&n.replace(wt,l)}function iu(n){return(n=e(n))&&jt.test(n)?n.replace(At,"\\$&"):n}function au(n,t,r){return r&&ee(n,t,r)&&(t=0),ao(n,t)}function fu(n,t){var r="";if(n=e(n),t=+t,1>t||!n||!to(t))return r;do t%2&&(r+=n),t=qu(t/2),n+=n;while(t);return r}function lu(n,t,r){var u=n;return(n=e(n))?(r?ee(u,t,r):null==t)?n.slice(d(n),y(n)+1):(t=e(t),n.slice(o(n,t),i(n,t)+1)):n}function cu(n,t,r){return r&&ee(n,t,r)&&(t=null),n=e(n),n.match(t||Rt)||[]
|
||||
}function su(n){try{return n()}catch(t){return Ye(t)?t:wu(t)}}function pu(n,t,r){return r&&ee(n,t,r)&&(t=null),tr(n,t)}function hu(n){return function(){return n}}function gu(n){return n}function vu(n){return wr(n,true)}function du(n,t,r){if(null==r){var e=Ge(t),u=e&&Fo(t);((u=u&&u.length&&dr(t,u))?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=dr(t,Fo(t)));var o=true,e=-1,i=Ze(n),a=u.length;false===r?o=false:Ge(r)&&"chain"in r&&(o=r.chain);for(;++e<a;){r=u[e];var f=t[r];n[r]=f,i&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;
|
||||
if(o||r){var e=n(this.__wrapped__);return(e.__actions__=zt(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return r=[this.value()],Ku.apply(r,arguments),t.apply(n,r)}}(f))}return n}function yu(){}function _u(n){return Ar(n+"")}g=g?Dt.defaults($t.Object(),g,Dt.pick($t,Ot)):$t;var mu=g.Array,bu=g.Date,wu=g.Error,xu=g.Function,Au=g.Math,ju=g.Number,ku=g.Object,Eu=g.RegExp,Ru=g.String,Iu=g.TypeError,Ou=mu.prototype,Cu=ku.prototype,Tu=(Tu=g.window)&&Tu.document,Su=xu.prototype.toString,Wu=Ar("length"),Nu=Cu.hasOwnProperty,Fu=0,Uu=Cu.toString,Lu=g._,$u=Eu("^"+iu(Uu).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bu=Je(Bu=g.ArrayBuffer)&&Bu,zu=Je(zu=Bu&&new Bu(0).slice)&&zu,Du=Au.ceil,Mu=g.clearTimeout,qu=Au.floor,Pu=Je(Pu=ku.getPrototypeOf)&&Pu,Ku=Ou.push,Vu=Cu.propertyIsEnumerable,Yu=Je(Yu=g.Set)&&Yu,Zu=g.setTimeout,Gu=Ou.splice,Ju=Je(Ju=g.Uint8Array)&&Ju,Xu=Je(Xu=g.WeakMap)&&Xu,Hu=function(){try{var n=Je(n=g.Float64Array)&&n,t=new n(new Bu(10),0,1)&&n
|
||||
}catch(r){}return t}(),Qu=Je(Qu=mu.isArray)&&Qu,no=Je(no=ku.create)&&no,to=g.isFinite,ro=Je(ro=ku.keys)&&ro,eo=Au.max,uo=Au.min,oo=Je(oo=bu.now)&&oo,io=Je(io=ju.isFinite)&&io,ao=g.parseInt,fo=Au.random,lo=ju.NEGATIVE_INFINITY,co=ju.POSITIVE_INFINITY,so=Au.pow(2,32)-1,po=so-1,ho=so>>>1,go=Hu?Hu.BYTES_PER_ELEMENT:0,vo=Au.pow(2,53)-1,yo=Xu&&new Xu,_o=Wt.support={};!function(n){_o.funcDecomp=!Je(g.WinRTError)&&kt.test(m),_o.funcNames=typeof xu.name=="string";try{_o.dom=11===Tu.createDocumentFragment().nodeType
|
||||
}catch(t){_o.dom=false}try{_o.nonEnumArgs=!Vu.call(arguments,1)}catch(r){_o.nonEnumArgs=true}}(0,0),Wt.templateSettings={escape:ht,evaluate:gt,interpolate:vt,variable:"",imports:{_:Wt}};var mo=function(){function n(){}return function(t){if(Ge(t)){n.prototype=t;var r=new n;n.prototype=null}return r||g.Object()}}(),bo=yo?function(n,t){return yo.set(n,t),n}:gu;zu||(Nr=Bu&&Ju?function(n){var t=n.byteLength,r=Hu?qu(t/go):0,e=r*go,u=new Bu(t);if(r){var o=new Hu(u,0,r);o.set(new Hu(n,0,r))}return t!=e&&(o=new Ju(u,e),o.set(new Ju(n,e))),u
|
||||
}:hu(null));var wo=no&&Yu?function(n){return new Lt(n)}:hu(null),xo=yo?function(n){return yo.get(n)}:yu,Ao=function(){var n=0,t=0;return function(r,e){var u=Co(),o=N-(u-t);if(t=u,0<o){if(++n>=W)return r}else n=0;return bo(r,e)}}(),jo=Lr(function(n,t,r){Nu.call(n,r)?++n[r]:n[r]=1}),ko=Lr(function(n,t,r){Nu.call(n,r)?n[r].push(t):n[r]=[t]}),Eo=Lr(function(n,t,r){n[r]=t}),Ro=Mr(Vt),Io=Mr(function(n){for(var t=-1,r=n.length,e=co;++t<r;){var u=n[t];u<e&&(e=u)}return e},true),Oo=Lr(function(n,t,r){n[r?0:1].push(t)
|
||||
},function(){return[[],[]]}),Co=oo||function(){return(new bu).getTime()},To=Qu||function(n){return h(n)&&ue(n.length)&&Uu.call(n)==D||false};_o.dom||(Ve=function(n){return n&&1===n.nodeType&&h(n)&&!Wo(n)||false});var So=io||function(n){return typeof n=="number"&&to(n)};(Ze(/x/)||Ju&&!Ze(Ju))&&(Ze=function(n){return Uu.call(n)==K});var Wo=Pu?function(n){if(!n||Uu.call(n)!=Y)return false;var t=n.valueOf,r=Je(t)&&(r=Pu(t))&&Pu(r);return r?n==r||Pu(n)==r:fe(n)}:fe,No=$r(Ht),Fo=ro?function(n){if(n)var t=n.constructor,r=n.length;
|
||||
return typeof t=="function"&&t.prototype===n||typeof n!="function"&&r&&ue(r)?le(n):Ge(n)?ro(n):[]}:le,Uo=$r(xr),Lo=zr(function(n,t,r){return t=t.toLowerCase(),r?n+t.charAt(0).toUpperCase()+t.slice(1):t}),$o=zr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()});8!=ao(It+"08")&&(au=function(n,t,r){return(r?ee(n,t,r):null==t)?t=0:t&&(t=+t),n=lu(n),ao(n,t||(mt.test(n)?16:10))});var Bo=zr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()});return Nt.prototype=Wt.prototype,Ut.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]
|
||||
},Ut.prototype.get=function(n){return"__proto__"==n?b:this.__data__[n]},Ut.prototype.has=function(n){return"__proto__"!=n&&Nu.call(this.__data__,n)},Ut.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Lt.prototype.push=function(n){var t=this.data;typeof n=="string"||Ge(n)?t.set.add(n):t.hash[n]=true},Me.Cache=Ut,Wt.after=function(n,t){if(!Ze(t)){if(!Ze(n))throw new Iu($);var r=n;n=t,t=r}return n=to(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0}},Wt.ary=function(n,t,r){return r&&ee(n,t,r)&&(t=null),t=n&&null==t?n.length:eo(+t||0,0),Vr(n,C,null,null,null,null,t)
|
||||
},Wt.assign=No,Wt.at=function(n){return ue(n?n.length:0)&&(n=ce(n)),Qt(n,cr(arguments,false,false,1))},Wt.before=Fe,Wt.bind=Ue,Wt.bindAll=function(n){for(var t=n,r=1<arguments.length?cr(arguments,false,false,1):ru(n),e=-1,u=r.length;++e<u;){var o=r[e];t[o]=Vr(t[o],x,t)}return t},Wt.bindKey=Le,Wt.callback=pu,Wt.chain=we,Wt.chunk=function(n,t,r){t=(r?ee(n,t,r):null==t)?1:eo(+t||1,1),r=0;for(var e=n?n.length:0,u=-1,o=mu(Du(e/t));r<e;)o[++u]=Er(n,r,r+=t);return o},Wt.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var o=n[t];
|
||||
o&&(u[++e]=o)}return u},Wt.constant=hu,Wt.countBy=jo,Wt.create=function(n,t,r){var e=mo(n);return r&&ee(n,t,r)&&(t=null),t?nr(t,e,Fo(t)):e},Wt.curry=$e,Wt.curryRight=Be,Wt.debounce=ze,Wt.defaults=function(n){if(null==n)return n;var t=zt(arguments);return t.push(Jt),No.apply(b,t)},Wt.defer=function(n){return er(n,1,arguments,1)},Wt.delay=function(n,t){return er(n,t,arguments,2)},Wt.difference=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(To(r)||Ke(r))break}return ur(r,cr(arguments,false,true,++n))
|
||||
},Wt.drop=pe,Wt.dropRight=he,Wt.dropRightWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];for(t=Xr(t,r,3);e--&&t(n[e],e,n););return Er(n,0,e+1)},Wt.dropWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];var u=-1;for(t=Xr(t,r,3);++u<e&&t(n[u],u,n););return Er(n,u)},Wt.filter=ke,Wt.flatten=function(n,t,r){var e=n?n.length:0;return r&&ee(n,t,r)&&(t=false),e?cr(n,t):[]},Wt.flattenDeep=function(n){return n&&n.length?cr(n,true):[]},Wt.flow=function(){var n=arguments,t=n.length;if(!t)return function(){};
|
||||
if(!qt(n,Ze))throw new Iu($);return function(){for(var r=0,e=n[r].apply(this,arguments);++r<t;)e=n[r].call(this,e);return e}},Wt.flowRight=De,Wt.forEach=Re,Wt.forEachRight=Ie,Wt.forIn=function(n,t,r){return(typeof t!="function"||typeof r!="undefined")&&(t=Wr(t,r,3)),sr(n,t,eu)},Wt.forInRight=function(n,t,r){return t=Wr(t,r,3),pr(n,t,eu)},Wt.forOwn=function(n,t,r){return(typeof t!="function"||typeof r!="undefined")&&(t=Wr(t,r,3)),gr(n,t)},Wt.forOwnRight=function(n,t,r){return t=Wr(t,r,3),pr(n,t,Fo)
|
||||
},Wt.functions=ru,Wt.groupBy=ko,Wt.indexBy=Eo,Wt.initial=function(n){return he(n,1)},Wt.intersection=function(){for(var n=[],r=-1,e=arguments.length,u=[],o=Hr(),i=o==t;++r<e;){var a=arguments[r];(To(a)||Ke(a))&&(n.push(a),u.push(i&&120<=a.length&&wo(r&&a)))}var e=n.length,i=n[0],f=-1,l=i?i.length:0,c=[],s=u[0];n:for(;++f<l;)if(a=i[f],0>(s?Bt(s,a):o(c,a))){for(r=e;--r;){var p=u[r];if(0>(p?Bt(p,a):o(n[r],a)))continue n}s&&s.push(a),c.push(a)}return c},Wt.invert=function(n,t,r){r&&ee(n,t,r)&&(t=null),r=-1;
|
||||
for(var e=Fo(n),u=e.length,o={};++r<u;){var i=e[r],a=n[i];t?Nu.call(o,a)?o[a].push(i):o[a]=[i]:o[a]=i}return o},Wt.invoke=function(n,t){return yr(n,t,Er(arguments,2))},Wt.keys=Fo,Wt.keysIn=eu,Wt.map=Oe,Wt.mapValues=function(n,t,r){var e={};return t=Xr(t,r,3),gr(n,function(n,r,u){e[r]=t(n,r,u)}),e},Wt.matches=vu,Wt.memoize=Me,Wt.merge=Uo,Wt.mixin=du,Wt.negate=function(n){if(!Ze(n))throw new Iu($);return function(){return!n.apply(this,arguments)}},Wt.omit=function(n,t,r){if(null==n)return{};if(typeof t!="function"){var e=Kt(cr(arguments,false,false,1),Ru);
|
||||
return ie(n,ur(eu(n),e))}return t=Wr(t,r,3),ae(n,function(n,r,e){return!t(n,r,e)})},Wt.once=function(n){return Fe(n,2)},Wt.pairs=function(n){for(var t=-1,r=Fo(n),e=r.length,u=mu(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},Wt.partial=qe,Wt.partialRight=Pe,Wt.partition=Oo,Wt.pick=function(n,t,r){return null==n?{}:typeof t=="function"?ae(n,Wr(t,r,3)):ie(n,cr(arguments,false,false,1))},Wt.pluck=function(n,t){return Oe(n,_u(t))},Wt.property=_u,Wt.propertyOf=function(n){return function(t){return null==n?b:n[t]
|
||||
}},Wt.pull=function(){var n=arguments[0];if(!n||!n.length)return n;for(var t=0,r=Hr(),e=arguments.length;++t<e;)for(var u=0,o=arguments[t];-1<(u=r(n,o,u));)Gu.call(n,u,1);return n},Wt.pullAt=function(t){var r=t||[],e=cr(arguments,false,false,1),u=e.length,o=Qt(r,e);for(e.sort(n);u--;){var i=parseFloat(e[u]);if(i!=a&&re(i)){var a=i;Gu.call(r,i,1)}}return o},Wt.range=function(n,t,r){r&&ee(n,t,r)&&(t=r=null),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=eo(Du((t-n)/(r||1)),0);for(var u=mu(t);++e<t;)u[e]=n,n+=r;
|
||||
return u},Wt.rearg=function(n){var t=cr(arguments,false,false,1);return Vr(n,O,null,null,null,t)},Wt.reject=function(n,t,r){var e=To(n)?Pt:fr;return t=Xr(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Wt.remove=function(n,t,r){var e=-1,u=n?n.length:0,o=[];for(t=Xr(t,r,3);++e<u;)r=n[e],t(r,e,n)&&(o.push(r),Gu.call(n,e--,1),u--);return o},Wt.rest=ye,Wt.shuffle=We,Wt.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&ee(n,t,r)&&(t=0,r=e),Er(n,t,r)):[]},Wt.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=ue(o)?mu(o):[];
|
||||
return e&&ee(n,t,e)&&(t=null),t=Xr(t,e,3),or(n,function(n,r,e){i[++u]={a:t(n,r,e),b:u,c:n}}),r(i,a)},Wt.sortByAll=function(n){var t=arguments;3<t.length&&ee(t[1],t[2],t[3])&&(t=[n,t[1]]);var e=-1,u=n?n.length:0,o=cr(t,false,false,1),i=ue(u)?mu(u):[];return or(n,function(n){for(var t=o.length,r=mu(t);t--;)r[t]=null==n?b:n[o[t]];i[++e]={a:r,b:e,c:n}}),r(i,f)},Wt.take=function(n,t,r){return n&&n.length?((r?ee(n,t,r):null==t)&&(t=1),Er(n,0,0>t?0:t)):[]},Wt.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?ee(n,t,r):null==t)&&(t=1),t=e-(+t||0),Er(n,0>t?0:t)):[]
|
||||
},Wt.takeRightWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];for(t=Xr(t,r,3);e--&&t(n[e],e,n););return Er(n,e+1)},Wt.takeWhile=function(n,t,r){var e=n?n.length:0;if(!e)return[];var u=-1;for(t=Xr(t,r,3);++u<e&&t(n[u],u,n););return Er(n,0,u)},Wt.tap=function(n,t,r){return t.call(r,n),n},Wt.throttle=function(n,t,r){var e=true,u=true;if(!Ze(n))throw new Iu($);return false===r?e=false:Ge(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),St.leading=e,St.maxWait=+t,St.trailing=u,ze(n,t,St)
|
||||
},Wt.thru=xe,Wt.times=function(n,t,r){if(n=+n,1>n||!to(n))return[];var e=-1,u=mu(uo(n,so));for(t=Wr(t,r,1);++e<n;)e<so?u[e]=t(e):t(e);return u},Wt.toArray=function(n){var t=n?n.length:0;return ue(t)?t?zt(n):[]:uu(n)},Wt.toPlainObject=tu,Wt.transform=function(n,t,r,e){var u=To(n)||nu(n);return t=Xr(t,e,4),null==r&&(u||Ge(n)?(e=n.constructor,r=u?To(n)?new e:[]:mo(typeof e=="function"&&e.prototype)):r={}),(u?Mt:gr)(n,function(n,e,u){return t(r,n,e,u)}),r},Wt.union=function(){return Ir(cr(arguments,false,true))
|
||||
},Wt.uniq=_e,Wt.unzip=me,Wt.values=uu,Wt.valuesIn=function(n){return Or(n,eu(n))},Wt.where=function(n,t){return ke(n,vu(t))},Wt.without=function(n){return ur(n,Er(arguments,1))},Wt.wrap=function(n,t){return t=null==t?gu:t,Vr(t,R,null,[n],[])},Wt.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(To(r)||Ke(r))var e=e?ur(e,r).concat(ur(r,e)):r}return e?Ir(e):[]},Wt.zip=function(){for(var n=arguments.length,t=mu(n);n--;)t[n]=arguments[n];return me(t)},Wt.zipObject=be,Wt.backflow=De,Wt.collect=Oe,Wt.compose=De,Wt.each=Re,Wt.eachRight=Ie,Wt.extend=No,Wt.iteratee=pu,Wt.methods=ru,Wt.object=be,Wt.select=ke,Wt.tail=ye,Wt.unique=_e,du(Wt,Wt),Wt.attempt=su,Wt.camelCase=Lo,Wt.capitalize=function(n){return(n=e(n))&&n.charAt(0).toUpperCase()+n.slice(1)
|
||||
},Wt.clone=function(n,t,r,e){return typeof t!="boolean"&&null!=t&&(e=r,r=ee(n,t,e)?null:t,t=false),r=typeof r=="function"&&Wr(r,e,1),rr(n,t,r)},Wt.cloneDeep=function(n,t,r){return t=typeof t=="function"&&Wr(t,r,1),rr(n,true,t)},Wt.deburr=ou,Wt.endsWith=function(n,t,r){n=e(n),t+="";var u=n.length;return r=(typeof r=="undefined"?u:uo(0>r?0:+r||0,u))-t.length,0<=r&&n.indexOf(t,r)==r},Wt.escape=function(n){return(n=e(n))&&pt.test(n)?n.replace(ct,c):n},Wt.escapeRegExp=iu,Wt.every=je,Wt.find=Ee,Wt.findIndex=ge,Wt.findKey=function(n,t,r){return t=Xr(t,r,3),lr(n,t,gr,true)
|
||||
},Wt.findLast=function(n,t,r){return t=Xr(t,r,3),lr(n,t,ir)},Wt.findLastIndex=function(n,t,r){var e=n?n.length:0;for(t=Xr(t,r,3);e--;)if(t(n[e],e,n))return e;return-1},Wt.findLastKey=function(n,t,r){return t=Xr(t,r,3),lr(n,t,vr,true)},Wt.findWhere=function(n,t){return Ee(n,vu(t))},Wt.first=ve,Wt.has=function(n,t){return n?Nu.call(n,t):false},Wt.identity=gu,Wt.includes=Ae,Wt.indexOf=de,Wt.isArguments=Ke,Wt.isArray=To,Wt.isBoolean=function(n){return true===n||false===n||h(n)&&Uu.call(n)==M||false},Wt.isDate=function(n){return h(n)&&Uu.call(n)==q||false
|
||||
},Wt.isElement=Ve,Wt.isEmpty=function(n){if(null==n)return true;var t=n.length;return ue(t)&&(To(n)||Qe(n)||Ke(n)||h(n)&&Ze(n.splice))?!t:!Fo(n).length},Wt.isEqual=function(n,t,r,e){return r=typeof r=="function"&&Wr(r,e,3),!r&&oe(n)&&oe(t)?n===t:(e=r?r(n,t):b,typeof e=="undefined"?_r(n,t,r):!!e)},Wt.isError=Ye,Wt.isFinite=So,Wt.isFunction=Ze,Wt.isMatch=function(n,t,r,e){var u=Fo(t),o=u.length;if(r=typeof r=="function"&&Wr(r,e,3),!r&&1==o){var i=u[0];if(e=t[i],oe(e))return null!=n&&e===n[i]&&Nu.call(n,i)
|
||||
}for(var i=mu(o),a=mu(o);o--;)e=i[o]=t[u[o]],a[o]=oe(e);return mr(n,u,i,a,r)},Wt.isNaN=function(n){return Xe(n)&&n!=+n},Wt.isNative=Je,Wt.isNull=function(n){return null===n},Wt.isNumber=Xe,Wt.isObject=Ge,Wt.isPlainObject=Wo,Wt.isRegExp=He,Wt.isString=Qe,Wt.isTypedArray=nu,Wt.isUndefined=function(n){return typeof n=="undefined"},Wt.kebabCase=$o,Wt.last=function(n){var t=n?n.length:0;return t?n[t-1]:b},Wt.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?eo(e+r,0):uo(r||0,e-1))+1;
|
||||
else if(r)return u=Tr(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Wt.max=Ro,Wt.min=Io,Wt.noConflict=function(){return g._=Lu,this},Wt.noop=yu,Wt.now=Co,Wt.pad=function(n,t,r){n=e(n),t=+t;var u=n.length;return u<t&&to(t)?(u=(t-u)/2,t=qu(u),u=Du(u),r=Pr("",u,r),r.slice(0,t)+n+r):n},Wt.padLeft=function(n,t,r){return(n=e(n))&&Pr(n,t,r)+n},Wt.padRight=function(n,t,r){return(n=e(n))&&n+Pr(n,t,r)},Wt.parseInt=au,Wt.random=function(n,t,r){r&&ee(n,t,r)&&(t=r=null);
|
||||
var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=fo(),uo(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):jr(n,t)},Wt.reduce=Ce,Wt.reduceRight=Te,Wt.repeat=fu,Wt.result=function(n,t,r){return t=null==n?b:n[t],typeof t=="undefined"&&(t=r),Ze(t)?t.call(n):t},Wt.runInContext=m,Wt.size=function(n){var t=n?n.length:0;return ue(t)?t:Fo(n).length},Wt.snakeCase=Bo,Wt.some=Ne,Wt.sortedIndex=function(n,t,r,e){var u=Xr(r);
|
||||
return u===tr&&null==r?Tr(n,t):Sr(n,t,u(r,e,1))},Wt.sortedLastIndex=function(n,t,r,e){var u=Xr(r);return u===tr&&null==r?Tr(n,t,true):Sr(n,t,u(r,e,1),true)},Wt.startsWith=function(n,t,r){return n=e(n),r=null==r?0:uo(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Wt.template=function(n,t,r){var u=Wt.templateSettings;r&&ee(n,t,r)&&(t=r=null),n=e(n),t=Ht(Ht({},r||t),u,Xt),r=Ht(Ht({},t.imports),u.imports,Xt);var o,i,a=Fo(r),f=Or(r,a),l=0;r=t.interpolate||xt;var c="__p+='";r=Eu((t.escape||xt).source+"|"+r.source+"|"+(r===vt?dt:xt).source+"|"+(t.evaluate||xt).source+"|$","g");
|
||||
var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,a,f){return e||(e=u),c+=n.slice(l,f).replace(Et,s),r&&(o=true,c+="'+__e("+r+")+'"),a&&(i=true,c+="';"+a+";\n__p+='"),e&&(c+="'+((__t=("+e+"))==null?'':__t)+'"),l=f+t.length,t}),c+="';",(t=t.variable)||(c="with(obj){"+c+"}"),c=(i?c.replace(it,""):c).replace(at,"$1").replace(ft,"$1;"),c="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+c+"return __p}",t=su(function(){return xu(a,p+"return "+c).apply(b,f)
|
||||
}),t.source=c,Ye(t))throw t;return t},Wt.trim=lu,Wt.trimLeft=function(n,t,r){var u=n;return(n=e(n))?n.slice((r?ee(u,t,r):null==t)?d(n):o(n,e(t))):n},Wt.trimRight=function(n,t,r){var u=n;return(n=e(n))?(r?ee(u,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,e(t))+1):n},Wt.trunc=function(n,t,r){r&&ee(n,t,r)&&(t=null);var u=T;if(r=S,null!=t)if(Ge(t)){var o="separator"in t?t.separator:o,u="length"in t?+t.length||0:u;r="omission"in t?e(t.omission):r}else u=+t||0;if(n=e(n),u>=n.length)return n;if(u-=r.length,1>u)return r;
|
||||
if(t=n.slice(0,u),null==o)return t+r;if(He(o)){if(n.slice(u).search(o)){var i,a=n.slice(0,u);for(o.global||(o=Eu(o.source,(yt.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(a);)i=n.index;t=t.slice(0,null==i?u:i)}}else n.indexOf(o,u)!=u&&(o=t.lastIndexOf(o),-1<o&&(t=t.slice(0,o)));return t+r},Wt.unescape=function(n){return(n=e(n))&&st.test(n)?n.replace(lt,_):n},Wt.uniqueId=function(n){var t=++Fu;return e(n)+t},Wt.words=cu,Wt.all=je,Wt.any=Ne,Wt.contains=Ae,Wt.detect=Ee,Wt.foldl=Ce,Wt.foldr=Te,Wt.head=ve,Wt.include=Ae,Wt.inject=Ce,du(Wt,function(){var n={};
|
||||
return gr(Wt,function(t,r){Wt.prototype[r]||(n[r]=t)}),n}(),false),Wt.sample=Se,Wt.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return Se(t,n)}):Se(this.value())},Wt.VERSION=w,Mt("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Wt[n].placeholder=Wt}),Mt(["filter","map","takeWhile"],function(n,t){var r=t==F;Ft.prototype[n]=function(n,e){var u=this.clone(),o=u.filtered,i=u.iteratees||(u.iteratees=[]);return u.filtered=o||r||t==L&&0>u.dir,i.push({iteratee:Xr(n,e,3),type:t}),u
|
||||
}}),Mt(["drop","take"],function(n,t){var r=n+"Count",e=n+"While";Ft.prototype[n]=function(e){e=null==e?1:eo(+e||0,0);var u=this.clone();if(u.filtered){var o=u[r];u[r]=t?uo(o,e):o+e}else(u.views||(u.views=[])).push({size:e,type:n+(0>u.dir?"Right":"")});return u},Ft.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()},Ft.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[e](n,t).reverse()}}),Mt(["first","last"],function(n,t){var r="take"+(t?"Right":"");Ft.prototype[n]=function(){return this[r](1).value()[0]
|
||||
}}),Mt(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");Ft.prototype[n]=function(){return this[r](1)}}),Mt(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?vu:_u;Ft.prototype[n]=function(n){return this[r](e(n))}}),Ft.prototype.dropWhile=function(n,t){var r,e,u=0>this.dir;return n=Xr(n,t,3),this.filter(function(t,o,i){return r=r&&(u?o<e:o>e),e=o,r||(r=!n(t,o,i))})},Ft.prototype.reject=function(n,t){return n=Xr(n,t,3),this.filter(function(t,r,e){return!n(t,r,e)})},Ft.prototype.slice=function(n,t){n=null==n?0:+n||0;
|
||||
var r=0>n?this.takeRight(-n):this.drop(n);return typeof t!="undefined"&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},gr(Ft.prototype,function(n,t){var r=Wt[t],e=/^(?:first|last)$/.test(t);Wt.prototype[t]=function(){function t(n){return n=[n],Ku.apply(n,o),r.apply(Wt,n)}var u=this.__wrapped__,o=arguments,i=this.__chain__,a=!!this.__actions__.length,f=u instanceof Ft,l=f&&!a;return e&&!i?l?n.call(u):r.call(Wt,this.value()):f||To(u)?(u=n.apply(l?u:new Ft(this),o),e||!a&&!u.actions||(u.actions||(u.actions=[])).push({func:xe,args:[t],thisArg:Wt}),new Nt(u,i)):this.thru(t)
|
||||
}}),Mt("concat join pop push shift sort splice unshift".split(" "),function(n){var t=Ou[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|shift)$/.test(n);Wt.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),Ft.prototype.clone=function(){var n=this.actions,t=this.iteratees,r=this.views,e=new Ft(this.wrapped);return e.actions=n?zt(n):null,e.dir=this.dir,e.dropCount=this.dropCount,e.filtered=this.filtered,e.iteratees=t?zt(t):null,e.takeCount=this.takeCount,e.views=r?zt(r):null,e
|
||||
},Ft.prototype.reverse=function(){if(this.filtered){var n=new Ft(this);n.dir=-1,n.filtered=true}else n=this.clone(),n.dir*=-1;return n},Ft.prototype.value=function(){var n=this.wrapped.value();if(!To(n))return Cr(n,this.actions);var t,r=this.dir,e=0>r;t=n.length;for(var u=this.views,o=0,i=-1,a=u?u.length:0;++i<a;){var f=u[i],l=f.size;switch(f.type){case"drop":o+=l;break;case"dropRight":t-=l;break;case"take":t=uo(t,o+l);break;case"takeRight":o=eo(o,t-l)}}t={start:o,end:t},i=t.start,a=t.end,t=a-i,u=this.dropCount,o=uo(t,this.takeCount-u),e=e?a:i-1,a=(i=this.iteratees)?i.length:0,f=0,l=[];
|
||||
n:for(;t--&&f<o;){for(var e=e+r,c=-1,s=n[e];++c<a;){var p=i[c],h=p.iteratee(s,e,n),p=p.type;if(p==U)s=h;else if(!h){if(p==F)continue n;break n}}u?u--:l[f++]=s}return l},Wt.prototype.chain=function(){return we(this)},Wt.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Ft?(this.__actions__.length&&(n=new Ft(this)),new Nt(n.reverse())):this.thru(function(n){return n.reverse()})},Wt.prototype.toString=function(){return this.value()+""},Wt.prototype.toJSON=Wt.prototype.valueOf=Wt.prototype.value=function(){return Cr(this.__wrapped__,this.__actions__)
|
||||
},Wt.prototype.collect=Wt.prototype.map,Wt.prototype.head=Wt.prototype.first,Wt.prototype.select=Wt.prototype.filter,Wt.prototype.tail=Wt.prototype.rest,Wt}var b,w="3.0.1",x=1,A=2,j=4,k=8,E=16,R=32,I=64,O=128,C=256,T=30,S="...",W=150,N=16,F=0,U=1,L=2,$="Expected a function",B="__lodash_placeholder__",z="[object Arguments]",D="[object Array]",M="[object Boolean]",q="[object Date]",P="[object Error]",K="[object Function]",V="[object Number]",Y="[object Object]",Z="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nt="[object Int16Array]",tt="[object Int32Array]",rt="[object Uint8Array]",et="[object Uint8ClampedArray]",ut="[object Uint16Array]",ot="[object Uint32Array]",it=/\b__p\+='';/g,at=/\b(__p\+=)''\+/g,ft=/(__e\(.*?\)|\b__t\))\+'';/g,lt=/&(?:amp|lt|gt|quot|#39|#96);/g,ct=/[&<>"'`]/g,st=RegExp(lt.source),pt=RegExp(ct.source),ht=/<%-([\s\S]+?)%>/g,gt=/<%([\s\S]+?)%>/g,vt=/<%=([\s\S]+?)%>/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yt=/\w*$/,_t=/^\s*function[ \n\r\t]+\w/,mt=/^0[xX]/,bt=/^\[object .+?Constructor\]$/,wt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,xt=/($^)/,At=/[.*+?^${}()|[\]\/\\]/g,jt=RegExp(At.source),kt=/\bthis\b/,Et=/['\n\r\u2028\u2029\\]/g,Rt=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]{2,}(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),It=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",Ot="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window WinRTError".split(" "),Ct={};
|
||||
Ct[X]=Ct[H]=Ct[Q]=Ct[nt]=Ct[tt]=Ct[rt]=Ct[et]=Ct[ut]=Ct[ot]=true,Ct[z]=Ct[D]=Ct[J]=Ct[M]=Ct[q]=Ct[P]=Ct[K]=Ct["[object Map]"]=Ct[V]=Ct[Y]=Ct[Z]=Ct["[object Set]"]=Ct[G]=Ct["[object WeakMap]"]=false;var Tt={};Tt[z]=Tt[D]=Tt[J]=Tt[M]=Tt[q]=Tt[X]=Tt[H]=Tt[Q]=Tt[nt]=Tt[tt]=Tt[V]=Tt[Y]=Tt[Z]=Tt[G]=Tt[rt]=Tt[et]=Tt[ut]=Tt[ot]=true,Tt[P]=Tt[K]=Tt["[object Map]"]=Tt["[object Set]"]=Tt["[object WeakMap]"]=false;var St={leading:false,maxWait:0,trailing:false},Wt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Nt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ft={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ut={"function":true,object:true},Lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$t=Ut[typeof window]&&window!==(this&&this.window)?window:this,Bt=Ut[typeof exports]&&exports&&!exports.nodeType&&exports,Ut=Ut[typeof module]&&module&&!module.nodeType&&module,zt=Bt&&Ut&&typeof global=="object"&&global;
|
||||
!zt||zt.global!==zt&&zt.window!==zt&&zt.self!==zt||($t=zt);var zt=Ut&&Ut.exports===Bt&&Bt,Dt=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($t._=Dt, define(function(){return Dt})):Bt&&Ut?zt?(Ut.exports=Dt)._=Dt:Bt._=Dt:$t._=Dt}).call(this);
|
||||
;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===m,u=n===n,i=null===t,o=t===m,f=t===t;if(n>t&&!i||!u||r&&!o&&f||e&&f)return 1;if(n<t&&!r||!f||i&&!e&&u||o&&u)return-1}return 0}function t(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function r(n,t,r){if(t!==t)return s(n,r);r-=1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function e(n){return typeof n=="function"||false}function u(n){return typeof n=="string"?n:null==n?"":n+""}function i(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););
|
||||
return r}function o(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function f(t,r){return n(t.a,r.a)||t.b-r.b}function l(n){return Fn[n]}function a(n){return Ln[n]}function c(n){return"\\"+Bn[n]}function s(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function p(n){return!!n&&typeof n=="object"}function h(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n);
|
||||
}function _(n,t){for(var r=-1,e=n.length,u=-1,i=[];++r<e;)n[r]===t&&(n[r]=N,i[++u]=r);return i}function v(n){for(var t=-1,r=n.length;++t<r&&h(n.charCodeAt(t)););return t}function g(n){for(var t=n.length;t--&&h(n.charCodeAt(t)););return t}function y(n){return Nn[n]}function d(h){function Fn(n){if(p(n)&&!(Ci(n)||n instanceof zn)){if(n instanceof Nn)return n;if(tu.call(n,"__chain__")&&tu.call(n,"__wrapped__"))return Br(n)}return new Nn(n)}function Ln(){}function Nn(n,t,r){this.__wrapped__=n,this.__actions__=r||[],
|
||||
this.__chain__=!!t}function zn(n){this.__wrapped__=n,this.__actions__=null,this.__dir__=1,this.__filtered__=false,this.__iteratees__=null,this.__takeCount__=Eu,this.__views__=null}function Bn(){this.__data__={}}function Mn(n){var t=n?n.length:0;for(this.data={hash:mu(null),set:new hu};t--;)this.push(n[t])}function Pn(n,t){var r=n.data;return(typeof t=="string"||ve(t)?r.set.has(t):r.hash[t])?0:-1}function qn(n,t){var r=-1,e=n.length;for(t||(t=Be(e));++r<e;)t[r]=n[r];return t}function Dn(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););
|
||||
return n}function Kn(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Yn(n,t){for(var r=-1,e=n.length,u=-1,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[++u]=o)}return i}function Jn(n,t){for(var r=-1,e=n.length,u=Be(e);++r<e;)u[r]=t(n[r],r,n);return u}function Xn(n,t,r,e){var u=-1,i=n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function Gn(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;return false}function Hn(n,t){return n===m?t:n}function Qn(n,t,r,e){
|
||||
return n!==m&&tu.call(e,r)?n:t}function nt(n,t,r){for(var e=-1,u=Pi(t),i=u.length;++e<i;){var o=u[e],f=n[o],l=r(f,t[o],o,n,t);(l===l?l===f:f!==f)&&(f!==m||o in n)||(n[o]=l)}return n}function tt(n,t){return null==t?n:et(t,Pi(t),n)}function rt(n,t){for(var r=-1,e=null==n,u=!e&&Rr(n),i=u?n.length:0,o=t.length,f=Be(o);++r<o;){var l=t[r];f[r]=u?Ir(l,i)?n[l]:m:e?m:n[l]}return f}function et(n,t,r){r||(r={});for(var e=-1,u=t.length;++e<u;){var i=t[e];r[i]=n[i]}return r}function ut(n,t,r){var e=typeof n;return"function"==e?t===m?n:Bt(n,t,r):null==n?$e:"object"==e?bt(n):t===m?ze(n):xt(n,t);
|
||||
}function it(n,t,r,e,u,i,o){var f;if(r&&(f=u?r(n,e,u):r(n)),f!==m)return f;if(!ve(n))return n;if(e=Ci(n)){if(f=jr(n),!t)return qn(n,f)}else{var l=eu.call(n),a=l==D;if(l!=Z&&l!=z&&(!a||u))return Tn[l]?kr(n,l,t):u?n:{};if(f=Ar(a?{}:n),!t)return tt(f,n)}for(i||(i=[]),o||(o=[]),u=i.length;u--;)if(i[u]==n)return o[u];return i.push(n),o.push(f),(e?Dn:_t)(n,function(e,u){f[u]=it(e,t,r,u,n,i,o)}),f}function ot(n,t,r){if(typeof n!="function")throw new Je(L);return _u(function(){n.apply(m,r)},t)}function ft(n,t){
|
||||
var e=n?n.length:0,u=[];if(!e)return u;var i=-1,o=wr(),f=o==r,l=f&&200<=t.length?qu(t):null,a=t.length;l&&(o=Pn,f=false,t=l);n:for(;++i<e;)if(l=n[i],f&&l===l){for(var c=a;c--;)if(t[c]===l)continue n;u.push(l)}else 0>o(t,l,0)&&u.push(l);return u}function lt(n,t){var r=true;return Nu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function at(n,t,r,e){var u=e,i=u;return Nu(n,function(n,o,f){o=+t(n,o,f),(r(o,u)||o===e&&o===i)&&(u=o,i=n)}),i}function ct(n,t){var r=[];return Nu(n,function(n,e,u){t(n,e,u)&&r.push(n);
|
||||
}),r}function st(n,t,r,e){var u;return r(n,function(n,r,i){return t(n,r,i)?(u=e?r:n,false):void 0}),u}function pt(n,t,r){for(var e=-1,u=n.length,i=-1,o=[];++e<u;){var f=n[e];if(p(f)&&Rr(f)&&(r||Ci(f)||se(f))){t&&(f=pt(f,t,r));for(var l=-1,a=f.length;++l<a;)o[++i]=f[l]}else r||(o[++i]=f)}return o}function ht(n,t){Bu(n,t,Ae)}function _t(n,t){return Bu(n,t,Pi)}function vt(n,t){return Mu(n,t,Pi)}function gt(n,t){for(var r=-1,e=t.length,u=-1,i=[];++r<e;){var o=t[r];Si(n[o])&&(i[++u]=o)}return i}function yt(n,t,r){
|
||||
if(null!=n){r!==m&&r in Nr(n)&&(t=[r]),r=0;for(var e=t.length;null!=n&&r<e;)n=n[t[r++]];return r&&r==e?n:m}}function dt(n,t,r,e,u,i){if(n===t)n=true;else if(null==n||null==t||!ve(n)&&!ve(t))n=n!==n&&t!==t;else n:{var o=dt,f=Ci(n),l=Ci(t),a=B,c=B;f||(a=eu.call(n),a==z?a=Z:a!=Z&&(f=we(n))),l||(c=eu.call(t),c==z?c=Z:c!=Z&&we(t));var s=a==Z,l=c==Z,c=a==c;if(!c||f||s){if(!e&&(a=s&&tu.call(n,"__wrapped__"),l=l&&tu.call(t,"__wrapped__"),a||l)){n=o(a?n.value():n,l?t.value():t,r,e,u,i);break n}if(c){for(u||(u=[]),
|
||||
i||(i=[]),a=u.length;a--;)if(u[a]==n){n=i[a]==t;break n}u.push(n),i.push(t),n=(f?vr:yr)(n,t,o,r,e,u,i),u.pop(),i.pop()}else n=false}else n=gr(n,t,a)}return n}function mt(n,t,r){var e=t.length,u=e,i=!r;if(null==n)return!u;for(n=Nr(n);e--;){var o=t[e];if(i&&o[2]?o[1]!==n[o[0]]:!(o[0]in n))return false}for(;++e<u;){var o=t[e],f=o[0],l=n[f],a=o[1];if(i&&o[2]){if(l===m&&!(f in n))return false}else if(o=r?r(l,a,f):m,o===m?!dt(a,l,r,true):!o)return false}return true}function wt(n,t){var r=-1,e=Rr(n)?Be(n.length):[];return Nu(n,function(n,u,i){
|
||||
e[++r]=t(n,u,i)}),e}function bt(n){var t=br(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?false:n[r]===e&&(e!==m||r in Nr(n))}}return function(n){return mt(n,t)}}function xt(n,t){var r=Ci(n),e=Cr(n)&&t===t&&!ve(t),u=n+"";return n=zr(n),function(i){if(null==i)return false;var o=u;if(i=Nr(i),!(!r&&e||o in i)){if(i=1==n.length?i:yt(i,Et(n,0,-1)),null==i)return false;o=Kr(n),i=Nr(i)}return i[o]===t?t!==m||o in i:dt(t,i[o],m,true)}}function jt(n,t,r,e,u){if(!ve(n))return n;var i=Rr(t)&&(Ci(t)||we(t)),o=i?null:Pi(t);
|
||||
return Dn(o||t,function(f,l){if(o&&(l=f,f=t[l]),p(f)){e||(e=[]),u||(u=[]);n:{for(var a=l,c=e,s=u,h=c.length,_=t[a];h--;)if(c[h]==_){n[a]=s[h];break n}var h=n[a],v=r?r(h,_,a,n,t):m,g=v===m;g&&(v=_,Rr(_)&&(Ci(_)||we(_))?v=Ci(h)?h:Rr(h)?qn(h):[]:Ui(_)||se(_)?v=se(h)?xe(h):Ui(h)?h:{}:g=false),c.push(_),s.push(v),g?n[a]=jt(v,_,r,c,s):(v===v?v!==h:h===h)&&(n[a]=v)}}else a=n[l],c=r?r(a,f,l,n,t):m,(s=c===m)&&(c=f),c===m&&(!i||l in n)||!s&&(c===c?c===a:a!==a)||(n[l]=c)}),n}function At(n){return function(t){return null==t?m:t[n];
|
||||
}}function kt(n){var t=n+"";return n=zr(n),function(r){return yt(r,n,t)}}function Ot(n,t){for(var r=n?t.length:0;r--;){var e=t[r];if(e!=u&&Ir(e)){var u=e;vu.call(n,e,1)}}}function Rt(n,t){return n+cu(Iu()*(t-n+1))}function It(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function Et(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r=r===m||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Be(u);++e<u;)r[e]=n[e+t];return r}function Ct(n,t){var r;return Nu(n,function(n,e,u){
|
||||
return r=t(n,e,u),!r}),!!r}function Wt(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function St(t,r,e){var u=dr(),i=-1;return r=Jn(r,function(n){return u(n)}),t=wt(t,function(n){return{a:Jn(r,function(t){return t(n)}),b:++i,c:n}}),Wt(t,function(t,r){var u;n:{u=-1;for(var i=t.a,o=r.a,f=i.length,l=e.length;++u<f;){var a=n(i[u],o[u]);if(a){u=u<l?a*(e[u]?1:-1):a;break n}}u=t.b-r.b}return u})}function Ut(n,t){var r=0;return Nu(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function Tt(n,t){var e=-1,u=wr(),i=n.length,o=u==r,f=o&&200<=i,l=f?qu():null,a=[];
|
||||
l?(u=Pn,o=false):(f=false,l=t?[]:a);n:for(;++e<i;){var c=n[e],s=t?t(c,e,n):c;if(o&&c===c){for(var p=l.length;p--;)if(l[p]===s)continue n;t&&l.push(s),a.push(c)}else 0>u(l,s,0)&&((t||f)&&l.push(s),a.push(c))}return a}function $t(n,t){for(var r=-1,e=t.length,u=Be(e);++r<e;)u[r]=n[t[r]];return u}function Ft(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?Et(n,e?0:i,e?i+1:u):Et(n,e?i+1:0,e?u:i)}function Lt(n,t){var r=n;r instanceof zn&&(r=r.value());for(var e=-1,u=t.length;++e<u;){
|
||||
var r=[r],i=t[e];pu.apply(r,i.args),r=i.func.apply(i.thisArg,r)}return r}function Nt(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=Wu){for(;e<u;){var i=e+u>>>1,o=n[i];(r?o<=t:o<t)&&null!==o?e=i+1:u=i}return u}return zt(n,t,$e,r)}function zt(n,t,r,e){t=r(t);for(var u=0,i=n?n.length:0,o=t!==t,f=null===t,l=t===m;u<i;){var a=cu((u+i)/2),c=r(n[a]),s=c!==m,p=c===c;(o?p||e:f?p&&s&&(e||null!=c):l?p&&(e||s):null==c?0:e?c<=t:c<t)?u=a+1:i=a}return Au(i,Cu)}function Bt(n,t,r){if(typeof n!="function")return $e;
|
||||
if(t===m)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)};case 5:return function(r,e,u,i,o){return n.call(t,r,e,u,i,o)}}return function(){return n.apply(t,arguments)}}function Mt(n){return fu.call(n,0)}function Pt(n,t,r){for(var e=r.length,u=-1,i=ju(n.length-e,0),o=-1,f=t.length,l=Be(i+f);++o<f;)l[o]=t[o];for(;++u<e;)l[r[u]]=n[u];for(;i--;)l[o++]=n[u++];return l}function qt(n,t,r){
|
||||
for(var e=-1,u=r.length,i=-1,o=ju(n.length-u,0),f=-1,l=t.length,a=Be(o+l);++i<o;)a[i]=n[i];for(o=i;++f<l;)a[o+f]=t[f];for(;++e<u;)a[o+r[e]]=n[i++];return a}function Dt(n,t){return function(r,e,u){var i=t?t():{};if(e=dr(e,u,3),Ci(r)){u=-1;for(var o=r.length;++u<o;){var f=r[u];n(i,f,e(f,u,r),r)}}else Nu(r,function(t,r,u){n(i,t,e(t,r,u),u)});return i}}function Kt(n){return ae(function(t,r){var e=-1,u=null==t?0:r.length,i=2<u?r[u-2]:m,o=2<u?r[2]:m,f=1<u?r[u-1]:m;for(typeof i=="function"?(i=Bt(i,f,5),
|
||||
u-=2):(i=typeof f=="function"?f:m,u-=i?1:0),o&&Er(r[0],r[1],o)&&(i=3>u?m:i,u=1);++e<u;)(o=r[e])&&n(t,o,i);return t})}function Zt(n,t){return function(r,e){var u=r?Ku(r):0;if(!Sr(u))return n(r,e);for(var i=t?u:-1,o=Nr(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function Vt(n){return function(t,r,e){var u=Nr(t);e=e(t);for(var i=e.length,o=n?i:-1;n?o--:++o<i;){var f=e[o];if(false===r(u[f],f,u))break}return t}}function Yt(n,t){function r(){return(this&&this!==Zn&&this instanceof r?e:n).apply(t,arguments);
|
||||
}var e=Xt(n);return r}function Jt(n){return function(t){var r=-1;t=Se(Re(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Xt(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4])}var r=Lu(n.prototype),t=n.apply(r,t);return ve(t)?t:r}}function Gt(n){function t(r,e,u){return u&&Er(r,e,u)&&(e=null),
|
||||
r=_r(r,n,null,null,null,null,null,e),r.placeholder=t.placeholder,r}return t}function Ht(n,t){return function(r,e,u){if(u&&Er(r,e,u)&&(e=null),e=dr(e,u,3),1==e.length){u=r=Lr(r);for(var i=e,o=-1,f=u.length,l=t,a=l;++o<f;){var c=u[o],s=+i(c);n(s,l)&&(l=s,a=c)}if(u=a,!r.length||u!==t)return u}return at(r,e,n,t)}}function Qt(n,r){return function(e,u,i){return u=dr(u,i,3),Ci(e)?(u=t(e,u,r),-1<u?e[u]:m):st(e,u,n)}}function nr(n){return function(r,e,u){return r&&r.length?(e=dr(e,u,3),t(r,e,n)):-1}}function tr(n){
|
||||
return function(t,r,e){return r=dr(r,e,3),st(t,r,n,true)}}function rr(n){return function(){for(var t,r=arguments.length,e=n?r:-1,u=0,i=Be(r);n?e--:++e<r;){var o=i[u++]=arguments[e];if(typeof o!="function")throw new Je(L);!t&&Nn.prototype.thru&&"wrapper"==mr(o)&&(t=new Nn([]))}for(e=t?-1:r;++e<r;){var o=i[e],u=mr(o),f="wrapper"==u?Du(o):null;t=f&&Wr(f[0])&&f[1]==(I|A|O|E)&&!f[4].length&&1==f[9]?t[mr(f[0])].apply(t,f[3]):1==o.length&&Wr(o)?t[u]():t.thru(o)}return function(){var n=arguments;if(t&&1==n.length&&Ci(n[0]))return t.plant(n[0]).value();
|
||||
for(var e=0,n=r?i[e].apply(this,n):n[0];++e<r;)n=i[e].call(this,n);return n}}}function er(n,t){return function(r,e,u){return typeof e=="function"&&u===m&&Ci(r)?n(r,e):t(r,Bt(e,u,3))}}function ur(n){return function(t,r,e){return(typeof r!="function"||e!==m)&&(r=Bt(r,e,3)),n(t,r,Ae)}}function ir(n){return function(t,r,e){return(typeof r!="function"||e!==m)&&(r=Bt(r,e,3)),n(t,r)}}function or(n){return function(t,r,e){var u={};return r=dr(r,e,3),_t(t,function(t,e,i){i=r(t,e,i),e=n?i:e,t=n?t:i,u[e]=t}),
|
||||
u}}function fr(n){return function(t,r,e){return t=u(t),(n?t:"")+sr(t,r,e)+(n?"":t)}}function lr(n){var t=ae(function(r,e){var u=_(e,t.placeholder);return _r(r,n,null,e,u)});return t}function ar(n,t){return function(r,e,u,i){var o=3>arguments.length;return typeof e=="function"&&i===m&&Ci(r)?n(r,e,u,o):It(r,dr(e,i,4),u,o,t)}}function cr(n,t,r,e,u,i,o,f,l,a){function c(){for(var w=arguments.length,j=w,A=Be(w);j--;)A[j]=arguments[j];if(e&&(A=Pt(A,e,u)),i&&(A=qt(A,i,o)),v||y){var j=c.placeholder,k=_(A,j),w=w-k.length;
|
||||
if(w<a){var I=f?qn(f):null,w=ju(a-w,0),E=v?k:null,k=v?null:k,C=v?A:null,A=v?null:A;return t|=v?O:R,t&=~(v?R:O),g||(t&=~(b|x)),A=[n,t,r,C,E,A,k,I,l,w],I=cr.apply(m,A),Wr(n)&&Zu(I,A),I.placeholder=j,I}}if(j=p?r:this,I=h?j[n]:n,f)for(w=A.length,E=Au(f.length,w),k=qn(A);E--;)C=f[E],A[E]=Ir(C,w)?k[C]:m;return s&&l<A.length&&(A.length=l),this&&this!==Zn&&this instanceof c&&(I=d||Xt(n)),I.apply(j,A)}var s=t&I,p=t&b,h=t&x,v=t&A,g=t&j,y=t&k,d=h?null:Xt(n);return c}function sr(n,t,r){return n=n.length,t=+t,
|
||||
n<t&&bu(t)?(t-=n,r=null==r?" ":r+"",Ce(r,lu(t/r.length)).slice(0,t)):""}function pr(n,t,r,e){function u(){for(var t=-1,f=arguments.length,l=-1,a=e.length,c=Be(f+a);++l<a;)c[l]=e[l];for(;f--;)c[l++]=arguments[++t];return(this&&this!==Zn&&this instanceof u?o:n).apply(i?r:this,c)}var i=t&b,o=Xt(n);return u}function hr(n){return function(t,r,e,u){var i=dr(e);return null==e&&i===ut?Nt(t,r,n):zt(t,r,i(e,u,1),n)}}function _r(n,t,r,e,u,i,o,f){var l=t&x;if(!l&&typeof n!="function")throw new Je(L);var a=e?e.length:0;
|
||||
if(a||(t&=~(O|R),e=u=null),a-=u?u.length:0,t&R){var c=e,s=u;e=u=null}var p=l?null:Du(n);return r=[n,t,r,e,u,c,s,i,o,f],p&&(e=r[1],t=p[1],f=e|t,u=t==I&&e==A||t==I&&e==E&&r[7].length<=p[8]||t==(I|E)&&e==A,(f<I||u)&&(t&b&&(r[2]=p[2],f|=e&b?0:j),(e=p[3])&&(u=r[3],r[3]=u?Pt(u,e,p[4]):qn(e),r[4]=u?_(r[3],N):qn(p[4])),(e=p[5])&&(u=r[5],r[5]=u?qt(u,e,p[6]):qn(e),r[6]=u?_(r[5],N):qn(p[6])),(e=p[7])&&(r[7]=qn(e)),t&I&&(r[8]=null==r[8]?p[8]:Au(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=f),t=r[1],f=r[9]),
|
||||
r[9]=null==f?l?0:n.length:ju(f-a,0)||0,(p?Pu:Zu)(t==b?Yt(r[0],r[2]):t!=O&&t!=(b|O)||r[4].length?cr.apply(m,r):pr.apply(m,r),r)}function vr(n,t,r,e,u,i,o){var f=-1,l=n.length,a=t.length;if(l!=a&&(!u||a<=l))return false;for(;++f<l;){var c=n[f],a=t[f],s=e?e(u?a:c,u?c:a,f):m;if(s!==m){if(s)continue;return false}if(u){if(!Gn(t,function(n){return c===n||r(c,n,e,u,i,o)}))return false}else if(c!==a&&!r(c,a,e,u,i,o))return false}return true}function gr(n,t,r){switch(r){case M:case P:return+n==+t;case q:return n.name==t.name&&n.message==t.message;
|
||||
case K:return n!=+n?t!=+t:n==+t;case V:case Y:return n==t+""}return false}function yr(n,t,r,e,u,i,o){var f=Pi(n),l=f.length,a=Pi(t).length;if(l!=a&&!u)return false;for(a=l;a--;){var c=f[a];if(!(u?c in t:tu.call(t,c)))return false}for(var s=u;++a<l;){var c=f[a],p=n[c],h=t[c],_=e?e(u?h:p,u?p:h,c):m;if(_===m?!r(p,h,e,u,i,o):!_)return false;s||(s="constructor"==c)}return s||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false;
|
||||
}function dr(n,t,r){var e=Fn.callback||Ue,e=e===Ue?ut:e;return r?e(n,t,r):e}function mr(n){for(var t=n.name,r=$u[t],e=r?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function wr(n,t,e){var u=Fn.indexOf||Dr,u=u===Dr?r:u;return n?u(n,t,e):u}function br(n){n=ke(n);for(var t=n.length;t--;){var r=n[t][1];n[t][2]=r===r&&!ve(r)}return n}function xr(n,t){var r=null==n?m:n[t];return ge(r)?r:m}function jr(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&tu.call(n,"index")&&(r.index=n.index,
|
||||
r.input=n.input),r}function Ar(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Ze),new n}function kr(n,t,r){var e=n.constructor;switch(t){case J:return Mt(n);case M:case P:return new e(+n);case X:case G:case H:case Q:case nn:case tn:case rn:case en:case un:return t=n.buffer,new e(r?Mt(t):t,n.byteOffset,n.length);case K:case Y:return new e(n);case V:var u=new e(n.source,An.exec(n));u.lastIndex=n.lastIndex}return u}function Or(n,t,r){return null==n||Cr(t,n)||(t=zr(t),n=1==t.length?n:yt(n,Et(t,0,-1)),
|
||||
t=Kr(t)),t=null==n?n:n[t],null==t?m:t.apply(n,r)}function Rr(n){return null!=n&&Sr(Ku(n))}function Ir(n,t){return n=typeof n=="number"?n:parseFloat(n),t=null==t?Uu:t,-1<n&&0==n%1&&n<t}function Er(n,t,r){if(!ve(r))return false;var e=typeof t;return("number"==e?Rr(r)&&Ir(t,r.length):"string"==e&&t in r)?(t=r[t],n===n?n===t:t!==t):false}function Cr(n,t){var r=typeof n;return"string"==r&&yn.test(n)||"number"==r?true:Ci(n)?false:!gn.test(n)||null!=t&&n in Nr(t)}function Wr(n){var t=mr(n);return!!t&&n===Fn[t]&&t in zn.prototype;
|
||||
}function Sr(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=Uu}function Ur(n,t){n=Nr(n);for(var r=-1,e=t.length,u={};++r<e;){var i=t[r];i in n&&(u[i]=n[i])}return u}function Tr(n,t){var r={};return ht(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function $r(n){var t;if(!p(n)||eu.call(n)!=Z||!(tu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return ht(n,function(n,t){r=t}),r===m||tu.call(n,r)}function Fr(n){for(var t=Ae(n),r=t.length,e=r&&n.length,u=!!e&&Sr(e)&&(Ci(n)||se(n)),i=-1,o=[];++i<r;){
|
||||
var f=t[i];(u&&Ir(f,e)||tu.call(n,f))&&o.push(f)}return o}function Lr(n){return null==n?[]:Rr(n)?ve(n)?n:Ze(n):Oe(n)}function Nr(n){return ve(n)?n:Ze(n)}function zr(n){if(Ci(n))return n;var t=[];return u(n).replace(dn,function(n,r,e,u){t.push(e?u.replace(xn,"$1"):r||n)}),t}function Br(n){return n instanceof zn?n.clone():new Nn(n.__wrapped__,n.__chain__,qn(n.__actions__))}function Mr(n,t,r){return n&&n.length?((r?Er(n,t,r):null==t)&&(t=1),Et(n,0>t?0:t)):[]}function Pr(n,t,r){var e=n?n.length:0;return e?((r?Er(n,t,r):null==t)&&(t=1),
|
||||
t=e-(+t||0),Et(n,0,0>t?0:t)):[]}function qr(n){return n?n[0]:m}function Dr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?ju(u+e,0):e;else if(e)return e=Nt(n,t),n=n[e],(t===t?t===n:n!==n)?e:-1;return r(n,t,e||0)}function Kr(n){var t=n?n.length:0;return t?n[t-1]:m}function Zr(n){return Mr(n,1)}function Vr(n,t,e,u){if(!n||!n.length)return[];null!=t&&typeof t!="boolean"&&(u=e,e=Er(n,t,u)?null:t,t=false);var i=dr();if((null!=e||i!==ut)&&(e=i(e,u,3)),t&&wr()==r){t=e;var o;e=-1,u=n.length;
|
||||
for(var i=-1,f=[];++e<u;){var l=n[e],a=t?t(l,e,n):l;e&&o===a||(o=a,f[++i]=l)}n=f}else n=Tt(n,e);return n}function Yr(n){if(!n||!n.length)return[];var t=-1,r=0;n=Yn(n,function(n){return Rr(n)?(r=ju(n.length,r),true):void 0});for(var e=Be(r);++t<r;)e[t]=Jn(n,At(t));return e}function Jr(n,t,r){return n&&n.length?(n=Yr(n),null==t?n:(t=Bt(t,r,4),Jn(n,function(n){return Xn(n,t,m,true)}))):[]}function Xr(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||Ci(n[0])||(t=[]);++r<e;){var i=n[r];t?u[i]=t[r]:i&&(u[i[0]]=i[1]);
|
||||
}return u}function Gr(n){return n=Fn(n),n.__chain__=true,n}function Hr(n,t,r){return t.call(r,n)}function Qr(n,t,r){var e=Ci(n)?Kn:lt;return r&&Er(n,t,r)&&(t=null),(typeof t!="function"||r!==m)&&(t=dr(t,r,3)),e(n,t)}function ne(n,t,r){var e=Ci(n)?Yn:ct;return t=dr(t,r,3),e(n,t)}function te(n,t,r,e){var u=n?Ku(n):0;return Sr(u)||(n=Oe(n),u=n.length),u?(r=typeof r!="number"||e&&Er(t,r,e)?0:0>r?ju(u+r,0):r||0,typeof n=="string"||!Ci(n)&&me(n)?r<u&&-1<n.indexOf(t,r):-1<wr(n,t,r)):false}function re(n,t,r){
|
||||
var e=Ci(n)?Jn:wt;return t=dr(t,r,3),e(n,t)}function ee(n,t,r){return(r?Er(n,t,r):null==t)?(n=Lr(n),t=n.length,0<t?n[Rt(0,t-1)]:m):(n=ue(n),n.length=Au(0>t?0:+t||0,n.length),n)}function ue(n){n=Lr(n);for(var t=-1,r=n.length,e=Be(r);++t<r;){var u=Rt(0,t);t!=u&&(e[t]=e[u]),e[u]=n[t]}return e}function ie(n,t,r){var e=Ci(n)?Gn:Ct;return r&&Er(n,t,r)&&(t=null),(typeof t!="function"||r!==m)&&(t=dr(t,r,3)),e(n,t)}function oe(n,t){var r;if(typeof t!="function"){if(typeof n!="function")throw new Je(L);var e=n;
|
||||
n=t,t=e}return function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}}function fe(n,t,r){function e(){var r=t-(yi()-a);0>=r||r>t?(f&&au(f),r=p,f=s=p=m,r&&(h=yi(),l=n.apply(c,o),s||f||(o=c=null))):s=_u(e,r)}function u(){s&&au(s),f=s=p=m,(v||_!==t)&&(h=yi(),l=n.apply(c,o),s||f||(o=c=null))}function i(){if(o=arguments,a=yi(),c=this,p=v&&(s||!g),false===_)var r=g&&!s;else{f||g||(h=a);var i=_-(a-h),y=0>=i||i>_;y?(f&&(f=au(f)),h=a,l=n.apply(c,o)):f||(f=_u(u,i))}return y&&s?s=au(s):s||t===_||(s=_u(e,t)),
|
||||
r&&(y=true,l=n.apply(c,o)),!y||s||f||(o=c=null),l}var o,f,l,a,c,s,p,h=0,_=false,v=true;if(typeof n!="function")throw new Je(L);if(t=0>t?0:+t||0,true===r)var g=true,v=false;else ve(r)&&(g=r.leading,_="maxWait"in r&&ju(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);return i.cancel=function(){s&&au(s),f&&au(f),f=s=p=m},i}function le(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),r.cache=i.set(u,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new Je(L);
|
||||
return r.cache=new le.Cache,r}function ae(n,t){if(typeof n!="function")throw new Je(L);return t=ju(t===m?n.length-1:+t||0,0),function(){for(var r=arguments,e=-1,u=ju(r.length-t,0),i=Be(u);++e<u;)i[e]=r[t+e];switch(t){case 0:return n.call(this,i);case 1:return n.call(this,r[0],i);case 2:return n.call(this,r[0],r[1],i)}for(u=Be(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=i,n.apply(this,u)}}function ce(n,t){return n>t}function se(n){return p(n)&&Rr(n)&&eu.call(n)==z}function pe(n){return!!n&&1===n.nodeType&&p(n)&&-1<eu.call(n).indexOf("Element");
|
||||
}function he(n,t,r,e){return e=(r=typeof r=="function"?Bt(r,e,3):m)?r(n,t):m,e===m?dt(n,t,r):!!e}function _e(n){return p(n)&&typeof n.message=="string"&&eu.call(n)==q}function ve(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function ge(n){return null==n?false:eu.call(n)==D?iu.test(nu.call(n)):p(n)&&On.test(n)}function ye(n){return typeof n=="number"||p(n)&&eu.call(n)==K}function de(n){return p(n)&&eu.call(n)==V}function me(n){return typeof n=="string"||p(n)&&eu.call(n)==Y}function we(n){return p(n)&&Sr(n.length)&&!!Un[eu.call(n)];
|
||||
}function be(n,t){return n<t}function xe(n){return et(n,Ae(n))}function je(n){return gt(n,Ae(n))}function Ae(n){if(null==n)return[];ve(n)||(n=Ze(n));for(var t=n.length,t=t&&Sr(t)&&(Ci(n)||se(n))&&t||0,r=n.constructor,e=-1,r=typeof r=="function"&&r.prototype===n,u=Be(t),i=0<t;++e<t;)u[e]=e+"";for(var o in n)i&&Ir(o,t)||"constructor"==o&&(r||!tu.call(n,o))||u.push(o);return u}function ke(n){n=Nr(n);for(var t=-1,r=Pi(n),e=r.length,u=Be(e);++t<e;){var i=r[t];u[t]=[i,n[i]]}return u}function Oe(n){return $t(n,Pi(n));
|
||||
}function Re(n){return(n=u(n))&&n.replace(Rn,l).replace(bn,"")}function Ie(n){return(n=u(n))&&wn.test(n)?n.replace(mn,"\\$&"):n}function Ee(n,t,r){return r&&Er(n,t,r)&&(t=0),Ru(n,t)}function Ce(n,t){var r="";if(n=u(n),t=+t,1>t||!n||!bu(t))return r;do t%2&&(r+=n),t=cu(t/2),n+=n;while(t);return r}function We(n,t,r){var e=n;return(n=u(n))?(r?Er(e,t,r):null==t)?n.slice(v(n),g(n)+1):(t+="",n.slice(i(n,t),o(n,t)+1)):n}function Se(n,t,r){return r&&Er(n,t,r)&&(t=null),n=u(n),n.match(t||Cn)||[]}function Ue(n,t,r){
|
||||
return r&&Er(n,t,r)&&(t=null),p(n)?Fe(n):ut(n,t)}function Te(n){return function(){return n}}function $e(n){return n}function Fe(n){return bt(it(n,true))}function Le(n,t,r){if(null==r){var e=ve(t),u=e?Pi(t):null;((u=u&&u.length?gt(t,u):null)?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=gt(t,Pi(t)));var i=true,e=-1,o=Si(n),f=u.length;false===r?i=false:ve(r)&&"chain"in r&&(i=r.chain);for(;++e<f;){r=u[e];var l=t[r];n[r]=l,o&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);
|
||||
return(e.__actions__=qn(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return r=[this.value()],pu.apply(r,arguments),t.apply(n,r)}}(l))}return n}function Ne(){}function ze(n){return Cr(n)?At(n):kt(n)}h=h?Vn.defaults(Zn.Object(),h,Vn.pick(Zn,Sn)):Zn;var Be=h.Array,Me=h.Date,Pe=h.Error,qe=h.Function,De=h.Math,Ke=h.Number,Ze=h.Object,Ve=h.RegExp,Ye=h.String,Je=h.TypeError,Xe=Be.prototype,Ge=Ze.prototype,He=Ye.prototype,Qe=(Qe=h.window)?Qe.document:null,nu=qe.prototype.toString,tu=Ge.hasOwnProperty,ru=0,eu=Ge.toString,uu=h._,iu=Ve("^"+Ie(nu.call(tu)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ou=xr(h,"ArrayBuffer"),fu=xr(ou&&new ou(0),"slice"),lu=De.ceil,au=h.clearTimeout,cu=De.floor,su=xr(Ze,"getPrototypeOf"),pu=Xe.push,hu=xr(h,"Set"),_u=h.setTimeout,vu=Xe.splice,gu=xr(h,"Uint8Array"),yu=xr(h,"WeakMap"),du=function(){
|
||||
try{var n=xr(h,"Float64Array"),t=new n(new ou(10),0,1)&&n}catch(r){}return t||null}(),mu=xr(Ze,"create"),wu=xr(Be,"isArray"),bu=h.isFinite,xu=xr(Ze,"keys"),ju=De.max,Au=De.min,ku=xr(Me,"now"),Ou=xr(Ke,"isFinite"),Ru=h.parseInt,Iu=De.random,Eu=Ke.POSITIVE_INFINITY,Cu=4294967294,Wu=2147483647,Su=du?du.BYTES_PER_ELEMENT:0,Uu=9007199254740991,Tu=yu&&new yu,$u={},Fu=Fn.support={};!function(n){function t(){this.x=n}var r=[];t.prototype={valueOf:n,y:n};for(var e in new t)r.push(e);try{Fu.dom=11===Qe.createDocumentFragment().nodeType;
|
||||
}catch(u){Fu.dom=false}}(1,0),Fn.templateSettings={escape:hn,evaluate:_n,interpolate:vn,variable:"",imports:{_:Fn}};var Lu=function(){function n(){}return function(t){if(ve(t)){n.prototype=t;var r=new n;n.prototype=null}return r||{}}}(),Nu=Zt(_t),zu=Zt(vt,true),Bu=Vt(),Mu=Vt(true),Pu=Tu?function(n,t){return Tu.set(n,t),n}:$e;fu||(Mt=ou&&gu?function(n){var t=n.byteLength,r=du?cu(t/Su):0,e=r*Su,u=new ou(t);if(r){var i=new du(u,0,r);i.set(new du(n,0,r))}return t!=e&&(i=new gu(u,e),i.set(new gu(n,e))),u}:Te(null));
|
||||
var qu=mu&&hu?function(n){return new Mn(n)}:Te(null),Du=Tu?function(n){return Tu.get(n)}:Ne,Ku=At("length"),Zu=function(){var n=0,t=0;return function(r,e){var u=yi(),i=U-(u-t);if(t=u,0<i){if(++n>=S)return r}else n=0;return Pu(r,e)}}(),Vu=ae(function(n,t){return Rr(n)?ft(n,pt(t,false,true)):[]}),Yu=nr(),Ju=nr(true),Xu=ae(function(n){for(var t=n.length,e=t,u=Be(c),i=wr(),o=i==r,f=[];e--;){var l=n[e]=Rr(l=n[e])?l:[];u[e]=o&&120<=l.length?qu(e&&l):null}var o=n[0],a=-1,c=o?o.length:0,s=u[0];n:for(;++a<c;)if(l=o[a],
|
||||
0>(s?Pn(s,l):i(f,l,0))){for(e=t;--e;){var p=u[e];if(0>(p?Pn(p,l):i(n[e],l,0)))continue n}s&&s.push(l),f.push(l)}return f}),Gu=ae(function(t,r){r=pt(r);var e=rt(t,r);return Ot(t,r.sort(n)),e}),Hu=hr(),Qu=hr(true),ni=ae(function(n){return Tt(pt(n,false,true))}),ti=ae(function(n,t){return Rr(n)?ft(n,t):[]}),ri=ae(Yr),ei=ae(function(n){var t=n.length,r=2<t?n[t-2]:m,e=1<t?n[t-1]:m;return 2<t&&typeof r=="function"?t-=2:(r=1<t&&typeof e=="function"?(--t,e):m,e=m),n.length=t,Jr(n,r,e)}),ui=ae(function(n,t){return rt(n,pt(t));
|
||||
}),ii=Dt(function(n,t,r){tu.call(n,r)?++n[r]:n[r]=1}),oi=Qt(Nu),fi=Qt(zu,true),li=er(Dn,Nu),ai=er(function(n,t){for(var r=n.length;r--&&false!==t(n[r],r,n););return n},zu),ci=Dt(function(n,t,r){tu.call(n,r)?n[r].push(t):n[r]=[t]}),si=Dt(function(n,t,r){n[r]=t}),pi=ae(function(n,t,r){var e=-1,u=typeof t=="function",i=Cr(t),o=Rr(n)?Be(n.length):[];return Nu(n,function(n){var f=u?t:i&&null!=n?n[t]:null;o[++e]=f?f.apply(n,r):Or(n,t,r)}),o}),hi=Dt(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),_i=ar(Xn,Nu),vi=ar(function(n,t,r,e){
|
||||
var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r},zu),gi=ae(function(n,t){if(null==n)return[];var r=t[2];return r&&Er(t[0],t[1],r)&&(t.length=1),St(n,pt(t),[])}),yi=ku||function(){return(new Me).getTime()},di=ae(function(n,t,r){var e=b;if(r.length)var u=_(r,di.placeholder),e=e|O;return _r(n,e,t,r,u)}),mi=ae(function(n,t){t=t.length?pt(t):je(n);for(var r=-1,e=t.length;++r<e;){var u=t[r];n[u]=_r(n[u],b,n)}return n}),wi=ae(function(n,t,r){var e=b|x;if(r.length)var u=_(r,wi.placeholder),e=e|O;
|
||||
return _r(t,e,n,r,u)}),bi=Gt(A),xi=Gt(k),ji=ae(function(n,t){return ot(n,1,t)}),Ai=ae(function(n,t,r){return ot(n,t,r)}),ki=rr(),Oi=rr(true),Ri=lr(O),Ii=lr(R),Ei=ae(function(n,t){return _r(n,E,null,null,null,pt(t))}),Ci=wu||function(n){return p(n)&&Sr(n.length)&&eu.call(n)==B};Fu.dom||(pe=function(n){return!!n&&1===n.nodeType&&p(n)&&!Ui(n)});var Wi=Ou||function(n){return typeof n=="number"&&bu(n)},Si=e(/x/)||gu&&!e(gu)?function(n){return eu.call(n)==D}:e,Ui=su?function(n){if(!n||eu.call(n)!=Z)return false;
|
||||
var t=xr(n,"valueOf"),r=t&&(r=su(t))&&su(r);return r?n==r||su(n)==r:$r(n)}:$r,Ti=Kt(function(n,t,r){return r?nt(n,t,r):tt(n,t)}),$i=ae(function(n){var t=n[0];return null==t?t:(n.push(Hn),Ti.apply(m,n))}),Fi=tr(_t),Li=tr(vt),Ni=ur(Bu),zi=ur(Mu),Bi=ir(_t),Mi=ir(vt),Pi=xu?function(n){var t=null==n?null:n.constructor;return typeof t=="function"&&t.prototype===n||typeof n!="function"&&Rr(n)?Fr(n):ve(n)?xu(n):[]}:Fr,qi=or(true),Di=or(),Ki=Kt(jt),Zi=ae(function(n,t){if(null==n)return{};if("function"!=typeof t[0])return t=Jn(pt(t),Ye),
|
||||
Ur(n,ft(Ae(n),t));var r=Bt(t[0],t[1],3);return Tr(n,function(n,t,e){return!r(n,t,e)})}),Vi=ae(function(n,t){return null==n?{}:"function"==typeof t[0]?Tr(n,Bt(t[0],t[1],3)):Ur(n,pt(t))}),Yi=Jt(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t)}),Ji=Jt(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Xi=fr(),Gi=fr(true);8!=Ru(Wn+"08")&&(Ee=function(n,t,r){return(r?Er(n,t,r):null==t)?t=0:t&&(t=+t),n=We(n),Ru(n,t||(kn.test(n)?16:10))});var Hi=Jt(function(n,t,r){return n+(r?"_":"")+t.toLowerCase();
|
||||
}),Qi=Jt(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),no=ae(function(n,t){try{return n.apply(m,t)}catch(r){return _e(r)?r:new Pe(r)}}),to=ae(function(n,t){return function(r){return Or(r,n,t)}}),ro=ae(function(n,t){return function(r){return Or(n,r,t)}}),eo=Ht(ce,-(1/0)),uo=Ht(be,1/0);return Fn.prototype=Ln.prototype,Nn.prototype=Lu(Ln.prototype),Nn.prototype.constructor=Nn,zn.prototype=Lu(Ln.prototype),zn.prototype.constructor=zn,Bn.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n];
|
||||
},Bn.prototype.get=function(n){return"__proto__"==n?m:this.__data__[n]},Bn.prototype.has=function(n){return"__proto__"!=n&&tu.call(this.__data__,n)},Bn.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Mn.prototype.push=function(n){var t=this.data;typeof n=="string"||ve(n)?t.set.add(n):t.hash[n]=true},le.Cache=Bn,Fn.after=function(n,t){if(typeof t!="function"){if(typeof n!="function")throw new Je(L);var r=n;n=t,t=r}return n=bu(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0;
|
||||
}},Fn.ary=function(n,t,r){return r&&Er(n,t,r)&&(t=null),t=n&&null==t?n.length:ju(+t||0,0),_r(n,I,null,null,null,null,t)},Fn.assign=Ti,Fn.at=ui,Fn.before=oe,Fn.bind=di,Fn.bindAll=mi,Fn.bindKey=wi,Fn.callback=Ue,Fn.chain=Gr,Fn.chunk=function(n,t,r){t=(r?Er(n,t,r):null==t)?1:ju(+t||1,1),r=0;for(var e=n?n.length:0,u=-1,i=Be(lu(e/t));r<e;)i[++u]=Et(n,r,r+=t);return i},Fn.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var i=n[t];i&&(u[++e]=i)}return u},Fn.constant=Te,Fn.countBy=ii,Fn.create=function(n,t,r){
|
||||
var e=Lu(n);return r&&Er(n,t,r)&&(t=null),t?tt(e,t):e},Fn.curry=bi,Fn.curryRight=xi,Fn.debounce=fe,Fn.defaults=$i,Fn.defer=ji,Fn.delay=Ai,Fn.difference=Vu,Fn.drop=Mr,Fn.dropRight=Pr,Fn.dropRightWhile=function(n,t,r){return n&&n.length?Ft(n,dr(t,r,3),true,true):[]},Fn.dropWhile=function(n,t,r){return n&&n.length?Ft(n,dr(t,r,3),true):[]},Fn.fill=function(n,t,r,e){var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&Er(n,t,r)&&(r=0,e=u),u=n.length,r=null==r?0:+r||0,0>r&&(r=-r>u?0:u+r),e=e===m||e>u?u:+e||0,
|
||||
0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;r<u;)n[r++]=t;return n},Fn.filter=ne,Fn.flatten=function(n,t,r){var e=n?n.length:0;return r&&Er(n,t,r)&&(t=false),e?pt(n,t):[]},Fn.flattenDeep=function(n){return n&&n.length?pt(n,true):[]},Fn.flow=ki,Fn.flowRight=Oi,Fn.forEach=li,Fn.forEachRight=ai,Fn.forIn=Ni,Fn.forInRight=zi,Fn.forOwn=Bi,Fn.forOwnRight=Mi,Fn.functions=je,Fn.groupBy=ci,Fn.indexBy=si,Fn.initial=function(n){return Pr(n,1)},Fn.intersection=Xu,Fn.invert=function(n,t,r){r&&Er(n,t,r)&&(t=null),r=-1;for(var e=Pi(n),u=e.length,i={};++r<u;){
|
||||
var o=e[r],f=n[o];t?tu.call(i,f)?i[f].push(o):i[f]=[o]:i[f]=o}return i},Fn.invoke=pi,Fn.keys=Pi,Fn.keysIn=Ae,Fn.map=re,Fn.mapKeys=qi,Fn.mapValues=Di,Fn.matches=Fe,Fn.matchesProperty=function(n,t){return xt(n,it(t,true))},Fn.memoize=le,Fn.merge=Ki,Fn.method=to,Fn.methodOf=ro,Fn.mixin=Le,Fn.negate=function(n){if(typeof n!="function")throw new Je(L);return function(){return!n.apply(this,arguments)}},Fn.omit=Zi,Fn.once=function(n){return oe(2,n)},Fn.pairs=ke,Fn.partial=Ri,Fn.partialRight=Ii,Fn.partition=hi,
|
||||
Fn.pick=Vi,Fn.pluck=function(n,t){return re(n,ze(t))},Fn.property=ze,Fn.propertyOf=function(n){return function(t){return yt(n,zr(t),t+"")}},Fn.pull=function(){var n=arguments,t=n[0];if(!t||!t.length)return t;for(var r=0,e=wr(),u=n.length;++r<u;)for(var i=0,o=n[r];-1<(i=e(t,o,i));)vu.call(t,i,1);return t},Fn.pullAt=Gu,Fn.range=function(n,t,r){r&&Er(n,t,r)&&(t=r=null),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=ju(lu((t-n)/(r||1)),0);for(var u=Be(t);++e<t;)u[e]=n,n+=r;return u},Fn.rearg=Ei,
|
||||
Fn.reject=function(n,t,r){var e=Ci(n)?Yn:ct;return t=dr(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Fn.remove=function(n,t,r){var e=[];if(!n||!n.length)return e;var u=-1,i=[],o=n.length;for(t=dr(t,r,3);++u<o;)r=n[u],t(r,u,n)&&(e.push(r),i.push(u));return Ot(n,i),e},Fn.rest=Zr,Fn.restParam=ae,Fn.set=function(n,t,r){if(null==n)return n;var e=t+"";t=null!=n[e]||Cr(t,n)?[e]:zr(t);for(var e=-1,u=t.length,i=u-1,o=n;null!=o&&++e<u;){var f=t[e];ve(o)&&(e==i?o[f]=r:null==o[f]&&(o[f]=Ir(t[e+1])?[]:{})),o=o[f];
|
||||
}return n},Fn.shuffle=ue,Fn.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&Er(n,t,r)&&(t=0,r=e),Et(n,t,r)):[]},Fn.sortBy=function(n,t,r){if(null==n)return[];r&&Er(n,t,r)&&(t=null);var e=-1;return t=dr(t,r,3),n=wt(n,function(n,r,u){return{a:t(n,r,u),b:++e,c:n}}),Wt(n,f)},Fn.sortByAll=gi,Fn.sortByOrder=function(n,t,r,e){return null==n?[]:(e&&Er(t,r,e)&&(r=null),Ci(t)||(t=null==t?[]:[t]),Ci(r)||(r=null==r?[]:[r]),St(n,t,r))},Fn.spread=function(n){if(typeof n!="function")throw new Je(L);
|
||||
return function(t){return n.apply(this,t)}},Fn.take=function(n,t,r){return n&&n.length?((r?Er(n,t,r):null==t)&&(t=1),Et(n,0,0>t?0:t)):[]},Fn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?Er(n,t,r):null==t)&&(t=1),t=e-(+t||0),Et(n,0>t?0:t)):[]},Fn.takeRightWhile=function(n,t,r){return n&&n.length?Ft(n,dr(t,r,3),false,true):[]},Fn.takeWhile=function(n,t,r){return n&&n.length?Ft(n,dr(t,r,3)):[]},Fn.tap=function(n,t,r){return t.call(r,n),n},Fn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Je(L);
|
||||
return false===r?e=false:ve(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),$n.leading=e,$n.maxWait=+t,$n.trailing=u,fe(n,t,$n)},Fn.thru=Hr,Fn.times=function(n,t,r){if(n=cu(n),1>n||!bu(n))return[];var e=-1,u=Be(Au(n,4294967295));for(t=Bt(t,r,1);++e<n;)4294967295>e?u[e]=t(e):t(e);return u},Fn.toArray=function(n){var t=n?Ku(n):0;return Sr(t)?t?qn(n):[]:Oe(n)},Fn.toPlainObject=xe,Fn.transform=function(n,t,r,e){var u=Ci(n)||we(n);return t=dr(t,e,4),null==r&&(u||ve(n)?(e=n.constructor,r=u?Ci(n)?new e:[]:Lu(Si(e)?e.prototype:null)):r={}),
|
||||
(u?Dn:_t)(n,function(n,e,u){return t(r,n,e,u)}),r},Fn.union=ni,Fn.uniq=Vr,Fn.unzip=Yr,Fn.unzipWith=Jr,Fn.values=Oe,Fn.valuesIn=function(n){return $t(n,Ae(n))},Fn.where=function(n,t){return ne(n,bt(t))},Fn.without=ti,Fn.wrap=function(n,t){return t=null==t?$e:t,_r(t,O,null,[n],[])},Fn.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(Rr(r))var e=e?ft(e,r).concat(ft(r,e)):r}return e?Tt(e):[]},Fn.zip=ri,Fn.zipObject=Xr,Fn.zipWith=ei,Fn.backflow=Oi,Fn.collect=re,Fn.compose=Oi,
|
||||
Fn.each=li,Fn.eachRight=ai,Fn.extend=Ti,Fn.iteratee=Ue,Fn.methods=je,Fn.object=Xr,Fn.select=ne,Fn.tail=Zr,Fn.unique=Vr,Le(Fn,Fn),Fn.add=function(n,t){return(+n||0)+(+t||0)},Fn.attempt=no,Fn.camelCase=Yi,Fn.capitalize=function(n){return(n=u(n))&&n.charAt(0).toUpperCase()+n.slice(1)},Fn.clone=function(n,t,r,e){return t&&typeof t!="boolean"&&Er(n,t,r)?t=false:typeof t=="function"&&(e=r,r=t,t=false),typeof r=="function"?it(n,t,Bt(r,e,1)):it(n,t)},Fn.cloneDeep=function(n,t,r){return typeof t=="function"?it(n,true,Bt(t,r,1)):it(n,true);
|
||||
},Fn.deburr=Re,Fn.endsWith=function(n,t,r){n=u(n),t+="";var e=n.length;return r=r===m?e:Au(0>r?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Fn.escape=function(n){return(n=u(n))&&pn.test(n)?n.replace(cn,a):n},Fn.escapeRegExp=Ie,Fn.every=Qr,Fn.find=oi,Fn.findIndex=Yu,Fn.findKey=Fi,Fn.findLast=fi,Fn.findLastIndex=Ju,Fn.findLastKey=Li,Fn.findWhere=function(n,t){return oi(n,bt(t))},Fn.first=qr,Fn.get=function(n,t,r){return n=null==n?m:yt(n,zr(t),t+""),n===m?r:n},Fn.gt=ce,Fn.gte=function(n,t){return n>=t;
|
||||
},Fn.has=function(n,t){if(null==n)return false;var r=tu.call(n,t);if(!r&&!Cr(t)){if(t=zr(t),n=1==t.length?n:yt(n,Et(t,0,-1)),null==n)return false;t=Kr(t),r=tu.call(n,t)}return r||Sr(n.length)&&Ir(t,n.length)&&(Ci(n)||se(n))},Fn.identity=$e,Fn.includes=te,Fn.indexOf=Dr,Fn.inRange=function(n,t,r){return t=+t||0,"undefined"===typeof r?(r=t,t=0):r=+r||0,n>=Au(t,r)&&n<ju(t,r)},Fn.isArguments=se,Fn.isArray=Ci,Fn.isBoolean=function(n){return true===n||false===n||p(n)&&eu.call(n)==M},Fn.isDate=function(n){return p(n)&&eu.call(n)==P;
|
||||
},Fn.isElement=pe,Fn.isEmpty=function(n){return null==n?true:Rr(n)&&(Ci(n)||me(n)||se(n)||p(n)&&Si(n.splice))?!n.length:!Pi(n).length},Fn.isEqual=he,Fn.isError=_e,Fn.isFinite=Wi,Fn.isFunction=Si,Fn.isMatch=function(n,t,r,e){return r=typeof r=="function"?Bt(r,e,3):m,mt(n,br(t),r)},Fn.isNaN=function(n){return ye(n)&&n!=+n},Fn.isNative=ge,Fn.isNull=function(n){return null===n},Fn.isNumber=ye,Fn.isObject=ve,Fn.isPlainObject=Ui,Fn.isRegExp=de,Fn.isString=me,Fn.isTypedArray=we,Fn.isUndefined=function(n){
|
||||
return n===m},Fn.kebabCase=Ji,Fn.last=Kr,Fn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?ju(e+r,0):Au(r||0,e-1))+1;else if(r)return u=Nt(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return s(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Fn.lt=be,Fn.lte=function(n,t){return n<=t},Fn.max=eo,Fn.min=uo,Fn.noConflict=function(){return h._=uu,this},Fn.noop=Ne,Fn.now=yi,Fn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return e<t&&bu(t)?(e=(t-e)/2,
|
||||
t=cu(e),e=lu(e),r=sr("",e,r),r.slice(0,t)+n+r):n},Fn.padLeft=Xi,Fn.padRight=Gi,Fn.parseInt=Ee,Fn.random=function(n,t,r){r&&Er(n,t,r)&&(t=r=null);var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Iu(),Au(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):Rt(n,t)},Fn.reduce=_i,Fn.reduceRight=vi,Fn.repeat=Ce,Fn.result=function(n,t,r){var e=null==n?m:n[t];return e===m&&(null==n||Cr(t,n)||(t=zr(t),
|
||||
n=1==t.length?n:yt(n,Et(t,0,-1)),e=null==n?m:n[Kr(t)]),e=e===m?r:e),Si(e)?e.call(n):e},Fn.runInContext=d,Fn.size=function(n){var t=n?Ku(n):0;return Sr(t)?t:Pi(n).length},Fn.snakeCase=Hi,Fn.some=ie,Fn.sortedIndex=Hu,Fn.sortedLastIndex=Qu,Fn.startCase=Qi,Fn.startsWith=function(n,t,r){return n=u(n),r=null==r?0:Au(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Fn.sum=function(n,t,r){r&&Er(n,t,r)&&(t=null);var e=dr(),u=null==t;if(u&&e===ut||(u=false,t=e(t,r,3)),u){for(n=Ci(n)?n:Lr(n),t=n.length,r=0;t--;)r+=+n[t]||0;
|
||||
n=r}else n=Ut(n,t);return n},Fn.template=function(n,t,r){var e=Fn.templateSettings;r&&Er(n,t,r)&&(t=r=null),n=u(n),t=nt(tt({},r||t),e,Qn),r=nt(tt({},t.imports),e.imports,Qn);var i,o,f=Pi(r),l=$t(r,f),a=0;r=t.interpolate||In;var s="__p+='";r=Ve((t.escape||In).source+"|"+r.source+"|"+(r===vn?jn:In).source+"|"+(t.evaluate||In).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,l){return e||(e=u),s+=n.slice(a,l).replace(En,c),r&&(i=true,s+="'+__e("+r+")+'"),
|
||||
f&&(o=true,s+="';"+f+";\n__p+='"),e&&(s+="'+((__t=("+e+"))==null?'':__t)+'"),a=l+t.length,t}),s+="';",(t=t.variable)||(s="with(obj){"+s+"}"),s=(o?s.replace(on,""):s).replace(fn,"$1").replace(ln,"$1;"),s="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(i?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+s+"return __p}",t=no(function(){return qe(f,p+"return "+s).apply(m,l)}),t.source=s,_e(t))throw t;return t},Fn.trim=We,Fn.trimLeft=function(n,t,r){
|
||||
var e=n;return(n=u(n))?n.slice((r?Er(e,t,r):null==t)?v(n):i(n,t+"")):n},Fn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?Er(e,t,r):null==t)?n.slice(0,g(n)+1):n.slice(0,o(n,t+"")+1):n},Fn.trunc=function(n,t,r){r&&Er(n,t,r)&&(t=null);var e=C;if(r=W,null!=t)if(ve(t)){var i="separator"in t?t.separator:i,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==i)return t+r;if(de(i)){if(n.slice(e).search(i)){
|
||||
var o,f=n.slice(0,e);for(i.global||(i=Ve(i.source,(An.exec(i)||"")+"g")),i.lastIndex=0;n=i.exec(f);)o=n.index;t=t.slice(0,null==o?e:o)}}else n.indexOf(i,e)!=e&&(i=t.lastIndexOf(i),-1<i&&(t=t.slice(0,i)));return t+r},Fn.unescape=function(n){return(n=u(n))&&sn.test(n)?n.replace(an,y):n},Fn.uniqueId=function(n){var t=++ru;return u(n)+t},Fn.words=Se,Fn.all=Qr,Fn.any=ie,Fn.contains=te,Fn.eq=he,Fn.detect=oi,Fn.foldl=_i,Fn.foldr=vi,Fn.head=qr,Fn.include=te,Fn.inject=_i,Le(Fn,function(){var n={};return _t(Fn,function(t,r){
|
||||
Fn.prototype[r]||(n[r]=t)}),n}(),false),Fn.sample=ee,Fn.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return ee(t,n)}):ee(this.value())},Fn.VERSION=w,Dn("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Fn[n].placeholder=Fn}),Dn(["dropWhile","filter","map","takeWhile"],function(n,t){var r=t!=F,e=t==T;zn.prototype[n]=function(n,u){var i=this.__filtered__,o=i&&e?new zn(this):this.clone();return(o.__iteratees__||(o.__iteratees__=[])).push({done:false,
|
||||
count:0,index:0,iteratee:dr(n,u,1),limit:-1,type:t}),o.__filtered__=i||r,o}}),Dn(["drop","take"],function(n,t){var r=n+"While";zn.prototype[n]=function(r){var e=this.__filtered__,u=e&&!t?this.dropWhile():this.clone();return r=null==r?1:ju(cu(r)||0,0),e?t?u.__takeCount__=Au(u.__takeCount__,r):Kr(u.__iteratees__).limit=r:(u.__views__||(u.__views__=[])).push({size:r,type:n+(0>u.__dir__?"Right":"")}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()},zn.prototype[n+"RightWhile"]=function(n,t){
|
||||
return this.reverse()[r](n,t).reverse()}}),Dn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Dn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this[r](1)}}),Dn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?bt:ze;zn.prototype[n]=function(n){return this[r](e(n))}}),zn.prototype.compact=function(){return this.filter($e)},zn.prototype.reject=function(n,t){return n=dr(n,t,1),
|
||||
this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return 0>n?r=this.takeRight(-n):n&&(r=this.drop(n)),t!==m&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},zn.prototype.toArray=function(){return this.drop(0)},_t(zn.prototype,function(n,t){var r=Fn[t];if(r){var e=/^(?:filter|map|reject)|While$/.test(t),u=/^(?:first|last)$/.test(t);Fn.prototype[t]=function(){function t(n){return n=[n],pu.apply(n,i),r.apply(Fn,n)}var i=arguments,o=this.__chain__,f=this.__wrapped__,l=!!this.__actions__.length,a=f instanceof zn,c=i[0],s=a||Ci(f);
|
||||
return s&&e&&typeof c=="function"&&1!=c.length&&(a=s=false),a=a&&!l,u&&!o?a?n.call(f):r.call(Fn,this.value()):s?(f=n.apply(a?f:new zn(this),i),u||!l&&!f.__actions__||(f.__actions__||(f.__actions__=[])).push({func:Hr,args:[t],thisArg:Fn}),new Nn(f,o)):this.thru(t)}}}),Dn("concat join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?He:Xe)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(n);Fn.prototype[n]=function(){
|
||||
var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),_t(zn.prototype,function(n,t){var r=Fn[t];if(r){var e=r.name;($u[e]||($u[e]=[])).push({name:t,func:r})}}),$u[cr(null,x).name]=[{name:"wrapper",func:null}],zn.prototype.clone=function(){var n=this.__actions__,t=this.__iteratees__,r=this.__views__,e=new zn(this.__wrapped__);return e.__actions__=n?qn(n):null,e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=t?qn(t):null,
|
||||
e.__takeCount__=this.__takeCount__,e.__views__=r?qn(r):null,e},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){var n=this.__wrapped__.value();if(!Ci(n))return Lt(n,this.__actions__);var t,r=this.__dir__,e=0>r;t=n.length;for(var u=this.__views__,i=0,o=-1,f=u?u.length:0;++o<f;){var l=u[o],a=l.size;switch(l.type){case"drop":i+=a;break;case"dropRight":t-=a;break;case"take":
|
||||
t=Au(t,i+a);break;case"takeRight":i=ju(i,t-a)}}t={start:i,end:t},u=t.start,i=t.end,t=i-u,u=e?i:u-1,i=Au(t,this.__takeCount__),f=(o=this.__iteratees__)?o.length:0,l=0,a=[];n:for(;t--&&l<i;){for(var u=u+r,c=-1,s=n[u];++c<f;){var p=o[c],h=p.iteratee,_=p.type;if(_==T){if(p.done&&(e?u>p.index:u<p.index)&&(p.count=0,p.done=false),p.index=u,!(p.done||(_=p.limit,p.done=-1<_?p.count++>=_:!h(s))))continue n}else if(p=h(s),_==F)s=p;else if(!p){if(_==$)continue n;break n}}a[l++]=s}return a},Fn.prototype.chain=function(){
|
||||
return Gr(this)},Fn.prototype.commit=function(){return new Nn(this.value(),this.__chain__)},Fn.prototype.plant=function(n){for(var t,r=this;r instanceof Ln;){var e=Br(r);t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},Fn.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof zn?(this.__actions__.length&&(n=new zn(this)),new Nn(n.reverse(),this.__chain__)):this.thru(function(n){return n.reverse()})},Fn.prototype.toString=function(){return this.value()+""},Fn.prototype.run=Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){
|
||||
return Lt(this.__wrapped__,this.__actions__)},Fn.prototype.collect=Fn.prototype.map,Fn.prototype.head=Fn.prototype.first,Fn.prototype.select=Fn.prototype.filter,Fn.prototype.tail=Fn.prototype.rest,Fn}var m,w="3.9.0",b=1,x=2,j=4,A=8,k=16,O=32,R=64,I=128,E=256,C=30,W="...",S=150,U=16,T=0,$=1,F=2,L="Expected a function",N="__lodash_placeholder__",z="[object Arguments]",B="[object Array]",M="[object Boolean]",P="[object Date]",q="[object Error]",D="[object Function]",K="[object Number]",Z="[object Object]",V="[object RegExp]",Y="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",G="[object Float64Array]",H="[object Int8Array]",Q="[object Int16Array]",nn="[object Int32Array]",tn="[object Uint8Array]",rn="[object Uint8ClampedArray]",en="[object Uint16Array]",un="[object Uint32Array]",on=/\b__p\+='';/g,fn=/\b(__p\+=)''\+/g,ln=/(__e\(.*?\)|\b__t\))\+'';/g,an=/&(?:amp|lt|gt|quot|#39|#96);/g,cn=/[&<>"'`]/g,sn=RegExp(an.source),pn=RegExp(cn.source),hn=/<%-([\s\S]+?)%>/g,_n=/<%([\s\S]+?)%>/g,vn=/<%=([\s\S]+?)%>/g,gn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,yn=/^\w*$/,dn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,mn=/[.*+?^${}()|[\]\/\\]/g,wn=RegExp(mn.source),bn=/[\u0300-\u036f\ufe20-\ufe23]/g,xn=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,An=/\w*$/,kn=/^0[xX]/,On=/^\[object .+?Constructor\]$/,Rn=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,In=/($^)/,En=/['\n\r\u2028\u2029\\]/g,Cn=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),Wn=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",Sn="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window".split(" "),Un={};
|
||||
Un[X]=Un[G]=Un[H]=Un[Q]=Un[nn]=Un[tn]=Un[rn]=Un[en]=Un[un]=true,Un[z]=Un[B]=Un[J]=Un[M]=Un[P]=Un[q]=Un[D]=Un["[object Map]"]=Un[K]=Un[Z]=Un[V]=Un["[object Set]"]=Un[Y]=Un["[object WeakMap]"]=false;var Tn={};Tn[z]=Tn[B]=Tn[J]=Tn[M]=Tn[P]=Tn[X]=Tn[G]=Tn[H]=Tn[Q]=Tn[nn]=Tn[K]=Tn[Z]=Tn[V]=Tn[Y]=Tn[tn]=Tn[rn]=Tn[en]=Tn[un]=true,Tn[q]=Tn[D]=Tn["[object Map]"]=Tn["[object Set]"]=Tn["[object WeakMap]"]=false;var $n={leading:false,maxWait:0,trailing:false},Fn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A",
|
||||
"\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u",
|
||||
"\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ln={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Nn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},zn={"function":true,object:true},Bn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,Pn=zn[typeof module]&&module&&!module.nodeType&&module,qn=zn[typeof self]&&self&&self.Object&&self,Dn=zn[typeof window]&&window&&window.Object&&window,Kn=Pn&&Pn.exports===Mn&&Mn,Zn=Mn&&Pn&&typeof global=="object"&&global&&global.Object&&global||Dn!==(this&&this.window)&&Dn||qn||this,Vn=d();
|
||||
typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=Vn, define(function(){return Vn})):Mn&&Pn?Kn?(Pn.exports=Vn)._=Vn:Mn._=Vn:Zn._=Vn}).call(this);
|
||||
5635
lodash.src.js
10
package.json
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"name": "lodash",
|
||||
"version": "3.0.1",
|
||||
"version": "3.9.0",
|
||||
"main": "lodash.src.js",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"curl-amd": "0.8.12",
|
||||
"dojo": "~1.10.2",
|
||||
"jquery": "~1.11.2",
|
||||
"dojo": "~1.10.0",
|
||||
"jquery": "~1.11.0",
|
||||
"platform": "~1.3.0",
|
||||
"qunit-extras": "~1.4.0",
|
||||
"qunitjs": "~1.16.0",
|
||||
"requirejs": "~2.1.15"
|
||||
"qunitjs": "~1.18.0",
|
||||
"requirejs": "~2.1.0"
|
||||
},
|
||||
"volo": {
|
||||
"type": "directory",
|
||||
|
||||
82
perf/perf.js
@@ -18,7 +18,7 @@
|
||||
params = root.arguments,
|
||||
system = root.system;
|
||||
|
||||
/** Add `console.log()` support for Narwhal, Rhino, and RingoJS. */
|
||||
/** Add `console.log()` support for Rhino and RingoJS. */
|
||||
var console = root.console || (root.console = { 'log': root.print });
|
||||
|
||||
/** The file path of the lodash file to test. */
|
||||
@@ -306,6 +306,10 @@
|
||||
}\
|
||||
var strNumbers = numbers + "";\
|
||||
\
|
||||
if (typeof assign != "undefined") {\
|
||||
var _assign = _.assign || _.extend,\
|
||||
lodashAssign = lodash.assign;\
|
||||
}\
|
||||
if (typeof bind != "undefined") {\
|
||||
var thisArg = { "name": "fred" };\
|
||||
\
|
||||
@@ -412,7 +416,7 @@
|
||||
}\
|
||||
if (typeof flatten != "undefined") {\
|
||||
var _flattenDeep = _.flatten([[1]])[0] !== 1,\
|
||||
lodashFlattenDeep = lodash.flatten([[1]]) !== 1;\
|
||||
lodashFlattenDeep = lodash.flatten([[1]])[0] !== 1;\
|
||||
}\
|
||||
if (typeof isEqual != "undefined") {\
|
||||
var objectOfPrimitives = {\
|
||||
@@ -458,10 +462,10 @@
|
||||
var source = { "num": 9 };\
|
||||
\
|
||||
var _findWhere = _.findWhere || _.find,\
|
||||
_match = (_.matches || _.createCallback || _.noop)(source);\
|
||||
_matcher = (_.matches || _.createCallback || _.noop)(source);\
|
||||
\
|
||||
var lodashFindWhere = lodash.findWhere || lodash.find,\
|
||||
lodashMatch = (lodash.matches || lodash.createCallback || lodash.noop)(source);\
|
||||
lodashMatcher = (lodash.matches || lodash.createCallback || lodash.noop)(source);\
|
||||
}\
|
||||
if (typeof multiArrays != "undefined") {\
|
||||
var twentyValues = belt.shuffle(belt.range(20)),\
|
||||
@@ -564,6 +568,32 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.assign`')
|
||||
.add(buildName, {
|
||||
'fn': 'lodashAssign({}, object)',
|
||||
'teardown': 'function assign(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_assign({}, object)',
|
||||
'teardown': 'function assign(){}'
|
||||
})
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.assign` with multiple sources')
|
||||
.add(buildName, {
|
||||
'fn': 'lodashAssign({}, object, object)',
|
||||
'teardown': 'function assign(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_assign({}, object, object)',
|
||||
'teardown': 'function assign(){}'
|
||||
})
|
||||
);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.bind` (slow path)')
|
||||
.add(buildName, {
|
||||
@@ -866,18 +896,6 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.extend`')
|
||||
.add(buildName, '\
|
||||
lodash.extend({}, object)'
|
||||
)
|
||||
.add(otherName, '\
|
||||
_.extend({}, object)'
|
||||
)
|
||||
);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.filter` iterating an array')
|
||||
.add(buildName, '\
|
||||
@@ -920,6 +938,18 @@
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.filter` with `_.matches` predicate')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.filter(objects, lodashMatcher)',
|
||||
'teardown': 'function matches(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.filter(objects, _matcher)',
|
||||
'teardown': 'function matches(){}'
|
||||
})
|
||||
);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
@@ -950,10 +980,10 @@
|
||||
)
|
||||
);
|
||||
|
||||
// Avoid Underscore induced `OutOfMemoryError` in Rhino, Narwhal, and Ringo.
|
||||
// Avoid Underscore induced `OutOfMemoryError` in Rhino and Ringo.
|
||||
if (!isJava) {
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.find` with `properties`')
|
||||
Benchmark.Suite('`_.find` with `_.matches` shorthand')
|
||||
.add(buildName, {
|
||||
'fn': 'lodashFindWhere(objects, source)',
|
||||
'teardown': 'function matches(){}'
|
||||
@@ -1206,7 +1236,7 @@
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.invoke` with a function for `methodName` iterating an array')
|
||||
Benchmark.Suite('`_.invoke` with a function for `path` iterating an array')
|
||||
.add(buildName, '\
|
||||
lodash.invoke(numbers, Number.prototype.toFixed, 1)'
|
||||
)
|
||||
@@ -1441,20 +1471,6 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.matches` predicate')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.filter(objects, lodashMatch)',
|
||||
'teardown': 'function matches(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.filter(objects, _match)',
|
||||
'teardown': 'function matches(){}'
|
||||
})
|
||||
);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.max`')
|
||||
.add(buildName, '\
|
||||
|
||||
@@ -9,17 +9,28 @@
|
||||
/** Used as the `Set#toString` return value. */
|
||||
var nativeString = String(Object.prototype.toString).replace(/toString/g, 'Set');
|
||||
|
||||
/** Used as a reference to the global object. */
|
||||
var root = (objectTypes[typeof window] && window) || this;
|
||||
|
||||
/** Detect free variable `exports`. */
|
||||
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
|
||||
|
||||
/** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */
|
||||
var freeGlobal = objectTypes[typeof global] && global;
|
||||
if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
|
||||
root = freeGlobal;
|
||||
}
|
||||
/** Detect free variable `module`. */
|
||||
var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
|
||||
|
||||
/** Detect free variable `global` from Node.js. */
|
||||
var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;
|
||||
|
||||
/** Detect free variable `self`. */
|
||||
var freeSelf = objectTypes[typeof self] && self && self.Object && self;
|
||||
|
||||
/** Detect free variable `window`. */
|
||||
var freeWindow = objectTypes[typeof window] && window && window.Object && window;
|
||||
|
||||
/**
|
||||
* Used as a reference to the global object.
|
||||
*
|
||||
* The `this` value is used if it is the global object to avoid Greasemonkey's
|
||||
* restricted `window` object, otherwise the `window` object is used.
|
||||
*/
|
||||
var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -9,17 +9,28 @@
|
||||
/** Used as the `WeakMap#toString` return value. */
|
||||
var nativeString = String(Object.prototype.toString).replace(/toString/g, 'WeakMap');
|
||||
|
||||
/** Used as a reference to the global object. */
|
||||
var root = (objectTypes[typeof window] && window) || this;
|
||||
|
||||
/** Detect free variable `exports`. */
|
||||
var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
|
||||
|
||||
/** Detect free variable `global` from Node.js or Browserified code and use it as `root`. */
|
||||
var freeGlobal = objectTypes[typeof global] && global;
|
||||
if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
|
||||
root = freeGlobal;
|
||||
}
|
||||
/** Detect free variable `module`. */
|
||||
var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
|
||||
|
||||
/** Detect free variable `global` from Node.js. */
|
||||
var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;
|
||||
|
||||
/** Detect free variable `self`. */
|
||||
var freeSelf = objectTypes[typeof self] && self && self.Object && self;
|
||||
|
||||
/** Detect free variable `window`. */
|
||||
var freeWindow = objectTypes[typeof window] && window && window.Object && window;
|
||||
|
||||
/**
|
||||
* Used as a reference to the global object.
|
||||
*
|
||||
* The `this` value is used if it is the global object to avoid Greasemonkey's
|
||||
* restricted `window` object, otherwise the `window` object is used.
|
||||
*/
|
||||
var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -6,14 +6,8 @@
|
||||
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture">
|
||||
<div id='testElement'>
|
||||
<h1>Test</h1>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// avoid reporting tests to Sauce Labs when script errors occur
|
||||
// Avoid reporting tests to Sauce Labs when script errors occur.
|
||||
if (location.port == '9001') {
|
||||
window.onerror = function(message) {
|
||||
if (window.QUnit) {
|
||||
@@ -42,25 +36,17 @@
|
||||
}());
|
||||
|
||||
QUnit.config.asyncRetries = 10;
|
||||
QUnit.config.hidepassed = true;
|
||||
|
||||
QUnit.begin(function() {
|
||||
QUnit.config.hidepassed = true;
|
||||
document.getElementById('qunit-tests').className += ' hidepass';
|
||||
document.getElementById('qunit-urlconfig-hidepassed').checked = true;
|
||||
});
|
||||
|
||||
// load lodash
|
||||
if (!ui.isModularize) {
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
}
|
||||
// load test scripts
|
||||
// Load test scripts.
|
||||
document.write(ui.urlParams.loader != 'none'
|
||||
? '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
|
||||
: ([
|
||||
'<script src="' + ui.buildPath + '"><\/script>',
|
||||
'<script src="../node_modules/jquery/dist/jquery.js"><\/script>',
|
||||
'<script src="../vendor/backbone/backbone.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/environment.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/setup/dom-setup.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/setup/environment.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/noconflict.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/events.js"><\/script>',
|
||||
'<script src="../vendor/backbone/test/model.js"><\/script>',
|
||||
@@ -100,7 +86,7 @@
|
||||
'name': 'test',
|
||||
'location': '../vendor/backbone/test',
|
||||
'config': {
|
||||
// work around no global being exported
|
||||
// Work around no global being exported.
|
||||
'exports': 'QUnit',
|
||||
'loader': 'curl/loader/legacy'
|
||||
}
|
||||
@@ -128,7 +114,8 @@
|
||||
window._ = lodash;
|
||||
}
|
||||
require(getConfig(), [
|
||||
'test/environment',
|
||||
'test/setup/dom-setup',
|
||||
'test/setup/environment',
|
||||
'test/noconflict',
|
||||
'test/events',
|
||||
'test/model',
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// avoid reporting tests to Sauce Labs when script errors occur
|
||||
// Avoid reporting tests to Sauce Labs when script errors occur.
|
||||
if (location.port == '9001') {
|
||||
window.onerror = function(message) {
|
||||
if (window.QUnit) {
|
||||
@@ -56,6 +56,7 @@
|
||||
fnToString = funcProto.toString,
|
||||
nativeString = fnToString.call(objectProto.toString),
|
||||
noop = function() {},
|
||||
parseInt = window.parseInt,
|
||||
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
||||
reToString = /toString/g,
|
||||
whitespace = ' \t\x0B\f\xA0\ufeff\n\r\u2028\u2029\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000';
|
||||
@@ -68,7 +69,7 @@
|
||||
function createToString(funcName) {
|
||||
return constant(nativeString.replace(reToString, funcName));
|
||||
}
|
||||
// allow bypassing native checks
|
||||
// Allow bypassing native checks.
|
||||
setProperty(funcProto, 'toString', (function() {
|
||||
function wrapper() {
|
||||
setProperty(funcProto, 'toString', fnToString);
|
||||
@@ -79,10 +80,10 @@
|
||||
return wrapper;
|
||||
}()));
|
||||
|
||||
// add extensions
|
||||
// Add prototype extensions.
|
||||
funcProto._method = noop;
|
||||
|
||||
// set bad shims
|
||||
// Set bad shims.
|
||||
setProperty(Array, '_isArray', Array.isArray);
|
||||
setProperty(Array, 'isArray', noop);
|
||||
|
||||
@@ -97,10 +98,10 @@
|
||||
|
||||
setProperty(objectProto, '_propertyIsEnumerable', propertyIsEnumerable);
|
||||
setProperty(objectProto, 'propertyIsEnumerable', function(key) {
|
||||
if (key == '1' && this && typeof this == 'object' && this.length === 2 &&
|
||||
if (key == '1' && this && typeof this == 'object' &&
|
||||
hasOwnProperty.call(this, 'callee') &&
|
||||
!propertyIsEnumerable.call(this, 'callee') &&
|
||||
this[0] === 0 && this[1] === 0) {
|
||||
this.length === 2 && this[0] === 1 && this[1] === 0) {
|
||||
throw new Error;
|
||||
}
|
||||
return propertyIsEnumerable.call(this, key);
|
||||
@@ -150,9 +151,9 @@
|
||||
setProperty(window, 'WeakMap', noop);
|
||||
|
||||
setProperty(window, '_parseInt', parseInt);
|
||||
setProperty(window, 'parseInt', (function(_parseInt) {
|
||||
setProperty(window, 'parseInt', (function() {
|
||||
var checkStr = whitespace + '08',
|
||||
isFaked = _parseInt(checkStr) != 8,
|
||||
isFaked = parseInt(checkStr) != 8,
|
||||
reHexPrefix = /^0[xX]/,
|
||||
reTrim = RegExp('^[' + whitespace + ']+|[' + whitespace + ']+$');
|
||||
|
||||
@@ -162,18 +163,18 @@
|
||||
return 0;
|
||||
}
|
||||
value = String(value == null ? '' : value).replace(reTrim, '');
|
||||
return _parseInt(value, +radix || (reHexPrefix.test(value) ? 16 : 10));
|
||||
return parseInt(value, +radix || (reHexPrefix.test(value) ? 16 : 10));
|
||||
};
|
||||
}(_parseInt)));
|
||||
}()));
|
||||
|
||||
// fake lack of DOM support
|
||||
// Fake lack of DOM support.
|
||||
setProperty(document, '_createDocumentFragment', document.createDocumentFragment);
|
||||
document.createDocumentFragment = noop;
|
||||
|
||||
// fake `WinRTError`
|
||||
// Fake `WinRTError`.
|
||||
setProperty(window, 'WinRTError', Error);
|
||||
|
||||
// fake free variable `global`
|
||||
// Fake free variable `global`.
|
||||
setProperty(window, 'exports', window);
|
||||
setProperty(window, 'global', window);
|
||||
setProperty(window, 'module', {});
|
||||
@@ -240,27 +241,26 @@
|
||||
|
||||
delete Array._isArray;
|
||||
delete Date._now;
|
||||
delete funcProto._method;
|
||||
delete Object._create;
|
||||
delete Object._getPrototypeOf;
|
||||
delete Object._keys;
|
||||
delete funcProto._method;
|
||||
delete objectProto._propertyIsEnumerable;
|
||||
}
|
||||
|
||||
// load lodash and expose it to the bad extensions/shims
|
||||
// Load lodash to expose it to the bad extensions/shims.
|
||||
if (!ui.isModularize) {
|
||||
addBizarroMethods();
|
||||
document.write('<script src="' + ui.buildPath + '"><\/script>');
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
// store lodash to test for bad extensions/shims
|
||||
// Store lodash to test for bad extensions/shims.
|
||||
if (!ui.isModularize) {
|
||||
var lodashBizarro = window._;
|
||||
window._ = undefined;
|
||||
removeBizarroMethods();
|
||||
}
|
||||
// load test scripts
|
||||
// Load test scripts.
|
||||
document.write((ui.isForeign || ui.urlParams.loader == 'none')
|
||||
? '<script src="' + ui.buildPath + '"><\/script><script src="test.js"><\/script>'
|
||||
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
|
||||
@@ -298,7 +298,7 @@
|
||||
'location': basePath + 'test',
|
||||
'main': 'test',
|
||||
'config': {
|
||||
// work around no global being exported
|
||||
// Work around no global being exported.
|
||||
'exports': 'QUnit',
|
||||
'loader': 'curl/loader/legacy'
|
||||
}
|
||||
@@ -389,7 +389,7 @@
|
||||
}
|
||||
}());
|
||||
|
||||
// set a more readable browser name
|
||||
// Set a more readable browser name.
|
||||
window.onload = function() {
|
||||
var timeoutId = setInterval(function() {
|
||||
var ua = document.getElementById('qunit-userAgent');
|
||||
|
||||
@@ -102,21 +102,20 @@ var browserNameMap = {
|
||||
|
||||
/** List of platforms to load the runner on. */
|
||||
var platforms = [
|
||||
['Linux', 'android', '4.3'],
|
||||
['Linux', 'android', '5.0'],
|
||||
['Linux', 'android', '4.4'],
|
||||
['Linux', 'android', '4.0'],
|
||||
['Windows 8.1', 'firefox', '35'],
|
||||
['Windows 8.1', 'firefox', '34'],
|
||||
['Windows 8.1', 'firefox', '37'],
|
||||
['Windows 8.1', 'firefox', '36'],
|
||||
['Windows 8.1', 'firefox', '20'],
|
||||
['Windows 8.1', 'chrome', '39'],
|
||||
['Windows 8.1', 'chrome', '38'],
|
||||
['Windows 8.1', 'chrome', '42'],
|
||||
['Windows 8.1', 'chrome', '41'],
|
||||
['Windows 8.1', 'internet explorer', '11'],
|
||||
['Windows 8', 'internet explorer', '10'],
|
||||
['Windows 7', 'internet explorer', '9'],
|
||||
['Windows 7', 'internet explorer', '8'],
|
||||
['Windows XP', 'internet explorer', '7'],
|
||||
['Windows XP', 'internet explorer', '6'],
|
||||
['Windows 7', 'opera', '12'],
|
||||
['Windows 7', 'opera', '11'],
|
||||
['OS X 10.9', 'ipad', '8.1'],
|
||||
['OS X 10.6', 'ipad', '4'],
|
||||
['OS X 10.10', 'safari', '8'],
|
||||
@@ -160,6 +159,7 @@ if (isBackbone) {
|
||||
|
||||
switch (browser) {
|
||||
case 'Firefox': return version >= 4;
|
||||
case 'Internet Explorer': return version >= 7;
|
||||
case 'iPad': return version >= 5;
|
||||
case 'Opera': return version >= 12;
|
||||
}
|
||||
@@ -542,9 +542,6 @@ function Job(properties) {
|
||||
EventEmitter.call(this);
|
||||
|
||||
this.options = {};
|
||||
this.retries = maxJobRetries;
|
||||
this.statusInterval = statusInterval;
|
||||
|
||||
_.merge(this, properties);
|
||||
_.defaults(this.options, _.cloneDeep(jobOptions));
|
||||
|
||||
@@ -705,7 +702,6 @@ Job.prototype.stop = function(callback) {
|
||||
function Tunnel(properties) {
|
||||
EventEmitter.call(this);
|
||||
|
||||
this.retries = maxTunnelRetries;
|
||||
_.merge(this, properties);
|
||||
|
||||
var active = [],
|
||||
|
||||
5707
test/test.js
@@ -4,23 +4,11 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Underscore Test Suite</title>
|
||||
<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
|
||||
<style>
|
||||
iframe {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<div id="qunit-fixture">
|
||||
<div id="map-test">
|
||||
<div id="id1"></div>
|
||||
<div id="id2"></div>
|
||||
</div>
|
||||
<img id="chart_image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">
|
||||
</div>
|
||||
<script>
|
||||
// avoid reporting tests to Sauce Labs when script errors occur
|
||||
// Avoid reporting tests to Sauce Labs when script errors occur.
|
||||
if (location.port == '9001') {
|
||||
window.onerror = function(message) {
|
||||
if (window.QUnit) {
|
||||
@@ -37,14 +25,9 @@
|
||||
<script src="./asset/test-ui.js"></script>
|
||||
<script>
|
||||
QUnit.config.asyncRetries = 10;
|
||||
QUnit.config.hidepassed = true;
|
||||
|
||||
QUnit.begin(function() {
|
||||
QUnit.config.hidepassed = true;
|
||||
$('#qunit-tests').addClass('hidepass');
|
||||
$('#qunit-urlconfig-hidepassed').prop('checked', true);
|
||||
});
|
||||
|
||||
// excuse tests we intentionally fail or those with problems
|
||||
// Excuse tests we intentionally fail or those with problems.
|
||||
QUnit.config.excused = {
|
||||
'Arrays': {
|
||||
'drop': [
|
||||
@@ -56,6 +39,7 @@
|
||||
'0'
|
||||
],
|
||||
'flatten': [
|
||||
'Flattens empty arrays',
|
||||
'can flatten nested arrays',
|
||||
'can shallowly flatten nested arrays',
|
||||
'works on an arguments object',
|
||||
@@ -67,9 +51,7 @@
|
||||
'initial works on arguments object'
|
||||
],
|
||||
'intersection': [
|
||||
'can perform an OO-style intersection',
|
||||
'returns an empty array when passed null as first argument',
|
||||
'returns an empty array when passed null as argument beyond the first'
|
||||
'can perform an OO-style intersection'
|
||||
],
|
||||
'last': [
|
||||
'can pass an index to last',
|
||||
@@ -88,12 +70,9 @@
|
||||
]
|
||||
},
|
||||
'Chaining': {
|
||||
'select/reject/sortBy': [
|
||||
'Died on test #1'
|
||||
],
|
||||
'select/reject/sortBy in functional style': [
|
||||
'Died on test #1'
|
||||
],
|
||||
'pop': true,
|
||||
'shift': true,
|
||||
'splice': true,
|
||||
'reverse/concat/unshift/pop/map': [
|
||||
'can chain together array functions.'
|
||||
]
|
||||
@@ -102,21 +81,18 @@
|
||||
'filter': [
|
||||
'OO-filter'
|
||||
],
|
||||
'invoke': [
|
||||
'handles null & undefined'
|
||||
],
|
||||
'map': [
|
||||
'OO-style doubled numbers'
|
||||
],
|
||||
'reduce': [
|
||||
'handles a null (without initial value) properly',
|
||||
'throws an error for empty arrays with no initial value'
|
||||
],
|
||||
'reduceRight': [
|
||||
'handles a null (without initial value) properly',
|
||||
'throws an error for empty arrays with no initial value'
|
||||
'Resistant to collection length and properties changing while iterating': [
|
||||
'Died on test #50'
|
||||
]
|
||||
},
|
||||
'Functions': {
|
||||
'bind': [
|
||||
'can bind without specifying a context',
|
||||
'Died on test #2'
|
||||
],
|
||||
'bindAll': [
|
||||
@@ -132,14 +108,29 @@
|
||||
'debounce asap': true
|
||||
},
|
||||
'Objects': {
|
||||
'#1929 Typed Array constructors are functions': true,
|
||||
'allKeys': true,
|
||||
'extendOwn': true,
|
||||
'mapObject': true,
|
||||
'matcher': true,
|
||||
'matcher ': true,
|
||||
'extend': [
|
||||
'extend copies all properties from source'
|
||||
],
|
||||
'isEqual': [
|
||||
'Died on test #60',
|
||||
'Died on test #63'
|
||||
'`0` is not equal to `-0`',
|
||||
'Commutative equality is implemented for `0` and `-0`',
|
||||
'`new Number(0)` and `-0` are not equal',
|
||||
'Commutative equality is implemented for `new Number(0)` and `-0`'
|
||||
],
|
||||
'isFinite': [
|
||||
'Numeric strings are numbers',
|
||||
'Number instances can be finite'
|
||||
],
|
||||
'isMatch': [
|
||||
'inherited and own properties are checked on the test object',
|
||||
'doesnt falsey match constructor on undefined/null'
|
||||
],
|
||||
'keys': [
|
||||
'is not fooled by sparse arrays; see issue #95',
|
||||
'[]'
|
||||
@@ -153,32 +144,21 @@
|
||||
'now': [
|
||||
'Produces the correct time in milliseconds'
|
||||
],
|
||||
'_.templateSettings.variable': [
|
||||
'"x"'
|
||||
],
|
||||
'times': [
|
||||
'Died on test #1',
|
||||
'works as a wrapper'
|
||||
],
|
||||
'uniqueId': [
|
||||
'Died on test #1'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
// only excuse in Sauce Labs (buggy Safari and timers)
|
||||
// Only excuse in Sauce Labs (buggy Safari and timers).
|
||||
if (!ui.isSauceLabs) {
|
||||
QUnit.config.excused.Utility.times.shift();
|
||||
delete QUnit.config.excused.Chaining['select/reject/sortBy'];
|
||||
delete QUnit.config.excused.Chaining['select/reject/sortBy in functional style'];
|
||||
delete QUnit.config.excused.Functions['throttle repeatedly with results'];
|
||||
delete QUnit.config.excused.Functions['more throttle does not trigger leading call when leading is set to false'];
|
||||
delete QUnit.config.excused.Functions['throttle does not trigger trailing call when trailing is set to false'];
|
||||
delete QUnit.config.excused.Functions['debounce asap'];
|
||||
delete QUnit.config.excused.Objects.isEqual;
|
||||
delete QUnit.config.excused.Utility.uniqueId;
|
||||
delete QUnit.config.excused.Utility.now;
|
||||
}
|
||||
// load test scripts
|
||||
// Load test scripts.
|
||||
document.write(ui.urlParams.loader != 'none'
|
||||
? '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
|
||||
: ([
|
||||
@@ -187,6 +167,7 @@
|
||||
'<script src="../vendor/underscore/test/arrays.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/functions.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/objects.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/cross-document.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/utility.js"><\/script>',
|
||||
'<script src="../vendor/underscore/test/chaining.js"><\/script>'
|
||||
].join('\n'))
|
||||
@@ -218,7 +199,7 @@
|
||||
'name': 'test',
|
||||
'location': '../vendor/underscore/test',
|
||||
'config': {
|
||||
// work around no global being exported
|
||||
// Work around no global being exported.
|
||||
'exports': 'QUnit',
|
||||
'loader': 'curl/loader/legacy'
|
||||
}
|
||||
@@ -248,6 +229,7 @@
|
||||
'test/arrays',
|
||||
'test/functions',
|
||||
'test/objects',
|
||||
'test/cross-document',
|
||||
'test/utility',
|
||||
'test/chaining'
|
||||
], function() {
|
||||
@@ -256,11 +238,5 @@
|
||||
});
|
||||
}());
|
||||
</script>
|
||||
<script type="text/html" id="template">
|
||||
<%
|
||||
// a comment
|
||||
if (data) { data += 12345; }; %>
|
||||
<li><%= data %></li>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
2
vendor/backbone/LICENSE
vendored
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2010-2014 Jeremy Ashkenas, DocumentCloud
|
||||
Copyright (c) 2010-2015 Jeremy Ashkenas, DocumentCloud
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
|
||||
938
vendor/backbone/backbone.js
vendored
344
vendor/backbone/test/collection.js
vendored
@@ -16,23 +16,20 @@
|
||||
|
||||
});
|
||||
|
||||
test("new and sort", 9, function() {
|
||||
test("new and sort", 6, function() {
|
||||
var counter = 0;
|
||||
col.on('sort', function(){ counter++; });
|
||||
equal(col.first(), a, "a should be first");
|
||||
equal(col.last(), d, "d should be last");
|
||||
deepEqual(col.pluck('label'), ['a', 'b', 'c', 'd']);
|
||||
col.comparator = function(a, b) {
|
||||
return a.id > b.id ? -1 : 1;
|
||||
};
|
||||
col.sort();
|
||||
equal(counter, 1);
|
||||
equal(col.first(), a, "a should be first");
|
||||
equal(col.last(), d, "d should be last");
|
||||
deepEqual(col.pluck('label'), ['a', 'b', 'c', 'd']);
|
||||
col.comparator = function(model) { return model.id; };
|
||||
col.sort();
|
||||
equal(counter, 2);
|
||||
equal(col.first(), d, "d should be first");
|
||||
equal(col.last(), a, "a should be last");
|
||||
deepEqual(col.pluck('label'), ['d', 'c', 'b', 'a']);
|
||||
equal(col.length, 4);
|
||||
});
|
||||
|
||||
@@ -60,6 +57,20 @@
|
||||
strictEqual(collection.last().get('a'), 4);
|
||||
});
|
||||
|
||||
test("clone preserves model and comparator", 3, function() {
|
||||
var Model = Backbone.Model.extend();
|
||||
var comparator = function(model){ return model.id; };
|
||||
|
||||
var collection = new Backbone.Collection([{id: 1}], {
|
||||
model: Model,
|
||||
comparator: comparator
|
||||
}).clone();
|
||||
collection.add({id: 2});
|
||||
ok(collection.at(0) instanceof Model);
|
||||
ok(collection.at(1) instanceof Model);
|
||||
strictEqual(collection.comparator, comparator);
|
||||
});
|
||||
|
||||
test("get", 6, function() {
|
||||
equal(col.get(0), d);
|
||||
equal(col.get(d.clone()), d);
|
||||
@@ -70,10 +81,9 @@
|
||||
});
|
||||
|
||||
test("get with non-default ids", 5, function() {
|
||||
var col = new Backbone.Collection();
|
||||
var MongoModel = Backbone.Model.extend({idAttribute: '_id'});
|
||||
var model = new MongoModel({_id: 100});
|
||||
col.add(model);
|
||||
var col = new Backbone.Collection([model], {model: MongoModel});
|
||||
equal(col.get(100), model);
|
||||
equal(col.get(model.cid), model);
|
||||
equal(col.get(model), model);
|
||||
@@ -88,7 +98,7 @@
|
||||
test('get with "undefined" id', function() {
|
||||
var collection = new Backbone.Collection([{id: 1}, {id: 'undefined'}]);
|
||||
equal(collection.get(1).id, 1);
|
||||
}),
|
||||
});
|
||||
|
||||
test("update index when id changes", 4, function() {
|
||||
var col = new Backbone.Collection();
|
||||
@@ -104,8 +114,9 @@
|
||||
equal(col.get(101).get('name'), 'dalmatians');
|
||||
});
|
||||
|
||||
test("at", 1, function() {
|
||||
test("at", 2, function() {
|
||||
equal(col.at(2), c);
|
||||
equal(col.at(-2), c);
|
||||
});
|
||||
|
||||
test("pluck", 1, function() {
|
||||
@@ -287,9 +298,10 @@
|
||||
deepEqual(col.pluck('id'), [1, 2, 3]);
|
||||
});
|
||||
|
||||
test("remove", 5, function() {
|
||||
test("remove", 7, function() {
|
||||
var removed = null;
|
||||
var otherRemoved = null;
|
||||
var result = null;
|
||||
col.on('remove', function(model, col, options) {
|
||||
removed = model.get('label');
|
||||
equal(options.index, 3);
|
||||
@@ -297,8 +309,12 @@
|
||||
otherCol.on('remove', function(model, col, options) {
|
||||
otherRemoved = true;
|
||||
});
|
||||
col.remove(d);
|
||||
result = col.remove(d);
|
||||
equal(removed, 'd');
|
||||
strictEqual(result, d);
|
||||
//if we try to remove d again, it's not going to actually get removed
|
||||
result = col.remove(d);
|
||||
strictEqual(result, undefined);
|
||||
equal(col.length, 3);
|
||||
equal(col.first(), a);
|
||||
equal(otherRemoved, null);
|
||||
@@ -464,6 +480,21 @@
|
||||
collection.fetch();
|
||||
});
|
||||
|
||||
test("#3283 - fetch with an error response calls error with context", 1, function () {
|
||||
var collection = new Backbone.Collection();
|
||||
var obj = {};
|
||||
var options = {
|
||||
context: obj,
|
||||
error: function() {
|
||||
equal(this, obj);
|
||||
}
|
||||
};
|
||||
collection.sync = function (method, model, options) {
|
||||
options.error.call(options.context);
|
||||
};
|
||||
collection.fetch(options);
|
||||
});
|
||||
|
||||
test("ensure fetch only parses once", 1, function() {
|
||||
var collection = new Backbone.Collection;
|
||||
var counter = 0;
|
||||
@@ -504,6 +535,30 @@
|
||||
equal(col.create({"foo":"bar"}, {validate:true}), false);
|
||||
});
|
||||
|
||||
test("create will pass extra options to success callback", 1, function () {
|
||||
var Model = Backbone.Model.extend({
|
||||
sync: function (method, model, options) {
|
||||
_.extend(options, {specialSync: true});
|
||||
return Backbone.Model.prototype.sync.call(this, method, model, options);
|
||||
}
|
||||
});
|
||||
|
||||
var Collection = Backbone.Collection.extend({
|
||||
model: Model,
|
||||
url: '/test'
|
||||
});
|
||||
|
||||
var collection = new Collection;
|
||||
|
||||
var success = function (model, response, options) {
|
||||
ok(options.specialSync, "Options were passed correctly to callback");
|
||||
};
|
||||
|
||||
collection.create({}, {success: success});
|
||||
this.ajaxSettings.success();
|
||||
|
||||
});
|
||||
|
||||
test("a failing create returns model with errors", function() {
|
||||
var ValidatingModel = Backbone.Model.extend({
|
||||
validate: function(attrs) {
|
||||
@@ -634,6 +689,16 @@
|
||||
});
|
||||
});
|
||||
|
||||
test("reset does not alter options by reference", 2, function() {
|
||||
var col = new Backbone.Collection([{id:1}]);
|
||||
var origOpts = {};
|
||||
col.on("reset", function(col, opts){
|
||||
equal(origOpts.previousModels, undefined);
|
||||
equal(opts.previousModels[0].id, 1);
|
||||
});
|
||||
col.reset([], origOpts);
|
||||
});
|
||||
|
||||
test("trigger custom events on models", 1, function() {
|
||||
var fired = null;
|
||||
a.on("custom", function() { fired = true; });
|
||||
@@ -672,22 +737,22 @@
|
||||
equal(col.length, 0);
|
||||
});
|
||||
|
||||
test("#861, adding models to a collection which do not pass validation, with validate:true", function() {
|
||||
var Model = Backbone.Model.extend({
|
||||
validate: function(attrs) {
|
||||
if (attrs.id == 3) return "id can't be 3";
|
||||
}
|
||||
});
|
||||
test("#861, adding models to a collection which do not pass validation, with validate:true", 2, function() {
|
||||
var Model = Backbone.Model.extend({
|
||||
validate: function(attrs) {
|
||||
if (attrs.id == 3) return "id can't be 3";
|
||||
}
|
||||
});
|
||||
|
||||
var Collection = Backbone.Collection.extend({
|
||||
model: Model
|
||||
});
|
||||
var Collection = Backbone.Collection.extend({
|
||||
model: Model
|
||||
});
|
||||
|
||||
var collection = new Collection;
|
||||
collection.on("error", function() { ok(true); });
|
||||
var collection = new Collection;
|
||||
collection.on("invalid", function() { ok(true); });
|
||||
|
||||
collection.add([{id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}, {id: 6}], {validate:true});
|
||||
deepEqual(collection.pluck('id'), [1, 2, 4, 5, 6]);
|
||||
collection.add([{id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}, {id: 6}], {validate:true});
|
||||
deepEqual(collection.pluck("id"), [1, 2, 4, 5, 6]);
|
||||
});
|
||||
|
||||
test("Invalid models are discarded with validate:true.", 5, function() {
|
||||
@@ -756,12 +821,13 @@
|
||||
var m = new Backbone.Model({x:1});
|
||||
var col = new Backbone.Collection();
|
||||
var opts = {
|
||||
success: function(collection, resp, options){
|
||||
ok(options);
|
||||
opts: true,
|
||||
success: function(collection, resp, options) {
|
||||
ok(options.opts);
|
||||
}
|
||||
};
|
||||
col.sync = m.sync = function( method, collection, options ){
|
||||
options.success(collection, [], options);
|
||||
options.success({});
|
||||
};
|
||||
col.fetch(opts);
|
||||
col.create(m, opts);
|
||||
@@ -791,6 +857,24 @@
|
||||
collection.off();
|
||||
});
|
||||
|
||||
test("#3283 - fetch, create calls success with context", 2, function() {
|
||||
var collection = new Backbone.Collection;
|
||||
collection.url = '/test';
|
||||
Backbone.ajax = function(settings) {
|
||||
settings.success.call(settings.context);
|
||||
};
|
||||
var obj = {};
|
||||
var options = {
|
||||
context: obj,
|
||||
success: function() {
|
||||
equal(this, obj);
|
||||
}
|
||||
};
|
||||
|
||||
collection.fetch(options);
|
||||
collection.create({id: 1}, options);
|
||||
});
|
||||
|
||||
test("#1447 - create with wait adds model.", 1, function() {
|
||||
var collection = new Backbone.Collection;
|
||||
var model = new Backbone.Model;
|
||||
@@ -1085,9 +1169,7 @@
|
||||
test("#1894 - Push should not trigger a sort", 0, function() {
|
||||
var Collection = Backbone.Collection.extend({
|
||||
comparator: 'id',
|
||||
sort: function() {
|
||||
ok(false);
|
||||
}
|
||||
sort: function() { ok(false); }
|
||||
});
|
||||
new Collection().push({id: 1});
|
||||
});
|
||||
@@ -1111,7 +1193,7 @@
|
||||
test("#1894 - `sort` can optionally be turned off", 0, function() {
|
||||
var Collection = Backbone.Collection.extend({
|
||||
comparator: 'id',
|
||||
sort: function() { ok(true); }
|
||||
sort: function() { ok(false); }
|
||||
});
|
||||
new Collection().add({id: 1}, {sort: false});
|
||||
});
|
||||
@@ -1146,6 +1228,25 @@
|
||||
Backbone.ajax = ajax;
|
||||
});
|
||||
|
||||
test("fetch will pass extra options to success callback", 1, function () {
|
||||
var SpecialSyncCollection = Backbone.Collection.extend({
|
||||
url: '/test',
|
||||
sync: function (method, collection, options) {
|
||||
_.extend(options, { specialSync: true });
|
||||
return Backbone.Collection.prototype.sync.call(this, method, collection, options);
|
||||
}
|
||||
});
|
||||
|
||||
var collection = new SpecialSyncCollection();
|
||||
|
||||
var onSuccess = function (collection, resp, options) {
|
||||
ok(options.specialSync, "Options were passed correctly to callback");
|
||||
};
|
||||
|
||||
collection.fetch({ success: onSuccess });
|
||||
this.ajaxSettings.success();
|
||||
});
|
||||
|
||||
test("`add` only `sort`s when necessary", 2, function () {
|
||||
var collection = new (Backbone.Collection.extend({
|
||||
comparator: 'a'
|
||||
@@ -1175,15 +1276,15 @@
|
||||
});
|
||||
|
||||
test("Attach options to collection.", 2, function() {
|
||||
var model = new Backbone.Model;
|
||||
var Model = Backbone.Model;
|
||||
var comparator = function(){};
|
||||
|
||||
var collection = new Backbone.Collection([], {
|
||||
model: model,
|
||||
model: Model,
|
||||
comparator: comparator
|
||||
});
|
||||
|
||||
ok(collection.model === model);
|
||||
ok(collection.model === Model);
|
||||
ok(collection.comparator === comparator);
|
||||
});
|
||||
|
||||
@@ -1309,7 +1410,7 @@
|
||||
equal(this._byId[model.id], void 0);
|
||||
equal(this._byId[model.cid], void 0);
|
||||
equal(model.collection, void 0);
|
||||
equal(model._events.all, void 0);
|
||||
equal(model._events, void 0);
|
||||
}
|
||||
|
||||
});
|
||||
@@ -1335,4 +1436,173 @@
|
||||
equal(c.models.length, 1);
|
||||
});
|
||||
|
||||
test('#3020: #set with {add: false} should not throw.', 2, function() {
|
||||
var collection = new Backbone.Collection;
|
||||
collection.set([{id: 1}], {add: false});
|
||||
strictEqual(collection.length, 0);
|
||||
strictEqual(collection.models.length, 0);
|
||||
});
|
||||
|
||||
test("create with wait, model instance, #3028", 1, function() {
|
||||
var collection = new Backbone.Collection();
|
||||
var model = new Backbone.Model({id: 1});
|
||||
model.sync = function(){
|
||||
equal(this.collection, collection);
|
||||
};
|
||||
collection.create(model, {wait: true});
|
||||
});
|
||||
|
||||
test("modelId", function() {
|
||||
var Stooge = Backbone.Model.extend();
|
||||
var StoogeCollection = Backbone.Collection.extend({model: Stooge});
|
||||
|
||||
// Default to using `Collection::model::idAttribute`.
|
||||
equal(StoogeCollection.prototype.modelId({id: 1}), 1);
|
||||
Stooge.prototype.idAttribute = '_id';
|
||||
equal(StoogeCollection.prototype.modelId({_id: 1}), 1);
|
||||
});
|
||||
|
||||
test('Polymorphic models work with "simple" constructors', function () {
|
||||
var A = Backbone.Model.extend();
|
||||
var B = Backbone.Model.extend();
|
||||
var C = Backbone.Collection.extend({
|
||||
model: function (attrs) {
|
||||
return attrs.type === 'a' ? new A(attrs) : new B(attrs);
|
||||
}
|
||||
});
|
||||
var collection = new C([{id: 1, type: 'a'}, {id: 2, type: 'b'}]);
|
||||
equal(collection.length, 2);
|
||||
ok(collection.at(0) instanceof A);
|
||||
equal(collection.at(0).id, 1);
|
||||
ok(collection.at(1) instanceof B);
|
||||
equal(collection.at(1).id, 2);
|
||||
});
|
||||
|
||||
test('Polymorphic models work with "advanced" constructors', function () {
|
||||
var A = Backbone.Model.extend({idAttribute: '_id'});
|
||||
var B = Backbone.Model.extend({idAttribute: '_id'});
|
||||
var C = Backbone.Collection.extend({
|
||||
model: Backbone.Model.extend({
|
||||
constructor: function (attrs) {
|
||||
return attrs.type === 'a' ? new A(attrs) : new B(attrs);
|
||||
},
|
||||
|
||||
idAttribute: '_id'
|
||||
})
|
||||
});
|
||||
var collection = new C([{_id: 1, type: 'a'}, {_id: 2, type: 'b'}]);
|
||||
equal(collection.length, 2);
|
||||
ok(collection.at(0) instanceof A);
|
||||
equal(collection.at(0), collection.get(1));
|
||||
ok(collection.at(1) instanceof B);
|
||||
equal(collection.at(1), collection.get(2));
|
||||
|
||||
C = Backbone.Collection.extend({
|
||||
model: function (attrs) {
|
||||
return attrs.type === 'a' ? new A(attrs) : new B(attrs);
|
||||
},
|
||||
|
||||
modelId: function (attrs) {
|
||||
return attrs.type + '-' + attrs.id;
|
||||
}
|
||||
});
|
||||
collection = new C([{id: 1, type: 'a'}, {id: 1, type: 'b'}]);
|
||||
equal(collection.length, 2);
|
||||
ok(collection.at(0) instanceof A);
|
||||
equal(collection.at(0), collection.get('a-1'));
|
||||
ok(collection.at(1) instanceof B);
|
||||
equal(collection.at(1), collection.get('b-1'));
|
||||
});
|
||||
|
||||
test("#3039: adding at index fires with correct at", 3, function() {
|
||||
var col = new Backbone.Collection([{at: 0}, {at: 4}]);
|
||||
col.on('add', function(model, col, options) {
|
||||
equal(model.get('at'), options.index);
|
||||
});
|
||||
col.add([{at: 1}, {at: 2}, {at: 3}], {at: 1});
|
||||
});
|
||||
|
||||
test("#3039: index is not sent when at is not specified", 2, function() {
|
||||
var col = new Backbone.Collection([{at: 0}]);
|
||||
col.on('add', function(model, col, options) {
|
||||
equal(undefined, options.index);
|
||||
});
|
||||
col.add([{at: 1}, {at: 2}]);
|
||||
});
|
||||
|
||||
test('#3199 - Order changing should trigger a sort', 1, function() {
|
||||
var one = new Backbone.Model({id: 1});
|
||||
var two = new Backbone.Model({id: 2});
|
||||
var three = new Backbone.Model({id: 3});
|
||||
var collection = new Backbone.Collection([one, two, three]);
|
||||
collection.on('sort', function() {
|
||||
ok(true);
|
||||
});
|
||||
collection.set([{id: 3}, {id: 2}, {id: 1}]);
|
||||
});
|
||||
|
||||
test('#3199 - Adding a model should trigger a sort', 1, function() {
|
||||
var one = new Backbone.Model({id: 1});
|
||||
var two = new Backbone.Model({id: 2});
|
||||
var three = new Backbone.Model({id: 3});
|
||||
var collection = new Backbone.Collection([one, two, three]);
|
||||
collection.on('sort', function() {
|
||||
ok(true);
|
||||
});
|
||||
collection.set([{id: 3}, {id: 2}, {id: 1}, {id: 0}]);
|
||||
})
|
||||
|
||||
test('#3199 - Order not changing should not trigger a sort', 0, function() {
|
||||
var one = new Backbone.Model({id: 1});
|
||||
var two = new Backbone.Model({id: 2});
|
||||
var three = new Backbone.Model({id: 3});
|
||||
var collection = new Backbone.Collection([one, two, three]);
|
||||
collection.on('sort', function() {
|
||||
ok(false);
|
||||
});
|
||||
collection.set([{id: 1}, {id: 2}, {id: 3}]);
|
||||
});
|
||||
|
||||
test("add supports negative indexes", 1, function() {
|
||||
var collection = new Backbone.Collection([{id: 1}]);
|
||||
collection.add([{id: 2}, {id: 3}], {at: -1});
|
||||
collection.add([{id: 2.5}], {at: -2});
|
||||
equal(collection.pluck('id').join(','), "1,2,2.5,3");
|
||||
});
|
||||
|
||||
test("#set accepts options.at as a string", 1, function() {
|
||||
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
|
||||
collection.add([{id: 3}], {at: '1'});
|
||||
deepEqual(collection.pluck('id'), [1, 3, 2]);
|
||||
});
|
||||
test("adding multiple models triggers `set` event once", 1, function() {
|
||||
var collection = new Backbone.Collection;
|
||||
collection.on('update', function() { ok(true); });
|
||||
collection.add([{id: 1}, {id: 2}, {id: 3}]);
|
||||
});
|
||||
|
||||
test("removing models triggers `set` event once", 1, function() {
|
||||
var collection = new Backbone.Collection([{id: 1}, {id: 2}, {id: 3}]);
|
||||
collection.on('update', function() { ok(true); });
|
||||
collection.remove([{id: 1}, {id: 2}]);
|
||||
});
|
||||
|
||||
test("remove does not trigger `set` when nothing removed", 0, function() {
|
||||
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
|
||||
collection.on('update', function() { ok(false); });
|
||||
collection.remove([{id: 3}]);
|
||||
});
|
||||
|
||||
test("set triggers `set` event once", 1, function() {
|
||||
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
|
||||
collection.on('update', function() { ok(true); });
|
||||
collection.set([{id: 1}, {id: 3}]);
|
||||
});
|
||||
|
||||
test("set does not trigger `set` event when nothing added nor removed", 0, function() {
|
||||
var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
|
||||
collection.on('update', function() { ok(false); });
|
||||
collection.set([{id: 1}, {id: 2}]);
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
143
vendor/backbone/test/events.js
vendored
@@ -106,6 +106,19 @@
|
||||
b.trigger('event2');
|
||||
});
|
||||
|
||||
test("listenToOnce", 2, function() {
|
||||
// Same as the previous test, but we use once rather than having to explicitly unbind
|
||||
var obj = { counterA: 0, counterB: 0 };
|
||||
_.extend(obj, Backbone.Events);
|
||||
var incrA = function(){ obj.counterA += 1; obj.trigger('event'); };
|
||||
var incrB = function(){ obj.counterB += 1; };
|
||||
obj.listenToOnce(obj, 'event', incrA);
|
||||
obj.listenToOnce(obj, 'event', incrB);
|
||||
obj.trigger('event');
|
||||
equal(obj.counterA, 1, 'counterA should have only been incremented once.');
|
||||
equal(obj.counterB, 1, 'counterB should have only been incremented once.');
|
||||
});
|
||||
|
||||
test("listenToOnce and stopListening", 1, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
@@ -152,18 +165,72 @@
|
||||
e.trigger("foo");
|
||||
});
|
||||
|
||||
test("stopListening cleans up references", 4, function() {
|
||||
test("stopListening cleans up references", 12, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
var fn = function() {};
|
||||
a.listenTo(b, 'all', fn).stopListening();
|
||||
b.on('event', fn);
|
||||
a.listenTo(b, 'event', fn).stopListening();
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
a.listenTo(b, 'all', fn).stopListening(b);
|
||||
equal(_.size(b._events.event), 1);
|
||||
equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn).stopListening(b);
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
a.listenTo(b, 'all', fn).stopListening(null, 'all');
|
||||
equal(_.size(b._events.event), 1);
|
||||
equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn).stopListening(b, 'event');
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
a.listenTo(b, 'all', fn).stopListening(null, null, fn);
|
||||
equal(_.size(b._events.event), 1);
|
||||
equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn).stopListening(b, 'event', fn);
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
equal(_.size(b._events.event), 1);
|
||||
equal(_.size(b._listeners), 0);
|
||||
});
|
||||
|
||||
test("stopListening cleans up references from listenToOnce", 12, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
var fn = function() {};
|
||||
b.on('event', fn);
|
||||
a.listenToOnce(b, 'event', fn).stopListening();
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
equal(_.size(b._events.event), 1);
|
||||
equal(_.size(b._listeners), 0);
|
||||
a.listenToOnce(b, 'event', fn).stopListening(b);
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
equal(_.size(b._events.event), 1);
|
||||
equal(_.size(b._listeners), 0);
|
||||
a.listenToOnce(b, 'event', fn).stopListening(b, 'event');
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
equal(_.size(b._events.event), 1);
|
||||
equal(_.size(b._listeners), 0);
|
||||
a.listenToOnce(b, 'event', fn).stopListening(b, 'event', fn);
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
equal(_.size(b._events.event), 1);
|
||||
equal(_.size(b._listeners), 0);
|
||||
});
|
||||
|
||||
test("listenTo and off cleaning up references", 8, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
var fn = function() {};
|
||||
a.listenTo(b, 'event', fn);
|
||||
b.off();
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn);
|
||||
b.off('event');
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn);
|
||||
b.off(null, fn);
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
equal(_.size(b._listeners), 0);
|
||||
a.listenTo(b, 'event', fn);
|
||||
b.off(null, null, a);
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
equal(_.size(b._listeners), 0);
|
||||
});
|
||||
|
||||
test("listenTo and stopListening cleaning up references", 2, function() {
|
||||
@@ -174,7 +241,36 @@
|
||||
a.listenTo(b, 'other', function(){ ok(false); });
|
||||
a.stopListening(b, 'other');
|
||||
a.stopListening(b, 'all');
|
||||
equal(_.keys(a._listeningTo).length, 0);
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
});
|
||||
|
||||
test("listenToOnce without context cleans up references after the event has fired", 2, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenToOnce(b, 'all', function(){ ok(true); });
|
||||
b.trigger('anything');
|
||||
equal(_.size(a._listeningTo), 0);
|
||||
});
|
||||
|
||||
test("listenToOnce with event maps cleans up references", 2, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenToOnce(b, {
|
||||
one: function() { ok(true); },
|
||||
two: function() { ok(false); }
|
||||
});
|
||||
b.trigger('one');
|
||||
equal(_.size(a._listeningTo), 1);
|
||||
});
|
||||
|
||||
test("listenToOnce with event maps binds the correct `this`", 1, function() {
|
||||
var a = _.extend({}, Backbone.Events);
|
||||
var b = _.extend({}, Backbone.Events);
|
||||
a.listenToOnce(b, {
|
||||
one: function() { ok(this === a); },
|
||||
two: function() { ok(false); }
|
||||
});
|
||||
b.trigger('one');
|
||||
});
|
||||
|
||||
test("listenTo with empty callback doesn't throw an error", 1, function(){
|
||||
@@ -277,15 +373,14 @@
|
||||
test("callback list is not altered during trigger", 2, function () {
|
||||
var counter = 0, obj = _.extend({}, Backbone.Events);
|
||||
var incr = function(){ counter++; };
|
||||
obj.on('event', function(){ obj.on('event', incr).on('all', incr); })
|
||||
.trigger('event');
|
||||
equal(counter, 0, 'bind does not alter callback list');
|
||||
obj.off()
|
||||
.on('event', function(){ obj.off('event', incr).off('all', incr); })
|
||||
.on('event', incr)
|
||||
.on('all', incr)
|
||||
.trigger('event');
|
||||
equal(counter, 2, 'unbind does not alter callback list');
|
||||
var incrOn = function(){ obj.on('event all', incr); };
|
||||
var incrOff = function(){ obj.off('event all', incr); };
|
||||
|
||||
obj.on('event all', incrOn).trigger('event');
|
||||
equal(counter, 0, 'on does not alter callback list');
|
||||
|
||||
obj.off().on('event', incrOff).on('event all', incr).trigger('event');
|
||||
equal(counter, 2, 'off does not alter callback list');
|
||||
});
|
||||
|
||||
test("#1282 - 'all' callback list is retrieved after each event.", 1, function() {
|
||||
@@ -305,7 +400,7 @@
|
||||
|
||||
test("if callback is truthy but not a function, `on` should throw an error just like jQuery", 1, function() {
|
||||
var view = _.extend({}, Backbone.Events).on('test', 'noop');
|
||||
raises(function() {
|
||||
throws(function() {
|
||||
view.trigger('test');
|
||||
});
|
||||
});
|
||||
@@ -457,6 +552,11 @@
|
||||
_.extend({}, Backbone.Events).once('event').trigger('event');
|
||||
});
|
||||
|
||||
test("listenToOnce without a callback is a noop", 0, function() {
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
obj.listenToOnce(obj, 'event').trigger('event');
|
||||
});
|
||||
|
||||
test("event functions are chainable", function() {
|
||||
var obj = _.extend({}, Backbone.Events);
|
||||
var obj2 = _.extend({}, Backbone.Events);
|
||||
@@ -474,4 +574,15 @@
|
||||
equal(obj, obj.stopListening());
|
||||
});
|
||||
|
||||
test("#3448 - listenToOnce with space-separated events", 2, function() {
|
||||
var one = _.extend({}, Backbone.Events);
|
||||
var two = _.extend({}, Backbone.Events);
|
||||
var count = 1;
|
||||
one.listenToOnce(two, 'x y', function(n) { ok(n === count++); });
|
||||
two.trigger('x', 1);
|
||||
two.trigger('x', 1);
|
||||
two.trigger('y', 2);
|
||||
two.trigger('y', 2);
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
173
vendor/backbone/test/model.js
vendored
@@ -83,7 +83,7 @@
|
||||
doc.collection.url = '/collection/';
|
||||
equal(doc.url(), '/collection/1-the-tempest');
|
||||
doc.collection = null;
|
||||
raises(function() { doc.url(); });
|
||||
throws(function() { doc.url(); });
|
||||
doc.collection = collection;
|
||||
});
|
||||
|
||||
@@ -120,6 +120,11 @@
|
||||
deepEqual(model.omit('foo', 'bar'), {'baz': 'c'});
|
||||
});
|
||||
|
||||
test("chain", function() {
|
||||
var model = new Backbone.Model({ a: 0, b: 1, c: 2 });
|
||||
deepEqual(model.chain().pick("a", "b", "c").values().compact().value(), [1, 2]);
|
||||
});
|
||||
|
||||
test("clone", 10, function() {
|
||||
var a = new Backbone.Model({ 'foo': 1, 'bar': 2, 'baz': 3});
|
||||
var b = a.clone();
|
||||
@@ -199,6 +204,32 @@
|
||||
strictEqual(model.has('undefined'), false);
|
||||
});
|
||||
|
||||
test("matches", 4, function() {
|
||||
var model = new Backbone.Model();
|
||||
|
||||
strictEqual(model.matches({'name': 'Jonas', 'cool': true}), false);
|
||||
|
||||
model.set({name: 'Jonas', 'cool': true});
|
||||
|
||||
strictEqual(model.matches({'name': 'Jonas'}), true);
|
||||
strictEqual(model.matches({'name': 'Jonas', 'cool': true}), true);
|
||||
strictEqual(model.matches({'name': 'Jonas', 'cool': false}), false);
|
||||
});
|
||||
|
||||
test("matches with predicate", function() {
|
||||
var model = new Backbone.Model({a: 0});
|
||||
|
||||
strictEqual(model.matches(function(attr) {
|
||||
return attr.a > 1 && attr.b != null;
|
||||
}), false);
|
||||
|
||||
model.set({a: 3, b: true});
|
||||
|
||||
strictEqual(model.matches(function(attr) {
|
||||
return attr.a > 1 && attr.b != null;
|
||||
}), true);
|
||||
})
|
||||
|
||||
test("set and unset", 8, function() {
|
||||
var a = new Backbone.Model({id: 'id', foo: 1, bar: 2, baz: 3});
|
||||
var changeCount = 0;
|
||||
@@ -312,6 +343,31 @@
|
||||
equal(model.isNew(), true);
|
||||
});
|
||||
|
||||
test("setting an alternative cid prefix", 4, function() {
|
||||
var Model = Backbone.Model.extend({
|
||||
cidPrefix: 'm'
|
||||
});
|
||||
var model = new Model();
|
||||
|
||||
equal(model.cid.charAt(0), 'm');
|
||||
|
||||
model = new Backbone.Model();
|
||||
equal(model.cid.charAt(0), 'c');
|
||||
|
||||
var Collection = Backbone.Collection.extend({
|
||||
model: Model
|
||||
});
|
||||
var collection = new Collection([{id: 'c5'}, {id: 'c6'}, {id: 'c7'}]);
|
||||
|
||||
equal(collection.get('c6').cid.charAt(0), 'm');
|
||||
collection.set([{id: 'c6', value: 'test'}], {
|
||||
merge: true,
|
||||
add: true,
|
||||
remove: false
|
||||
});
|
||||
ok(collection.get('c6').has('value'));
|
||||
});
|
||||
|
||||
test("set an empty string", 1, function() {
|
||||
var model = new Backbone.Model({name : "Model"});
|
||||
model.set({name : ''});
|
||||
@@ -460,6 +516,40 @@
|
||||
model.destroy();
|
||||
});
|
||||
|
||||
test("#3283 - save, fetch, destroy calls success with context", 3, function () {
|
||||
var model = new Backbone.Model();
|
||||
var obj = {};
|
||||
var options = {
|
||||
context: obj,
|
||||
success: function() {
|
||||
equal(this, obj);
|
||||
}
|
||||
};
|
||||
model.sync = function (method, model, options) {
|
||||
options.success.call(options.context);
|
||||
};
|
||||
model.save({data: 2, id: 1}, options);
|
||||
model.fetch(options);
|
||||
model.destroy(options);
|
||||
});
|
||||
|
||||
test("#3283 - save, fetch, destroy calls error with context", 3, function () {
|
||||
var model = new Backbone.Model();
|
||||
var obj = {};
|
||||
var options = {
|
||||
context: obj,
|
||||
error: function() {
|
||||
equal(this, obj);
|
||||
}
|
||||
};
|
||||
model.sync = function (method, model, options) {
|
||||
options.error.call(options.context);
|
||||
};
|
||||
model.save({data: 2, id: 1}, options);
|
||||
model.fetch(options);
|
||||
model.destroy(options);
|
||||
});
|
||||
|
||||
test("save with PATCH", function() {
|
||||
doc.clear().set({id: 1, a: 1, b: 2, c: 3, d: 4});
|
||||
doc.save();
|
||||
@@ -474,6 +564,14 @@
|
||||
equal(this.ajaxSettings.data, "{\"b\":2,\"d\":4}");
|
||||
});
|
||||
|
||||
test("save with PATCH and different attrs", function() {
|
||||
doc.clear().save({b: 2, d: 4}, {patch: true, attrs: {B: 1, D: 3}});
|
||||
equal(this.syncArgs.options.attrs.D, 3);
|
||||
equal(this.syncArgs.options.attrs.d, undefined);
|
||||
equal(this.ajaxSettings.data, "{\"B\":1,\"D\":3}");
|
||||
deepEqual(doc.attributes, {b: 2, d: 4});
|
||||
});
|
||||
|
||||
test("save in positional style", 1, function() {
|
||||
var model = new Backbone.Model();
|
||||
model.sync = function(method, model, options) {
|
||||
@@ -496,12 +594,59 @@
|
||||
});
|
||||
});
|
||||
|
||||
test("save with wait and supplied id", function() {
|
||||
var Model = Backbone.Model.extend({
|
||||
urlRoot: '/collection'
|
||||
});
|
||||
var model = new Model();
|
||||
model.save({id: 42}, {wait: true});
|
||||
equal(this.ajaxSettings.url, '/collection/42');
|
||||
});
|
||||
|
||||
test("save will pass extra options to success callback", 1, function () {
|
||||
var SpecialSyncModel = Backbone.Model.extend({
|
||||
sync: function (method, model, options) {
|
||||
_.extend(options, { specialSync: true });
|
||||
return Backbone.Model.prototype.sync.call(this, method, model, options);
|
||||
},
|
||||
urlRoot: '/test'
|
||||
});
|
||||
|
||||
var model = new SpecialSyncModel();
|
||||
|
||||
var onSuccess = function (model, response, options) {
|
||||
ok(options.specialSync, "Options were passed correctly to callback");
|
||||
};
|
||||
|
||||
model.save(null, { success: onSuccess });
|
||||
this.ajaxSettings.success();
|
||||
});
|
||||
|
||||
test("fetch", 2, function() {
|
||||
doc.fetch();
|
||||
equal(this.syncArgs.method, 'read');
|
||||
ok(_.isEqual(this.syncArgs.model, doc));
|
||||
});
|
||||
|
||||
test("fetch will pass extra options to success callback", 1, function () {
|
||||
var SpecialSyncModel = Backbone.Model.extend({
|
||||
sync: function (method, model, options) {
|
||||
_.extend(options, { specialSync: true });
|
||||
return Backbone.Model.prototype.sync.call(this, method, model, options);
|
||||
},
|
||||
urlRoot: '/test'
|
||||
});
|
||||
|
||||
var model = new SpecialSyncModel();
|
||||
|
||||
var onSuccess = function (model, response, options) {
|
||||
ok(options.specialSync, "Options were passed correctly to callback");
|
||||
};
|
||||
|
||||
model.fetch({ success: onSuccess });
|
||||
this.ajaxSettings.success();
|
||||
});
|
||||
|
||||
test("destroy", 3, function() {
|
||||
doc.destroy();
|
||||
equal(this.syncArgs.method, 'delete');
|
||||
@@ -511,6 +656,25 @@
|
||||
equal(newModel.destroy(), false);
|
||||
});
|
||||
|
||||
test("destroy will pass extra options to success callback", 1, function () {
|
||||
var SpecialSyncModel = Backbone.Model.extend({
|
||||
sync: function (method, model, options) {
|
||||
_.extend(options, { specialSync: true });
|
||||
return Backbone.Model.prototype.sync.call(this, method, model, options);
|
||||
},
|
||||
urlRoot: '/test'
|
||||
});
|
||||
|
||||
var model = new SpecialSyncModel({ id: 'id' });
|
||||
|
||||
var onSuccess = function (model, response, options) {
|
||||
ok(options.specialSync, "Options were passed correctly to callback");
|
||||
};
|
||||
|
||||
model.destroy({ success: onSuccess });
|
||||
this.ajaxSettings.success();
|
||||
});
|
||||
|
||||
test("non-persisted destroy", 1, function() {
|
||||
var a = new Backbone.Model({ 'foo': 1, 'bar': 2, 'baz': 3});
|
||||
a.sync = function() { throw "should not be called"; };
|
||||
@@ -967,11 +1131,14 @@
|
||||
model.destroy();
|
||||
});
|
||||
|
||||
test("#1365 - Destroy: New models execute success callback.", 2, function() {
|
||||
asyncTest("#1365 - Destroy: New models execute success callback.", 2, function() {
|
||||
new Backbone.Model()
|
||||
.on('sync', function() { ok(false); })
|
||||
.on('destroy', function(){ ok(true); })
|
||||
.destroy({ success: function(){ ok(true); }});
|
||||
.destroy({ success: function(){
|
||||
ok(true);
|
||||
start();
|
||||
}});
|
||||
});
|
||||
|
||||
test("#1433 - Save: An invalid model cannot be persisted.", 1, function() {
|
||||
|
||||
212
vendor/backbone/test/router.js
vendored
@@ -331,6 +331,36 @@
|
||||
Backbone.history.checkUrl();
|
||||
});
|
||||
|
||||
test("No events are triggered if #execute returns false.", 1, function() {
|
||||
var Router = Backbone.Router.extend({
|
||||
|
||||
routes: {
|
||||
foo: function() {
|
||||
ok(true);
|
||||
}
|
||||
},
|
||||
|
||||
execute: function(callback, args) {
|
||||
callback.apply(this, args);
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var router = new Router;
|
||||
|
||||
router.on('route route:foo', function() {
|
||||
ok(false);
|
||||
});
|
||||
|
||||
Backbone.history.on('route', function() {
|
||||
ok(false);
|
||||
});
|
||||
|
||||
location.replace('http://example.com#foo');
|
||||
Backbone.history.checkUrl();
|
||||
});
|
||||
|
||||
test("#933, #908 - leading slash", 2, function() {
|
||||
location.replace('http://example.com/root/foo');
|
||||
|
||||
@@ -345,14 +375,6 @@
|
||||
strictEqual(Backbone.history.getFragment(), 'foo');
|
||||
});
|
||||
|
||||
test("#1003 - History is started before navigate is called", 1, function() {
|
||||
Backbone.history.stop();
|
||||
Backbone.history.navigate = function(){ ok(Backbone.History.started); };
|
||||
Backbone.history.start();
|
||||
// If this is not an old IE navigate will not be called.
|
||||
if (!Backbone.history.iframe) ok(true);
|
||||
});
|
||||
|
||||
test("#967 - Route callback gets passed encoded values.", 3, function() {
|
||||
var route = 'has%2Fslash/complex-has%23hash/has%20space';
|
||||
Backbone.history.navigate(route, {trigger: true});
|
||||
@@ -375,7 +397,7 @@
|
||||
Backbone.history.navigate('charñ', {trigger: true});
|
||||
equal(router.charType, 'UTF');
|
||||
Backbone.history.navigate('char%C3%B1', {trigger: true});
|
||||
equal(router.charType, 'escaped');
|
||||
equal(router.charType, 'UTF');
|
||||
});
|
||||
|
||||
test("#1185 - Use pathname when hashChange is not wanted.", 1, function() {
|
||||
@@ -543,7 +565,7 @@
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/root/x/y?a=b');
|
||||
location.replace = function(url) {
|
||||
strictEqual(url, '/root/#x/y?a=b');
|
||||
strictEqual(url, '/root#x/y?a=b');
|
||||
};
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
@@ -711,6 +733,21 @@
|
||||
Backbone.history.navigate('');
|
||||
});
|
||||
|
||||
test('#2656 - No trailing slash on root.', 1, function() {
|
||||
Backbone.history.stop();
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: function(state, title, url){
|
||||
strictEqual(url, '/root?x=1');
|
||||
}
|
||||
}
|
||||
});
|
||||
location.replace('http://example.com/root/path');
|
||||
Backbone.history.start({pushState: true, hashChange: false, root: 'root'});
|
||||
Backbone.history.navigate('?x=1');
|
||||
});
|
||||
|
||||
test('#2765 - Fragment matching sans query/hash.', 2, function() {
|
||||
Backbone.history.stop();
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
@@ -738,12 +775,12 @@
|
||||
var Router = Backbone.Router.extend({
|
||||
routes: {
|
||||
path: function(params){
|
||||
strictEqual(params, 'x=y%20z');
|
||||
strictEqual(params, 'x=y%3Fz');
|
||||
}
|
||||
}
|
||||
});
|
||||
var router = new Router;
|
||||
Backbone.history.navigate('path?x=y%20z', true);
|
||||
Backbone.history.navigate('path?x=y%3Fz', true);
|
||||
});
|
||||
|
||||
test('Navigate to a hash url.', function() {
|
||||
@@ -792,6 +829,22 @@
|
||||
Backbone.history.start({pushState: true});
|
||||
});
|
||||
|
||||
test('unicode pathname with % in a parameter', 1, function() {
|
||||
location.replace('http://example.com/myyjä/foo%20%25%3F%2f%40%25%20bar');
|
||||
location.pathname = '/myyj%C3%A4/foo%20%25%3F%2f%40%25%20bar';
|
||||
Backbone.history.stop();
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
var Router = Backbone.Router.extend({
|
||||
routes: {
|
||||
'myyjä/:query': function(query) {
|
||||
strictEqual(query, 'foo %?/@% bar');
|
||||
}
|
||||
}
|
||||
});
|
||||
new Router;
|
||||
Backbone.history.start({pushState: true});
|
||||
});
|
||||
|
||||
test('newline in route', 1, function() {
|
||||
location.replace('http://example.com/stuff%0Anonsense?param=foo%0Abar');
|
||||
Backbone.history.stop();
|
||||
@@ -807,4 +860,139 @@
|
||||
Backbone.history.start({pushState: true});
|
||||
});
|
||||
|
||||
test('Router#execute receives callback, args, name.', 3, function() {
|
||||
location.replace('http://example.com#foo/123/bar?x=y');
|
||||
Backbone.history.stop();
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
var Router = Backbone.Router.extend({
|
||||
routes: {'foo/:id/bar': 'foo'},
|
||||
foo: function(){},
|
||||
execute: function(callback, args, name) {
|
||||
strictEqual(callback, this.foo);
|
||||
deepEqual(args, ['123', 'x=y']);
|
||||
strictEqual(name, 'foo');
|
||||
}
|
||||
});
|
||||
var router = new Router;
|
||||
Backbone.history.start();
|
||||
});
|
||||
|
||||
test("pushState to hashChange with only search params.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com?a=b');
|
||||
location.replace = function(url) {
|
||||
strictEqual(url, '/#?a=b');
|
||||
};
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: null
|
||||
});
|
||||
Backbone.history.start({pushState: true});
|
||||
});
|
||||
|
||||
test("#3123 - History#navigate decodes before comparison.", 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com/shop/search?keyword=short%20dress');
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: function(){ ok(false); },
|
||||
replaceState: function(){ ok(false); }
|
||||
}
|
||||
});
|
||||
Backbone.history.start({pushState: true});
|
||||
Backbone.history.navigate('shop/search?keyword=short%20dress', true);
|
||||
strictEqual(Backbone.history.fragment, 'shop/search?keyword=short dress');
|
||||
});
|
||||
|
||||
test('#3175 - Urls in the params', 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('http://example.com#login?a=value&backUrl=https%3A%2F%2Fwww.msn.com%2Fidp%2Fidpdemo%3Fspid%3Dspdemo%26target%3Db');
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
var router = new Backbone.Router;
|
||||
router.route('login', function(params) {
|
||||
strictEqual(params, 'a=value&backUrl=https%3A%2F%2Fwww.msn.com%2Fidp%2Fidpdemo%3Fspid%3Dspdemo%26target%3Db');
|
||||
});
|
||||
Backbone.history.start();
|
||||
});
|
||||
|
||||
test('#3358 - pushState to hashChange transition with search params', 1, function() {
|
||||
Backbone.history.stop();
|
||||
location.replace('/root?foo=bar');
|
||||
location.replace = function(url) {
|
||||
strictEqual(url, '/root#?foo=bar');
|
||||
};
|
||||
Backbone.history = _.extend(new Backbone.History, {
|
||||
location: location,
|
||||
history: {
|
||||
pushState: undefined,
|
||||
replaceState: undefined
|
||||
}
|
||||
});
|
||||
Backbone.history.start({root: '/root', pushState: true});
|
||||
});
|
||||
|
||||
test("Paths that don't match the root should not match no root", 0, function() {
|
||||
location.replace('http://example.com/foo');
|
||||
Backbone.history.stop();
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
var Router = Backbone.Router.extend({
|
||||
routes: {
|
||||
foo: function(){
|
||||
ok(false, 'should not match unless root matches');
|
||||
}
|
||||
}
|
||||
});
|
||||
var router = new Router;
|
||||
Backbone.history.start({root: 'root', pushState: true});
|
||||
});
|
||||
|
||||
test("Paths that don't match the root should not match roots of the same length", 0, function() {
|
||||
location.replace('http://example.com/xxxx/foo');
|
||||
Backbone.history.stop();
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
var Router = Backbone.Router.extend({
|
||||
routes: {
|
||||
foo: function(){
|
||||
ok(false, 'should not match unless root matches');
|
||||
}
|
||||
}
|
||||
});
|
||||
var router = new Router;
|
||||
Backbone.history.start({root: 'root', pushState: true});
|
||||
});
|
||||
|
||||
test("roots with regex characters", 1, function() {
|
||||
location.replace('http://example.com/x+y.z/foo');
|
||||
Backbone.history.stop();
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
var Router = Backbone.Router.extend({
|
||||
routes: {foo: function(){ ok(true); }}
|
||||
});
|
||||
var router = new Router;
|
||||
Backbone.history.start({root: 'x+y.z', pushState: true});
|
||||
});
|
||||
|
||||
test("roots with unicode characters", 1, function() {
|
||||
location.replace('http://example.com/®ooτ/foo');
|
||||
Backbone.history.stop();
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
var Router = Backbone.Router.extend({
|
||||
routes: {foo: function(){ ok(true); }}
|
||||
});
|
||||
var router = new Router;
|
||||
Backbone.history.start({root: '®ooτ', pushState: true});
|
||||
});
|
||||
|
||||
test("roots without slash", 1, function() {
|
||||
location.replace('http://example.com/®ooτ');
|
||||
Backbone.history.stop();
|
||||
Backbone.history = _.extend(new Backbone.History, {location: location});
|
||||
var Router = Backbone.Router.extend({
|
||||
routes: {'': function(){ ok(true); }}
|
||||
});
|
||||
var router = new Router;
|
||||
Backbone.history.start({root: '®ooτ', pushState: true});
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
6
vendor/backbone/test/setup/dom-setup.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
$('body').append(
|
||||
'<div id="qunit"></div>' +
|
||||
'<div id="qunit-fixture">' +
|
||||
'<div id="testElement"><h1>Test</h1></div>' +
|
||||
'</div>'
|
||||
);
|
||||
13
vendor/backbone/test/sync.js
vendored
@@ -131,7 +131,7 @@
|
||||
|
||||
test("urlError", 2, function() {
|
||||
var model = new Backbone.Model();
|
||||
raises(function() {
|
||||
throws(function() {
|
||||
model.fetch();
|
||||
});
|
||||
model.fetch({url: '/one/two'});
|
||||
@@ -207,4 +207,15 @@
|
||||
strictEqual(this.ajaxSettings.beforeSend(xhr), false);
|
||||
});
|
||||
|
||||
test('#2928 - Pass along `textStatus` and `errorThrown`.', 2, function() {
|
||||
var model = new Backbone.Model;
|
||||
model.url = '/test';
|
||||
model.on('error', function(model, xhr, options) {
|
||||
strictEqual(options.textStatus, 'textStatus');
|
||||
strictEqual(options.errorThrown, 'errorThrown');
|
||||
});
|
||||
model.fetch();
|
||||
this.ajaxSettings.error({}, 'textStatus', 'errorThrown');
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
128
vendor/backbone/test/view.js
vendored
@@ -20,10 +20,22 @@
|
||||
equal(view.el.other, void 0);
|
||||
});
|
||||
|
||||
test("jQuery", 1, function() {
|
||||
test("$", 2, function() {
|
||||
var view = new Backbone.View;
|
||||
view.setElement('<p><a><b>test</b></a></p>');
|
||||
strictEqual(view.$('a b').html(), 'test');
|
||||
var result = view.$('a b');
|
||||
|
||||
strictEqual(result[0].innerHTML, 'test');
|
||||
ok(result.length === +result.length);
|
||||
});
|
||||
|
||||
test("$el", 3, function() {
|
||||
var view = new Backbone.View;
|
||||
view.setElement('<p><a><b>test</b></a></p>');
|
||||
strictEqual(view.el.nodeType, 1);
|
||||
|
||||
ok(view.$el instanceof Backbone.$);
|
||||
strictEqual(view.$el[0], view.el);
|
||||
});
|
||||
|
||||
test("initialize", 1, function() {
|
||||
@@ -60,6 +72,17 @@
|
||||
equal(counter2, 3);
|
||||
});
|
||||
|
||||
test("delegate", 2, function() {
|
||||
var view = new Backbone.View({el: '#testElement'});
|
||||
view.delegate('click', 'h1', function() {
|
||||
ok(true);
|
||||
});
|
||||
view.delegate('click', function() {
|
||||
ok(true);
|
||||
});
|
||||
view.$('h1').trigger('click');
|
||||
});
|
||||
|
||||
test("delegateEvents allows functions for callbacks", 3, function() {
|
||||
var view = new Backbone.View({el: '<p></p>'});
|
||||
view.counter = 0;
|
||||
@@ -114,6 +137,63 @@
|
||||
equal(counter2, 3);
|
||||
});
|
||||
|
||||
test("undelegate", 0, function() {
|
||||
view = new Backbone.View({el: '#testElement'});
|
||||
view.delegate('click', function() { ok(false); });
|
||||
view.delegate('click', 'h1', function() { ok(false); });
|
||||
|
||||
view.undelegate('click');
|
||||
|
||||
view.$('h1').trigger('click');
|
||||
view.$el.trigger('click');
|
||||
});
|
||||
|
||||
test("undelegate with passed handler", 1, function() {
|
||||
view = new Backbone.View({el: '#testElement'});
|
||||
var listener = function() { ok(false); };
|
||||
view.delegate('click', listener);
|
||||
view.delegate('click', function() { ok(true); });
|
||||
view.undelegate('click', listener);
|
||||
view.$el.trigger('click');
|
||||
});
|
||||
|
||||
test("undelegate with selector", 2, function() {
|
||||
view = new Backbone.View({el: '#testElement'});
|
||||
view.delegate('click', function() { ok(true); });
|
||||
view.delegate('click', 'h1', function() { ok(false); });
|
||||
view.undelegate('click', 'h1');
|
||||
view.$('h1').trigger('click');
|
||||
view.$el.trigger('click');
|
||||
});
|
||||
|
||||
test("undelegate with handler and selector", 2, function() {
|
||||
view = new Backbone.View({el: '#testElement'});
|
||||
view.delegate('click', function() { ok(true); });
|
||||
var handler = function(){ ok(false); };
|
||||
view.delegate('click', 'h1', handler);
|
||||
view.undelegate('click', 'h1', handler);
|
||||
view.$('h1').trigger('click');
|
||||
view.$el.trigger('click');
|
||||
});
|
||||
|
||||
test("tagName can be provided as a string", 1, function() {
|
||||
var View = Backbone.View.extend({
|
||||
tagName: 'span'
|
||||
});
|
||||
|
||||
equal(new View().el.tagName, 'SPAN');
|
||||
});
|
||||
|
||||
test("tagName can be provided as a function", 1, function() {
|
||||
var View = Backbone.View.extend({
|
||||
tagName: function() {
|
||||
return 'p';
|
||||
}
|
||||
});
|
||||
|
||||
ok(new View().$el.is('p'));
|
||||
});
|
||||
|
||||
test("_ensureElement with DOM node el", 1, function() {
|
||||
var View = Backbone.View.extend({
|
||||
el: document.body
|
||||
@@ -201,26 +281,19 @@
|
||||
equal(5, count);
|
||||
});
|
||||
|
||||
test("custom events, with namespaces", 2, function() {
|
||||
var count = 0;
|
||||
|
||||
test("custom events", 2, function() {
|
||||
var View = Backbone.View.extend({
|
||||
el: $('body'),
|
||||
events: function() {
|
||||
return {"fake$event.namespaced": "run"};
|
||||
},
|
||||
run: function() {
|
||||
count++;
|
||||
events: {
|
||||
"fake$event": function() { ok(true); }
|
||||
}
|
||||
});
|
||||
|
||||
var view = new View;
|
||||
$('body').trigger('fake$event').trigger('fake$event');
|
||||
equal(count, 2);
|
||||
|
||||
$('body').off('.namespaced');
|
||||
$('body').off('fake$event');
|
||||
$('body').trigger('fake$event');
|
||||
equal(count, 2);
|
||||
});
|
||||
|
||||
test("#1048 - setElement uses provided object.", 2, function() {
|
||||
@@ -264,21 +337,11 @@
|
||||
ok(!view2.el.id);
|
||||
});
|
||||
|
||||
test("#1228 - tagName can be provided as a function", 1, function() {
|
||||
var View = Backbone.View.extend({
|
||||
tagName: function() {
|
||||
return 'p';
|
||||
}
|
||||
});
|
||||
|
||||
ok(new View().$el.is('p'));
|
||||
});
|
||||
|
||||
test("views stopListening", 0, function() {
|
||||
var View = Backbone.View.extend({
|
||||
initialize: function() {
|
||||
this.listenTo(this.model, 'all x', function(){ ok(false); }, this);
|
||||
this.listenTo(this.collection, 'all x', function(){ ok(false); }, this);
|
||||
this.listenTo(this.model, 'all x', function(){ ok(false); });
|
||||
this.listenTo(this.collection, 'all x', function(){ ok(false); });
|
||||
}
|
||||
});
|
||||
|
||||
@@ -324,4 +387,19 @@
|
||||
equal(counter, 2);
|
||||
});
|
||||
|
||||
test("remove", 1, function() {
|
||||
var view = new Backbone.View;
|
||||
document.body.appendChild(view.el);
|
||||
|
||||
view.delegate('click', function() { ok(false); });
|
||||
view.listenTo(view, 'all x', function() { ok(false); });
|
||||
|
||||
view.remove();
|
||||
view.$el.trigger('click');
|
||||
view.trigger('x');
|
||||
|
||||
// In IE8 and below, parentNode still exists but is not document.body.
|
||||
notEqual(view.el.parentNode, document.body);
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
377
vendor/benchmark.js/benchmark.js
vendored
0
vendor/firebug-lite/license.txt
vendored
Executable file → Normal file
0
vendor/firebug-lite/skin/xp/blank.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
0
vendor/firebug-lite/skin/xp/buttonBg.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
0
vendor/firebug-lite/skin/xp/buttonBgHover.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 171 B |
0
vendor/firebug-lite/skin/xp/debugger.css
vendored
Executable file → Normal file
0
vendor/firebug-lite/skin/xp/detach.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 655 B |
0
vendor/firebug-lite/skin/xp/detachHover.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 586 B |
0
vendor/firebug-lite/skin/xp/disable.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 340 B |
0
vendor/firebug-lite/skin/xp/disable.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 543 B |
0
vendor/firebug-lite/skin/xp/disableHover.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
0
vendor/firebug-lite/skin/xp/disableHover.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 512 B |
0
vendor/firebug-lite/skin/xp/down.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 637 B |
0
vendor/firebug-lite/skin/xp/downActive.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 543 B |
0
vendor/firebug-lite/skin/xp/downHover.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |
0
vendor/firebug-lite/skin/xp/errorIcon-sm.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 447 B |
0
vendor/firebug-lite/skin/xp/errorIcon.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 365 B After Width: | Height: | Size: 365 B |
0
vendor/firebug-lite/skin/xp/errorIcon.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 457 B After Width: | Height: | Size: 457 B |
28
vendor/firebug-lite/skin/xp/firebug-1.3a2.css
vendored
Executable file → Normal file
@@ -70,7 +70,7 @@ html, body {
|
||||
body {
|
||||
font-family: Lucida Grande, Tahoma, sans-serif;
|
||||
font-size: 11px;
|
||||
background: #fff;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.clear {
|
||||
@@ -103,7 +103,7 @@ body {
|
||||
border: 1px solid #ccc;
|
||||
margin: 0 5px 0 0;
|
||||
background: #fff url(search.png) no-repeat 4px 2px;
|
||||
padding-left: 20px;
|
||||
padding-left: 20px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ body {
|
||||
height: 14px;
|
||||
background: url(errorIcon.png) no-repeat;
|
||||
color: #f00;
|
||||
font-weight: bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#fbMiniErrors {
|
||||
@@ -139,7 +139,7 @@ body {
|
||||
margin: 3px 4px 0;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
float: right;
|
||||
float: right;
|
||||
background: url(sprite.png) 0 -135px;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -192,10 +192,10 @@ body {
|
||||
}
|
||||
|
||||
/************************************************************************************************
|
||||
Sub-Layout
|
||||
Sub-Layout
|
||||
*************************************************************************************************/
|
||||
|
||||
/* fbToolbar
|
||||
/* fbToolbar
|
||||
*************************************************************************************************/
|
||||
#fbToolbarIcon {
|
||||
float: left;
|
||||
@@ -237,7 +237,7 @@ body {
|
||||
position: relative;
|
||||
top: 5px;
|
||||
line-height: 19px;
|
||||
cursor: default;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.fbToolbarSeparator{
|
||||
@@ -262,7 +262,7 @@ body {
|
||||
|
||||
.fbStatusBar span a:hover {
|
||||
color: blue;
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ body {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
/* body
|
||||
/* body
|
||||
*************************************************************************************************/
|
||||
.fbPanel {
|
||||
display: none;
|
||||
@@ -340,7 +340,7 @@ body {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
/* fbBottom
|
||||
/* fbBottom
|
||||
*************************************************************************************************/
|
||||
|
||||
#fbCommand {
|
||||
@@ -391,7 +391,7 @@ div.fbFitHeight {
|
||||
Layout Controls
|
||||
*************************************************************************************************/
|
||||
|
||||
/* fbToolbar buttons
|
||||
/* fbToolbar buttons
|
||||
*************************************************************************************************/
|
||||
#fbWindowButtons a {
|
||||
font-size: 1px;
|
||||
@@ -420,7 +420,7 @@ div.fbFitHeight {
|
||||
background: url(sprite.png) -48px -119px;
|
||||
}
|
||||
|
||||
/* fbPanelBarBox tabs
|
||||
/* fbPanelBarBox tabs
|
||||
*************************************************************************************************/
|
||||
.fbTab {
|
||||
text-decoration: none;
|
||||
@@ -475,7 +475,7 @@ a.fbTab:hover .fbTabR {
|
||||
background: url(sprite.png) -8px -96px !important;
|
||||
}
|
||||
|
||||
/* splitters
|
||||
/* splitters
|
||||
*************************************************************************************************/
|
||||
#fbHSplitter {
|
||||
position: absolute;
|
||||
@@ -571,7 +571,7 @@ div.objectBox-element {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
/* Webkit CSS Hack - bug in "highlight" named color */
|
||||
/* Webkit CSS Hack - bug in "highlight" named color */
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
.selectedElement{
|
||||
background: #316AC5;
|
||||
|
||||
0
vendor/firebug-lite/skin/xp/firebug.IE6.css
vendored
Executable file → Normal file
68
vendor/firebug-lite/skin/xp/firebug.css
vendored
Executable file → Normal file
@@ -136,10 +136,10 @@ h1.groupHeader {
|
||||
position: relative;
|
||||
top: -7px;
|
||||
left: -5px;
|
||||
|
||||
|
||||
outline: none;
|
||||
resize: none;
|
||||
|
||||
|
||||
/*
|
||||
_border: 1px solid #999 !important;
|
||||
_padding: 1px !important;
|
||||
@@ -311,17 +311,17 @@ h1.groupHeader {
|
||||
outline: none;
|
||||
background-color: transparent
|
||||
}
|
||||
|
||||
.useA11y .a11yCSSView .focusRow:focus .cssSelector,
|
||||
.useA11y .a11yCSSView .focusRow:focus .cssPropName,
|
||||
|
||||
.useA11y .a11yCSSView .focusRow:focus .cssSelector,
|
||||
.useA11y .a11yCSSView .focusRow:focus .cssPropName,
|
||||
.useA11y .a11yCSSView .focusRow:focus .cssPropValue,
|
||||
.useA11y .a11yCSSView .computedStyleRow:focus,
|
||||
.useA11y .a11yCSSView .computedStyleRow:focus,
|
||||
.useA11y .a11yCSSView .groupHeader:focus {
|
||||
outline: 2px solid #FF9933;
|
||||
outline-offset: -2px;
|
||||
background-color: #FFFFD6;
|
||||
}
|
||||
|
||||
|
||||
.useA11y .a11yCSSView .groupHeader:focus {
|
||||
outline-offset: -2px;
|
||||
}
|
||||
@@ -731,7 +731,7 @@ h1.groupHeader {
|
||||
/* Time Info tip */
|
||||
|
||||
.timeInfoTip {
|
||||
width: 150px;
|
||||
width: 150px;
|
||||
height: 40px
|
||||
}
|
||||
|
||||
@@ -944,7 +944,7 @@ h1.groupHeader {
|
||||
/*overflow-x: auto; HTML is damaged in case of big (2-3MB) responses */
|
||||
}
|
||||
|
||||
/* replaced by .netInfoTextSelected for IE6 support
|
||||
/* replaced by .netInfoTextSelected for IE6 support
|
||||
.netInfoText[selected="true"] {
|
||||
display: block;
|
||||
}
|
||||
@@ -963,7 +963,7 @@ h1.groupHeader {
|
||||
}
|
||||
|
||||
.netInfoPostText .netInfoParamName {
|
||||
width: 1px; /* Google Chrome need this otherwise the first column of
|
||||
width: 1px; /* Google Chrome need this otherwise the first column of
|
||||
the post variables table will be larger than expected */
|
||||
}
|
||||
|
||||
@@ -1148,7 +1148,7 @@ h1.groupHeader {
|
||||
}
|
||||
|
||||
* html .opened .spyHead .spyTitle,
|
||||
* html .opened .logGroupLabel,
|
||||
* html .opened .logGroupLabel,
|
||||
* html .opened .memberLabelCell .memberLabel {
|
||||
background-image: url(tree_close.gif);
|
||||
background-repeat: no-repeat;
|
||||
@@ -1677,7 +1677,7 @@ h1.groupHeader {
|
||||
/*
|
||||
.logRow-errorMessage > .hasTwisty > .errorTitle,
|
||||
.logRow-spy .spyHead .spyTitle,
|
||||
.logGroup > .logRow
|
||||
.logGroup > .logRow
|
||||
*/
|
||||
.logRow-errorMessage .hasTwisty .errorTitle,
|
||||
.logRow-spy .spyHead .spyTitle,
|
||||
@@ -2056,11 +2056,11 @@ h1.groupHeader {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin-top: 6px;
|
||||
background: url(tabMenuTarget.png);
|
||||
background: url(tabMenuTarget.png);
|
||||
}
|
||||
|
||||
.fbTabMenuTarget:hover {
|
||||
background: url(tabMenuTargetHover.png);
|
||||
background: url(tabMenuTargetHover.png);
|
||||
}
|
||||
|
||||
.fbShadow {
|
||||
@@ -2098,7 +2098,7 @@ h1.groupHeader {
|
||||
padding: 1px 18px 0;
|
||||
text-decoration: none;
|
||||
color: #000;
|
||||
cursor: default;
|
||||
cursor: default;
|
||||
background: #ACA899;
|
||||
margin: 4px 0;
|
||||
}
|
||||
@@ -2149,7 +2149,7 @@ h1.groupHeader {
|
||||
}
|
||||
|
||||
.fbMenuShortcut {
|
||||
padding-right: 85px;
|
||||
padding-right: 85px;
|
||||
}
|
||||
|
||||
.fbMenuShortcutKey {
|
||||
@@ -2274,7 +2274,7 @@ h1.groupHeader {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
font-family: Lucida Grande, Tahoma, sans-serif;
|
||||
font-size: 11px;
|
||||
background: #fff;
|
||||
@@ -2311,7 +2311,7 @@ h1.groupHeader {
|
||||
margin: 0 5px 0 0;
|
||||
background: #fff url(search.png) no-repeat 4px 2px !important;
|
||||
background: #fff url(search.gif) no-repeat 4px 2px;
|
||||
padding-left: 20px;
|
||||
padding-left: 20px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
@@ -2333,7 +2333,7 @@ h1.groupHeader {
|
||||
background: url(errorIcon.png) no-repeat !important;
|
||||
background: url(errorIcon.gif) no-repeat;
|
||||
color: #f00;
|
||||
font-weight: bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#fbMiniErrors {
|
||||
@@ -2348,7 +2348,7 @@ h1.groupHeader {
|
||||
margin: 3px 4px 0;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
float: right;
|
||||
float: right;
|
||||
background: url(sprite.png) 0 -135px;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -2403,10 +2403,10 @@ h1.groupHeader {
|
||||
}
|
||||
|
||||
/************************************************************************************************
|
||||
Sub-Layout
|
||||
Sub-Layout
|
||||
*************************************************************************************************/
|
||||
|
||||
/* fbToolbar
|
||||
/* fbToolbar
|
||||
*************************************************************************************************/
|
||||
#fbToolbarIcon {
|
||||
float: left;
|
||||
@@ -2472,7 +2472,7 @@ h1.groupHeader {
|
||||
|
||||
#fbStatusBarBox {
|
||||
top: 4px;
|
||||
cursor: default;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.fbToolbarSeparator {
|
||||
@@ -2500,7 +2500,7 @@ h1.groupHeader {
|
||||
|
||||
.fbStatusBar a:hover {
|
||||
color: blue;
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
@@ -2545,7 +2545,7 @@ h1.groupHeader {
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
/* body
|
||||
/* body
|
||||
*************************************************************************************************/
|
||||
.fbPanel {
|
||||
display: none;
|
||||
@@ -2609,7 +2609,7 @@ h1.groupHeader {
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
bottom: 3px;
|
||||
|
||||
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
@@ -2624,7 +2624,7 @@ h1.groupHeader {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
/* fbBottom
|
||||
/* fbBottom
|
||||
*************************************************************************************************/
|
||||
|
||||
#fbCommand {
|
||||
@@ -2689,7 +2689,7 @@ div.fbFitHeight {
|
||||
Layout Controls
|
||||
*************************************************************************************************/
|
||||
|
||||
/* fbToolbar buttons
|
||||
/* fbToolbar buttons
|
||||
*************************************************************************************************/
|
||||
.fbSmallButton {
|
||||
overflow: hidden;
|
||||
@@ -2729,7 +2729,7 @@ div.fbFitHeight {
|
||||
}
|
||||
|
||||
|
||||
/* fbPanelBarBox tabs
|
||||
/* fbPanelBarBox tabs
|
||||
*************************************************************************************************/
|
||||
.fbTab {
|
||||
text-decoration: none;
|
||||
@@ -2785,7 +2785,7 @@ a.fbTab:hover .fbTabR {
|
||||
background: url(sprite.png) -8px -96px !important;
|
||||
}
|
||||
|
||||
/* splitters
|
||||
/* splitters
|
||||
*************************************************************************************************/
|
||||
#fbHSplitter {
|
||||
position: fixed;
|
||||
@@ -2888,7 +2888,7 @@ div.objectBox-element {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Webkit CSS Hack - bug in "highlight" named color */
|
||||
/* Webkit CSS Hack - bug in "highlight" named color */
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
.selectedElement{
|
||||
background: #316AC5;
|
||||
@@ -2903,7 +2903,7 @@ div.objectBox-element {
|
||||
}
|
||||
|
||||
/* TODO: remove this? */
|
||||
/* TODO: xxxpedro - IE need this in windowless mode (cnn.com) check if the issue is related to
|
||||
/* TODO: xxxpedro - IE need this in windowless mode (cnn.com) check if the issue is related to
|
||||
position. if so, override it at chrome.js initialization when creating the div */
|
||||
.logRow {
|
||||
position: relative;
|
||||
@@ -2939,9 +2939,9 @@ position. if so, override it at chrome.js initialization when creating the div *
|
||||
|
||||
.objectBox-string {
|
||||
color: red;
|
||||
|
||||
|
||||
/* TODO: xxxpedro make long strings break line */
|
||||
/*white-space: pre; */
|
||||
/*white-space: pre; */
|
||||
}
|
||||
|
||||
.objectBox-number {
|
||||
|
||||
80
vendor/firebug-lite/skin/xp/firebug.html
vendored
Executable file → Normal file
@@ -14,71 +14,71 @@
|
||||
<tr>
|
||||
<!-- Interface - Top Area -->
|
||||
<td id="fbTop" colspan="2">
|
||||
|
||||
<!--
|
||||
|
||||
<!--
|
||||
<div>
|
||||
--><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
|
||||
--><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
|
||||
<input type="text" id="fbToolbarSearch" />
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Window Buttons -->
|
||||
<div id="fbWindowButtons">
|
||||
<a id="fbWindow_btDeactivate" class="fbSmallButton fbHover" title="Deactivate Firebug for this web page"> </a>
|
||||
<a id="fbWindow_btDetach" class="fbSmallButton fbHover" title="Open Firebug in popup window"> </a>
|
||||
<a id="fbWindow_btClose" class="fbSmallButton fbHover" title="Minimize Firebug"> </a>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Toolbar buttons and Status Bar -->
|
||||
<div id="fbToolbar">
|
||||
<div id="fbToolbarContent">
|
||||
|
||||
|
||||
<!-- Firebug Button -->
|
||||
<span id="fbToolbarIcon">
|
||||
<a id="fbFirebugButton" class="fbIconButton" class="fbHover" target="_blank"> </a>
|
||||
</span>
|
||||
|
||||
<!--
|
||||
|
||||
<!--
|
||||
<span id="fbLeftToolbarErrors" class="fbErrors">2 errors</span>
|
||||
-->
|
||||
|
||||
|
||||
<!-- Toolbar Buttons -->
|
||||
<span id="fbToolbarButtons">
|
||||
<!-- Fixed Toolbar Buttons -->
|
||||
<span id="fbFixedButtons">
|
||||
<a id="fbChrome_btInspect" class="fbButton fbHover" title="Click an element in the page to inspect">Inspect</a>
|
||||
</span>
|
||||
|
||||
|
||||
<!-- Console Panel Toolbar Buttons -->
|
||||
<span id="fbConsoleButtons" class="fbToolbarButtons">
|
||||
<a id="fbConsole_btClear" class="fbButton fbHover" title="Clear the console">Clear</a>
|
||||
</span>
|
||||
|
||||
|
||||
<!-- HTML Panel Toolbar Buttons -->
|
||||
<!--
|
||||
<!--
|
||||
<span id="fbHTMLButtons" class="fbToolbarButtons">
|
||||
<a id="fbHTML_btEdit" class="fbHover" title="Edit this HTML">Edit</a>
|
||||
</span>
|
||||
-->
|
||||
</span>
|
||||
|
||||
|
||||
<!-- Status Bar -->
|
||||
<span id="fbStatusBarBox">
|
||||
<span class="fbToolbarSeparator"></span>
|
||||
<!-- HTML Panel Status Bar -->
|
||||
<!--
|
||||
<!--
|
||||
<span id="fbHTMLStatusBar" class="fbStatusBar fbToolbarButtons">
|
||||
</span>
|
||||
-->
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- PanelBars -->
|
||||
<div id="fbPanelBarBox">
|
||||
|
||||
|
||||
<!-- Main PanelBar -->
|
||||
<div id="fbPanelBar1" class="fbPanelBar">
|
||||
<a id="fbConsoleTab" class="fbTab fbHover">
|
||||
@@ -112,7 +112,7 @@
|
||||
<!-- Side PanelBars -->
|
||||
<div id="fbPanelBar2Box" class="hide">
|
||||
<div id="fbPanelBar2" class="fbPanelBar">
|
||||
<!--
|
||||
<!--
|
||||
<a class="fbTab fbHover">
|
||||
<span class="fbTabL"></span>
|
||||
<span class="fbTabText">Style</span>
|
||||
@@ -131,18 +131,18 @@
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Horizontal Splitter -->
|
||||
<div id="fbHSplitter"> </div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Interface - Main Area -->
|
||||
<tr id="fbContent">
|
||||
|
||||
|
||||
<!-- Panels -->
|
||||
<td id="fbPanelBox1">
|
||||
<div id="fbPanel1" class="fbFitHeight">
|
||||
@@ -150,41 +150,41 @@
|
||||
<div id="fbHTML" class="fbPanel"></div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
<!-- Side Panel Box -->
|
||||
<td id="fbPanelBox2" class="hide">
|
||||
|
||||
|
||||
<!-- VerticalSplitter -->
|
||||
<div id="fbVSplitter" class="fbVSplitter"> </div>
|
||||
|
||||
|
||||
<!-- Side Panels -->
|
||||
<div id="fbPanel2" class="fbFitHeight">
|
||||
|
||||
|
||||
<!-- HTML Side Panels -->
|
||||
<div id="fbHTML_Style" class="fbPanel"></div>
|
||||
<div id="fbHTML_Layout" class="fbPanel"></div>
|
||||
<div id="fbHTML_DOM" class="fbPanel"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Large Command Line -->
|
||||
<textarea id="fbLargeCommandLine" class="fbFitHeight"></textarea>
|
||||
|
||||
|
||||
<!-- Large Command Line Buttons -->
|
||||
<div id="fbLargeCommandButtons">
|
||||
<a id="fbCommand_btRun" class="fbButton fbHover">Run</a>
|
||||
<a id="fbCommand_btClear" class="fbButton fbHover">Clear</a>
|
||||
|
||||
|
||||
<a id="fbSmallCommandLineIcon" class="fbSmallButton fbHover"></a>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Interface - Bottom Area -->
|
||||
<tr id="fbBottom" class="hide">
|
||||
|
||||
|
||||
<!-- Command Line -->
|
||||
<td id="fbCommand" colspan="2">
|
||||
<div id="fbCommandBox">
|
||||
@@ -193,18 +193,18 @@
|
||||
<a id="fbLargeCommandLineIcon" class="fbSmallButton fbHover"></a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
<span id="fbMiniChrome">
|
||||
<span id="fbMiniContent">
|
||||
<span id="fbMiniIcon" title="Open Firebug Lite"></span>
|
||||
<span id="fbMiniErrors" class="fbErrors"><!-- 2 errors --></span>
|
||||
</span>
|
||||
</span>
|
||||
<!--
|
||||
<!--
|
||||
<div id="fbErrorPopup">
|
||||
<div id="fbErrorPopupContent">
|
||||
<div id="fbErrorIndicator" class="fbErrors">2 errors</div>
|
||||
|
||||
0
vendor/firebug-lite/skin/xp/firebug.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
0
vendor/firebug-lite/skin/xp/group.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
0
vendor/firebug-lite/skin/xp/html.css
vendored
Executable file → Normal file
0
vendor/firebug-lite/skin/xp/infoIcon.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 359 B |
0
vendor/firebug-lite/skin/xp/infoIcon.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 524 B After Width: | Height: | Size: 524 B |
0
vendor/firebug-lite/skin/xp/loading_16.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
0
vendor/firebug-lite/skin/xp/min.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 552 B |
0
vendor/firebug-lite/skin/xp/minHover.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 485 B |
0
vendor/firebug-lite/skin/xp/off.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 742 B After Width: | Height: | Size: 742 B |
0
vendor/firebug-lite/skin/xp/offHover.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 680 B |
0
vendor/firebug-lite/skin/xp/pixel_transparent.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
0
vendor/firebug-lite/skin/xp/roundCorner.svg
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
0
vendor/firebug-lite/skin/xp/search.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 550 B After Width: | Height: | Size: 550 B |
0
vendor/firebug-lite/skin/xp/search.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 685 B |
0
vendor/firebug-lite/skin/xp/shadow.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
0
vendor/firebug-lite/skin/xp/shadow2.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
0
vendor/firebug-lite/skin/xp/shadowAlpha.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
0
vendor/firebug-lite/skin/xp/sprite.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
0
vendor/firebug-lite/skin/xp/tabHoverLeft.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 438 B |
0
vendor/firebug-lite/skin/xp/tabHoverMid.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 261 B After Width: | Height: | Size: 261 B |
0
vendor/firebug-lite/skin/xp/tabHoverRight.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 436 B |
0
vendor/firebug-lite/skin/xp/tabLeft.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 449 B |
0
vendor/firebug-lite/skin/xp/tabMenuCheckbox.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 220 B |
0
vendor/firebug-lite/skin/xp/tabMenuPin.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
0
vendor/firebug-lite/skin/xp/tabMenuRadio.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 192 B |
0
vendor/firebug-lite/skin/xp/tabMenuTarget.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 142 B |
0
vendor/firebug-lite/skin/xp/tabMenuTargetHover.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 148 B |
0
vendor/firebug-lite/skin/xp/tabMid.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
0
vendor/firebug-lite/skin/xp/tabRight.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 448 B |
0
vendor/firebug-lite/skin/xp/textEditorBorders.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 117 B |
0
vendor/firebug-lite/skin/xp/textEditorBorders.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
0
vendor/firebug-lite/skin/xp/textEditorCorners.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
0
vendor/firebug-lite/skin/xp/textEditorCorners.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
0
vendor/firebug-lite/skin/xp/titlebarMid.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 273 B After Width: | Height: | Size: 273 B |
0
vendor/firebug-lite/skin/xp/toolbarMid.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 242 B |
0
vendor/firebug-lite/skin/xp/tree_close.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 300 B After Width: | Height: | Size: 300 B |
0
vendor/firebug-lite/skin/xp/tree_open.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 202 B |
0
vendor/firebug-lite/skin/xp/twistyClosed.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 334 B |
0
vendor/firebug-lite/skin/xp/twistyOpen.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 309 B |
0
vendor/firebug-lite/skin/xp/up.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 619 B After Width: | Height: | Size: 619 B |
0
vendor/firebug-lite/skin/xp/upActive.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 551 B |
0
vendor/firebug-lite/skin/xp/upHover.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |
0
vendor/firebug-lite/skin/xp/warningIcon.gif
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 357 B |
0
vendor/firebug-lite/skin/xp/warningIcon.png
vendored
Executable file → Normal file
|
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 516 B |
2
vendor/firebug-lite/src/firebug-lite-debug.js
vendored
Executable file → Normal file
@@ -6258,7 +6258,7 @@ FBL.Firebug =
|
||||
{
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
version: "Firebug Lite 1.4.0",
|
||||
revision: "$Revision: 11967 $",
|
||||
revision: "$Revision$",
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
modules: modules,
|
||||
|
||||
126
vendor/json-js/json2.js
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
json2.js
|
||||
2014-02-04
|
||||
2015-05-03
|
||||
|
||||
Public Domain.
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
|
||||
|
||||
This file creates a global JSON object containing two methods: stringify
|
||||
and parse.
|
||||
and parse. This file is provides the ES5 JSON capability to ES3 systems.
|
||||
If a project might run on IE8 or earlier, then this file should be included.
|
||||
This file does nothing on ES5 systems.
|
||||
|
||||
JSON.stringify(value, replacer, space)
|
||||
value any JavaScript value, usually an object or array.
|
||||
@@ -48,7 +50,9 @@
|
||||
Date.prototype.toJSON = function (key) {
|
||||
function f(n) {
|
||||
// Format integers to have at least two digits.
|
||||
return n < 10 ? '0' + n : n;
|
||||
return n < 10
|
||||
? '0' + n
|
||||
: n;
|
||||
}
|
||||
|
||||
return this.getUTCFullYear() + '-' +
|
||||
@@ -94,8 +98,9 @@
|
||||
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
|
||||
|
||||
text = JSON.stringify([new Date()], function (key, value) {
|
||||
return this[key] instanceof Date ?
|
||||
'Date(' + this[key] + ')' : value;
|
||||
return this[key] instanceof Date
|
||||
? 'Date(' + this[key] + ')'
|
||||
: value;
|
||||
});
|
||||
// text is '["Date(---current time---)"]'
|
||||
|
||||
@@ -146,10 +151,12 @@
|
||||
redistribute.
|
||||
*/
|
||||
|
||||
/*jslint evil: true, regexp: true */
|
||||
/*jslint
|
||||
eval, for, this
|
||||
*/
|
||||
|
||||
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
|
||||
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
|
||||
/*property
|
||||
JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
|
||||
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
|
||||
lastIndex, length, parse, prototype, push, replace, slice, stringify,
|
||||
test, toJSON, toString, valueOf
|
||||
@@ -165,10 +172,23 @@ if (typeof JSON !== 'object') {
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var rx_one = /^[\],:{}\s]*$/,
|
||||
rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
|
||||
rx_three = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
|
||||
rx_four = /(?:^|:|,)(?:\s*\[)+/g,
|
||||
rx_escapable = /[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
||||
rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
||||
|
||||
function f(n) {
|
||||
// Format integers to have at least two digits.
|
||||
return n < 10 ? '0' + n : n;
|
||||
return n < 10
|
||||
? '0' + n
|
||||
: n;
|
||||
}
|
||||
|
||||
function this_value() {
|
||||
return this.valueOf();
|
||||
}
|
||||
|
||||
if (typeof Date.prototype.toJSON !== 'function') {
|
||||
@@ -176,25 +196,21 @@ if (typeof JSON !== 'object') {
|
||||
Date.prototype.toJSON = function () {
|
||||
|
||||
return isFinite(this.valueOf())
|
||||
? this.getUTCFullYear() + '-' +
|
||||
f(this.getUTCMonth() + 1) + '-' +
|
||||
f(this.getUTCDate()) + 'T' +
|
||||
f(this.getUTCHours()) + ':' +
|
||||
f(this.getUTCMinutes()) + ':' +
|
||||
f(this.getUTCSeconds()) + 'Z'
|
||||
? this.getUTCFullYear() + '-' +
|
||||
f(this.getUTCMonth() + 1) + '-' +
|
||||
f(this.getUTCDate()) + 'T' +
|
||||
f(this.getUTCHours()) + ':' +
|
||||
f(this.getUTCMinutes()) + ':' +
|
||||
f(this.getUTCSeconds()) + 'Z'
|
||||
: null;
|
||||
};
|
||||
|
||||
String.prototype.toJSON =
|
||||
Number.prototype.toJSON =
|
||||
Boolean.prototype.toJSON = function () {
|
||||
return this.valueOf();
|
||||
};
|
||||
Boolean.prototype.toJSON = this_value;
|
||||
Number.prototype.toJSON = this_value;
|
||||
String.prototype.toJSON = this_value;
|
||||
}
|
||||
|
||||
var cx,
|
||||
escapable,
|
||||
gap,
|
||||
var gap,
|
||||
indent,
|
||||
meta,
|
||||
rep;
|
||||
@@ -207,13 +223,15 @@ if (typeof JSON !== 'object') {
|
||||
// Otherwise we must also replace the offending characters with safe escape
|
||||
// sequences.
|
||||
|
||||
escapable.lastIndex = 0;
|
||||
return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
|
||||
var c = meta[a];
|
||||
return typeof c === 'string'
|
||||
? c
|
||||
: '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
||||
}) + '"' : '"' + string + '"';
|
||||
rx_escapable.lastIndex = 0;
|
||||
return rx_escapable.test(string)
|
||||
? '"' + string.replace(rx_escapable, function (a) {
|
||||
var c = meta[a];
|
||||
return typeof c === 'string'
|
||||
? c
|
||||
: '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
||||
}) + '"'
|
||||
: '"' + string + '"';
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +271,9 @@ if (typeof JSON !== 'object') {
|
||||
|
||||
// JSON numbers must be finite. Encode non-finite numbers as null.
|
||||
|
||||
return isFinite(value) ? String(value) : 'null';
|
||||
return isFinite(value)
|
||||
? String(value)
|
||||
: 'null';
|
||||
|
||||
case 'boolean':
|
||||
case 'null':
|
||||
@@ -299,8 +319,8 @@ if (typeof JSON !== 'object') {
|
||||
v = partial.length === 0
|
||||
? '[]'
|
||||
: gap
|
||||
? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
|
||||
: '[' + partial.join(',') + ']';
|
||||
? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
|
||||
: '[' + partial.join(',') + ']';
|
||||
gap = mind;
|
||||
return v;
|
||||
}
|
||||
@@ -314,7 +334,11 @@ if (typeof JSON !== 'object') {
|
||||
k = rep[i];
|
||||
v = str(k, value);
|
||||
if (v) {
|
||||
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
||||
partial.push(quote(k) + (
|
||||
gap
|
||||
? ': '
|
||||
: ':'
|
||||
) + v);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -326,7 +350,11 @@ if (typeof JSON !== 'object') {
|
||||
if (Object.prototype.hasOwnProperty.call(value, k)) {
|
||||
v = str(k, value);
|
||||
if (v) {
|
||||
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
||||
partial.push(quote(k) + (
|
||||
gap
|
||||
? ': '
|
||||
: ':'
|
||||
) + v);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -338,8 +366,8 @@ if (typeof JSON !== 'object') {
|
||||
v = partial.length === 0
|
||||
? '{}'
|
||||
: gap
|
||||
? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
|
||||
: '{' + partial.join(',') + '}';
|
||||
? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
|
||||
: '{' + partial.join(',') + '}';
|
||||
gap = mind;
|
||||
return v;
|
||||
}
|
||||
@@ -348,14 +376,13 @@ if (typeof JSON !== 'object') {
|
||||
// If the JSON object does not yet have a stringify method, give it one.
|
||||
|
||||
if (typeof JSON.stringify !== 'function') {
|
||||
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
||||
meta = { // table of character substitutions
|
||||
'\b': '\\b',
|
||||
'\t': '\\t',
|
||||
'\n': '\\n',
|
||||
'\f': '\\f',
|
||||
'\r': '\\r',
|
||||
'"' : '\\"',
|
||||
'"': '\\"',
|
||||
'\\': '\\\\'
|
||||
};
|
||||
JSON.stringify = function (value, replacer, space) {
|
||||
@@ -405,7 +432,6 @@ if (typeof JSON !== 'object') {
|
||||
// If the JSON object does not yet have a parse method, give it one.
|
||||
|
||||
if (typeof JSON.parse !== 'function') {
|
||||
cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
||||
JSON.parse = function (text, reviver) {
|
||||
|
||||
// The parse method takes a text and an optional reviver function, and returns
|
||||
@@ -440,11 +466,11 @@ if (typeof JSON !== 'object') {
|
||||
// incorrectly, either silently deleting them, or treating them as line endings.
|
||||
|
||||
text = String(text);
|
||||
cx.lastIndex = 0;
|
||||
if (cx.test(text)) {
|
||||
text = text.replace(cx, function (a) {
|
||||
rx_dangerous.lastIndex = 0;
|
||||
if (rx_dangerous.test(text)) {
|
||||
text = text.replace(rx_dangerous, function (a) {
|
||||
return '\\u' +
|
||||
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
||||
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -461,10 +487,14 @@ if (typeof JSON !== 'object') {
|
||||
// we look to see that the remaining characters are only whitespace or ']' or
|
||||
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
|
||||
|
||||
if (/^[\],:{}\s]*$/
|
||||
.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
|
||||
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
|
||||
.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
|
||||
if (
|
||||
rx_one.test(
|
||||
text
|
||||
.replace(rx_two, '@')
|
||||
.replace(rx_three, ']')
|
||||
.replace(rx_four, '')
|
||||
)
|
||||
) {
|
||||
|
||||
// In the third stage we use the eval function to compile the text into a
|
||||
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
|
||||
|
||||
2
vendor/underscore/LICENSE
vendored
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative
|
||||
Copyright (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative
|
||||
Reporters & Editors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
|
||||
213
vendor/underscore/test/arrays.js
vendored
@@ -1,6 +1,7 @@
|
||||
(function() {
|
||||
var _ = typeof require == 'function' ? require('..') : window._;
|
||||
|
||||
module('Arrays');
|
||||
QUnit.module('Arrays');
|
||||
|
||||
test('first', function() {
|
||||
equal(_.first([1, 2, 3]), 1, 'can pull out the first element of an array');
|
||||
@@ -79,6 +80,12 @@
|
||||
});
|
||||
|
||||
test('flatten', function() {
|
||||
deepEqual(_.flatten(null), [], 'Flattens supports null');
|
||||
deepEqual(_.flatten(void 0), [], 'Flattens supports undefined');
|
||||
|
||||
deepEqual(_.flatten([[], [[]], []]), [], 'Flattens empty arrays');
|
||||
deepEqual(_.flatten([[], [[]], []], true), [[]], 'Flattens empty arrays');
|
||||
|
||||
var list = [1, [2], [3, [[[4]]]]];
|
||||
deepEqual(_.flatten(list), [1, 2, 3, 4], 'can flatten nested arrays');
|
||||
deepEqual(_.flatten(list, true), [1, 2, 3, [[[4]]]], 'can shallowly flatten nested arrays');
|
||||
@@ -86,6 +93,11 @@
|
||||
deepEqual(result, [1, 2, 3, 4], 'works on an arguments object');
|
||||
list = [[1], [2], [3], [[4]]];
|
||||
deepEqual(_.flatten(list, true), [1, 2, 3, [4]], 'can shallowly flatten arrays containing only other arrays');
|
||||
|
||||
equal(_.flatten([_.range(10), _.range(10), 5, 1, 3], true).length, 23);
|
||||
equal(_.flatten([_.range(10), _.range(10), 5, 1, 3]).length, 23);
|
||||
equal(_.flatten([new Array(1000000), _.range(56000), 5, 1, 3]).length, 1056003, 'Flatten can handle massive collections');
|
||||
equal(_.flatten([new Array(1000000), _.range(56000), 5, 1, 3], true).length, 1056003, 'Flatten can handle massive collections');
|
||||
});
|
||||
|
||||
test('without', function() {
|
||||
@@ -99,6 +111,32 @@
|
||||
equal(_.without(list, list[0]).length, 1, 'ditto.');
|
||||
});
|
||||
|
||||
test('sortedIndex', function() {
|
||||
var numbers = [10, 20, 30, 40, 50], num = 35;
|
||||
var indexForNum = _.sortedIndex(numbers, num);
|
||||
equal(indexForNum, 3, '35 should be inserted at index 3');
|
||||
|
||||
var indexFor30 = _.sortedIndex(numbers, 30);
|
||||
equal(indexFor30, 2, '30 should be inserted at index 2');
|
||||
|
||||
var objects = [{x: 10}, {x: 20}, {x: 30}, {x: 40}];
|
||||
var iterator = function(obj){ return obj.x; };
|
||||
strictEqual(_.sortedIndex(objects, {x: 25}, iterator), 2);
|
||||
strictEqual(_.sortedIndex(objects, {x: 35}, 'x'), 3);
|
||||
|
||||
var context = {1: 2, 2: 3, 3: 4};
|
||||
iterator = function(obj){ return this[obj]; };
|
||||
strictEqual(_.sortedIndex([1, 3], 2, iterator, context), 1);
|
||||
|
||||
var values = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, 2147483647];
|
||||
var array = Array(Math.pow(2, 32) - 1);
|
||||
var length = values.length;
|
||||
while (length--) {
|
||||
array[values[length]] = values[length];
|
||||
}
|
||||
equal(_.sortedIndex(array, 2147483648), 2147483648, 'should work with large indexes');
|
||||
});
|
||||
|
||||
test('uniq', function() {
|
||||
var list = [1, 2, 1, 3, 1, 4];
|
||||
deepEqual(_.uniq(list), [1, 2, 3, 4], 'can find the unique values of an unsorted array');
|
||||
@@ -116,6 +154,20 @@
|
||||
list = [1, 2, 2, 3, 4, 4];
|
||||
deepEqual(_.uniq(list, true, iterator), [1, 2, 3, 4], 'iterator works with sorted array');
|
||||
|
||||
var kittens = [
|
||||
{kitten: 'Celery', cuteness: 8},
|
||||
{kitten: 'Juniper', cuteness: 10},
|
||||
{kitten: 'Spottis', cuteness: 10}
|
||||
];
|
||||
|
||||
var expected = [
|
||||
{kitten: 'Celery', cuteness: 8},
|
||||
{kitten: 'Juniper', cuteness: 10}
|
||||
];
|
||||
|
||||
deepEqual(_.uniq(kittens, true, 'cuteness'), expected, 'string iterator works with sorted array');
|
||||
|
||||
|
||||
var result = (function(){ return _.uniq(arguments); }(1, 2, 1, 3, 1, 4));
|
||||
deepEqual(result, [1, 2, 3, 4], 'works on an arguments object');
|
||||
|
||||
@@ -209,6 +261,19 @@
|
||||
deepEqual(_.zip(), [], '_.zip() returns []');
|
||||
});
|
||||
|
||||
test('unzip', function() {
|
||||
deepEqual(_.unzip(null), [], 'handles null');
|
||||
|
||||
deepEqual(_.unzip([['a', 'b'], [1, 2]]), [['a', 1], ['b', 2]]);
|
||||
|
||||
// complements zip
|
||||
var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
|
||||
deepEqual(_.unzip(zipped), [['fred', 'barney'], [30, 40], [true, false]]);
|
||||
|
||||
zipped = _.zip(['moe', 30], ['larry', 40], ['curly', 50, 'extra data']);
|
||||
deepEqual(_.unzip(zipped), [['moe', 30, void 0], ['larry', 40, void 0], ['curly', 50, 'extra data']], 'Uses length of largest array');
|
||||
});
|
||||
|
||||
test('object', function() {
|
||||
var result = _.object(['moe', 'larry', 'curly'], [30, 40, 50]);
|
||||
var shouldBe = {moe: 30, larry: 40, curly: 50};
|
||||
@@ -229,7 +294,14 @@
|
||||
equal(_.indexOf(numbers, 2), 1, 'can compute indexOf');
|
||||
var result = (function(){ return _.indexOf(arguments, 2); }(1, 2, 3));
|
||||
equal(result, 1, 'works on an arguments object');
|
||||
equal(_.indexOf(null, 2), -1, 'handles nulls properly');
|
||||
|
||||
_.each([null, void 0, [], false], function(val) {
|
||||
var msg = 'Handles: ' + (_.isArray(val) ? '[]' : val);
|
||||
equal(_.indexOf(val, 2), -1, msg);
|
||||
equal(_.indexOf(val, 2, -1), -1, msg);
|
||||
equal(_.indexOf(val, 2, -20), -1, msg);
|
||||
equal(_.indexOf(val, 2, 15), -1, msg);
|
||||
});
|
||||
|
||||
var num = 35;
|
||||
numbers = [10, 20, 30, 40, 50];
|
||||
@@ -263,6 +335,28 @@
|
||||
strictEqual(_.indexOf(array, 1, fromIndex), 0);
|
||||
});
|
||||
strictEqual(_.indexOf([1, 2, 3], 1, true), 0);
|
||||
|
||||
index = _.indexOf([], undefined, true);
|
||||
equal(index, -1, 'empty array with truthy `isSorted` returns -1');
|
||||
});
|
||||
|
||||
test('indexOf with NaN', function() {
|
||||
strictEqual(_.indexOf([1, 2, NaN, NaN], NaN), 2, 'Expected [1, 2, NaN] to contain NaN');
|
||||
strictEqual(_.indexOf([1, 2, Infinity], NaN), -1, 'Expected [1, 2, NaN] to contain NaN');
|
||||
|
||||
strictEqual(_.indexOf([1, 2, NaN, NaN], NaN, 1), 2, 'startIndex does not affect result');
|
||||
strictEqual(_.indexOf([1, 2, NaN, NaN], NaN, -2), 2, 'startIndex does not affect result');
|
||||
|
||||
(function() {
|
||||
strictEqual(_.indexOf(arguments, NaN), 2, 'Expected arguments [1, 2, NaN] to contain NaN');
|
||||
}(1, 2, NaN, NaN));
|
||||
});
|
||||
|
||||
test('indexOf with +- 0', function() {
|
||||
_.each([-0, +0], function(val) {
|
||||
strictEqual(_.indexOf([1, 2, val, val], val), 2);
|
||||
strictEqual(_.indexOf([1, 2, val, val], -val), 2);
|
||||
});
|
||||
});
|
||||
|
||||
test('lastIndexOf', function() {
|
||||
@@ -276,7 +370,14 @@
|
||||
equal(_.lastIndexOf(numbers, 0), 8, 'lastIndexOf the other element');
|
||||
var result = (function(){ return _.lastIndexOf(arguments, 1); }(1, 0, 1, 0, 0, 1, 0, 0, 0));
|
||||
equal(result, 5, 'works on an arguments object');
|
||||
equal(_.lastIndexOf(null, 2), -1, 'handles nulls properly');
|
||||
|
||||
_.each([null, void 0, [], false], function(val) {
|
||||
var msg = 'Handles: ' + (_.isArray(val) ? '[]' : val);
|
||||
equal(_.lastIndexOf(val, 2), -1, msg);
|
||||
equal(_.lastIndexOf(val, 2, -1), -1, msg);
|
||||
equal(_.lastIndexOf(val, 2, -20), -1, msg);
|
||||
equal(_.lastIndexOf(val, 2, 15), -1, msg);
|
||||
});
|
||||
|
||||
numbers = [1, 2, 3, 1, 2, 3, 1, 2, 3];
|
||||
var index = _.lastIndexOf(numbers, 2, 2);
|
||||
@@ -316,6 +417,112 @@
|
||||
}), [0, -1, -1]);
|
||||
});
|
||||
|
||||
test('lastIndexOf with NaN', function() {
|
||||
strictEqual(_.lastIndexOf([1, 2, NaN, NaN], NaN), 3, 'Expected [1, 2, NaN] to contain NaN');
|
||||
strictEqual(_.lastIndexOf([1, 2, Infinity], NaN), -1, 'Expected [1, 2, NaN] to contain NaN');
|
||||
|
||||
strictEqual(_.lastIndexOf([1, 2, NaN, NaN], NaN, 2), 2, 'fromIndex does not affect result');
|
||||
strictEqual(_.lastIndexOf([1, 2, NaN, NaN], NaN, -2), 2, 'fromIndex does not affect result');
|
||||
|
||||
(function() {
|
||||
strictEqual(_.lastIndexOf(arguments, NaN), 3, 'Expected arguments [1, 2, NaN] to contain NaN');
|
||||
}(1, 2, NaN, NaN));
|
||||
});
|
||||
|
||||
test('lastIndexOf with +- 0', function() {
|
||||
_.each([-0, +0], function(val) {
|
||||
strictEqual(_.lastIndexOf([1, 2, val, val], val), 3);
|
||||
strictEqual(_.lastIndexOf([1, 2, val, val], -val), 3);
|
||||
strictEqual(_.lastIndexOf([-1, 1, 2], -val), -1);
|
||||
});
|
||||
});
|
||||
|
||||
test('findIndex', function() {
|
||||
var objects = [
|
||||
{'a': 0, 'b': 0},
|
||||
{'a': 1, 'b': 1},
|
||||
{'a': 2, 'b': 2},
|
||||
{'a': 0, 'b': 0}
|
||||
];
|
||||
|
||||
equal(_.findIndex(objects, function(obj) {
|
||||
return obj.a === 0;
|
||||
}), 0);
|
||||
|
||||
equal(_.findIndex(objects, function(obj) {
|
||||
return obj.b * obj.a === 4;
|
||||
}), 2);
|
||||
|
||||
equal(_.findIndex(objects, 'a'), 1, 'Uses lookupIterator');
|
||||
|
||||
equal(_.findIndex(objects, function(obj) {
|
||||
return obj.b * obj.a === 5;
|
||||
}), -1);
|
||||
|
||||
equal(_.findIndex(null, _.noop), -1);
|
||||
strictEqual(_.findIndex(objects, function(a) {
|
||||
return a.foo === null;
|
||||
}), -1);
|
||||
_.findIndex([{a: 1}], function(a, key, obj) {
|
||||
equal(key, 0);
|
||||
deepEqual(obj, [{a: 1}]);
|
||||
strictEqual(this, objects, 'called with context');
|
||||
}, objects);
|
||||
|
||||
var sparse = [];
|
||||
sparse[20] = {'a': 2, 'b': 2};
|
||||
equal(_.findIndex(sparse, function(obj) {
|
||||
return obj && obj.b * obj.a === 4;
|
||||
}), 20, 'Works with sparse arrays');
|
||||
|
||||
var array = [1, 2, 3, 4];
|
||||
array.match = 55;
|
||||
strictEqual(_.findIndex(array, function(x) { return x === 55; }), -1, 'doesn\'t match array-likes keys');
|
||||
});
|
||||
|
||||
test('findLastIndex', function() {
|
||||
var objects = [
|
||||
{'a': 0, 'b': 0},
|
||||
{'a': 1, 'b': 1},
|
||||
{'a': 2, 'b': 2},
|
||||
{'a': 0, 'b': 0}
|
||||
];
|
||||
|
||||
equal(_.findLastIndex(objects, function(obj) {
|
||||
return obj.a === 0;
|
||||
}), 3);
|
||||
|
||||
equal(_.findLastIndex(objects, function(obj) {
|
||||
return obj.b * obj.a === 4;
|
||||
}), 2);
|
||||
|
||||
equal(_.findLastIndex(objects, 'a'), 2, 'Uses lookupIterator');
|
||||
|
||||
equal(_.findLastIndex(objects, function(obj) {
|
||||
return obj.b * obj.a === 5;
|
||||
}), -1);
|
||||
|
||||
equal(_.findLastIndex(null, _.noop), -1);
|
||||
strictEqual(_.findLastIndex(objects, function(a) {
|
||||
return a.foo === null;
|
||||
}), -1);
|
||||
_.findLastIndex([{a: 1}], function(a, key, obj) {
|
||||
equal(key, 0);
|
||||
deepEqual(obj, [{a: 1}]);
|
||||
strictEqual(this, objects, 'called with context');
|
||||
}, objects);
|
||||
|
||||
var sparse = [];
|
||||
sparse[20] = {'a': 2, 'b': 2};
|
||||
equal(_.findLastIndex(sparse, function(obj) {
|
||||
return obj && obj.b * obj.a === 4;
|
||||
}), 20, 'Works with sparse arrays');
|
||||
|
||||
var array = [1, 2, 3, 4];
|
||||
array.match = 55;
|
||||
strictEqual(_.findLastIndex(array, function(x) { return x === 55; }), -1, 'doesn\'t match array-likes keys');
|
||||
});
|
||||
|
||||
test('range', function() {
|
||||
deepEqual(_.range(0), [], 'range with 0 as a first argument generates an empty array');
|
||||
deepEqual(_.range(4), [0, 1, 2, 3], 'range with a single positive argument generates an array of elements 0,1,2,...,n-1');
|
||||
|
||||