auth0-lock 12.3.1 → 12.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/.github/actions/get-prerelease/action.yml +30 -0
  2. package/.github/actions/get-release-notes/action.yml +42 -0
  3. package/.github/actions/get-version/action.yml +21 -0
  4. package/.github/actions/npm-publish/action.yml +53 -0
  5. package/.github/actions/release-create/action.yml +47 -0
  6. package/.github/actions/tag-exists/action.yml +36 -0
  7. package/.github/workflows/codeql.yml +3 -3
  8. package/.github/workflows/npm-release.yml +83 -0
  9. package/.github/workflows/release.yml +25 -0
  10. package/.github/workflows/test.yml +8 -8
  11. package/.shiprc +3 -2
  12. package/.version +1 -0
  13. package/CHANGELOG.md +14 -0
  14. package/DEVELOPMENT.md +8 -8
  15. package/Makefile +4 -4
  16. package/README.md +1 -1
  17. package/lib/CSSCore.js +0 -1
  18. package/lib/__tests__/connection/database/actions.js +1 -2
  19. package/lib/__tests__/connection/database/index.js +1 -1
  20. package/lib/__tests__/connection/database/login_pane.js +1 -1
  21. package/lib/__tests__/connection/database/password_reset_confirmation.js +1 -1
  22. package/lib/__tests__/connection/database/signed_up_confirmation.js +1 -1
  23. package/lib/__tests__/connection/enterprise/actions.js +1 -1
  24. package/lib/__tests__/connection/enterprise/hrd_pane.js +1 -1
  25. package/lib/__tests__/connection/enterprise/hrd_screen.js +1 -1
  26. package/lib/__tests__/connection/enterprise/quick_auth_screen.js +1 -1
  27. package/lib/__tests__/connection/passwordless/ask_vcode.js +1 -1
  28. package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +1 -1
  29. package/lib/__tests__/core/actions.js +3 -3
  30. package/lib/__tests__/core/remote_data.js +1 -1
  31. package/lib/__tests__/core/signed_in_confirmation.js +1 -1
  32. package/lib/__tests__/core/sso/last_login_screen.js +2 -2
  33. package/lib/__tests__/core/tenant.js +2 -2
  34. package/lib/__tests__/core/web_api.js +2 -2
  35. package/lib/__tests__/engine/classic.js +2 -2
  36. package/lib/__tests__/field/captcha/auth0_v2.js +28 -0
  37. package/lib/__tests__/field/captcha/third_party_captcha.js +261 -0
  38. package/lib/__tests__/field/captcha.js +22 -0
  39. package/lib/__tests__/field/field.js +2 -2
  40. package/lib/__tests__/i18n.js +1 -1
  41. package/lib/__tests__/testUtils.js +3 -3
  42. package/lib/__tests__/ui/box/chrome.js +2 -2
  43. package/lib/__tests__/ui/box/confirmation_pane.js +1 -1
  44. package/lib/avatar.js +1 -1
  45. package/lib/connection/captcha.js +54 -20
  46. package/lib/connection/database/actions.js +19 -8
  47. package/lib/connection/database/index.js +1 -1
  48. package/lib/connection/database/login_pane.js +12 -14
  49. package/lib/connection/database/login_sign_up_tabs.js +14 -18
  50. package/lib/connection/database/mfa_pane.js +9 -11
  51. package/lib/connection/database/password_reset_confirmation.js +10 -12
  52. package/lib/connection/database/reset_password.js +13 -17
  53. package/lib/connection/database/reset_password_pane.js +21 -13
  54. package/lib/connection/database/signed_up_confirmation.js +10 -12
  55. package/lib/connection/enterprise/actions.js +5 -5
  56. package/lib/connection/enterprise/hrd_pane.js +11 -13
  57. package/lib/connection/enterprise/hrd_screen.js +10 -12
  58. package/lib/connection/enterprise/kerberos_screen.js +10 -12
  59. package/lib/connection/enterprise/quick_auth_screen.js +10 -12
  60. package/lib/connection/enterprise.js +1 -1
  61. package/lib/connection/passwordless/actions.js +8 -8
  62. package/lib/connection/passwordless/ask_vcode.js +9 -11
  63. package/lib/connection/passwordless/email_sent_confirmation.js +17 -23
  64. package/lib/connection/passwordless/index.js +1 -1
  65. package/lib/connection/social/index.js +1 -1
  66. package/lib/core/actions.js +3 -3
  67. package/lib/core/client/index.js +3 -4
  68. package/lib/core/client/settings.js +1 -1
  69. package/lib/core/error_screen.js +10 -12
  70. package/lib/core/index.js +13 -4
  71. package/lib/core/loading_screen.js +13 -17
  72. package/lib/core/remote_data.js +9 -1
  73. package/lib/core/screen.js +4 -5
  74. package/lib/core/signed_in_confirmation.js +10 -12
  75. package/lib/core/sso/last_login_screen.js +10 -12
  76. package/lib/core/tenant/index.js +3 -4
  77. package/lib/core/tenant/settings.js +1 -1
  78. package/lib/core/web_api/helper.js +4 -4
  79. package/lib/core/web_api/p2_api.js +9 -4
  80. package/lib/core/web_api.js +8 -4
  81. package/lib/core.js +13 -15
  82. package/lib/engine/classic/login.js +10 -12
  83. package/lib/engine/classic/mfa_login_screen.js +10 -12
  84. package/lib/engine/classic/sign_up_pane.js +11 -13
  85. package/lib/engine/classic/sign_up_screen.js +10 -12
  86. package/lib/engine/classic.js +4 -5
  87. package/lib/engine/passwordless/social_or_email_login_screen.js +12 -14
  88. package/lib/engine/passwordless/social_or_phone_number_login_screen.js +12 -14
  89. package/lib/engine/passwordless.js +4 -5
  90. package/lib/field/captcha/captcha_pane.js +17 -16
  91. package/lib/field/captcha/third_party_captcha.js +79 -39
  92. package/lib/field/custom_input.js +1 -1
  93. package/lib/field/email/email_pane.js +10 -12
  94. package/lib/field/email.js +1 -1
  95. package/lib/field/index.js +1 -1
  96. package/lib/field/mfa-code/mfa_code_pane.js +10 -12
  97. package/lib/field/password/password_pane.js +12 -14
  98. package/lib/field/phone-number/phone_number_pane.js +11 -13
  99. package/lib/field/social/event.js +1 -1
  100. package/lib/field/social/social_buttons_pane.js +10 -12
  101. package/lib/field/username/username_pane.js +10 -12
  102. package/lib/field/vcode/vcode_pane.js +12 -14
  103. package/lib/i18n/af.js +3 -1
  104. package/lib/i18n/ar.js +3 -1
  105. package/lib/i18n/az.js +3 -1
  106. package/lib/i18n/bg.js +3 -1
  107. package/lib/i18n/ca.js +3 -1
  108. package/lib/i18n/cs.js +3 -1
  109. package/lib/i18n/da.js +3 -1
  110. package/lib/i18n/de.js +3 -1
  111. package/lib/i18n/el.js +3 -1
  112. package/lib/i18n/en.js +3 -1
  113. package/lib/i18n/es.js +3 -1
  114. package/lib/i18n/et.js +3 -1
  115. package/lib/i18n/fa.js +3 -1
  116. package/lib/i18n/fi.js +3 -1
  117. package/lib/i18n/fr.js +3 -1
  118. package/lib/i18n/he.js +3 -1
  119. package/lib/i18n/hr.js +3 -1
  120. package/lib/i18n/hu.js +3 -1
  121. package/lib/i18n/id.js +3 -1
  122. package/lib/i18n/it.js +3 -1
  123. package/lib/i18n/ja.js +3 -1
  124. package/lib/i18n/ko.js +3 -1
  125. package/lib/i18n/lt.js +3 -1
  126. package/lib/i18n/lv.js +3 -1
  127. package/lib/i18n/ms.js +3 -1
  128. package/lib/i18n/nb.js +3 -1
  129. package/lib/i18n/nl.js +3 -1
  130. package/lib/i18n/nn.js +3 -1
  131. package/lib/i18n/no.js +3 -1
  132. package/lib/i18n/pl.js +3 -1
  133. package/lib/i18n/pt-br.js +3 -1
  134. package/lib/i18n/pt.js +3 -1
  135. package/lib/i18n/ro.js +3 -1
  136. package/lib/i18n/ru.js +3 -1
  137. package/lib/i18n/sk.js +3 -1
  138. package/lib/i18n/sl.js +3 -1
  139. package/lib/i18n/sr.js +3 -1
  140. package/lib/i18n/sv.js +3 -1
  141. package/lib/i18n/tr.js +3 -1
  142. package/lib/i18n/ua.js +3 -1
  143. package/lib/i18n/uk.js +3 -1
  144. package/lib/i18n/vi.js +3 -1
  145. package/lib/i18n/zh-tw.js +3 -1
  146. package/lib/i18n/zh.js +3 -1
  147. package/lib/i18n.js +2 -2
  148. package/lib/lock.js +10 -11
  149. package/lib/passwordless.js +10 -11
  150. package/lib/quick-auth/actions.js +3 -3
  151. package/lib/sync.js +1 -1
  152. package/lib/ui/box/chrome.js +13 -17
  153. package/lib/ui/box/confirmation_pane.js +1 -1
  154. package/lib/ui/box/container.js +11 -14
  155. package/lib/ui/box/global_message.js +9 -11
  156. package/lib/ui/box/header.js +19 -27
  157. package/lib/ui/box/multisize_slide.js +13 -17
  158. package/lib/ui/box.js +4 -6
  159. package/lib/ui/input/captcha_input.js +14 -16
  160. package/lib/ui/input/checkbox_input.js +9 -11
  161. package/lib/ui/input/email_input.js +10 -12
  162. package/lib/ui/input/input_wrap.js +9 -11
  163. package/lib/ui/input/location_input.js +9 -11
  164. package/lib/ui/input/mfa_code_input.js +10 -12
  165. package/lib/ui/input/password/password_strength.js +15 -21
  166. package/lib/ui/input/password_input.js +11 -13
  167. package/lib/ui/input/phone_number_input.js +10 -12
  168. package/lib/ui/input/select_input.js +9 -11
  169. package/lib/ui/input/text_input.js +10 -12
  170. package/lib/ui/input/username_input.js +10 -12
  171. package/lib/ui/input/vcode_input.js +10 -12
  172. package/lib/ui/list.js +16 -22
  173. package/lib/utils/atom.js +3 -4
  174. package/lib/utils/cache.js +3 -4
  175. package/lib/utils/jsonp_utils.js +3 -4
  176. package/package.json +4 -3
  177. package/.github/workflows/publish.yml +0 -121
