mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Compare commits
103 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19c9251b36 | ||
|
|
b5e672995a | ||
|
|
edadd45214 | ||
|
|
4879a7a7d0 | ||
|
|
9648f692b0 | ||
|
|
dfa407db0b | ||
|
|
156e1965ae | ||
|
|
933e1061b8 | ||
|
|
072a807ff7 | ||
|
|
70d9d037c3 | ||
|
|
2235819f76 | ||
|
|
4afb725803 | ||
|
|
20c530121e | ||
|
|
717fe4f37c | ||
|
|
23903d3c80 | ||
|
|
4e856eb123 | ||
|
|
519b3d1f0d | ||
|
|
61ff26e089 | ||
|
|
c93ba2d878 | ||
|
|
8a26eb42ad | ||
|
|
f299b52f39 | ||
|
|
c4847ebe7d | ||
|
|
3469357cff | ||
|
|
ded9bc6658 | ||
|
|
63150ef764 | ||
|
|
00f0f62a97 | ||
|
|
846e434c7a | ||
|
|
5d046f39cb | ||
|
|
aa816b36d4 | ||
|
|
d7fbc52ee0 | ||
|
|
2e1c0f22f4 | ||
|
|
1b6c282299 | ||
|
|
a370ac8140 | ||
|
|
1144918f35 | ||
|
|
3a3b0fd339 | ||
|
|
c84fe82760 | ||
|
|
e7b28ea6cb | ||
|
|
0cec225778 | ||
|
|
94c3a8133c | ||
|
|
659e8c019c | ||
|
|
602cc3f03d | ||
|
|
b281ddecc4 | ||
|
|
ddfd9b11a0 | ||
|
|
b185fcee26 | ||
|
|
be87d30394 | ||
|
|
a6fe6b1e17 | ||
|
|
e37182845f | ||
|
|
357e899e68 | ||
|
|
fd9a062d57 | ||
|
|
e77d68121f | ||
|
|
629d186579 | ||
|
|
2406eac542 | ||
|
|
17a34bc585 | ||
|
|
53838a38f8 | ||
|
|
29e258497b | ||
|
|
8f4d3eb018 | ||
|
|
02b3295a63 | ||
|
|
52ab48c054 | ||
|
|
f8dc2149f7 | ||
|
|
deb65de218 | ||
|
|
60eb517911 | ||
|
|
1f8ea07746 | ||
|
|
e42cd97dae | ||
|
|
343456d696 | ||
|
|
0b8592a35c | ||
|
|
7084300d34 | ||
|
|
15b156512f | ||
|
|
bda6f2795f | ||
|
|
1cb18dfada | ||
|
|
39a7eae40d | ||
|
|
e0cbb4c8e6 | ||
|
|
0843bd46ef | ||
|
|
3ac4b261e4 | ||
|
|
eaa9f36e91 | ||
|
|
552f94a7db | ||
|
|
d8ddc1a15f | ||
|
|
e5f9af5418 | ||
|
|
2de676fe76 | ||
|
|
278c6dd33d | ||
|
|
79b9d20a91 | ||
|
|
6e62e1e8df | ||
|
|
5c08f18d36 | ||
|
|
90e6199a16 | ||
|
|
67389a8c78 | ||
|
|
a65fd33603 | ||
|
|
b002100433 | ||
|
|
4680cdacc0 | ||
|
|
852988e04a | ||
|
|
97e9edc53d | ||
|
|
ce32a89e3e | ||
|
|
5e58cd216c | ||
|
|
5adb4ee95c | ||
|
|
a73b92b58e | ||
|
|
a1b53054d6 | ||
|
|
dac890a211 | ||
|
|
7167a78644 | ||
|
|
f83197727b | ||
|
|
20c5307542 | ||
|
|
45ac7f3bcc | ||
|
|
7cb477a3a0 | ||
|
|
b8c719d3be | ||
|
|
d8e069cc34 | ||
|
|
5a3ff73997 |
8
.github/CONTRIBUTING.md
vendored
8
.github/CONTRIBUTING.md
vendored
@@ -1,7 +1,7 @@
|
|||||||
# Contributing to Lodash
|
# Contributing to Lodash
|
||||||
|
|
||||||
Contributions are always welcome. Before contributing please read the
|
Contributions are always welcome. Before contributing please read the
|
||||||
[code of conduct](https://js.foundation/conduct/) &
|
[code of conduct](https://github.com/openjs-foundation/cross-project-council/blob/main/CODE_OF_CONDUCT.md) &
|
||||||
[search the issue tracker](https://github.com/lodash/lodash/issues); your issue
|
[search the issue tracker](https://github.com/lodash/lodash/issues); your issue
|
||||||
may have already been discussed or fixed in `master`. To contribute,
|
may have already been discussed or fixed in `master`. To contribute,
|
||||||
[fork](https://help.github.com/articles/fork-a-repo/) Lodash, commit your changes,
|
[fork](https://help.github.com/articles/fork-a-repo/) Lodash, commit your changes,
|
||||||
@@ -31,9 +31,9 @@ Run unit tests from the command-line via `npm test`, or open `test/index.html` &
|
|||||||
|
|
||||||
## Contributor License Agreement
|
## Contributor License Agreement
|
||||||
|
|
||||||
Lodash is a member of the [JS Foundation](https://js.foundation/).
|
Lodash is a member of the [Open JS Foundation](https://openjsf.org/).
|
||||||
As such, we request that all contributors sign the JS Foundation
|
As such, we request that all contributors sign our
|
||||||
[contributor license agreement (CLA)](https://js.foundation/CLA/).
|
[contributor license agreement (CLA)](https://openjsf.org/cla).
|
||||||
|
|
||||||
For more information about CLAs, please check out Alex Russell’s excellent post,
|
For more information about CLAs, please check out Alex Russell’s excellent post,
|
||||||
[“Why Do I Need to Sign This?”](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
|
[“Why Do I Need to Sign This?”](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
|
||||||
|
|||||||
39
.github/workflows/browser-testing.yml
vendored
Normal file
39
.github/workflows/browser-testing.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: CI Browsers
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
# Run on every PR, regardless of branch
|
||||||
|
branches: [ '*' ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-docs:
|
||||||
|
name: Modern Browsers Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '24'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npx playwright install --with-deps
|
||||||
|
npm install -D @playwright/test@latest
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Start server
|
||||||
|
run: |
|
||||||
|
npx http-server -p 9001 &
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
- name: Run Playwright tests
|
||||||
|
run: npx playwright test
|
||||||
34
.github/workflows/ci-bun.yml
vendored
Normal file
34
.github/workflows/ci-bun.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: CI Bun
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Bun CI
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
bun-version: [1.0.0, 1.1.0, 1.2.0, 1.3.0]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Bun
|
||||||
|
uses: oven-sh/setup-bun@v1
|
||||||
|
with:
|
||||||
|
bun-version: ${{ matrix.bun-version }}
|
||||||
|
|
||||||
|
# TODO: Remove this step once the lockfile has been updated to v3 in the repository
|
||||||
|
- name: Install npm dependencies (lockfile v3)
|
||||||
|
run: npm i --lockfile-version 3 --package-lock-only
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bun install
|
||||||
|
|
||||||
|
- name: Run validate
|
||||||
|
run: bun run validate
|
||||||
32
.github/workflows/ci-docs.yml
vendored
Normal file
32
.github/workflows/ci-docs.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: CI Docs
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
# Run on every PR, regardless of branch
|
||||||
|
branches: [ '*' ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-docs:
|
||||||
|
name: Docs Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js (latest)
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 'node' # Use 'node' for the latest version
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Test documentation
|
||||||
|
run: |
|
||||||
|
npm run doc:fp
|
||||||
|
npm run doc:site
|
||||||
|
npm run doc
|
||||||
61
.github/workflows/ci-node.yml
vendored
Normal file
61
.github/workflows/ci-node.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
name: CI Node.js
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
node-version: [
|
||||||
|
'4',
|
||||||
|
'5',
|
||||||
|
'6',
|
||||||
|
'7',
|
||||||
|
'8',
|
||||||
|
'9',
|
||||||
|
'10',
|
||||||
|
'11',
|
||||||
|
'12',
|
||||||
|
'13',
|
||||||
|
'14',
|
||||||
|
'15',
|
||||||
|
'16',
|
||||||
|
'17',
|
||||||
|
'18',
|
||||||
|
'19',
|
||||||
|
'20',
|
||||||
|
'21',
|
||||||
|
'22',
|
||||||
|
'23',
|
||||||
|
'24',
|
||||||
|
'25'
|
||||||
|
]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
# This is due to bugs in npm 3’s handling of newer package formats.
|
||||||
|
- name: Use npm@3.10.10 for Node@5
|
||||||
|
if: matrix.node-version == '5'
|
||||||
|
run: npm install -g npm@3.10.10
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Run Validate
|
||||||
|
run: npm run validate
|
||||||
73
.github/workflows/codeql.yml
vendored
Normal file
73
.github/workflows/codeql.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
|
# to commit it to your repository.
|
||||||
|
#
|
||||||
|
# You may wish to alter this file to override the set of languages analyzed,
|
||||||
|
# or to provide custom queries or build logic.
|
||||||
|
#
|
||||||
|
# ******** NOTE ********
|
||||||
|
# We have attempted to detect the languages in your repository. Please check
|
||||||
|
# the `language` matrix defined below to confirm you have the correct set of
|
||||||
|
# supported CodeQL languages.
|
||||||
|
#
|
||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: ["main"]
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * 1"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: ["javascript"]
|
||||||
|
# CodeQL supports [ $supported-codeql-languages ]
|
||||||
|
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@42213152a85ae7569bdb6bec7bcd74cd691bfe41 # v3.30.9
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
|
||||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@42213152a85ae7569bdb6bec7bcd74cd691bfe41 # v3.30.9
|
||||||
|
|
||||||
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
|
|
||||||
|
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||||
|
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||||
|
|
||||||
|
# - run: |
|
||||||
|
# echo "Run, Build Application using script"
|
||||||
|
# ./location_of_script_within_repo/buildscript.sh
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@42213152a85ae7569bdb6bec7bcd74cd691bfe41 # v3.30.9
|
||||||
|
with:
|
||||||
|
category: "/language:${{matrix.language}}"
|
||||||
19
.github/workflows/renovate.yml
vendored
Normal file
19
.github/workflows/renovate.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
name: Renovate
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 23 1 * *' # 23:00 on the first day of each month
|
||||||
|
workflow_dispatch: # allow manual runs
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
renovate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v5.0.0
|
||||||
|
- name: Self-hosted Renovate
|
||||||
|
uses: renovatebot/github-action@v44.0.0
|
||||||
|
with:
|
||||||
|
configurationFile: renovate.json
|
||||||
|
env:
|
||||||
|
RENOVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
LOG_LEVEL: info
|
||||||
58
.github/workflows/scorecards.yml
vendored
Normal file
58
.github/workflows/scorecards.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
name: Scorecard supply-chain security
|
||||||
|
on:
|
||||||
|
# For Branch-Protection check. Only the default branch is supported. See
|
||||||
|
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
||||||
|
branch_protection_rule:
|
||||||
|
# To guarantee Maintained check is occasionally updated. See
|
||||||
|
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
||||||
|
schedule:
|
||||||
|
- cron: '20 7 * * 2'
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
|
||||||
|
# Declare default permissions as read only.
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analysis:
|
||||||
|
name: Scorecard analysis
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
# Needed to upload the results to code-scanning dashboard.
|
||||||
|
security-events: write
|
||||||
|
# Needed to publish results and get a badge (see publish_results below).
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
actions: read
|
||||||
|
# To allow GraphQL ListCommits to work
|
||||||
|
issues: read
|
||||||
|
pull-requests: read
|
||||||
|
# To detect SAST tools
|
||||||
|
checks: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout code"
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: "Run analysis"
|
||||||
|
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
||||||
|
with:
|
||||||
|
results_file: results.sarif
|
||||||
|
results_format: sarif
|
||||||
|
publish_results: true
|
||||||
|
|
||||||
|
# Upload the results as artifacts so they can be downloaded later if needed.
|
||||||
|
- name: "Upload artifact"
|
||||||
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
with:
|
||||||
|
name: SARIF file
|
||||||
|
path: results.sarif
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
|
- name: "Upload to code-scanning"
|
||||||
|
uses: github/codeql-action/upload-sarif@42213152a85ae7569bdb6bec7bcd74cd691bfe41 # v3.30.9
|
||||||
|
with:
|
||||||
|
sarif_file: results.sarif
|
||||||
134
.travis.yml
134
.travis.yml
@@ -1,134 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
sudo: false
|
|
||||||
node_js:
|
|
||||||
- 7
|
|
||||||
|
|
||||||
addons:
|
|
||||||
jwt:
|
|
||||||
secure: OYhRpW+8A0Iik+9GmHwa45ZwXeBXw/6zh6I+1w2H9g/LqPRp+Nhq3f4FSpvrrfno8lO8W4h+7s6+JOzF8C8NxNda5UUygKjF9pUphgiQdqls3YZMJlC9zXVl7gQXAHi3nG1s8vWSpwpzYD9fqczE1FX9n0+R63qX3eB6C/LbPeI=
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- ~/.npm
|
|
||||||
- ~/.yarn-cache
|
|
||||||
- travis_phantomjs
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- BIN=node ISTANBUL=false OPTION=""
|
|
||||||
- SAUCE_LABS=false SAUCE_USERNAME=lodash
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
-
|
|
||||||
- BIN=phantomjs
|
|
||||||
- ISTANBUL=true
|
|
||||||
- SAUCE_LABS=true
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- node_js: 6
|
|
||||||
env:
|
|
||||||
|
|
||||||
git:
|
|
||||||
depth: 10
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
webhooks:
|
|
||||||
urls:
|
|
||||||
- https://webhooks.gitter.im/e/4aab6358b0e9aed0b628
|
|
||||||
on_success: change
|
|
||||||
on_failure: always
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
# Upgrade PhantomJS.
|
|
||||||
- |
|
|
||||||
export PHANTOMJS_VERSION=2.1.1
|
|
||||||
export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH
|
|
||||||
if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then
|
|
||||||
rm -rf $PWD/travis_phantomjs
|
|
||||||
mkdir -p $PWD/travis_phantomjs
|
|
||||||
wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2
|
|
||||||
tar -xvf phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs
|
|
||||||
fi
|
|
||||||
phantomjs -v
|
|
||||||
|
|
||||||
# Use exact Node version.
|
|
||||||
- nvm use $TRAVIS_NODE_VERSION
|
|
||||||
|
|
||||||
# Setup package managers.
|
|
||||||
- npm set loglevel error
|
|
||||||
- npm set progress false
|
|
||||||
- npm i -g yarn@0.16.1
|
|
||||||
- yarn -V
|
|
||||||
|
|
||||||
# Remove code skipped on the coverage run.
|
|
||||||
- |
|
|
||||||
PATTERN[0]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|"
|
|
||||||
PATTERN[1]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|"
|
|
||||||
PATTERN[2]="|\bcase\s+(?:dataView|promise|set|map|weakMap)CtorString:.+|g"
|
|
||||||
PATTERN[3]="|\s*if\s*\(cache\.size\b[\s\S]+?\}|"
|
|
||||||
PATTERN[4]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|"
|
|
||||||
PATTERN[5]="|\s*define\([\s\S]+?\);|"
|
|
||||||
PATTERN[6]="|\s*root\._\s*=\s*_;|"
|
|
||||||
|
|
||||||
if [ $ISTANBUL = true ]; then
|
|
||||||
set -e
|
|
||||||
for PTRN in ${PATTERN[@]}; do
|
|
||||||
node ./test/remove.js $PTRN ./lodash.js
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
install:
|
|
||||||
# Install packages.
|
|
||||||
- yarn
|
|
||||||
|
|
||||||
# Use lodash-cli from GitHub.
|
|
||||||
- git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli ./node_modules/lodash-cli
|
|
||||||
- mkdir -p ./node_modules/lodash-cli/node_modules/lodash; cd $_; cp ../../../../lodash.js ./lodash.js; cp ../../../../package.json ./package.json
|
|
||||||
- cd ../../; npm i --production; cd ../../
|
|
||||||
|
|
||||||
script:
|
|
||||||
# Detect code coverage.
|
|
||||||
- |
|
|
||||||
if [ $ISTANBUL = true ]; then
|
|
||||||
istanbul cover -x "**/vendor/**" --report lcovonly ./test/test.js -- ./lodash.js
|
|
||||||
if [ $TRAVIS_SECURE_ENV_VARS = true ]; then
|
|
||||||
cat ./coverage/lcov.info | coveralls
|
|
||||||
cat ./coverage/coverage.json | codecov
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Test in Node.js and PhantomJS.
|
|
||||||
- |
|
|
||||||
if [ $ISTANBUL = false ]; then
|
|
||||||
node ./node_modules/lodash-cli/bin/lodash -o ./dist/lodash.js
|
|
||||||
node ./node_modules/lodash-cli/bin/lodash modularize exports=node -o ./
|
|
||||||
node ./node_modules/lodash-cli/bin/lodash -d -o ./lodash.js
|
|
||||||
if [ $SAUCE_LABS = false ]; then
|
|
||||||
cd ./test
|
|
||||||
$BIN $OPTION ./test.js ../lodash.js
|
|
||||||
if [ $TRAVIS_SECURE_ENV_VARS = true ]; then
|
|
||||||
$BIN $OPTION ./test.js ../dist/lodash.min.js
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Test in Sauce Labs.
|
|
||||||
- |
|
|
||||||
if [ $SAUCE_LABS = true ]; then
|
|
||||||
node ./node_modules/lodash-cli/bin/lodash core -o ./dist/lodash.core.js
|
|
||||||
npm run build
|
|
||||||
$BIN ./test/saucelabs.js name="lodash tests" runner="test/index.html?build=../dist/lodash.js&noglobals=true" tags=development
|
|
||||||
$BIN ./test/saucelabs.js name="lodash tests" runner="test/index.html?build=../dist/lodash.min.js&noglobals=true" tags=production
|
|
||||||
$BIN ./test/saucelabs.js name="lodash-fp tests" runner="test/fp.html?noglobals=true" tags=development
|
|
||||||
$BIN ./test/saucelabs.js name="underscore tests" runner="test/underscore.html?build=../dist/lodash.js" tags=development,underscore
|
|
||||||
$BIN ./test/saucelabs.js name="underscore tests" runner="test/underscore.html?build=../dist/lodash.min.js" tags=production,underscore
|
|
||||||
$BIN ./test/saucelabs.js name="backbone tests" runner="test/backbone.html?build=../dist/lodash.js" tags=development,backbone
|
|
||||||
$BIN ./test/saucelabs.js name="backbone tests" runner="test/backbone.html?build=../dist/lodash.min.js" tags=production,backbone
|
|
||||||
$BIN ./test/saucelabs.js name="backbone tests" runner="test/backbone.html?build=../dist/lodash.core.js" tags=development,backbone
|
|
||||||
$BIN ./test/saucelabs.js name="backbone tests" runner="test/backbone.html?build=../dist/lodash.core.min.js" tags=production,backbone
|
|
||||||
fi
|
|
||||||
25
GOVERNANCE.md
Normal file
25
GOVERNANCE.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
> [!IMPORTANT]
|
||||||
|
> As announced on the [OpenJS Foundation blog](https://openjsf.org/blog/sta-supports-lodash), Lodash has received support from the Sovereign Tech Agency and will transition to the Feature-Complete maturity stage so that it remains stable, secure, and sustainable long-term. As part of this effort, Lodash is rebooting its governance. A draft charter will be published shortly. The upcoming Technical Steering Committee (TSC) is already at work. For transparency, its members are listed below.
|
||||||
|
|
||||||
|
# Lodash Governance
|
||||||
|
|
||||||
|
## Technical Steering Committee Members
|
||||||
|
|
||||||
|
The current Technical Steering Committee (TSC) members are:
|
||||||
|
|
||||||
|
- John-David Dalton ([@jdalton](https://github.com/jdalton)), _(Lodash creator)_
|
||||||
|
- Jon Church ([@jonchurch](https://github.com/jonchurch))
|
||||||
|
- Jordan Harband ([@ljharb](https://github.com/ljharb))
|
||||||
|
- Michał Lipiński ([@falsyvalues](https://github.com/falsyvalues))
|
||||||
|
- Tobie Langel ([@tobie](https://github.com/tobie))
|
||||||
|
- Ulises Gascón ([@ulisesgascon](https://github.com/UlisesGascon))
|
||||||
|
|
||||||
|
## Security Triage Team
|
||||||
|
|
||||||
|
The Security Triage Team is responsible for assessing and managing vulnerability and incident reports. Security triaging is currently handled by the [TSC](#technical-steering-committee-members).
|
||||||
|
|
||||||
|
## Release Team
|
||||||
|
|
||||||
|
The Release Team is solely responsible for publishing new versions of Lodash to npm. Its current member is:
|
||||||
|
|
||||||
|
- John-David Dalton ([@jdalton](https://github.com/jdalton))
|
||||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
|||||||
Copyright JS Foundation and other contributors <https://js.foundation/>
|
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||||
|
|
||||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -1,14 +1,18 @@
|
|||||||
# lodash v4.17.4
|
# lodash v4.17.21
|
||||||
|
|
||||||
[Site](https://lodash.com/) |
|
[Site](https://lodash.com/) |
|
||||||
[Docs](https://lodash.com/docs) |
|
[Docs](https://lodash.com/docs) |
|
||||||
[FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide) |
|
[FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide) |
|
||||||
[Contributing](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md) |
|
[Contributing](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md) |
|
||||||
[Wiki](https://github.com/lodash/lodash/wiki "Changelog, Roadmap, etc.") |
|
[Wiki](https://github.com/lodash/lodash/wiki "Changelog, Roadmap, etc.") |
|
||||||
[Code of Conduct](https://js.foundation/conduct/) |
|
[Code of Conduct](https://github.com/openjs-foundation/cross-project-council/blob/main/CODE_OF_CONDUCT.md) |
|
||||||
|
[Governance](https://github.com/lodash/lodash/blob/HEAD/GOVERNANCE.md) |
|
||||||
[Twitter](https://twitter.com/bestiejs) |
|
[Twitter](https://twitter.com/bestiejs) |
|
||||||
[Chat](https://gitter.im/lodash/lodash)
|
[Chat](https://gitter.im/lodash/lodash)
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> As announced on the [OpenJS Foundation blog](https://openjsf.org/blog/sta-supports-lodash), Lodash has received support from the Sovereign Tech Agency and will transition to the Feature-Complete maturity stage so that it remains stable, secure, and sustainable long-term. As part of this effort, Lodash is rebooting its governance. A draft charter will be published shortly. The upcoming Technical Steering Committee (TSC) is already at work. For transparency, its members are listed in [GOVERNANCE.md](https://github.com/lodash/lodash/blob/HEAD/GOVERNANCE.md).
|
||||||
|
|
||||||
The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.
|
The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.
|
||||||
|
|
||||||
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
|
Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
|
||||||
@@ -20,11 +24,11 @@ $ lodash core -o ./dist/lodash.core.js
|
|||||||
|
|
||||||
## Download
|
## Download
|
||||||
|
|
||||||
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.17.4/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.4/dist/lodash.core.min.js))
|
* [Core build](https://raw.githubusercontent.com/lodash/lodash/4.17.21/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.21/dist/lodash.core.min.js))
|
||||||
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.17.4/dist/lodash.js) ([~24 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.4/dist/lodash.min.js))
|
* [Full build](https://raw.githubusercontent.com/lodash/lodash/4.17.21/dist/lodash.js) ([~24 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.17.21/dist/lodash.min.js))
|
||||||
* [CDN copies](https://www.jsdelivr.com/projects/lodash)
|
* [CDN copies](https://www.jsdelivr.com/projects/lodash)
|
||||||
|
|
||||||
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.17.4/LICENSE) & supports modern environments.<br>
|
Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.17.21/LICENSE) & supports modern environments.<br>
|
||||||
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you.
|
Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
@@ -78,3 +82,5 @@ Lodash is available in a [variety of builds](https://lodash.com/custom-builds) &
|
|||||||
* [lodash-es](https://www.npmjs.com/package/lodash-es), [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash), & [lodash-webpack-plugin](https://www.npmjs.com/package/lodash-webpack-plugin)
|
* [lodash-es](https://www.npmjs.com/package/lodash-es), [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash), & [lodash-webpack-plugin](https://www.npmjs.com/package/lodash-webpack-plugin)
|
||||||
* [lodash/fp](https://github.com/lodash/lodash/tree/npm/fp)
|
* [lodash/fp](https://github.com/lodash/lodash/tree/npm/fp)
|
||||||
* [lodash-amd](https://www.npmjs.com/package/lodash-amd)
|
* [lodash-amd](https://www.npmjs.com/package/lodash-amd)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
47
SECURITY.md
Normal file
47
SECURITY.md
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported versions
|
||||||
|
|
||||||
|
The following table describes the versions of this project that are currently
|
||||||
|
supported with security updates:
|
||||||
|
|
||||||
|
| Version | Supported |
|
||||||
|
| ------- | ------------------ |
|
||||||
|
| 4.x | :white_check_mark: |
|
||||||
|
| 3.x | :x: |
|
||||||
|
| 2.x | :x: |
|
||||||
|
| 1.x | :x: |
|
||||||
|
|
||||||
|
## Threat Model
|
||||||
|
|
||||||
|
To better understand which classes of vulnerabilities are considered in-scope or out-of-scope for Lodash, please review the [Lodash Threat Model](./threat-model.md).
|
||||||
|
|
||||||
|
The threat model defines Lodash’s trust boundaries and clarifies how security issues are assessed for triage and disclosure.
|
||||||
|
|
||||||
|
## Responsible disclosure security policy
|
||||||
|
|
||||||
|
A responsible disclosure policy helps protect users of the project from publicly
|
||||||
|
disclosed security vulnerabilities without a fix by employing a process where
|
||||||
|
vulnerabilities are first triaged in a private manner, and only publicly disclosed
|
||||||
|
after a reasonable time period that allows patching the vulnerability and provides
|
||||||
|
an upgrade path for users.
|
||||||
|
|
||||||
|
We kindly ask you to refrain from malicious acts that put our users, the project,
|
||||||
|
or any of the project’s team members at risk.
|
||||||
|
|
||||||
|
## Reporting a security issue
|
||||||
|
|
||||||
|
We consider the security of Lodash a top priority. But no matter how much effort
|
||||||
|
we put into security, there can still be vulnerabilities present.
|
||||||
|
|
||||||
|
If you discover a security vulnerability, please report the security issue
|
||||||
|
directly to the Lodash maintainers through the [Security tab](https://github.com/lodash/lodash/security) of the Lodash
|
||||||
|
repository.
|
||||||
|
|
||||||
|
Your efforts to responsibly disclose your findings are sincerely appreciated.
|
||||||
|
|
||||||
|
## Escalation
|
||||||
|
|
||||||
|
If you do not receive an acknowledgement of your report within 6 business days, or if you cannot find a private security contact for the project, you may escalate to the OpenJS Foundation CNA at `security@lists.openjsf.org`.
|
||||||
|
|
||||||
|
If the project acknowledges your report but does not provide any further response or engagement within 14 days, escalation is also appropriate.
|
||||||
163
dist/lodash.core.js
vendored
163
dist/lodash.core.js
vendored
@@ -2,7 +2,7 @@
|
|||||||
* @license
|
* @license
|
||||||
* Lodash (Custom Build) <https://lodash.com/>
|
* Lodash (Custom Build) <https://lodash.com/>
|
||||||
* Build: `lodash core -o ./dist/lodash.core.js`
|
* Build: `lodash core -o ./dist/lodash.core.js`
|
||||||
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||||
* Released under MIT license <https://lodash.com/license>
|
* Released under MIT license <https://lodash.com/license>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
var undefined;
|
var undefined;
|
||||||
|
|
||||||
/** Used as the semantic version number. */
|
/** Used as the semantic version number. */
|
||||||
var VERSION = '4.17.4';
|
var VERSION = '4.17.21';
|
||||||
|
|
||||||
/** Error message constants. */
|
/** Error message constants. */
|
||||||
var FUNC_ERROR_TEXT = 'Expected a function';
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
||||||
@@ -49,6 +49,9 @@
|
|||||||
var reUnescapedHtml = /[&<>"']/g,
|
var reUnescapedHtml = /[&<>"']/g,
|
||||||
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
|
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
|
||||||
|
|
||||||
|
/** Used to detect unsigned integer values. */
|
||||||
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
||||||
|
|
||||||
/** Used to map characters to HTML entities. */
|
/** Used to map characters to HTML entities. */
|
||||||
var htmlEscapes = {
|
var htmlEscapes = {
|
||||||
'&': '&',
|
'&': '&',
|
||||||
@@ -1159,26 +1162,6 @@
|
|||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Used by `_.defaults` to customize its `_.assignIn` use to assign properties
|
|
||||||
* of source objects to the destination object for all destination properties
|
|
||||||
* that resolve to `undefined`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {*} objValue The destination value.
|
|
||||||
* @param {*} srcValue The source value.
|
|
||||||
* @param {string} key The key of the property to assign.
|
|
||||||
* @param {Object} object The parent object of `objValue`.
|
|
||||||
* @returns {*} Returns the value to assign.
|
|
||||||
*/
|
|
||||||
function customDefaultsAssignIn(objValue, srcValue, key, object) {
|
|
||||||
if (objValue === undefined ||
|
|
||||||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
|
||||||
return srcValue;
|
|
||||||
}
|
|
||||||
return objValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
||||||
* partial deep comparisons.
|
* partial deep comparisons.
|
||||||
@@ -1200,6 +1183,12 @@
|
|||||||
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Check that cyclic values are equal.
|
||||||
|
var arrStacked = stack.get(array);
|
||||||
|
var othStacked = stack.get(other);
|
||||||
|
if (arrStacked && othStacked) {
|
||||||
|
return arrStacked == other && othStacked == array;
|
||||||
|
}
|
||||||
var index = -1,
|
var index = -1,
|
||||||
result = true,
|
result = true,
|
||||||
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined;
|
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? [] : undefined;
|
||||||
@@ -1310,6 +1299,12 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Check that cyclic values are equal.
|
||||||
|
var objStacked = stack.get(object);
|
||||||
|
var othStacked = stack.get(other);
|
||||||
|
if (objStacked && othStacked) {
|
||||||
|
return objStacked == other && othStacked == object;
|
||||||
|
}
|
||||||
var result = true;
|
var result = true;
|
||||||
|
|
||||||
var skipCtor = isPartial;
|
var skipCtor = isPartial;
|
||||||
@@ -1366,6 +1361,48 @@
|
|||||||
return isArray(value) || isArguments(value);
|
return isArray(value) || isArguments(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if `value` is a valid array-like index.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The value to check.
|
||||||
|
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
||||||
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||||
|
*/
|
||||||
|
function isIndex(value, length) {
|
||||||
|
var type = typeof value;
|
||||||
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||||
|
|
||||||
|
return !!length &&
|
||||||
|
(type == 'number' ||
|
||||||
|
(type != 'symbol' && reIsUint.test(value))) &&
|
||||||
|
(value > -1 && value % 1 == 0 && value < length);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the given arguments are from an iteratee call.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {*} value The potential iteratee value argument.
|
||||||
|
* @param {*} index The potential iteratee index or key argument.
|
||||||
|
* @param {*} object The potential iteratee object argument.
|
||||||
|
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
||||||
|
* else `false`.
|
||||||
|
*/
|
||||||
|
function isIterateeCall(value, index, object) {
|
||||||
|
if (!isObject(object)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var type = typeof index;
|
||||||
|
if (type == 'number'
|
||||||
|
? (isArrayLike(object) && isIndex(index, object.length))
|
||||||
|
: (type == 'string' && index in object)
|
||||||
|
) {
|
||||||
|
return eq(object[index], value);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is like
|
* This function is like
|
||||||
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
||||||
@@ -1910,6 +1947,10 @@
|
|||||||
* // The `_.property` iteratee shorthand.
|
* // The `_.property` iteratee shorthand.
|
||||||
* _.filter(users, 'active');
|
* _.filter(users, 'active');
|
||||||
* // => objects for ['barney']
|
* // => objects for ['barney']
|
||||||
|
*
|
||||||
|
* // Combining several predicates using `_.overEvery` or `_.overSome`.
|
||||||
|
* _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
|
||||||
|
* // => objects for ['fred', 'barney']
|
||||||
*/
|
*/
|
||||||
function filter(collection, predicate) {
|
function filter(collection, predicate) {
|
||||||
return baseFilter(collection, baseIteratee(predicate));
|
return baseFilter(collection, baseIteratee(predicate));
|
||||||
@@ -2163,15 +2204,15 @@
|
|||||||
* var users = [
|
* var users = [
|
||||||
* { 'user': 'fred', 'age': 48 },
|
* { 'user': 'fred', 'age': 48 },
|
||||||
* { 'user': 'barney', 'age': 36 },
|
* { 'user': 'barney', 'age': 36 },
|
||||||
* { 'user': 'fred', 'age': 40 },
|
* { 'user': 'fred', 'age': 30 },
|
||||||
* { 'user': 'barney', 'age': 34 }
|
* { 'user': 'barney', 'age': 34 }
|
||||||
* ];
|
* ];
|
||||||
*
|
*
|
||||||
* _.sortBy(users, [function(o) { return o.user; }]);
|
* _.sortBy(users, [function(o) { return o.user; }]);
|
||||||
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
|
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
|
||||||
*
|
*
|
||||||
* _.sortBy(users, ['user', 'age']);
|
* _.sortBy(users, ['user', 'age']);
|
||||||
* // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
|
* // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
|
||||||
*/
|
*/
|
||||||
function sortBy(collection, iteratee) {
|
function sortBy(collection, iteratee) {
|
||||||
var index = 0;
|
var index = 0;
|
||||||
@@ -3098,39 +3139,6 @@
|
|||||||
copyObject(source, nativeKeysIn(source), object);
|
copyObject(source, nativeKeysIn(source), object);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* This method is like `_.assignIn` except that it accepts `customizer`
|
|
||||||
* which is invoked to produce the assigned values. If `customizer` returns
|
|
||||||
* `undefined`, assignment is handled by the method instead. The `customizer`
|
|
||||||
* is invoked with five arguments: (objValue, srcValue, key, object, source).
|
|
||||||
*
|
|
||||||
* **Note:** This method mutates `object`.
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
* @memberOf _
|
|
||||||
* @since 4.0.0
|
|
||||||
* @alias extendWith
|
|
||||||
* @category Object
|
|
||||||
* @param {Object} object The destination object.
|
|
||||||
* @param {...Object} sources The source objects.
|
|
||||||
* @param {Function} [customizer] The function to customize assigned values.
|
|
||||||
* @returns {Object} Returns `object`.
|
|
||||||
* @see _.assignWith
|
|
||||||
* @example
|
|
||||||
*
|
|
||||||
* function customizer(objValue, srcValue) {
|
|
||||||
* return _.isUndefined(objValue) ? srcValue : objValue;
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* var defaults = _.partialRight(_.assignInWith, customizer);
|
|
||||||
*
|
|
||||||
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
|
||||||
* // => { 'a': 1, 'b': 2 }
|
|
||||||
*/
|
|
||||||
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|
||||||
copyObject(source, keysIn(source), object, customizer);
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an object that inherits from the `prototype` object. If a
|
* Creates an object that inherits from the `prototype` object. If a
|
||||||
* `properties` object is given, its own enumerable string keyed properties
|
* `properties` object is given, its own enumerable string keyed properties
|
||||||
@@ -3191,9 +3199,35 @@
|
|||||||
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
||||||
* // => { 'a': 1, 'b': 2 }
|
* // => { 'a': 1, 'b': 2 }
|
||||||
*/
|
*/
|
||||||
var defaults = baseRest(function(args) {
|
var defaults = baseRest(function(object, sources) {
|
||||||
args.push(undefined, customDefaultsAssignIn);
|
object = Object(object);
|
||||||
return assignInWith.apply(undefined, args);
|
|
||||||
|
var index = -1;
|
||||||
|
var length = sources.length;
|
||||||
|
var guard = length > 2 ? sources[2] : undefined;
|
||||||
|
|
||||||
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||||||
|
length = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var source = sources[index];
|
||||||
|
var props = keysIn(source);
|
||||||
|
var propsIndex = -1;
|
||||||
|
var propsLength = props.length;
|
||||||
|
|
||||||
|
while (++propsIndex < propsLength) {
|
||||||
|
var key = props[propsIndex];
|
||||||
|
var value = object[key];
|
||||||
|
|
||||||
|
if (value === undefined ||
|
||||||
|
(eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
||||||
|
object[key] = source[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return object;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3485,6 +3519,9 @@
|
|||||||
* values against any array or object value, respectively. See `_.isEqual`
|
* values against any array or object value, respectively. See `_.isEqual`
|
||||||
* for a list of supported value comparisons.
|
* for a list of supported value comparisons.
|
||||||
*
|
*
|
||||||
|
* **Note:** Multiple values can be checked by combining several matchers
|
||||||
|
* using `_.overSome`
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
@@ -3500,6 +3537,10 @@
|
|||||||
*
|
*
|
||||||
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
|
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
|
||||||
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
|
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
|
||||||
|
*
|
||||||
|
* // Checking for several possible values
|
||||||
|
* _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
|
||||||
|
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
|
||||||
*/
|
*/
|
||||||
function matches(source) {
|
function matches(source) {
|
||||||
return baseMatches(assign({}, source));
|
return baseMatches(assign({}, source));
|
||||||
|
|||||||
48
dist/lodash.core.min.js
vendored
48
dist/lodash.core.min.js
vendored
@@ -3,27 +3,27 @@
|
|||||||
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||||
* Build: `lodash core -o ./dist/lodash.core.js`
|
* Build: `lodash core -o ./dist/lodash.core.js`
|
||||||
*/
|
*/
|
||||||
;(function(){function n(n){return K(n)&&pn.call(n,"callee")&&!bn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?nn:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");
|
;(function(){function n(n){return H(n)&&pn.call(n,"callee")&&!yn.call(n,"callee")}function t(n,t){return n.push.apply(n,t),n}function r(n){return function(t){return null==t?Z:t[n]}}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return j(t,function(t){return n[t]})}function o(n){return n instanceof i?n:new i(n)}function i(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function c(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");
|
||||||
return setTimeout(function(){n.apply(nn,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===nn?i===i:r(i,c)))var c=i,f=o}return f}function l(n,t){var r=[];return mn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function p(n,r,e,u,o){var i=-1,c=n.length;for(e||(e=D),o||(o=[]);++i<c;){var f=n[i];0<r&&e(f)?1<r?p(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f)}return o}function s(n,t){return n&&On(n,t,In);
|
return setTimeout(function(){n.apply(Z,r)},t)}function f(n,t){var r=true;return mn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function a(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===Z?i===i:r(i,c)))var c=i,f=o}return f}function l(n,t){var r=[];return mn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function p(n,r,e,u,o){var i=-1,c=n.length;for(e||(e=R),o||(o=[]);++i<c;){var f=n[i];0<r&&e(f)?1<r?p(f,r-1,e,u,o):t(o,f):u||(o[o.length]=f)}return o}function s(n,t){return n&&On(n,t,Dn);
|
||||||
}function h(n,t){return l(t,function(t){return V(n[t])})}function v(n,t){return n>t}function y(n,t,r,e,u){return n===t||(null==n||null==t||!K(n)&&!K(t)?n!==n&&t!==t:b(n,t,r,e,y,u))}function b(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){
|
}function h(n,t){return l(t,function(t){return U(n[t])})}function v(n,t){return n>t}function b(n,t,r,e,u){return n===t||(null==n||null==t||!H(n)&&!H(t)?n!==n&&t!==t:y(n,t,r,e,b,u))}function y(n,t,r,e,u,o){var i=Nn(n),c=Nn(t),f=i?"[object Array]":hn.call(n),a=c?"[object Array]":hn.call(t),f="[object Arguments]"==f?"[object Object]":f,a="[object Arguments]"==a?"[object Object]":a,l="[object Object]"==f,c="[object Object]"==a,a=f==a;o||(o=[]);var p=An(o,function(t){return t[0]==n}),s=An(o,function(n){
|
||||||
return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=B(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=M(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=R(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t,
|
return n[0]==t});if(p&&s)return p[1]==t;if(o.push([n,t]),o.push([t,n]),a&&!l){if(i)r=T(n,t,r,e,u,o);else n:{switch(f){case"[object Boolean]":case"[object Date]":case"[object Number]":r=J(+n,+t);break n;case"[object Error]":r=n.name==t.name&&n.message==t.message;break n;case"[object RegExp]":case"[object String]":r=n==t+"";break n}r=false}return o.pop(),r}return 1&r||(i=l&&pn.call(n,"__wrapped__"),f=c&&pn.call(t,"__wrapped__"),!i&&!f)?!!a&&(r=B(n,t,r,e,u,o),o.pop(),r):(i=i?n.value():n,f=f?t.value():t,
|
||||||
r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?Y:(typeof n=="object"?d:r)(n)}function _(n,t){return n<t}function j(n,t){var r=-1,e=U(n)?Array(n.length):[];return mn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function d(n){var t=_n(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&y(n[u],r[u],3)))return false}return true}}function m(n,t){return n=Object(n),G(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function O(n){return xn(q(n,void 0,Y),n+"");
|
r=u(i,f,r,e,o),o.pop(),r)}function g(n){return typeof n=="function"?n:null==n?X:(typeof n=="object"?d:r)(n)}function _(n,t){return n<t}function j(n,t){var r=-1,e=M(n)?Array(n.length):[];return mn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function d(n){var t=_n(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&b(n[u],r[u],3)))return false}return true}}function m(n,t){return n=Object(n),C(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function O(n){return xn(I(n,void 0,X),n+"");
|
||||||
}function x(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function A(n){return x(n,0,n.length)}function E(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function w(n,r){return G(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function k(n,t,r,e){var u=!r;r||(r={});for(var o=-1,i=t.length;++o<i;){var c=t[o],f=e?e(r[c],n[c],c,r,n):nn;if(f===nn&&(f=n[c]),u)r[c]=f;else{var a=r,l=a[c];
|
}function x(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function A(n){return x(n,0,n.length)}function E(n,t){var r;return mn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function w(n,r){return C(r,function(n,r){return r.func.apply(r.thisArg,t([n],r.args))},n)}function k(n,t,r){var e=!r;r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=Z;if(c===Z&&(c=n[i]),e)r[i]=c;else{var f=r,a=f[i];pn.call(f,i)&&J(a,c)&&(c!==Z||i in f)||(f[i]=c);
|
||||||
pn.call(a,c)&&M(l,f)&&(f!==nn||c in a)||(a[c]=f)}}return r}function N(n){return O(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:nn,o=3<n.length&&typeof o=="function"?(u--,o):nn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function F(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return H(t)?t:r}}function S(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==on&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];
|
}}return r}function N(n){return O(function(t,r){var e=-1,u=r.length,o=1<u?r[u-1]:Z,o=3<n.length&&typeof o=="function"?(u--,o):Z;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function F(n){return function(){var t=arguments,r=dn(n.prototype),t=n.apply(r,t);return V(t)?t:r}}function S(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==on&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");
|
||||||
return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=F(n);return e}function T(n,t,r,e){return n===nn||M(n,ln[r])&&!pn.call(e,r)?t:n}function B(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(1&r&&c>i))return false;for(var c=-1,f=true,a=2&r?[]:nn;++c<i;){var l=n[c],p=t[c];if(void 0!==nn){f=false;break}if(a){if(!E(t,function(n,t){if(!z(a,t)&&(l===n||u(l,n,r,e,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!u(l,p,r,e,o)){f=false;break}}return f}function R(n,t,r,e,u,o){
|
var u=F(n);return e}function T(n,t,r,e,u,o){var i=n.length,c=t.length;if(i!=c&&!(1&r&&c>i))return false;var c=o.get(n),f=o.get(t);if(c&&f)return c==t&&f==n;for(var c=-1,f=true,a=2&r?[]:Z;++c<i;){var l=n[c],p=t[c];if(void 0!==Z){f=false;break}if(a){if(!E(t,function(n,t){if(!P(a,t)&&(l===n||u(l,n,r,e,o)))return a.push(t)})){f=false;break}}else if(l!==p&&!u(l,p,r,e,o)){f=false;break}}return f}function B(n,t,r,e,u,o){var i=1&r,c=Dn(n),f=c.length,a=Dn(t).length;if(f!=a&&!i)return false;for(a=f;a--;){var l=c[a];if(!(i?l in t:pn.call(t,l)))return false;
|
||||||
var i=1&r,c=In(n),f=c.length,a=In(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:pn.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==nn||s!==h&&!u(s,h,r,e,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function D(t){return Nn(t)||n(t)}function I(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);
|
}var p=o.get(n),l=o.get(t);if(p&&l)return p==t&&l==n;for(p=true;++a<f;){var l=c[a],s=n[l],h=t[l];if(void 0!==Z||s!==h&&!u(s,h,r,e,o)){p=false;break}i||(i="constructor"==l)}return p&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(p=false)),p}function R(t){return Nn(t)||n(t)}function D(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}function I(n,t,r){return t=jn(t===Z?n.length-1:t,0),
|
||||||
return t}function q(n,t,r){return t=jn(t===nn?n.length-1:t,0),function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return(null==n?0:n.length)?p(n,1):[]}function P(n){return n&&n.length?n[0]:nn}function z(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?0>r?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function C(n,t){return mn(n,g(t));
|
function(){for(var e=arguments,u=-1,o=jn(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];for(u=-1,o=Array(t+1);++u<t;)o[u]=e[u];return o[t]=r(i),n.apply(this,o)}}function $(n){return(null==n?0:n.length)?p(n,1):[]}function q(n){return n&&n.length?n[0]:Z}function P(n,t,r){var e=null==n?0:n.length;r=typeof r=="number"?0>r?jn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function z(n,t){return mn(n,g(t))}function C(n,t,r){return e(n,g(t),r,3>arguments.length,mn);
|
||||||
}function G(n,t,r){return e(n,g(t),r,3>arguments.length,mn)}function J(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=nn),r}}function M(n,t){return n===t||n!==n&&t!==t}function U(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!V(n)}function V(n){return!!H(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n);
|
}function G(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Fn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=Z),r}}function J(n,t){return n===t||n!==n&&t!==t}function M(n){var t;return(t=null!=n)&&(t=n.length,t=typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t),t&&!U(n)}function U(n){return!!V(n)&&(n=hn.call(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function V(n){var t=typeof n;
|
||||||
}function H(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function K(n){return null!=n&&typeof n=="object"}function L(n){return typeof n=="number"||K(n)&&"[object Number]"==hn.call(n)}function Q(n){return typeof n=="string"||!Nn(n)&&K(n)&&"[object String]"==hn.call(n)}function W(n){return typeof n=="string"?n:null==n?"":n+""}function X(n){return null==n?[]:u(n,In(n))}function Y(n){return n}function Z(n,r,e){var u=In(r),o=h(r,u);null!=e||H(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,In(r)));
|
return null!=n&&("object"==t||"function"==t)}function H(n){return null!=n&&typeof n=="object"}function K(n){return typeof n=="number"||H(n)&&"[object Number]"==hn.call(n)}function L(n){return typeof n=="string"||!Nn(n)&&H(n)&&"[object String]"==hn.call(n)}function Q(n){return typeof n=="string"?n:null==n?"":n+""}function W(n){return null==n?[]:u(n,Dn(n))}function X(n){return n}function Y(n,r,e){var u=Dn(r),o=h(r,u);null!=e||V(r)&&(o.length||!u.length)||(e=r,r=n,n=this,o=h(r,Dn(r)));var i=!(V(e)&&"chain"in e&&!e.chain),c=U(n);
|
||||||
var i=!(H(e)&&"chain"in e&&!e.chain),c=V(n);return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var nn,tn=1/0,rn=/[&<>"']/g,en=RegExp(rn.source),un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){
|
return mn(o,function(e){var u=r[e];n[e]=u,c&&(n.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=n(this.__wrapped__);return(e.__actions__=A(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=r,e}return u.apply(n,t([this.value()],arguments))})}),n}var Z,nn=1/0,tn=/[&<>"']/g,rn=RegExp(tn.source),en=/^(?:0|[1-9]\d*)$/,un=typeof self=="object"&&self&&self.Object===Object&&self,on=typeof global=="object"&&global&&global.Object===Object&&global||un||Function("return this")(),cn=(un=typeof exports=="object"&&exports&&!exports.nodeType&&exports)&&typeof module=="object"&&module&&!module.nodeType&&module,fn=function(n){
|
||||||
return function(t){return null==n?nn:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,yn=Object.create,bn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return H(t)?yn?yn(t):(n.prototype=t,t=new n,n.prototype=nn,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i;
|
return function(t){return null==n?Z:n[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'"}),an=Array.prototype,ln=Object.prototype,pn=ln.hasOwnProperty,sn=0,hn=ln.toString,vn=on._,bn=Object.create,yn=ln.propertyIsEnumerable,gn=on.isFinite,_n=function(n,t){return function(r){return n(t(r))}}(Object.keys,Object),jn=Math.max,dn=function(){function n(){}return function(t){return V(t)?bn?bn(t):(n.prototype=t,t=new n,n.prototype=Z,t):{}}}();i.prototype=dn(o.prototype),i.prototype.constructor=i;
|
||||||
var mn=function(n,t){return function(r,e){if(null==r)return r;if(!U(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(s),On=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),xn=Y,An=function(n){return function(t,r,e){var u=Object(t);if(!U(t)){var o=g(r);t=In(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:nn}}(function(n,t,r){var e=null==n?0:n.length;
|
var mn=function(n,t){return function(r,e){if(null==r)return r;if(!M(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(s),On=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),xn=X,An=function(n){return function(t,r,e){var u=Object(t);if(!M(t)){var o=g(r);t=Dn(t),r=function(n){return o(u[n],n,u)}}return r=n(t,r,e),-1<r?u[o?t[r]:r]:Z}}(function(n,t,r){var e=null==n?0:n.length;
|
||||||
if(!e)return-1;r=null==r?0:Fn(r),0>r&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),En=O(function(n,t,r){return S(n,t,r)}),wn=O(function(n,t){return c(n,1,t)}),kn=O(function(n,t,r){return c(n,Sn(t)||0,r)}),Nn=Array.isArray,Fn=Number,Sn=Number,Tn=N(function(n,t){k(t,_n(t),n)}),Bn=N(function(n,t){k(t,I(t),n)}),Rn=N(function(n,t,r,e){k(t,qn(t),n,e)}),Dn=O(function(n){return n.push(nn,T),Rn.apply(nn,n)}),In=_n,qn=I,$n=function(n){return xn(q(n,nn,$),n+"");
|
if(!e)return-1;r=null==r?0:Fn(r),0>r&&(r=jn(e+r,0));n:{for(t=g(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),En=O(function(n,t,r){return S(n,t,r)}),wn=O(function(n,t){return c(n,1,t)}),kn=O(function(n,t,r){return c(n,Sn(t)||0,r)}),Nn=Array.isArray,Fn=Number,Sn=Number,Tn=N(function(n,t){k(t,_n(t),n)}),Bn=N(function(n,t){k(t,D(t),n)}),Rn=O(function(n,t){n=Object(n);var r,e=-1,u=t.length,o=2<u?t[2]:Z;if(r=o){r=t[0];var i=t[1];if(V(o)){var c=typeof i;if("number"==c){if(c=M(o))var c=o.length,f=typeof i,c=null==c?9007199254740991:c,c=!!c&&("number"==f||"symbol"!=f&&en.test(i))&&-1<i&&0==i%1&&i<c;
|
||||||
}(function(n,t){return null==n?{}:m(n,t)});o.assignIn=Bn,o.before=J,o.bind=En,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return l(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];return t(Nn(e)?A(e):[e],p(r,1))},o.create=function(n,t){var r=dn(n);return null==t?r:Tn(r,t)},o.defaults=Dn,o.defer=wn,o.delay=kn,o.filter=function(n,t){return l(n,g(t))},o.flatten=$,o.flattenDeep=function(n){
|
}else c="string"==c&&i in o;r=!!c&&J(o[i],r)}else r=false}for(r&&(u=1);++e<u;)for(o=t[e],r=In(o),i=-1,c=r.length;++i<c;){var f=r[i],a=n[f];(a===Z||J(a,ln[f])&&!pn.call(n,f))&&(n[f]=o[f])}return n}),Dn=_n,In=D,$n=function(n){return xn(I(n,Z,$),n+"")}(function(n,t){return null==n?{}:m(n,t)});o.assignIn=Bn,o.before=G,o.bind=En,o.chain=function(n){return n=o(n),n.__chain__=true,n},o.compact=function(n){return l(n,Boolean)},o.concat=function(){var n=arguments.length;if(!n)return[];for(var r=Array(n-1),e=arguments[0];n--;)r[n-1]=arguments[n];
|
||||||
return(null==n?0:n.length)?p(n,tn):[]},o.iteratee=g,o.keys=In,o.map=function(n,t){return j(n,g(t))},o.matches=function(n){return d(Tn({},n))},o.mixin=Z,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},o.once=function(n){return J(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===nn?e:+r,e?x(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=g(t),j(j(n,function(n,r,u){return{
|
return t(Nn(e)?A(e):[e],p(r,1))},o.create=function(n,t){var r=dn(n);return null==t?r:Tn(r,t)},o.defaults=Rn,o.defer=wn,o.delay=kn,o.filter=function(n,t){return l(n,g(t))},o.flatten=$,o.flattenDeep=function(n){return(null==n?0:n.length)?p(n,nn):[]},o.iteratee=g,o.keys=Dn,o.map=function(n,t){return j(n,g(t))},o.matches=function(n){return d(Tn({},n))},o.mixin=Y,o.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},o.once=function(n){
|
||||||
value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==nn,o=null===r,i=r===r,c=e!==nn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return U(n)?n.length?A(n):[]:X(n)},o.values=X,o.extend=Bn,Z(o,o),o.clone=function(n){return H(n)?Nn(n)?A(n):k(n,_n(n)):n;
|
return G(2,n)},o.pick=$n,o.slice=function(n,t,r){var e=null==n?0:n.length;return r=r===Z?e:+r,e?x(n,null==t?0:+t,r):[]},o.sortBy=function(n,t){var e=0;return t=g(t),j(j(n,function(n,r,u){return{value:n,index:e++,criteria:t(n,r,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==Z,o=null===r,i=r===r,c=e!==Z,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&r<e||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),r("value"))},o.tap=function(n,t){
|
||||||
},o.escape=function(n){return(n=W(n))&&en.test(n)?n.replace(rn,fn):n},o.every=function(n,t,r){return t=r?nn:t,f(n,g(t))},o.find=An,o.forEach=C,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=P,o.identity=Y,o.indexOf=z,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||K(n)&&"[object Boolean]"==hn.call(n)},o.isDate=function(n){return K(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return U(t)&&(Nn(t)||Q(t)||V(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){
|
return t(n),n},o.thru=function(n,t){return t(n)},o.toArray=function(n){return M(n)?n.length?A(n):[]:W(n)},o.values=W,o.extend=Bn,Y(o,o),o.clone=function(n){return V(n)?Nn(n)?A(n):k(n,_n(n)):n},o.escape=function(n){return(n=Q(n))&&rn.test(n)?n.replace(tn,fn):n},o.every=function(n,t,r){return t=r?Z:t,f(n,g(t))},o.find=An,o.forEach=z,o.has=function(n,t){return null!=n&&pn.call(n,t)},o.head=q,o.identity=X,o.indexOf=P,o.isArguments=n,o.isArray=Nn,o.isBoolean=function(n){return true===n||false===n||H(n)&&"[object Boolean]"==hn.call(n);
|
||||||
return y(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=V,o.isNaN=function(n){return L(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=L,o.isObject=H,o.isRegExp=function(n){return K(n)&&"[object RegExp]"==hn.call(n)},o.isString=Q,o.isUndefined=function(n){return n===nn},o.last=function(n){var t=null==n?0:n.length;return t?n[t-1]:nn},o.max=function(n){return n&&n.length?a(n,Y,v):nn},o.min=function(n){return n&&n.length?a(n,Y,_):nn},o.noConflict=function(){return on._===this&&(on._=vn),
|
},o.isDate=function(n){return H(n)&&"[object Date]"==hn.call(n)},o.isEmpty=function(t){return M(t)&&(Nn(t)||L(t)||U(t.splice)||n(t))?!t.length:!_n(t).length},o.isEqual=function(n,t){return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=U,o.isNaN=function(n){return K(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=K,o.isObject=V,o.isRegExp=function(n){return H(n)&&"[object RegExp]"==hn.call(n)},o.isString=L,o.isUndefined=function(n){return n===Z},o.last=function(n){
|
||||||
this},o.noop=function(){},o.reduce=G,o.result=function(n,t,r){return t=null==n?nn:n[t],t===nn&&(t=r),V(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=U(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?nn:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return W(n)+t},o.each=C,o.first=P,Z(o,function(){var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.4",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
|
var t=null==n?0:n.length;return t?n[t-1]:Z},o.max=function(n){return n&&n.length?a(n,X,v):Z},o.min=function(n){return n&&n.length?a(n,X,_):Z},o.noConflict=function(){return on._===this&&(on._=vn),this},o.noop=function(){},o.reduce=C,o.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=M(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?Z:t,E(n,g(t))},o.uniqueId=function(n){var t=++sn;return Q(n)+t},o.each=z,o.first=q,Y(o,function(){
|
||||||
var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n)})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o,
|
var n={};return s(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.21",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n);
|
||||||
define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this);
|
})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return w(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o, define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this);
|
||||||
59
dist/lodash.fp.js
vendored
59
dist/lodash.fp.js
vendored
@@ -52,7 +52,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
var baseConvert = __webpack_require__(1);
|
var baseConvert = __webpack_require__(1);
|
||||||
|
|
||||||
@@ -74,9 +74,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
module.exports = browserConvert;
|
module.exports = browserConvert;
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
var mapping = __webpack_require__(2),
|
var mapping = __webpack_require__(2),
|
||||||
fallbackHolder = __webpack_require__(3);
|
fallbackHolder = __webpack_require__(3);
|
||||||
@@ -216,8 +216,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
* @returns {Function|Object} Returns the converted function or object.
|
* @returns {Function|Object} Returns the converted function or object.
|
||||||
*/
|
*/
|
||||||
function baseConvert(util, name, func, options) {
|
function baseConvert(util, name, func, options) {
|
||||||
var setPlaceholder,
|
var isLib = typeof name == 'function',
|
||||||
isLib = typeof name == 'function',
|
|
||||||
isObj = name === Object(name);
|
isObj = name === Object(name);
|
||||||
|
|
||||||
if (isObj) {
|
if (isObj) {
|
||||||
@@ -238,10 +237,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
'rearg': 'rearg' in options ? options.rearg : true
|
'rearg': 'rearg' in options ? options.rearg : true
|
||||||
};
|
};
|
||||||
|
|
||||||
var forceCurry = ('curry' in options) && options.curry,
|
var defaultHolder = isLib ? func : fallbackHolder,
|
||||||
|
forceCurry = ('curry' in options) && options.curry,
|
||||||
forceFixed = ('fixed' in options) && options.fixed,
|
forceFixed = ('fixed' in options) && options.fixed,
|
||||||
forceRearg = ('rearg' in options) && options.rearg,
|
forceRearg = ('rearg' in options) && options.rearg,
|
||||||
placeholder = isLib ? func : fallbackHolder,
|
|
||||||
pristine = isLib ? func.runInContext() : undefined;
|
pristine = isLib ? func.runInContext() : undefined;
|
||||||
|
|
||||||
var helpers = isLib ? func : {
|
var helpers = isLib ? func : {
|
||||||
@@ -251,7 +250,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
'curry': util.curry,
|
'curry': util.curry,
|
||||||
'forEach': util.forEach,
|
'forEach': util.forEach,
|
||||||
'isArray': util.isArray,
|
'isArray': util.isArray,
|
||||||
|
'isError': util.isError,
|
||||||
'isFunction': util.isFunction,
|
'isFunction': util.isFunction,
|
||||||
|
'isWeakMap': util.isWeakMap,
|
||||||
'iteratee': util.iteratee,
|
'iteratee': util.iteratee,
|
||||||
'keys': util.keys,
|
'keys': util.keys,
|
||||||
'rearg': util.rearg,
|
'rearg': util.rearg,
|
||||||
@@ -265,7 +266,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
curry = helpers.curry,
|
curry = helpers.curry,
|
||||||
each = helpers.forEach,
|
each = helpers.forEach,
|
||||||
isArray = helpers.isArray,
|
isArray = helpers.isArray,
|
||||||
|
isError = helpers.isError,
|
||||||
isFunction = helpers.isFunction,
|
isFunction = helpers.isFunction,
|
||||||
|
isWeakMap = helpers.isWeakMap,
|
||||||
keys = helpers.keys,
|
keys = helpers.keys,
|
||||||
rearg = helpers.rearg,
|
rearg = helpers.rearg,
|
||||||
toInteger = helpers.toInteger,
|
toInteger = helpers.toInteger,
|
||||||
@@ -435,8 +438,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
var key = path[index],
|
var key = path[index],
|
||||||
value = nested[key];
|
value = nested[key];
|
||||||
|
|
||||||
if (value != null) {
|
if (value != null &&
|
||||||
nested[path[index]] = clone(index == lastIndex ? value : Object(value));
|
!(isFunction(value) || isError(value) || isWeakMap(value))) {
|
||||||
|
nested[key] = clone(index == lastIndex ? value : Object(value));
|
||||||
}
|
}
|
||||||
nested = nested[key];
|
nested = nested[key];
|
||||||
}
|
}
|
||||||
@@ -541,7 +545,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
* @param {Function} func The function to wrap.
|
* @param {Function} func The function to wrap.
|
||||||
* @returns {Function} Returns the converted function.
|
* @returns {Function} Returns the converted function.
|
||||||
*/
|
*/
|
||||||
function wrap(name, func) {
|
function wrap(name, func, placeholder) {
|
||||||
var result,
|
var result,
|
||||||
realName = mapping.aliasToReal[name] || name,
|
realName = mapping.aliasToReal[name] || name,
|
||||||
wrapped = func,
|
wrapped = func,
|
||||||
@@ -586,17 +590,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
result.convert = createConverter(realName, func);
|
result.convert = createConverter(realName, func);
|
||||||
if (mapping.placeholder[realName]) {
|
result.placeholder = func.placeholder = placeholder;
|
||||||
setPlaceholder = true;
|
|
||||||
result.placeholder = func.placeholder = placeholder;
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
if (!isObj) {
|
if (!isObj) {
|
||||||
return wrap(name, func);
|
return wrap(name, func, defaultHolder);
|
||||||
}
|
}
|
||||||
var _ = func;
|
var _ = func;
|
||||||
|
|
||||||
@@ -606,7 +608,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
each(mapping.aryMethod[aryKey], function(key) {
|
each(mapping.aryMethod[aryKey], function(key) {
|
||||||
var func = _[mapping.remap[key] || key];
|
var func = _[mapping.remap[key] || key];
|
||||||
if (func) {
|
if (func) {
|
||||||
pairs.push([key, wrap(key, func)]);
|
pairs.push([key, wrap(key, func, _)]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -632,9 +634,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
});
|
});
|
||||||
|
|
||||||
_.convert = convertLib;
|
_.convert = convertLib;
|
||||||
if (setPlaceholder) {
|
_.placeholder = _;
|
||||||
_.placeholder = placeholder;
|
|
||||||
}
|
|
||||||
// Assign aliases.
|
// Assign aliases.
|
||||||
each(keys(_), function(key) {
|
each(keys(_), function(key) {
|
||||||
each(mapping.realToAlias[key] || [], function(alias) {
|
each(mapping.realToAlias[key] || [], function(alias) {
|
||||||
@@ -648,9 +649,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
module.exports = baseConvert;
|
module.exports = baseConvert;
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 2 */
|
/* 2 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/** Used to map aliases to their real names. */
|
/** Used to map aliases to their real names. */
|
||||||
exports.aliasToReal = {
|
exports.aliasToReal = {
|
||||||
@@ -915,16 +916,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Used to track methods with placeholder support */
|
|
||||||
exports.placeholder = {
|
|
||||||
'bind': true,
|
|
||||||
'bindKey': true,
|
|
||||||
'curry': true,
|
|
||||||
'curryRight': true,
|
|
||||||
'partial': true,
|
|
||||||
'partialRight': true
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Used to map real names to their aliases. */
|
/** Used to map real names to their aliases. */
|
||||||
exports.realToAlias = (function() {
|
exports.realToAlias = (function() {
|
||||||
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||||
@@ -1022,9 +1013,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 3 */
|
/* 3 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default argument placeholder value for methods.
|
* The default argument placeholder value for methods.
|
||||||
@@ -1034,7 +1025,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
module.exports = {};
|
module.exports = {};
|
||||||
|
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ])
|
/******/ ])
|
||||||
});
|
});
|
||||||
;
|
;
|
||||||
28
dist/lodash.fp.min.js
vendored
28
dist/lodash.fp.min.js
vendored
@@ -1,21 +1,21 @@
|
|||||||
(function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()})(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&"function"==typeof _.runInContext&&(_=n(_.runInContext())),
|
(function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()})(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&"function"==typeof _.runInContext&&(_=n(_.runInContext())),
|
||||||
t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){for(var r=arguments.length,n=r-1,i=Array(r);r--;)i[r]=arguments[r];var a=i[e],o=i.slice(0,e);return a&&d.apply(o,a),
|
t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){for(var r=arguments.length,n=r-1,i=Array(r);r--;)i[r]=arguments[r];var a=i[e],o=i.slice(0,e);return a&&d.apply(o,a),
|
||||||
e!=n&&d.apply(o,i.slice(e+1)),t.apply(this,o)}}function l(t,e){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n),i}}}function u(t,e,r,d){function c(t,e){if(B.cap){var r=p.iterateeRearg[t];if(r)return x(e,r);var n=!b&&p.iterateeAry[t];if(n)return W(e,n)}return e}function h(t,e,r){return E||B.curry&&r>1?z(e,r):e}function g(t,e,r){if(B.fixed&&(F||!p.skipFixed[t])){var n=p.methodSpread[t],i=n&&n.start;return void 0===i?w(e,r):s(e,i);
|
e!=n&&d.apply(o,i.slice(e+1)),t.apply(this,o)}}function l(t,e){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n),i}}}function u(t,e,r,d){function c(t,e){if(b.cap){var r=p.iterateeRearg[t];if(r)return x(e,r);var n=!O&&p.iterateeAry[t];if(n)return W(e,n)}return e}function h(t,e,r){return E||b.curry&&r>1?D(e,r):e}function g(t,e,r){if(b.fixed&&(F||!p.skipFixed[t])){var n=p.methodSpread[t],i=n&&n.start;return void 0===i?L(e,r):s(e,i);
|
||||||
}return e}function y(t,e,r){return B.rearg&&r>1&&(j||!p.skipRearg[t])?_(e,p.methodRearg[t]||p.aryRearg[r]):e}function m(t,e){e=V(e);for(var r=-1,n=e.length,i=n-1,a=D(Object(t)),o=a;null!=o&&++r<n;){var s=e[r],l=o[s];null!=l&&(o[e[r]]=D(r==i?l:Object(l))),o=o[s]}return a}function v(t){return H.runInContext.convert(t)(void 0)}function A(t,e){var r=p.aliasToReal[t]||t,n=p.remap[r]||r,i=d;return function(t){return u(b?L:S,r,b?L[n]:e,M(M({},i),t))}}function W(t,e){return I(t,function(t){return"function"==typeof t?i(t,e):t;
|
}return e}function y(t,e,r){return b.rearg&&r>1&&(M||!p.skipRearg[t])?N(e,p.methodRearg[t]||p.aryRearg[r]):e}function m(t,e){e=U(e);for(var r=-1,n=e.length,i=n-1,a=w(Object(t)),o=a;null!=o&&++r<n;){var s=e[r],l=o[s];null==l||T(l)||P(l)||K(l)||(o[s]=w(r==i?l:Object(l))),o=o[s]}return a}function v(t){return J.runInContext.convert(t)(void 0)}function A(t,e){var r=p.aliasToReal[t]||t,n=p.remap[r]||r,i=d;return function(t){return u(O?j:C,r,O?j[n]:e,S(S({},i),t))}}function W(t,e){return I(t,function(t){
|
||||||
})}function x(t,e){return I(t,function(t){var r=e.length;return n(_(i(t,r),e),r)})}function I(t,e){return function(){var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=B.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}}function R(t,e){var r,n=p.aliasToReal[t]||t,i=e,s=G[n];return s?i=s(e):B.immutable&&(p.mutate.array[n]?i=l(e,a):p.mutate.object[n]?i=l(e,o(e)):p.mutate.set[n]&&(i=l(e,m))),q(U,function(t){return q(p.aryMethod[t],function(e){if(n==e){var a=p.methodSpread[n];
|
return"function"==typeof t?i(t,e):t})}function x(t,e){return I(t,function(t){var r=e.length;return n(N(i(t,r),e),r)})}function I(t,e){return function(){var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=b.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}}function R(t,e,r){var n,i=p.aliasToReal[t]||t,s=e,u=H[i];return u?s=u(e):b.immutable&&(p.mutate.array[i]?s=l(e,a):p.mutate.object[i]?s=l(e,o(e)):p.mutate.set[i]&&(s=l(e,m))),z(G,function(t){return z(p.aryMethod[t],function(e){
|
||||||
return r=a&&a.afterRearg?g(n,y(n,i,t),t):y(n,g(n,i,t),t),r=c(n,r),r=h(n,r,t),!1}}),!r}),r||(r=i),r==e&&(r=E?z(r,1):function(){return e.apply(this,arguments)}),r.convert=A(n,e),p.placeholder[n]&&(O=!0,r.placeholder=e.placeholder=C),r}var O,b="function"==typeof e,k=e===Object(e);if(k&&(d=r,r=e,e=void 0),null==r)throw new TypeError;d||(d={});var B={cap:!("cap"in d)||d.cap,curry:!("curry"in d)||d.curry,fixed:!("fixed"in d)||d.fixed,immutable:!("immutable"in d)||d.immutable,rearg:!("rearg"in d)||d.rearg
|
if(i==e){var r=p.methodSpread[i];return n=r&&r.afterRearg?g(i,y(i,s,t),t):y(i,g(i,s,t),t),n=c(i,n),n=h(i,n,t),!1}}),!n}),n||(n=s),n==e&&(n=E?D(n,1):function(){return e.apply(this,arguments)}),n.convert=A(i,e),n.placeholder=e.placeholder=r,n}var O="function"==typeof e,k=e===Object(e);if(k&&(d=r,r=e,e=void 0),null==r)throw new TypeError;d||(d={});var b={cap:!("cap"in d)||d.cap,curry:!("curry"in d)||d.curry,fixed:!("fixed"in d)||d.fixed,immutable:!("immutable"in d)||d.immutable,rearg:!("rearg"in d)||d.rearg
|
||||||
},E="curry"in d&&d.curry,F="fixed"in d&&d.fixed,j="rearg"in d&&d.rearg,C=b?r:f,L=b?r.runInContext():void 0,S=b?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},w=S.ary,M=S.assign,D=S.clone,z=S.curry,q=S.forEach,P=S.isArray,T=S.isFunction,K=S.keys,_=S.rearg,N=S.toInteger,V=S.toPath,U=K(p.aryMethod),G={castArray:function(t){return function(){var e=arguments[0];
|
},B=O?r:f,E="curry"in d&&d.curry,F="fixed"in d&&d.fixed,M="rearg"in d&&d.rearg,j=O?r.runInContext():void 0,C=O?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},L=C.ary,S=C.assign,w=C.clone,D=C.curry,z=C.forEach,q=C.isArray,P=C.isError,T=C.isFunction,K=C.isWeakMap,_=C.keys,N=C.rearg,V=C.toInteger,U=C.toPath,G=_(p.aryMethod),H={
|
||||||
return P(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return B.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&a<=r?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!T(r))return t(r,Object(e));var n=[];return q(K(e),function(t){T(e[t])&&n.push([t,r.prototype[t]])}),t(r,Object(e)),q(n,function(t){var e=t[1];T(e)?r.prototype[t[0]]=e:delete r.prototype[t[0]]}),r}},nthArg:function(t){return function(e){var r=e<0?1:N(e)+1;
|
castArray:function(t){return function(){var e=arguments[0];return q(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return b.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&a<=r?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!T(r))return t(r,Object(e));var n=[];return z(_(e),function(t){T(e[t])&&n.push([t,r.prototype[t]])}),t(r,Object(e)),z(n,function(t){var e=t[1];T(e)?r.prototype[t[0]]=e:delete r.prototype[t[0]];
|
||||||
return z(t(e),r)}},rearg:function(t){return function(e,r){var n=r?r.length:0;return z(t(e,r),n)}},runInContext:function(e){return function(r){return u(t,e(r),d)}}};if(!k)return R(e,r);var H=r,J=[];return q(U,function(t){q(p.aryMethod[t],function(t){var e=H[p.remap[t]||t];e&&J.push([t,R(t,e)])})}),q(K(H),function(t){var e=H[t];if("function"==typeof e){for(var r=J.length;r--;)if(J[r][0]==t)return;e.convert=A(t,e),J.push([t,e])}}),q(J,function(t){H[t[0]]=t[1]}),H.convert=v,O&&(H.placeholder=C),q(K(H),function(t){
|
}),r}},nthArg:function(t){return function(e){var r=e<0?1:V(e)+1;return D(t(e),r)}},rearg:function(t){return function(e,r){var n=r?r.length:0;return D(t(e,r),n)}},runInContext:function(e){return function(r){return u(t,e(r),d)}}};if(!k)return R(e,r,B);var J=r,Q=[];return z(G,function(t){z(p.aryMethod[t],function(t){var e=J[p.remap[t]||t];e&&Q.push([t,R(t,e,J)])})}),z(_(J),function(t){var e=J[t];if("function"==typeof e){for(var r=Q.length;r--;)if(Q[r][0]==t)return;e.convert=A(t,e),Q.push([t,e])}}),z(Q,function(t){
|
||||||
q(p.realToAlias[t]||[],function(e){H[e]=H[t]})}),H}var p=r(2),f=r(3),d=Array.prototype.push;t.exports=u},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",
|
J[t[0]]=t[1]}),J.convert=v,J.placeholder=J,z(_(J),function(t){z(p.realToAlias[t]||[],function(e){J[e]=J[t]})}),J}var p=r(2),f=r(3),d=Array.prototype.push;t.exports=u},function(t,e){e.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",
|
||||||
apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",
|
always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",
|
||||||
symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],
|
props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},e.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],
|
||||||
2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],
|
2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],
|
||||||
3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],
|
3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],
|
||||||
4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,
|
4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,
|
||||||
transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],
|
transform:2},e.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},e.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],
|
||||||
sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,
|
sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},e.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,
|
||||||
pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};
|
pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={
|
||||||
for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",
|
assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",
|
||||||
mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,
|
padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,
|
||||||
lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e){t.exports={}}])});
|
propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(t,e){t.exports={}}])});
|
||||||
402
dist/lodash.js
vendored
402
dist/lodash.js
vendored
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @license
|
* @license
|
||||||
* Lodash <https://lodash.com/>
|
* Lodash <https://lodash.com/>
|
||||||
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||||
* Released under MIT license <https://lodash.com/license>
|
* Released under MIT license <https://lodash.com/license>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
@@ -12,14 +12,15 @@
|
|||||||
var undefined;
|
var undefined;
|
||||||
|
|
||||||
/** Used as the semantic version number. */
|
/** Used as the semantic version number. */
|
||||||
var VERSION = '4.17.4';
|
var VERSION = '4.17.21';
|
||||||
|
|
||||||
/** Used as the size to enable large array optimizations. */
|
/** Used as the size to enable large array optimizations. */
|
||||||
var LARGE_ARRAY_SIZE = 200;
|
var LARGE_ARRAY_SIZE = 200;
|
||||||
|
|
||||||
/** Error message constants. */
|
/** Error message constants. */
|
||||||
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
|
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
|
||||||
FUNC_ERROR_TEXT = 'Expected a function';
|
FUNC_ERROR_TEXT = 'Expected a function',
|
||||||
|
INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
|
||||||
|
|
||||||
/** Used to stand-in for `undefined` hash values. */
|
/** Used to stand-in for `undefined` hash values. */
|
||||||
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
||||||
@@ -143,7 +144,6 @@
|
|||||||
/** Used to match property names within property paths. */
|
/** Used to match property names within property paths. */
|
||||||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||||
reIsPlainProp = /^\w*$/,
|
reIsPlainProp = /^\w*$/,
|
||||||
reLeadingDot = /^\./,
|
|
||||||
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -153,10 +153,11 @@
|
|||||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
||||||
reHasRegExpChar = RegExp(reRegExpChar.source);
|
reHasRegExpChar = RegExp(reRegExpChar.source);
|
||||||
|
|
||||||
/** Used to match leading and trailing whitespace. */
|
/** Used to match leading whitespace. */
|
||||||
var reTrim = /^\s+|\s+$/g,
|
var reTrimStart = /^\s+/;
|
||||||
reTrimStart = /^\s+/,
|
|
||||||
reTrimEnd = /\s+$/;
|
/** Used to match a single whitespace character. */
|
||||||
|
var reWhitespace = /\s/;
|
||||||
|
|
||||||
/** Used to match wrap detail comments. */
|
/** Used to match wrap detail comments. */
|
||||||
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
|
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
|
||||||
@@ -166,6 +167,18 @@
|
|||||||
/** Used to match words composed of alphanumeric characters. */
|
/** Used to match words composed of alphanumeric characters. */
|
||||||
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to validate the `validate` option in `_.template` variable.
|
||||||
|
*
|
||||||
|
* Forbids characters which could potentially change the meaning of the function argument definition:
|
||||||
|
* - "()," (modification of function parameters)
|
||||||
|
* - "=" (default value)
|
||||||
|
* - "[]{}" (destructuring of function parameters)
|
||||||
|
* - "/" (beginning of a comment)
|
||||||
|
* - whitespace
|
||||||
|
*/
|
||||||
|
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
|
||||||
|
|
||||||
/** Used to match backslashes in property paths. */
|
/** Used to match backslashes in property paths. */
|
||||||
var reEscapeChar = /\\(\\)?/g;
|
var reEscapeChar = /\\(\\)?/g;
|
||||||
|
|
||||||
@@ -243,8 +256,8 @@
|
|||||||
reOptMod = rsModifier + '?',
|
reOptMod = rsModifier + '?',
|
||||||
rsOptVar = '[' + rsVarRange + ']?',
|
rsOptVar = '[' + rsVarRange + ']?',
|
||||||
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
||||||
rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
|
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
||||||
rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
|
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
||||||
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
||||||
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
|
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
|
||||||
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
||||||
@@ -277,7 +290,7 @@
|
|||||||
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
||||||
|
|
||||||
/** Used to detect strings that need a more robust regexp to match words. */
|
/** Used to detect strings that need a more robust regexp to match words. */
|
||||||
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
||||||
|
|
||||||
/** Used to assign default `context` object properties. */
|
/** Used to assign default `context` object properties. */
|
||||||
var contextProps = [
|
var contextProps = [
|
||||||
@@ -437,6 +450,14 @@
|
|||||||
/** Used to access faster Node.js helpers. */
|
/** Used to access faster Node.js helpers. */
|
||||||
var nodeUtil = (function() {
|
var nodeUtil = (function() {
|
||||||
try {
|
try {
|
||||||
|
// Use `util.types` for Node.js 10+.
|
||||||
|
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
||||||
|
|
||||||
|
if (types) {
|
||||||
|
return types;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Legacy `process.binding('util')` for Node.js < 10.
|
||||||
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}());
|
}());
|
||||||
@@ -451,34 +472,6 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds the key-value `pair` to `map`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} map The map to modify.
|
|
||||||
* @param {Array} pair The key-value pair to add.
|
|
||||||
* @returns {Object} Returns `map`.
|
|
||||||
*/
|
|
||||||
function addMapEntry(map, pair) {
|
|
||||||
// Don't return `map.set` because it's not chainable in IE 11.
|
|
||||||
map.set(pair[0], pair[1]);
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds `value` to `set`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} set The set to modify.
|
|
||||||
* @param {*} value The value to add.
|
|
||||||
* @returns {Object} Returns `set`.
|
|
||||||
*/
|
|
||||||
function addSetEntry(set, value) {
|
|
||||||
// Don't return `set.add` because it's not chainable in IE 11.
|
|
||||||
set.add(value);
|
|
||||||
return set;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A faster alternative to `Function#apply`, this function invokes `func`
|
* A faster alternative to `Function#apply`, this function invokes `func`
|
||||||
* with the `this` binding of `thisArg` and the arguments of `args`.
|
* with the `this` binding of `thisArg` and the arguments of `args`.
|
||||||
@@ -1014,6 +1007,19 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.trim`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string to trim.
|
||||||
|
* @returns {string} Returns the trimmed string.
|
||||||
|
*/
|
||||||
|
function baseTrim(string) {
|
||||||
|
return string
|
||||||
|
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
||||||
|
: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.unary` without support for storing metadata.
|
* The base implementation of `_.unary` without support for storing metadata.
|
||||||
*
|
*
|
||||||
@@ -1347,6 +1353,21 @@
|
|||||||
: asciiToArray(string);
|
: asciiToArray(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
||||||
|
* character of `string`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string to inspect.
|
||||||
|
* @returns {number} Returns the index of the last non-whitespace character.
|
||||||
|
*/
|
||||||
|
function trimmedEndIndex(string) {
|
||||||
|
var index = string.length;
|
||||||
|
|
||||||
|
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by `_.unescape` to convert HTML entities to characters.
|
* Used by `_.unescape` to convert HTML entities to characters.
|
||||||
*
|
*
|
||||||
@@ -2279,7 +2300,7 @@
|
|||||||
* @name has
|
* @name has
|
||||||
* @memberOf SetCache
|
* @memberOf SetCache
|
||||||
* @param {*} value The value to search for.
|
* @param {*} value The value to search for.
|
||||||
* @returns {number} Returns `true` if `value` is found, else `false`.
|
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
||||||
*/
|
*/
|
||||||
function setCacheHas(value) {
|
function setCacheHas(value) {
|
||||||
return this.__data__.has(value);
|
return this.__data__.has(value);
|
||||||
@@ -2677,7 +2698,7 @@
|
|||||||
if (!cloneableTags[tag]) {
|
if (!cloneableTags[tag]) {
|
||||||
return object ? value : {};
|
return object ? value : {};
|
||||||
}
|
}
|
||||||
result = initCloneByTag(value, tag, baseClone, isDeep);
|
result = initCloneByTag(value, tag, isDeep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Check for circular references and return its corresponding clone.
|
// Check for circular references and return its corresponding clone.
|
||||||
@@ -2688,6 +2709,16 @@
|
|||||||
}
|
}
|
||||||
stack.set(value, result);
|
stack.set(value, result);
|
||||||
|
|
||||||
|
if (isSet(value)) {
|
||||||
|
value.forEach(function(subValue) {
|
||||||
|
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
||||||
|
});
|
||||||
|
} else if (isMap(value)) {
|
||||||
|
value.forEach(function(subValue, key) {
|
||||||
|
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var keysFunc = isFull
|
var keysFunc = isFull
|
||||||
? (isFlat ? getAllKeysIn : getAllKeys)
|
? (isFlat ? getAllKeysIn : getAllKeys)
|
||||||
: (isFlat ? keysIn : keys);
|
: (isFlat ? keysIn : keys);
|
||||||
@@ -3609,13 +3640,13 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
baseFor(source, function(srcValue, key) {
|
baseFor(source, function(srcValue, key) {
|
||||||
|
stack || (stack = new Stack);
|
||||||
if (isObject(srcValue)) {
|
if (isObject(srcValue)) {
|
||||||
stack || (stack = new Stack);
|
|
||||||
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var newValue = customizer
|
var newValue = customizer
|
||||||
? customizer(object[key], srcValue, (key + ''), object, source, stack)
|
? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
if (newValue === undefined) {
|
if (newValue === undefined) {
|
||||||
@@ -3642,8 +3673,8 @@
|
|||||||
* counterparts.
|
* counterparts.
|
||||||
*/
|
*/
|
||||||
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
||||||
var objValue = object[key],
|
var objValue = safeGet(object, key),
|
||||||
srcValue = source[key],
|
srcValue = safeGet(source, key),
|
||||||
stacked = stack.get(srcValue);
|
stacked = stack.get(srcValue);
|
||||||
|
|
||||||
if (stacked) {
|
if (stacked) {
|
||||||
@@ -3686,7 +3717,7 @@
|
|||||||
if (isArguments(objValue)) {
|
if (isArguments(objValue)) {
|
||||||
newValue = toPlainObject(objValue);
|
newValue = toPlainObject(objValue);
|
||||||
}
|
}
|
||||||
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
|
else if (!isObject(objValue) || isFunction(objValue)) {
|
||||||
newValue = initCloneObject(srcValue);
|
newValue = initCloneObject(srcValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3730,8 +3761,21 @@
|
|||||||
* @returns {Array} Returns the new sorted array.
|
* @returns {Array} Returns the new sorted array.
|
||||||
*/
|
*/
|
||||||
function baseOrderBy(collection, iteratees, orders) {
|
function baseOrderBy(collection, iteratees, orders) {
|
||||||
|
if (iteratees.length) {
|
||||||
|
iteratees = arrayMap(iteratees, function(iteratee) {
|
||||||
|
if (isArray(iteratee)) {
|
||||||
|
return function(value) {
|
||||||
|
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return iteratee;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
iteratees = [identity];
|
||||||
|
}
|
||||||
|
|
||||||
var index = -1;
|
var index = -1;
|
||||||
iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
|
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
||||||
|
|
||||||
var result = baseMap(collection, function(value, key, collection) {
|
var result = baseMap(collection, function(value, key, collection) {
|
||||||
var criteria = arrayMap(iteratees, function(iteratee) {
|
var criteria = arrayMap(iteratees, function(iteratee) {
|
||||||
@@ -3988,6 +4032,10 @@
|
|||||||
var key = toKey(path[index]),
|
var key = toKey(path[index]),
|
||||||
newValue = value;
|
newValue = value;
|
||||||
|
|
||||||
|
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
if (index != lastIndex) {
|
if (index != lastIndex) {
|
||||||
var objValue = nested[key];
|
var objValue = nested[key];
|
||||||
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
||||||
@@ -4140,11 +4188,14 @@
|
|||||||
* into `array`.
|
* into `array`.
|
||||||
*/
|
*/
|
||||||
function baseSortedIndexBy(array, value, iteratee, retHighest) {
|
function baseSortedIndexBy(array, value, iteratee, retHighest) {
|
||||||
value = iteratee(value);
|
|
||||||
|
|
||||||
var low = 0,
|
var low = 0,
|
||||||
high = array == null ? 0 : array.length,
|
high = array == null ? 0 : array.length;
|
||||||
valIsNaN = value !== value,
|
if (high === 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
value = iteratee(value);
|
||||||
|
var valIsNaN = value !== value,
|
||||||
valIsNull = value === null,
|
valIsNull = value === null,
|
||||||
valIsSymbol = isSymbol(value),
|
valIsSymbol = isSymbol(value),
|
||||||
valIsUndefined = value === undefined;
|
valIsUndefined = value === undefined;
|
||||||
@@ -4319,8 +4370,47 @@
|
|||||||
*/
|
*/
|
||||||
function baseUnset(object, path) {
|
function baseUnset(object, path) {
|
||||||
path = castPath(path, object);
|
path = castPath(path, object);
|
||||||
object = parent(object, path);
|
|
||||||
return object == null || delete object[toKey(last(path))];
|
// Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
||||||
|
var index = -1,
|
||||||
|
length = path.length;
|
||||||
|
|
||||||
|
if (!length) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var key = path[index];
|
||||||
|
|
||||||
|
// skip non-string keys (e.g., Symbols, numbers)
|
||||||
|
if (typeof key !== 'string') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always block "__proto__" anywhere in the path if it's not expected
|
||||||
|
if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Block "constructor.prototype" chains
|
||||||
|
if (key === 'constructor' &&
|
||||||
|
(index + 1) < length &&
|
||||||
|
typeof path[index + 1] === 'string' &&
|
||||||
|
path[index + 1] === 'prototype') {
|
||||||
|
|
||||||
|
// Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
|
||||||
|
if (isRootPrimitive && index === 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var obj = parent(object, path);
|
||||||
|
return obj == null || delete obj[toKey(last(path))];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -4551,20 +4641,6 @@
|
|||||||
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a clone of `map`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} map The map to clone.
|
|
||||||
* @param {Function} cloneFunc The function to clone values.
|
|
||||||
* @param {boolean} [isDeep] Specify a deep clone.
|
|
||||||
* @returns {Object} Returns the cloned map.
|
|
||||||
*/
|
|
||||||
function cloneMap(map, isDeep, cloneFunc) {
|
|
||||||
var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
|
|
||||||
return arrayReduce(array, addMapEntry, new map.constructor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a clone of `regexp`.
|
* Creates a clone of `regexp`.
|
||||||
*
|
*
|
||||||
@@ -4578,20 +4654,6 @@
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a clone of `set`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} set The set to clone.
|
|
||||||
* @param {Function} cloneFunc The function to clone values.
|
|
||||||
* @param {boolean} [isDeep] Specify a deep clone.
|
|
||||||
* @returns {Object} Returns the cloned set.
|
|
||||||
*/
|
|
||||||
function cloneSet(set, isDeep, cloneFunc) {
|
|
||||||
var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
|
|
||||||
return arrayReduce(array, addSetEntry, new set.constructor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a clone of the `symbol` object.
|
* Creates a clone of the `symbol` object.
|
||||||
*
|
*
|
||||||
@@ -5455,7 +5517,7 @@
|
|||||||
return function(number, precision) {
|
return function(number, precision) {
|
||||||
number = toNumber(number);
|
number = toNumber(number);
|
||||||
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
||||||
if (precision) {
|
if (precision && nativeIsFinite(number)) {
|
||||||
// Shift with exponential notation to avoid floating-point issues.
|
// Shift with exponential notation to avoid floating-point issues.
|
||||||
// See [MDN](https://mdn.io/round#Examples) for more details.
|
// See [MDN](https://mdn.io/round#Examples) for more details.
|
||||||
var pair = (toString(number) + 'e').split('e'),
|
var pair = (toString(number) + 'e').split('e'),
|
||||||
@@ -5657,10 +5719,11 @@
|
|||||||
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Assume cyclic values are equal.
|
// Check that cyclic values are equal.
|
||||||
var stacked = stack.get(array);
|
var arrStacked = stack.get(array);
|
||||||
if (stacked && stack.get(other)) {
|
var othStacked = stack.get(other);
|
||||||
return stacked == other;
|
if (arrStacked && othStacked) {
|
||||||
|
return arrStacked == other && othStacked == array;
|
||||||
}
|
}
|
||||||
var index = -1,
|
var index = -1,
|
||||||
result = true,
|
result = true,
|
||||||
@@ -5822,10 +5885,11 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Assume cyclic values are equal.
|
// Check that cyclic values are equal.
|
||||||
var stacked = stack.get(object);
|
var objStacked = stack.get(object);
|
||||||
if (stacked && stack.get(other)) {
|
var othStacked = stack.get(other);
|
||||||
return stacked == other;
|
if (objStacked && othStacked) {
|
||||||
|
return objStacked == other && othStacked == object;
|
||||||
}
|
}
|
||||||
var result = true;
|
var result = true;
|
||||||
stack.set(object, other);
|
stack.set(object, other);
|
||||||
@@ -6186,7 +6250,7 @@
|
|||||||
*/
|
*/
|
||||||
function initCloneArray(array) {
|
function initCloneArray(array) {
|
||||||
var length = array.length,
|
var length = array.length,
|
||||||
result = array.constructor(length);
|
result = new array.constructor(length);
|
||||||
|
|
||||||
// Add properties assigned by `RegExp#exec`.
|
// Add properties assigned by `RegExp#exec`.
|
||||||
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
||||||
@@ -6213,16 +6277,15 @@
|
|||||||
* Initializes an object clone based on its `toStringTag`.
|
* Initializes an object clone based on its `toStringTag`.
|
||||||
*
|
*
|
||||||
* **Note:** This function only supports cloning values with tags of
|
* **Note:** This function only supports cloning values with tags of
|
||||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} object The object to clone.
|
* @param {Object} object The object to clone.
|
||||||
* @param {string} tag The `toStringTag` of the object to clone.
|
* @param {string} tag The `toStringTag` of the object to clone.
|
||||||
* @param {Function} cloneFunc The function to clone values.
|
|
||||||
* @param {boolean} [isDeep] Specify a deep clone.
|
* @param {boolean} [isDeep] Specify a deep clone.
|
||||||
* @returns {Object} Returns the initialized clone.
|
* @returns {Object} Returns the initialized clone.
|
||||||
*/
|
*/
|
||||||
function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
function initCloneByTag(object, tag, isDeep) {
|
||||||
var Ctor = object.constructor;
|
var Ctor = object.constructor;
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case arrayBufferTag:
|
case arrayBufferTag:
|
||||||
@@ -6241,7 +6304,7 @@
|
|||||||
return cloneTypedArray(object, isDeep);
|
return cloneTypedArray(object, isDeep);
|
||||||
|
|
||||||
case mapTag:
|
case mapTag:
|
||||||
return cloneMap(object, isDeep, cloneFunc);
|
return new Ctor;
|
||||||
|
|
||||||
case numberTag:
|
case numberTag:
|
||||||
case stringTag:
|
case stringTag:
|
||||||
@@ -6251,7 +6314,7 @@
|
|||||||
return cloneRegExp(object);
|
return cloneRegExp(object);
|
||||||
|
|
||||||
case setTag:
|
case setTag:
|
||||||
return cloneSet(object, isDeep, cloneFunc);
|
return new Ctor;
|
||||||
|
|
||||||
case symbolTag:
|
case symbolTag:
|
||||||
return cloneSymbol(object);
|
return cloneSymbol(object);
|
||||||
@@ -6298,10 +6361,13 @@
|
|||||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||||
*/
|
*/
|
||||||
function isIndex(value, length) {
|
function isIndex(value, length) {
|
||||||
|
var type = typeof value;
|
||||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||||
|
|
||||||
return !!length &&
|
return !!length &&
|
||||||
(typeof value == 'number' || reIsUint.test(value)) &&
|
(type == 'number' ||
|
||||||
(value > -1 && value % 1 == 0 && value < length);
|
(type != 'symbol' && reIsUint.test(value))) &&
|
||||||
|
(value > -1 && value % 1 == 0 && value < length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6635,6 +6701,26 @@
|
|||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value at `key`, unless `key` is "__proto__" or "constructor".
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @param {string} key The key of the property to get.
|
||||||
|
* @returns {*} Returns the property value.
|
||||||
|
*/
|
||||||
|
function safeGet(object, key) {
|
||||||
|
if (key === 'constructor' && typeof object[key] === 'function') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (key == '__proto__') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return object[key];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets metadata for `func`.
|
* Sets metadata for `func`.
|
||||||
*
|
*
|
||||||
@@ -6751,11 +6837,11 @@
|
|||||||
*/
|
*/
|
||||||
var stringToPath = memoizeCapped(function(string) {
|
var stringToPath = memoizeCapped(function(string) {
|
||||||
var result = [];
|
var result = [];
|
||||||
if (reLeadingDot.test(string)) {
|
if (string.charCodeAt(0) === 46 /* . */) {
|
||||||
result.push('');
|
result.push('');
|
||||||
}
|
}
|
||||||
string.replace(rePropName, function(match, number, quote, string) {
|
string.replace(rePropName, function(match, number, quote, subString) {
|
||||||
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
|
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
@@ -9184,6 +9270,10 @@
|
|||||||
* // The `_.property` iteratee shorthand.
|
* // The `_.property` iteratee shorthand.
|
||||||
* _.filter(users, 'active');
|
* _.filter(users, 'active');
|
||||||
* // => objects for ['barney']
|
* // => objects for ['barney']
|
||||||
|
*
|
||||||
|
* // Combining several predicates using `_.overEvery` or `_.overSome`.
|
||||||
|
* _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
|
||||||
|
* // => objects for ['fred', 'barney']
|
||||||
*/
|
*/
|
||||||
function filter(collection, predicate) {
|
function filter(collection, predicate) {
|
||||||
var func = isArray(collection) ? arrayFilter : baseFilter;
|
var func = isArray(collection) ? arrayFilter : baseFilter;
|
||||||
@@ -9933,15 +10023,15 @@
|
|||||||
* var users = [
|
* var users = [
|
||||||
* { 'user': 'fred', 'age': 48 },
|
* { 'user': 'fred', 'age': 48 },
|
||||||
* { 'user': 'barney', 'age': 36 },
|
* { 'user': 'barney', 'age': 36 },
|
||||||
* { 'user': 'fred', 'age': 40 },
|
* { 'user': 'fred', 'age': 30 },
|
||||||
* { 'user': 'barney', 'age': 34 }
|
* { 'user': 'barney', 'age': 34 }
|
||||||
* ];
|
* ];
|
||||||
*
|
*
|
||||||
* _.sortBy(users, [function(o) { return o.user; }]);
|
* _.sortBy(users, [function(o) { return o.user; }]);
|
||||||
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
|
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
|
||||||
*
|
*
|
||||||
* _.sortBy(users, ['user', 'age']);
|
* _.sortBy(users, ['user', 'age']);
|
||||||
* // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
|
* // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
|
||||||
*/
|
*/
|
||||||
var sortBy = baseRest(function(collection, iteratees) {
|
var sortBy = baseRest(function(collection, iteratees) {
|
||||||
if (collection == null) {
|
if (collection == null) {
|
||||||
@@ -10363,9 +10453,11 @@
|
|||||||
function remainingWait(time) {
|
function remainingWait(time) {
|
||||||
var timeSinceLastCall = time - lastCallTime,
|
var timeSinceLastCall = time - lastCallTime,
|
||||||
timeSinceLastInvoke = time - lastInvokeTime,
|
timeSinceLastInvoke = time - lastInvokeTime,
|
||||||
result = wait - timeSinceLastCall;
|
timeWaiting = wait - timeSinceLastCall;
|
||||||
|
|
||||||
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
|
return maxing
|
||||||
|
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
||||||
|
: timeWaiting;
|
||||||
}
|
}
|
||||||
|
|
||||||
function shouldInvoke(time) {
|
function shouldInvoke(time) {
|
||||||
@@ -10426,6 +10518,7 @@
|
|||||||
}
|
}
|
||||||
if (maxing) {
|
if (maxing) {
|
||||||
// Handle invocations in a tight loop.
|
// Handle invocations in a tight loop.
|
||||||
|
clearTimeout(timerId);
|
||||||
timerId = setTimeout(timerExpired, wait);
|
timerId = setTimeout(timerExpired, wait);
|
||||||
return invokeFunc(lastCallTime);
|
return invokeFunc(lastCallTime);
|
||||||
}
|
}
|
||||||
@@ -12482,7 +12575,7 @@
|
|||||||
if (typeof value != 'string') {
|
if (typeof value != 'string') {
|
||||||
return value === 0 ? value : +value;
|
return value === 0 ? value : +value;
|
||||||
}
|
}
|
||||||
value = value.replace(reTrim, '');
|
value = baseTrim(value);
|
||||||
var isBinary = reIsBinary.test(value);
|
var isBinary = reIsBinary.test(value);
|
||||||
return (isBinary || reIsOctal.test(value))
|
return (isBinary || reIsOctal.test(value))
|
||||||
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
||||||
@@ -12797,9 +12890,35 @@
|
|||||||
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
||||||
* // => { 'a': 1, 'b': 2 }
|
* // => { 'a': 1, 'b': 2 }
|
||||||
*/
|
*/
|
||||||
var defaults = baseRest(function(args) {
|
var defaults = baseRest(function(object, sources) {
|
||||||
args.push(undefined, customDefaultsAssignIn);
|
object = Object(object);
|
||||||
return apply(assignInWith, undefined, args);
|
|
||||||
|
var index = -1;
|
||||||
|
var length = sources.length;
|
||||||
|
var guard = length > 2 ? sources[2] : undefined;
|
||||||
|
|
||||||
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||||||
|
length = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var source = sources[index];
|
||||||
|
var props = keysIn(source);
|
||||||
|
var propsIndex = -1;
|
||||||
|
var propsLength = props.length;
|
||||||
|
|
||||||
|
while (++propsIndex < propsLength) {
|
||||||
|
var key = props[propsIndex];
|
||||||
|
var value = object[key];
|
||||||
|
|
||||||
|
if (value === undefined ||
|
||||||
|
(eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
||||||
|
object[key] = source[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return object;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13196,6 +13315,11 @@
|
|||||||
* // => { '1': 'c', '2': 'b' }
|
* // => { '1': 'c', '2': 'b' }
|
||||||
*/
|
*/
|
||||||
var invert = createInverter(function(result, value, key) {
|
var invert = createInverter(function(result, value, key) {
|
||||||
|
if (value != null &&
|
||||||
|
typeof value.toString != 'function') {
|
||||||
|
value = nativeObjectToString.call(value);
|
||||||
|
}
|
||||||
|
|
||||||
result[value] = key;
|
result[value] = key;
|
||||||
}, constant(identity));
|
}, constant(identity));
|
||||||
|
|
||||||
@@ -13226,6 +13350,11 @@
|
|||||||
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
|
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
|
||||||
*/
|
*/
|
||||||
var invertBy = createInverter(function(result, value, key) {
|
var invertBy = createInverter(function(result, value, key) {
|
||||||
|
if (value != null &&
|
||||||
|
typeof value.toString != 'function') {
|
||||||
|
value = nativeObjectToString.call(value);
|
||||||
|
}
|
||||||
|
|
||||||
if (hasOwnProperty.call(result, value)) {
|
if (hasOwnProperty.call(result, value)) {
|
||||||
result[value].push(key);
|
result[value].push(key);
|
||||||
} else {
|
} else {
|
||||||
@@ -14776,9 +14905,12 @@
|
|||||||
, 'g');
|
, 'g');
|
||||||
|
|
||||||
// Use a sourceURL for easier debugging.
|
// Use a sourceURL for easier debugging.
|
||||||
|
// The sourceURL gets injected into the source that's eval-ed, so be careful
|
||||||
|
// to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
|
||||||
|
// and escape the comment, thus injecting code that gets evaled.
|
||||||
var sourceURL = '//# sourceURL=' +
|
var sourceURL = '//# sourceURL=' +
|
||||||
('sourceURL' in options
|
(hasOwnProperty.call(options, 'sourceURL')
|
||||||
? options.sourceURL
|
? (options.sourceURL + '').replace(/\s/g, ' ')
|
||||||
: ('lodash.templateSources[' + (++templateCounter) + ']')
|
: ('lodash.templateSources[' + (++templateCounter) + ']')
|
||||||
) + '\n';
|
) + '\n';
|
||||||
|
|
||||||
@@ -14811,10 +14943,16 @@
|
|||||||
|
|
||||||
// If `variable` is not specified wrap a with-statement around the generated
|
// If `variable` is not specified wrap a with-statement around the generated
|
||||||
// code to add the data object to the top of the scope chain.
|
// code to add the data object to the top of the scope chain.
|
||||||
var variable = options.variable;
|
var variable = hasOwnProperty.call(options, 'variable') && options.variable;
|
||||||
if (!variable) {
|
if (!variable) {
|
||||||
source = 'with (obj) {\n' + source + '\n}\n';
|
source = 'with (obj) {\n' + source + '\n}\n';
|
||||||
}
|
}
|
||||||
|
// Throw an error if a forbidden character was found in `variable`, to prevent
|
||||||
|
// potential command injection attacks.
|
||||||
|
else if (reForbiddenIdentifierChars.test(variable)) {
|
||||||
|
throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
|
||||||
|
}
|
||||||
|
|
||||||
// Cleanup code by stripping empty strings.
|
// Cleanup code by stripping empty strings.
|
||||||
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
||||||
.replace(reEmptyStringMiddle, '$1')
|
.replace(reEmptyStringMiddle, '$1')
|
||||||
@@ -14928,7 +15066,7 @@
|
|||||||
function trim(string, chars, guard) {
|
function trim(string, chars, guard) {
|
||||||
string = toString(string);
|
string = toString(string);
|
||||||
if (string && (guard || chars === undefined)) {
|
if (string && (guard || chars === undefined)) {
|
||||||
return string.replace(reTrim, '');
|
return baseTrim(string);
|
||||||
}
|
}
|
||||||
if (!string || !(chars = baseToString(chars))) {
|
if (!string || !(chars = baseToString(chars))) {
|
||||||
return string;
|
return string;
|
||||||
@@ -14963,7 +15101,7 @@
|
|||||||
function trimEnd(string, chars, guard) {
|
function trimEnd(string, chars, guard) {
|
||||||
string = toString(string);
|
string = toString(string);
|
||||||
if (string && (guard || chars === undefined)) {
|
if (string && (guard || chars === undefined)) {
|
||||||
return string.replace(reTrimEnd, '');
|
return string.slice(0, trimmedEndIndex(string) + 1);
|
||||||
}
|
}
|
||||||
if (!string || !(chars = baseToString(chars))) {
|
if (!string || !(chars = baseToString(chars))) {
|
||||||
return string;
|
return string;
|
||||||
@@ -15517,6 +15655,9 @@
|
|||||||
* values against any array or object value, respectively. See `_.isEqual`
|
* values against any array or object value, respectively. See `_.isEqual`
|
||||||
* for a list of supported value comparisons.
|
* for a list of supported value comparisons.
|
||||||
*
|
*
|
||||||
|
* **Note:** Multiple values can be checked by combining several matchers
|
||||||
|
* using `_.overSome`
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
@@ -15532,6 +15673,10 @@
|
|||||||
*
|
*
|
||||||
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
|
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
|
||||||
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
|
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
|
||||||
|
*
|
||||||
|
* // Checking for several possible values
|
||||||
|
* _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
|
||||||
|
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
|
||||||
*/
|
*/
|
||||||
function matches(source) {
|
function matches(source) {
|
||||||
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
||||||
@@ -15546,6 +15691,9 @@
|
|||||||
* `srcValue` values against any array or object value, respectively. See
|
* `srcValue` values against any array or object value, respectively. See
|
||||||
* `_.isEqual` for a list of supported value comparisons.
|
* `_.isEqual` for a list of supported value comparisons.
|
||||||
*
|
*
|
||||||
|
* **Note:** Multiple values can be checked by combining several matchers
|
||||||
|
* using `_.overSome`
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
@@ -15562,6 +15710,10 @@
|
|||||||
*
|
*
|
||||||
* _.find(objects, _.matchesProperty('a', 4));
|
* _.find(objects, _.matchesProperty('a', 4));
|
||||||
* // => { 'a': 4, 'b': 5, 'c': 6 }
|
* // => { 'a': 4, 'b': 5, 'c': 6 }
|
||||||
|
*
|
||||||
|
* // Checking for several possible values
|
||||||
|
* _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
|
||||||
|
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
|
||||||
*/
|
*/
|
||||||
function matchesProperty(path, srcValue) {
|
function matchesProperty(path, srcValue) {
|
||||||
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
|
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
|
||||||
@@ -15785,6 +15937,10 @@
|
|||||||
* Creates a function that checks if **all** of the `predicates` return
|
* Creates a function that checks if **all** of the `predicates` return
|
||||||
* truthy when invoked with the arguments it receives.
|
* truthy when invoked with the arguments it receives.
|
||||||
*
|
*
|
||||||
|
* Following shorthands are possible for providing predicates.
|
||||||
|
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
|
||||||
|
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 4.0.0
|
* @since 4.0.0
|
||||||
@@ -15811,6 +15967,10 @@
|
|||||||
* Creates a function that checks if **any** of the `predicates` return
|
* Creates a function that checks if **any** of the `predicates` return
|
||||||
* truthy when invoked with the arguments it receives.
|
* truthy when invoked with the arguments it receives.
|
||||||
*
|
*
|
||||||
|
* Following shorthands are possible for providing predicates.
|
||||||
|
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
|
||||||
|
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 4.0.0
|
* @since 4.0.0
|
||||||
@@ -15830,6 +15990,9 @@
|
|||||||
*
|
*
|
||||||
* func(NaN);
|
* func(NaN);
|
||||||
* // => false
|
* // => false
|
||||||
|
*
|
||||||
|
* var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
|
||||||
|
* var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
|
||||||
*/
|
*/
|
||||||
var overSome = createOver(arraySome);
|
var overSome = createOver(arraySome);
|
||||||
|
|
||||||
@@ -17016,10 +17179,11 @@
|
|||||||
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
||||||
var lodashFunc = lodash[methodName];
|
var lodashFunc = lodash[methodName];
|
||||||
if (lodashFunc) {
|
if (lodashFunc) {
|
||||||
var key = (lodashFunc.name + ''),
|
var key = lodashFunc.name + '';
|
||||||
names = realNames[key] || (realNames[key] = []);
|
if (!hasOwnProperty.call(realNames, key)) {
|
||||||
|
realNames[key] = [];
|
||||||
names.push({ 'name': methodName, 'func': lodashFunc });
|
}
|
||||||
|
realNames[key].push({ 'name': methodName, 'func': lodashFunc });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
270
dist/lodash.min.js
vendored
270
dist/lodash.min.js
vendored
@@ -1,136 +1,140 @@
|
|||||||
/**
|
/**
|
||||||
* @license
|
* @license
|
||||||
* Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
* Lodash <https://lodash.com/>
|
||||||
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||||
|
* Released under MIT license <https://lodash.com/license>
|
||||||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
*/
|
*/
|
||||||
;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&false!==t(n[r],r,n););return n}function i(n,t){for(var r=null==n?0:n.length;r--&&false!==t(n[r],r,n););
|
(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function e(n,t){for(var r=null==n?0:n.length;r--&&t(n[r],r,n)!==!1;);return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;
|
||||||
return n}function o(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function f(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function c(n,t){return!(null==n||!n.length)&&-1<d(n,t,0)}function a(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return true;return false}function l(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function s(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];
|
return!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!!(null==n?0:n.length)&&y(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
|
||||||
return n}function h(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);return r}function p(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function _(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return true;return false}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,false}),e}function g(n,t,r,e){var u=n.length;for(r+=e?1:-1;e?r--:++r<u;)if(t(n[r],r,n))return r;return-1}function d(n,t,r){if(t===t)n:{
|
return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.split("")}function _(n){return n.match($t)||[]}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function g(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function y(n,t,r){return t===t?Z(n,t,r):g(n,b,r)}function d(n,t,r,e){
|
||||||
--r;for(var e=n.length;++r<e;)if(n[r]===t){n=r;break n}n=-1}else n=g(n,b,r);return n}function y(n,t,r,e){--r;for(var u=n.length;++r<u;)if(e(n[r],t))return r;return-1}function b(n){return n!==n}function x(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:P}function j(n){return function(t){return null==t?F:t[n]}}function w(n){return function(t){return null==n?F:n[t]}}function m(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=false,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;
|
for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function b(n){return n!==n}function w(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:Cn}function m(n){return function(t){return null==t?X:t[n]}}function x(n){return function(t){return null==n?X:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==X&&(r=r===X?i:r+i);
|
||||||
return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==F&&(r=r===F?i:r+i)}return r}function E(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function O(n,t){return l(t,function(t){return[t,n[t]]})}function S(n){return function(t){return n(t)}}function I(n,t){return l(t,function(t){return n[t]})}function R(n,t){return n.has(t)}function z(n,t){for(var r=-1,e=n.length;++r<e&&-1<d(t,n[r],0););return r}function W(n,t){for(var r=n.length;r--&&-1<d(t,n[r],0););return r}function B(n){
|
}return r}function O(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function I(n,t){return c(t,function(t){return[t,n[t]]})}function R(n){return n?n.slice(0,H(n)+1).replace(Lt,""):n}function z(n){return function(t){return n(t)}}function E(n,t){return c(t,function(t){return n[t]})}function S(n,t){return n.has(t)}function W(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function C(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;
|
||||||
return"\\"+Tn[n]}function L(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function U(n,t){return function(r){return n(t(r))}}function C(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&"__lodash_placeholder__"!==o||(n[r]="__lodash_placeholder__",i[u++]=r)}return i}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function T(n){if(Bn.test(n)){
|
return e}function U(n){return"\\"+Yr[n]}function B(n,t){return null==n?X:n[t]}function T(n){return Nr.test(n)}function $(n){return Pr.test(n)}function D(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function F(n,t){return function(r){return n(t(r))}}function N(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==cn||(n[r]=cn,i[u++]=r)}return i}function P(n){var t=-1,r=Array(n.size);
|
||||||
for(var t=zn.lastIndex=0;zn.test(n);)++t;n=t}else n=tt(n);return n}function $(n){return Bn.test(n)?n.match(zn)||[]:n.split("")}var F,N=1/0,P=NaN,Z=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],q=/\b__p\+='';/g,V=/\b(__p\+=)''\+/g,K=/(__e\(.*?\)|\b__t\))\+'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/^\./,un=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,on=/[\\^$.*+?()[\]{}|]/g,fn=RegExp(on.source),cn=/^\s+|\s+$/g,an=/^\s+/,ln=/\s+$/,sn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hn=/\{\n\/\* \[wrapped with (.+)\] \*/,pn=/,? & /,_n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vn=/\\(\\)?/g,gn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\d*)$/,mn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,An=/($^)/,kn=/['\n\r\u2028\u2029\\]/g,En="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",On="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+En,Sn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",In=RegExp("['\u2019]","g"),Rn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),zn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Sn+En,"g"),Wn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",On].join("|"),"g"),Bn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Cn={};
|
return n.forEach(function(n){r[++t]=n}),r}function q(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function Z(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function K(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function V(n){return T(n)?J(n):_e(n)}function G(n){return T(n)?Y(n):p(n)}function H(n){for(var t=n.length;t--&&Ct.test(n.charAt(t)););return t}function J(n){for(var t=Mr.lastIndex=0;Mr.test(n);)++t;return t}function Y(n){return n.match(Mr)||[];
|
||||||
Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object DataView]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false;
|
}function Q(n){return n.match(Fr)||[]}var X,nn="4.17.21",tn=200,rn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",en="Expected a function",un="Invalid `variable` option passed into `_.template`",on="__lodash_hash_undefined__",fn=500,cn="__lodash_placeholder__",an=1,ln=2,sn=4,hn=1,pn=2,_n=1,vn=2,gn=4,yn=8,dn=16,bn=32,wn=64,mn=128,xn=256,jn=512,An=30,kn="...",On=800,In=16,Rn=1,zn=2,En=3,Sn=1/0,Wn=9007199254740991,Ln=1.7976931348623157e308,Cn=NaN,Un=4294967295,Bn=Un-1,Tn=Un>>>1,$n=[["ary",mn],["bind",_n],["bindKey",vn],["curry",yn],["curryRight",dn],["flip",jn],["partial",bn],["partialRight",wn],["rearg",xn]],Dn="[object Arguments]",Mn="[object Array]",Fn="[object AsyncFunction]",Nn="[object Boolean]",Pn="[object Date]",qn="[object DOMException]",Zn="[object Error]",Kn="[object Function]",Vn="[object GeneratorFunction]",Gn="[object Map]",Hn="[object Number]",Jn="[object Null]",Yn="[object Object]",Qn="[object Promise]",Xn="[object Proxy]",nt="[object RegExp]",tt="[object Set]",rt="[object String]",et="[object Symbol]",ut="[object Undefined]",it="[object WeakMap]",ot="[object WeakSet]",ft="[object ArrayBuffer]",ct="[object DataView]",at="[object Float32Array]",lt="[object Float64Array]",st="[object Int8Array]",ht="[object Int16Array]",pt="[object Int32Array]",_t="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",dt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,jt=RegExp(mt.source),At=RegExp(xt.source),kt=/<%-([\s\S]+?)%>/g,Ot=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zt=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(St.source),Lt=/^\s+/,Ct=/\s/,Ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Tt=/,? & /,$t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dt=/[()=,{}\[\]\/\s]/,Mt=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Zt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Vt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Qt="\\u0300-\\u036f",Xt="\\ufe20-\\ufe2f",nr="\\u20d0-\\u20ff",tr=Qt+Xt+nr,rr="\\u2700-\\u27bf",er="a-z\\xdf-\\xf6\\xf8-\\xff",ur="\\xac\\xb1\\xd7\\xf7",ir="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",or="\\u2000-\\u206f",fr=" \\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",cr="A-Z\\xc0-\\xd6\\xd8-\\xde",ar="\\ufe0e\\ufe0f",lr=ur+ir+or+fr,sr="['\u2019]",hr="["+Yt+"]",pr="["+lr+"]",_r="["+tr+"]",vr="\\d+",gr="["+rr+"]",yr="["+er+"]",dr="[^"+Yt+lr+vr+rr+er+cr+"]",br="\\ud83c[\\udffb-\\udfff]",wr="(?:"+_r+"|"+br+")",mr="[^"+Yt+"]",xr="(?:\\ud83c[\\udde6-\\uddff]){2}",jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ar="["+cr+"]",kr="\\u200d",Or="(?:"+yr+"|"+dr+")",Ir="(?:"+Ar+"|"+dr+")",Rr="(?:"+sr+"(?:d|ll|m|re|s|t|ve))?",zr="(?:"+sr+"(?:D|LL|M|RE|S|T|VE))?",Er=wr+"?",Sr="["+ar+"]?",Wr="(?:"+kr+"(?:"+[mr,xr,jr].join("|")+")"+Sr+Er+")*",Lr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Sr+Er+Wr,Br="(?:"+[gr,xr,jr].join("|")+")"+Ur,Tr="(?:"+[mr+_r+"?",_r,xr,jr,hr].join("|")+")",$r=RegExp(sr,"g"),Dr=RegExp(_r,"g"),Mr=RegExp(br+"(?="+br+")|"+Tr+Ur,"g"),Fr=RegExp([Ar+"?"+yr+"+"+Rr+"(?="+[pr,Ar,"$"].join("|")+")",Ir+"+"+zr+"(?="+[pr,Ar+Or,"$"].join("|")+")",Ar+"?"+Or+"+"+Rr,Ar+"+"+zr,Cr,Lr,vr,Br].join("|"),"g"),Nr=RegExp("["+kr+Yt+tr+ar+"]"),Pr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zr=-1,Kr={};
|
||||||
var Dn={};Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object DataView]"]=Dn["[object Boolean]"]=Dn["[object Date]"]=Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object Symbol]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=true,
|
Kr[at]=Kr[lt]=Kr[st]=Kr[ht]=Kr[pt]=Kr[_t]=Kr[vt]=Kr[gt]=Kr[yt]=!0,Kr[Dn]=Kr[Mn]=Kr[ft]=Kr[Nn]=Kr[ct]=Kr[Pn]=Kr[Zn]=Kr[Kn]=Kr[Gn]=Kr[Hn]=Kr[Yn]=Kr[nt]=Kr[tt]=Kr[rt]=Kr[it]=!1;var Vr={};Vr[Dn]=Vr[Mn]=Vr[ft]=Vr[ct]=Vr[Nn]=Vr[Pn]=Vr[at]=Vr[lt]=Vr[st]=Vr[ht]=Vr[pt]=Vr[Gn]=Vr[Hn]=Vr[Yn]=Vr[nt]=Vr[tt]=Vr[rt]=Vr[et]=Vr[_t]=Vr[vt]=Vr[gt]=Vr[yt]=!0,Vr[Zn]=Vr[Kn]=Vr[it]=!1;var Gr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a",
|
||||||
Dn["[object Error]"]=Dn["[object Function]"]=Dn["[object WeakMap]"]=false;var Mn,Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=parseFloat,Fn=parseInt,Nn=typeof global=="object"&&global&&global.Object===Object&&global,Pn=typeof self=="object"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function("return this")(),qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process;
|
"\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",
|
||||||
n:{try{Mn=Gn&&Gn.binding&&Gn.binding("util");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j("length"),rt=w({"\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",
|
"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g",
|
||||||
"\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","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C",
|
"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O",
|
||||||
"\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i",
|
"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w",
|
||||||
"\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S",
|
"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Hr={"&":"&","<":"<",">":">",'"':""","'":"'"},Jr={"&":"&","<":"<",">":">",""":'"',"'":"'"},Yr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,Xr=parseInt,ne="object"==typeof global&&global&&global.Object===Object&&global,te="object"==typeof self&&self&&self.Object===Object&&self,re=ne||te||Function("return this")(),ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,ue=ee&&"object"==typeof module&&module&&!module.nodeType&&module,ie=ue&&ue.exports===ee,oe=ie&&ne.process,fe=function(){
|
||||||
"\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe",
|
try{var n=ue&&ue.require&&ue.require("util").types;return n?n:oe&&oe.binding&&oe.binding("util")}catch(n){}}(),ce=fe&&fe.isArrayBuffer,ae=fe&&fe.isDate,le=fe&&fe.isMap,se=fe&&fe.isRegExp,he=fe&&fe.isSet,pe=fe&&fe.isTypedArray,_e=m("length"),ve=x(Gr),ge=x(Hr),ye=x(Jr),de=function p(x){function Z(n){if(cc(n)&&!bh(n)&&!(n instanceof Ct)){if(n instanceof Y)return n;if(bl.call(n,"__wrapped__"))return eo(n)}return new Y(n)}function J(){}function Y(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,
|
||||||
"\u0149":"'n","\u017f":"s"}),et=w({"&":"&","<":"<",">":">",'"':""","'":"'"}),ut=w({"&":"&","<":"<",">":">",""":'"',"'":"'"}),it=function w(En){function On(n){if(xu(n)&&!af(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ci.call(n,"__wrapped__"))return Pe(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,
|
this.__index__=0,this.__values__=X}function Ct(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Un,this.__views__=[]}function $t(){var n=new Ct(this.__wrapped__);return n.__actions__=Tu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tu(this.__views__),n}function Yt(){if(this.__filtered__){var n=new Ct(this);n.__dir__=-1,
|
||||||
this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Nn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Pn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function qn(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new Pn;++t<r;)this.add(n[t])}function Vn(n){
|
n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Qt(){var n=this.__wrapped__.value(),t=this.__dir__,r=bh(n),e=t<0,u=r?n.length:0,i=Oi(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Hl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return wu(n,this.__actions__);var _=[];n:for(;c--&&h<p;){a+=t;for(var v=-1,g=n[a];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(b==zn)g=w;else if(!w){if(b==Rn)continue n;break n}}_[h++]=g}return _}function Xt(n){
|
||||||
this.size=(this.__data__=new Nn(n)).size}function Gn(n,t){var r,e=af(n),u=!e&&cf(n),i=!e&&!u&&sf(n),o=!e&&!u&&!i&&gf(n),u=(e=e||u||i||o)?E(n.length,ri):[],f=u.length;for(r in n)!t&&!ci.call(n,r)||e&&("length"==r||i&&("offset"==r||"parent"==r)||o&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||Re(r,f))||u.push(r);return u}function tt(n){var t=n.length;return t?n[cr(0,t-1)]:F}function ot(n,t){return Te(Mr(n),gt(t,0,n.length))}function ft(n){return Te(Mr(n))}function ct(n,t,r){(r===F||hu(n[t],r))&&(r!==F||t in n)||_t(n,t,r);
|
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function nr(){this.__data__=is?is(null):{},this.size=0}function tr(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function rr(n){var t=this.__data__;if(is){var r=t[n];return r===on?X:r}return bl.call(t,n)?t[n]:X}function er(n){var t=this.__data__;return is?t[n]!==X:bl.call(t,n)}function ur(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=is&&t===X?on:t,this}function ir(n){
|
||||||
}function at(n,t,r){var e=n[t];ci.call(n,t)&&hu(e,r)&&(r!==F||t in n)||_t(n,t,r)}function lt(n,t){for(var r=n.length;r--;)if(hu(n[r][0],t))return r;return-1}function st(n,t,r,e){return oo(n,function(n,u,i){t(e,n,r(n),i)}),e}function ht(n,t){return n&&Tr(t,Lu(t),n)}function pt(n,t){return n&&Tr(t,Uu(t),n)}function _t(n,t,r){"__proto__"==t&&Ei?Ei(n,t,{configurable:true,enumerable:true,value:r,writable:true}):n[t]=r}function vt(n,t){for(var r=-1,e=t.length,u=Hu(e),i=null==n;++r<e;)u[r]=i?F:Wu(n,t[r]);return u;
|
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function or(){this.__data__=[],this.size=0}function fr(n){var t=this.__data__,r=Wr(t,n);return!(r<0)&&(r==t.length-1?t.pop():Ll.call(t,r,1),--this.size,!0)}function cr(n){var t=this.__data__,r=Wr(t,n);return r<0?X:t[r][1]}function ar(n){return Wr(this.__data__,n)>-1}function lr(n,t){var r=this.__data__,e=Wr(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function sr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){
|
||||||
}function gt(n,t,r){return n===n&&(r!==F&&(n=n<=r?n:r),t!==F&&(n=n>=t?n:t)),n}function dt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ee(n),!c)return Mr(n,f)}else{var s=yo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(sf(n))return Wr(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Oe(n),!c)return a?Fr(n,pt(f,n)):$r(n,ht(f,n))}else{if(!Dn[s])return i?n:{};f=Se(n,s,dt,c)}}if(o||(o=new Vn),
|
var e=n[t];this.set(e[0],e[1])}}function hr(){this.size=0,this.__data__={hash:new Xt,map:new(ts||ir),string:new Xt}}function pr(n){var t=xi(this,n).delete(n);return this.size-=t?1:0,t}function _r(n){return xi(this,n).get(n)}function vr(n){return xi(this,n).has(n)}function gr(n,t){var r=xi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function yr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new sr;++t<r;)this.add(n[t])}function dr(n){return this.__data__.set(n,on),this}function br(n){
|
||||||
i=o.get(n))return i;o.set(n,f);var a=l?a?ye:de:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),at(f,u,dt(e,t,r,u,n,o))}),f}function yt(n){var t=Lu(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!="function")throw new ei("Expected a function");return jo(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;
|
return this.__data__.has(n)}function wr(n){this.size=(this.__data__=new ir(n)).size}function mr(){this.__data__=new ir,this.size=0}function xr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function jr(n){return this.__data__.get(n)}function Ar(n){return this.__data__.has(n)}function kr(n,t){var r=this.__data__;if(r instanceof ir){var e=r.__data__;if(!ts||e.length<tn-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new sr(e)}return r.set(n,t),this.size=r.size,this}function Or(n,t){
|
||||||
if(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++u<f;){var p=n[u],_=null==r?p:r(p),p=e||0!==p?p:0;if(o&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function wt(n,t){var r=true;return oo(n,function(n,e,u){return r=!!t(n,e,u)}),r}function mt(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===F?o===o&&!Au(o):r(o,f)))var f=o,c=i}return c}function At(n,t){var r=[];return oo(n,function(n,e,u){
|
var r=bh(n),e=!r&&dh(n),u=!r&&!e&&mh(n),i=!r&&!e&&!u&&Oh(n),o=r||e||u||i,f=o?O(n.length,hl):[],c=f.length;for(var a in n)!t&&!bl.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Ci(a,c))||f.push(a);return f}function Ir(n){var t=n.length;return t?n[tu(0,t-1)]:X}function Rr(n,t){return Xi(Tu(n),Mr(t,0,n.length))}function zr(n){return Xi(Tu(n))}function Er(n,t,r){(r===X||Gf(n[t],r))&&(r!==X||t in n)||Br(n,t,r)}function Sr(n,t,r){var e=n[t];
|
||||||
t(n,e,u)&&r.push(n)}),r}function kt(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Ie),u||(u=[]);++i<o;){var f=n[i];0<t&&r(f)?1<t?kt(f,t-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function Et(n,t){return n&&co(n,t,Lu)}function Ot(n,t){return n&&ao(n,t,Lu)}function St(n,t){return f(t,function(t){return gu(n[t])})}function It(n,t){t=Rr(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[$e(t[r++])];return r&&r==e?n:F}function Rt(n,t,r){return t=t(n),af(n)?t:s(t,r(n))}function zt(n){if(null==n)n=n===F?"[object Undefined]":"[object Null]";else if(ki&&ki in ni(n)){
|
bl.call(n,t)&&Gf(e,r)&&(r!==X||t in n)||Br(n,t,r)}function Wr(n,t){for(var r=n.length;r--;)if(Gf(n[r][0],t))return r;return-1}function Lr(n,t,r,e){return ys(n,function(n,u,i){t(e,n,r(n),i)}),e}function Cr(n,t){return n&&$u(t,Pc(t),n)}function Ur(n,t){return n&&$u(t,qc(t),n)}function Br(n,t,r){"__proto__"==t&&Tl?Tl(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function Tr(n,t){for(var r=-1,e=t.length,u=il(e),i=null==n;++r<e;)u[r]=i?X:Mc(n,t[r]);return u}function Mr(n,t,r){return n===n&&(r!==X&&(n=n<=r?n:r),
|
||||||
var t=ci.call(n,ki),r=n[ki];try{n[ki]=F;var e=true}catch(n){}var u=si.call(n);e&&(t?n[ki]=r:delete n[ki]),n=u}else n=si.call(n);return n}function Wt(n,t){return n>t}function Bt(n,t){return null!=n&&ci.call(n,t)}function Lt(n,t){return null!=n&&t in ni(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_<u&&h.length<s;){var g=p[_],d=t?t(g):g,g=r||0!==g?g:0;
|
t!==X&&(n=n>=t?n:t)),n}function Fr(n,t,e,u,i,o){var f,c=t&an,a=t&ln,l=t&sn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==X)return f;if(!fc(n))return n;var s=bh(n);if(s){if(f=zi(n),!c)return Tu(n,f)}else{var h=zs(n),p=h==Kn||h==Vn;if(mh(n))return Iu(n,c);if(h==Yn||h==Dn||p&&!i){if(f=a||p?{}:Ei(n),!c)return a?Mu(n,Ur(f,n)):Du(n,Cr(f,n))}else{if(!Vr[h])return i?n:{};f=Si(n,h,c)}}o||(o=new wr);var _=o.get(n);if(_)return _;o.set(n,f),kh(n)?n.forEach(function(r){f.add(Fr(r,t,e,r,n,o))}):jh(n)&&n.forEach(function(r,u){
|
||||||
if(v?!R(v,d):!e(h,d,r)){for(o=i;--o;){var y=f[o];if(y?!R(y,d):!e(n[o],d,r))continue n}v&&v.push(d),h.push(g)}}return h}function Ct(n,t,r){var e={};return Et(n,function(n,u,i){t(e,r(n),u,i)}),e}function Dt(n,t,e){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Mt(n){return xu(n)&&"[object Arguments]"==zt(n)}function Tt(n){return xu(n)&&"[object ArrayBuffer]"==zt(n)}function $t(n){return xu(n)&&"[object Date]"==zt(n)}function Ft(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!xu(n)&&!xu(t))t=n!==n&&t!==t;else n:{
|
f.set(u,Fr(r,t,e,u,n,o))});var v=l?a?di:yi:a?qc:Pc,g=s?X:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),Sr(f,u,Fr(r,t,e,u,n,o))}),f}function Nr(n){var t=Pc(n);return function(r){return Pr(r,n,t)}}function Pr(n,t,r){var e=r.length;if(null==n)return!e;for(n=ll(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===X&&!(u in n)||!i(o))return!1}return!0}function Gr(n,t,r){if("function"!=typeof n)throw new pl(en);return Ws(function(){n.apply(X,r)},t)}function Hr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length;
|
||||||
var i=af(n),o=af(t),f=i?"[object Array]":yo(n),c=o?"[object Array]":yo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?_e(n,t,r,e,Ft,u):ve(n,t,f,r,e,Ft,u);else{if(!(1&r)&&(i=a&&ci.call(n,"__wrapped__"),f=o&&ci.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Ft(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),
|
if(!l)return s;r&&(t=c(t,z(r))),e?(i=f,a=!1):t.length>=tn&&(i=S,a=!1,t=new yr(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Jr(n,t){var r=!0;return ys(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Yr(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===X?o===o&&!bc(o):r(o,f)))var f=o,c=i}return c}function ne(n,t,r,e){var u=n.length;for(r=kc(r),r<0&&(r=-r>u?0:u+r),
|
||||||
i=1&r,f=de(n),o=f.length,c=de(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++a<o;){var l=f[a],h=n[l],p=t[l];if(e)var _=i?e(p,h,l,t,n,u):e(h,p,l,n,t,u);if(_===F?h!==p&&!Ft(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!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)&&(c=false)),
|
e=e===X||e>u?u:kc(e),e<0&&(e+=u),e=r>e?0:Oc(e);r<e;)n[r++]=t;return n}function te(n,t){var r=[];return ys(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ee(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Li),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?ee(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ue(n,t){return n&&bs(n,t,Pc)}function oe(n,t){return n&&ws(n,t,Pc)}function fe(n,t){return i(t,function(t){return uc(n[t])})}function _e(n,t){t=ku(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[no(t[r++])];
|
||||||
u.delete(n),u.delete(t),t=c}}else t=false;else t=false}}return t}function Nt(n){return xu(n)&&"[object Map]"==yo(n)}function Pt(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ni(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return false}for(;++u<i;){var f=r[u],c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===F&&!(c in n))return false}else{if(f=new Vn,e)var s=e(a,l,c,n,t,f);if(s===F?!Ft(l,a,3,e,f):!s)return false}}return true}function Zt(n){return!(!bu(n)||li&&li in n)&&(gu(n)?_i:xn).test(Fe(n))}function qt(n){
|
return r&&r==e?n:X}function de(n,t,r){var e=t(n);return bh(n)?e:a(e,r(n))}function we(n){return null==n?n===X?ut:Jn:Bl&&Bl in ll(n)?ki(n):Ki(n)}function me(n,t){return n>t}function xe(n,t){return null!=n&&bl.call(n,t)}function je(n,t){return null!=n&&t in ll(n)}function Ae(n,t,r){return n>=Hl(t,r)&&n<Gl(t,r)}function ke(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=il(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,z(t))),s=Hl(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new yr(a&&p):X}p=n[0];
|
||||||
return xu(n)&&"[object RegExp]"==zt(n)}function Vt(n){return xu(n)&&"[object Set]"==yo(n)}function Kt(n){return xu(n)&&yu(n.length)&&!!Cn[zt(n)]}function Gt(n){return typeof n=="function"?n:null==n?Nu:typeof n=="object"?af(n)?Xt(n[0],n[1]):Qt(n):Vu(n)}function Ht(n){if(!Le(n))return Ci(n);var t,r=[];for(t in ni(n))ci.call(n,t)&&"constructor"!=t&&r.push(t);return r}function Jt(n,t){return n<t}function Yt(n,t){var r=-1,e=pu(n)?Hu(n.length):[];return oo(n,function(n,u,i){e[++r]=t(n,u,i)}),e}function Qt(n){
|
var _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?S(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?S(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function Oe(n,t,r,e){return ue(n,function(n,u,i){t(e,r(n),u,i)}),e}function Ie(t,r,e){r=ku(r,t),t=Gi(t,r);var u=null==t?t:t[no(jo(r))];return null==u?X:n(u,t,e)}function Re(n){return cc(n)&&we(n)==Dn}function ze(n){return cc(n)&&we(n)==ft}function Ee(n){return cc(n)&&we(n)==Pn}function Se(n,t,r,e,u){
|
||||||
var t=me(n);return 1==t.length&&t[0][2]?Ue(t[0][0],t[0][1]):function(r){return r===n||Pt(r,n,t)}}function Xt(n,t){return We(n)&&t===t&&!bu(t)?Ue($e(n),t):function(r){var e=Wu(r,n);return e===F&&e===t?Bu(r,n):Ft(t,e,3)}}function nr(n,t,r,e,u){n!==t&&co(t,function(i,o){if(bu(i)){u||(u=new Vn);var f=u,c=n[o],a=t[o],l=f.get(a);if(l)ct(n,o,l);else{var l=e?e(c,a,o+"",n,t,f):F,s=l===F;if(s){var h=af(a),p=!h&&sf(a),_=!h&&!p&&gf(a),l=a;h||p||_?af(c)?l=c:_u(c)?l=Mr(c):p?(s=false,l=Wr(a,true)):_?(s=false,l=Lr(a,true)):l=[]:wu(a)||cf(a)?(l=c,
|
return n===t||(null==n||null==t||!cc(n)&&!cc(t)?n!==n&&t!==t:We(n,t,r,e,Se,u))}function We(n,t,r,e,u,i){var o=bh(n),f=bh(t),c=o?Mn:zs(n),a=f?Mn:zs(t);c=c==Dn?Yn:c,a=a==Dn?Yn:a;var l=c==Yn,s=a==Yn,h=c==a;if(h&&mh(n)){if(!mh(t))return!1;o=!0,l=!1}if(h&&!l)return i||(i=new wr),o||Oh(n)?pi(n,t,r,e,u,i):_i(n,t,c,r,e,u,i);if(!(r&hn)){var p=l&&bl.call(n,"__wrapped__"),_=s&&bl.call(t,"__wrapped__");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new wr),u(v,g,r,e,i)}}return!!h&&(i||(i=new wr),vi(n,t,r,e,u,i));
|
||||||
cf(c)?l=Ru(c):(!bu(c)||r&&gu(c))&&(l=Oe(a))):s=false}s&&(f.set(a,l),nr(l,a,r,e,f),f.delete(a)),ct(n,o,l)}}else f=e?e(n[o],i,o+"",n,t,u):F,f===F&&(f=i),ct(n,o,f)},Uu)}function tr(n,t){var r=n.length;if(r)return t+=0>t?r:0,Re(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(je())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e<o;){var c=Ur(u[e],i[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);
|
}function Le(n){return cc(n)&&zs(n)==Gn}function Ce(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ll(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<i;){f=r[u];var c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===X&&!(c in n))return!1}else{var s=new wr;if(e)var h=e(a,l,c,n,t,s);if(!(h===X?Se(l,a,hn|pn,e,s):h))return!1}}return!0}function Ue(n){return!(!fc(n)||Di(n))&&(uc(n)?kl:Zt).test(to(n))}function Be(n){return cc(n)&&we(n)==nt}function Te(n){return cc(n)&&zs(n)==tt;
|
||||||
break n}}e=n.b-t.b}return e})}function er(n,t){return ur(n,t,function(t,r){return Bu(n,r)})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=It(n,o);r(f,o)&&pr(i,Rr(o,n),f)}return i}function ir(n){return function(t){return It(t,n)}}function or(n,t,r,e){var u=e?y:d,i=-1,o=t.length,f=n;for(n===t&&(t=Mr(t)),r&&(f=l(n,S(r)));++i<o;)for(var c=0,a=t[i],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==n&&wi.call(f,c,1),wi.call(n,c,1);return n}function fr(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];
|
}function $e(n){return cc(n)&&oc(n.length)&&!!Kr[we(n)]}function De(n){return"function"==typeof n?n:null==n?La:"object"==typeof n?bh(n)?Ze(n[0],n[1]):qe(n):Fa(n)}function Me(n){if(!Mi(n))return Vl(n);var t=[];for(var r in ll(n))bl.call(n,r)&&"constructor"!=r&&t.push(r);return t}function Fe(n){if(!fc(n))return Zi(n);var t=Mi(n),r=[];for(var e in n)("constructor"!=e||!t&&bl.call(n,e))&&r.push(e);return r}function Ne(n,t){return n<t}function Pe(n,t){var r=-1,e=Hf(n)?il(n.length):[];return ys(n,function(n,u,i){
|
||||||
if(r==e||u!==i){var i=u;Re(u)?wi.call(n,u,1):mr(n,u)}}}function cr(n,t){return n+zi(Fi()*(t-n+1))}function ar(n,t){var r="";if(!n||1>t||9007199254740991<t)return r;do t%2&&(r+=n),(t=zi(t/2))&&(n+=n);while(t);return r}function lr(n,t){return wo(Ce(n,t,Nu),n+"")}function sr(n){return tt(Du(n))}function hr(n,t){var r=Du(n);return Te(r,gt(t,0,r.length))}function pr(n,t,r,e){if(!bu(n))return n;t=Rr(t,n);for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=$e(t[u]),a=r;if(u!=o){var l=f[c],a=e?e(l,c,f):F;
|
e[++r]=t(n,u,i)}),e}function qe(n){var t=ji(n);return 1==t.length&&t[0][2]?Ni(t[0][0],t[0][1]):function(r){return r===n||Ce(r,n,t)}}function Ze(n,t){return Bi(n)&&Fi(t)?Ni(no(n),t):function(r){var e=Mc(r,n);return e===X&&e===t?Nc(r,n):Se(t,e,hn|pn)}}function Ke(n,t,r,e,u){n!==t&&bs(t,function(i,o){if(u||(u=new wr),fc(i))Ve(n,t,o,r,Ke,e,u);else{var f=e?e(Ji(n,o),i,o+"",n,t,u):X;f===X&&(f=i),Er(n,o,f)}},qc)}function Ve(n,t,r,e,u,i,o){var f=Ji(n,r),c=Ji(t,r),a=o.get(c);if(a)return Er(n,r,a),X;var l=i?i(f,c,r+"",n,t,o):X,s=l===X;
|
||||||
a===F&&(a=bu(l)?l:Re(t[u+1])?[]:{})}at(f,c,a),f=f[c]}return n}function _r(n){return Te(Du(n))}function vr(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Hu(u);++e<u;)r[e]=n[e+t];return r}function gr(n,t){var r;return oo(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function dr(n,t,r){var e=0,u=null==n?e:n.length;if(typeof t=="number"&&t===t&&2147483647>=u){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!Au(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return yr(n,t,Nu,r);
|
if(s){var h=bh(c),p=!h&&mh(c),_=!h&&!p&&Oh(c);l=c,h||p||_?bh(f)?l=f:Jf(f)?l=Tu(f):p?(s=!1,l=Iu(c,!0)):_?(s=!1,l=Wu(c,!0)):l=[]:gc(c)||dh(c)?(l=f,dh(f)?l=Rc(f):fc(f)&&!uc(f)||(l=Ei(c))):s=!1}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),Er(n,r,l)}function Ge(n,t){var r=n.length;if(r)return t+=t<0?r:0,Ci(t,r)?n[t]:X}function He(n,t,r){t=t.length?c(t,function(n){return bh(n)?function(t){return _e(t,1===n.length?n[0]:n)}:n}):[La];var e=-1;return t=c(t,z(mi())),A(Pe(n,function(n,r,u){return{criteria:c(t,function(t){
|
||||||
}function yr(n,t,r,e){t=r(t);for(var u=0,i=null==n?0:n.length,o=t!==t,f=null===t,c=Au(t),a=t===F;u<i;){var l=zi((u+i)/2),s=r(n[l]),h=s!==F,p=null===s,_=s===s,v=Au(s);(o?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?s<=t:s<t)?u=l+1:i=l}return Mi(i,4294967294)}function br(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r],f=t?t(o):o;if(!r||!hu(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function xr(n){return typeof n=="number"?n:Au(n)?P:+n}function jr(n){if(typeof n=="string")return n;
|
return t(n)}),index:++e,value:n}}),function(n,t){return Cu(n,t,r)})}function Je(n,t){return Ye(n,t,function(t,r){return Nc(n,r)})}function Ye(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=_e(n,o);r(f,o)&&fu(i,ku(o,n),f)}return i}function Qe(n){return function(t){return _e(t,n)}}function Xe(n,t,r,e){var u=e?d:y,i=-1,o=t.length,f=n;for(n===t&&(t=Tu(t)),r&&(f=c(n,z(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Ll.call(f,a,1),Ll.call(n,a,1);return n}function nu(n,t){for(var r=n?t.length:0,e=r-1;r--;){
|
||||||
if(af(n))return l(n,jr)+"";if(Au(n))return uo?uo.call(n):"";var t=n+"";return"0"==t&&1/n==-N?"-0":t}function wr(n,t,r){var e=-1,u=c,i=n.length,o=true,f=[],l=f;if(r)o=false,u=a;else if(200<=i){if(u=t?null:po(n))return D(u);o=false,u=R,l=new qn}else l=t?[]:f;n:for(;++e<i;){var s=n[e],h=t?t(s):s,s=r||0!==s?s:0;if(o&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function mr(n,t){return t=Rr(t,n),n=2>t.length?n:It(n,vr(t,0,-1)),
|
var u=t[r];if(r==e||u!==i){var i=u;Ci(u)?Ll.call(n,u,1):yu(n,u)}}return n}function tu(n,t){return n+Nl(Ql()*(t-n+1))}function ru(n,t,r,e){for(var u=-1,i=Gl(Fl((t-n)/(r||1)),0),o=il(i);i--;)o[e?i:++u]=n,n+=r;return o}function eu(n,t){var r="";if(!n||t<1||t>Wn)return r;do t%2&&(r+=n),t=Nl(t/2),t&&(n+=n);while(t);return r}function uu(n,t){return Ls(Vi(n,t,La),n+"")}function iu(n){return Ir(ra(n))}function ou(n,t){var r=ra(n);return Xi(r,Mr(t,0,r.length))}function fu(n,t,r,e){if(!fc(n))return n;t=ku(t,n);
|
||||||
null==n||delete n[$e(Ge(t))]}function Ar(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?vr(n,e?0:i,e?i+1:u):vr(n,e?i+1:0,e?u:i)}function kr(n,t){var r=n;return r instanceof Mn&&(r=r.value()),h(t,function(n,t){return t.func.apply(t.thisArg,s([n],t.args))},r)}function Er(n,t,r){var e=n.length;if(2>e)return e?wr(n[0]):[];for(var u=-1,i=Hu(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=jt(i[u]||o,n[f],t,r));return wr(kt(i,1),t,r)}function Or(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;)r(o,n[e],e<i?t[e]:F);
|
for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=no(t[u]),a=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(u!=o){var l=f[c];a=e?e(l,c,f):X,a===X&&(a=fc(l)?l:Ci(t[u+1])?[]:{})}Sr(f,c,a),f=f[c]}return n}function cu(n){return Xi(ra(n))}function au(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=il(u);++e<u;)i[e]=n[e+t];return i}function lu(n,t){var r;return ys(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function su(n,t,r){
|
||||||
return o}function Sr(n){return _u(n)?n:[]}function Ir(n){return typeof n=="function"?n:Nu}function Rr(n,t){return af(n)?n:We(n,t)?[n]:mo(zu(n))}function zr(n,t,r){var e=n.length;return r=r===F?e:r,!t&&r>=e?n:vr(n,t,r)}function Wr(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Br(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Lr(n,t){return new n.constructor(t?Br(n.buffer):n.buffer,n.byteOffset,n.length)}function Ur(n,t){
|
var e=0,u=null==n?e:n.length;if("number"==typeof t&&t===t&&u<=Tn){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!bc(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return hu(n,t,La,r)}function hu(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;t=r(t);for(var o=t!==t,f=null===t,c=bc(t),a=t===X;u<i;){var l=Nl((u+i)/2),s=r(n[l]),h=s!==X,p=null===s,_=s===s,v=bc(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return Hl(i,Bn)}function pu(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){
|
||||||
if(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cr(n,t,r,e){var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Di(i-o,0),l=Hu(c+a);for(e=!e;++f<c;)l[f]=t[f];for(;++u<o;)(e||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Dr(n,t,r,e){var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Di(i-f,0),s=Hu(l+a);
|
var o=n[r],f=t?t(o):o;if(!r||!Gf(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function _u(n){return"number"==typeof n?n:bc(n)?Cn:+n}function vu(n){if("string"==typeof n)return n;if(bh(n))return c(n,vu)+"";if(bc(n))return vs?vs.call(n):"";var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function gu(n,t,r){var e=-1,u=o,i=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(i>=tn){var s=t?null:ks(n);if(s)return P(s);c=!1,u=S,l=new yr}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p===p){for(var _=l.length;_--;)if(l[_]===p)continue n;
|
||||||
for(e=!e;++u<l;)s[u]=n[u];for(l=u;++c<a;)s[l+c]=t[c];for(;++o<f;)(e||u<i)&&(s[l+r[o]]=n[u++]);return s}function Mr(n,t){var r=-1,e=n.length;for(t||(t=Hu(e));++r<e;)t[r]=n[r];return t}function Tr(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):F;c===F&&(c=n[f]),u?_t(r,f,c):at(r,f,c)}return r}function $r(n,t){return Tr(n,vo(n),t)}function Fr(n,t){return Tr(n,go(n),t)}function Nr(n,t){return function(r,u){var i=af(r)?e:st,o=t?t():{};return i(r,n,je(u,2),o);
|
t&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function yu(n,t){t=ku(t,n);var r=-1,e=t.length;if(!e)return!0;for(var u=null==n||"object"!=typeof n&&"function"!=typeof n;++r<e;){var i=t[r];if("string"==typeof i){if("__proto__"===i&&!bl.call(n,"__proto__"))return!1;if("constructor"===i&&r+1<e&&"string"==typeof t[r+1]&&"prototype"===t[r+1]){if(u&&0===r)continue;return!1}}}var o=Gi(n,t);return null==o||delete o[no(jo(t))]}function du(n,t,r,e){return fu(n,t,r(_e(n,t)),e)}function bu(n,t,r,e){
|
||||||
}}function Pr(n){return lr(function(t,r){var e=-1,u=r.length,i=1<u?r[u-1]:F,o=2<u?r[2]:F,i=3<n.length&&typeof i=="function"?(u--,i):F;for(o&&ze(r[0],r[1],o)&&(i=3>u?F:i,u=1),t=ni(t);++e<u;)(o=r[e])&&n(t,o,e,i);return t})}function Zr(n,t){return function(r,e){if(null==r)return r;if(!pu(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ni(r);(t?i--:++i<u)&&false!==e(o[i],i,o););return r}}function qr(n){return function(t,r,e){var u=-1,i=ni(t);e=e(t);for(var o=e.length;o--;){var f=e[n?o:++u];if(false===r(i[f],f,i))break;
|
for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?au(n,e?0:i,e?i+1:u):au(n,e?i+1:0,e?u:i)}function wu(n,t){var r=n;return r instanceof Ct&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function mu(n,t,r){var e=n.length;if(e<2)return e?gu(n[0]):[];for(var u=-1,i=il(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Hr(i[u]||o,n[f],t,r));return gu(ee(i,1),t,r)}function xu(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;){r(o,n[e],e<i?t[e]:X)}return o;
|
||||||
}return t}}function Vr(n,t,r){function e(){return(this&&this!==Zn&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=1&t,i=Hr(n);return e}function Kr(n){return function(t){t=zu(t);var r=Bn.test(t)?$(t):F,e=r?r[0]:t.charAt(0);return t=r?zr(r,1).join(""):t.slice(1),e[n]()+t}}function Gr(n){return function(t){return h($u(Tu(t).replace(In,"")),n,"")}}function Hr(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:
|
}function ju(n){return Jf(n)?n:[]}function Au(n){return"function"==typeof n?n:La}function ku(n,t){return bh(n)?n:Bi(n,t)?[n]:Cs(Ec(n))}function Ou(n,t,r){var e=n.length;return r=r===X?e:r,!t&&r>=e?n:au(n,t,r)}function Iu(n,t){if(t)return n.slice();var r=n.length,e=zl?zl(r):new n.constructor(r);return n.copy(e),e}function Ru(n){var t=new n.constructor(n.byteLength);return new Rl(t).set(new Rl(n)),t}function zu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Eu(n){
|
||||||
return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=io(n.prototype),t=n.apply(r,t);return bu(t)?t:r}}function Jr(n,t,e){function u(){for(var o=arguments.length,f=Hu(o),c=o,a=xe(u);c--;)f[c]=arguments[c];return c=3>o&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,o<e?fe(n,t,Xr,u.placeholder,F,f,c,F,F,e-o):r(this&&this!==Zn&&this instanceof u?i:n,this,f);
|
var t=new n.constructor(n.source,Nt.exec(n));return t.lastIndex=n.lastIndex,t}function Su(n){return _s?ll(_s.call(n)):{}}function Wu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.length)}function Lu(n,t){if(n!==t){var r=n!==X,e=null===n,u=n===n,i=bc(n),o=t!==X,f=null===t,c=t===t,a=bc(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cu(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){
|
||||||
}var i=Hr(n);return u}function Yr(n){return function(t,r,e){var u=ni(t);if(!pu(t)){var i=je(r,3);t=Lu(t),r=function(n){return i(u[n],n,u)}}return r=n(t,r,e),-1<r?u[i?t[r]:r]:F}}function Qr(n){return ge(function(t){var r=t.length,e=r,u=zn.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(typeof i!="function")throw new ei("Expected a function");if(u&&!o&&"wrapper"==be(i))var o=new zn([],true)}for(e=o?e:r;++e<r;)var i=t[e],u=be(i),f="wrapper"==u?_o(i):F,o=f&&Be(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[be(f[0])].apply(o,f[3]):1==i.length&&Be(i)?o[u]():o.thru(i);
|
var c=Lu(u[e],i[e]);if(c){if(e>=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Uu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Gl(i-o,0),l=il(c+a),s=!e;++f<c;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l}function Bu(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Gl(i-f,0),s=il(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Tu(n,t){
|
||||||
return function(){var n=arguments,e=n[0];if(o&&1==n.length&&af(e))return o.plant(e).value();for(var u=0,n=r?t[u].apply(this,n):e;++u<r;)n=t[u].call(this,n);return n}})}function Xr(n,t,r,e,u,i,o,f,c,a){function l(){for(var d=arguments.length,y=Hu(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=xe(l),b=y.length;for(x=0;b--;)y[b]===j&&++x}if(e&&(y=Cr(y,e,u,_)),i&&(y=Dr(y,i,o,_)),d-=x,_&&d<a)return j=C(y,j),fe(n,t,Xr,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[n]:n,d=y.length,f){x=y.length;for(var w=Mi(f.length,x),m=Mr(y);w--;){
|
var r=-1,e=n.length;for(t||(t=il(e));++r<e;)t[r]=n[r];return t}function $u(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):X;c===X&&(c=n[f]),u?Br(r,f,c):Sr(r,f,c)}return r}function Du(n,t){return $u(n,Is(n),t)}function Mu(n,t){return $u(n,Rs(n),t)}function Fu(n,r){return function(e,u){var i=bh(e)?t:Lr,o=r?r():{};return i(e,n,mi(u,2),o)}}function Nu(n){return uu(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:X,o=u>2?r[2]:X;for(i=n.length>3&&"function"==typeof i?(u--,
|
||||||
var A=f[w];y[w]=Re(A,x)?m[A]:F}}else v&&1<d&&y.reverse();return s&&c<d&&(y.length=c),this&&this!==Zn&&this instanceof l&&(b=g||Hr(b)),b.apply(j,y)}var s=128&t,h=1&t,p=2&t,_=24&t,v=512&t,g=p?F:Hr(n);return l}function ne(n,t){return function(r,e){return Ct(r,n,t(e))}}function te(n,t){return function(r,e){var u;if(r===F&&e===F)return t;if(r!==F&&(u=r),e!==F){if(u===F)return e;typeof r=="string"||typeof e=="string"?(r=jr(r),e=jr(e)):(r=xr(r),e=xr(e)),u=n(r,e)}return u}}function re(n){return ge(function(t){
|
i):X,o&&Ui(r[0],r[1],o)&&(i=u<3?X:i,u=1),t=ll(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t})}function Pu(n,t){return function(r,e){if(null==r)return r;if(!Hf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ll(r);(t?i--:++i<u)&&e(o[i],i,o)!==!1;);return r}}function qu(n){return function(t,r,e){for(var u=-1,i=ll(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(r(i[c],c,i)===!1)break}return t}}function Zu(n,t,r){function e(){return(this&&this!==re&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=t&_n,i=Gu(n);
|
||||||
return t=l(t,S(je())),lr(function(e){var u=this;return n(t,function(n){return r(n,u,e)})})})}function ee(n,t){t=t===F?" ":jr(t);var r=t.length;return 2>r?r?ar(t,n):t:(r=ar(t,Ri(n/T(t))),Bn.test(t)?zr($(r),0,n).join(""):r.slice(0,n))}function ue(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++t];return r(h,o?e:this,s)}var o=1&t,f=Hr(n);return i}function ie(n){return function(t,r,e){
|
return e}function Ku(n){return function(t){t=Ec(t);var r=T(t)?G(t):X,e=r?r[0]:t.charAt(0),u=r?Ou(r,1).join(""):t.slice(1);return e[n]()+u}}function Vu(n){return function(t){return l(Ra(ca(t).replace($r,"")),n,"")}}function Gu(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);
|
||||||
e&&typeof e!="number"&&ze(t,r,e)&&(r=e=F),t=Eu(t),r===F?(r=t,t=0):r=Eu(r),e=e===F?t<r?1:-1:Eu(e);var u=-1;r=Di(Ri((r-t)/(e||1)),0);for(var i=Hu(r);r--;)i[n?r:++u]=t,t+=e;return i}}function oe(n){return function(t,r){return typeof t=="string"&&typeof r=="string"||(t=Iu(t),r=Iu(r)),n(t,r)}}function fe(n,t,r,e,u,i,o,f,c,a){var l=8&t,s=l?o:F;o=l?F:o;var h=l?i:F;return i=l?F:i,t=(t|(l?32:64))&~(l?64:32),4&t||(t&=-4),u=[n,t,u,h,s,i,o,f,c,a],r=r.apply(F,u),Be(n)&&xo(r,u),r.placeholder=e,De(r,n,t)}function ce(n){
|
case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=gs(n.prototype),e=n.apply(r,t);return fc(e)?e:r}}function Hu(t,r,e){function u(){for(var o=arguments.length,f=il(o),c=o,a=wi(u);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:N(f,a);return o-=l.length,o<e?oi(t,r,Qu,u.placeholder,X,f,l,X,X,e-o):n(this&&this!==re&&this instanceof u?i:t,this,f)}var i=Gu(t);return u}function Ju(n){return function(t,r,e){var u=ll(t);if(!Hf(t)){var i=mi(r,3);t=Pc(t),r=function(n){return i(u[n],n,u);
|
||||||
var t=Xu[n];return function(n,r){if(n=Iu(n),r=null==r?0:Mi(Ou(r),292)){var e=(zu(n)+"e").split("e"),e=t(e[0]+"e"+(+e[1]+r)),e=(zu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ae(n){return function(t){var r=yo(t);return"[object Map]"==r?L(t):"[object Set]"==r?M(t):O(t,n(t))}}function le(n,t,r,e,u,i,o,f){var c=2&t;if(!c&&typeof n!="function")throw new ei("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=F),o=o===F?o:Di(Ou(o),0),f=f===F?f:Ou(f),a-=u?u.length:0,64&t){
|
}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:X}}function Yu(n){return gi(function(t){var r=t.length,e=r,u=Y.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new pl(en);if(u&&!o&&"wrapper"==bi(i))var o=new Y([],!0)}for(e=o?e:r;++e<r;){i=t[e];var f=bi(i),c="wrapper"==f?Os(i):X;o=c&&$i(c[0])&&c[1]==(mn|yn|bn|xn)&&!c[4].length&&1==c[9]?o[bi(c[0])].apply(o,c[3]):1==i.length&&$i(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&bh(e))return o.plant(e).value();
|
||||||
var l=e,s=u;e=u=F}var h=c?F:_o(n);return i=[n,t,r,e,u,l,s,i,o,f],h&&(r=i[1],n=h[1],t=r|n,e=128==n&&8==r||128==n&&256==r&&i[7].length<=h[8]||384==n&&h[7].length<=h[8]&&8==r,131>t||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Cr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Dr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],
|
for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Qu(n,t,r,e,u,i,o,f,c,a){function l(){for(var y=arguments.length,d=il(y),b=y;b--;)d[b]=arguments[b];if(_)var w=wi(l),m=C(d,w);if(e&&(d=Uu(d,e,u,_)),i&&(d=Bu(d,i,o,_)),y-=m,_&&y<a){return oi(n,t,Qu,l.placeholder,r,d,N(d,w),f,c,a-y)}var x=h?r:this,j=p?x[n]:n;return y=d.length,f?d=Hi(d,f):v&&y>1&&d.reverse(),s&&c<y&&(d.length=c),this&&this!==re&&this instanceof l&&(j=g||Gu(j)),j.apply(x,d)}var s=t&mn,h=t&_n,p=t&vn,_=t&(yn|dn),v=t&jn,g=p?X:Gu(n);
|
||||||
r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===F?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Jr(n,t,f):32!=t&&33!=t||u.length?Xr.apply(F,i):ue(n,t,r,e):Vr(n,t,r),i),n,t)}function se(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n}function he(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),nr(n,t,F,he,i),i.delete(t)),n}function pe(n){return wu(n)?F:n}function _e(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;
|
return l}function Xu(n,t){return function(r,e){return Oe(r,n,t(e),{})}}function ni(n,t){return function(r,e){var u;if(r===X&&e===X)return t;if(r!==X&&(u=r),e!==X){if(u===X)return e;"string"==typeof r||"string"==typeof e?(r=vu(r),e=vu(e)):(r=_u(r),e=_u(e)),u=n(r,e)}return u}}function ti(t){return gi(function(r){return r=c(r,z(mi())),uu(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ri(n,t){t=t===X?" ":vu(t);var r=t.length;if(r<2)return r?eu(t,n):t;var e=eu(t,Fl(n/V(t)));
|
||||||
for(i.set(n,t),i.set(t,n);++c<f;){var s=n[c],h=t[c];if(e)var p=o?e(h,s,c,t,n,i):e(s,h,c,n,t,i);if(p!==F){if(p)continue;a=false;break}if(l){if(!_(t,function(n,t){if(!R(l,t)&&(s===n||u(s,n,r,e,i)))return l.push(t)})){a=false;break}}else if(s!==h&&!u(s,h,r,e,i)){a=false;break}}return i.delete(n),i.delete(t),a}function ve(n,t,r,e,u,i,o){switch(r){case"[object DataView]":if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)break;n=n.buffer,t=t.buffer;case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!i(new di(n),new di(t)))break;
|
return T(t)?Ou(G(e),0,n).join(""):e.slice(0,n)}function ei(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=il(l+c),h=this&&this!==re&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];return n(h,o?e:this,s)}var o=r&_n,f=Gu(t);return i}function ui(n){return function(t,r,e){return e&&"number"!=typeof e&&Ui(t,r,e)&&(r=e=X),t=Ac(t),r===X?(r=t,t=0):r=Ac(r),e=e===X?t<r?1:-1:Ac(e),ru(t,r,e,n)}}function ii(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Ic(t),
|
||||||
return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return hu(+n,+t);case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var f=L;case"[object Set]":if(f||(f=D),n.size!=t.size&&!(1&e))break;return(r=o.get(n))?r==t:(e|=2,o.set(n,t),t=_e(f(n),f(t),e,u,i,o),o.delete(n),t);case"[object Symbol]":if(eo)return eo.call(n)==eo.call(t)}return false}function ge(n){return wo(Ce(n,F,Ve),n+"")}function de(n){
|
r=Ic(r)),n(t,r)}}function oi(n,t,r,e,u,i,o,f,c,a){var l=t&yn,s=l?o:X,h=l?X:o,p=l?i:X,_=l?X:i;t|=l?bn:wn,t&=~(l?wn:bn),t&gn||(t&=~(_n|vn));var v=[n,t,u,p,s,_,h,f,c,a],g=r.apply(X,v);return $i(n)&&Ss(g,v),g.placeholder=e,Yi(g,n,t)}function fi(n){var t=al[n];return function(n,r){if(n=Ic(n),r=null==r?0:Hl(kc(r),292),r&&Zl(n)){var e=(Ec(n)+"e").split("e");return e=(Ec(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ci(n){return function(t){var r=zs(t);return r==Gn?M(t):r==tt?q(t):I(t,n(t));
|
||||||
return Rt(n,Lu,vo)}function ye(n){return Rt(n,Uu,go)}function be(n){for(var t=n.name+"",r=Ji[t],e=ci.call(Ji,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function xe(n){return(ci.call(On,"placeholder")?On:n).placeholder}function je(){var n=On.iteratee||Pu,n=n===Pu?Gt:n;return arguments.length?n(arguments[0],arguments[1]):n}function we(n,t){var r=n.__data__,e=typeof t;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?r[typeof t=="string"?"string":"hash"]:r.map;
|
}}function ai(n,t,r,e,u,i,o,f){var c=t&vn;if(!c&&"function"!=typeof n)throw new pl(en);var a=e?e.length:0;if(a||(t&=~(bn|wn),e=u=X),o=o===X?o:Gl(kc(o),0),f=f===X?f:kc(f),a-=u?u.length:0,t&wn){var l=e,s=u;e=u=X}var h=c?X:Os(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&qi(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],f=p[9]=p[9]===X?c?0:n.length:Gl(p[9]-a,0),!f&&t&(yn|dn)&&(t&=~(yn|dn)),t&&t!=_n)_=t==yn||t==dn?Hu(n,t,f):t!=bn&&t!=(_n|bn)||u.length?Qu.apply(X,p):ei(n,t,r,e);else var _=Zu(n,t,r);return Yi((h?ms:Ss)(_,p),n,t);
|
||||||
}function me(n){for(var t=Lu(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,u===u&&!bu(u)]}return t}function Ae(n,t){var r=null==n?F:n[t];return Zt(r)?r:F}function ke(n,t,r){t=Rr(t,n);for(var e=-1,u=t.length,i=false;++e<u;){var o=$e(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&yu(u)&&Re(o,u)&&(af(n)||cf(n)))}function Ee(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&ci.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Oe(n){
|
}function li(n,t,r,e){return n===X||Gf(n,gl[r])&&!bl.call(e,r)?t:n}function si(n,t,r,e,u,i){return fc(n)&&fc(t)&&(i.set(t,n),Ke(n,t,X,si,i),i.delete(t)),n}function hi(n){return gc(n)?X:n}function pi(n,t,r,e,u,i){var o=r&hn,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&pn?new yr:X;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==X){if(y)continue;p=!1;break}if(_){if(!h(t,function(n,t){
|
||||||
return typeof n.constructor!="function"||Le(n)?{}:io(bi(n))}function Se(r,e,u,i){var o=r.constructor;switch(e){case"[object ArrayBuffer]":return Br(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object DataView]":return e=i?Br(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":
|
if(!S(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)})){p=!1;break}}else if(v!==g&&!u(v,g,r,e,i)){p=!1;break}}return i.delete(n),i.delete(t),p}function _i(n,t,r,e,u,i,o){switch(r){case ct:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;n=n.buffer,t=t.buffer;case ft:return!(n.byteLength!=t.byteLength||!i(new Rl(n),new Rl(t)));case Nn:case Pn:case Hn:return Gf(+n,+t);case Zn:return n.name==t.name&&n.message==t.message;case nt:case rt:return n==t+"";case Gn:var f=M;case tt:var c=e&hn;
|
||||||
case"[object Uint16Array]":case"[object Uint32Array]":return Lr(r,i);case"[object Map]":return e=i?u(L(r),1):L(r),h(e,n,new r.constructor);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return e=new r.constructor(r.source,dn.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=i?u(D(r),1):D(r),h(e,t,new r.constructor);case"[object Symbol]":return eo?ni(eo.call(r)):{}}}function Ie(n){return af(n)||cf(n)||!!(mi&&n&&n[mi])}function Re(n,t){return t=null==t?9007199254740991:t,
|
if(f||(f=P),n.size!=t.size&&!c)return!1;var a=o.get(n);if(a)return a==t;e|=pn,o.set(n,t);var l=pi(f(n),f(t),e,u,i,o);return o.delete(n),l;case et:if(_s)return _s.call(n)==_s.call(t)}return!1}function vi(n,t,r,e,u,i){var o=r&hn,f=yi(n),c=f.length;if(c!=yi(t).length&&!o)return!1;for(var a=c;a--;){var l=f[a];if(!(o?l in t:bl.call(t,l)))return!1}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=!0;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){l=f[a];var v=n[l],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);
|
||||||
!!t&&(typeof n=="number"||wn.test(n))&&-1<n&&0==n%1&&n<t}function ze(n,t,r){if(!bu(r))return false;var e=typeof t;return!!("number"==e?pu(r)&&Re(t,r.length):"string"==e&&t in r)&&hu(r[t],n)}function We(n,t){if(af(n))return false;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!Au(n))||(rn.test(n)||!tn.test(n)||null!=t&&n in ni(t))}function Be(n){var t=be(n),r=On[t];return typeof r=="function"&&t in Mn.prototype&&(n===r||(t=_o(r),!!t&&n===t[0]))}function Le(n){var t=n&&n.constructor;
|
if(!(y===X?v===g||u(v,g,r,e,i):y)){p=!1;break}_||(_="constructor"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&"constructor"in n&&"constructor"in t&&!("function"==typeof d&&d instanceof d&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(n),i.delete(t),p}function gi(n){return Ls(Vi(n,X,_o),n+"")}function yi(n){return de(n,Pc,Is)}function di(n){return de(n,qc,Rs)}function bi(n){for(var t=n.name+"",r=fs[t],e=bl.call(fs,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name;
|
||||||
return n===(typeof t=="function"&&t.prototype||ii)}function Ue(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==F||n in ni(r)))}}function Ce(n,t,e){return t=Di(t===F?n.length-1:t,0),function(){for(var u=arguments,i=-1,o=Di(u.length-t,0),f=Hu(o);++i<o;)f[i]=u[t+i];for(i=-1,o=Hu(t+1);++i<t;)o[i]=u[i];return o[t]=e(f),r(n,this,o)}}function De(n,t,r){var e=t+"";t=wo;var u,i=Ne;return u=(u=e.match(hn))?u[1].split(pn):[],r=i(u,r),(i=r.length)&&(u=i-1,r[u]=(1<i?"& ":"")+r[u],r=r.join(2<i?", ":" "),
|
}return t}function wi(n){return(bl.call(Z,"placeholder")?Z:n).placeholder}function mi(){var n=Z.iteratee||Ca;return n=n===Ca?De:n,arguments.length?n(arguments[0],arguments[1]):n}function xi(n,t){var r=n.__data__;return Ti(t)?r["string"==typeof t?"string":"hash"]:r.map}function ji(n){for(var t=Pc(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Fi(u)]}return t}function Ai(n,t){var r=B(n,t);return Ue(r)?r:X}function ki(n){var t=bl.call(n,Bl),r=n[Bl];try{n[Bl]=X;var e=!0}catch(n){}var u=xl.call(n);return e&&(t?n[Bl]=r:delete n[Bl]),
|
||||||
e=e.replace(sn,"{\n/* [wrapped with "+r+"] */\n")),t(n,e)}function Me(n){var t=0,r=0;return function(){var e=Ti(),u=16-(e-r);if(r=e,0<u){if(800<=++t)return arguments[0]}else t=0;return n.apply(F,arguments)}}function Te(n,t){var r=-1,e=n.length,u=e-1;for(t=t===F?e:t;++r<t;){var e=cr(r,u),i=n[e];n[e]=n[r],n[r]=i}return n.length=t,n}function $e(n){if(typeof n=="string"||Au(n))return n;var t=n+"";return"0"==t&&1/n==-N?"-0":t}function Fe(n){if(null!=n){try{return fi.call(n)}catch(n){}return n+""}return"";
|
u}function Oi(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Hl(t,n+o);break;case"takeRight":n=Gl(n,t-o)}}return{start:n,end:t}}function Ii(n){var t=n.match(Bt);return t?t[1].split(Tt):[]}function Ri(n,t,r){t=ku(t,n);for(var e=-1,u=t.length,i=!1;++e<u;){var o=no(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&oc(u)&&Ci(o,u)&&(bh(n)||dh(n)))}function zi(n){var t=n.length,r=new n.constructor(t);
|
||||||
}function Ne(n,t){return u(Z,function(r){var e="_."+r[0];t&r[1]&&!c(n,e)&&n.push(e)}),n.sort()}function Pe(n){if(n instanceof Mn)return n.clone();var t=new zn(n.__wrapped__,n.__chain__);return t.__actions__=Mr(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Ze(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),g(n,je(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),
|
return t&&"string"==typeof n[0]&&bl.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ei(n){return"function"!=typeof n.constructor||Mi(n)?{}:gs(El(n))}function Si(n,t,r){var e=n.constructor;switch(t){case ft:return Ru(n);case Nn:case Pn:return new e(+n);case ct:return zu(n,r);case at:case lt:case st:case ht:case pt:case _t:case vt:case gt:case yt:return Wu(n,r);case Gn:return new e;case Hn:case rt:return new e(n);case nt:return Eu(n);case tt:return new e;case et:return Su(n)}}function Wi(n,t){
|
||||||
g(n,je(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?kt(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){
|
var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Ut,"{\n/* [wrapped with "+t+"] */\n")}function Li(n){return bh(n)||dh(n)||!!(Cl&&n&&n[Cl])}function Ci(n,t){var r=typeof n;return t=null==t?Wn:t,!!t&&("number"==r||"symbol"!=r&&Vt.test(n))&&n>-1&&n%1==0&&n<t}function Ui(n,t,r){if(!fc(r))return!1;var e=typeof t;return!!("number"==e?Hf(r)&&Ci(t,r.length):"string"==e&&t in r)&&Gf(r[t],n)}function Bi(n,t){if(bh(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!bc(n))||(zt.test(n)||!Rt.test(n)||null!=t&&n in ll(t));
|
||||||
return r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,je(t,3))}function eu(n,t){return(af(n)?i:fo)(n,je(t,3))}function uu(n,t){return(af(n)?l:Yt)(n,je(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,le(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),
|
}function Ti(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}function $i(n){var t=bi(n),r=Z[t];if("function"!=typeof r||!(t in Ct.prototype))return!1;if(n===r)return!0;var e=Os(r);return!!e&&n===e[0]}function Di(n){return!!ml&&ml in n}function Mi(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||gl)}function Fi(n){return n===n&&!fc(n)}function Ni(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==X||n in ll(r)))}}function Pi(n){
|
||||||
r}}function fu(n,t,r){return t=r?F:t,n=le(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=le(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,
|
var t=Cf(n,function(n){return r.size===fn&&r.clear(),n}),r=t.cache;return t}function qi(n,t){var r=n[1],e=t[1],u=r|e,i=u<(_n|vn|mn),o=e==mn&&r==yn||e==mn&&r==xn&&n[7].length<=t[8]||e==(mn|xn)&&t[7].length<=t[8]&&r==yn;if(!i&&!o)return n;e&_n&&(n[2]=t[2],u|=r&_n?0:gn);var f=t[3];if(f){var c=n[3];n[3]=c?Uu(c,f,t[4]):f,n[4]=c?N(n[3],cn):t[4]}return f=t[5],f&&(c=n[5],n[5]=c?Bu(c,f,t[6]):f,n[6]=c?N(n[5],cn):t[6]),f=t[7],f&&(n[7]=f),e&mn&&(n[8]=null==n[8]?t[8]:Hl(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],
|
||||||
a=this,p=n,r){if(h===F)return _=n=p,h=jo(i,t),v?e(n):s;if(g)return h=jo(i,t),e(p)}return h===F&&(h=jo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ei("Expected a function");return t=Iu(t)||0,bu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Di(Iu(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&ho(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Jo())},f}function lu(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),
|
n[1]=u,n}function Zi(n){var t=[];if(null!=n)for(var r in ll(n))t.push(r);return t}function Ki(n){return xl.call(n)}function Vi(t,r,e){return r=Gl(r===X?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Gl(u.length-r,0),f=il(o);++i<o;)f[i]=u[r+i];i=-1;for(var c=il(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function Gi(n,t){return t.length<2?n:_e(n,au(t,0,-1))}function Hi(n,t){for(var r=n.length,e=Hl(t.length,r),u=Tu(n);e--;){var i=t[e];n[e]=Ci(i,r)?u[i]:X}return n}function Ji(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t];
|
||||||
r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ei("Expected a function");return r.cache=new(lu.Cache||Pn),r}function su(n){if(typeof n!="function")throw new ei("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hu(n,t){return n===t||n!==n&&t!==t}function pu(n){return null!=n&&yu(n.length)&&!gu(n);
|
}function Yi(n,t,r){var e=t+"";return Ls(n,Wi(e,ro(Ii(e),r)))}function Qi(n){var t=0,r=0;return function(){var e=Jl(),u=In-(e-r);if(r=e,u>0){if(++t>=On)return arguments[0]}else t=0;return n.apply(X,arguments)}}function Xi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===X?e:t;++r<t;){var i=tu(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function no(n){if("string"==typeof n||bc(n))return n;var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function to(n){if(null!=n){try{return dl.call(n)}catch(n){}try{return n+"";
|
||||||
}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=zt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!wu(n)}function gu(n){return!!bu(n)&&(n=zt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function du(n){return typeof n=="number"&&n==Ou(n)}function yu(n){return typeof n=="number"&&-1<n&&0==n%1&&9007199254740991>=n}function bu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t);
|
}catch(n){}}return""}function ro(n,t){return r($n,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function eo(n){if(n instanceof Ct)return n.clone();var t=new Y(n.__wrapped__,n.__chain__);return t.__actions__=Tu(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function uo(n,t,r){t=(r?Ui(n,t,r):t===X)?1:Gl(kc(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=il(Fl(e/t));u<e;)o[i++]=au(n,u,u+=t);return o}function io(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){
|
||||||
}function xu(n){return null!=n&&typeof n=="object"}function ju(n){return typeof n=="number"||xu(n)&&"[object Number]"==zt(n)}function wu(n){return!(!xu(n)||"[object Object]"!=zt(n))&&(n=bi(n),null===n||(n=ci.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n=="string"||!af(n)&&xu(n)&&"[object String]"==zt(n)}function Au(n){return typeof n=="symbol"||xu(n)&&"[object Symbol]"==zt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Mr(n);
|
var i=n[t];i&&(u[e++]=i)}return u}function oo(){var n=arguments.length;if(!n)return[];for(var t=il(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(bh(r)?Tu(r):[r],ee(t,1))}function fo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),au(n,t<0?0:t,e)):[]}function co(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,0,t<0?0:t)):[]}function ao(n,t){return n&&n.length?bu(n,mi(t,3),!0,!0):[]}function lo(n,t){return n&&n.length?bu(n,mi(t,3),!0):[]}function so(n,t,r,e){
|
||||||
if(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),("[object Map]"==t?L:"[object Set]"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?gt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n=="number")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=bu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;
|
var u=null==n?0:n.length;return u?(r&&"number"!=typeof r&&Ui(n,t,r)&&(r=0,e=u),ne(n,t,r,e)):[]}function ho(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);return u<0&&(u=Gl(e+u,0)),g(n,mi(t,3),u)}function po(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==X&&(u=kc(r),u=r<0?Gl(e+u,0):Hl(u,e-1)),g(n,mi(t,3),u,!0)}function _o(n){return(null==n?0:n.length)?ee(n,1):[]}function vo(n){return(null==n?0:n.length)?ee(n,Sn):[]}function go(n,t){return(null==n?0:n.length)?(t=t===X?1:kc(t),
|
||||||
n=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return Tr(n,Uu(n))}function zu(n){return null==n?"":jr(n)}function Wu(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Bu(n,t){return null!=n&&ke(n,t,Lt)}function Lu(n){return pu(n)?Gn(n):Ht(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=Le(n),e=[];for(t in n)("constructor"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){
|
ee(n,t)):[]}function yo(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e}function bo(n){return n&&n.length?n[0]:X}function wo(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);return u<0&&(u=Gl(e+u,0)),y(n,t,u)}function mo(n){return(null==n?0:n.length)?au(n,0,-1):[]}function xo(n,t){return null==n?"":Kl.call(n,t)}function jo(n){var t=null==n?0:n.length;return t?n[t-1]:X}function Ao(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==X&&(u=kc(r),
|
||||||
if(null==n)return{};var r=l(ye(n),function(n){return[n]});return t=je(t),ur(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,"")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Gt(typeof n=="function"?n:dt(n,1))}function Zu(n,t,r){
|
u=u<0?Gl(e+u,0):Hl(u,e-1)),t===t?K(n,t,u):g(n,b,u,!0)}function ko(n,t){return n&&n.length?Ge(n,kc(t)):X}function Oo(n,t){return n&&n.length&&t&&t.length?Xe(n,t):n}function Io(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,mi(r,2)):n}function Ro(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,X,r):n}function zo(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=mi(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return nu(n,u),r}function Eo(n){return null==n?n:Xl.call(n)}function So(n,t,r){
|
||||||
var e=Lu(t),i=St(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Lu(t)));var o=!(bu(r)&&"chain"in r&&!r.chain),f=gu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Mr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return We(n)?j($e(n)):ir(n)}function Ku(){return[]}function Gu(){
|
var e=null==n?0:n.length;return e?(r&&"number"!=typeof r&&Ui(n,t,r)?(t=0,r=e):(t=null==t?0:kc(t),r=r===X?e:kc(r)),au(n,t,r)):[]}function Wo(n,t){return su(n,t)}function Lo(n,t,r){return hu(n,t,mi(r,2))}function Co(n,t){var r=null==n?0:n.length;if(r){var e=su(n,t);if(e<r&&Gf(n[e],t))return e}return-1}function Uo(n,t){return su(n,t,!0)}function Bo(n,t,r){return hu(n,t,mi(r,2),!0)}function To(n,t){if(null==n?0:n.length){var r=su(n,t,!0)-1;if(Gf(n[r],t))return r}return-1}function $o(n){return n&&n.length?pu(n):[];
|
||||||
return false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Hu=En.Array,Ju=En.Date,Yu=En.Error,Qu=En.Function,Xu=En.Math,ni=En.Object,ti=En.RegExp,ri=En.String,ei=En.TypeError,ui=Hu.prototype,ii=ni.prototype,oi=En["__core-js_shared__"],fi=Qu.prototype.toString,ci=ii.hasOwnProperty,ai=0,li=function(){var n=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),si=ii.toString,hi=fi.call(ni),pi=Zn._,_i=ti("^"+fi.call(ci).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=Kn?En.Buffer:F,gi=En.Symbol,di=En.Uint8Array,yi=vi?vi.f:F,bi=U(ni.getPrototypeOf,ni),xi=ni.create,ji=ii.propertyIsEnumerable,wi=ui.splice,mi=gi?gi.isConcatSpreadable:F,Ai=gi?gi.iterator:F,ki=gi?gi.toStringTag:F,Ei=function(){
|
}function Do(n,t){return n&&n.length?pu(n,mi(t,2)):[]}function Mo(n){var t=null==n?0:n.length;return t?au(n,1,t):[]}function Fo(n,t,r){return n&&n.length?(t=r||t===X?1:kc(t),au(n,0,t<0?0:t)):[]}function No(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,t<0?0:t,e)):[]}function Po(n,t){return n&&n.length?bu(n,mi(t,3),!1,!0):[]}function qo(n,t){return n&&n.length?bu(n,mi(t,3)):[]}function Zo(n){return n&&n.length?gu(n):[]}function Ko(n,t){return n&&n.length?gu(n,mi(t,2)):[]}
|
||||||
try{var n=Ae(ni,"defineProperty");return n({},"",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=Ae(En,"DataView"),Zi=Ae(En,"Map"),qi=Ae(En,"Promise"),Vi=Ae(En,"Set"),Ki=Ae(En,"WeakMap"),Gi=Ae(ni,"create"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){
|
function Vo(n,t){return t="function"==typeof t?t:X,n&&n.length?gu(n,X,t):[]}function Go(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){if(Jf(n))return t=Gl(n.length,t),!0}),O(t,function(t){return c(n,m(t))})}function Ho(t,r){if(!t||!t.length)return[];var e=Go(t);return null==r?e:c(e,function(t){return n(r,X,t)})}function Jo(n,t){return xu(n||[],t||[],Sr)}function Yo(n,t){return xu(n||[],t||[],fu)}function Qo(n){var t=Z(n);return t.__chain__=!0,t}function Xo(n,t){return t(n),n}function nf(n,t){
|
||||||
function n(){}return function(t){return bu(t)?xi?xi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=io(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=io(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Gi?Gi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],
|
return t(n)}function tf(){return Qo(this)}function rf(){return new Y(this.value(),this.__chain__)}function ef(){this.__values__===X&&(this.__values__=jc(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?X:this.__values__[this.__index__++]}}function uf(){return this}function of(n){for(var t,r=this;r instanceof J;){var e=eo(r);e.__index__=0,e.__values__=X,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function ff(){var n=this.__wrapped__;if(n instanceof Ct){
|
||||||
this.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],"__lodash_hash_undefined__"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=lt(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),
|
var t=n;return this.__actions__.length&&(t=new Ct(this)),t=t.reverse(),t.__actions__.push({func:nf,args:[Eo],thisArg:X}),new Y(t,this.__chain__)}return this.thru(Eo)}function cf(){return wu(this.__wrapped__,this.__actions__)}function af(n,t,r){var e=bh(n)?u:Jr;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function lf(n,t){return(bh(n)?i:te)(n,mi(t,3))}function sf(n,t){return ee(yf(n,t),1)}function hf(n,t){return ee(yf(n,t),Sn)}function pf(n,t,r){return r=r===X?1:kc(r),ee(yf(n,t),r)}function _f(n,t){return(bh(n)?r:ys)(n,mi(t,3));
|
||||||
--this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=lt(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1<lt(this.__data__,n)},Nn.prototype.set=function(n,t){var r=this.__data__,e=lt(r,n);return 0>e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=we(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return we(this,n).get(n);
|
}function vf(n,t){return(bh(n)?e:ds)(n,mi(t,3))}function gf(n,t,r,e){n=Hf(n)?n:ra(n),r=r&&!e?kc(r):0;var u=n.length;return r<0&&(r=Gl(u+r,0)),dc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function yf(n,t){return(bh(n)?c:Pe)(n,mi(t,3))}function df(n,t,r,e){return null==n?[]:(bh(t)||(t=null==t?[]:[t]),r=e?X:r,bh(r)||(r=null==r?[]:[r]),He(n,t,r))}function bf(n,t,r){var e=bh(n)?l:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ys)}function wf(n,t,r){var e=bh(n)?s:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ds);
|
||||||
},Pn.prototype.has=function(n){return we(this,n).has(n)},Pn.prototype.set=function(n,t){var r=we(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){
|
}function mf(n,t){return(bh(n)?i:te)(n,Uf(mi(t,3)))}function xf(n){return(bh(n)?Ir:iu)(n)}function jf(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),(bh(n)?Rr:ou)(n,t)}function Af(n){return(bh(n)?zr:cu)(n)}function kf(n){if(null==n)return 0;if(Hf(n))return dc(n)?V(n):n.length;var t=zs(n);return t==Gn||t==tt?n.size:Me(n).length}function Of(n,t,r){var e=bh(n)?h:lu;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function If(n,t){if("function"!=typeof t)throw new pl(en);return n=kc(n),function(){if(--n<1)return t.apply(this,arguments);
|
||||||
return this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=Zr(Et),fo=Zr(Ot,true),co=qr(),ao=qr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,"toString",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){
|
}}function Rf(n,t,r){return t=r?X:t,t=n&&null==t?n.length:t,ai(n,mn,X,X,X,X,t)}function zf(n,t){var r;if("function"!=typeof t)throw new pl(en);return n=kc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=X),r}}function Ef(n,t,r){t=r?X:t;var e=ai(n,yn,X,X,X,X,X,t);return e.placeholder=Ef.placeholder,e}function Sf(n,t,r){t=r?X:t;var e=ai(n,dn,X,X,X,X,X,t);return e.placeholder=Sf.placeholder,e}function Wf(n,t,r){function e(t){var r=h,e=p;return h=p=X,d=t,v=n.apply(e,r)}function u(n){return d=n,
|
||||||
return Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?function(n){return null==n?[]:(n=ni(n),f(Wi(n),function(t){return ji.call(n,t)}))}:Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=zt;(Pi&&"[object DataView]"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&"[object Map]"!=yo(new Zi)||qi&&"[object Promise]"!=yo(qi.resolve())||Vi&&"[object Set]"!=yo(new Vi)||Ki&&"[object WeakMap]"!=yo(new Ki))&&(yo=function(n){
|
g=Ws(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Hl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===X||r>=t||r<0||w&&e>=_}function f(){var n=fh();return o(n)?c(n):(g=Ws(f,i(n)),X)}function c(n){return g=X,m&&h?e(n):(h=p=X,v)}function a(){g!==X&&As(g),d=0,h=y=p=g=X}function l(){return g===X?v:c(fh())}function s(){var n=fh(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===X)return u(y);if(w)return As(g),g=Ws(f,t),e(y)}return g===X&&(g=Ws(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new pl(en);
|
||||||
var t=zt(n);if(n=(n="[object Object]"==t?n.constructor:F)?Fe(n):"")switch(n){case Yi:return"[object DataView]";case Qi:return"[object Map]";case Xi:return"[object Promise]";case no:return"[object Set]";case to:return"[object WeakMap]"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){
|
return t=Ic(t)||0,fc(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Gl(Ic(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m),s.cancel=a,s.flush=l,s}function Lf(n){return ai(n,jn)}function Cf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new pl(en);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Cf.Cache||sr),r}function Uf(n){if("function"!=typeof n)throw new pl(en);
|
||||||
t.push(e?u.replace(vn,"$1"):r||n)}),t}),Ao=lr(function(n,t){return _u(n)?jt(n,kt(t,1,_u,true)):[]}),ko=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),je(r,2)):[]}),Eo=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),F,r):[]}),Oo=lr(function(n){var t=l(n,Sr);return t.length&&t[0]===n[0]?Ut(t):[]}),So=lr(function(n){var t=Ge(n),r=l(n,Sr);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,je(t,2)):[]}),Io=lr(function(n){var t=Ge(n),r=l(n,Sr);return(t=typeof t=="function"?t:F)&&r.pop(),
|
return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Bf(n){return zf(2,n)}function Tf(n,t){if("function"!=typeof n)throw new pl(en);return t=t===X?t:kc(t),uu(n,t)}function $f(t,r){if("function"!=typeof t)throw new pl(en);return r=null==r?0:Gl(kc(r),0),uu(function(e){var u=e[r],i=Ou(e,0,r);return u&&a(i,u),n(t,this,i)})}function Df(n,t,r){
|
||||||
r.length&&r[0]===n[0]?Ut(r,F,t):[]}),Ro=lr(He),zo=ge(function(n,t){var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Re(n,r)?+n:n}).sort(Ur)),e}),Wo=lr(function(n){return wr(kt(n,1,_u,true))}),Bo=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),wr(kt(n,1,_u,true),je(t,2))}),Lo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return wr(kt(n,1,_u,true),F,t)}),Uo=lr(function(n,t){return _u(n)?jt(n,t):[]}),Co=lr(function(n){return Er(f(n,_u))}),Do=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),
|
var e=!0,u=!0;if("function"!=typeof n)throw new pl(en);return fc(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Wf(n,t,{leading:e,maxWait:t,trailing:u})}function Mf(n){return Rf(n,1)}function Ff(n,t){return ph(Au(t),n)}function Nf(){if(!arguments.length)return[];var n=arguments[0];return bh(n)?n:[n]}function Pf(n){return Fr(n,sn)}function qf(n,t){return t="function"==typeof t?t:X,Fr(n,sn,t)}function Zf(n){return Fr(n,an|sn)}function Kf(n,t){return t="function"==typeof t?t:X,Fr(n,an|sn,t);
|
||||||
Er(f(n,_u),je(t,2))}),Mo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return Er(f(n,_u),F,t)}),To=lr(Ye),$o=lr(function(n){var t=n.length,t=1<t?n[t-1]:F,t=typeof t=="function"?(n.pop(),t):F;return Qe(n,t)}),Fo=ge(function(n){function t(t){return vt(t,n)}var r=n.length,e=r?n[0]:0,u=this.__wrapped__;return!(1<r||this.__actions__.length)&&u instanceof Mn&&Re(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(u,this.__chain__).thru(function(n){return r&&!n.length&&n.push(F),
|
}function Vf(n,t){return null==t||Pr(n,t,Pc(t))}function Gf(n,t){return n===t||n!==n&&t!==t}function Hf(n){return null!=n&&oc(n.length)&&!uc(n)}function Jf(n){return cc(n)&&Hf(n)}function Yf(n){return n===!0||n===!1||cc(n)&&we(n)==Nn}function Qf(n){return cc(n)&&1===n.nodeType&&!gc(n)}function Xf(n){if(null==n)return!0;if(Hf(n)&&(bh(n)||"string"==typeof n||"function"==typeof n.splice||mh(n)||Oh(n)||dh(n)))return!n.length;var t=zs(n);if(t==Gn||t==tt)return!n.size;if(Mi(n))return!Me(n).length;for(var r in n)if(bl.call(n,r))return!1;
|
||||||
n})):this.thru(t)}),No=Nr(function(n,t,r){ci.call(n,r)?++n[r]:_t(n,r,1)}),Po=Yr(Ze),Zo=Yr(qe),qo=Nr(function(n,t,r){ci.call(n,r)?n[r].push(t):_t(n,r,[t])}),Vo=lr(function(n,t,e){var u=-1,i=typeof t=="function",o=pu(n)?Hu(n.length):[];return oo(n,function(n){o[++u]=i?r(t,n,e):Dt(n,t,e)}),o}),Ko=Nr(function(n,t,r){_t(n,r,t)}),Go=Nr(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),Ho=lr(function(n,t){if(null==n)return[];var r=t.length;return 1<r&&ze(n,t[0],t[1])?t=[]:2<r&&ze(t[0],t[1],t[2])&&(t=[t[0]]),
|
return!0}function nc(n,t){return Se(n,t)}function tc(n,t,r){r="function"==typeof r?r:X;var e=r?r(n,t):X;return e===X?Se(n,t,X,r):!!e}function rc(n){if(!cc(n))return!1;var t=we(n);return t==Zn||t==qn||"string"==typeof n.message&&"string"==typeof n.name&&!gc(n)}function ec(n){return"number"==typeof n&&Zl(n)}function uc(n){if(!fc(n))return!1;var t=we(n);return t==Kn||t==Vn||t==Fn||t==Xn}function ic(n){return"number"==typeof n&&n==kc(n)}function oc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=Wn}function fc(n){
|
||||||
rr(n,kt(t,1),[])}),Jo=Si||function(){return Zn.Date.now()},Yo=lr(function(n,t,r){var e=1;if(r.length)var u=C(r,xe(Yo)),e=32|e;return le(n,e,t,r,u)}),Qo=lr(function(n,t,r){var e=3;if(r.length)var u=C(r,xe(Qo)),e=32|e;return le(t,e,n,r,u)}),Xo=lr(function(n,t){return xt(n,1,t)}),nf=lr(function(n,t,r){return xt(n,Iu(t)||0,r)});lu.Cache=Pn;var tf=lr(function(n,t){t=1==t.length&&af(t[0])?l(t[0],S(je())):l(kt(t,1),S(je()));var e=t.length;return lr(function(u){for(var i=-1,o=Mi(u.length,e);++i<o;)u[i]=t[i].call(this,u[i]);
|
var t=typeof n;return null!=n&&("object"==t||"function"==t)}function cc(n){return null!=n&&"object"==typeof n}function ac(n,t){return n===t||Ce(n,t,ji(t))}function lc(n,t,r){return r="function"==typeof r?r:X,Ce(n,t,ji(t),r)}function sc(n){return vc(n)&&n!=+n}function hc(n){if(Es(n))throw new fl(rn);return Ue(n)}function pc(n){return null===n}function _c(n){return null==n}function vc(n){return"number"==typeof n||cc(n)&&we(n)==Hn}function gc(n){if(!cc(n)||we(n)!=Yn)return!1;var t=El(n);if(null===t)return!0;
|
||||||
return r(n,this,u)})}),rf=lr(function(n,t){return le(n,32,F,t,C(t,xe(rf)))}),ef=lr(function(n,t){return le(n,64,F,t,C(t,xe(ef)))}),uf=ge(function(n,t){return le(n,256,F,F,F,t)}),of=oe(Wt),ff=oe(function(n,t){return n>=t}),cf=Mt(function(){return arguments}())?Mt:function(n){return xu(n)&&ci.call(n,"callee")&&!ji.call(n,"callee")},af=Hu.isArray,lf=Hn?S(Hn):Tt,sf=Bi||Gu,hf=Jn?S(Jn):$t,pf=Yn?S(Yn):Nt,_f=Qn?S(Qn):qt,vf=Xn?S(Xn):Vt,gf=nt?S(nt):Kt,df=oe(Jt),yf=oe(function(n,t){return n<=t}),bf=Pr(function(n,t){
|
var r=bl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dl.call(r)==jl}function yc(n){return ic(n)&&n>=-Wn&&n<=Wn}function dc(n){return"string"==typeof n||!bh(n)&&cc(n)&&we(n)==rt}function bc(n){return"symbol"==typeof n||cc(n)&&we(n)==et}function wc(n){return n===X}function mc(n){return cc(n)&&zs(n)==it}function xc(n){return cc(n)&&we(n)==ot}function jc(n){if(!n)return[];if(Hf(n))return dc(n)?G(n):Tu(n);if(Ul&&n[Ul])return D(n[Ul]());var t=zs(n);return(t==Gn?M:t==tt?P:ra)(n);
|
||||||
if(Le(t)||pu(t))Tr(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&at(n,r,t[r])}),xf=Pr(function(n,t){Tr(t,Uu(t),n)}),jf=Pr(function(n,t,r,e){Tr(t,Uu(t),n,e)}),wf=Pr(function(n,t,r,e){Tr(t,Lu(t),n,e)}),mf=ge(vt),Af=lr(function(n){return n.push(F,se),r(jf,F,n)}),kf=lr(function(n){return n.push(F,he),r(Rf,F,n)}),Ef=ne(function(n,t,r){n[t]=r},Fu(Nu)),Of=ne(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},je),Sf=lr(Dt),If=Pr(function(n,t,r){nr(n,t,r)}),Rf=Pr(function(n,t,r,e){nr(n,t,r,e)}),zf=ge(function(n,t){
|
}function Ac(n){if(!n)return 0===n?n:0;if(n=Ic(n),n===Sn||n===-Sn){return(n<0?-1:1)*Ln}return n===n?n:0}function kc(n){var t=Ac(n),r=t%1;return t===t?r?t-r:t:0}function Oc(n){return n?Mr(kc(n),0,Un):0}function Ic(n){if("number"==typeof n)return n;if(bc(n))return Cn;if(fc(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=fc(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=R(n);var r=qt.test(n);return r||Kt.test(n)?Xr(n.slice(2),r?2:8):Pt.test(n)?Cn:+n}function Rc(n){return $u(n,qc(n))}function zc(n){
|
||||||
var r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=Rr(t,n),e||(e=1<t.length),t}),Tr(n,ye(n),r),e&&(r=dt(r,7,pe));for(var u=t.length;u--;)mr(r,t[u]);return r}),Wf=ge(function(n,t){return null==n?{}:er(n,t)}),Bf=ae(Lu),Lf=ae(Uu),Uf=Gr(function(n,t,r){return t=t.toLowerCase(),n+(r?Mu(t):t)}),Cf=Gr(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Df=Gr(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Mf=Kr("toLowerCase"),Tf=Gr(function(n,t,r){return n+(r?"_":"")+t.toLowerCase();
|
return n?Mr(kc(n),-Wn,Wn):0===n?n:0}function Ec(n){return null==n?"":vu(n)}function Sc(n,t){var r=gs(n);return null==t?r:Cr(r,t)}function Wc(n,t){return v(n,mi(t,3),ue)}function Lc(n,t){return v(n,mi(t,3),oe)}function Cc(n,t){return null==n?n:bs(n,mi(t,3),qc)}function Uc(n,t){return null==n?n:ws(n,mi(t,3),qc)}function Bc(n,t){return n&&ue(n,mi(t,3))}function Tc(n,t){return n&&oe(n,mi(t,3))}function $c(n){return null==n?[]:fe(n,Pc(n))}function Dc(n){return null==n?[]:fe(n,qc(n))}function Mc(n,t,r){
|
||||||
}),$f=Gr(function(n,t,r){return n+(r?" ":"")+Nf(t)}),Ff=Gr(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Nf=Kr("toUpperCase"),Pf=lr(function(n,t){try{return r(n,F,t)}catch(n){return vu(n)?n:new Yu(n)}}),Zf=ge(function(n,t){return u(t,function(t){t=$e(t),_t(n,t,Yo(n[t],n))}),n}),qf=Qr(),Vf=Qr(true),Kf=lr(function(n,t){return function(r){return Dt(r,n,t)}}),Gf=lr(function(n,t){return function(r){return Dt(n,r,t)}}),Hf=re(l),Jf=re(o),Yf=re(_),Qf=ie(),Xf=ie(true),nc=te(function(n,t){return n+t},0),tc=ce("ceil"),rc=te(function(n,t){
|
var e=null==n?X:_e(n,t);return e===X?r:e}function Fc(n,t){return null!=n&&Ri(n,t,xe)}function Nc(n,t){return null!=n&&Ri(n,t,je)}function Pc(n){return Hf(n)?Or(n):Me(n)}function qc(n){return Hf(n)?Or(n,!0):Fe(n)}function Zc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,t(n,e,u),n)}),r}function Kc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,e,t(n,e,u))}),r}function Vc(n,t){return Gc(n,Uf(mi(t)))}function Gc(n,t){if(null==n)return{};var r=c(di(n),function(n){return[n]});return t=mi(t),
|
||||||
return n/t},1),ec=ce("floor"),uc=te(function(n,t){return n*t},1),ic=ce("round"),oc=te(function(n,t){return n-t},0);return On.after=function(n,t){if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){if(1>--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},
|
Ye(n,r,function(n,r){return t(n,r[0])})}function Hc(n,t,r){t=ku(t,n);var e=-1,u=t.length;for(u||(u=1,n=X);++e<u;){var i=null==n?X:n[no(t[e])];i===X&&(e=u,i=r),n=uc(i)?i.call(n):i}return n}function Jc(n,t,r){return null==n?n:fu(n,t,r)}function Yc(n,t,r,e){return e="function"==typeof e?e:X,null==n?n:fu(n,t,r,e)}function Qc(n,t,e){var u=bh(n),i=u||mh(n)||Oh(n);if(t=mi(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:fc(n)&&uc(o)?gs(El(n)):{}}return(i?r:ue)(n,function(n,r,u){return t(e,n,r,u)}),e}
|
||||||
On.chain=Xe,On.chunk=function(n,t,r){if(t=(r?ze(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Hu(Ri(r/t));e<r;)i[u++]=vr(n,e,e+=t);return i},On.compact=function(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u},On.concat=function(){var n=arguments.length;if(!n)return[];for(var t=Hu(n-1),r=arguments[0];n--;)t[n-1]=arguments[n];return s(af(r)?Mr(r):[r],kt(t,1))},On.cond=function(n){var t=null==n?0:n.length,e=je();return n=t?l(n,function(n){
|
function Xc(n,t){return null==n||yu(n,t)}function na(n,t,r){return null==n?n:du(n,t,Au(r))}function ta(n,t,r,e){return e="function"==typeof e?e:X,null==n?n:du(n,t,Au(r),e)}function ra(n){return null==n?[]:E(n,Pc(n))}function ea(n){return null==n?[]:E(n,qc(n))}function ua(n,t,r){return r===X&&(r=t,t=X),r!==X&&(r=Ic(r),r=r===r?r:0),t!==X&&(t=Ic(t),t=t===t?t:0),Mr(Ic(n),t,r)}function ia(n,t,r){return t=Ac(t),r===X?(r=t,t=0):r=Ac(r),n=Ic(n),Ae(n,t,r)}function oa(n,t,r){if(r&&"boolean"!=typeof r&&Ui(n,t,r)&&(t=r=X),
|
||||||
if("function"!=typeof n[1])throw new ei("Expected a function");return[e(n[0]),n[1]]}):[],lr(function(e){for(var u=-1;++u<t;){var i=n[u];if(r(i[0],this,e))return r(i[1],this,e)}})},On.conforms=function(n){return yt(dt(n,1))},On.constant=Fu,On.countBy=No,On.create=function(n,t){var r=io(n);return null==t?r:ht(r,t)},On.curry=fu,On.curryRight=cu,On.debounce=au,On.defaults=Af,On.defaultsDeep=kf,On.defer=Xo,On.delay=nf,On.difference=Ao,On.differenceBy=ko,On.differenceWith=Eo,On.drop=function(n,t,r){var e=null==n?0:n.length;
|
r===X&&("boolean"==typeof t?(r=t,t=X):"boolean"==typeof n&&(r=n,n=X)),n===X&&t===X?(n=0,t=1):(n=Ac(n),t===X?(t=n,n=0):t=Ac(t)),n>t){var e=n;n=t,t=e}if(r||n%1||t%1){var u=Ql();return Hl(n+u*(t-n+Qr("1e-"+((u+"").length-1))),t)}return tu(n,t)}function fa(n){return Qh(Ec(n).toLowerCase())}function ca(n){return n=Ec(n),n&&n.replace(Gt,ve).replace(Dr,"")}function aa(n,t,r){n=Ec(n),t=vu(t);var e=n.length;r=r===X?e:Mr(kc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function la(n){return n=Ec(n),
|
||||||
return e?(t=r||t===F?1:Ou(t),vr(n,0>t?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&ze(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r<e;)n[r++]=t;
|
n&&At.test(n)?n.replace(xt,ge):n}function sa(n){return n=Ec(n),n&&Wt.test(n)?n.replace(St,"\\$&"):n}function ha(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ri(Nl(u),r)+n+ri(Fl(u),r)}function pa(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?n+ri(t-e,r):n}function _a(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?ri(t-e,r)+n:n}function va(n,t,r){return r||null==t?t=0:t&&(t=+t),Yl(Ec(n).replace(Lt,""),t||0)}function ga(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),
|
||||||
return n},On.filter=function(n,t){return(af(n)?f:At)(n,je(t,3))},On.flatMap=function(n,t){return kt(uu(n,t),1)},On.flatMapDeep=function(n,t){return kt(uu(n,t),N)},On.flatMapDepth=function(n,t,r){return r=r===F?1:Ou(r),kt(uu(n,t),r)},On.flatten=Ve,On.flattenDeep=function(n){return(null==n?0:n.length)?kt(n,N):[]},On.flattenDepth=function(n,t){return null!=n&&n.length?(t=t===F?1:Ou(t),kt(n,t)):[]},On.flip=function(n){return le(n,512)},On.flow=qf,On.flowRight=Vf,On.fromPairs=function(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){
|
eu(Ec(n),t)}function ya(){var n=arguments,t=Ec(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function da(n,t,r){return r&&"number"!=typeof r&&Ui(n,t,r)&&(t=r=X),(r=r===X?Un:r>>>0)?(n=Ec(n),n&&("string"==typeof t||null!=t&&!Ah(t))&&(t=vu(t),!t&&T(n))?Ou(G(n),0,r):n.split(t,r)):[]}function ba(n,t,r){return n=Ec(n),r=null==r?0:Mr(kc(r),0,n.length),t=vu(t),n.slice(r,r+t.length)==t}function wa(n,t,r){var e=Z.templateSettings;r&&Ui(n,t,r)&&(t=X),n=Ec(n),t=Sh({},t,e,li);var u,i,o=Sh({},t.imports,e.imports,li),f=Pc(o),c=E(o,f),a=0,l=t.interpolate||Ht,s="__p += '",h=sl((t.escape||Ht).source+"|"+l.source+"|"+(l===It?Ft:Ht).source+"|"+(t.evaluate||Ht).source+"|$","g"),p="//# sourceURL="+(bl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zr+"]")+"\n";
|
||||||
var u=n[t];e[u[0]]=u[1]}return e},On.functions=function(n){return null==n?[]:St(n,Lu(n))},On.functionsIn=function(n){return null==n?[]:St(n,Uu(n))},On.groupBy=qo,On.initial=function(n){return(null==n?0:n.length)?vr(n,0,-1):[]},On.intersection=Oo,On.intersectionBy=So,On.intersectionWith=Io,On.invert=Ef,On.invertBy=Of,On.invokeMap=Vo,On.iteratee=Pu,On.keyBy=Ko,On.keys=Lu,On.keysIn=Uu,On.map=uu,On.mapKeys=function(n,t){var r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,t(n,e,u),n)}),r},On.mapValues=function(n,t){
|
n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Jt,U),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=bl.call(t,"variable")&&t.variable;if(_){if(Dt.test(_))throw new fl(un)}else s="with (obj) {\n"+s+"\n}\n";s=(i?s.replace(dt,""):s).replace(bt,"$1").replace(wt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}";
|
||||||
var r={};return t=je(t,3),Et(n,function(n,e,u){_t(r,e,t(n,e,u))}),r},On.matches=function(n){return Qt(dt(n,1))},On.matchesProperty=function(n,t){return Xt(n,dt(t,1))},On.memoize=lu,On.merge=If,On.mergeWith=Rf,On.method=Kf,On.methodOf=Gf,On.mixin=Zu,On.negate=su,On.nthArg=function(n){return n=Ou(n),lr(function(t){return tr(t,n)})},On.omit=zf,On.omitBy=function(n,t){return Cu(n,su(je(t)))},On.once=function(n){return ou(2,n)},On.orderBy=function(n,t,r,e){return null==n?[]:(af(t)||(t=null==t?[]:[t]),
|
var v=Xh(function(){return cl(f,p+"return "+s).apply(X,c)});if(v.source=s,rc(v))throw v;return v}function ma(n){return Ec(n).toLowerCase()}function xa(n){return Ec(n).toUpperCase()}function ja(n,t,r){if(n=Ec(n),n&&(r||t===X))return R(n);if(!n||!(t=vu(t)))return n;var e=G(n),u=G(t);return Ou(e,W(e,u),L(e,u)+1).join("")}function Aa(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.slice(0,H(n)+1);if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,0,L(e,G(t))+1).join("")}function ka(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.replace(Lt,"");
|
||||||
r=e?F:r,af(r)||(r=null==r?[]:[r]),rr(n,t,r))},On.over=Hf,On.overArgs=tf,On.overEvery=Jf,On.overSome=Yf,On.partial=rf,On.partialRight=ef,On.partition=Go,On.pick=Wf,On.pickBy=Cu,On.property=Vu,On.propertyOf=function(n){return function(t){return null==n?F:It(n,t)}},On.pull=Ro,On.pullAll=He,On.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,je(r,2)):n},On.pullAllWith=function(n,t,r){return n&&n.length&&t&&t.length?or(n,t,F,r):n},On.pullAt=zo,On.range=Qf,On.rangeRight=Xf,On.rearg=uf,On.reject=function(n,t){
|
if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,W(e,G(t))).join("")}function Oa(n,t){var r=An,e=kn;if(fc(t)){var u="separator"in t?t.separator:u;r="length"in t?kc(t.length):r,e="omission"in t?vu(t.omission):e}n=Ec(n);var i=n.length;if(T(n)){var o=G(n);i=o.length}if(r>=i)return n;var f=r-V(e);if(f<1)return e;var c=o?Ou(o,0,f).join(""):n.slice(0,f);if(u===X)return c+e;if(o&&(f+=c.length-f),Ah(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=sl(u.source,Ec(Nt.exec(u))+"g")),u.lastIndex=0;a=u.exec(l);)var s=a.index;
|
||||||
return(af(n)?f:At)(n,su(je(t,3)))},On.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=je(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return fr(n,u),r},On.rest=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=t===F?t:Ou(t),lr(n,t)},On.reverse=Je,On.sampleSize=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),(af(n)?ot:hr)(n,t)},On.set=function(n,t,r){return null==n?n:pr(n,t,r)},On.setWith=function(n,t,r,e){return e=typeof e=="function"?e:F,
|
c=c.slice(0,s===X?f:s)}}else if(n.indexOf(vu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function Ia(n){return n=Ec(n),n&&jt.test(n)?n.replace(mt,ye):n}function Ra(n,t,r){return n=Ec(n),t=r?X:t,t===X?$(n)?Q(n):_(n):n.match(t)||[]}function za(t){var r=null==t?0:t.length,e=mi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new pl(en);return[e(n[0]),n[1]]}):[],uu(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}})}function Ea(n){
|
||||||
null==n?n:pr(n,t,r,e)},On.shuffle=function(n){return(af(n)?ft:_r)(n)},On.slice=function(n,t,r){var e=null==n?0:n.length;return e?(r&&typeof r!="number"&&ze(n,t,r)?(t=0,r=e):(t=null==t?0:Ou(t),r=r===F?e:Ou(r)),vr(n,t,r)):[]},On.sortBy=Ho,On.sortedUniq=function(n){return n&&n.length?br(n):[]},On.sortedUniqBy=function(n,t){return n&&n.length?br(n,je(t,2)):[]},On.split=function(n,t,r){return r&&typeof r!="number"&&ze(n,t,r)&&(t=r=F),r=r===F?4294967295:r>>>0,r?(n=zu(n))&&(typeof t=="string"||null!=t&&!_f(t))&&(t=jr(t),
|
return Nr(Fr(n,an))}function Sa(n){return function(){return n}}function Wa(n,t){return null==n||n!==n?t:n}function La(n){return n}function Ca(n){return De("function"==typeof n?n:Fr(n,an))}function Ua(n){return qe(Fr(n,an))}function Ba(n,t){return Ze(n,Fr(t,an))}function Ta(n,t,e){var u=Pc(t),i=fe(t,u);null!=e||fc(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=fe(t,Pc(t)));var o=!(fc(e)&&"chain"in e&&!e.chain),f=uc(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;
|
||||||
!t&&Bn.test(n))?zr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=null==t?0:Di(Ou(t),0),lr(function(e){var u=e[t];return e=zr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){
|
if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Tu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function $a(){return re._===this&&(re._=Al),this}function Da(){}function Ma(n){return n=kc(n),uu(function(t){return Ge(t,n)})}function Fa(n){return Bi(n)?m(no(n)):Qe(n)}function Na(n){return function(t){return null==n?X:_e(n,t)}}function Pa(){return[]}function qa(){return!1}function Za(){return{}}function Ka(){return"";
|
||||||
return n&&n.length?Ar(n,je(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?Ar(n,je(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ei("Expected a function");return bu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Mr(mo(zu(n)))},On.toPlainObject=Ru,
|
}function Va(){return!0}function Ga(n,t){if(n=kc(n),n<1||n>Wn)return[];var r=Un,e=Hl(n,Un);t=mi(t),n-=Un;for(var u=O(e,t);++r<n;)t(r);return u}function Ha(n){return bh(n)?c(n,no):bc(n)?[n]:Tu(Cs(Ec(n)))}function Ja(n){var t=++wl;return Ec(n)+t}function Ya(n){return n&&n.length?Yr(n,La,me):X}function Qa(n,t){return n&&n.length?Yr(n,mi(t,2),me):X}function Xa(n){return w(n,La)}function nl(n,t){return w(n,mi(t,2))}function tl(n){return n&&n.length?Yr(n,La,Ne):X}function rl(n,t){return n&&n.length?Yr(n,mi(t,2),Ne):X;
|
||||||
On.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=je(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,je(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){return null==n||mr(n,t);
|
}function el(n){return n&&n.length?k(n,La):0}function ul(n,t){return n&&n.length?k(n,mi(t,2)):0}x=null==x?re:be.defaults(re.Object(),x,be.pick(re,qr));var il=x.Array,ol=x.Date,fl=x.Error,cl=x.Function,al=x.Math,ll=x.Object,sl=x.RegExp,hl=x.String,pl=x.TypeError,_l=il.prototype,vl=cl.prototype,gl=ll.prototype,yl=x["__core-js_shared__"],dl=vl.toString,bl=gl.hasOwnProperty,wl=0,ml=function(){var n=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),xl=gl.toString,jl=dl.call(ll),Al=re._,kl=sl("^"+dl.call(bl).replace(St,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ol=ie?x.Buffer:X,Il=x.Symbol,Rl=x.Uint8Array,zl=Ol?Ol.allocUnsafe:X,El=F(ll.getPrototypeOf,ll),Sl=ll.create,Wl=gl.propertyIsEnumerable,Ll=_l.splice,Cl=Il?Il.isConcatSpreadable:X,Ul=Il?Il.iterator:X,Bl=Il?Il.toStringTag:X,Tl=function(){
|
||||||
},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:pr(n,t,Ir(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=pr(n,t,Ir(r)(It(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Ir(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Or(n||[],t||[],at)},On.zipObjectDeep=function(n,t){return Or(n||[],t||[],pr);
|
try{var n=Ai(ll,"defineProperty");return n({},"",{}),n}catch(n){}}(),$l=x.clearTimeout!==re.clearTimeout&&x.clearTimeout,Dl=ol&&ol.now!==re.Date.now&&ol.now,Ml=x.setTimeout!==re.setTimeout&&x.setTimeout,Fl=al.ceil,Nl=al.floor,Pl=ll.getOwnPropertySymbols,ql=Ol?Ol.isBuffer:X,Zl=x.isFinite,Kl=_l.join,Vl=F(ll.keys,ll),Gl=al.max,Hl=al.min,Jl=ol.now,Yl=x.parseInt,Ql=al.random,Xl=_l.reverse,ns=Ai(x,"DataView"),ts=Ai(x,"Map"),rs=Ai(x,"Promise"),es=Ai(x,"Set"),us=Ai(x,"WeakMap"),is=Ai(ll,"create"),os=us&&new us,fs={},cs=to(ns),as=to(ts),ls=to(rs),ss=to(es),hs=to(us),ps=Il?Il.prototype:X,_s=ps?ps.valueOf:X,vs=ps?ps.toString:X,gs=function(){
|
||||||
},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),gt(Iu(n),t,r)},On.clone=function(n){return dt(n,4)},On.cloneDeep=function(n){return dt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,4,t)},
|
function n(){}return function(t){if(!fc(t))return{};if(Sl)return Sl(t);n.prototype=t;var r=new n;return n.prototype=X,r}}();Z.templateSettings={escape:kt,evaluate:Ot,interpolate:It,variable:"",imports:{_:Z}},Z.prototype=J.prototype,Z.prototype.constructor=Z,Y.prototype=gs(J.prototype),Y.prototype.constructor=Y,Ct.prototype=gs(J.prototype),Ct.prototype.constructor=Ct,Xt.prototype.clear=nr,Xt.prototype.delete=tr,Xt.prototype.get=rr,Xt.prototype.has=er,Xt.prototype.set=ur,ir.prototype.clear=or,ir.prototype.delete=fr,
|
||||||
On.conformsTo=function(n,t){return null==t||bt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,"\\$&"):n},On.every=function(n,t,r){var e=af(n)?o:wt;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3));
|
ir.prototype.get=cr,ir.prototype.has=ar,ir.prototype.set=lr,sr.prototype.clear=hr,sr.prototype.delete=pr,sr.prototype.get=_r,sr.prototype.has=vr,sr.prototype.set=gr,yr.prototype.add=yr.prototype.push=dr,yr.prototype.has=br,wr.prototype.clear=mr,wr.prototype.delete=xr,wr.prototype.get=jr,wr.prototype.has=Ar,wr.prototype.set=kr;var ys=Pu(ue),ds=Pu(oe,!0),bs=qu(),ws=qu(!0),ms=os?function(n,t){return os.set(n,t),n}:La,xs=Tl?function(n,t){return Tl(n,"toString",{configurable:!0,enumerable:!1,value:Sa(t),
|
||||||
},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,je(t,3),Et)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,je(t,3),Ot)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,je(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,je(t,3),Uu)},On.forOwn=function(n,t){return n&&Et(n,je(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,je(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&ke(n,t,Bt);
|
writable:!0})}:La,js=uu,As=$l||function(n){return re.clearTimeout(n)},ks=es&&1/P(new es([,-0]))[1]==Sn?function(n){return new es(n)}:Da,Os=os?function(n){return os.get(n)}:Da,Is=Pl?function(n){return null==n?[]:(n=ll(n),i(Pl(n),function(t){return Wl.call(n,t)}))}:Pa,Rs=Pl?function(n){for(var t=[];n;)a(t,Is(n)),n=El(n);return t}:Pa,zs=we;(ns&&zs(new ns(new ArrayBuffer(1)))!=ct||ts&&zs(new ts)!=Gn||rs&&zs(rs.resolve())!=Qn||es&&zs(new es)!=tt||us&&zs(new us)!=it)&&(zs=function(n){var t=we(n),r=t==Yn?n.constructor:X,e=r?to(r):"";
|
||||||
},On.hasIn=Bu,On.head=Ke,On.identity=Nu,On.includes=function(n,t,r,e){return n=pu(n)?n:Du(n),r=r&&!e?Ou(r):0,e=n.length,0>r&&(r=Di(e+r,0)),mu(n)?r<=e&&-1<n.indexOf(t,r):!!e&&-1<d(n,t,r)},On.indexOf=function(n,t,r){var e=null==n?0:n.length;return e?(r=null==r?0:Ou(r),0>r&&(r=Di(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=Eu(t),r===F?(r=t,t=0):r=Eu(r),n=Iu(n),n>=Mi(t,r)&&n<Di(t,r)},On.invoke=Sf,On.isArguments=cf,On.isArray=af,On.isArrayBuffer=lf,On.isArrayLike=pu,On.isArrayLikeObject=_u,
|
if(e)switch(e){case cs:return ct;case as:return Gn;case ls:return Qn;case ss:return tt;case hs:return it}return t});var Es=yl?uc:qa,Ss=Qi(ms),Ws=Ml||function(n,t){return re.setTimeout(n,t)},Ls=Qi(xs),Cs=Pi(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(Et,function(n,r,e,u){t.push(e?u.replace(Mt,"$1"):r||n)}),t}),Us=uu(function(n,t){return Jf(n)?Hr(n,ee(t,1,Jf,!0)):[]}),Bs=uu(function(n,t){var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),mi(r,2)):[]}),Ts=uu(function(n,t){
|
||||||
On.isBoolean=function(n){return true===n||false===n||xu(n)&&"[object Boolean]"==zt(n)},On.isBuffer=sf,On.isDate=hf,On.isElement=function(n){return xu(n)&&1===n.nodeType&&!wu(n)},On.isEmpty=function(n){if(null==n)return true;if(pu(n)&&(af(n)||typeof n=="string"||typeof n.splice=="function"||sf(n)||gf(n)||cf(n)))return!n.length;var t=yo(n);if("[object Map]"==t||"[object Set]"==t)return!n.size;if(Le(n))return!Ht(n).length;for(var r in n)if(ci.call(n,r))return false;return true},On.isEqual=function(n,t){return Ft(n,t);
|
var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),X,r):[]}),$s=uu(function(n){var t=c(n,ju);return t.length&&t[0]===n[0]?ke(t):[]}),Ds=uu(function(n){var t=jo(n),r=c(n,ju);return t===jo(r)?t=X:r.pop(),r.length&&r[0]===n[0]?ke(r,mi(t,2)):[]}),Ms=uu(function(n){var t=jo(n),r=c(n,ju);return t="function"==typeof t?t:X,t&&r.pop(),r.length&&r[0]===n[0]?ke(r,X,t):[]}),Fs=uu(Oo),Ns=gi(function(n,t){var r=null==n?0:n.length,e=Tr(n,t);return nu(n,c(t,function(n){return Ci(n,r)?+n:n}).sort(Lu)),e}),Ps=uu(function(n){
|
||||||
},On.isEqualWith=function(n,t,r){var e=(r=typeof r=="function"?r:F)?r(n,t):F;return e===F?Ft(n,t,F,r):!!e},On.isError=vu,On.isFinite=function(n){return typeof n=="number"&&Li(n)},On.isFunction=gu,On.isInteger=du,On.isLength=yu,On.isMap=pf,On.isMatch=function(n,t){return n===t||Pt(n,t,me(t))},On.isMatchWith=function(n,t,r){return r=typeof r=="function"?r:F,Pt(n,t,me(t),r)},On.isNaN=function(n){return ju(n)&&n!=+n},On.isNative=function(n){if(bo(n))throw new Yu("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");
|
return gu(ee(n,1,Jf,!0))}),qs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),gu(ee(n,1,Jf,!0),mi(t,2))}),Zs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,gu(ee(n,1,Jf,!0),X,t)}),Ks=uu(function(n,t){return Jf(n)?Hr(n,t):[]}),Vs=uu(function(n){return mu(i(n,Jf))}),Gs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),mu(i(n,Jf),mi(t,2))}),Hs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,mu(i(n,Jf),X,t)}),Js=uu(Go),Ys=uu(function(n){var t=n.length,r=t>1?n[t-1]:X;return r="function"==typeof r?(n.pop(),
|
||||||
return Zt(n)},On.isNil=function(n){return null==n},On.isNull=function(n){return null===n},On.isNumber=ju,On.isObject=bu,On.isObjectLike=xu,On.isPlainObject=wu,On.isRegExp=_f,On.isSafeInteger=function(n){return du(n)&&-9007199254740991<=n&&9007199254740991>=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&"[object WeakMap]"==yo(n)},On.isWeakSet=function(n){return xu(n)&&"[object WeakSet]"==zt(n)},On.join=function(n,t){
|
r):X,Ho(n,r)}),Qs=gi(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Ct&&Ci(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:nf,args:[u],thisArg:X}),new Y(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(X),n})):this.thru(u)}),Xs=Fu(function(n,t,r){bl.call(n,r)?++n[r]:Br(n,r,1)}),nh=Ju(ho),th=Ju(po),rh=Fu(function(n,t,r){bl.call(n,r)?n[r].push(t):Br(n,r,[t])}),eh=uu(function(t,r,e){var u=-1,i="function"==typeof r,o=Hf(t)?il(t.length):[];
|
||||||
return null==n?"":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?mt(n,Nu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,je(t,2),Wt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,je(t,2))},On.min=function(n){
|
return ys(t,function(t){o[++u]=i?n(r,t,e):Ie(t,r,e)}),o}),uh=Fu(function(n,t,r){Br(n,r,t)}),ih=Fu(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),oh=uu(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ui(n,t[0],t[1])?t=[]:r>2&&Ui(t[0],t[1],t[2])&&(t=[t[0]]),He(n,ee(t,1),[])}),fh=Dl||function(){return re.Date.now()},ch=uu(function(n,t,r){var e=_n;if(r.length){var u=N(r,wi(ch));e|=bn}return ai(n,e,t,r,u)}),ah=uu(function(n,t,r){var e=_n|vn;if(r.length){var u=N(r,wi(ah));e|=bn;
|
||||||
return n&&n.length?mt(n,Nu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,je(t,2),Jt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?tr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ee(zi(t),r)+n+ee(Ri(t),r))},On.padEnd=function(n,t,r){
|
}return ai(t,e,n,r,u)}),lh=uu(function(n,t){return Gr(n,1,t)}),sh=uu(function(n,t,r){return Gr(n,Ic(t)||0,r)});Cf.Cache=sr;var hh=js(function(t,r){r=1==r.length&&bh(r[0])?c(r[0],z(mi())):c(ee(r,1),z(mi()));var e=r.length;return uu(function(u){for(var i=-1,o=Hl(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)})}),ph=uu(function(n,t){return ai(n,bn,X,t,N(t,wi(ph)))}),_h=uu(function(n,t){return ai(n,wn,X,t,N(t,wi(_h)))}),vh=gi(function(n,t){return ai(n,xn,X,X,X,t)}),gh=ii(me),yh=ii(function(n,t){
|
||||||
n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?n+ee(t-e,r):n},On.padStart=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&e<t?ee(t-e,r)+n:n},On.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),$i(zu(n).replace(an,""),t||0)},On.random=function(n,t,r){if(r&&typeof r!="boolean"&&ze(n,t,r)&&(t=r=F),r===F&&(typeof t=="boolean"?(r=t,t=F):typeof n=="boolean"&&(r=n,n=F)),n===F&&t===F?(n=0,t=1):(n=Eu(n),t===F?(t=n,n=0):t=Eu(t)),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):cr(n,t);
|
return n>=t}),dh=Re(function(){return arguments}())?Re:function(n){return cc(n)&&bl.call(n,"callee")&&!Wl.call(n,"callee")},bh=il.isArray,wh=ce?z(ce):ze,mh=ql||qa,xh=ae?z(ae):Ee,jh=le?z(le):Le,Ah=se?z(se):Be,kh=he?z(he):Te,Oh=pe?z(pe):$e,Ih=ii(Ne),Rh=ii(function(n,t){return n<=t}),zh=Nu(function(n,t){if(Mi(t)||Hf(t))return $u(t,Pc(t),n),X;for(var r in t)bl.call(t,r)&&Sr(n,r,t[r])}),Eh=Nu(function(n,t){$u(t,qc(t),n)}),Sh=Nu(function(n,t,r,e){$u(t,qc(t),n,e)}),Wh=Nu(function(n,t,r,e){$u(t,Pc(t),n,e);
|
||||||
},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,je(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,je(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),ar(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Rr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++e<u;){var i=null==n?F:n[$e(t[e])];i===F&&(e=u,i=r),n=gu(i)?i.call(n):i;
|
}),Lh=gi(Tr),Ch=uu(function(n,t){n=ll(n);var r=-1,e=t.length,u=e>2?t[2]:X;for(u&&Ui(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=qc(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===X||Gf(l,gl[a])&&!bl.call(n,a))&&(n[a]=i[a])}return n}),Uh=uu(function(t){return t.push(X,si),n(Mh,X,t)}),Bh=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),n[t]=r},Sa(La)),Th=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),bl.call(n,t)?n[t].push(r):n[t]=[r]},mi),$h=uu(Ie),Dh=Nu(function(n,t,r){
|
||||||
}return n},On.round=ic,On.runInContext=w,On.sample=function(n){return(af(n)?tt:sr)(n)},On.size=function(n){if(null==n)return 0;if(pu(n))return mu(n)?T(n):n.length;var t=yo(n);return"[object Map]"==t||"[object Set]"==t?n.size:Ht(n).length},On.snakeCase=Tf,On.some=function(n,t,r){var e=af(n)?_:gr;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3))},On.sortedIndex=function(n,t){return dr(n,t)},On.sortedIndexBy=function(n,t,r){return yr(n,t,je(r,2))},On.sortedIndexOf=function(n,t){var r=null==n?0:n.length;if(r){
|
Ke(n,t,r)}),Mh=Nu(function(n,t,r,e){Ke(n,t,r,e)}),Fh=gi(function(n,t){var r={};if(null==n)return r;var e=!1;t=c(t,function(t){return t=ku(t,n),e||(e=t.length>1),t}),$u(n,di(n),r),e&&(r=Fr(r,an|ln|sn,hi));for(var u=t.length;u--;)yu(r,t[u]);return r}),Nh=gi(function(n,t){return null==n?{}:Je(n,t)}),Ph=ci(Pc),qh=ci(qc),Zh=Vu(function(n,t,r){return t=t.toLowerCase(),n+(r?fa(t):t)}),Kh=Vu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Vh=Vu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Gh=Ku("toLowerCase"),Hh=Vu(function(n,t,r){
|
||||||
var e=dr(n,t);if(e<r&&hu(n[e],t))return e}return-1},On.sortedLastIndex=function(n,t){return dr(n,t,true)},On.sortedLastIndexBy=function(n,t,r){return yr(n,t,je(r,2),true)},On.sortedLastIndexOf=function(n,t){if(null==n?0:n.length){var r=dr(n,t,true)-1;if(hu(n[r],t))return r}return-1},On.startCase=$f,On.startsWith=function(n,t,r){return n=zu(n),r=null==r?0:gt(Ou(r),0,n.length),t=jr(t),n.slice(r,r+t.length)==t},On.subtract=oc,On.sum=function(n){return n&&n.length?k(n,Nu):0},On.sumBy=function(n,t){return n&&n.length?k(n,je(t,2)):0;
|
return n+(r?"_":"")+t.toLowerCase()}),Jh=Vu(function(n,t,r){return n+(r?" ":"")+Qh(t)}),Yh=Vu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Qh=Ku("toUpperCase"),Xh=uu(function(t,r){try{return n(t,X,r)}catch(n){return rc(n)?n:new fl(n)}}),np=gi(function(n,t){return r(t,function(t){t=no(t),Br(n,t,ch(n[t],n))}),n}),tp=Yu(),rp=Yu(!0),ep=uu(function(n,t){return function(r){return Ie(r,n,t)}}),up=uu(function(n,t){return function(r){return Ie(n,r,t)}}),ip=ti(c),op=ti(u),fp=ti(h),cp=ui(),ap=ui(!0),lp=ni(function(n,t){
|
||||||
},On.template=function(n,t,r){var e=On.templateSettings;r&&ze(n,t,r)&&(t=F),n=zu(n),t=jf({},t,e,se),r=jf({},t.imports,e.imports,se);var u,i,o=Lu(r),f=I(r,o),c=0;r=t.interpolate||An;var a="__p+='";r=ti((t.escape||An).source+"|"+r.source+"|"+(r===nn?gn:An).source+"|"+(t.evaluate||An).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,o,f,l){return e||(e=o),a+=n.slice(c,l).replace(kn,B),r&&(u=true,a+="'+__e("+r+")+'"),f&&(i=true,a+="';"+f+";\n__p+='"),
|
return n+t},0),sp=fi("ceil"),hp=ni(function(n,t){return n/t},1),pp=fi("floor"),_p=ni(function(n,t){return n*t},1),vp=fi("round"),gp=ni(function(n,t){return n-t},0);return Z.after=If,Z.ary=Rf,Z.assign=zh,Z.assignIn=Eh,Z.assignInWith=Sh,Z.assignWith=Wh,Z.at=Lh,Z.before=zf,Z.bind=ch,Z.bindAll=np,Z.bindKey=ah,Z.castArray=Nf,Z.chain=Qo,Z.chunk=uo,Z.compact=io,Z.concat=oo,Z.cond=za,Z.conforms=Ea,Z.constant=Sa,Z.countBy=Xs,Z.create=Sc,Z.curry=Ef,Z.curryRight=Sf,Z.debounce=Wf,Z.defaults=Ch,Z.defaultsDeep=Uh,
|
||||||
e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t}),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(i?a.replace(q,""):a).replace(V,"$1").replace(K,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",t=Pf(function(){return Qu(o,l+"return "+a).apply(F,f)}),t.source=a,vu(t))throw t;return t},On.times=function(n,t){if(n=Ou(n),1>n||9007199254740991<n)return[];
|
Z.defer=lh,Z.delay=sh,Z.difference=Us,Z.differenceBy=Bs,Z.differenceWith=Ts,Z.drop=fo,Z.dropRight=co,Z.dropRightWhile=ao,Z.dropWhile=lo,Z.fill=so,Z.filter=lf,Z.flatMap=sf,Z.flatMapDeep=hf,Z.flatMapDepth=pf,Z.flatten=_o,Z.flattenDeep=vo,Z.flattenDepth=go,Z.flip=Lf,Z.flow=tp,Z.flowRight=rp,Z.fromPairs=yo,Z.functions=$c,Z.functionsIn=Dc,Z.groupBy=rh,Z.initial=mo,Z.intersection=$s,Z.intersectionBy=Ds,Z.intersectionWith=Ms,Z.invert=Bh,Z.invertBy=Th,Z.invokeMap=eh,Z.iteratee=Ca,Z.keyBy=uh,Z.keys=Pc,Z.keysIn=qc,
|
||||||
var r=4294967295,e=Mi(n,4294967295);for(t=je(t),n-=4294967295,e=E(e,t);++r<n;)t(r);return e},On.toFinite=Eu,On.toInteger=Ou,On.toLength=Su,On.toLower=function(n){return zu(n).toLowerCase()},On.toNumber=Iu,On.toSafeInteger=function(n){return n?gt(Ou(n),-9007199254740991,9007199254740991):0===n?n:0},On.toString=zu,On.toUpper=function(n){return zu(n).toUpperCase()},On.trim=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(cn,""):n&&(t=jr(t))?(n=$(n),r=$(t),t=z(n,r),r=W(n,r)+1,zr(n,t,r).join("")):n;
|
Z.map=yf,Z.mapKeys=Zc,Z.mapValues=Kc,Z.matches=Ua,Z.matchesProperty=Ba,Z.memoize=Cf,Z.merge=Dh,Z.mergeWith=Mh,Z.method=ep,Z.methodOf=up,Z.mixin=Ta,Z.negate=Uf,Z.nthArg=Ma,Z.omit=Fh,Z.omitBy=Vc,Z.once=Bf,Z.orderBy=df,Z.over=ip,Z.overArgs=hh,Z.overEvery=op,Z.overSome=fp,Z.partial=ph,Z.partialRight=_h,Z.partition=ih,Z.pick=Nh,Z.pickBy=Gc,Z.property=Fa,Z.propertyOf=Na,Z.pull=Fs,Z.pullAll=Oo,Z.pullAllBy=Io,Z.pullAllWith=Ro,Z.pullAt=Ns,Z.range=cp,Z.rangeRight=ap,Z.rearg=vh,Z.reject=mf,Z.remove=zo,Z.rest=Tf,
|
||||||
},On.trimEnd=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(ln,""):n&&(t=jr(t))?(n=$(n),t=W(n,$(t))+1,zr(n,0,t).join("")):n},On.trimStart=function(n,t,r){return(n=zu(n))&&(r||t===F)?n.replace(an,""):n&&(t=jr(t))?(n=$(n),t=z(n,$(t)),zr(n,t).join("")):n},On.truncate=function(n,t){var r=30,e="...";if(bu(t))var u="separator"in t?t.separator:u,r="length"in t?Ou(t.length):r,e="omission"in t?jr(t.omission):e;n=zu(n);var i=n.length;if(Bn.test(n))var o=$(n),i=o.length;if(r>=i)return n;if(i=r-T(e),1>i)return e;
|
Z.reverse=Eo,Z.sampleSize=jf,Z.set=Jc,Z.setWith=Yc,Z.shuffle=Af,Z.slice=So,Z.sortBy=oh,Z.sortedUniq=$o,Z.sortedUniqBy=Do,Z.split=da,Z.spread=$f,Z.tail=Mo,Z.take=Fo,Z.takeRight=No,Z.takeRightWhile=Po,Z.takeWhile=qo,Z.tap=Xo,Z.throttle=Df,Z.thru=nf,Z.toArray=jc,Z.toPairs=Ph,Z.toPairsIn=qh,Z.toPath=Ha,Z.toPlainObject=Rc,Z.transform=Qc,Z.unary=Mf,Z.union=Ps,Z.unionBy=qs,Z.unionWith=Zs,Z.uniq=Zo,Z.uniqBy=Ko,Z.uniqWith=Vo,Z.unset=Xc,Z.unzip=Go,Z.unzipWith=Ho,Z.update=na,Z.updateWith=ta,Z.values=ra,Z.valuesIn=ea,
|
||||||
if(r=o?zr(o,0,i).join(""):n.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1<u&&(r=r.slice(0,u)));return r+e},On.unescape=function(n){return(n=zu(n))&&J.test(n)?n.replace(G,ut):n},On.uniqueId=function(n){var t=++ai;return zu(n)+t},On.upperCase=Ff,On.upperFirst=Nf,On.each=ru,On.eachRight=eu,On.first=Ke,
|
Z.without=Ks,Z.words=Ra,Z.wrap=Ff,Z.xor=Vs,Z.xorBy=Gs,Z.xorWith=Hs,Z.zip=Js,Z.zipObject=Jo,Z.zipObjectDeep=Yo,Z.zipWith=Ys,Z.entries=Ph,Z.entriesIn=qh,Z.extend=Eh,Z.extendWith=Sh,Ta(Z,Z),Z.add=lp,Z.attempt=Xh,Z.camelCase=Zh,Z.capitalize=fa,Z.ceil=sp,Z.clamp=ua,Z.clone=Pf,Z.cloneDeep=Zf,Z.cloneDeepWith=Kf,Z.cloneWith=qf,Z.conformsTo=Vf,Z.deburr=ca,Z.defaultTo=Wa,Z.divide=hp,Z.endsWith=aa,Z.eq=Gf,Z.escape=la,Z.escapeRegExp=sa,Z.every=af,Z.find=nh,Z.findIndex=ho,Z.findKey=Wc,Z.findLast=th,Z.findLastIndex=po,
|
||||||
Zu(On,function(){var n={};return Et(On,function(t,r){ci.call(On.prototype,r)||(n[r]=t)}),n}(),{chain:false}),On.VERSION="4.17.4",u("bind bindKey curry curryRight partial partialRight".split(" "),function(n){On[n].placeholder=On}),u(["drop","take"],function(n,t){Mn.prototype[n]=function(r){r=r===F?1:Di(Ou(r),0);var e=this.__filtered__&&!t?new Mn(this):this.clone();return e.__filtered__?e.__takeCount__=Mi(r,e.__takeCount__):e.__views__.push({size:Mi(r,4294967295),type:n+(0>e.__dir__?"Right":"")}),e},Mn.prototype[n+"Right"]=function(t){
|
Z.findLastKey=Lc,Z.floor=pp,Z.forEach=_f,Z.forEachRight=vf,Z.forIn=Cc,Z.forInRight=Uc,Z.forOwn=Bc,Z.forOwnRight=Tc,Z.get=Mc,Z.gt=gh,Z.gte=yh,Z.has=Fc,Z.hasIn=Nc,Z.head=bo,Z.identity=La,Z.includes=gf,Z.indexOf=wo,Z.inRange=ia,Z.invoke=$h,Z.isArguments=dh,Z.isArray=bh,Z.isArrayBuffer=wh,Z.isArrayLike=Hf,Z.isArrayLikeObject=Jf,Z.isBoolean=Yf,Z.isBuffer=mh,Z.isDate=xh,Z.isElement=Qf,Z.isEmpty=Xf,Z.isEqual=nc,Z.isEqualWith=tc,Z.isError=rc,Z.isFinite=ec,Z.isFunction=uc,Z.isInteger=ic,Z.isLength=oc,Z.isMap=jh,
|
||||||
return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:je(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1);
|
Z.isMatch=ac,Z.isMatchWith=lc,Z.isNaN=sc,Z.isNative=hc,Z.isNil=_c,Z.isNull=pc,Z.isNumber=vc,Z.isObject=fc,Z.isObjectLike=cc,Z.isPlainObject=gc,Z.isRegExp=Ah,Z.isSafeInteger=yc,Z.isSet=kh,Z.isString=dc,Z.isSymbol=bc,Z.isTypedArray=Oh,Z.isUndefined=wc,Z.isWeakMap=mc,Z.isWeakSet=xc,Z.join=xo,Z.kebabCase=Kh,Z.last=jo,Z.lastIndexOf=Ao,Z.lowerCase=Vh,Z.lowerFirst=Gh,Z.lt=Ih,Z.lte=Rh,Z.max=Ya,Z.maxBy=Qa,Z.mean=Xa,Z.meanBy=nl,Z.min=tl,Z.minBy=rl,Z.stubArray=Pa,Z.stubFalse=qa,Z.stubObject=Za,Z.stubString=Ka,
|
||||||
}}),Mn.prototype.compact=function(){return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(je(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0<n||0>t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),
|
Z.stubTrue=Va,Z.multiply=_p,Z.nth=ko,Z.noConflict=$a,Z.noop=Da,Z.now=fh,Z.pad=ha,Z.padEnd=pa,Z.padStart=_a,Z.parseInt=va,Z.random=oa,Z.reduce=bf,Z.reduceRight=wf,Z.repeat=ga,Z.replace=ya,Z.result=Hc,Z.round=vp,Z.runInContext=p,Z.sample=xf,Z.size=kf,Z.snakeCase=Hh,Z.some=Of,Z.sortedIndex=Wo,Z.sortedIndexBy=Lo,Z.sortedIndexOf=Co,Z.sortedLastIndex=Uo,Z.sortedLastIndexBy=Bo,Z.sortedLastIndexOf=To,Z.startCase=Jh,Z.startsWith=ba,Z.subtract=gp,Z.sum=el,Z.sumBy=ul,Z.template=wa,Z.times=Ga,Z.toFinite=Ac,Z.toInteger=kc,
|
||||||
t!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);
|
Z.toLength=Oc,Z.toLower=ma,Z.toNumber=Ic,Z.toSafeInteger=zc,Z.toString=Ec,Z.toUpper=xa,Z.trim=ja,Z.trimEnd=Aa,Z.trimStart=ka,Z.truncate=Oa,Z.unescape=Ia,Z.uniqueId=Ja,Z.upperCase=Yh,Z.upperFirst=Qh,Z.each=_f,Z.eachRight=vf,Z.first=bo,Ta(Z,function(){var n={};return ue(Z,function(t,r){bl.call(Z.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),Z.VERSION=nn,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){Z[n].placeholder=Z}),r(["drop","take"],function(n,t){Ct.prototype[n]=function(r){
|
||||||
l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){
|
r=r===X?1:Gl(kc(r),0);var e=this.__filtered__&&!t?new Ct(this):this.clone();return e.__filtered__?e.__takeCount__=Hl(r,e.__takeCount__):e.__views__.push({size:Hl(r,Un),type:n+(e.__dir__<0?"Right":"")}),e},Ct.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==Rn||r==En;Ct.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:mi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){
|
||||||
var u=this.value();return t.apply(af(u)?u:[],n)}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[Xr(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Mr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Mr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Mr(this.__views__),
|
var r="take"+(t?"Right":"");Ct.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ct.prototype[n]=function(){return this.__filtered__?new Ct(this):this[r](1)}}),Ct.prototype.compact=function(){return this.filter(La)},Ct.prototype.find=function(n){return this.filter(n).head()},Ct.prototype.findLast=function(n){return this.reverse().find(n)},Ct.prototype.invokeMap=uu(function(n,t){return"function"==typeof n?new Ct(this):this.map(function(r){
|
||||||
n},Mn.prototype.reverse=function(){if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c<a;){var l=o[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=Mi(n,f+s);break;case"takeRight":f=Di(f,n-s)}}if(n={start:f,end:n},o=n.start,f=n.end,n=f-o,
|
return Ie(r,n,t)})}),Ct.prototype.reject=function(n){return this.filter(Uf(mi(n)))},Ct.prototype.slice=function(n,t){n=kc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Ct(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==X&&(t=kc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Ct.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ct.prototype.toArray=function(){return this.take(Un)},ue(Ct.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=Z[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);
|
||||||
o=u?f:o-1,f=this.__iteratees__,c=f.length,a=0,l=Mi(n,this.__takeCount__),!e||!u&&i==n&&l==n)return kr(t,this.__actions__);e=[];n:for(;n--&&a<l;){for(o+=r,u=-1,i=t[o];++u<c;){var h=f[u],s=h.type,h=(0,h.iteratee)(i);if(2==s)i=h;else if(!h){if(1==s)continue n;break n}}e[a++]=i}return e},On.prototype.at=Fo,On.prototype.chain=function(){return Xe(this)},On.prototype.commit=function(){return new zn(this.value(),this.__chain__)},On.prototype.next=function(){this.__values__===F&&(this.__values__=ku(this.value()));
|
u&&(Z.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ct,c=o[0],l=f||bh(t),s=function(n){var t=u.apply(Z,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Ct(this);var g=n.apply(t,o);return g.__actions__.push({func:nf,args:[s],thisArg:X}),new Y(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){
|
||||||
var n=this.__index__>=this.__values__.length;return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je);
|
var t=_l[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Z.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(bh(u)?u:[],n)}return this[r](function(r){return t.apply(bh(r)?r:[],n)})}}),ue(Ct.prototype,function(n,t){var r=Z[t];if(r){var e=r.name+"";bl.call(fs,e)||(fs[e]=[]),fs[e].push({name:t,func:r})}}),fs[Qu(X,vn).name]=[{name:"wrapper",func:X}],Ct.prototype.clone=$t,Ct.prototype.reverse=Yt,Ct.prototype.value=Qt,Z.prototype.at=Qs,
|
||||||
},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return kr(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this);
|
Z.prototype.chain=tf,Z.prototype.commit=rf,Z.prototype.next=ef,Z.prototype.plant=of,Z.prototype.reverse=ff,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=cf,Z.prototype.first=Z.prototype.head,Ul&&(Z.prototype[Ul]=uf),Z},be=de();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(re._=be,define(function(){return be})):ue?((ue.exports=be)._=be,ee._=be):re._=be}).call(this);
|
||||||
14
dist/mapping.fp.js
vendored
14
dist/mapping.fp.js
vendored
@@ -52,7 +52,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/** Used to map aliases to their real names. */
|
/** Used to map aliases to their real names. */
|
||||||
exports.aliasToReal = {
|
exports.aliasToReal = {
|
||||||
@@ -317,16 +317,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Used to track methods with placeholder support */
|
|
||||||
exports.placeholder = {
|
|
||||||
'bind': true,
|
|
||||||
'bindKey': true,
|
|
||||||
'curry': true,
|
|
||||||
'curryRight': true,
|
|
||||||
'partial': true,
|
|
||||||
'partialRight': true
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Used to map real names to their aliases. */
|
/** Used to map real names to their aliases. */
|
||||||
exports.realToAlias = (function() {
|
exports.realToAlias = (function() {
|
||||||
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||||
@@ -424,7 +414,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ])
|
/******/ ])
|
||||||
});
|
});
|
||||||
;
|
;
|
||||||
671
doc/README.md
671
doc/README.md
File diff suppressed because it is too large
Load Diff
@@ -136,8 +136,7 @@ function wrapImmutable(func, cloner) {
|
|||||||
* @returns {Function|Object} Returns the converted function or object.
|
* @returns {Function|Object} Returns the converted function or object.
|
||||||
*/
|
*/
|
||||||
function baseConvert(util, name, func, options) {
|
function baseConvert(util, name, func, options) {
|
||||||
var setPlaceholder,
|
var isLib = typeof name == 'function',
|
||||||
isLib = typeof name == 'function',
|
|
||||||
isObj = name === Object(name);
|
isObj = name === Object(name);
|
||||||
|
|
||||||
if (isObj) {
|
if (isObj) {
|
||||||
@@ -158,10 +157,10 @@ function baseConvert(util, name, func, options) {
|
|||||||
'rearg': 'rearg' in options ? options.rearg : true
|
'rearg': 'rearg' in options ? options.rearg : true
|
||||||
};
|
};
|
||||||
|
|
||||||
var forceCurry = ('curry' in options) && options.curry,
|
var defaultHolder = isLib ? func : fallbackHolder,
|
||||||
|
forceCurry = ('curry' in options) && options.curry,
|
||||||
forceFixed = ('fixed' in options) && options.fixed,
|
forceFixed = ('fixed' in options) && options.fixed,
|
||||||
forceRearg = ('rearg' in options) && options.rearg,
|
forceRearg = ('rearg' in options) && options.rearg,
|
||||||
placeholder = isLib ? func : fallbackHolder,
|
|
||||||
pristine = isLib ? func.runInContext() : undefined;
|
pristine = isLib ? func.runInContext() : undefined;
|
||||||
|
|
||||||
var helpers = isLib ? func : {
|
var helpers = isLib ? func : {
|
||||||
@@ -171,7 +170,9 @@ function baseConvert(util, name, func, options) {
|
|||||||
'curry': util.curry,
|
'curry': util.curry,
|
||||||
'forEach': util.forEach,
|
'forEach': util.forEach,
|
||||||
'isArray': util.isArray,
|
'isArray': util.isArray,
|
||||||
|
'isError': util.isError,
|
||||||
'isFunction': util.isFunction,
|
'isFunction': util.isFunction,
|
||||||
|
'isWeakMap': util.isWeakMap,
|
||||||
'iteratee': util.iteratee,
|
'iteratee': util.iteratee,
|
||||||
'keys': util.keys,
|
'keys': util.keys,
|
||||||
'rearg': util.rearg,
|
'rearg': util.rearg,
|
||||||
@@ -185,7 +186,9 @@ function baseConvert(util, name, func, options) {
|
|||||||
curry = helpers.curry,
|
curry = helpers.curry,
|
||||||
each = helpers.forEach,
|
each = helpers.forEach,
|
||||||
isArray = helpers.isArray,
|
isArray = helpers.isArray,
|
||||||
|
isError = helpers.isError,
|
||||||
isFunction = helpers.isFunction,
|
isFunction = helpers.isFunction,
|
||||||
|
isWeakMap = helpers.isWeakMap,
|
||||||
keys = helpers.keys,
|
keys = helpers.keys,
|
||||||
rearg = helpers.rearg,
|
rearg = helpers.rearg,
|
||||||
toInteger = helpers.toInteger,
|
toInteger = helpers.toInteger,
|
||||||
@@ -355,8 +358,9 @@ function baseConvert(util, name, func, options) {
|
|||||||
var key = path[index],
|
var key = path[index],
|
||||||
value = nested[key];
|
value = nested[key];
|
||||||
|
|
||||||
if (value != null) {
|
if (value != null &&
|
||||||
nested[path[index]] = clone(index == lastIndex ? value : Object(value));
|
!(isFunction(value) || isError(value) || isWeakMap(value))) {
|
||||||
|
nested[key] = clone(index == lastIndex ? value : Object(value));
|
||||||
}
|
}
|
||||||
nested = nested[key];
|
nested = nested[key];
|
||||||
}
|
}
|
||||||
@@ -461,7 +465,7 @@ function baseConvert(util, name, func, options) {
|
|||||||
* @param {Function} func The function to wrap.
|
* @param {Function} func The function to wrap.
|
||||||
* @returns {Function} Returns the converted function.
|
* @returns {Function} Returns the converted function.
|
||||||
*/
|
*/
|
||||||
function wrap(name, func) {
|
function wrap(name, func, placeholder) {
|
||||||
var result,
|
var result,
|
||||||
realName = mapping.aliasToReal[name] || name,
|
realName = mapping.aliasToReal[name] || name,
|
||||||
wrapped = func,
|
wrapped = func,
|
||||||
@@ -506,17 +510,15 @@ function baseConvert(util, name, func, options) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
result.convert = createConverter(realName, func);
|
result.convert = createConverter(realName, func);
|
||||||
if (mapping.placeholder[realName]) {
|
result.placeholder = func.placeholder = placeholder;
|
||||||
setPlaceholder = true;
|
|
||||||
result.placeholder = func.placeholder = placeholder;
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
if (!isObj) {
|
if (!isObj) {
|
||||||
return wrap(name, func);
|
return wrap(name, func, defaultHolder);
|
||||||
}
|
}
|
||||||
var _ = func;
|
var _ = func;
|
||||||
|
|
||||||
@@ -526,7 +528,7 @@ function baseConvert(util, name, func, options) {
|
|||||||
each(mapping.aryMethod[aryKey], function(key) {
|
each(mapping.aryMethod[aryKey], function(key) {
|
||||||
var func = _[mapping.remap[key] || key];
|
var func = _[mapping.remap[key] || key];
|
||||||
if (func) {
|
if (func) {
|
||||||
pairs.push([key, wrap(key, func)]);
|
pairs.push([key, wrap(key, func, _)]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -552,9 +554,8 @@ function baseConvert(util, name, func, options) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
_.convert = convertLib;
|
_.convert = convertLib;
|
||||||
if (setPlaceholder) {
|
_.placeholder = _;
|
||||||
_.placeholder = placeholder;
|
|
||||||
}
|
|
||||||
// Assign aliases.
|
// Assign aliases.
|
||||||
each(keys(_), function(key) {
|
each(keys(_), function(key) {
|
||||||
each(mapping.realToAlias[key] || [], function(alias) {
|
each(mapping.realToAlias[key] || [], function(alias) {
|
||||||
|
|||||||
@@ -261,16 +261,6 @@ exports.mutate = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Used to track methods with placeholder support */
|
|
||||||
exports.placeholder = {
|
|
||||||
'bind': true,
|
|
||||||
'bindKey': true,
|
|
||||||
'curry': true,
|
|
||||||
'curryRight': true,
|
|
||||||
'partial': true,
|
|
||||||
'partialRight': true
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Used to map real names to their aliases. */
|
/** Used to map real names to their aliases. */
|
||||||
exports.realToAlias = (function() {
|
exports.realToAlias = (function() {
|
||||||
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||||
|
|||||||
184
incident_response_plan.md
Normal file
184
incident_response_plan.md
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
# Incident Response Plan
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
Security is a top priority for Lodash. This document outlines the **formal process** for handling **security reports**, including how to **triage**, **assess**, and **disclose** vulnerabilities responsibly.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
The [Security Triage Team][] will use this document as a process guide when a security vulnerability is reported, from triage to resolution. This process must align with the project's [SECURITY policy](SECURITY.md) and cannot diverge significantly.
|
||||||
|
|
||||||
|
|
||||||
|
## Security Report Handling Flowchart
|
||||||
|
The following diagram details the **decision-making process** for handling security reports:
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
A[Security Report Received] --> B[Assign Security Report Coordinator]
|
||||||
|
B --> E{Premature Disclosure?}
|
||||||
|
|
||||||
|
E -- No --> J[Proceed with Standard Private Process]
|
||||||
|
E -- Yes --> F[Privatize Disclosure]
|
||||||
|
F --> G[Handle Related PRs & Issues]
|
||||||
|
G --> H[Request GitHub to Remove Public PR/Issues]
|
||||||
|
H --> I[Create Public Placeholder Issue]
|
||||||
|
I --> J[Acknowledge within 5 days to the Reporter]
|
||||||
|
J --> K[Create Issue in Triage Repo for Visibility]
|
||||||
|
|
||||||
|
K --> L[Assess Report]
|
||||||
|
L --> M{Enough Information?}
|
||||||
|
|
||||||
|
M -- No --> N[Request Additional Info]
|
||||||
|
N --> L[Assess Report]
|
||||||
|
|
||||||
|
M -- Yes --> O{Valid Vulnerability?}
|
||||||
|
O -- No --> X[Close Report as Invalid]
|
||||||
|
X --> Y[Acknowledge within 10 days to the Reporter]
|
||||||
|
|
||||||
|
O -- Yes --> Q[Create Advisory]
|
||||||
|
Q --> Q1[Calculate CVSS Score]
|
||||||
|
Q1 --> Q2[Request a CVE]
|
||||||
|
|
||||||
|
Q2 --> R{Patch Required?}
|
||||||
|
|
||||||
|
R -- No --> Z[Public Disclosure]
|
||||||
|
|
||||||
|
R -- Yes --> T[Develop Patch]
|
||||||
|
T --> U[Test Solution]
|
||||||
|
U --> V[Add Regression Testing]
|
||||||
|
V --> W[Create a Security Release with CVE Included]
|
||||||
|
W --> Z[Public Disclosure]
|
||||||
|
Z --> Z1[Notify Community]
|
||||||
|
Z1 --> Z2[Official Blog Post]
|
||||||
|
Z1 --> Z3[Social Media Announcements]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Roles & Responsibilities
|
||||||
|
|
||||||
|
### Finder
|
||||||
|
|
||||||
|
This person identifies a potential security vulnerability in the project. The Finder may or may not be the same person as the Reporter. If the Finder is not the Reporter, they may share the details with someone else who submits the report to the Security Triage Team.
|
||||||
|
|
||||||
|
**Responsibilities**
|
||||||
|
- Identify potential security vulnerabilities in the project.
|
||||||
|
- Share sufficient details about the vulnerability with the Reporter or directly with the Security Triage Team.
|
||||||
|
|
||||||
|
**Expectations**
|
||||||
|
- Follow responsible disclosure guidelines by ensuring the vulnerability is reported privately before public disclosure.
|
||||||
|
- Provide clear and accurate information about the vulnerability to facilitate the reporting process.
|
||||||
|
|
||||||
|
### Reporter
|
||||||
|
|
||||||
|
This person submits a security report to the Security Triage Team and provides detailed information about the suspected vulnerability. It is expected that the Reporter will cooperate with the Security Triage Team during this process and follow responsible disclosure guidelines.
|
||||||
|
|
||||||
|
**Responsibilities**
|
||||||
|
- Submit a security report to the Security Triage Team.
|
||||||
|
|
||||||
|
**Expectations**
|
||||||
|
- Provide detailed information about the suspected vulnerability.
|
||||||
|
- Follow responsible disclosure guidelines (report privately before public disclosure).
|
||||||
|
- Cooperate with the Security Triage Team by providing additional details when needed.
|
||||||
|
- Test and verify patches (when applicable).
|
||||||
|
- Respect security timelines and avoid premature public disclosure.
|
||||||
|
|
||||||
|
### Coordinator
|
||||||
|
|
||||||
|
This person acts as the focal point for a specific security report and ensures the report follows all responsible disclosure guidelines. The SRC coordinates the remediation process if a vulnerability is confirmed and ensures that the security report follows the process and necessary actions are taken. While the SRC is not necessarily responsible for performing analysis, remediation, or patching, they may take on these tasks if they also hold the role of Analyst or Remediation Developer.
|
||||||
|
|
||||||
|
**Responsibilities**
|
||||||
|
- Acknowledge receipt of security reports within the required timeframe.
|
||||||
|
- Orchestrate the embargo and identify the minimum set of individuals involved.
|
||||||
|
- Remind everyone involved that they must not notify/involve any other individuals. If someone else needs to be involved, that must go through the Coordinator.
|
||||||
|
- Assign an Analyst to assess and validate the report.
|
||||||
|
- Ensure communication with the reporter throughout the process.
|
||||||
|
- Coordinate the remediation process if a vulnerability is confirmed.
|
||||||
|
- Oversee the advisory & CVE request process if applicable.
|
||||||
|
- Escalate critical vulnerabilities when necessary.
|
||||||
|
- Track all security reports for visibility and reporting.
|
||||||
|
|
||||||
|
**Requirements**
|
||||||
|
- Must be a member of the Security Triage Team.
|
||||||
|
|
||||||
|
|
||||||
|
### Analyst
|
||||||
|
|
||||||
|
**Responsibilities**
|
||||||
|
- Determine if the reported issue is a real vulnerability, and is in within the scope of our [threat model](threat-model.md)
|
||||||
|
- Validate proof-of-concept exploits
|
||||||
|
- Assess the security report and determine its severity (assist in CVSS).
|
||||||
|
- Validate the reported vulnerability against best practices.
|
||||||
|
- Identify potential mitigation strategies and workarounds.
|
||||||
|
- Prepare a report for the Security Report Coordinator.
|
||||||
|
|
||||||
|
### Remediation Developer
|
||||||
|
|
||||||
|
**Responsibilities**
|
||||||
|
- Develop a patch or solution based on the reported vulnerability.
|
||||||
|
- Ensure the patch follows best practices and is testable.
|
||||||
|
- Add test(s) to the existing test suite to confirm the vulnerability (pre-patch) and confirm the fix (post-patch).
|
||||||
|
- Test the patch to ensure it works as expected.
|
||||||
|
- Create a pull request to merge the patch into the project.
|
||||||
|
|
||||||
|
## Runbook
|
||||||
|
|
||||||
|
The following sections outline the **step-by-step process**, explaining each decision, scenario, and possible actions. In this guide we also include links that are private (limited to the Security Triage Team), a general overview of the process in flowchart format can be found [here](#security-report-handling-flowchart).
|
||||||
|
|
||||||
|
### Step 0: Security Report Received
|
||||||
|
|
||||||
|
A security vulnerability report is received via [official channels](SECURITY.md#reporting-a-security-issue) or otherwise (i.e. via third-party advisory services, blog post, social media, etc.).
|
||||||
|
|
||||||
|
Ideally, the report must contain **clear and detailed information** like (Affected versions, a small PoC/sample project demonstrating the issue, steps to reproduce, expected vs. actual behavior, potential impact...) but this might not be the case depending on the communication channel used. Later on we will try to collect this information and refine the report.
|
||||||
|
|
||||||
|
### Step 1: Assign Security Report Coordinator (SRC) and consolidate the report
|
||||||
|
|
||||||
|
1.1 One person from the Security Triage Team will volunteer and self-assign to oversee the case. It is expected that the person will remain assigned until the end of the process, so they effectively take the role of [the Security Report Coordinator (SRC)](#security-report-coordinator-src).
|
||||||
|
|
||||||
|
> [!Note]
|
||||||
|
> While this document refers to a single SRC for simplicity, in practice, having two coordinators is acceptable and often beneficial. A second coordinator can assist with tasks such as reviewing the advisory content before it is published, ensuring accuracy and completeness.
|
||||||
|
|
||||||
|
1.2 If the report was created accidentally or intentionally in a public channel (e.g. GitHub issues), it is important to share this information ASAP in the private slack channel `#lodash-security-triage` so the Security Triage Team is aware of it. At this stage, our priority is to remove the report from public view as soon as possible and let the reporter know what happened next.
|
||||||
|
|
||||||
|
1.2.1 In the case of a report made public in a Pull request or issue under the Lodash GitHub organization the following process will be followed (by a Lodash TSC Member):
|
||||||
|
|
||||||
|
* Move the issue to the private repository called [lodash/security-triage](https://github.com/lodash/security-triage).
|
||||||
|
* For any related pull requests, create an associated issue in [lodash/security-triage](https://github.com/lodash/security-triage) repository. Add a copy of the patch for the pull request to the issue. Add screenshots of discussion from the pull request to the issue.
|
||||||
|
* [Open a ticket with GitHub](https://support.github.com/contact) to delete the pull request using Lodash (team) as the account organization.
|
||||||
|
* Force-push to the PR branch to overwrite the code with a placeholder commit (if "allow edits by maintainers" is enabled). This ensures sensitive information is removed immediately.
|
||||||
|
* In the PR comments, notify the author about the force-push and explain the reason:
|
||||||
|
> FYI @xxxx, we force-pushed to your branch to remove sensitive information while we work on releases in private.
|
||||||
|
* Open a new issue in the public repository with the title `FYI - pull request deleted #YYYY`. Include an explanation for the user:
|
||||||
|
> FYI @xxxx we asked GitHub to delete your pull request while we work on releases in private.
|
||||||
|
* Update the team in the slack channel #lodash-security-triage`.
|
||||||
|
|
||||||
|
1.2.2 In the case that the report is made public in a different channel that we don't own/control, the Lodash TSC will attempt to mitigate this by trying to remove the report from public view (reporting to support, asking the reporter to remove the report, etc...).
|
||||||
|
|
||||||
|
|
||||||
|
1.3 At this stage the Security Report Coordinator (SRC) will create a (private) issue in [lodash/security-triage](https://github.com/lodash/security-triage) repository with the existing information from the security report unless it already exists (step 1.2.1). This issue will serve as the central discussion point for this particular report. At this stage is expected from the Security Report Coordinator (SRC) to acknowledge receipt of the security report to the reporter.
|
||||||
|
|
||||||
|
> [!Note]
|
||||||
|
> It is expected that the issue will be assigned to the Security Report Coordinator (SRC) and will remain open until the end of the process.
|
||||||
|
|
||||||
|
### Step 2: Review the Report and determine its severity
|
||||||
|
|
||||||
|
2.1 It is expected from the security triage team to review the report and determine its severity, also evaluating the impact on the project(s). In some cases the report might be too vague to properly determine its severity. In this case the Security Report Coordinator (SRC) will need to reach out to the reporter for more information and refine the report.
|
||||||
|
|
||||||
|
2.2 At this stage we are capable of determining the severity of the report based on the information provided and also if the report is still relevant. In case that the team has considered the report to be irrelevant or not valid, the Security Report Coordinator (SRC) will need to close the issue and inform the reporter that the report has been dismissed, ideally we can provide a reason for dismissal to prevent the report from being resubmitted within the project(s) in the future.
|
||||||
|
|
||||||
|
2.3 If the report is considered relevant and valid, the Security Report Coordinator (SRC) will create an advisory and request a CVE number. The Security Report Coordinator (SRC) will also include the remediation developer(s), analyst(s) and potentially the reporter in the advisory, so they can start to work on private fork to fix the security issue.
|
||||||
|
|
||||||
|
### Step 3: Patch and release
|
||||||
|
|
||||||
|
3.1 The security triage team will determine if this vulnerability will be patched and work on it. In case that the vulnerability won't be patched jump to step 4.
|
||||||
|
|
||||||
|
3.2 The mitigation team (remediation developer(s), analyst(s), reporter(s)) will work on the patch(es), re-evaluate the report once the patch is ready and include regression tests (when possible).
|
||||||
|
|
||||||
|
3.3 The Lodash TSC will announce publicly on a public issue that there is security patch available and the plan to do a release with an specific date (ideally) and the versions affected without providing additional information to prevent early disclosure.
|
||||||
|
|
||||||
|
3.4 The Lodash TSC will create the releases and publish them to npm.
|
||||||
|
|
||||||
|
### Step 4: Public disclosure
|
||||||
|
|
||||||
|
4.1 At this stage the Security Report Coordinator (SRC) will make the advisory public and close the coordination issue (opened in step 1).
|
||||||
|
|
||||||
|
4.2 The Security Report Coordinator (SRC) can ask the Lodash TSC to coordinate blog post or social media announcements using the OpenJS Foundation channels.
|
||||||
|
|
||||||
|
[Security Triage Team]: GOVERNANCE.md#security-triage-team
|
||||||
@@ -123,7 +123,7 @@ A fixed arity of four has an argument order of:<br>
|
|||||||
|
|
||||||
##### Exceptions to the rules
|
##### Exceptions to the rules
|
||||||
|
|
||||||
Methods that accept an array as their last or only argument:<br>
|
Methods that accept an array as their last, second to last, or only argument:<br>
|
||||||
<%= toFuncList(_.keys(mapping.methodSpread)) %>
|
<%= toFuncList(_.keys(mapping.methodSpread)) %>
|
||||||
|
|
||||||
Methods with unchanged argument orders:<br>
|
Methods with unchanged argument orders:<br>
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ module.exports = {
|
|||||||
'curry': require('../curry'),
|
'curry': require('../curry'),
|
||||||
'forEach': require('../_arrayEach'),
|
'forEach': require('../_arrayEach'),
|
||||||
'isArray': require('../isArray'),
|
'isArray': require('../isArray'),
|
||||||
|
'isError': require('../isError'),
|
||||||
'isFunction': require('../isFunction'),
|
'isFunction': require('../isFunction'),
|
||||||
|
'isWeakMap': require('../isWeakMap'),
|
||||||
'iteratee': require('../iteratee'),
|
'iteratee': require('../iteratee'),
|
||||||
'keys': require('../_baseKeys'),
|
'keys': require('../_baseKeys'),
|
||||||
'rearg': require('../rearg'),
|
'rearg': require('../rearg'),
|
||||||
|
|||||||
@@ -34,11 +34,19 @@ const exts = _.keys(highlights);
|
|||||||
/**
|
/**
|
||||||
* Converts Lodash method references into documentation links.
|
* Converts Lodash method references into documentation links.
|
||||||
*
|
*
|
||||||
|
* Searches for inline code references matching `_.word` (e.g., `_.map`, `_.filter`)
|
||||||
|
* in documentation body text and wraps them in anchor links. Excludes code within
|
||||||
|
* headers as those already have proper anchors.
|
||||||
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} $ The Cheerio object.
|
* @param {Object} $ The Cheerio object.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* // Body text: <code>_.map</code> → <a href="#map"><code>_.map</code></a>
|
||||||
|
* // Headers: <h3><code>_.VERSION</code></h3> → unchanged (excluded)
|
||||||
*/
|
*/
|
||||||
function autoLink($) {
|
function autoLink($) {
|
||||||
$('.doc-container code').each(function() {
|
$('.doc-container code:not(:header code)').each(function() {
|
||||||
const $code = $(this);
|
const $code = $(this);
|
||||||
const html = $code.html();
|
const html = $code.html();
|
||||||
if (/^_\.\w+$/.test(html)) {
|
if (/^_\.\w+$/.test(html)) {
|
||||||
@@ -176,9 +184,16 @@ function build() {
|
|||||||
.readFileSync(readmePath, 'utf8')
|
.readFileSync(readmePath, 'utf8')
|
||||||
// Uncomment docdown HTML hints.
|
// Uncomment docdown HTML hints.
|
||||||
.replace(/(<)!--\s*|\s*--(>)/g, '$1$2')
|
.replace(/(<)!--\s*|\s*--(>)/g, '$1$2')
|
||||||
// Convert source and npm package links to anchors.
|
// Convert docdown-generated [source] and [npm package] links to HTML.
|
||||||
.replace(/\[source\]\(([^)]+)\) \[npm package\]\(([^)]+)\)/g, (match, href1, href2) =>
|
// These appear as markdown immediately after h3 tags, which marky-markdown
|
||||||
`<p><a href="${ href1 }">source</a> <a href="${ href2 }">npm package</a></p>`
|
// doesn't process (it treats content after HTML blocks as plain text).
|
||||||
|
// Pattern 1: Dual links for methods with npm packages.
|
||||||
|
.replace(/(<h3[^>]*>.*?<\/h3>)\n\[source\]\(([^)]+)\) \[npm package\]\(([^)]+)\)/g, (match, h3, href1, href2) =>
|
||||||
|
`${h3}\n<p><a href="${ href1 }">source</a> <a href="${ href2 }">npm package</a></p>`
|
||||||
|
)
|
||||||
|
// Pattern 2: Standalone [source] links for properties without npm packages.
|
||||||
|
.replace(/(<h3[^>]*>.*?<\/h3>)\n\[source\]\(([^)]+)\)(?! \[npm package\])/g, (match, h3, href) =>
|
||||||
|
`${h3}\n<p><a href="${ href }">source</a></p>`
|
||||||
);
|
);
|
||||||
|
|
||||||
const $ = cheerio.load(marky(markdown, {
|
const $ = cheerio.load(marky(markdown, {
|
||||||
|
|||||||
404
lodash.js
404
lodash.js
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @license
|
* @license
|
||||||
* Lodash <https://lodash.com/>
|
* Lodash <https://lodash.com/>
|
||||||
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||||
* Released under MIT license <https://lodash.com/license>
|
* Released under MIT license <https://lodash.com/license>
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
@@ -12,14 +12,15 @@
|
|||||||
var undefined;
|
var undefined;
|
||||||
|
|
||||||
/** Used as the semantic version number. */
|
/** Used as the semantic version number. */
|
||||||
var VERSION = '4.17.4';
|
var VERSION = '4.17.21';
|
||||||
|
|
||||||
/** Used as the size to enable large array optimizations. */
|
/** Used as the size to enable large array optimizations. */
|
||||||
var LARGE_ARRAY_SIZE = 200;
|
var LARGE_ARRAY_SIZE = 200;
|
||||||
|
|
||||||
/** Error message constants. */
|
/** Error message constants. */
|
||||||
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
|
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
|
||||||
FUNC_ERROR_TEXT = 'Expected a function';
|
FUNC_ERROR_TEXT = 'Expected a function',
|
||||||
|
INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
|
||||||
|
|
||||||
/** Used to stand-in for `undefined` hash values. */
|
/** Used to stand-in for `undefined` hash values. */
|
||||||
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
||||||
@@ -143,7 +144,6 @@
|
|||||||
/** Used to match property names within property paths. */
|
/** Used to match property names within property paths. */
|
||||||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
||||||
reIsPlainProp = /^\w*$/,
|
reIsPlainProp = /^\w*$/,
|
||||||
reLeadingDot = /^\./,
|
|
||||||
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -153,10 +153,11 @@
|
|||||||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
||||||
reHasRegExpChar = RegExp(reRegExpChar.source);
|
reHasRegExpChar = RegExp(reRegExpChar.source);
|
||||||
|
|
||||||
/** Used to match leading and trailing whitespace. */
|
/** Used to match leading whitespace. */
|
||||||
var reTrim = /^\s+|\s+$/g,
|
var reTrimStart = /^\s+/;
|
||||||
reTrimStart = /^\s+/,
|
|
||||||
reTrimEnd = /\s+$/;
|
/** Used to match a single whitespace character. */
|
||||||
|
var reWhitespace = /\s/;
|
||||||
|
|
||||||
/** Used to match wrap detail comments. */
|
/** Used to match wrap detail comments. */
|
||||||
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
|
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
|
||||||
@@ -166,6 +167,18 @@
|
|||||||
/** Used to match words composed of alphanumeric characters. */
|
/** Used to match words composed of alphanumeric characters. */
|
||||||
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to validate the `validate` option in `_.template` variable.
|
||||||
|
*
|
||||||
|
* Forbids characters which could potentially change the meaning of the function argument definition:
|
||||||
|
* - "()," (modification of function parameters)
|
||||||
|
* - "=" (default value)
|
||||||
|
* - "[]{}" (destructuring of function parameters)
|
||||||
|
* - "/" (beginning of a comment)
|
||||||
|
* - whitespace
|
||||||
|
*/
|
||||||
|
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
|
||||||
|
|
||||||
/** Used to match backslashes in property paths. */
|
/** Used to match backslashes in property paths. */
|
||||||
var reEscapeChar = /\\(\\)?/g;
|
var reEscapeChar = /\\(\\)?/g;
|
||||||
|
|
||||||
@@ -243,8 +256,8 @@
|
|||||||
reOptMod = rsModifier + '?',
|
reOptMod = rsModifier + '?',
|
||||||
rsOptVar = '[' + rsVarRange + ']?',
|
rsOptVar = '[' + rsVarRange + ']?',
|
||||||
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
||||||
rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
|
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
||||||
rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
|
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
||||||
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
||||||
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
|
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
|
||||||
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
||||||
@@ -277,7 +290,7 @@
|
|||||||
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
||||||
|
|
||||||
/** Used to detect strings that need a more robust regexp to match words. */
|
/** Used to detect strings that need a more robust regexp to match words. */
|
||||||
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
||||||
|
|
||||||
/** Used to assign default `context` object properties. */
|
/** Used to assign default `context` object properties. */
|
||||||
var contextProps = [
|
var contextProps = [
|
||||||
@@ -437,6 +450,14 @@
|
|||||||
/** Used to access faster Node.js helpers. */
|
/** Used to access faster Node.js helpers. */
|
||||||
var nodeUtil = (function() {
|
var nodeUtil = (function() {
|
||||||
try {
|
try {
|
||||||
|
// Use `util.types` for Node.js 10+.
|
||||||
|
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
||||||
|
|
||||||
|
if (types) {
|
||||||
|
return types;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Legacy `process.binding('util')` for Node.js < 10.
|
||||||
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}());
|
}());
|
||||||
@@ -451,34 +472,6 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds the key-value `pair` to `map`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} map The map to modify.
|
|
||||||
* @param {Array} pair The key-value pair to add.
|
|
||||||
* @returns {Object} Returns `map`.
|
|
||||||
*/
|
|
||||||
function addMapEntry(map, pair) {
|
|
||||||
// Don't return `map.set` because it's not chainable in IE 11.
|
|
||||||
map.set(pair[0], pair[1]);
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds `value` to `set`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} set The set to modify.
|
|
||||||
* @param {*} value The value to add.
|
|
||||||
* @returns {Object} Returns `set`.
|
|
||||||
*/
|
|
||||||
function addSetEntry(set, value) {
|
|
||||||
// Don't return `set.add` because it's not chainable in IE 11.
|
|
||||||
set.add(value);
|
|
||||||
return set;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A faster alternative to `Function#apply`, this function invokes `func`
|
* A faster alternative to `Function#apply`, this function invokes `func`
|
||||||
* with the `this` binding of `thisArg` and the arguments of `args`.
|
* with the `this` binding of `thisArg` and the arguments of `args`.
|
||||||
@@ -1014,6 +1007,19 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.trim`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string to trim.
|
||||||
|
* @returns {string} Returns the trimmed string.
|
||||||
|
*/
|
||||||
|
function baseTrim(string) {
|
||||||
|
return string
|
||||||
|
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
||||||
|
: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.unary` without support for storing metadata.
|
* The base implementation of `_.unary` without support for storing metadata.
|
||||||
*
|
*
|
||||||
@@ -1347,6 +1353,21 @@
|
|||||||
: asciiToArray(string);
|
: asciiToArray(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
||||||
|
* character of `string`.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {string} string The string to inspect.
|
||||||
|
* @returns {number} Returns the index of the last non-whitespace character.
|
||||||
|
*/
|
||||||
|
function trimmedEndIndex(string) {
|
||||||
|
var index = string.length;
|
||||||
|
|
||||||
|
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by `_.unescape` to convert HTML entities to characters.
|
* Used by `_.unescape` to convert HTML entities to characters.
|
||||||
*
|
*
|
||||||
@@ -2279,7 +2300,7 @@
|
|||||||
* @name has
|
* @name has
|
||||||
* @memberOf SetCache
|
* @memberOf SetCache
|
||||||
* @param {*} value The value to search for.
|
* @param {*} value The value to search for.
|
||||||
* @returns {number} Returns `true` if `value` is found, else `false`.
|
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
||||||
*/
|
*/
|
||||||
function setCacheHas(value) {
|
function setCacheHas(value) {
|
||||||
return this.__data__.has(value);
|
return this.__data__.has(value);
|
||||||
@@ -2677,7 +2698,7 @@
|
|||||||
if (!cloneableTags[tag]) {
|
if (!cloneableTags[tag]) {
|
||||||
return object ? value : {};
|
return object ? value : {};
|
||||||
}
|
}
|
||||||
result = initCloneByTag(value, tag, baseClone, isDeep);
|
result = initCloneByTag(value, tag, isDeep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Check for circular references and return its corresponding clone.
|
// Check for circular references and return its corresponding clone.
|
||||||
@@ -2688,6 +2709,16 @@
|
|||||||
}
|
}
|
||||||
stack.set(value, result);
|
stack.set(value, result);
|
||||||
|
|
||||||
|
if (isSet(value)) {
|
||||||
|
value.forEach(function(subValue) {
|
||||||
|
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
||||||
|
});
|
||||||
|
} else if (isMap(value)) {
|
||||||
|
value.forEach(function(subValue, key) {
|
||||||
|
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var keysFunc = isFull
|
var keysFunc = isFull
|
||||||
? (isFlat ? getAllKeysIn : getAllKeys)
|
? (isFlat ? getAllKeysIn : getAllKeys)
|
||||||
: (isFlat ? keysIn : keys);
|
: (isFlat ? keysIn : keys);
|
||||||
@@ -3609,13 +3640,13 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
baseFor(source, function(srcValue, key) {
|
baseFor(source, function(srcValue, key) {
|
||||||
|
stack || (stack = new Stack);
|
||||||
if (isObject(srcValue)) {
|
if (isObject(srcValue)) {
|
||||||
stack || (stack = new Stack);
|
|
||||||
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var newValue = customizer
|
var newValue = customizer
|
||||||
? customizer(object[key], srcValue, (key + ''), object, source, stack)
|
? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
if (newValue === undefined) {
|
if (newValue === undefined) {
|
||||||
@@ -3642,8 +3673,8 @@
|
|||||||
* counterparts.
|
* counterparts.
|
||||||
*/
|
*/
|
||||||
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
||||||
var objValue = object[key],
|
var objValue = safeGet(object, key),
|
||||||
srcValue = source[key],
|
srcValue = safeGet(source, key),
|
||||||
stacked = stack.get(srcValue);
|
stacked = stack.get(srcValue);
|
||||||
|
|
||||||
if (stacked) {
|
if (stacked) {
|
||||||
@@ -3686,7 +3717,7 @@
|
|||||||
if (isArguments(objValue)) {
|
if (isArguments(objValue)) {
|
||||||
newValue = toPlainObject(objValue);
|
newValue = toPlainObject(objValue);
|
||||||
}
|
}
|
||||||
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
|
else if (!isObject(objValue) || isFunction(objValue)) {
|
||||||
newValue = initCloneObject(srcValue);
|
newValue = initCloneObject(srcValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3730,8 +3761,21 @@
|
|||||||
* @returns {Array} Returns the new sorted array.
|
* @returns {Array} Returns the new sorted array.
|
||||||
*/
|
*/
|
||||||
function baseOrderBy(collection, iteratees, orders) {
|
function baseOrderBy(collection, iteratees, orders) {
|
||||||
|
if (iteratees.length) {
|
||||||
|
iteratees = arrayMap(iteratees, function(iteratee) {
|
||||||
|
if (isArray(iteratee)) {
|
||||||
|
return function(value) {
|
||||||
|
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return iteratee;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
iteratees = [identity];
|
||||||
|
}
|
||||||
|
|
||||||
var index = -1;
|
var index = -1;
|
||||||
iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
|
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
||||||
|
|
||||||
var result = baseMap(collection, function(value, key, collection) {
|
var result = baseMap(collection, function(value, key, collection) {
|
||||||
var criteria = arrayMap(iteratees, function(iteratee) {
|
var criteria = arrayMap(iteratees, function(iteratee) {
|
||||||
@@ -3988,6 +4032,10 @@
|
|||||||
var key = toKey(path[index]),
|
var key = toKey(path[index]),
|
||||||
newValue = value;
|
newValue = value;
|
||||||
|
|
||||||
|
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
if (index != lastIndex) {
|
if (index != lastIndex) {
|
||||||
var objValue = nested[key];
|
var objValue = nested[key];
|
||||||
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
||||||
@@ -4140,11 +4188,14 @@
|
|||||||
* into `array`.
|
* into `array`.
|
||||||
*/
|
*/
|
||||||
function baseSortedIndexBy(array, value, iteratee, retHighest) {
|
function baseSortedIndexBy(array, value, iteratee, retHighest) {
|
||||||
value = iteratee(value);
|
|
||||||
|
|
||||||
var low = 0,
|
var low = 0,
|
||||||
high = array == null ? 0 : array.length,
|
high = array == null ? 0 : array.length;
|
||||||
valIsNaN = value !== value,
|
if (high === 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
value = iteratee(value);
|
||||||
|
var valIsNaN = value !== value,
|
||||||
valIsNull = value === null,
|
valIsNull = value === null,
|
||||||
valIsSymbol = isSymbol(value),
|
valIsSymbol = isSymbol(value),
|
||||||
valIsUndefined = value === undefined;
|
valIsUndefined = value === undefined;
|
||||||
@@ -4319,8 +4370,47 @@
|
|||||||
*/
|
*/
|
||||||
function baseUnset(object, path) {
|
function baseUnset(object, path) {
|
||||||
path = castPath(path, object);
|
path = castPath(path, object);
|
||||||
object = parent(object, path);
|
|
||||||
return object == null || delete object[toKey(last(path))];
|
// Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
||||||
|
var index = -1,
|
||||||
|
length = path.length;
|
||||||
|
|
||||||
|
if (!length) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var key = path[index];
|
||||||
|
|
||||||
|
// skip non-string keys (e.g., Symbols, numbers)
|
||||||
|
if (typeof key !== 'string') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always block "__proto__" anywhere in the path if it's not expected
|
||||||
|
if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Block "constructor.prototype" chains
|
||||||
|
if (key === 'constructor' &&
|
||||||
|
(index + 1) < length &&
|
||||||
|
typeof path[index + 1] === 'string' &&
|
||||||
|
path[index + 1] === 'prototype') {
|
||||||
|
|
||||||
|
// Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
|
||||||
|
if (isRootPrimitive && index === 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var obj = parent(object, path);
|
||||||
|
return obj == null || delete obj[toKey(last(path))];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -4551,20 +4641,6 @@
|
|||||||
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a clone of `map`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} map The map to clone.
|
|
||||||
* @param {Function} cloneFunc The function to clone values.
|
|
||||||
* @param {boolean} [isDeep] Specify a deep clone.
|
|
||||||
* @returns {Object} Returns the cloned map.
|
|
||||||
*/
|
|
||||||
function cloneMap(map, isDeep, cloneFunc) {
|
|
||||||
var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
|
|
||||||
return arrayReduce(array, addMapEntry, new map.constructor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a clone of `regexp`.
|
* Creates a clone of `regexp`.
|
||||||
*
|
*
|
||||||
@@ -4578,20 +4654,6 @@
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a clone of `set`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} set The set to clone.
|
|
||||||
* @param {Function} cloneFunc The function to clone values.
|
|
||||||
* @param {boolean} [isDeep] Specify a deep clone.
|
|
||||||
* @returns {Object} Returns the cloned set.
|
|
||||||
*/
|
|
||||||
function cloneSet(set, isDeep, cloneFunc) {
|
|
||||||
var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
|
|
||||||
return arrayReduce(array, addSetEntry, new set.constructor);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a clone of the `symbol` object.
|
* Creates a clone of the `symbol` object.
|
||||||
*
|
*
|
||||||
@@ -5455,7 +5517,7 @@
|
|||||||
return function(number, precision) {
|
return function(number, precision) {
|
||||||
number = toNumber(number);
|
number = toNumber(number);
|
||||||
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
||||||
if (precision) {
|
if (precision && nativeIsFinite(number)) {
|
||||||
// Shift with exponential notation to avoid floating-point issues.
|
// Shift with exponential notation to avoid floating-point issues.
|
||||||
// See [MDN](https://mdn.io/round#Examples) for more details.
|
// See [MDN](https://mdn.io/round#Examples) for more details.
|
||||||
var pair = (toString(number) + 'e').split('e'),
|
var pair = (toString(number) + 'e').split('e'),
|
||||||
@@ -5657,10 +5719,11 @@
|
|||||||
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Assume cyclic values are equal.
|
// Check that cyclic values are equal.
|
||||||
var stacked = stack.get(array);
|
var arrStacked = stack.get(array);
|
||||||
if (stacked && stack.get(other)) {
|
var othStacked = stack.get(other);
|
||||||
return stacked == other;
|
if (arrStacked && othStacked) {
|
||||||
|
return arrStacked == other && othStacked == array;
|
||||||
}
|
}
|
||||||
var index = -1,
|
var index = -1,
|
||||||
result = true,
|
result = true,
|
||||||
@@ -5822,10 +5885,11 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Assume cyclic values are equal.
|
// Check that cyclic values are equal.
|
||||||
var stacked = stack.get(object);
|
var objStacked = stack.get(object);
|
||||||
if (stacked && stack.get(other)) {
|
var othStacked = stack.get(other);
|
||||||
return stacked == other;
|
if (objStacked && othStacked) {
|
||||||
|
return objStacked == other && othStacked == object;
|
||||||
}
|
}
|
||||||
var result = true;
|
var result = true;
|
||||||
stack.set(object, other);
|
stack.set(object, other);
|
||||||
@@ -6186,7 +6250,7 @@
|
|||||||
*/
|
*/
|
||||||
function initCloneArray(array) {
|
function initCloneArray(array) {
|
||||||
var length = array.length,
|
var length = array.length,
|
||||||
result = array.constructor(length);
|
result = new array.constructor(length);
|
||||||
|
|
||||||
// Add properties assigned by `RegExp#exec`.
|
// Add properties assigned by `RegExp#exec`.
|
||||||
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
||||||
@@ -6213,16 +6277,15 @@
|
|||||||
* Initializes an object clone based on its `toStringTag`.
|
* Initializes an object clone based on its `toStringTag`.
|
||||||
*
|
*
|
||||||
* **Note:** This function only supports cloning values with tags of
|
* **Note:** This function only supports cloning values with tags of
|
||||||
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} object The object to clone.
|
* @param {Object} object The object to clone.
|
||||||
* @param {string} tag The `toStringTag` of the object to clone.
|
* @param {string} tag The `toStringTag` of the object to clone.
|
||||||
* @param {Function} cloneFunc The function to clone values.
|
|
||||||
* @param {boolean} [isDeep] Specify a deep clone.
|
* @param {boolean} [isDeep] Specify a deep clone.
|
||||||
* @returns {Object} Returns the initialized clone.
|
* @returns {Object} Returns the initialized clone.
|
||||||
*/
|
*/
|
||||||
function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
function initCloneByTag(object, tag, isDeep) {
|
||||||
var Ctor = object.constructor;
|
var Ctor = object.constructor;
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case arrayBufferTag:
|
case arrayBufferTag:
|
||||||
@@ -6241,7 +6304,7 @@
|
|||||||
return cloneTypedArray(object, isDeep);
|
return cloneTypedArray(object, isDeep);
|
||||||
|
|
||||||
case mapTag:
|
case mapTag:
|
||||||
return cloneMap(object, isDeep, cloneFunc);
|
return new Ctor;
|
||||||
|
|
||||||
case numberTag:
|
case numberTag:
|
||||||
case stringTag:
|
case stringTag:
|
||||||
@@ -6251,7 +6314,7 @@
|
|||||||
return cloneRegExp(object);
|
return cloneRegExp(object);
|
||||||
|
|
||||||
case setTag:
|
case setTag:
|
||||||
return cloneSet(object, isDeep, cloneFunc);
|
return new Ctor;
|
||||||
|
|
||||||
case symbolTag:
|
case symbolTag:
|
||||||
return cloneSymbol(object);
|
return cloneSymbol(object);
|
||||||
@@ -6298,10 +6361,13 @@
|
|||||||
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
||||||
*/
|
*/
|
||||||
function isIndex(value, length) {
|
function isIndex(value, length) {
|
||||||
|
var type = typeof value;
|
||||||
length = length == null ? MAX_SAFE_INTEGER : length;
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
||||||
|
|
||||||
return !!length &&
|
return !!length &&
|
||||||
(typeof value == 'number' || reIsUint.test(value)) &&
|
(type == 'number' ||
|
||||||
(value > -1 && value % 1 == 0 && value < length);
|
(type != 'symbol' && reIsUint.test(value))) &&
|
||||||
|
(value > -1 && value % 1 == 0 && value < length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6635,6 +6701,26 @@
|
|||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value at `key`, unless `key` is "__proto__" or "constructor".
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} object The object to query.
|
||||||
|
* @param {string} key The key of the property to get.
|
||||||
|
* @returns {*} Returns the property value.
|
||||||
|
*/
|
||||||
|
function safeGet(object, key) {
|
||||||
|
if (key === 'constructor' && typeof object[key] === 'function') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (key == '__proto__') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return object[key];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets metadata for `func`.
|
* Sets metadata for `func`.
|
||||||
*
|
*
|
||||||
@@ -6751,11 +6837,11 @@
|
|||||||
*/
|
*/
|
||||||
var stringToPath = memoizeCapped(function(string) {
|
var stringToPath = memoizeCapped(function(string) {
|
||||||
var result = [];
|
var result = [];
|
||||||
if (reLeadingDot.test(string)) {
|
if (string.charCodeAt(0) === 46 /* . */) {
|
||||||
result.push('');
|
result.push('');
|
||||||
}
|
}
|
||||||
string.replace(rePropName, function(match, number, quote, string) {
|
string.replace(rePropName, function(match, number, quote, subString) {
|
||||||
result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
|
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
@@ -6875,7 +6961,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an array with all falsey values removed. The values `false`, `null`,
|
* Creates an array with all falsey values removed. The values `false`, `null`,
|
||||||
* `0`, `""`, `undefined`, and `NaN` are falsey.
|
* `0`, `-0', '0n`, `""`, `undefined`, and `NaN` are falsy.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -9184,6 +9270,10 @@
|
|||||||
* // The `_.property` iteratee shorthand.
|
* // The `_.property` iteratee shorthand.
|
||||||
* _.filter(users, 'active');
|
* _.filter(users, 'active');
|
||||||
* // => objects for ['barney']
|
* // => objects for ['barney']
|
||||||
|
*
|
||||||
|
* // Combining several predicates using `_.overEvery` or `_.overSome`.
|
||||||
|
* _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
|
||||||
|
* // => objects for ['fred', 'barney']
|
||||||
*/
|
*/
|
||||||
function filter(collection, predicate) {
|
function filter(collection, predicate) {
|
||||||
var func = isArray(collection) ? arrayFilter : baseFilter;
|
var func = isArray(collection) ? arrayFilter : baseFilter;
|
||||||
@@ -9933,15 +10023,15 @@
|
|||||||
* var users = [
|
* var users = [
|
||||||
* { 'user': 'fred', 'age': 48 },
|
* { 'user': 'fred', 'age': 48 },
|
||||||
* { 'user': 'barney', 'age': 36 },
|
* { 'user': 'barney', 'age': 36 },
|
||||||
* { 'user': 'fred', 'age': 40 },
|
* { 'user': 'fred', 'age': 30 },
|
||||||
* { 'user': 'barney', 'age': 34 }
|
* { 'user': 'barney', 'age': 34 }
|
||||||
* ];
|
* ];
|
||||||
*
|
*
|
||||||
* _.sortBy(users, [function(o) { return o.user; }]);
|
* _.sortBy(users, [function(o) { return o.user; }]);
|
||||||
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
|
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
|
||||||
*
|
*
|
||||||
* _.sortBy(users, ['user', 'age']);
|
* _.sortBy(users, ['user', 'age']);
|
||||||
* // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
|
* // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
|
||||||
*/
|
*/
|
||||||
var sortBy = baseRest(function(collection, iteratees) {
|
var sortBy = baseRest(function(collection, iteratees) {
|
||||||
if (collection == null) {
|
if (collection == null) {
|
||||||
@@ -10363,9 +10453,11 @@
|
|||||||
function remainingWait(time) {
|
function remainingWait(time) {
|
||||||
var timeSinceLastCall = time - lastCallTime,
|
var timeSinceLastCall = time - lastCallTime,
|
||||||
timeSinceLastInvoke = time - lastInvokeTime,
|
timeSinceLastInvoke = time - lastInvokeTime,
|
||||||
result = wait - timeSinceLastCall;
|
timeWaiting = wait - timeSinceLastCall;
|
||||||
|
|
||||||
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
|
return maxing
|
||||||
|
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
||||||
|
: timeWaiting;
|
||||||
}
|
}
|
||||||
|
|
||||||
function shouldInvoke(time) {
|
function shouldInvoke(time) {
|
||||||
@@ -10426,6 +10518,7 @@
|
|||||||
}
|
}
|
||||||
if (maxing) {
|
if (maxing) {
|
||||||
// Handle invocations in a tight loop.
|
// Handle invocations in a tight loop.
|
||||||
|
clearTimeout(timerId);
|
||||||
timerId = setTimeout(timerExpired, wait);
|
timerId = setTimeout(timerExpired, wait);
|
||||||
return invokeFunc(lastCallTime);
|
return invokeFunc(lastCallTime);
|
||||||
}
|
}
|
||||||
@@ -12482,7 +12575,7 @@
|
|||||||
if (typeof value != 'string') {
|
if (typeof value != 'string') {
|
||||||
return value === 0 ? value : +value;
|
return value === 0 ? value : +value;
|
||||||
}
|
}
|
||||||
value = value.replace(reTrim, '');
|
value = baseTrim(value);
|
||||||
var isBinary = reIsBinary.test(value);
|
var isBinary = reIsBinary.test(value);
|
||||||
return (isBinary || reIsOctal.test(value))
|
return (isBinary || reIsOctal.test(value))
|
||||||
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
||||||
@@ -12797,9 +12890,35 @@
|
|||||||
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
||||||
* // => { 'a': 1, 'b': 2 }
|
* // => { 'a': 1, 'b': 2 }
|
||||||
*/
|
*/
|
||||||
var defaults = baseRest(function(args) {
|
var defaults = baseRest(function(object, sources) {
|
||||||
args.push(undefined, customDefaultsAssignIn);
|
object = Object(object);
|
||||||
return apply(assignInWith, undefined, args);
|
|
||||||
|
var index = -1;
|
||||||
|
var length = sources.length;
|
||||||
|
var guard = length > 2 ? sources[2] : undefined;
|
||||||
|
|
||||||
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||||||
|
length = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (++index < length) {
|
||||||
|
var source = sources[index];
|
||||||
|
var props = keysIn(source);
|
||||||
|
var propsIndex = -1;
|
||||||
|
var propsLength = props.length;
|
||||||
|
|
||||||
|
while (++propsIndex < propsLength) {
|
||||||
|
var key = props[propsIndex];
|
||||||
|
var value = object[key];
|
||||||
|
|
||||||
|
if (value === undefined ||
|
||||||
|
(eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
||||||
|
object[key] = source[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return object;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -13196,6 +13315,11 @@
|
|||||||
* // => { '1': 'c', '2': 'b' }
|
* // => { '1': 'c', '2': 'b' }
|
||||||
*/
|
*/
|
||||||
var invert = createInverter(function(result, value, key) {
|
var invert = createInverter(function(result, value, key) {
|
||||||
|
if (value != null &&
|
||||||
|
typeof value.toString != 'function') {
|
||||||
|
value = nativeObjectToString.call(value);
|
||||||
|
}
|
||||||
|
|
||||||
result[value] = key;
|
result[value] = key;
|
||||||
}, constant(identity));
|
}, constant(identity));
|
||||||
|
|
||||||
@@ -13226,6 +13350,11 @@
|
|||||||
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
|
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
|
||||||
*/
|
*/
|
||||||
var invertBy = createInverter(function(result, value, key) {
|
var invertBy = createInverter(function(result, value, key) {
|
||||||
|
if (value != null &&
|
||||||
|
typeof value.toString != 'function') {
|
||||||
|
value = nativeObjectToString.call(value);
|
||||||
|
}
|
||||||
|
|
||||||
if (hasOwnProperty.call(result, value)) {
|
if (hasOwnProperty.call(result, value)) {
|
||||||
result[value].push(key);
|
result[value].push(key);
|
||||||
} else {
|
} else {
|
||||||
@@ -14776,9 +14905,12 @@
|
|||||||
, 'g');
|
, 'g');
|
||||||
|
|
||||||
// Use a sourceURL for easier debugging.
|
// Use a sourceURL for easier debugging.
|
||||||
|
// The sourceURL gets injected into the source that's eval-ed, so be careful
|
||||||
|
// to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
|
||||||
|
// and escape the comment, thus injecting code that gets evaled.
|
||||||
var sourceURL = '//# sourceURL=' +
|
var sourceURL = '//# sourceURL=' +
|
||||||
('sourceURL' in options
|
(hasOwnProperty.call(options, 'sourceURL')
|
||||||
? options.sourceURL
|
? (options.sourceURL + '').replace(/\s/g, ' ')
|
||||||
: ('lodash.templateSources[' + (++templateCounter) + ']')
|
: ('lodash.templateSources[' + (++templateCounter) + ']')
|
||||||
) + '\n';
|
) + '\n';
|
||||||
|
|
||||||
@@ -14811,10 +14943,16 @@
|
|||||||
|
|
||||||
// If `variable` is not specified wrap a with-statement around the generated
|
// If `variable` is not specified wrap a with-statement around the generated
|
||||||
// code to add the data object to the top of the scope chain.
|
// code to add the data object to the top of the scope chain.
|
||||||
var variable = options.variable;
|
var variable = hasOwnProperty.call(options, 'variable') && options.variable;
|
||||||
if (!variable) {
|
if (!variable) {
|
||||||
source = 'with (obj) {\n' + source + '\n}\n';
|
source = 'with (obj) {\n' + source + '\n}\n';
|
||||||
}
|
}
|
||||||
|
// Throw an error if a forbidden character was found in `variable`, to prevent
|
||||||
|
// potential command injection attacks.
|
||||||
|
else if (reForbiddenIdentifierChars.test(variable)) {
|
||||||
|
throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
|
||||||
|
}
|
||||||
|
|
||||||
// Cleanup code by stripping empty strings.
|
// Cleanup code by stripping empty strings.
|
||||||
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
|
||||||
.replace(reEmptyStringMiddle, '$1')
|
.replace(reEmptyStringMiddle, '$1')
|
||||||
@@ -14928,7 +15066,7 @@
|
|||||||
function trim(string, chars, guard) {
|
function trim(string, chars, guard) {
|
||||||
string = toString(string);
|
string = toString(string);
|
||||||
if (string && (guard || chars === undefined)) {
|
if (string && (guard || chars === undefined)) {
|
||||||
return string.replace(reTrim, '');
|
return baseTrim(string);
|
||||||
}
|
}
|
||||||
if (!string || !(chars = baseToString(chars))) {
|
if (!string || !(chars = baseToString(chars))) {
|
||||||
return string;
|
return string;
|
||||||
@@ -14963,7 +15101,7 @@
|
|||||||
function trimEnd(string, chars, guard) {
|
function trimEnd(string, chars, guard) {
|
||||||
string = toString(string);
|
string = toString(string);
|
||||||
if (string && (guard || chars === undefined)) {
|
if (string && (guard || chars === undefined)) {
|
||||||
return string.replace(reTrimEnd, '');
|
return string.slice(0, trimmedEndIndex(string) + 1);
|
||||||
}
|
}
|
||||||
if (!string || !(chars = baseToString(chars))) {
|
if (!string || !(chars = baseToString(chars))) {
|
||||||
return string;
|
return string;
|
||||||
@@ -15517,6 +15655,9 @@
|
|||||||
* values against any array or object value, respectively. See `_.isEqual`
|
* values against any array or object value, respectively. See `_.isEqual`
|
||||||
* for a list of supported value comparisons.
|
* for a list of supported value comparisons.
|
||||||
*
|
*
|
||||||
|
* **Note:** Multiple values can be checked by combining several matchers
|
||||||
|
* using `_.overSome`
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
@@ -15532,6 +15673,10 @@
|
|||||||
*
|
*
|
||||||
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
|
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
|
||||||
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
|
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
|
||||||
|
*
|
||||||
|
* // Checking for several possible values
|
||||||
|
* _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
|
||||||
|
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
|
||||||
*/
|
*/
|
||||||
function matches(source) {
|
function matches(source) {
|
||||||
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
||||||
@@ -15546,6 +15691,9 @@
|
|||||||
* `srcValue` values against any array or object value, respectively. See
|
* `srcValue` values against any array or object value, respectively. See
|
||||||
* `_.isEqual` for a list of supported value comparisons.
|
* `_.isEqual` for a list of supported value comparisons.
|
||||||
*
|
*
|
||||||
|
* **Note:** Multiple values can be checked by combining several matchers
|
||||||
|
* using `_.overSome`
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
@@ -15562,6 +15710,10 @@
|
|||||||
*
|
*
|
||||||
* _.find(objects, _.matchesProperty('a', 4));
|
* _.find(objects, _.matchesProperty('a', 4));
|
||||||
* // => { 'a': 4, 'b': 5, 'c': 6 }
|
* // => { 'a': 4, 'b': 5, 'c': 6 }
|
||||||
|
*
|
||||||
|
* // Checking for several possible values
|
||||||
|
* _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
|
||||||
|
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
|
||||||
*/
|
*/
|
||||||
function matchesProperty(path, srcValue) {
|
function matchesProperty(path, srcValue) {
|
||||||
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
|
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
|
||||||
@@ -15785,6 +15937,10 @@
|
|||||||
* Creates a function that checks if **all** of the `predicates` return
|
* Creates a function that checks if **all** of the `predicates` return
|
||||||
* truthy when invoked with the arguments it receives.
|
* truthy when invoked with the arguments it receives.
|
||||||
*
|
*
|
||||||
|
* Following shorthands are possible for providing predicates.
|
||||||
|
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
|
||||||
|
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 4.0.0
|
* @since 4.0.0
|
||||||
@@ -15811,6 +15967,10 @@
|
|||||||
* Creates a function that checks if **any** of the `predicates` return
|
* Creates a function that checks if **any** of the `predicates` return
|
||||||
* truthy when invoked with the arguments it receives.
|
* truthy when invoked with the arguments it receives.
|
||||||
*
|
*
|
||||||
|
* Following shorthands are possible for providing predicates.
|
||||||
|
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
|
||||||
|
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @since 4.0.0
|
* @since 4.0.0
|
||||||
@@ -15830,6 +15990,9 @@
|
|||||||
*
|
*
|
||||||
* func(NaN);
|
* func(NaN);
|
||||||
* // => false
|
* // => false
|
||||||
|
*
|
||||||
|
* var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
|
||||||
|
* var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
|
||||||
*/
|
*/
|
||||||
var overSome = createOver(arraySome);
|
var overSome = createOver(arraySome);
|
||||||
|
|
||||||
@@ -17016,10 +17179,11 @@
|
|||||||
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
||||||
var lodashFunc = lodash[methodName];
|
var lodashFunc = lodash[methodName];
|
||||||
if (lodashFunc) {
|
if (lodashFunc) {
|
||||||
var key = (lodashFunc.name + ''),
|
var key = lodashFunc.name + '';
|
||||||
names = realNames[key] || (realNames[key] = []);
|
if (!hasOwnProperty.call(realNames, key)) {
|
||||||
|
realNames[key] = [];
|
||||||
names.push({ 'name': methodName, 'func': lodashFunc });
|
}
|
||||||
|
realNames[key].push({ 'name': methodName, 'func': lodashFunc });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
5845
package-lock.json
generated
Normal file
5845
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
23
package.json
23
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "lodash",
|
"name": "lodash",
|
||||||
"version": "4.17.4",
|
"version": "4.17.21",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "lodash.js",
|
"main": "lodash.js",
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
"validate": "npm run style && npm run test"
|
"validate": "npm run style && npm run test"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"async": "^2.1.4",
|
"async": "^2.6.3",
|
||||||
"benchmark": "^2.1.3",
|
"benchmark": "^2.1.3",
|
||||||
"chalk": "^1.1.3",
|
"chalk": "^1.1.3",
|
||||||
"cheerio": "^0.22.0",
|
"cheerio": "^0.22.0",
|
||||||
@@ -38,29 +38,24 @@
|
|||||||
"coveralls": "^2.11.15",
|
"coveralls": "^2.11.15",
|
||||||
"curl-amd": "~0.8.12",
|
"curl-amd": "~0.8.12",
|
||||||
"docdown": "~0.7.2",
|
"docdown": "~0.7.2",
|
||||||
"dojo": "^1.12.1",
|
"dojo": "^1.15.0",
|
||||||
"ecstatic": "^2.1.0",
|
"ecstatic": "^2.2.2",
|
||||||
"fs-extra": "~1.0.0",
|
"fs-extra": "~1.0.0",
|
||||||
"glob": "^7.1.1",
|
"glob": "^7.1.4",
|
||||||
"istanbul": "0.4.5",
|
"istanbul": "0.4.5",
|
||||||
"jquery": "^3.1.1",
|
"jquery": "^3.4.1",
|
||||||
"jscs": "^3.0.7",
|
"jscs": "^3.0.7",
|
||||||
"lodash": "4.17.3",
|
"lodash": "4.17.20",
|
||||||
"lodash-doc-globals": "^0.1.1",
|
"lodash-doc-globals": "^0.1.1",
|
||||||
"markdown-doctest": "^0.9.1",
|
"markdown-doctest": "^0.9.1",
|
||||||
"optional-dev-dependency": "^2.0.0",
|
"optional-dev-dependency": "^2.0.0",
|
||||||
"platform": "^1.3.3",
|
"platform": "^1.3.3",
|
||||||
"qunit-extras": "^3.0.0",
|
"qunit-extras": "^3.0.0",
|
||||||
"qunitjs": "^2.1.0",
|
"qunitjs": "^2.1.0",
|
||||||
"request": "^2.79.0",
|
"request": "^2.88.0",
|
||||||
"requirejs": "^2.3.2",
|
"requirejs": "^2.3.6",
|
||||||
"sauce-tunnel": "^2.5.0",
|
"sauce-tunnel": "^2.5.0",
|
||||||
"uglify-js": "2.7.5",
|
"uglify-js": "2.7.5",
|
||||||
"webpack": "^1.14.0"
|
"webpack": "^1.14.0"
|
||||||
},
|
|
||||||
"greenkeeper": {
|
|
||||||
"ignore": [
|
|
||||||
"lodash"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
28
playwright.config.js
Normal file
28
playwright.config.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
const { devices } = require('@playwright/test');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
retries: 0,
|
||||||
|
testDir: './test',
|
||||||
|
testMatch: '**/*.spec.js',
|
||||||
|
use: {
|
||||||
|
baseURL: 'http://localhost:9001',
|
||||||
|
headless: true,
|
||||||
|
},
|
||||||
|
projects: [
|
||||||
|
{ name: 'Chromium', use: { browserName: 'chromium' } },
|
||||||
|
{ name: 'Firefox', use: { browserName: 'firefox' } },
|
||||||
|
{ name: 'WebKit', use: { browserName: 'webkit' } },
|
||||||
|
{
|
||||||
|
name: 'Microsoft Edge',
|
||||||
|
use: { browserName: 'chromium', channel: 'msedge' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Mobile Safari',
|
||||||
|
use: { ...devices['iPhone 12'], browserName: 'webkit' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Mobile Chrome',
|
||||||
|
use: { ...devices['Pixel 5'], browserName: 'chromium' },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
17
renovate.json
Normal file
17
renovate.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:base"
|
||||||
|
],
|
||||||
|
"enabledManagers": ["npm", "github-actions"],
|
||||||
|
"packageRules": [
|
||||||
|
{
|
||||||
|
"matchManagers": ["npm"],
|
||||||
|
"matchUpdateTypes": ["major"],
|
||||||
|
"enabled": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"prHourlyLimit": 0,
|
||||||
|
"prConcurrentLimit": 10,
|
||||||
|
"minimumReleaseAge": "14d"
|
||||||
|
}
|
||||||
23
test/playwright-runner.spec.js
Normal file
23
test/playwright-runner.spec.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
const { test, expect } = require('@playwright/test');
|
||||||
|
|
||||||
|
test.describe.configure({ mode: 'parallel' });
|
||||||
|
|
||||||
|
test('index', async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:9001/test/index.html');
|
||||||
|
await expect(page.locator('text=0 failed')).toBeVisible({ timeout: 60000 });
|
||||||
|
});
|
||||||
|
|
||||||
|
test('fp', async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:9001/test/fp.html');
|
||||||
|
await expect(page.locator('text=0 failed')).toBeVisible({ timeout: 60000 });
|
||||||
|
});
|
||||||
|
|
||||||
|
test('backbone', async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:9001/test/backbone.html');
|
||||||
|
await expect(page.locator('text=0 failed')).toBeVisible({ timeout: 60000 });
|
||||||
|
});
|
||||||
|
|
||||||
|
test('underscore', async ({ page }) => {
|
||||||
|
await page.goto('http://localhost:9001/test/underscore.html');
|
||||||
|
await expect(page.locator('text=0 failed')).toBeVisible({ timeout: 60000 });
|
||||||
|
});
|
||||||
@@ -1,908 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
/** Environment shortcut. */
|
|
||||||
var env = process.env;
|
|
||||||
|
|
||||||
/** Load Node.js modules. */
|
|
||||||
var EventEmitter = require('events').EventEmitter,
|
|
||||||
http = require('http'),
|
|
||||||
path = require('path'),
|
|
||||||
url = require('url'),
|
|
||||||
util = require('util');
|
|
||||||
|
|
||||||
/** Load other modules. */
|
|
||||||
var _ = require('../lodash.js'),
|
|
||||||
chalk = require('chalk'),
|
|
||||||
ecstatic = require('ecstatic'),
|
|
||||||
request = require('request'),
|
|
||||||
SauceTunnel = require('sauce-tunnel');
|
|
||||||
|
|
||||||
/** Used for Sauce Labs credentials. */
|
|
||||||
var accessKey = env.SAUCE_ACCESS_KEY,
|
|
||||||
username = env.SAUCE_USERNAME;
|
|
||||||
|
|
||||||
/** Used as the default maximum number of times to retry a job and tunnel. */
|
|
||||||
var maxJobRetries = 3,
|
|
||||||
maxTunnelRetries = 3;
|
|
||||||
|
|
||||||
/** Used as the static file server middleware. */
|
|
||||||
var mount = ecstatic({
|
|
||||||
'cache': 'no-cache',
|
|
||||||
'root': process.cwd()
|
|
||||||
});
|
|
||||||
|
|
||||||
/** Used as the list of ports supported by Sauce Connect. */
|
|
||||||
var ports = [
|
|
||||||
80, 443, 888, 2000, 2001, 2020, 2109, 2222, 2310, 3000, 3001, 3030, 3210,
|
|
||||||
3333, 4000, 4001, 4040, 4321, 4502, 4503, 4567, 5000, 5001, 5050, 5555, 5432,
|
|
||||||
6000, 6001, 6060, 6666, 6543, 7000, 7070, 7774, 7777, 8000, 8001, 8003, 8031,
|
|
||||||
8080, 8081, 8765, 8777, 8888, 9000, 9001, 9080, 9090, 9876, 9877, 9999, 49221,
|
|
||||||
55001
|
|
||||||
];
|
|
||||||
|
|
||||||
/** Used by `logInline` to clear previously logged messages. */
|
|
||||||
var prevLine = '';
|
|
||||||
|
|
||||||
/** Method shortcut. */
|
|
||||||
var push = Array.prototype.push;
|
|
||||||
|
|
||||||
/** Used to detect error messages. */
|
|
||||||
var reError = /(?:\be|E)rror\b/;
|
|
||||||
|
|
||||||
/** Used to detect valid job ids. */
|
|
||||||
var reJobId = /^[a-z0-9]{32}$/;
|
|
||||||
|
|
||||||
/** Used to display the wait throbber. */
|
|
||||||
var throbberDelay = 500,
|
|
||||||
waitCount = -1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Used as Sauce Labs config values.
|
|
||||||
* See the [Sauce Labs documentation](https://docs.saucelabs.com/reference/test-configuration/)
|
|
||||||
* for more details.
|
|
||||||
*/
|
|
||||||
var advisor = getOption('advisor', false),
|
|
||||||
build = getOption('build', (env.TRAVIS_COMMIT || '').slice(0, 10)),
|
|
||||||
commandTimeout = getOption('commandTimeout', 90),
|
|
||||||
compatMode = getOption('compatMode', null),
|
|
||||||
customData = Function('return {' + getOption('customData', '').replace(/^\{|}$/g, '') + '}')(),
|
|
||||||
deviceOrientation = getOption('deviceOrientation', 'portrait'),
|
|
||||||
framework = getOption('framework', 'qunit'),
|
|
||||||
idleTimeout = getOption('idleTimeout', 60),
|
|
||||||
jobName = getOption('name', 'unit tests'),
|
|
||||||
maxDuration = getOption('maxDuration', 180),
|
|
||||||
port = ports[Math.min(_.sortedIndex(ports, getOption('port', 9001)), ports.length - 1)],
|
|
||||||
publicAccess = getOption('public', true),
|
|
||||||
queueTimeout = getOption('queueTimeout', 240),
|
|
||||||
recordVideo = getOption('recordVideo', true),
|
|
||||||
recordScreenshots = getOption('recordScreenshots', false),
|
|
||||||
runner = getOption('runner', 'test/index.html').replace(/^\W+/, ''),
|
|
||||||
runnerUrl = getOption('runnerUrl', 'http://localhost:' + port + '/' + runner),
|
|
||||||
statusInterval = getOption('statusInterval', 5),
|
|
||||||
tags = getOption('tags', []),
|
|
||||||
throttled = getOption('throttled', 10),
|
|
||||||
tunneled = getOption('tunneled', true),
|
|
||||||
tunnelId = getOption('tunnelId', 'tunnel_' + (env.TRAVIS_JOB_ID || 0)),
|
|
||||||
tunnelTimeout = getOption('tunnelTimeout', 120),
|
|
||||||
videoUploadOnPass = getOption('videoUploadOnPass', false);
|
|
||||||
|
|
||||||
/** Used to convert Sauce Labs browser identifiers to their formal names. */
|
|
||||||
var browserNameMap = {
|
|
||||||
'googlechrome': 'Chrome',
|
|
||||||
'iehta': 'Internet Explorer',
|
|
||||||
'ipad': 'iPad',
|
|
||||||
'iphone': 'iPhone',
|
|
||||||
'microsoftedge': 'Edge'
|
|
||||||
};
|
|
||||||
|
|
||||||
/** List of platforms to load the runner on. */
|
|
||||||
var platforms = [
|
|
||||||
['Linux', 'android', '5.1'],
|
|
||||||
['Windows 10', 'chrome', '54'],
|
|
||||||
['Windows 10', 'chrome', '53'],
|
|
||||||
['Windows 10', 'firefox', '50'],
|
|
||||||
['Windows 10', 'firefox', '49'],
|
|
||||||
['Windows 10', 'microsoftedge', '14'],
|
|
||||||
['Windows 10', 'internet explorer', '11'],
|
|
||||||
['Windows 8', 'internet explorer', '10'],
|
|
||||||
['Windows 7', 'internet explorer', '9'],
|
|
||||||
['macOS 10.12', 'safari', '10'],
|
|
||||||
['OS X 10.11', 'safari', '9']
|
|
||||||
];
|
|
||||||
|
|
||||||
/** Used to tailor the `platforms` array. */
|
|
||||||
var isAMD = _.includes(tags, 'amd'),
|
|
||||||
isBackbone = _.includes(tags, 'backbone'),
|
|
||||||
isModern = _.includes(tags, 'modern');
|
|
||||||
|
|
||||||
// The platforms to test IE compatibility modes.
|
|
||||||
if (compatMode) {
|
|
||||||
platforms = [
|
|
||||||
['Windows 10', 'internet explorer', '11'],
|
|
||||||
['Windows 8', 'internet explorer', '10'],
|
|
||||||
['Windows 7', 'internet explorer', '9'],
|
|
||||||
['Windows 7', 'internet explorer', '8']
|
|
||||||
];
|
|
||||||
}
|
|
||||||
// The platforms for AMD tests.
|
|
||||||
if (isAMD) {
|
|
||||||
platforms = _.filter(platforms, function(platform) {
|
|
||||||
var browser = browserName(platform[1]),
|
|
||||||
version = +platform[2];
|
|
||||||
|
|
||||||
switch (browser) {
|
|
||||||
case 'Android': return version >= 4.4;
|
|
||||||
case 'Opera': return version >= 10;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// The platforms for Backbone tests.
|
|
||||||
if (isBackbone) {
|
|
||||||
platforms = _.filter(platforms, function(platform) {
|
|
||||||
var browser = browserName(platform[1]),
|
|
||||||
version = +platform[2];
|
|
||||||
|
|
||||||
switch (browser) {
|
|
||||||
case 'Firefox': return version >= 4;
|
|
||||||
case 'Internet Explorer': return version >= 7;
|
|
||||||
case 'iPad': return version >= 5;
|
|
||||||
case 'Opera': return version >= 12;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// The platforms for modern builds.
|
|
||||||
if (isModern) {
|
|
||||||
platforms = _.filter(platforms, function(platform) {
|
|
||||||
var browser = browserName(platform[1]),
|
|
||||||
version = +platform[2];
|
|
||||||
|
|
||||||
switch (browser) {
|
|
||||||
case 'Android': return version >= 4.1;
|
|
||||||
case 'Firefox': return version >= 10;
|
|
||||||
case 'Internet Explorer': return version >= 9;
|
|
||||||
case 'iPad': return version >= 6;
|
|
||||||
case 'Opera': return version >= 12;
|
|
||||||
case 'Safari': return version >= 6;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Used as the default `Job` options object. */
|
|
||||||
var jobOptions = {
|
|
||||||
'build': build,
|
|
||||||
'command-timeout': commandTimeout,
|
|
||||||
'custom-data': customData,
|
|
||||||
'device-orientation': deviceOrientation,
|
|
||||||
'framework': framework,
|
|
||||||
'idle-timeout': idleTimeout,
|
|
||||||
'max-duration': maxDuration,
|
|
||||||
'name': jobName,
|
|
||||||
'public': publicAccess,
|
|
||||||
'platforms': platforms,
|
|
||||||
'record-screenshots': recordScreenshots,
|
|
||||||
'record-video': recordVideo,
|
|
||||||
'sauce-advisor': advisor,
|
|
||||||
'tags': tags,
|
|
||||||
'url': runnerUrl,
|
|
||||||
'video-upload-on-pass': videoUploadOnPass
|
|
||||||
};
|
|
||||||
|
|
||||||
if (publicAccess === true) {
|
|
||||||
jobOptions['public'] = 'public';
|
|
||||||
}
|
|
||||||
if (tunneled) {
|
|
||||||
jobOptions['tunnel-identifier'] = tunnelId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resolves the formal browser name for a given Sauce Labs browser identifier.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {string} identifier The browser identifier.
|
|
||||||
* @returns {string} Returns the formal browser name.
|
|
||||||
*/
|
|
||||||
function browserName(identifier) {
|
|
||||||
return browserNameMap[identifier] || _.startCase(identifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value for the given option name. If no value is available the
|
|
||||||
* `defaultValue` is returned.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {string} name The name of the option.
|
|
||||||
* @param {*} defaultValue The default option value.
|
|
||||||
* @returns {*} Returns the option value.
|
|
||||||
*/
|
|
||||||
function getOption(name, defaultValue) {
|
|
||||||
var isArr = _.isArray(defaultValue);
|
|
||||||
return _.reduce(process.argv, function(result, value) {
|
|
||||||
if (isArr) {
|
|
||||||
value = optionToArray(name, value);
|
|
||||||
return _.isEmpty(value) ? result : value;
|
|
||||||
}
|
|
||||||
value = optionToValue(name, value);
|
|
||||||
|
|
||||||
return value == null ? result : value;
|
|
||||||
}, defaultValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if `value` is a job ID.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {*} value The value to check.
|
|
||||||
* @returns {boolean} Returns `true` if `value` is a job ID, else `false`.
|
|
||||||
*/
|
|
||||||
function isJobId(value) {
|
|
||||||
return reJobId.test(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes an inline message to standard output.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {string} [text=''] The text to log.
|
|
||||||
*/
|
|
||||||
function logInline(text) {
|
|
||||||
var blankLine = _.repeat(' ', _.size(prevLine));
|
|
||||||
prevLine = text = _.truncate(text, { 'length': 40 });
|
|
||||||
process.stdout.write(text + blankLine.slice(text.length) + '\r');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes the wait throbber to standard output.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
function logThrobber() {
|
|
||||||
logInline('Please wait' + _.repeat('.', (++waitCount % 3) + 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts a comma separated option value into an array.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {string} name The name of the option to inspect.
|
|
||||||
* @param {string} string The options string.
|
|
||||||
* @returns {Array} Returns the new converted array.
|
|
||||||
*/
|
|
||||||
function optionToArray(name, string) {
|
|
||||||
return _.compact(_.invokeMap((optionToValue(name, string) || '').split(/, */), 'trim'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Extracts the option value from an option string.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {string} name The name of the option to inspect.
|
|
||||||
* @param {string} string The options string.
|
|
||||||
* @returns {string|undefined} Returns the option value, else `undefined`.
|
|
||||||
*/
|
|
||||||
function optionToValue(name, string) {
|
|
||||||
var result = string.match(RegExp('^' + name + '(?:=([\\s\\S]+))?$'));
|
|
||||||
if (result) {
|
|
||||||
result = _.get(result, 1);
|
|
||||||
result = result ? _.trim(result) : true;
|
|
||||||
}
|
|
||||||
if (result === 'false') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return result || undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `Job#remove` and `Tunnel#stop` callback used by `Jobs#restart`
|
|
||||||
* and `Tunnel#restart` respectively.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
function onGenericRestart() {
|
|
||||||
this.restarting = false;
|
|
||||||
this.emit('restart');
|
|
||||||
this.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `request.put` and `SauceTunnel#stop` callback used by `Jobs#stop`
|
|
||||||
* and `Tunnel#stop` respectively.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} [error] The error object.
|
|
||||||
*/
|
|
||||||
function onGenericStop(error) {
|
|
||||||
this.running = this.stopping = false;
|
|
||||||
this.emit('stop', error);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `request.del` callback used by `Jobs#remove`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
function onJobRemove(error, res, body) {
|
|
||||||
this.id = this.taskId = this.url = null;
|
|
||||||
this.removing = false;
|
|
||||||
this.emit('remove');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `Job#remove` callback used by `Jobs#reset`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
function onJobReset() {
|
|
||||||
this.attempts = 0;
|
|
||||||
this.failed = this.resetting = false;
|
|
||||||
this._pollerId = this.id = this.result = this.taskId = this.url = null;
|
|
||||||
this.emit('reset');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `request.post` callback used by `Jobs#start`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} [error] The error object.
|
|
||||||
* @param {Object} res The response data object.
|
|
||||||
* @param {Object} body The response body JSON object.
|
|
||||||
*/
|
|
||||||
function onJobStart(error, res, body) {
|
|
||||||
this.starting = false;
|
|
||||||
|
|
||||||
if (this.stopping) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var statusCode = _.get(res, 'statusCode'),
|
|
||||||
taskId = _.first(_.get(body, 'js tests'));
|
|
||||||
|
|
||||||
if (error || !taskId || statusCode != 200) {
|
|
||||||
if (this.attempts < this.retries) {
|
|
||||||
this.restart();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var na = 'unavailable',
|
|
||||||
bodyStr = _.isObject(body) ? '\n' + JSON.stringify(body) : na,
|
|
||||||
statusStr = _.isFinite(statusCode) ? statusCode : na;
|
|
||||||
|
|
||||||
logInline();
|
|
||||||
console.error('Failed to start job; status: %s, body: %s', statusStr, bodyStr);
|
|
||||||
if (error) {
|
|
||||||
console.error(error);
|
|
||||||
}
|
|
||||||
this.failed = true;
|
|
||||||
this.emit('complete');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.running = true;
|
|
||||||
this.taskId = taskId;
|
|
||||||
this.timestamp = _.now();
|
|
||||||
this.emit('start');
|
|
||||||
this.status();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `request.post` callback used by `Job#status`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} [error] The error object.
|
|
||||||
* @param {Object} res The response data object.
|
|
||||||
* @param {Object} body The response body JSON object.
|
|
||||||
*/
|
|
||||||
function onJobStatus(error, res, body) {
|
|
||||||
this.checking = false;
|
|
||||||
|
|
||||||
if (!this.running || this.stopping) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var completed = _.get(body, 'completed', false),
|
|
||||||
data = _.first(_.get(body, 'js tests')),
|
|
||||||
elapsed = (_.now() - this.timestamp) / 1000,
|
|
||||||
jobId = _.get(data, 'job_id', null),
|
|
||||||
jobResult = _.get(data, 'result', null),
|
|
||||||
jobStatus = _.get(data, 'status', ''),
|
|
||||||
jobUrl = _.get(data, 'url', null),
|
|
||||||
expired = (elapsed >= queueTimeout && !_.includes(jobStatus, 'in progress')),
|
|
||||||
options = this.options,
|
|
||||||
platform = options.platforms[0];
|
|
||||||
|
|
||||||
if (_.isObject(jobResult)) {
|
|
||||||
var message = _.get(jobResult, 'message');
|
|
||||||
} else {
|
|
||||||
if (typeof jobResult == 'string') {
|
|
||||||
message = jobResult;
|
|
||||||
}
|
|
||||||
jobResult = null;
|
|
||||||
}
|
|
||||||
if (isJobId(jobId)) {
|
|
||||||
this.id = jobId;
|
|
||||||
this.result = jobResult;
|
|
||||||
this.url = jobUrl;
|
|
||||||
} else {
|
|
||||||
completed = false;
|
|
||||||
}
|
|
||||||
this.emit('status', jobStatus);
|
|
||||||
|
|
||||||
if (!completed && !expired) {
|
|
||||||
this._pollerId = _.delay(_.bind(this.status, this), this.statusInterval * 1000);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + _.startCase(platform[0]),
|
|
||||||
errored = !jobResult || !jobResult.passed || reError.test(message) || reError.test(jobStatus),
|
|
||||||
failures = _.get(jobResult, 'failed'),
|
|
||||||
label = options.name + ':',
|
|
||||||
tunnel = this.tunnel;
|
|
||||||
|
|
||||||
if (errored || failures) {
|
|
||||||
if (errored && this.attempts < this.retries) {
|
|
||||||
this.restart();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var details = 'See ' + jobUrl + ' for details.';
|
|
||||||
this.failed = true;
|
|
||||||
|
|
||||||
logInline();
|
|
||||||
if (failures) {
|
|
||||||
console.error(label + ' %s ' + chalk.red('failed') + ' %d test' + (failures > 1 ? 's' : '') + '. %s', description, failures, details);
|
|
||||||
}
|
|
||||||
else if (tunnel.attempts < tunnel.retries) {
|
|
||||||
tunnel.restart();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (message === undefined) {
|
|
||||||
message = 'Results are unavailable. ' + details;
|
|
||||||
}
|
|
||||||
console.error(label, description, chalk.red('failed') + ';', message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
logInline();
|
|
||||||
console.log(label, description, chalk.green('passed'));
|
|
||||||
}
|
|
||||||
this.running = false;
|
|
||||||
this.emit('complete');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `SauceTunnel#start` callback used by `Tunnel#start`.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {boolean} success The connection success indicator.
|
|
||||||
*/
|
|
||||||
function onTunnelStart(success) {
|
|
||||||
this.starting = false;
|
|
||||||
|
|
||||||
if (this._timeoutId) {
|
|
||||||
clearTimeout(this._timeoutId);
|
|
||||||
this._timeoutId = null;
|
|
||||||
}
|
|
||||||
if (!success) {
|
|
||||||
if (this.attempts < this.retries) {
|
|
||||||
this.restart();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
logInline();
|
|
||||||
console.error('Failed to open Sauce Connect tunnel');
|
|
||||||
process.exit(2);
|
|
||||||
}
|
|
||||||
logInline();
|
|
||||||
console.log('Sauce Connect tunnel opened');
|
|
||||||
|
|
||||||
var jobs = this.jobs;
|
|
||||||
push.apply(jobs.queue, jobs.all);
|
|
||||||
|
|
||||||
this.running = true;
|
|
||||||
this.emit('start');
|
|
||||||
|
|
||||||
console.log('Starting jobs...');
|
|
||||||
this.dequeue();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Job constructor.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} [properties] The properties to initialize a job with.
|
|
||||||
*/
|
|
||||||
function Job(properties) {
|
|
||||||
EventEmitter.call(this);
|
|
||||||
|
|
||||||
this.options = {};
|
|
||||||
_.merge(this, properties);
|
|
||||||
_.defaults(this.options, _.cloneDeep(jobOptions));
|
|
||||||
|
|
||||||
this.attempts = 0;
|
|
||||||
this.checking = this.failed = this.removing = this.resetting = this.restarting = this.running = this.starting = this.stopping = false;
|
|
||||||
this._pollerId = this.id = this.result = this.taskId = this.url = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
util.inherits(Job, EventEmitter);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Removes the job.
|
|
||||||
*
|
|
||||||
* @memberOf Job
|
|
||||||
* @param {Function} callback The function called once the job is removed.
|
|
||||||
* @param {Object} Returns the job instance.
|
|
||||||
*/
|
|
||||||
Job.prototype.remove = function(callback) {
|
|
||||||
this.once('remove', _.iteratee(callback));
|
|
||||||
if (this.removing) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
this.removing = true;
|
|
||||||
return this.stop(function() {
|
|
||||||
var onRemove = _.bind(onJobRemove, this);
|
|
||||||
if (!this.id) {
|
|
||||||
_.defer(onRemove);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
request.del(_.template('https://saucelabs.com/rest/v1/${user}/jobs/${id}')(this), {
|
|
||||||
'auth': { 'user': this.user, 'pass': this.pass }
|
|
||||||
}, onRemove);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resets the job.
|
|
||||||
*
|
|
||||||
* @memberOf Job
|
|
||||||
* @param {Function} callback The function called once the job is reset.
|
|
||||||
* @param {Object} Returns the job instance.
|
|
||||||
*/
|
|
||||||
Job.prototype.reset = function(callback) {
|
|
||||||
this.once('reset', _.iteratee(callback));
|
|
||||||
if (this.resetting) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
this.resetting = true;
|
|
||||||
return this.remove(onJobReset);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Restarts the job.
|
|
||||||
*
|
|
||||||
* @memberOf Job
|
|
||||||
* @param {Function} callback The function called once the job is restarted.
|
|
||||||
* @param {Object} Returns the job instance.
|
|
||||||
*/
|
|
||||||
Job.prototype.restart = function(callback) {
|
|
||||||
this.once('restart', _.iteratee(callback));
|
|
||||||
if (this.restarting) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
this.restarting = true;
|
|
||||||
|
|
||||||
var options = this.options,
|
|
||||||
platform = options.platforms[0],
|
|
||||||
description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + _.startCase(platform[0]),
|
|
||||||
label = options.name + ':';
|
|
||||||
|
|
||||||
logInline();
|
|
||||||
console.log('%s %s restart %d of %d', label, description, ++this.attempts, this.retries);
|
|
||||||
|
|
||||||
return this.remove(onGenericRestart);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts the job.
|
|
||||||
*
|
|
||||||
* @memberOf Job
|
|
||||||
* @param {Function} callback The function called once the job is started.
|
|
||||||
* @param {Object} Returns the job instance.
|
|
||||||
*/
|
|
||||||
Job.prototype.start = function(callback) {
|
|
||||||
this.once('start', _.iteratee(callback));
|
|
||||||
if (this.starting || this.running) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
this.starting = true;
|
|
||||||
request.post(_.template('https://saucelabs.com/rest/v1/${user}/js-tests')(this), {
|
|
||||||
'auth': { 'user': this.user, 'pass': this.pass },
|
|
||||||
'json': this.options
|
|
||||||
}, _.bind(onJobStart, this));
|
|
||||||
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks the status of a job.
|
|
||||||
*
|
|
||||||
* @memberOf Job
|
|
||||||
* @param {Function} callback The function called once the status is resolved.
|
|
||||||
* @param {Object} Returns the job instance.
|
|
||||||
*/
|
|
||||||
Job.prototype.status = function(callback) {
|
|
||||||
this.once('status', _.iteratee(callback));
|
|
||||||
if (this.checking || this.removing || this.resetting || this.restarting || this.starting || this.stopping) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
this._pollerId = null;
|
|
||||||
this.checking = true;
|
|
||||||
request.post(_.template('https://saucelabs.com/rest/v1/${user}/js-tests/status')(this), {
|
|
||||||
'auth': { 'user': this.user, 'pass': this.pass },
|
|
||||||
'json': { 'js tests': [this.taskId] }
|
|
||||||
}, _.bind(onJobStatus, this));
|
|
||||||
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stops the job.
|
|
||||||
*
|
|
||||||
* @memberOf Job
|
|
||||||
* @param {Function} callback The function called once the job is stopped.
|
|
||||||
* @param {Object} Returns the job instance.
|
|
||||||
*/
|
|
||||||
Job.prototype.stop = function(callback) {
|
|
||||||
this.once('stop', _.iteratee(callback));
|
|
||||||
if (this.stopping) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
this.stopping = true;
|
|
||||||
if (this._pollerId) {
|
|
||||||
clearTimeout(this._pollerId);
|
|
||||||
this._pollerId = null;
|
|
||||||
this.checking = false;
|
|
||||||
}
|
|
||||||
var onStop = _.bind(onGenericStop, this);
|
|
||||||
if (!this.running || !this.id) {
|
|
||||||
_.defer(onStop);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
request.put(_.template('https://saucelabs.com/rest/v1/${user}/jobs/${id}/stop')(this), {
|
|
||||||
'auth': { 'user': this.user, 'pass': this.pass }
|
|
||||||
}, onStop);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Tunnel constructor.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} [properties] The properties to initialize the tunnel with.
|
|
||||||
*/
|
|
||||||
function Tunnel(properties) {
|
|
||||||
EventEmitter.call(this);
|
|
||||||
|
|
||||||
_.merge(this, properties);
|
|
||||||
|
|
||||||
var active = [],
|
|
||||||
queue = [];
|
|
||||||
|
|
||||||
var all = _.map(this.platforms, _.bind(function(platform) {
|
|
||||||
return new Job(_.merge({
|
|
||||||
'user': this.user,
|
|
||||||
'pass': this.pass,
|
|
||||||
'tunnel': this,
|
|
||||||
'options': { 'platforms': [platform] }
|
|
||||||
}, this.job));
|
|
||||||
}, this));
|
|
||||||
|
|
||||||
var completed = 0,
|
|
||||||
restarted = [],
|
|
||||||
success = true,
|
|
||||||
total = all.length,
|
|
||||||
tunnel = this;
|
|
||||||
|
|
||||||
_.invokeMap(all, 'on', 'complete', function() {
|
|
||||||
_.pull(active, this);
|
|
||||||
if (success) {
|
|
||||||
success = !this.failed;
|
|
||||||
}
|
|
||||||
if (++completed == total) {
|
|
||||||
tunnel.stop(_.partial(tunnel.emit, 'complete', success));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
tunnel.dequeue();
|
|
||||||
});
|
|
||||||
|
|
||||||
_.invokeMap(all, 'on', 'restart', function() {
|
|
||||||
if (!_.includes(restarted, this)) {
|
|
||||||
restarted.push(this);
|
|
||||||
}
|
|
||||||
// Restart tunnel if all active jobs have restarted.
|
|
||||||
var threshold = Math.min(all.length, _.isFinite(throttled) ? throttled : 3);
|
|
||||||
if (tunnel.attempts < tunnel.retries &&
|
|
||||||
active.length >= threshold && _.isEmpty(_.difference(active, restarted))) {
|
|
||||||
tunnel.restart();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.on('restart', function() {
|
|
||||||
completed = 0;
|
|
||||||
success = true;
|
|
||||||
restarted.length = 0;
|
|
||||||
});
|
|
||||||
|
|
||||||
this._timeoutId = null;
|
|
||||||
this.attempts = 0;
|
|
||||||
this.restarting = this.running = this.starting = this.stopping = false;
|
|
||||||
this.jobs = { 'active': active, 'all': all, 'queue': queue };
|
|
||||||
this.connection = new SauceTunnel(this.user, this.pass, this.id, this.tunneled, ['-P', '0']);
|
|
||||||
}
|
|
||||||
|
|
||||||
util.inherits(Tunnel, EventEmitter);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Restarts the tunnel.
|
|
||||||
*
|
|
||||||
* @memberOf Tunnel
|
|
||||||
* @param {Function} callback The function called once the tunnel is restarted.
|
|
||||||
*/
|
|
||||||
Tunnel.prototype.restart = function(callback) {
|
|
||||||
this.once('restart', _.iteratee(callback));
|
|
||||||
if (this.restarting) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
this.restarting = true;
|
|
||||||
|
|
||||||
logInline();
|
|
||||||
console.log('Tunnel %s: restart %d of %d', this.id, ++this.attempts, this.retries);
|
|
||||||
|
|
||||||
var jobs = this.jobs,
|
|
||||||
active = jobs.active,
|
|
||||||
all = jobs.all;
|
|
||||||
|
|
||||||
var reset = _.after(all.length, _.bind(this.stop, this, onGenericRestart)),
|
|
||||||
stop = _.after(active.length, _.partial(_.invokeMap, all, 'reset', reset));
|
|
||||||
|
|
||||||
if (_.isEmpty(active)) {
|
|
||||||
_.defer(stop);
|
|
||||||
}
|
|
||||||
if (_.isEmpty(all)) {
|
|
||||||
_.defer(reset);
|
|
||||||
}
|
|
||||||
_.invokeMap(active, 'stop', function() {
|
|
||||||
_.pull(active, this);
|
|
||||||
stop();
|
|
||||||
});
|
|
||||||
|
|
||||||
if (this._timeoutId) {
|
|
||||||
clearTimeout(this._timeoutId);
|
|
||||||
this._timeoutId = null;
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts the tunnel.
|
|
||||||
*
|
|
||||||
* @memberOf Tunnel
|
|
||||||
* @param {Function} callback The function called once the tunnel is started.
|
|
||||||
* @param {Object} Returns the tunnel instance.
|
|
||||||
*/
|
|
||||||
Tunnel.prototype.start = function(callback) {
|
|
||||||
this.once('start', _.iteratee(callback));
|
|
||||||
if (this.starting || this.running) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
this.starting = true;
|
|
||||||
|
|
||||||
logInline();
|
|
||||||
console.log('Opening Sauce Connect tunnel...');
|
|
||||||
|
|
||||||
var onStart = _.bind(onTunnelStart, this);
|
|
||||||
if (this.timeout) {
|
|
||||||
this._timeoutId = _.delay(onStart, this.timeout * 1000, false);
|
|
||||||
}
|
|
||||||
this.connection.start(onStart);
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Removes jobs from the queue and starts them.
|
|
||||||
*
|
|
||||||
* @memberOf Tunnel
|
|
||||||
* @param {Object} Returns the tunnel instance.
|
|
||||||
*/
|
|
||||||
Tunnel.prototype.dequeue = function() {
|
|
||||||
var count = 0,
|
|
||||||
jobs = this.jobs,
|
|
||||||
active = jobs.active,
|
|
||||||
queue = jobs.queue,
|
|
||||||
throttled = this.throttled;
|
|
||||||
|
|
||||||
while (queue.length && (active.length < throttled)) {
|
|
||||||
var job = queue.shift();
|
|
||||||
active.push(job);
|
|
||||||
_.delay(_.bind(job.start, job), ++count * 1000);
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stops the tunnel.
|
|
||||||
*
|
|
||||||
* @memberOf Tunnel
|
|
||||||
* @param {Function} callback The function called once the tunnel is stopped.
|
|
||||||
* @param {Object} Returns the tunnel instance.
|
|
||||||
*/
|
|
||||||
Tunnel.prototype.stop = function(callback) {
|
|
||||||
this.once('stop', _.iteratee(callback));
|
|
||||||
if (this.stopping) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
this.stopping = true;
|
|
||||||
|
|
||||||
logInline();
|
|
||||||
console.log('Shutting down Sauce Connect tunnel...');
|
|
||||||
|
|
||||||
var jobs = this.jobs,
|
|
||||||
active = jobs.active;
|
|
||||||
|
|
||||||
var stop = _.after(active.length, _.bind(function() {
|
|
||||||
var onStop = _.bind(onGenericStop, this);
|
|
||||||
if (this.running) {
|
|
||||||
this.connection.stop(onStop);
|
|
||||||
} else {
|
|
||||||
onStop();
|
|
||||||
}
|
|
||||||
}, this));
|
|
||||||
|
|
||||||
jobs.queue.length = 0;
|
|
||||||
if (_.isEmpty(active)) {
|
|
||||||
_.defer(stop);
|
|
||||||
}
|
|
||||||
_.invokeMap(active, 'stop', function() {
|
|
||||||
_.pull(active, this);
|
|
||||||
stop();
|
|
||||||
});
|
|
||||||
|
|
||||||
if (this._timeoutId) {
|
|
||||||
clearTimeout(this._timeoutId);
|
|
||||||
this._timeoutId = null;
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
// Cleanup any inline logs when exited via `ctrl+c`.
|
|
||||||
process.on('SIGINT', function() {
|
|
||||||
logInline();
|
|
||||||
process.exit();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create a web server for the current working directory.
|
|
||||||
http.createServer(function(req, res) {
|
|
||||||
// See http://msdn.microsoft.com/en-us/library/ff955275(v=vs.85).aspx.
|
|
||||||
if (compatMode && path.extname(url.parse(req.url).pathname) == '.html') {
|
|
||||||
res.setHeader('X-UA-Compatible', 'IE=' + compatMode);
|
|
||||||
}
|
|
||||||
mount(req, res);
|
|
||||||
}).listen(port);
|
|
||||||
|
|
||||||
// Setup Sauce Connect so we can use this server from Sauce Labs.
|
|
||||||
var tunnel = new Tunnel({
|
|
||||||
'user': username,
|
|
||||||
'pass': accessKey,
|
|
||||||
'id': tunnelId,
|
|
||||||
'job': { 'retries': maxJobRetries, 'statusInterval': statusInterval },
|
|
||||||
'platforms': platforms,
|
|
||||||
'retries': maxTunnelRetries,
|
|
||||||
'throttled': throttled,
|
|
||||||
'tunneled': tunneled,
|
|
||||||
'timeout': tunnelTimeout
|
|
||||||
});
|
|
||||||
|
|
||||||
tunnel.on('complete', function(success) {
|
|
||||||
process.exit(success ? 0 : 1);
|
|
||||||
});
|
|
||||||
|
|
||||||
tunnel.start();
|
|
||||||
|
|
||||||
setInterval(logThrobber, throbberDelay);
|
|
||||||
@@ -233,25 +233,14 @@
|
|||||||
assert.strictEqual(add('2')('1'), '12');
|
assert.strictEqual(add('2')('1'), '12');
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('should only add a `placeholder` property if needed', function(assert) {
|
QUnit.test('should add a `placeholder` property', function(assert) {
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
|
|
||||||
if (!document) {
|
if (!document) {
|
||||||
var methodNames = _.keys(mapping.placeholder),
|
|
||||||
expected = _.map(methodNames, _.constant(true));
|
|
||||||
|
|
||||||
var actual = _.map(methodNames, function(methodName) {
|
|
||||||
var object = {};
|
|
||||||
object[methodName] = _[methodName];
|
|
||||||
|
|
||||||
var lodash = convert(object);
|
|
||||||
return methodName in lodash;
|
|
||||||
});
|
|
||||||
|
|
||||||
assert.deepEqual(actual, expected);
|
|
||||||
|
|
||||||
var lodash = convert({ 'add': _.add });
|
var lodash = convert({ 'add': _.add });
|
||||||
assert.notOk('placeholder' in lodash);
|
|
||||||
|
assert.strictEqual(lodash.placeholder, lodash);
|
||||||
|
assert.strictEqual(lodash.add.placeholder, lodash);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
skipAssert(assert, 2);
|
skipAssert(assert, 2);
|
||||||
@@ -645,7 +634,16 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
_.forOwn(mapping.placeholder, function(truthy, methodName) {
|
var methodNames = [
|
||||||
|
'bind',
|
||||||
|
'bindKey',
|
||||||
|
'curry',
|
||||||
|
'curryRight',
|
||||||
|
'partial',
|
||||||
|
'partialRight'
|
||||||
|
];
|
||||||
|
|
||||||
|
_.each(methodNames, function(methodName) {
|
||||||
var func = fp[methodName];
|
var func = fp[methodName];
|
||||||
|
|
||||||
QUnit.test('fp.' + methodName + '` should have a `placeholder` property', function(assert) {
|
QUnit.test('fp.' + methodName + '` should have a `placeholder` property', function(assert) {
|
||||||
@@ -2138,6 +2136,16 @@
|
|||||||
assert.strictEqual(typeof actual.a.b, 'number');
|
assert.strictEqual(typeof actual.a.b, 'number');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('should not convert uncloneables to objects', function(assert) {
|
||||||
|
assert.expect(2);
|
||||||
|
|
||||||
|
var object = { 'a': { 'b': _.constant(true) } },
|
||||||
|
actual = fp.update('a.b')(_.identity)(object);
|
||||||
|
|
||||||
|
assert.strictEqual(typeof object.a.b, 'function');
|
||||||
|
assert.strictEqual(object.a.b, actual.a.b);
|
||||||
|
});
|
||||||
|
|
||||||
QUnit.test('should not mutate values', function(assert) {
|
QUnit.test('should not mutate values', function(assert) {
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
|
|
||||||
|
|||||||
354
test/test.js
354
test/test.js
@@ -346,12 +346,12 @@
|
|||||||
|
|
||||||
/** Used to test pseudo private map caches. */
|
/** Used to test pseudo private map caches. */
|
||||||
var mapCaches = (function() {
|
var mapCaches = (function() {
|
||||||
var MapCache = _.memoize.Cache;
|
var MapCache = (_.memoize || lodashStable.memoize).Cache;
|
||||||
var result = {
|
var result = {
|
||||||
'Hash': new MapCache().__data__.hash.constructor,
|
'Hash': new MapCache().__data__.hash.constructor,
|
||||||
'MapCache': MapCache
|
'MapCache': MapCache
|
||||||
};
|
};
|
||||||
_.isMatchWith({ 'a': 1 }, { 'a': 1 }, function() {
|
(_.isMatchWith || lodashStable.isMatchWith)({ 'a': 1 }, { 'a': 1 }, function() {
|
||||||
var stack = lodashStable.last(arguments);
|
var stack = lodashStable.last(arguments);
|
||||||
result.ListCache = stack.__data__.constructor;
|
result.ListCache = stack.__data__.constructor;
|
||||||
result.Stack = stack.constructor;
|
result.Stack = stack.constructor;
|
||||||
@@ -2958,7 +2958,7 @@
|
|||||||
assert.deepEqual(getSymbols(actual.a.b), [symbol]);
|
assert.deepEqual(getSymbols(actual.a.b), [symbol]);
|
||||||
assert.deepEqual(actual.a.b[symbol], object.a.b[symbol]);
|
assert.deepEqual(actual.a.b[symbol], object.a.b[symbol]);
|
||||||
assert.deepEqual(actual.a.b[symbol2], object.a.b[symbol2]);
|
assert.deepEqual(actual.a.b[symbol2], object.a.b[symbol2]);
|
||||||
assert.deepEqual(actual.a.b[symbol3], object.a.b[symbol3])
|
assert.deepEqual(actual.a.b[symbol3], object.a.b[symbol3]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
skipAssert(assert, 7);
|
skipAssert(assert, 7);
|
||||||
@@ -4712,6 +4712,17 @@
|
|||||||
var actual = _.defaultsDeep({ 'a': ['abc'] }, { 'a': 'abc' });
|
var actual = _.defaultsDeep({ 'a': ['abc'] }, { 'a': 'abc' });
|
||||||
assert.deepEqual(actual.a, ['abc']);
|
assert.deepEqual(actual.a, ['abc']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('should not indirectly merge `Object` properties', function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
_.defaultsDeep({}, { 'constructor': { 'a': 1 } });
|
||||||
|
|
||||||
|
var actual = 'a' in Object;
|
||||||
|
delete Object.a;
|
||||||
|
|
||||||
|
assert.notOk(actual);
|
||||||
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
@@ -7539,6 +7550,50 @@
|
|||||||
actual = _.groupBy([{ 'a': '__proto__' }], 'a');
|
actual = _.groupBy([{ 'a': '__proto__' }], 'a');
|
||||||
assert.notOk(actual instanceof Array);
|
assert.notOk(actual instanceof Array);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('should not merge "__proto__" properties', function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
if (JSON) {
|
||||||
|
_.merge({}, JSON.parse('{"__proto__":{"a":1}}'));
|
||||||
|
|
||||||
|
var actual = 'a' in objectProto;
|
||||||
|
delete objectProto.a;
|
||||||
|
|
||||||
|
assert.notOk(actual);
|
||||||
|
} else {
|
||||||
|
skipAssert(assert);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
QUnit.test('should not indirectly merge builtin prototype properties', function(assert) {
|
||||||
|
assert.expect(2);
|
||||||
|
|
||||||
|
_.merge({}, { 'toString': { 'constructor': { 'prototype': { 'a': 1 } } } });
|
||||||
|
|
||||||
|
var actual = 'a' in funcProto;
|
||||||
|
delete funcProto.a;
|
||||||
|
|
||||||
|
assert.notOk(actual);
|
||||||
|
|
||||||
|
_.merge({}, { 'constructor': { 'prototype': { 'a': 1 } } });
|
||||||
|
|
||||||
|
actual = 'a' in objectProto;
|
||||||
|
delete objectProto.a;
|
||||||
|
|
||||||
|
assert.notOk(actual);
|
||||||
|
});
|
||||||
|
|
||||||
|
QUnit.test('should not indirectly merge `Object` properties', function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
_.merge({}, { 'constructor': { 'a': 1 } });
|
||||||
|
|
||||||
|
var actual = 'a' in Object;
|
||||||
|
delete Object.a;
|
||||||
|
|
||||||
|
assert.notOk(actual);
|
||||||
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
@@ -9686,7 +9741,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('should compare arrays with circular references', function(assert) {
|
QUnit.test('should compare arrays with circular references', function(assert) {
|
||||||
assert.expect(4);
|
assert.expect(6);
|
||||||
|
|
||||||
var array1 = [],
|
var array1 = [],
|
||||||
array2 = [];
|
array2 = [];
|
||||||
@@ -9711,6 +9766,14 @@
|
|||||||
array2 = ['a', ['a', 'b', 'c'], 'c'];
|
array2 = ['a', ['a', 'b', 'c'], 'c'];
|
||||||
|
|
||||||
assert.strictEqual(_.isEqual(array1, array2), false);
|
assert.strictEqual(_.isEqual(array1, array2), false);
|
||||||
|
|
||||||
|
array1 = [[[]]];
|
||||||
|
array1[0][0][0] = array1;
|
||||||
|
array2 = [];
|
||||||
|
array2[0] = array2;
|
||||||
|
|
||||||
|
assert.strictEqual(_.isEqual(array1, array2), false);
|
||||||
|
assert.strictEqual(_.isEqual(array2, array1), false);
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('should have transitive equivalence for circular references of arrays', function(assert) {
|
QUnit.test('should have transitive equivalence for circular references of arrays', function(assert) {
|
||||||
@@ -9728,7 +9791,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('should compare objects with circular references', function(assert) {
|
QUnit.test('should compare objects with circular references', function(assert) {
|
||||||
assert.expect(4);
|
assert.expect(6);
|
||||||
|
|
||||||
var object1 = {},
|
var object1 = {},
|
||||||
object2 = {};
|
object2 = {};
|
||||||
@@ -9753,6 +9816,14 @@
|
|||||||
object2 = { 'a': 1, 'b': { 'a': 1, 'b': 2, 'c': 3 }, 'c': 3 };
|
object2 = { 'a': 1, 'b': { 'a': 1, 'b': 2, 'c': 3 }, 'c': 3 };
|
||||||
|
|
||||||
assert.strictEqual(_.isEqual(object1, object2), false);
|
assert.strictEqual(_.isEqual(object1, object2), false);
|
||||||
|
|
||||||
|
object1 = {self: {self: {self: {}}}};
|
||||||
|
object1.self.self.self = object1;
|
||||||
|
object2 = {self: {}};
|
||||||
|
object2.self = object2;
|
||||||
|
|
||||||
|
assert.strictEqual(_.isEqual(object1, object2), false);
|
||||||
|
assert.strictEqual(_.isEqual(object2, object1), false);
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('should have transitive equivalence for circular references of objects', function(assert) {
|
QUnit.test('should have transitive equivalence for circular references of objects', function(assert) {
|
||||||
@@ -14885,19 +14956,39 @@
|
|||||||
assert.strictEqual(Foo.a, 1);
|
assert.strictEqual(Foo.a, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('should merge first source object properties to function', function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
var fn = function() {},
|
||||||
|
object = { 'prop': {} },
|
||||||
|
actual = _.merge({ 'prop': fn }, object);
|
||||||
|
|
||||||
|
assert.deepEqual(actual, object);
|
||||||
|
});
|
||||||
|
|
||||||
|
QUnit.test('should merge first and second source object properties to function', function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
var fn = function() {},
|
||||||
|
object = { 'prop': {} },
|
||||||
|
actual = _.merge({ 'prop': fn }, { 'prop': fn }, object);
|
||||||
|
|
||||||
|
assert.deepEqual(actual, object);
|
||||||
|
});
|
||||||
|
|
||||||
QUnit.test('should not merge onto function values of sources', function(assert) {
|
QUnit.test('should not merge onto function values of sources', function(assert) {
|
||||||
assert.expect(3);
|
assert.expect(3);
|
||||||
|
|
||||||
var source1 = { 'a': function() {} },
|
var source1 = { 'a': function() {} },
|
||||||
source2 = { 'a': { 'b': 2 } },
|
source2 = { 'a': { 'b': 2 } },
|
||||||
|
expected = { 'a': { 'b': 2 } },
|
||||||
actual = _.merge({}, source1, source2);
|
actual = _.merge({}, source1, source2);
|
||||||
|
|
||||||
assert.deepEqual(actual, { 'a': { 'b': 2 } });
|
assert.deepEqual(actual, expected);
|
||||||
|
assert.notOk('b' in source1.a);
|
||||||
|
|
||||||
actual = _.merge(source1, source2);
|
actual = _.merge(source1, source2);
|
||||||
|
assert.deepEqual(actual, expected);
|
||||||
assert.strictEqual(typeof actual.a, 'function');
|
|
||||||
assert.strictEqual(actual.a.b, 2);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('should merge onto non-plain `object` values', function(assert) {
|
QUnit.test('should merge onto non-plain `object` values', function(assert) {
|
||||||
@@ -15216,18 +15307,21 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('should provide `stack` to `customizer`', function(assert) {
|
QUnit.test('should provide `stack` to `customizer`', function(assert) {
|
||||||
assert.expect(1);
|
assert.expect(4);
|
||||||
|
|
||||||
var actual;
|
var actual = [];
|
||||||
|
|
||||||
_.mergeWith({}, { 'a': { 'b': 2 } }, function() {
|
_.mergeWith({}, { 'z': 1, 'a': { 'b': 2 } }, function() {
|
||||||
actual = _.last(arguments);
|
actual.push(_.last(arguments));
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.ok(isNpm
|
assert.strictEqual(actual.length, 3);
|
||||||
? actual.constructor.name == 'Stack'
|
_.each(actual, function(a) {
|
||||||
: actual instanceof mapCaches.Stack
|
assert.ok(isNpm
|
||||||
);
|
? a.constructor.name == 'Stack'
|
||||||
|
: a instanceof mapCaches.Stack
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test('should overwrite primitives with source object clones', function(assert) {
|
QUnit.test('should overwrite primitives with source object clones', function(assert) {
|
||||||
@@ -15942,6 +16036,14 @@
|
|||||||
{ 'a': 'y', 'b': 2 }
|
{ 'a': 'y', 'b': 2 }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
var nestedObj = [
|
||||||
|
{ id: '4', address: { zipCode: 4, streetName: 'Beta' } },
|
||||||
|
{ id: '3', address: { zipCode: 3, streetName: 'Alpha' } },
|
||||||
|
{ id: '1', address: { zipCode: 1, streetName: 'Alpha' } },
|
||||||
|
{ id: '2', address: { zipCode: 2, streetName: 'Alpha' } },
|
||||||
|
{ id: '5', address: { zipCode: 4, streetName: 'Alpha' } },
|
||||||
|
];
|
||||||
|
|
||||||
QUnit.test('should sort by a single property by a specified order', function(assert) {
|
QUnit.test('should sort by a single property by a specified order', function(assert) {
|
||||||
assert.expect(1);
|
assert.expect(1);
|
||||||
|
|
||||||
@@ -15949,6 +16051,17 @@
|
|||||||
assert.deepEqual(actual, [objects[1], objects[3], objects[0], objects[2]]);
|
assert.deepEqual(actual, [objects[1], objects[3], objects[0], objects[2]]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('should sort by nested key in array format', function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
var actual = _.orderBy(
|
||||||
|
nestedObj,
|
||||||
|
[['address', 'zipCode'], ['address.streetName']],
|
||||||
|
['asc', 'desc']
|
||||||
|
);
|
||||||
|
assert.deepEqual(actual, [nestedObj[2], nestedObj[3], nestedObj[1], nestedObj[0], nestedObj[4]]);
|
||||||
|
});
|
||||||
|
|
||||||
QUnit.test('should sort by multiple properties by specified orders', function(assert) {
|
QUnit.test('should sort by multiple properties by specified orders', function(assert) {
|
||||||
assert.expect(1);
|
assert.expect(1);
|
||||||
|
|
||||||
@@ -16460,6 +16573,21 @@
|
|||||||
assert.deepEqual(object, { 'a': { 'b': 2 } });
|
assert.deepEqual(object, { 'a': { 'b': 2 } });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Prevent regression for https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
||||||
|
QUnit.test('Security: _.omit should not allow modifying prototype or constructor properties', function(assert) {
|
||||||
|
assert.expect(3);
|
||||||
|
|
||||||
|
var testObj1 = {};
|
||||||
|
assert.strictEqual(typeof testObj1.toString, 'function', 'Object.toString should work before omit');
|
||||||
|
|
||||||
|
_.omit({}, ['__proto__.toString']);
|
||||||
|
_.omit({}, ['constructor.prototype.toString']);
|
||||||
|
|
||||||
|
var testObj2 = {};
|
||||||
|
assert.strictEqual(typeof testObj2.toString, 'function', 'Object.toString should still work after omit');
|
||||||
|
assert.strictEqual(Object.prototype.toString.call({}), '[object Object]', 'Object.toString should behave as expected');
|
||||||
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
@@ -19743,6 +19871,72 @@
|
|||||||
|
|
||||||
assert.deepEqual(actual, expected);
|
assert.deepEqual(actual, expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('`_.' + methodName + '` should return `Infinity` given `Infinity` regardless of `precision`', function(assert) {
|
||||||
|
assert.expect(6);
|
||||||
|
|
||||||
|
var actual = func(Infinity);
|
||||||
|
assert.strictEqual(actual, Infinity);
|
||||||
|
|
||||||
|
actual = func(Infinity, 0);
|
||||||
|
assert.strictEqual(actual, Infinity);
|
||||||
|
|
||||||
|
actual = func(Infinity, 2);
|
||||||
|
assert.strictEqual(actual, Infinity);
|
||||||
|
|
||||||
|
actual = func(Infinity, -2);
|
||||||
|
assert.strictEqual(actual, Infinity);
|
||||||
|
|
||||||
|
actual = func(Infinity, 2);
|
||||||
|
assert.strictEqual(actual, isFloor ? Infinity : Infinity);
|
||||||
|
|
||||||
|
actual = func(Infinity, 2);
|
||||||
|
assert.strictEqual(actual, isCeil ? Infinity : Infinity);
|
||||||
|
});
|
||||||
|
|
||||||
|
QUnit.test('`_.' + methodName + '` should return `-Infinity` given `-Infinity` regardless of `precision`', function(assert) {
|
||||||
|
assert.expect(6);
|
||||||
|
|
||||||
|
var actual = func(-Infinity);
|
||||||
|
assert.strictEqual(actual, -Infinity);
|
||||||
|
|
||||||
|
actual = func(-Infinity, 0);
|
||||||
|
assert.strictEqual(actual, -Infinity);
|
||||||
|
|
||||||
|
actual = func(-Infinity, 2);
|
||||||
|
assert.strictEqual(actual, -Infinity);
|
||||||
|
|
||||||
|
actual = func(-Infinity, -2);
|
||||||
|
assert.strictEqual(actual, -Infinity);
|
||||||
|
|
||||||
|
actual = func(-Infinity, 2);
|
||||||
|
assert.strictEqual(actual, isFloor ? -Infinity : -Infinity);
|
||||||
|
|
||||||
|
actual = func(-Infinity, 2);
|
||||||
|
assert.strictEqual(actual, isCeil ? -Infinity : -Infinity);
|
||||||
|
});
|
||||||
|
|
||||||
|
QUnit.test('`_.' + methodName + '` should return `NaN` given `NaN` regardless of `precision`', function(assert) {
|
||||||
|
assert.expect(6);
|
||||||
|
|
||||||
|
var actual = func(NaN);
|
||||||
|
assert.deepEqual(actual, NaN);
|
||||||
|
|
||||||
|
actual = func(NaN, 0);
|
||||||
|
assert.deepEqual(actual, NaN);
|
||||||
|
|
||||||
|
actual = func(NaN, 2);
|
||||||
|
assert.deepEqual(actual, NaN);
|
||||||
|
|
||||||
|
actual = func(NaN, -2);
|
||||||
|
assert.deepEqual(actual, NaN);
|
||||||
|
|
||||||
|
actual = func(NaN, 2);
|
||||||
|
assert.deepEqual(actual, isFloor ? NaN : NaN);
|
||||||
|
|
||||||
|
actual = func(NaN, 2);
|
||||||
|
assert.deepEqual(actual, isCeil ? NaN : NaN);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
@@ -20854,6 +21048,16 @@
|
|||||||
assert.strictEqual(actual, 1);
|
assert.strictEqual(actual, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('`_.' + methodName + '` should avoid calling iteratee when length is 0', function(assert) {
|
||||||
|
var objects = [],
|
||||||
|
iteratee = function() {
|
||||||
|
throw new Error;
|
||||||
|
},
|
||||||
|
actual = func(objects, { 'x': 50 }, iteratee);
|
||||||
|
|
||||||
|
assert.strictEqual(actual, 0);
|
||||||
|
});
|
||||||
|
|
||||||
QUnit.test('`_.' + methodName + '` should support arrays larger than `MAX_ARRAY_LENGTH / 2`', function(assert) {
|
QUnit.test('`_.' + methodName + '` should support arrays larger than `MAX_ARRAY_LENGTH / 2`', function(assert) {
|
||||||
assert.expect(12);
|
assert.expect(12);
|
||||||
|
|
||||||
@@ -22107,6 +22311,14 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('should forbid code injection through the "variable" options', function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
assert.raises(function() {
|
||||||
|
_.template('', { 'variable': '){console.log(process.env)}; with(obj' });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
QUnit.test('should support custom delimiters', function(assert) {
|
QUnit.test('should support custom delimiters', function(assert) {
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
|
|
||||||
@@ -22452,6 +22664,18 @@
|
|||||||
assert.deepEqual(actual, expected);
|
assert.deepEqual(actual, expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('should not let a sourceURL inject code', function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
var actual,
|
||||||
|
expected = 'no error';
|
||||||
|
try {
|
||||||
|
actual = _.template(expected, {'sourceURL': '\u2028\u2029\n!this would err if it was executed!'})();
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
|
assert.equal(actual, expected);
|
||||||
|
});
|
||||||
|
|
||||||
QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
|
QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
|
||||||
assert.expect(1);
|
assert.expect(1);
|
||||||
|
|
||||||
@@ -23574,6 +23798,22 @@
|
|||||||
|
|
||||||
assert.deepEqual(actual, expected);
|
assert.deepEqual(actual, expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('`_.`' + methodName + '` should prevent ReDoS', function(assert) {
|
||||||
|
assert.expect(2);
|
||||||
|
|
||||||
|
var largeStrLen = 50000,
|
||||||
|
largeStr = '1' + lodashStable.repeat(' ', largeStrLen) + '1',
|
||||||
|
maxMs = 1000,
|
||||||
|
startTime = lodashStable.now();
|
||||||
|
|
||||||
|
assert.deepEqual(_[methodName](largeStr), methodName == 'toNumber' ? NaN : 0);
|
||||||
|
|
||||||
|
var endTime = lodashStable.now(),
|
||||||
|
timeSpent = endTime - startTime;
|
||||||
|
|
||||||
|
assert.ok(timeSpent < maxMs, 'operation took ' + timeSpent + 'ms');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
@@ -24159,6 +24399,22 @@
|
|||||||
assert.strictEqual(func(string, ''), string);
|
assert.strictEqual(func(string, ''), string);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('`_.`' + methodName + '` should prevent ReDoS', function(assert) {
|
||||||
|
assert.expect(2);
|
||||||
|
|
||||||
|
var largeStrLen = 50000,
|
||||||
|
largeStr = 'A' + lodashStable.repeat(' ', largeStrLen) + 'A',
|
||||||
|
maxMs = 1000,
|
||||||
|
startTime = lodashStable.now();
|
||||||
|
|
||||||
|
assert.strictEqual(_[methodName](largeStr), largeStr);
|
||||||
|
|
||||||
|
var endTime = lodashStable.now(),
|
||||||
|
timeSpent = endTime - startTime;
|
||||||
|
|
||||||
|
assert.ok(timeSpent < maxMs, 'operation took ' + timeSpent + 'ms');
|
||||||
|
});
|
||||||
|
|
||||||
QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.map`', function(assert) {
|
QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.map`', function(assert) {
|
||||||
assert.expect(1);
|
assert.expect(1);
|
||||||
|
|
||||||
@@ -24998,6 +25254,21 @@
|
|||||||
skipAssert(assert);
|
skipAssert(assert);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Prevent regression for https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
||||||
|
QUnit.test('Security: _.unset should not allow modifying prototype or constructor properties', function(assert) {
|
||||||
|
assert.expect(3);
|
||||||
|
|
||||||
|
var testStr1 = 'ABC';
|
||||||
|
assert.strictEqual(typeof testStr1.toLowerCase, 'function', 'String.toLowerCase should exist before unset');
|
||||||
|
|
||||||
|
_.unset({ foo: 'bar' }, 'foo.__proto__.toLowerCase');
|
||||||
|
_.unset({ foo: 'bar' }, 'foo.constructor.prototype.toLowerCase');
|
||||||
|
|
||||||
|
var testStr2 = 'ABC';
|
||||||
|
assert.strictEqual(typeof testStr2.toLowerCase, 'function', 'String.toLowerCase should still exist after unset');
|
||||||
|
assert.strictEqual(testStr2.toLowerCase(), 'abc', 'String.toLowerCase should work as expected');
|
||||||
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
@@ -25332,6 +25603,22 @@
|
|||||||
|
|
||||||
assert.deepEqual(actual, [['a'], ['b'], ['c']]);
|
assert.deepEqual(actual, [['a'], ['b'], ['c']]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
QUnit.test('should prevent ReDoS', function(assert) {
|
||||||
|
assert.expect(2);
|
||||||
|
|
||||||
|
var largeWordLen = 50000,
|
||||||
|
largeWord = _.repeat('A', largeWordLen),
|
||||||
|
maxMs = 1000,
|
||||||
|
startTime = lodashStable.now();
|
||||||
|
|
||||||
|
assert.deepEqual(_.words(largeWord + 'ÆiouAreVowels'), [largeWord, 'Æiou', 'Are', 'Vowels']);
|
||||||
|
|
||||||
|
var endTime = lodashStable.now(),
|
||||||
|
timeSpent = endTime - startTime;
|
||||||
|
|
||||||
|
assert.ok(timeSpent < maxMs, 'operation took ' + timeSpent + 'ms');
|
||||||
|
});
|
||||||
}());
|
}());
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
@@ -25582,6 +25869,39 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// zipObjectDeep prototype pollution
|
||||||
|
['__proto__', 'constructor', 'prototype'].forEach(function(keyToTest) {
|
||||||
|
QUnit.test('zipObjectDeep is not setting ' + keyToTest + ' on global', function(assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
|
||||||
|
_.zipObjectDeep([keyToTest + '.a'], ['newValue']);
|
||||||
|
// Can't access plain `a` as it's not defined and test fails
|
||||||
|
assert.notEqual(root.a, 'newValue');
|
||||||
|
});
|
||||||
|
|
||||||
|
QUnit.test('zipObjectDeep is not overwriting ' + keyToTest + ' on vars', function(assert) {
|
||||||
|
assert.expect(3);
|
||||||
|
|
||||||
|
const b = 'oldValue';
|
||||||
|
_.zipObjectDeep([keyToTest + '.b'], ['newValue']);
|
||||||
|
assert.equal(b, 'oldValue');
|
||||||
|
assert.notEqual(root.b, 'newValue');
|
||||||
|
|
||||||
|
// ensure nothing was created
|
||||||
|
assert.notOk(root.b);
|
||||||
|
});
|
||||||
|
|
||||||
|
QUnit.test('zipObjectDeep is not overwriting global.' + keyToTest, function(assert) {
|
||||||
|
assert.expect(2);
|
||||||
|
|
||||||
|
_.zipObjectDeep([root + '.' + keyToTest + '.c'], ['newValue']);
|
||||||
|
assert.notEqual(root.c, 'newValue');
|
||||||
|
|
||||||
|
// ensure nothing was created
|
||||||
|
assert.notOk(root.c);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
QUnit.module('lodash.zipWith');
|
QUnit.module('lodash.zipWith');
|
||||||
|
|||||||
82
threat-model.md
Normal file
82
threat-model.md
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
# The Lodash Threat Model
|
||||||
|
|
||||||
|
The Lodash threat model defines what Lodash trusts and does not trust when executing within a JavaScript environment. Lodash is a general-purpose utility library that operates within the same trust boundaries as the code that calls it. Therefore, vulnerabilities requiring the compromise of trusted elements — such as the JavaScript runtime, the host environment, or developer-controlled inputs — lie outside the scope of this threat model.
|
||||||
|
|
||||||
|
For a vulnerability to be considered within scope, it must result from Lodash itself violating its documented behavior or failing to maintain integrity, confidentiality, or availability under its standard usage assumptions.
|
||||||
|
|
||||||
|
|
||||||
|
## Elements Lodash Does NOT Trust
|
||||||
|
|
||||||
|
1. **Data provided to Lodash functions**
|
||||||
|
Lodash treats all input data (arrays, objects, strings, functions, etc.) as untrusted. It does not attempt to validate or sanitize the semantic correctness of inputs — it operates on values as they are given.
|
||||||
|
*If an untrusted input can cause Lodash to execute behavior beyond what is documented — such as prototype pollution, type confusion, memory exhaustion, or code injection — that would indicate a security vulnerability.*
|
||||||
|
|
||||||
|
2. **Untrusted network sources or user-controlled data**
|
||||||
|
Any input derived from unvalidated user input, network responses, file contents, or deserialized data is untrusted. Lodash does not perform input isolation or sandboxing.
|
||||||
|
|
||||||
|
3. **Tampering with Lodash internals at runtime**
|
||||||
|
Modifying Lodash’s internal symbols, monkey-patching its functions, or overwriting internal references at runtime is outside the trusted boundary.
|
||||||
|
*If such modification changes Lodash behavior, that reflects a compromise of trusted code, not a Lodash vulnerability.*
|
||||||
|
|
||||||
|
|
||||||
|
## Elements Lodash Trusts
|
||||||
|
|
||||||
|
1. **The JavaScript runtime and its standard library**
|
||||||
|
Lodash assumes a correct, uncompromised runtime environment (e.g., Node.js, browser). Vulnerabilities in the runtime (e.g., prototype chain issues, engine crashes) are out of scope.
|
||||||
|
|
||||||
|
2. **The environment and its configuration**
|
||||||
|
Lodash relies on the correct functioning of the host environment (Node.js, browser, Deno, etc.) and any global objects or APIs it uses (e.g., `Object`, `Array`, `Function`, `JSON`).
|
||||||
|
|
||||||
|
3. **The code that invokes Lodash**
|
||||||
|
The application or library using Lodash is responsible for validating user input, performing security checks, and handling execution context appropriately.
|
||||||
|
|
||||||
|
4. **Installed package integrity**
|
||||||
|
Lodash assumes that the package installed (via npm, cdn, etc.) has not been tampered with and originates from the legitimate Lodash distribution channel.
|
||||||
|
*Supply-chain compromise or malicious clones are not considered Lodash vulnerabilities.*
|
||||||
|
|
||||||
|
5. **The privileges and permissions of the execution context**
|
||||||
|
Lodash inherits the privileges of the user or process that invokes it. Misuse or over-privileged execution environments (e.g., running as root, or with excessive browser permissions) are not within scope.
|
||||||
|
|
||||||
|
## Examples of Vulnerabilities (in scope)
|
||||||
|
|
||||||
|
- **Prototype Pollution ([CWE-1321](https://cwe.mitre.org/data/definitions/1321.html))**
|
||||||
|
If a Lodash function (e.g., `merge`, `defaultsDeep`, or `set`) allows modification of `Object.prototype` properties via untrusted input (e.g., `__proto__` keys) due to insufficient sanitization, it is in scope.
|
||||||
|
This class of vulnerability has been observed in prior Lodash versions (e.g., [CVE-2019-10744](https://www.cve.org/CVERecord?id=CVE-2019-10744)).
|
||||||
|
|
||||||
|
- **Unexpected code execution ([CWE-94](https://cwe.mitre.org/data/definitions/94.html))**
|
||||||
|
If a Lodash method (e.g., `template()`) executes attacker-controlled input as code without documented warnings or sanitization requirements, that is a Lodash vulnerability (e.g., [CVE-2021-23337](https://nvd.nist.gov/vuln/detail/CVE-2021-23337)).
|
||||||
|
|
||||||
|
- **Denial of Service (DoS) through logic flaws ([CWE-400](https://cwe.mitre.org/data/definitions/400.html))**
|
||||||
|
If Lodash enters unbounded recursion, excessive memory usage, or hangs when operating on otherwise valid inputs within documented usage limits, this is a vulnerability in Lodash (e.g, [CVE-2020-28500](https://www.cve.org/CVERecord?id=CVE-2020-28500)).
|
||||||
|
|
||||||
|
|
||||||
|
## Examples of Non-Vulnerabilities (out of scope)
|
||||||
|
|
||||||
|
### Malicious Third-Party Packages ([CWE-1357](https://cwe.mitre.org/data/definitions/1357.html))
|
||||||
|
|
||||||
|
If a project includes a malicious dependency that overrides Lodash behavior or injects malicious code into Lodash’s namespace, it does not represent a Lodash vulnerability. Lodash trusts its runtime and installation context.
|
||||||
|
|
||||||
|
### Unvalidated Application Input
|
||||||
|
|
||||||
|
Applications using Lodash are responsible for input validation. Passing attacker-controlled data directly into Lodash functions (e.g., `_.merge(req.body, config)`) is an application bug, not a Lodash vulnerability.
|
||||||
|
|
||||||
|
### Prototype Pollution via Trusted Code
|
||||||
|
|
||||||
|
If a developer intentionally merges user input into global objects or fails to isolate data structures, that is a misuse of Lodash’s documented API, not a Lodash defect.
|
||||||
|
|
||||||
|
### Vulnerabilities in the JavaScript Runtime or Platform
|
||||||
|
|
||||||
|
If a Lodash method triggers a bug in the JavaScript engine (e.g., V8, SpiderMonkey, JavaScriptCore) that leads to memory corruption or incorrect behavior, the vulnerability lies in the engine, not Lodash.
|
||||||
|
|
||||||
|
### Environmental Misconfiguration ([CWE-15](https://cwe.mitre.org/data/definitions/15.html))
|
||||||
|
|
||||||
|
Issues arising from misconfigured execution environments, such as running outdated Node.js versions or insecure Content Security Policies in browsers, are not considered Lodash vulnerabilities.
|
||||||
|
|
||||||
|
### Supply Chain Compromise
|
||||||
|
|
||||||
|
Tampering with Lodash packages in the npm registry, MITM attacks during installation, or local file system manipulation are not vulnerabilities in Lodash itself.
|
||||||
|
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
Lodash is a utility library operating entirely within the trust boundary of its caller. Vulnerabilities in scope are limited to cases where **Lodash fails to uphold its documented behavior** in the presence of **untrusted input**, without assuming compromise of trusted components such as the runtime, the operating system, or the invoking application code.
|
||||||
Reference in New Issue
Block a user