wcz-test 6.24.0 → 6.24.2
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.
- package/dist/ApprovalStatus-BtAVFn5p.js +8 -0
- package/dist/ApprovalStatus-BtAVFn5p.js.map +1 -0
- package/dist/{node_modules/react/cjs/react-jsx-runtime.development.js → DialogsContext-BKtkEAfL.js} +48 -4
- package/dist/DialogsContext-BKtkEAfL.js.map +1 -0
- package/dist/{hooks/DialogsHooks.js → DialogsHooks-BQVpqCq9.js} +4 -7
- package/dist/DialogsHooks-BQVpqCq9.js.map +1 -0
- package/dist/FileHooks-Cg9ver7z.js +3478 -0
- package/dist/FileHooks-Cg9ver7z.js.map +1 -0
- package/dist/{models/file/FileMeta.js → FileMeta-G1oT3mYK.js} +2 -2
- package/dist/FileMeta-G1oT3mYK.js.map +1 -0
- package/dist/{components/router/RouterListItemButton.js → RouterListItemButton-IUVgwnz3.js} +4 -4
- package/dist/RouterListItemButton-IUVgwnz3.js.map +1 -0
- package/dist/client.js +4 -4
- package/dist/compiler-runtime-BGHur82y.js +46 -0
- package/dist/compiler-runtime-BGHur82y.js.map +1 -0
- package/dist/components.js +1486 -15
- package/dist/components.js.map +1 -1
- package/dist/{env.js → env-gsqZ6zZD.js} +3 -3
- package/dist/env-gsqZ6zZD.js.map +1 -0
- package/dist/exports/client.d.ts +17 -4
- package/dist/exports/components.d.ts +44 -14
- package/dist/exports/hooks.d.ts +23 -4
- package/dist/exports/index.d.ts +17 -4
- package/dist/exports/models.d.ts +107 -25
- package/dist/exports/queries.d.ts +95 -4
- package/dist/exports/server.d.ts +14 -4
- package/dist/exports/utils.d.ts +11 -3
- package/dist/exports/vite.d.ts +5 -1
- package/dist/hooks.js +1000 -3
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +1752 -4
- package/dist/index.js.map +1 -1
- package/dist/models.js +159 -10
- package/dist/models.js.map +1 -1
- package/dist/queries.js +935 -14
- package/dist/queries.js.map +1 -1
- package/dist/{lib/queryClient.js → queryClient-CNvC95mU.js} +2 -2
- package/dist/queryClient-CNvC95mU.js.map +1 -0
- package/dist/server.js +84 -1
- package/dist/server.js.map +1 -1
- package/dist/{lib/auth/session.js → session-vW7WZadj.js} +24 -9
- package/dist/session-vW7WZadj.js.map +1 -0
- package/dist/{lib/utils.js → utils-MD9YwOtu.js} +9 -9
- package/dist/utils-MD9YwOtu.js.map +1 -0
- package/dist/utils.js +2 -2
- package/dist/vite.js +61 -1
- package/dist/vite.js.map +1 -1
- package/package.json +1 -1
- package/dist/_virtual/___vite-browser-external.js +0 -7
- package/dist/_virtual/___vite-browser-external.js.map +0 -1
- package/dist/_virtual/__vite-browser-external.js +0 -5
- package/dist/_virtual/__vite-browser-external.js.map +0 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -37
- package/dist/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/_virtual/compiler-runtime.js +0 -6
- package/dist/_virtual/compiler-runtime.js.map +0 -1
- package/dist/_virtual/compiler-runtime2.js +0 -5
- package/dist/_virtual/compiler-runtime2.js.map +0 -1
- package/dist/_virtual/index.js +0 -8
- package/dist/_virtual/index.js.map +0 -1
- package/dist/_virtual/index2.js +0 -5
- package/dist/_virtual/index2.js.map +0 -1
- package/dist/_virtual/index3.js +0 -5
- package/dist/_virtual/index3.js.map +0 -1
- package/dist/_virtual/index4.js +0 -5
- package/dist/_virtual/index4.js.map +0 -1
- package/dist/_virtual/index5.js +0 -5
- package/dist/_virtual/index5.js.map +0 -1
- package/dist/_virtual/index6.js +0 -5
- package/dist/_virtual/index6.js.map +0 -1
- package/dist/_virtual/jsx-runtime.js +0 -6
- package/dist/_virtual/jsx-runtime.js.map +0 -1
- package/dist/_virtual/jsx-runtime2.js +0 -5
- package/dist/_virtual/jsx-runtime2.js.map +0 -1
- package/dist/_virtual/re.js +0 -5
- package/dist/_virtual/re.js.map +0 -1
- package/dist/_virtual/react-compiler-runtime.development.js +0 -5
- package/dist/_virtual/react-compiler-runtime.development.js.map +0 -1
- package/dist/_virtual/react-compiler-runtime.production.js +0 -5
- package/dist/_virtual/react-compiler-runtime.production.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.development.js +0 -5
- package/dist/_virtual/react-jsx-runtime.development.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.production.js +0 -5
- package/dist/_virtual/react-jsx-runtime.production.js.map +0 -1
- package/dist/components/core/AppTitle.d.ts +0 -2
- package/dist/components/core/AppTitle.js +0 -23
- package/dist/components/core/AppTitle.js.map +0 -1
- package/dist/components/core/Fullscreen.d.ts +0 -3
- package/dist/components/core/Fullscreen.js +0 -104
- package/dist/components/core/Fullscreen.js.map +0 -1
- package/dist/components/core/Layout.d.ts +0 -8
- package/dist/components/core/Layout.js +0 -214
- package/dist/components/core/Layout.js.map +0 -1
- package/dist/components/core/ToolbarAccount.d.ts +0 -2
- package/dist/components/core/ToolbarAccount.js +0 -582
- package/dist/components/core/ToolbarAccount.js.map +0 -1
- package/dist/components/core/TypographyWithIcon.d.ts +0 -7
- package/dist/components/core/TypographyWithIcon.js +0 -117
- package/dist/components/core/TypographyWithIcon.js.map +0 -1
- package/dist/components/core/navigation/NavigationList.d.ts +0 -22
- package/dist/components/core/navigation/NavigationList.js +0 -166
- package/dist/components/core/navigation/NavigationList.js.map +0 -1
- package/dist/components/core/navigation/NavigationListItem.d.ts +0 -16
- package/dist/components/core/navigation/NavigationListItem.js +0 -467
- package/dist/components/core/navigation/NavigationListItem.js.map +0 -1
- package/dist/components/core/navigation/NavigationRail.d.ts +0 -12
- package/dist/components/core/navigation/NavigationRail.js +0 -141
- package/dist/components/core/navigation/NavigationRail.js.map +0 -1
- package/dist/components/data-grid/ChipInputCell.d.ts +0 -9
- package/dist/components/data-grid/ChipInputCell.js +0 -95
- package/dist/components/data-grid/ChipInputCell.js.map +0 -1
- package/dist/components/data-grid/EditableColumnHeader.d.ts +0 -2
- package/dist/components/data-grid/EditableColumnHeader.js +0 -30
- package/dist/components/data-grid/EditableColumnHeader.js.map +0 -1
- package/dist/components/file/Dropzone.d.ts +0 -8
- package/dist/components/file/Dropzone.js +0 -151
- package/dist/components/file/Dropzone.js.map +0 -1
- package/dist/components/file/FileViewer.d.ts +0 -20
- package/dist/components/file/FileViewer.js +0 -127
- package/dist/components/file/FileViewer.js.map +0 -1
- package/dist/components/file/fileViewer/FileViewerGrid.d.ts +0 -17
- package/dist/components/file/fileViewer/FileViewerGrid.js +0 -282
- package/dist/components/file/fileViewer/FileViewerGrid.js.map +0 -1
- package/dist/components/file/fileViewer/FileViewerList.d.ts +0 -12
- package/dist/components/file/fileViewer/FileViewerList.js +0 -191
- package/dist/components/file/fileViewer/FileViewerList.js.map +0 -1
- package/dist/components/file/fileViewer/ImageViewer.d.ts +0 -6
- package/dist/components/file/fileViewer/ImageViewer.js +0 -75
- package/dist/components/file/fileViewer/ImageViewer.js.map +0 -1
- package/dist/components/file/fileViewer/common/ActionsMenu.d.ts +0 -15
- package/dist/components/file/fileViewer/common/ActionsMenu.js +0 -159
- package/dist/components/file/fileViewer/common/ActionsMenu.js.map +0 -1
- package/dist/components/form/FormAutocomplete.d.ts +0 -7
- package/dist/components/form/FormAutocomplete.js +0 -80
- package/dist/components/form/FormAutocomplete.js.map +0 -1
- package/dist/components/form/FormCheckbox.d.ts +0 -7
- package/dist/components/form/FormCheckbox.js +0 -81
- package/dist/components/form/FormCheckbox.js.map +0 -1
- package/dist/components/form/FormDatePicker.d.ts +0 -8
- package/dist/components/form/FormDatePicker.js +0 -77
- package/dist/components/form/FormDatePicker.js.map +0 -1
- package/dist/components/form/FormDateRangePicker.d.ts +0 -8
- package/dist/components/form/FormDateRangePicker.js +0 -77
- package/dist/components/form/FormDateRangePicker.js.map +0 -1
- package/dist/components/form/FormDateTimePicker.d.ts +0 -8
- package/dist/components/form/FormDateTimePicker.js +0 -77
- package/dist/components/form/FormDateTimePicker.js.map +0 -1
- package/dist/components/form/FormDateTimeRangePicker.d.ts +0 -8
- package/dist/components/form/FormDateTimeRangePicker.js +0 -77
- package/dist/components/form/FormDateTimeRangePicker.js.map +0 -1
- package/dist/components/form/FormNumberField.d.ts +0 -9
- package/dist/components/form/FormNumberField.js +0 -73
- package/dist/components/form/FormNumberField.js.map +0 -1
- package/dist/components/form/FormRadioGroup.d.ts +0 -13
- package/dist/components/form/FormRadioGroup.js +0 -113
- package/dist/components/form/FormRadioGroup.js.map +0 -1
- package/dist/components/form/FormSlider.d.ts +0 -7
- package/dist/components/form/FormSlider.js +0 -94
- package/dist/components/form/FormSlider.js.map +0 -1
- package/dist/components/form/FormSubmitButton.d.ts +0 -4
- package/dist/components/form/FormSubmitButton.js +0 -50
- package/dist/components/form/FormSubmitButton.js.map +0 -1
- package/dist/components/form/FormSwitch.d.ts +0 -7
- package/dist/components/form/FormSwitch.js +0 -81
- package/dist/components/form/FormSwitch.js.map +0 -1
- package/dist/components/form/FormTextField.d.ts +0 -7
- package/dist/components/form/FormTextField.js +0 -52
- package/dist/components/form/FormTextField.js.map +0 -1
- package/dist/components/form/FormTimePicker.d.ts +0 -8
- package/dist/components/form/FormTimePicker.js +0 -77
- package/dist/components/form/FormTimePicker.js.map +0 -1
- package/dist/components/form/FormTimeRangePicker.d.ts +0 -8
- package/dist/components/form/FormTimeRangePicker.js +0 -77
- package/dist/components/form/FormTimeRangePicker.js.map +0 -1
- package/dist/components/router/RouterButton.d.ts +0 -6
- package/dist/components/router/RouterButton.js +0 -35
- package/dist/components/router/RouterButton.js.map +0 -1
- package/dist/components/router/RouterError.d.ts +0 -7
- package/dist/components/router/RouterError.js +0 -62
- package/dist/components/router/RouterError.js.map +0 -1
- package/dist/components/router/RouterGridActionsCellItem.d.ts +0 -6
- package/dist/components/router/RouterGridActionsCellItem.js +0 -35
- package/dist/components/router/RouterGridActionsCellItem.js.map +0 -1
- package/dist/components/router/RouterIconButton.d.ts +0 -6
- package/dist/components/router/RouterIconButton.js +0 -35
- package/dist/components/router/RouterIconButton.js.map +0 -1
- package/dist/components/router/RouterLink.d.ts +0 -6
- package/dist/components/router/RouterLink.js +0 -35
- package/dist/components/router/RouterLink.js.map +0 -1
- package/dist/components/router/RouterListItemButton.d.ts +0 -6
- package/dist/components/router/RouterListItemButton.js.map +0 -1
- package/dist/components/router/RouterNotFound.d.ts +0 -1
- package/dist/components/router/RouterNotFound.js +0 -53
- package/dist/components/router/RouterNotFound.js.map +0 -1
- package/dist/components/router/RouterTab.d.ts +0 -6
- package/dist/components/router/RouterTab.js +0 -35
- package/dist/components/router/RouterTab.js.map +0 -1
- package/dist/contexts/DialogsContext.d.ts +0 -6
- package/dist/contexts/DialogsContext.js +0 -6
- package/dist/contexts/DialogsContext.js.map +0 -1
- package/dist/contexts/FileContext.d.ts +0 -13
- package/dist/contexts/FileContext.js +0 -14
- package/dist/contexts/FileContext.js.map +0 -1
- package/dist/env.d.ts +0 -13
- package/dist/env.js.map +0 -1
- package/dist/hooks/DialogsHooks.d.ts +0 -42
- package/dist/hooks/DialogsHooks.js.map +0 -1
- package/dist/hooks/FormHooks.d.ts +0 -52
- package/dist/hooks/FormHooks.js +0 -55
- package/dist/hooks/FormHooks.js.map +0 -1
- package/dist/lib/auth/api.d.ts +0 -3
- package/dist/lib/auth/api.js +0 -97
- package/dist/lib/auth/api.js.map +0 -1
- package/dist/lib/auth/entra.d.ts +0 -2
- package/dist/lib/auth/entra.js +0 -13
- package/dist/lib/auth/entra.js.map +0 -1
- package/dist/lib/auth/graph.d.ts +0 -17
- package/dist/lib/auth/graph.js +0 -72
- package/dist/lib/auth/graph.js.map +0 -1
- package/dist/lib/auth/session.d.ts +0 -24
- package/dist/lib/auth/session.js.map +0 -1
- package/dist/lib/queryClient.d.ts +0 -2
- package/dist/lib/queryClient.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -52
- package/dist/lib/utils.js.map +0 -1
- package/dist/lib/vite-plugin.d.ts +0 -2
- package/dist/lib/vite-plugin.js +0 -65
- package/dist/lib/vite-plugin.js.map +0 -1
- package/dist/middleware/auth.d.ts +0 -22
- package/dist/models/Navigation.d.ts +0 -18
- package/dist/models/User.d.ts +0 -16
- package/dist/models/User.js +0 -18
- package/dist/models/User.js.map +0 -1
- package/dist/models/approval/Approval.d.ts +0 -177
- package/dist/models/approval/Approval.js +0 -81
- package/dist/models/approval/Approval.js.map +0 -1
- package/dist/models/approval/ApprovalEmployee.d.ts +0 -7
- package/dist/models/approval/ApprovalEmployee.js +0 -10
- package/dist/models/approval/ApprovalEmployee.js.map +0 -1
- package/dist/models/approval/ApprovalFlow.d.ts +0 -49
- package/dist/models/approval/ApprovalFlow.js +0 -15
- package/dist/models/approval/ApprovalFlow.js.map +0 -1
- package/dist/models/approval/ApprovalFlowStep.d.ts +0 -29
- package/dist/models/approval/ApprovalFlowStep.js +0 -17
- package/dist/models/approval/ApprovalFlowStep.js.map +0 -1
- package/dist/models/approval/ApprovalRequestType.d.ts +0 -5
- package/dist/models/approval/ApprovalRequestType.js +0 -6
- package/dist/models/approval/ApprovalRequestType.js.map +0 -1
- package/dist/models/approval/ApprovalStatus.d.ts +0 -9
- package/dist/models/approval/ApprovalStatus.js +0 -6
- package/dist/models/approval/ApprovalStatus.js.map +0 -1
- package/dist/models/approval/ApprovalStepResult.d.ts +0 -11
- package/dist/models/approval/ApprovalStepResult.js +0 -6
- package/dist/models/approval/ApprovalStepResult.js.map +0 -1
- package/dist/models/approval/StepApprovalOrder.d.ts +0 -6
- package/dist/models/approval/StepApprovalOrder.js +0 -6
- package/dist/models/approval/StepApprovalOrder.js.map +0 -1
- package/dist/models/email/Email.d.ts +0 -13
- package/dist/models/email/Email.js +0 -14
- package/dist/models/email/Email.js.map +0 -1
- package/dist/models/email/EmailAttachment.d.ts +0 -6
- package/dist/models/email/EmailAttachment.js +0 -9
- package/dist/models/email/EmailAttachment.js.map +0 -1
- package/dist/models/file/FileActions.d.ts +0 -6
- package/dist/models/file/FileMeta.d.ts +0 -15
- package/dist/models/file/FileMeta.js.map +0 -1
- package/dist/models/peoplesoft/Department.d.ts +0 -58
- package/dist/models/peoplesoft/Department.js +0 -19
- package/dist/models/peoplesoft/Department.js.map +0 -1
- package/dist/models/peoplesoft/Employee.d.ts +0 -46
- package/dist/models/peoplesoft/Employee.js +0 -43
- package/dist/models/peoplesoft/Employee.js.map +0 -1
- package/dist/models/peoplesoft/EmployeeCategoryGroup.d.ts +0 -6
- package/dist/models/peoplesoft/EmployeeCategoryGroup.js +0 -6
- package/dist/models/peoplesoft/EmployeeCategoryGroup.js.map +0 -1
- package/dist/models/peoplesoft/EmployeeStatus.d.ts +0 -6
- package/dist/models/peoplesoft/EmployeeStatus.js +0 -6
- package/dist/models/peoplesoft/EmployeeStatus.js.map +0 -1
- package/dist/node_modules/@oslojs/binary/dist/bits.js +0 -7
- package/dist/node_modules/@oslojs/binary/dist/bits.js.map +0 -1
- package/dist/node_modules/@oslojs/binary/dist/uint.js +0 -80
- package/dist/node_modules/@oslojs/binary/dist/uint.js.map +0 -1
- package/dist/node_modules/@oslojs/crypto/dist/sha2/sha256.js +0 -182
- package/dist/node_modules/@oslojs/crypto/dist/sha2/sha256.js.map +0 -1
- package/dist/node_modules/@oslojs/crypto/dist/sha2/sha512.js +0 -83
- package/dist/node_modules/@oslojs/crypto/dist/sha2/sha512.js.map +0 -1
- package/dist/node_modules/@oslojs/encoding/dist/base32.js +0 -11
- package/dist/node_modules/@oslojs/encoding/dist/base32.js.map +0 -1
- package/dist/node_modules/@oslojs/encoding/dist/base64.js +0 -46
- package/dist/node_modules/@oslojs/encoding/dist/base64.js.map +0 -1
- package/dist/node_modules/@oslojs/jwt/dist/index.js +0 -28
- package/dist/node_modules/@oslojs/jwt/dist/index.js.map +0 -1
- package/dist/node_modules/@oslojs/jwt/node_modules/@oslojs/encoding/dist/base32.js +0 -11
- package/dist/node_modules/@oslojs/jwt/node_modules/@oslojs/encoding/dist/base32.js.map +0 -1
- package/dist/node_modules/@oslojs/jwt/node_modules/@oslojs/encoding/dist/base64.js +0 -126
- package/dist/node_modules/@oslojs/jwt/node_modules/@oslojs/encoding/dist/base64.js.map +0 -1
- package/dist/node_modules/arctic/dist/client.js +0 -12
- package/dist/node_modules/arctic/dist/client.js.map +0 -1
- package/dist/node_modules/arctic/dist/oauth2.js +0 -76
- package/dist/node_modules/arctic/dist/oauth2.js.map +0 -1
- package/dist/node_modules/arctic/dist/oidc.js +0 -14
- package/dist/node_modules/arctic/dist/oidc.js.map +0 -1
- package/dist/node_modules/arctic/dist/providers/microsoft-entra-id.js +0 -73
- package/dist/node_modules/arctic/dist/providers/microsoft-entra-id.js.map +0 -1
- package/dist/node_modules/arctic/dist/request.js +0 -149
- package/dist/node_modules/arctic/dist/request.js.map +0 -1
- package/dist/node_modules/arctic/dist/utils.js +0 -25
- package/dist/node_modules/arctic/dist/utils.js.map +0 -1
- package/dist/node_modules/base64-js/index.js +0 -103
- package/dist/node_modules/base64-js/index.js.map +0 -1
- package/dist/node_modules/buffer/index.js +0 -1598
- package/dist/node_modules/buffer/index.js.map +0 -1
- package/dist/node_modules/buffer-equal-constant-time/index.js +0 -39
- package/dist/node_modules/buffer-equal-constant-time/index.js.map +0 -1
- package/dist/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js +0 -140
- package/dist/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js.map +0 -1
- package/dist/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js +0 -28
- package/dist/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js.map +0 -1
- package/dist/node_modules/ieee754/index.js +0 -88
- package/dist/node_modules/ieee754/index.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/decode.js +0 -38
- package/dist/node_modules/jsonwebtoken/decode.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/index.js +0 -25
- package/dist/node_modules/jsonwebtoken/index.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/lib/JsonWebTokenError.js +0 -23
- package/dist/node_modules/jsonwebtoken/lib/JsonWebTokenError.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/lib/NotBeforeError.js +0 -21
- package/dist/node_modules/jsonwebtoken/lib/NotBeforeError.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/lib/TokenExpiredError.js +0 -21
- package/dist/node_modules/jsonwebtoken/lib/TokenExpiredError.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js +0 -14
- package/dist/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/lib/psSupported.js +0 -14
- package/dist/node_modules/jsonwebtoken/lib/psSupported.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js +0 -14
- package/dist/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/lib/timespan.js +0 -27
- package/dist/node_modules/jsonwebtoken/lib/timespan.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js +0 -60
- package/dist/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/classes/comparator.js +0 -123
- package/dist/node_modules/jsonwebtoken/node_modules/semver/classes/comparator.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/classes/range.js +0 -388
- package/dist/node_modules/jsonwebtoken/node_modules/semver/classes/range.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/classes/semver.js +0 -288
- package/dist/node_modules/jsonwebtoken/node_modules/semver/classes/semver.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/clean.js +0 -18
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/clean.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/cmp.js +0 -60
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/cmp.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/coerce.js +0 -53
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/coerce.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/compare-build.js +0 -19
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/compare-build.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/compare-loose.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/compare-loose.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/compare.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/compare.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/diff.js +0 -49
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/diff.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/eq.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/eq.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/gt.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/gt.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/gte.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/gte.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/inc.js +0 -29
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/inc.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/lt.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/lt.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/lte.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/lte.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/major.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/major.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/minor.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/minor.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/neq.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/neq.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/parse.js +0 -27
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/parse.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/patch.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/patch.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/prerelease.js +0 -18
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/prerelease.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/rcompare.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/rcompare.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/rsort.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/rsort.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/satisfies.js +0 -22
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/satisfies.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/sort.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/sort.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/valid.js +0 -18
- package/dist/node_modules/jsonwebtoken/node_modules/semver/functions/valid.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/index.js +0 -140
- package/dist/node_modules/jsonwebtoken/node_modules/semver/index.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/constants.js +0 -36
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/constants.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/debug.js +0 -14
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/debug.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/identifiers.js +0 -29
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/identifiers.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/lrucache.js +0 -42
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/lrucache.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/parse-options.js +0 -23
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/parse-options.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/re.js +0 -96
- package/dist/node_modules/jsonwebtoken/node_modules/semver/internal/re.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/gtr.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/gtr.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/intersects.js +0 -19
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/intersects.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/ltr.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/ltr.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/max-satisfying.js +0 -35
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/max-satisfying.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/min-satisfying.js +0 -35
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/min-satisfying.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/min-version.js +0 -66
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/min-version.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/outside.js +0 -81
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/outside.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/simplify.js +0 -56
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/simplify.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/subset.js +0 -170
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/subset.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/to-comparators.js +0 -15
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/to-comparators.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/valid.js +0 -21
- package/dist/node_modules/jsonwebtoken/node_modules/semver/ranges/valid.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/sign.js +0 -242
- package/dist/node_modules/jsonwebtoken/sign.js.map +0 -1
- package/dist/node_modules/jsonwebtoken/verify.js +0 -229
- package/dist/node_modules/jsonwebtoken/verify.js.map +0 -1
- package/dist/node_modules/jwa/index.js +0 -233
- package/dist/node_modules/jwa/index.js.map +0 -1
- package/dist/node_modules/jws/index.js +0 -40
- package/dist/node_modules/jws/index.js.map +0 -1
- package/dist/node_modules/jws/lib/data-stream.js +0 -55
- package/dist/node_modules/jws/lib/data-stream.js.map +0 -1
- package/dist/node_modules/jws/lib/sign-stream.js +0 -85
- package/dist/node_modules/jws/lib/sign-stream.js.map +0 -1
- package/dist/node_modules/jws/lib/tostring.js +0 -20
- package/dist/node_modules/jws/lib/tostring.js.map +0 -1
- package/dist/node_modules/jws/lib/verify-stream.js +0 -125
- package/dist/node_modules/jws/lib/verify-stream.js.map +0 -1
- package/dist/node_modules/lodash.includes/index.js +0 -181
- package/dist/node_modules/lodash.includes/index.js.map +0 -1
- package/dist/node_modules/lodash.isboolean/index.js +0 -21
- package/dist/node_modules/lodash.isboolean/index.js.map +0 -1
- package/dist/node_modules/lodash.isinteger/index.js +0 -67
- package/dist/node_modules/lodash.isinteger/index.js.map +0 -1
- package/dist/node_modules/lodash.isnumber/index.js +0 -21
- package/dist/node_modules/lodash.isnumber/index.js.map +0 -1
- package/dist/node_modules/lodash.isplainobject/index.js +0 -48
- package/dist/node_modules/lodash.isplainobject/index.js.map +0 -1
- package/dist/node_modules/lodash.isstring/index.js +0 -22
- package/dist/node_modules/lodash.isstring/index.js.map +0 -1
- package/dist/node_modules/lodash.once/index.js +0 -84
- package/dist/node_modules/lodash.once/index.js.map +0 -1
- package/dist/node_modules/ms/index.js +0 -121
- package/dist/node_modules/ms/index.js.map +0 -1
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +0 -22
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js.map +0 -1
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +0 -16
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -33
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.js.map +0 -1
- package/dist/node_modules/react/compiler-runtime.js +0 -18
- package/dist/node_modules/react/compiler-runtime.js.map +0 -1
- package/dist/node_modules/react/jsx-runtime.js +0 -18
- package/dist/node_modules/react/jsx-runtime.js.map +0 -1
- package/dist/node_modules/safe-buffer/index.js +0 -66
- package/dist/node_modules/safe-buffer/index.js.map +0 -1
- package/dist/providers/DialogsProvider.d.ts +0 -5
- package/dist/providers/DialogsProvider.js +0 -79
- package/dist/providers/DialogsProvider.js.map +0 -1
- package/dist/providers/LayoutProvider.d.ts +0 -11
- package/dist/providers/LayoutProvider.js +0 -94
- package/dist/providers/LayoutProvider.js.map +0 -1
- package/dist/queries/ApprovalHooks.d.ts +0 -338
- package/dist/queries/ApprovalHooks.js +0 -326
- package/dist/queries/ApprovalHooks.js.map +0 -1
- package/dist/queries/FileHooks.d.ts +0 -151
- package/dist/queries/FileHooks.js +0 -493
- package/dist/queries/FileHooks.js.map +0 -1
- package/dist/queries/PeopleSoftHooks.d.ts +0 -537
- package/dist/queries/PeopleSoftHooks.js +0 -628
- package/dist/queries/PeopleSoftHooks.js.map +0 -1
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { createS256CodeChallenge } from "../oauth2.js";
|
|
2
|
-
import { joinURIAndPath, createOAuth2Request, encodeBasicCredentials, sendTokenRequest } from "../request.js";
|
|
3
|
-
class MicrosoftEntraId {
|
|
4
|
-
authorizationEndpoint;
|
|
5
|
-
tokenEndpoint;
|
|
6
|
-
clientId;
|
|
7
|
-
clientSecret;
|
|
8
|
-
redirectURI;
|
|
9
|
-
constructor(tenant, clientId, clientSecret, redirectURI) {
|
|
10
|
-
this.authorizationEndpoint = joinURIAndPath("https://login.microsoftonline.com", tenant, "/oauth2/v2.0/authorize");
|
|
11
|
-
this.tokenEndpoint = joinURIAndPath("https://login.microsoftonline.com", tenant, "/oauth2/v2.0/token");
|
|
12
|
-
this.clientId = clientId;
|
|
13
|
-
this.clientSecret = clientSecret;
|
|
14
|
-
this.redirectURI = redirectURI;
|
|
15
|
-
}
|
|
16
|
-
createAuthorizationURL(state, codeVerifier, scopes) {
|
|
17
|
-
const url = new URL(this.authorizationEndpoint);
|
|
18
|
-
url.searchParams.set("response_type", "code");
|
|
19
|
-
url.searchParams.set("client_id", this.clientId);
|
|
20
|
-
url.searchParams.set("redirect_uri", this.redirectURI);
|
|
21
|
-
url.searchParams.set("state", state);
|
|
22
|
-
const codeChallenge = createS256CodeChallenge(codeVerifier);
|
|
23
|
-
url.searchParams.set("code_challenge_method", "S256");
|
|
24
|
-
url.searchParams.set("code_challenge", codeChallenge);
|
|
25
|
-
if (scopes.length > 0) {
|
|
26
|
-
url.searchParams.set("scope", scopes.join(" "));
|
|
27
|
-
}
|
|
28
|
-
return url;
|
|
29
|
-
}
|
|
30
|
-
async validateAuthorizationCode(code, codeVerifier) {
|
|
31
|
-
const body = new URLSearchParams();
|
|
32
|
-
body.set("grant_type", "authorization_code");
|
|
33
|
-
body.set("code", code);
|
|
34
|
-
body.set("redirect_uri", this.redirectURI);
|
|
35
|
-
body.set("code_verifier", codeVerifier);
|
|
36
|
-
if (this.clientSecret === null) {
|
|
37
|
-
body.set("client_id", this.clientId);
|
|
38
|
-
}
|
|
39
|
-
const request = createOAuth2Request(this.tokenEndpoint, body);
|
|
40
|
-
if (this.clientSecret !== null) {
|
|
41
|
-
const encodedCredentials = encodeBasicCredentials(this.clientId, this.clientSecret);
|
|
42
|
-
request.headers.set("Authorization", `Basic ${encodedCredentials}`);
|
|
43
|
-
} else {
|
|
44
|
-
request.headers.set("Origin", "arctic");
|
|
45
|
-
}
|
|
46
|
-
const tokens = await sendTokenRequest(request);
|
|
47
|
-
return tokens;
|
|
48
|
-
}
|
|
49
|
-
async refreshAccessToken(refreshToken, scopes) {
|
|
50
|
-
const body = new URLSearchParams();
|
|
51
|
-
body.set("grant_type", "refresh_token");
|
|
52
|
-
body.set("refresh_token", refreshToken);
|
|
53
|
-
if (this.clientSecret === null) {
|
|
54
|
-
body.set("client_id", this.clientId);
|
|
55
|
-
}
|
|
56
|
-
if (scopes.length > 0) {
|
|
57
|
-
body.set("scope", scopes.join(" "));
|
|
58
|
-
}
|
|
59
|
-
const request = createOAuth2Request(this.tokenEndpoint, body);
|
|
60
|
-
if (this.clientSecret !== null) {
|
|
61
|
-
const encodedCredentials = encodeBasicCredentials(this.clientId, this.clientSecret);
|
|
62
|
-
request.headers.set("Authorization", `Basic ${encodedCredentials}`);
|
|
63
|
-
} else {
|
|
64
|
-
request.headers.set("Origin", "arctic");
|
|
65
|
-
}
|
|
66
|
-
const tokens = await sendTokenRequest(request);
|
|
67
|
-
return tokens;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
export {
|
|
71
|
-
MicrosoftEntraId
|
|
72
|
-
};
|
|
73
|
-
//# sourceMappingURL=microsoft-entra-id.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"microsoft-entra-id.js","sources":["../../../../../node_modules/arctic/dist/providers/microsoft-entra-id.js"],"sourcesContent":["import { createS256CodeChallenge } from \"../oauth2.js\";\nimport { createOAuth2Request, encodeBasicCredentials, joinURIAndPath, sendTokenRequest } from \"../request.js\";\nexport class MicrosoftEntraId {\n authorizationEndpoint;\n tokenEndpoint;\n clientId;\n clientSecret;\n redirectURI;\n constructor(tenant, clientId, clientSecret, redirectURI) {\n this.authorizationEndpoint = joinURIAndPath(\"https://login.microsoftonline.com\", tenant, \"/oauth2/v2.0/authorize\");\n this.tokenEndpoint = joinURIAndPath(\"https://login.microsoftonline.com\", tenant, \"/oauth2/v2.0/token\");\n this.clientId = clientId;\n this.clientSecret = clientSecret;\n this.redirectURI = redirectURI;\n }\n createAuthorizationURL(state, codeVerifier, scopes) {\n const url = new URL(this.authorizationEndpoint);\n url.searchParams.set(\"response_type\", \"code\");\n url.searchParams.set(\"client_id\", this.clientId);\n url.searchParams.set(\"redirect_uri\", this.redirectURI);\n url.searchParams.set(\"state\", state);\n const codeChallenge = createS256CodeChallenge(codeVerifier);\n url.searchParams.set(\"code_challenge_method\", \"S256\");\n url.searchParams.set(\"code_challenge\", codeChallenge);\n if (scopes.length > 0) {\n url.searchParams.set(\"scope\", scopes.join(\" \"));\n }\n return url;\n }\n async validateAuthorizationCode(code, codeVerifier) {\n const body = new URLSearchParams();\n body.set(\"grant_type\", \"authorization_code\");\n body.set(\"code\", code);\n body.set(\"redirect_uri\", this.redirectURI);\n body.set(\"code_verifier\", codeVerifier);\n if (this.clientSecret === null) {\n body.set(\"client_id\", this.clientId);\n }\n const request = createOAuth2Request(this.tokenEndpoint, body);\n if (this.clientSecret !== null) {\n const encodedCredentials = encodeBasicCredentials(this.clientId, this.clientSecret);\n request.headers.set(\"Authorization\", `Basic ${encodedCredentials}`);\n }\n else {\n // Origin header required for public clients. Value can be anything.\n request.headers.set(\"Origin\", \"arctic\");\n }\n const tokens = await sendTokenRequest(request);\n return tokens;\n }\n async refreshAccessToken(refreshToken, scopes) {\n const body = new URLSearchParams();\n body.set(\"grant_type\", \"refresh_token\");\n body.set(\"refresh_token\", refreshToken);\n if (this.clientSecret === null) {\n body.set(\"client_id\", this.clientId);\n }\n if (scopes.length > 0) {\n body.set(\"scope\", scopes.join(\" \"));\n }\n const request = createOAuth2Request(this.tokenEndpoint, body);\n if (this.clientSecret !== null) {\n const encodedCredentials = encodeBasicCredentials(this.clientId, this.clientSecret);\n request.headers.set(\"Authorization\", `Basic ${encodedCredentials}`);\n }\n else {\n // Origin header required for public clients. Value can be anything.\n request.headers.set(\"Origin\", \"arctic\");\n }\n const tokens = await sendTokenRequest(request);\n return tokens;\n }\n}\n"],"names":[],"mappings":";;AAEO,MAAM,iBAAiB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY,QAAQ,UAAU,cAAc,aAAa;AACrD,SAAK,wBAAwB,eAAe,qCAAqC,QAAQ,wBAAwB;AACjH,SAAK,gBAAgB,eAAe,qCAAqC,QAAQ,oBAAoB;AACrG,SAAK,WAAW;AAChB,SAAK,eAAe;AACpB,SAAK,cAAc;AAAA,EACvB;AAAA,EACA,uBAAuB,OAAO,cAAc,QAAQ;AAChD,UAAM,MAAM,IAAI,IAAI,KAAK,qBAAqB;AAC9C,QAAI,aAAa,IAAI,iBAAiB,MAAM;AAC5C,QAAI,aAAa,IAAI,aAAa,KAAK,QAAQ;AAC/C,QAAI,aAAa,IAAI,gBAAgB,KAAK,WAAW;AACrD,QAAI,aAAa,IAAI,SAAS,KAAK;AACnC,UAAM,gBAAgB,wBAAwB,YAAY;AAC1D,QAAI,aAAa,IAAI,yBAAyB,MAAM;AACpD,QAAI,aAAa,IAAI,kBAAkB,aAAa;AACpD,QAAI,OAAO,SAAS,GAAG;AACnB,UAAI,aAAa,IAAI,SAAS,OAAO,KAAK,GAAG,CAAC;AAAA,IAClD;AACA,WAAO;AAAA,EACX;AAAA,EACA,MAAM,0BAA0B,MAAM,cAAc;AAChD,UAAM,OAAO,IAAI,gBAAe;AAChC,SAAK,IAAI,cAAc,oBAAoB;AAC3C,SAAK,IAAI,QAAQ,IAAI;AACrB,SAAK,IAAI,gB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uth2Tokens } from "./oauth2.js";
|
|
4
|
-
import { trimRight, trimLeft } from "./utils.js";
|
|
5
|
-
function joinURIAndPath(base, ...path) {
|
|
6
|
-
let joined = trimRight(base, "/");
|
|
7
|
-
for (const part of path) {
|
|
8
|
-
joined = trimRight(joined, "/") + "/" + trimLeft(part, "/");
|
|
9
|
-
}
|
|
10
|
-
return joined;
|
|
11
|
-
}
|
|
12
|
-
function createOAuth2Request(endpoint, body) {
|
|
13
|
-
const bodyBytes = new TextEncoder().encode(body.toString());
|
|
14
|
-
const request = new Request(endpoint, {
|
|
15
|
-
method: "POST",
|
|
16
|
-
body: bodyBytes
|
|
17
|
-
});
|
|
18
|
-
request.headers.set("Content-Type", "application/x-www-form-urlencoded");
|
|
19
|
-
request.headers.set("Accept", "application/json");
|
|
20
|
-
request.headers.set("User-Agent", "arctic");
|
|
21
|
-
request.headers.set("Content-Length", bodyBytes.byteLength.toString());
|
|
22
|
-
return request;
|
|
23
|
-
}
|
|
24
|
-
function encodeBasicCredentials(username, password) {
|
|
25
|
-
const bytes = new TextEncoder().encode(`${username}:${password}`);
|
|
26
|
-
return encodeBase64(bytes);
|
|
27
|
-
}
|
|
28
|
-
async function sendTokenRequest(request) {
|
|
29
|
-
let response;
|
|
30
|
-
try {
|
|
31
|
-
response = await fetch(request);
|
|
32
|
-
} catch (e) {
|
|
33
|
-
throw new ArcticFetchError(e);
|
|
34
|
-
}
|
|
35
|
-
if (response.status === 400 || response.status === 401) {
|
|
36
|
-
let data;
|
|
37
|
-
try {
|
|
38
|
-
data = await response.json();
|
|
39
|
-
} catch {
|
|
40
|
-
throw new UnexpectedResponseError(response.status);
|
|
41
|
-
}
|
|
42
|
-
if (typeof data !== "object" || data === null) {
|
|
43
|
-
throw new UnexpectedErrorResponseBodyError(response.status, data);
|
|
44
|
-
}
|
|
45
|
-
let error;
|
|
46
|
-
try {
|
|
47
|
-
error = createOAuth2RequestError(data);
|
|
48
|
-
} catch {
|
|
49
|
-
throw new UnexpectedErrorResponseBodyError(response.status, data);
|
|
50
|
-
}
|
|
51
|
-
throw error;
|
|
52
|
-
}
|
|
53
|
-
if (response.status === 200) {
|
|
54
|
-
let data;
|
|
55
|
-
try {
|
|
56
|
-
data = await response.json();
|
|
57
|
-
} catch {
|
|
58
|
-
throw new UnexpectedResponseError(response.status);
|
|
59
|
-
}
|
|
60
|
-
if (typeof data !== "object" || data === null) {
|
|
61
|
-
throw new UnexpectedErrorResponseBodyError(response.status, data);
|
|
62
|
-
}
|
|
63
|
-
const tokens = new OAuth2Tokens(data);
|
|
64
|
-
return tokens;
|
|
65
|
-
}
|
|
66
|
-
if (response.body !== null) {
|
|
67
|
-
await response.body.cancel();
|
|
68
|
-
}
|
|
69
|
-
throw new UnexpectedResponseError(response.status);
|
|
70
|
-
}
|
|
71
|
-
function createOAuth2RequestError(result) {
|
|
72
|
-
let code;
|
|
73
|
-
if ("error" in result && typeof result.error === "string") {
|
|
74
|
-
code = result.error;
|
|
75
|
-
} else {
|
|
76
|
-
throw new Error("Invalid error response");
|
|
77
|
-
}
|
|
78
|
-
let description = null;
|
|
79
|
-
let uri = null;
|
|
80
|
-
let state = null;
|
|
81
|
-
if ("error_description" in result) {
|
|
82
|
-
if (typeof result.error_description !== "string") {
|
|
83
|
-
throw new Error("Invalid data");
|
|
84
|
-
}
|
|
85
|
-
description = result.error_description;
|
|
86
|
-
}
|
|
87
|
-
if ("error_uri" in result) {
|
|
88
|
-
if (typeof result.error_uri !== "string") {
|
|
89
|
-
throw new Error("Invalid data");
|
|
90
|
-
}
|
|
91
|
-
uri = result.error_uri;
|
|
92
|
-
}
|
|
93
|
-
if ("state" in result) {
|
|
94
|
-
if (typeof result.state !== "string") {
|
|
95
|
-
throw new Error("Invalid data");
|
|
96
|
-
}
|
|
97
|
-
state = result.state;
|
|
98
|
-
}
|
|
99
|
-
const error = new OAuth2RequestError(code, description, uri, state);
|
|
100
|
-
return error;
|
|
101
|
-
}
|
|
102
|
-
class ArcticFetchError extends Error {
|
|
103
|
-
constructor(cause) {
|
|
104
|
-
super("Failed to send request", {
|
|
105
|
-
cause
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
class OAuth2RequestError extends Error {
|
|
110
|
-
code;
|
|
111
|
-
description;
|
|
112
|
-
uri;
|
|
113
|
-
state;
|
|
114
|
-
constructor(code, description, uri, state) {
|
|
115
|
-
super(`OAuth request error: ${code}`);
|
|
116
|
-
this.code = code;
|
|
117
|
-
this.description = description;
|
|
118
|
-
this.uri = uri;
|
|
119
|
-
this.state = state;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
class UnexpectedResponseError extends Error {
|
|
123
|
-
status;
|
|
124
|
-
constructor(responseStatus) {
|
|
125
|
-
super("Unexpected error response");
|
|
126
|
-
this.status = responseStatus;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
class UnexpectedErrorResponseBodyError extends Error {
|
|
130
|
-
status;
|
|
131
|
-
data;
|
|
132
|
-
constructor(status, data) {
|
|
133
|
-
super("Unexpected error response body");
|
|
134
|
-
this.status = status;
|
|
135
|
-
this.data = data;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
export {
|
|
139
|
-
ArcticFetchError,
|
|
140
|
-
OAuth2RequestError,
|
|
141
|
-
UnexpectedErrorResponseBodyError,
|
|
142
|
-
UnexpectedResponseError,
|
|
143
|
-
createOAuth2Request,
|
|
144
|
-
createOAuth2RequestError,
|
|
145
|
-
encodeBasicCredentials,
|
|
146
|
-
joinURIAndPath,
|
|
147
|
-
sendTokenRequest
|
|
148
|
-
};
|
|
149
|
-
//# sourceMappingURL=request.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sources":["../../../../node_modules/arctic/dist/request.js"],"sourcesContent":["import * as encoding from \"@oslojs/encoding\";\nimport { OAuth2Tokens } from \"./oauth2.js\";\nimport { trimLeft, trimRight } from \"./utils.js\";\nexport function joinURIAndPath(base, ...path) {\n let joined = trimRight(base, \"/\");\n for (const part of path) {\n joined = trimRight(joined, \"/\") + \"/\" + trimLeft(part, \"/\");\n }\n return joined;\n}\nexport function createOAuth2Request(endpoint, body) {\n const bodyBytes = new TextEncoder().encode(body.toString());\n const request = new Request(endpoint, {\n method: \"POST\",\n body: bodyBytes\n });\n request.headers.set(\"Content-Type\", \"application/x-www-form-urlencoded\");\n request.headers.set(\"Accept\", \"application/json\");\n // Required by GitHub, and probably by others as well\n request.headers.set(\"User-Agent\", \"arctic\");\n // Required by Reddit\n request.headers.set(\"Content-Length\", bodyBytes.byteLength.toString());\n return request;\n}\nexport function encodeBasicCredentials(username, password) {\n const bytes = new TextEncoder().encode(`${username}:${password}`);\n return encoding.encodeBase64(bytes);\n}\nexport async function sendTokenRequest(request) {\n let response;\n try {\n response = await fetch(request);\n }\n catch (e) {\n throw new ArcticFetchError(e);\n }\n if (response.status === 400 || response.status === 401) {\n let data;\n try {\n data = await response.json();\n }\n catch {\n throw new UnexpectedResponseError(response.status);\n }\n if (typeof data !== \"object\" || data === null) {\n throw new UnexpectedErrorResponseBodyError(response.status, data);\n }\n let error;\n try {\n error = createOAuth2RequestError(data);\n }\n catch {\n throw new UnexpectedErrorResponseBodyError(response.status, data);\n }\n throw error;\n }\n if (response.status === 200) {\n let data;\n try {\n data = await response.json();\n }\n catch {\n throw new UnexpectedResponseError(response.status);\n }\n if (typeof data !== \"object\" || data === null) {\n throw new UnexpectedErrorResponseBodyError(response.status, data);\n }\n const tokens = new OAuth2Tokens(data);\n return tokens;\n }\n if (response.body !== null) {\n await response.body.cancel();\n }\n throw new UnexpectedResponseError(response.status);\n}\nexport async function sendTokenRevocationRequest(request) {\n let response;\n try {\n response = await fetch(request);\n }\n catch (e) {\n throw new ArcticFetchError(e);\n }\n if (response.status === 400 || response.status === 401) {\n let data;\n try {\n data = await response.json();\n }\n catch {\n throw new UnexpectedErrorResponseBodyError(response.status, null);\n }\n if (typeof data !== \"object\" || data === null) {\n throw new UnexpectedErrorResponseBodyError(response.status, data);\n }\n let error;\n try {\n error = createOAuth2RequestError(data);\n }\n catch {\n throw new UnexpectedErrorResponseBodyError(response.status, data);\n }\n throw error;\n }\n if (response.status === 200) {\n if (response.body !== null) {\n await response.body.cancel();\n }\n return;\n }\n if (response.body !== null) {\n await response.body.cancel();\n }\n throw new UnexpectedResponseError(response.status);\n}\nexport function createOAuth2RequestError(result) {\n let code;\n if (\"error\" in result && typeof result.error === \"string\") {\n code = result.error;\n }\n else {\n throw new Error(\"Invalid error response\");\n }\n let description = null;\n let uri = null;\n let state = null;\n if (\"error_description\" in result) {\n if (typeof result.error_description !== \"string\") {\n throw new Error(\"Invalid data\");\n }\n description = result.error_description;\n }\n if (\"error_uri\" in result) {\n if (typeof result.error_uri !== \"string\") {\n throw new Error(\"Invalid data\");\n }\n uri = result.error_uri;\n }\n if (\"state\" in result) {\n if (typeof result.state !== \"string\") {\n throw new Error(\"Invalid data\");\n }\n state = result.state;\n }\n const error = new OAuth2RequestError(code, description, uri, state);\n return error;\n}\nexport class ArcticFetchError extends Error {\n constructor(cause) {\n super(\"Failed to send request\", {\n cause\n });\n }\n}\nexport class OAuth2RequestError extends Error {\n code;\n description;\n uri;\n state;\n constructor(code, description, uri, state) {\n super(`OAuth request error: ${code}`);\n this.code = code;\n this.description = description;\n this.uri = uri;\n this.state = state;\n }\n}\nexport class UnexpectedResponseError extends Error {\n status;\n constructor(responseStatus) {\n super(\"Unexpected error response\");\n this.status = responseStatus;\n }\n}\nexport class UnexpectedErrorResponseBodyError extends Error {\n status;\n data;\n constructor(status, data) {\n super(\"Unexpected error response body\");\n this.status = status;\n this.data = data;\n }\n}\n"],"names":["encoding.encodeBase64"],"mappings":";;;;AAGO,SAAS,eAAe,SAAS,MAAM;AAC1C,MAAI,SAAS,UAAU,MAAM,GAAG;AAChC,aAAW,QAAQ,MAAM;AACrB,aAAS,UAAU,QAAQ,GAAG,IAAI,MAAM,SAAS,MAAM,GAAG;AAAA,EAC9D;AACA,SAAO;AACX;AACO,SAAS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,SAAK,cAAc;AACnB,SAAK,MAAM;AACX,SAAK,QAAQ;AAAA,EACjB;AACJ;AACO,MAAM,gCAAgC,MAAM;AAAA,EAC/C;AAAA,EACA,YAAY,gBAAgB;AACxB,UAAM,2BAA2B;AACjC,SAAK,SAAS;AAAA,EAClB;AACJ;AACO,MAAM,yCAAyC,MAAM;AAAA,EACxD;AAAA,EACA;AAAA,EACA,YAAY,QAAQ,MAAM;AACtB,UAAM,gCAAgC;AACtC,SAAK,SAAS;AACd,SAAK,OAAO;AAAA,EAChB;AACJ;","x_google_ignoreList":[0]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
function trimLeft(s, character) {
|
|
2
|
-
if (character.length !== 1) {
|
|
3
|
-
throw new TypeError("Invalid character string");
|
|
4
|
-
}
|
|
5
|
-
let start = 0;
|
|
6
|
-
while (start < s.length && s[start] === character) {
|
|
7
|
-
start++;
|
|
8
|
-
}
|
|
9
|
-
return s.slice(start);
|
|
10
|
-
}
|
|
11
|
-
function trimRight(s, character) {
|
|
12
|
-
if (character.length !== 1) {
|
|
13
|
-
throw new TypeError("Invalid character string");
|
|
14
|
-
}
|
|
15
|
-
let end = s.length;
|
|
16
|
-
while (end > 0 && s[end - 1] === character) {
|
|
17
|
-
end--;
|
|
18
|
-
}
|
|
19
|
-
return s.slice(0, end);
|
|
20
|
-
}
|
|
21
|
-
export {
|
|
22
|
-
trimLeft,
|
|
23
|
-
trimRight
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../node_modules/arctic/dist/utils.js"],"sourcesContent":["export function trimLeft(s, character) {\n if (character.length !== 1) {\n throw new TypeError(\"Invalid character string\");\n }\n let start = 0;\n while (start < s.length && s[start] === character) {\n start++;\n }\n return s.slice(start);\n}\nexport function trimRight(s, character) {\n if (character.length !== 1) {\n throw new TypeError(\"Invalid character string\");\n }\n let end = s.length;\n while (end > 0 && s[end - 1] === character) {\n end--;\n }\n return s.slice(0, end);\n}\n"],"names":[],"mappings":"AAAO,SAAS,SAAS,GAAG,WAAW;AACnC,MAAI,UAAU,WAAW,GAAG;AACxB,UAAM,IAAI,UAAU,0BAA0B;AAAA,EAClD;AACA,MAAI,QAAQ;AACZ,SAAO,QAAQ,EAAE,UAAU,EAAE,KAAK,MAAM,WAAW;AAC/C;AAAA,EACJ;AACA,SAAO,EAAE,MAAM,KAAK;AACxB;AACO,SAAS,UAAU,GAAG,WAAW;AACpC,MAAI,UAAU,WAAW,GAAG;AACxB,UAAM,IAAI,UAAU,0BAA0B;AAAA,EAClD;AACA,MAAI,MAAM,EAAE;AACZ,SAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,WAAW;AACxC;AAAA,EACJ;AACA,SAAO,EAAE,MAAM,GAAG,GAAG;AACzB;","x_google_ignoreList":[0]}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { __exports as base64Js } from "../../_virtual/index5.js";
|
|
2
|
-
var hasRequiredBase64Js;
|
|
3
|
-
function requireBase64Js() {
|
|
4
|
-
if (hasRequiredBase64Js) return base64Js;
|
|
5
|
-
hasRequiredBase64Js = 1;
|
|
6
|
-
base64Js.byteLength = byteLength;
|
|
7
|
-
base64Js.toByteArray = toByteArray;
|
|
8
|
-
base64Js.fromByteArray = fromByteArray;
|
|
9
|
-
var lookup = [];
|
|
10
|
-
var revLookup = [];
|
|
11
|
-
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
12
|
-
var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
13
|
-
for (var i = 0, len = code.length; i < len; ++i) {
|
|
14
|
-
lookup[i] = code[i];
|
|
15
|
-
revLookup[code.charCodeAt(i)] = i;
|
|
16
|
-
}
|
|
17
|
-
revLookup["-".charCodeAt(0)] = 62;
|
|
18
|
-
revLookup["_".charCodeAt(0)] = 63;
|
|
19
|
-
function getLens(b64) {
|
|
20
|
-
var len2 = b64.length;
|
|
21
|
-
if (len2 % 4 > 0) {
|
|
22
|
-
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
23
|
-
}
|
|
24
|
-
var validLen = b64.indexOf("=");
|
|
25
|
-
if (validLen === -1) validLen = len2;
|
|
26
|
-
var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
|
|
27
|
-
return [validLen, placeHoldersLen];
|
|
28
|
-
}
|
|
29
|
-
function byteLength(b64) {
|
|
30
|
-
var lens = getLens(b64);
|
|
31
|
-
var validLen = lens[0];
|
|
32
|
-
var placeHoldersLen = lens[1];
|
|
33
|
-
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
34
|
-
}
|
|
35
|
-
function _byteLength(b64, validLen, placeHoldersLen) {
|
|
36
|
-
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
37
|
-
}
|
|
38
|
-
function toByteArray(b64) {
|
|
39
|
-
var tmp;
|
|
40
|
-
var lens = getLens(b64);
|
|
41
|
-
var validLen = lens[0];
|
|
42
|
-
var placeHoldersLen = lens[1];
|
|
43
|
-
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
|
|
44
|
-
var curByte = 0;
|
|
45
|
-
var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
|
|
46
|
-
var i2;
|
|
47
|
-
for (i2 = 0; i2 < len2; i2 += 4) {
|
|
48
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];
|
|
49
|
-
arr[curByte++] = tmp >> 16 & 255;
|
|
50
|
-
arr[curByte++] = tmp >> 8 & 255;
|
|
51
|
-
arr[curByte++] = tmp & 255;
|
|
52
|
-
}
|
|
53
|
-
if (placeHoldersLen === 2) {
|
|
54
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;
|
|
55
|
-
arr[curByte++] = tmp & 255;
|
|
56
|
-
}
|
|
57
|
-
if (placeHoldersLen === 1) {
|
|
58
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;
|
|
59
|
-
arr[curByte++] = tmp >> 8 & 255;
|
|
60
|
-
arr[curByte++] = tmp & 255;
|
|
61
|
-
}
|
|
62
|
-
return arr;
|
|
63
|
-
}
|
|
64
|
-
function tripletToBase64(num) {
|
|
65
|
-
return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
|
|
66
|
-
}
|
|
67
|
-
function encodeChunk(uint8, start, end) {
|
|
68
|
-
var tmp;
|
|
69
|
-
var output = [];
|
|
70
|
-
for (var i2 = start; i2 < end; i2 += 3) {
|
|
71
|
-
tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);
|
|
72
|
-
output.push(tripletToBase64(tmp));
|
|
73
|
-
}
|
|
74
|
-
return output.join("");
|
|
75
|
-
}
|
|
76
|
-
function fromByteArray(uint8) {
|
|
77
|
-
var tmp;
|
|
78
|
-
var len2 = uint8.length;
|
|
79
|
-
var extraBytes = len2 % 3;
|
|
80
|
-
var parts = [];
|
|
81
|
-
var maxChunkLength = 16383;
|
|
82
|
-
for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {
|
|
83
|
-
parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));
|
|
84
|
-
}
|
|
85
|
-
if (extraBytes === 1) {
|
|
86
|
-
tmp = uint8[len2 - 1];
|
|
87
|
-
parts.push(
|
|
88
|
-
lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "=="
|
|
89
|
-
);
|
|
90
|
-
} else if (extraBytes === 2) {
|
|
91
|
-
tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
|
|
92
|
-
parts.push(
|
|
93
|
-
lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "="
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
return parts.join("");
|
|
97
|
-
}
|
|
98
|
-
return base64Js;
|
|
99
|
-
}
|
|
100
|
-
export {
|
|
101
|
-
requireBase64Js as __require
|
|
102
|
-
};
|
|
103
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../node_modules/base64-js/index.js"],"sourcesContent":["'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n"],"names":["len","i","len2"],"mappings":";;;;;AAEA,WAAA,aAAqB;AACrB,WAAA,cAAsB;AACtB,WAAA,gBAAwB;AAExB,MAAI,SAAS,CAAA;AACb,MAAI,YAAY,CAAA;AAChB,MAAI,MAAM,OAAO,eAAe,cAAc,aAAa;AAE3D,MAAI,OAAO;AACX,WAAS,IAAI,GAAG,MAAM,KAAK,QAAQ,IAAI,KAAK,EAAE,GAAG;AAC/C,WAAO,CAAC,IAAI,KAAK,CAAC;AAClB,cAAU,KAAK,WAAW,CAAC,CAAC,IAAI;AAAA,EAClC;AAIA,YAAU,IAAI,WAAW,CAAC,CAAC,IAAI;AAC/B,YAAU,IAAI,WAAW,CAAC,CAAC,IAAI;AAE/B,WAAS,QAAS,KAAK;AACrB,QAAIA,OAAM,IAAI;AAEd,QAAIA,OAAM,IAAI,GAAG;AACf,YAAM,IAAI,MAAM,gDAAgD;AAAA,IACpE;AAIE,QAAI,WAAW,IAAI,QAAQ,GAAG;AAC9B,QAAI,aAAa,GAAI,YAAWA;AAEhC,QAAI,kBAAkB,aAAaA,OAC/B,IACA,IAAK,WAAW;AAEpB,WAAO,CAAC,UAAU,eAAe;AAAA,E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