@@ -0,0 +1,30 @@
1
+ name: Return a boolean indicating if the version contains prerelease identifiers
2
+
3
+ #
4
+ # Returns a simple true/false boolean indicating whether the version indicates it's a prerelease or not.
5
+ #
6
+ # TODO: Remove once the common repo is public.
7
+ #
8
+
9
+ inputs:
10
+ version:
11
+ required: true
12
+
13
+ outputs:
14
+ prerelease:
15
+ value: ${{ steps.get_prerelease.outputs.PRERELEASE }}
16
+
17
+ runs:
18
+ using: composite
19
+
20
+ steps:
21
+ - id: get_prerelease
22
+ shell: bash
23
+ run: |
24
+ if [[ "${VERSION}" == *"beta"* || "${VERSION}" == *"alpha"* ]]; then
25
+ echo "PRERELEASE=true" >> $GITHUB_OUTPUT
26
+ else
27
+ echo "PRERELEASE=false" >> $GITHUB_OUTPUT
28
+ fi
29
+ env:
30
+ VERSION: ${{ inputs.version }}
@@ -0,0 +1,42 @@
1
+ name: Return the release notes extracted from the body of the PR associated with the release.
2
+
3
+ #
4
+ # Returns the release notes from the content of a pull request linked to a release branch. It expects the branch name to be in the format release/vX.Y.Z, release/X.Y.Z, release/vX.Y.Z-beta.N. etc.
5
+ #
6
+ # TODO: Remove once the common repo is public.
7
+ #
8
+ inputs:
9
+ version:
10
+ required: true
11
+ repo_name:
12
+ required: false
13
+ repo_owner:
14
+ required: true
15
+ token:
16
+ required: true
17
+
18
+ outputs:
19
+ release-notes:
20
+ value: ${{ steps.get_release_notes.outputs.RELEASE_NOTES }}
21
+
22
+ runs:
23
+ using: composite
24
+
25
+ steps:
26
+ - uses: actions/github-script@v7
27
+ id: get_release_notes
28
+ with:
29
+ result-encoding: string
30
+ script: |
31
+ const { data: pulls } = await github.rest.pulls.list({
32
+ owner: process.env.REPO_OWNER,
33
+ repo: process.env.REPO_NAME,
34
+ state: 'all',
35
+ head: `${process.env.REPO_OWNER}:release/${process.env.VERSION}`,
36
+ });
37
+ core.setOutput('RELEASE_NOTES', pulls[0].body);
38
+ env:
39
+ GITHUB_TOKEN: ${{ inputs.token }}
40
+ REPO_OWNER: ${{ inputs.repo_owner }}
41
+ REPO_NAME: ${{ inputs.repo_name }}
42
+ VERSION: ${{ inputs.version }}
@@ -0,0 +1,21 @@
1
+ name: Return the version extracted from the branch name
2
+
3
+ #
4
+ # Returns the version from the .version file.
5
+ #
6
+ # TODO: Remove once the common repo is public.
7
+ #
8
+
9
+ outputs:
10
+ version:
11
+ value: ${{ steps.get_version.outputs.VERSION }}
12
+
13
+ runs:
14
+ using: composite
15
+
16
+ steps:
17
+ - id: get_version
18
+ shell: bash
19
+ run: |
20
+ VERSION=$(head -1 .version)
21
+ echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
@@ -0,0 +1,53 @@
1
+ name: Publish release to npm
2
+
3
+ inputs:
4
+ node-version:
5
+ required: true
6
+ npm-token:
7
+ required: true
8
+ version:
9
+ required: true
10
+ require-build:
11
+ default: true
12
+ release-directory:
13
+ default: './'
14
+
15
+ runs:
16
+ using: composite
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Setup Node
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: ${{ inputs.node-version }}
26
+ cache: 'npm'
27
+ registry-url: 'https://registry.npmjs.org'
28
+
29
+ - name: Install dependencies
30
+ if: inputs.require-build == 'true'
31
+ shell: bash
32
+ run: npm ci --include=dev
33
+
34
+ - name: Build package
35
+ if: inputs.require-build == 'true'
36
+ shell: bash
37
+ run: npm run build
38
+
39
+ - name: Publish release to NPM
40
+ shell: bash
41
+ working-directory: ${{ inputs.release-directory }}
42
+ run: |
43
+ if [[ "${VERSION}" == *"beta"* ]]; then
44
+ TAG="beta"
45
+ elif [[ "${VERSION}" == *"alpha"* ]]; then
46
+ TAG="alpha"
47
+ else
48
+ TAG="latest"
49
+ fi
50
+ npm publish --provenance --tag $TAG
51
+ env:
52
+ NODE_AUTH_TOKEN: ${{ inputs.npm-token }}
53
+ VERSION: ${{ inputs.version }}
@@ -0,0 +1,47 @@
1
+ name: Create a GitHub release
2
+
3
+ #
4
+ # Creates a GitHub release with the given version.
5
+ #
6
+ # TODO: Remove once the common repo is public.
7
+ #
8
+
9
+ inputs:
10
+ token:
11
+ required: true
12
+ files:
13
+ required: false
14
+ name:
15
+ required: true
16
+ body:
17
+ required: true
18
+ tag:
19
+ required: true
20
+ commit:
21
+ required: true
22
+ draft:
23
+ default: false
24
+ required: false
25
+ prerelease:
26
+ default: false
27
+ required: false
28
+ fail_on_unmatched_files:
29
+ default: true
30
+ required: false
31
+
32
+ runs:
33
+ using: composite
34
+
35
+ steps:
36
+ - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
37
+ with:
38
+ body: ${{ inputs.body }}
39
+ name: ${{ inputs.name }}
40
+ tag_name: ${{ inputs.tag }}
41
+ target_commitish: ${{ inputs.commit }}
42
+ draft: ${{ inputs.draft }}
43
+ prerelease: ${{ inputs.prerelease }}
44
+ fail_on_unmatched_files: ${{ inputs.fail_on_unmatched_files }}
45
+ files: ${{ inputs.files }}
46
+ env:
47
+ GITHUB_TOKEN: ${{ inputs.token }}
@@ -0,0 +1,36 @@
1
+ name: Return a boolean indicating if a tag already exists for the repository
2
+
3
+ #
4
+ # Returns a simple true/false boolean indicating whether the tag exists or not.
5
+ #
6
+ # TODO: Remove once the common repo is public.
7
+ #
8
+
9
+ inputs:
10
+ token:
11
+ required: true
12
+ tag:
13
+ required: true
14
+
15
+ outputs:
16
+ exists:
17
+ description: 'Whether the tag exists or not'
18
+ value: ${{ steps.tag-exists.outputs.EXISTS }}
19
+
20
+ runs:
21
+ using: composite
22
+
23
+ steps:
24
+ - id: tag-exists
25
+ shell: bash
26
+ run: |
27
+ GET_API_URL="https://api.github.com/repos/${GITHUB_REPOSITORY}/git/ref/tags/${TAG_NAME}"
28
+ http_status_code=$(curl -LI $GET_API_URL -o /dev/null -w '%{http_code}\n' -s -H "Authorization: token ${GITHUB_TOKEN}")
29
+ if [ "$http_status_code" -ne "404" ] ; then
30
+ echo "EXISTS=true" >> $GITHUB_OUTPUT
31
+ else
32
+ echo "EXISTS=false" >> $GITHUB_OUTPUT
33
+ fi
34
+ env:
35
+ TAG_NAME: ${{ inputs.tag }}
36
+ GITHUB_TOKEN: ${{ inputs.token }}
@@ -40,15 +40,15 @@ jobs:
40
40
  uses: actions/checkout@v4
41
41
 
42
42
  - name: Initialize CodeQL
43
- uses: github/codeql-action/init@v2
43
+ uses: github/codeql-action/init@v3
44
44
  with:
45
45
  languages: ${{ matrix.language }}
46
46
  queries: +security-and-quality
47
47
 
48
48
  - name: Autobuild
49
- uses: github/codeql-action/autobuild@v2
49
+ uses: github/codeql-action/autobuild@v3
50
50
 
51
51
  - name: Perform CodeQL Analysis
52
- uses: github/codeql-action/analyze@v2
52
+ uses: github/codeql-action/analyze@v3
53
53
  with:
54
54
  category: '/language:${{ matrix.language }}'
@@ -0,0 +1,83 @@
1
+ name: Create npm and GitHub Release
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ node-version:
7
+ required: true
8
+ type: string
9
+ require-build:
10
+ default: true
11
+ type: string
12
+ release-directory:
13
+ default: './'
14
+ type: string
15
+ secrets:
16
+ github-token:
17
+ required: true
18
+ npm-token:
19
+ required: true
20
+
21
+ ### TODO: Replace instances of './.github/actions/' w/ `auth0/dx-sdk-actions/` and append `@latest` after the common `dx-sdk-actions` repo is made public.
22
+ ### TODO: Also remove `get-prerelease`, `get-version`, `release-create`, `tag-create` and `tag-exists` actions from this repo's .github/actions folder once the repo is public.
23
+
24
+ jobs:
25
+ release:
26
+ if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
27
+ runs-on: ubuntu-latest
28
+ environment: release
29
+
30
+ steps:
31
+ # Checkout the code
32
+ - uses: actions/checkout@v4
33
+ with:
34
+ fetch-depth: 0
35
+
36
+ # Get the version from the branch name
37
+ - id: get_version
38
+ uses: ./.github/actions/get-version
39
+
40
+ # Get the prerelease flag from the branch name
41
+ - id: get_prerelease
42
+ uses: ./.github/actions/get-prerelease
43
+ with:
44
+ version: ${{ steps.get_version.outputs.version }}
45
+
46
+ # Get the release notes
47
+ - id: get_release_notes
48
+ uses: ./.github/actions/get-release-notes
49
+ with:
50
+ token: ${{ secrets.github-token }}
51
+ version: ${{ steps.get_version.outputs.version }}
52
+ repo_owner: ${{ github.repository_owner }}
53
+ repo_name: ${{ github.event.repository.name }}
54
+
55
+ # Check if the tag already exists
56
+ - id: tag_exists
57
+ uses: ./.github/actions/tag-exists
58
+ with:
59
+ tag: ${{ steps.get_version.outputs.version }}
60
+ token: ${{ secrets.github-token }}
61
+
62
+ # If the tag already exists, exit with an error
63
+ - if: steps.tag_exists.outputs.exists == 'true'
64
+ run: exit 1
65
+
66
+ # Publish the release to npm
67
+ - uses: ./.github/actions/npm-publish
68
+ with:
69
+ node-version: ${{ inputs.node-version }}
70
+ require-build: ${{ inputs.require-build }}
71
+ release-directory: ${{ inputs.release-directory }}
72
+ version: ${{ steps.get_version.outputs.version }}
73
+ npm-token: ${{ secrets.npm-token }}
74
+
75
+ # Create a release for the tag
76
+ - uses: ./.github/actions/release-create
77
+ with:
78
+ token: ${{ secrets.github-token }}
79
+ name: ${{ steps.get_version.outputs.version }}
80
+ body: ${{ steps.get_release_notes.outputs.release-notes }}
81
+ tag: ${{ steps.get_version.outputs.version }}
82
+ commit: ${{ github.sha }}
83
+ prerelease: ${{ steps.get_prerelease.outputs.prerelease }}
@@ -0,0 +1,25 @@
1
+ name: Create GitHub Release
2
+
3
+ on:
4
+ pull_request:
5
+ types:
6
+ - closed
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: write
11
+ id-token: write # For publishing to npm using --provenance
12
+
13
+ ### TODO: Replace instances of './.github/workflows/' w/ `auth0/dx-sdk-actions/workflows/` and append `@latest` after the common `dx-sdk-actions` repo is made public.
14
+ ### TODO: Also remove `get-prerelease`, `get-release-notes`, `get-version`, `npm-publish`, `release-create`, and `tag-exists` actions from this repo's .github/actions folder once the repo is public.
15
+ ### TODO: Also remove `npm-release` workflow from this repo's .github/workflows folder once the repo is public.
16
+
17
+ jobs:
18
+ release:
19
+ uses: ./.github/workflows/npm-release.yml
20
+ with:
21
+ node-version: 18
22
+ require-build: true
23
+ secrets:
24
+ npm-token: ${{ secrets.NPM_TOKEN }}
25
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -34,25 +34,25 @@ jobs:
34
34
  uses: actions/setup-node@v4
35
35
  with:
36
36
  node-version: 18
37
- cache: 'yarn'
37
+ cache: 'npm'
38
38
 
39
39
  - name: Install dependencies
40
- run: yarn
40
+ run: npm ci
41
41
 
42
42
  - name: Build package
43
- run: yarn build
43
+ run: npm run build
44
44
 
45
45
  - name: Run `es-check`
46
- run: yarn test:es-check
46
+ run: npm run test:es-check
47
47
 
48
48
  - name: Run `i18n:validate`
49
- run: yarn i18n:validate
49
+ run: npm run i18n:validate
50
50
 
51
51
  - name: Run Jest unit tests
52
- run: yarn test
52
+ run: npm run test
53
53
 
54
54
  - name: Run Karma end-to-end tests
55
- run: yarn test:e2e
55
+ run: npm run test:e2e
56
56
 
57
57
  - name: Upload coverage
58
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # pin@3.1.4
58
+ uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # pin@3.1.5
package/.shiprc CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "files": {
3
- "README.md": []
3
+ "README.md": [],
4
+ ".version": []
4
5
  },
5
- "postbump": "yarn dist build"
6
+ "postbump": "npm run build"
6
7
  }
package/.version ADDED
@@ -0,0 +1 @@
1
+ v12.5.0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## [v12.5.0](https://github.com/auth0/lock/tree/v12.5.0) (2024-04-30)
4
+ [Full Changelog](https://github.com/auth0/lock/compare/v12.4.0...v12.5.0)
5
+
6
+ - Support captchas in reset password flow [\#2547](https://github.com/auth0/lock/pull/2547) ([srijonsaha](https://github.com/srijonsaha))
7
+
8
+ ## [v12.4.0](https://github.com/auth0/lock/tree/v12.4.0) (2024-01-04)
9
+ [Full Changelog](https://github.com/auth0/lock/compare/v12.3.1...v12.4.0)
10
+
11
+ **Added**
12
+ - [IAMRISK-2916] Added support for Auth0 v2 captcha provider [\#2503](https://github.com/auth0/lock/pull/2503) ([alexkoumarianos-okta](https://github.com/alexkoumarianos-okta))
13
+
14
+ **Changed**
15
+ - [IAMRISK-3010] Added support for auth0_v2 captcha failOpen [\#2507](https://github.com/auth0/lock/pull/2507) ([alexkoumarianos-okta](https://github.com/alexkoumarianos-okta))
16
+
3
17
  ## [v12.3.1](https://github.com/auth0/lock/tree/v12.3.1) (2023-11-13)
4
18
  [Full Changelog](https://github.com/auth0/lock/compare/v12.3.0...v12.3.1)
5
19
 
package/DEVELOPMENT.md CHANGED
@@ -11,7 +11,7 @@ The SDK uses [Webpack](https://webpack.js.org/) to compile all JavaScript assets
11
11
  To perform a build, use the `build` script:
12
12
 
13
13
  ```
14
- yarn build
14
+ npm run build
15
15
  ```
16
16
 
17
17
  ## Running Tests
@@ -19,23 +19,23 @@ yarn build
19
19
  Unit tests can be executed using [Jest](https://jestjs.io/) by issuing the following command:
20
20
 
21
21
  ```
22
- yarn test
22
+ npm run test
23
23
  ```
24
24
 
25
25
  To interactively perform tests using Jest's `watch` mode, use:
26
26
 
27
27
  ```
28
- yarn test:watch
28
+ npm run test:watch
29
29
  ```
30
30
 
31
31
  End-to-end tests can be executed locally using [Karma](https://karma-runner.github.io/), in both watch and CLI mode:
32
32
 
33
33
  ```
34
34
  # CLI mode using Chrome Headless browser:
35
- yarn test:e2e
35
+ npm run test:e2e
36
36
 
37
37
  # Watch mode using Chrome desktop browser, in watch mode:
38
- yarn test:e2e:watch
38
+ npm run test:e2e:watch
39
39
  ```
40
40
 
41
41
  ## The SDK Playground
@@ -43,7 +43,7 @@ yarn test:e2e:watch
43
43
  To test the SDK manually and play around with the various options and features, you can invoke the Playground by using:
44
44
 
45
45
  ```
46
- yarn start
46
+ npm run start
47
47
  ```
48
48
 
49
49
  Next, open `https://localhost:3000/support`, which will display a simple web app that allows you to interact with Auth0 to test functionality. The HTML template in `support/index.html` can be modified to test various different pieces of functionality.
@@ -58,7 +58,7 @@ You can then use another SPA app to log in using this tenant that has this custo
58
58
 
59
59
  You may need to run Lock using HTTPS with a valid certificate if you want to do this testing in Safari, as Safari will not load mixed content pages, and will also not load HTTPS with untrusted testing certificates.
60
60
 
61
- Lock can already support HTTPS just by running `yarn start` if you have `mkcert` installed.
61
+ Lock can already support HTTPS just by running `npm run start` if you have `mkcert` installed.
62
62
 
63
63
  To install `mkcert`:
64
64
 
@@ -70,7 +70,7 @@ brew install nss # if you use Firefox
70
70
  mkcert install
71
71
 
72
72
  # Serve lock
73
- yarn start
73
+ npm run start
74
74
  ```
75
75
 
76
76
  Once Lock has started, use another SPA app to log in using a tenant with the template customized as above.
package/Makefile CHANGED
@@ -7,16 +7,16 @@
7
7
 
8
8
  install:
9
9
  @echo "Running install..."
10
- yarn install
10
+ npm install
11
11
 
12
12
  test:
13
13
  @echo "Running test..."
14
- yarn test
14
+ npm run test
15
15
 
16
16
  build:
17
17
  @echo "Running build..."
18
- rm -rf dist && rm -rf build && yarn dist build
18
+ rm -rf dist && rm -rf build && npm run build
19
19
 
20
20
  publish:
21
21
  @echo "Running cdn-publish..."
22
- yarn publish:cdn
22
+ npm run publish:cdn
package/README.md CHANGED
@@ -30,7 +30,7 @@ From CDN
30
30
 
31
31
  ```html
32
32
  <!-- Latest patch release (recommended for production) -->
33
- <script src="https://cdn.auth0.com/js/lock/12.3.0/lock.min.js"></script>
33
+ <script src="https://cdn.auth0.com/js/lock/12.5.0/lock.min.js"></script>
34
34
  ```
35
35
  ### Configure Auth0
36
36
 
package/lib/CSSCore.js CHANGED
@@ -50,7 +50,6 @@ var CSSCore = {
50
50
  .replace(/^\s*|\s*$/g, ''); // trim the ends
51
51
  }
52
52
  }
53
-
54
53
  return element;
55
54
  },
56
55
  /**
@@ -5,7 +5,7 @@ var _immutable = _interopRequireWildcard(require("immutable"));
5
5
  var _actions = require("../../../connection/database/actions");
6
6
  var _store = require("../../../store");
7
7
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
8
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
8
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
9
9
  var webApiMock = function webApiMock() {
10
10
  return require('core/web_api');
11
11
  };
@@ -177,7 +177,6 @@ describe('database/actions.js', function () {
177
177
  family_name: {
178
178
  value: 'Test <a href="https://www.google.co.uk">Fake link</a>' // HTML but not malicious
179
179
  },
180
-
181
180
  given_name: {
182
181
  value: '<img src=x onerror=alert(1)//>'
183
182
  },
@@ -4,7 +4,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  var _immutable = _interopRequireWildcard(require("immutable"));
5
5
  var _database = require("../../../connection/database");
6
6
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
7
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
7
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
8
8
  describe('database/index.js', function () {
9
9
  describe('databaseUsernameValue', function () {
10
10
  var getModel = function getModel(email, username, usernameRequired) {
@@ -6,7 +6,7 @@ var _immutable = _interopRequireDefault(require("immutable"));
6
6
  var _testUtils = require("testUtils");
7
7
  var _login_pane = _interopRequireDefault(require("../../../connection/database/login_pane"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
9
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
10
10
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
11
11
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
12
12
  var lock = _immutable.default.fromJS({