@commentkit/comment-kit 0.6.8 → 0.6.9
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/CHANGELOG.md +37 -0
- package/README.md +73 -45
- package/dist/angular.es.js +47 -3411
- package/dist/comment-kit.es.js +13 -3184
- package/dist/demo.es.js +395 -0
- package/dist/headless.es.js +4 -0
- package/dist/preact.es.js +79 -3443
- package/dist/qwik.es.js +79 -3443
- package/dist/react.es.js +80 -28447
- package/dist/shared/ShadowRootContext-Bv-4aElu.js +13 -0
- package/dist/shared/annotation-toolbar-pX17NLmJ.js +1104 -0
- package/dist/shared/bridge-DRE03N9X.js +174 -0
- package/dist/shared/button-By0hGrJK.js +505 -0
- package/dist/shared/button-group-CHfMRXyA.js +93 -0
- package/dist/shared/clamp-CcFVX0vC.js +55 -0
- package/dist/shared/comment-drawing-canvas-CYu5SwRf.js +126 -0
- package/dist/shared/comment-image-lightbox-0VdAs2iT.js +178 -0
- package/dist/shared/comment-kit-core-D0kY00St.js +3083 -0
- package/dist/shared/comment-kit-ui-D2j2gvnm.js +16685 -0
- package/dist/shared/comment-screenshot-annotator-BuojwviY.js +137 -0
- package/dist/shared/comment-screenshot-overlay-BZX0Vcb8.js +144 -0
- package/dist/shared/createReactComponent-BZHeRbD0.js +45 -0
- package/dist/shared/dev-export-panel-BLngcr5q.js +208 -0
- package/dist/shared/dev-grab-pDAfH2lr.js +203 -0
- package/dist/{core/dom-x9svfpMk.js → shared/dom-Bhf4WFtY.js} +2 -2
- package/dist/shared/element-selector-CtFzgHvq.js +852 -0
- package/dist/shared/errors-Bu5ajEmB.js +22 -0
- package/dist/shared/icons-BSHCWYO1.js +267 -0
- package/dist/shared/local-demo-context-BohlYbHt.js +6 -0
- package/dist/shared/mount-ui-CVivB_eQ.js +193 -0
- package/dist/{angular/pusher-Vs-W-c8I.js → shared/pusher-BEl7Qn-8.js} +93 -127
- package/dist/{core/realtime-C3_O7gi2.js → shared/realtime-BG_t_ze7.js} +75 -72
- package/dist/shared/resolveAriaLabelledBy-CIKpnjNJ.js +669 -0
- package/dist/shared/separator-DusFNTs-.js +3915 -0
- package/dist/shared/shadow-root-CmYXiSRR.js +135 -0
- package/dist/shared/styles-D_FEJZ9G.js +2 -0
- package/dist/shared/useLabelableId-DGbfdMi_.js +155 -0
- package/dist/shared/useValueChanged-DQXLia-2.js +92 -0
- package/dist/{angular/limits-AEqOBweE.js → shared/validation-C7QG8j7Z.js} +2 -28
- package/dist/{core/websocket-manager-D1_TEuy_.js → shared/websocket-manager-BTRqNTB7.js} +90 -148
- package/dist/solid.es.js +63 -3427
- package/dist/svelte.es.js +78 -3442
- package/dist/types/adapters/bridge.d.ts +1 -1
- package/dist/types/angular/index.d.ts +2 -2
- package/dist/types/core/comment-kit-core.d.ts +10 -1
- package/dist/types/core/local-demo.d.ts +59 -0
- package/dist/types/demo.d.ts +17 -0
- package/dist/types/headless.d.ts +8 -0
- package/dist/types/index.d.ts +14 -16
- package/dist/vue.es.js +80 -3443
- package/package.json +55 -37
- package/dist/angular/chunk-Cyg4N8Ue.js +0 -11
- package/dist/angular/comment-kit-ui-D-LUFD6n.js +0 -24898
- package/dist/angular/dom-Cx1nMbdI.js +0 -104
- package/dist/angular/mount-ui-C9PJ5aK_.js +0 -72
- package/dist/angular/realtime-VrKV0lPI.js +0 -567
- package/dist/angular/shadow-root-yMOaW9pk.js +0 -93
- package/dist/angular/styles-CMz7-p8x.js +0 -2
- package/dist/angular/widget-theme-CYPYAwhR.js +0 -24
- package/dist/comment-kit.css +0 -2
- package/dist/core/chunk-t7YoJN_i.js +0 -11
- package/dist/core/comment-kit-ui-Ct4E18do.js +0 -24898
- package/dist/core/error-boundary-CN_BGsYl.js +0 -21
- package/dist/core/mount-ui-Bfnuuesk.js +0 -72
- package/dist/core/pusher-CizoY5NA.js +0 -2504
- package/dist/core/shadow-root-DAtdjHG2.js +0 -93
- package/dist/core/styles-ClRoB6ro.js +0 -2
- package/dist/core/widget-theme-BWDYr7VR.js +0 -24
- package/dist/preact/chunk-CZ0PdaaN.js +0 -11
- package/dist/preact/comment-kit-ui-DEzn7J_P.js +0 -24898
- package/dist/preact/dom-_ULpq7rg.js +0 -104
- package/dist/preact/error-boundary-B4-Bfy3g.js +0 -21
- package/dist/preact/limits-C3ZEKcL_.js +0 -71
- package/dist/preact/mount-ui-Dx8en--W.js +0 -72
- package/dist/preact/pusher-BP4kCufH.js +0 -2504
- package/dist/preact/realtime-COin_nJF.js +0 -567
- package/dist/preact/shadow-root-D-NcwruG.js +0 -93
- package/dist/preact/styles-D6i7be5-.js +0 -2
- package/dist/preact/widget-theme-B7Z2pbaA.js +0 -24
- package/dist/qwik/chunk-CKKKzG2Q.js +0 -11
- package/dist/qwik/comment-kit-ui-Dvwee2tw.js +0 -24898
- package/dist/qwik/dom-Dm3gzBBJ.js +0 -104
- package/dist/qwik/error-boundary-C4hlYQwS.js +0 -21
- package/dist/qwik/limits-DK35yjGY.js +0 -71
- package/dist/qwik/mount-ui-DSAwNk_d.js +0 -72
- package/dist/qwik/pusher-B1KgC4iB.js +0 -2504
- package/dist/qwik/realtime-DhfcBrwF.js +0 -567
- package/dist/qwik/shadow-root-PkjcnvPe.js +0 -93
- package/dist/qwik/styles-DmEmq5Lh.js +0 -2
- package/dist/qwik/widget-theme-lbPF3I0A.js +0 -24
- package/dist/react/chunk--MHYZ-zp.js +0 -12
- package/dist/react/limits-CpprSem3.js +0 -175
- package/dist/react/pusher-3dki8s2l.js +0 -2505
- package/dist/react/realtime-DGqScuox.js +0 -567
- package/dist/solid/chunk-B2NCWFvW.js +0 -11
- package/dist/solid/comment-kit-ui-ACW8BpEm.js +0 -24898
- package/dist/solid/dom-DqDH-Gml.js +0 -104
- package/dist/solid/error-boundary-9mimpbZA.js +0 -21
- package/dist/solid/limits-B_69IbLl.js +0 -71
- package/dist/solid/mount-ui-Dq1wj_tx.js +0 -72
- package/dist/solid/pusher-_RVNpj1f.js +0 -2504
- package/dist/solid/realtime-DbUJK4gU.js +0 -567
- package/dist/solid/shadow-root-CssU3bQb.js +0 -93
- package/dist/solid/styles-DbueS9xx.js +0 -2
- package/dist/solid/widget-theme-B4DJ14fI.js +0 -24
- package/dist/svelte/chunk-Pi70BKld.js +0 -11
- package/dist/svelte/comment-kit-ui-Cx4u1g77.js +0 -24898
- package/dist/svelte/dom-MyTrWzy_.js +0 -104
- package/dist/svelte/error-boundary-C3GWI_IX.js +0 -21
- package/dist/svelte/limits-CURF22v3.js +0 -71
- package/dist/svelte/mount-ui-CBoNGLNS.js +0 -72
- package/dist/svelte/pusher-DN1BiUDw.js +0 -2504
- package/dist/svelte/realtime-M1CJbCBA.js +0 -567
- package/dist/svelte/shadow-root-DG8inbf6.js +0 -93
- package/dist/svelte/styles-BK_MaUpD.js +0 -2
- package/dist/svelte/widget-theme-CkfJNysI.js +0 -24
- package/dist/types/adapters/errors.d.ts +0 -3
- package/dist/types/core/auth.d.ts +0 -18
- package/dist/types/core/comments.d.ts +0 -43
- package/dist/types/core/dev-grab.d.ts +0 -14
- package/dist/types/core/keyboard.d.ts +0 -12
- package/dist/types/core/limits.d.ts +0 -52
- package/dist/types/core/offline-queue.d.ts +0 -23
- package/dist/types/core/realtime.d.ts +0 -9
- package/dist/types/core/screenshot.d.ts +0 -12
- package/dist/types/core/session.d.ts +0 -9
- package/dist/types/core/source-resolver.d.ts +0 -19
- package/dist/types/core/state.d.ts +0 -24
- package/dist/types/react/comment-kit-ui.d.ts +0 -9
- package/dist/types/react/comments/comment-flow.d.ts +0 -8
- package/dist/types/react/comments/outcomes.d.ts +0 -28
- package/dist/types/react/comments/pin-geometry.d.ts +0 -12
- package/dist/types/react/comments/view-model.d.ts +0 -66
- package/dist/types/react/components/annotation-toolbar.d.ts +0 -36
- package/dist/types/react/components/build-panel-shared-props.d.ts +0 -25
- package/dist/types/react/components/comment-actions.d.ts +0 -19
- package/dist/types/react/components/comment-body.d.ts +0 -8
- package/dist/types/react/components/comment-branch-filter.d.ts +0 -15
- package/dist/types/react/components/comment-composer-actions.d.ts +0 -26
- package/dist/types/react/components/comment-composer-extras-fields.d.ts +0 -32
- package/dist/types/react/components/comment-composer-extras-toolbar.d.ts +0 -9
- package/dist/types/react/components/comment-composer-extras.d.ts +0 -10
- package/dist/types/react/components/comment-composer-extras.state.d.ts +0 -24
- package/dist/types/react/components/comment-composer-hook.d.ts +0 -1
- package/dist/types/react/components/comment-composer-media.d.ts +0 -17
- package/dist/types/react/components/comment-composer.d.ts +0 -4
- package/dist/types/react/components/comment-composer.types.d.ts +0 -41
- package/dist/types/react/components/comment-composer.utils.d.ts +0 -3
- package/dist/types/react/components/comment-connection-alert.d.ts +0 -7
- package/dist/types/react/components/comment-cursor-layer.d.ts +0 -14
- package/dist/types/react/components/comment-custom-cursor.d.ts +0 -14
- package/dist/types/react/components/comment-drawing-canvas.d.ts +0 -10
- package/dist/types/react/components/comment-emoji-picker.d.ts +0 -12
- package/dist/types/react/components/comment-error-banner.d.ts +0 -8
- package/dist/types/react/components/comment-extension-banner.d.ts +0 -8
- package/dist/types/react/components/comment-fab-tools.d.ts +0 -37
- package/dist/types/react/components/comment-fab.d.ts +0 -34
- package/dist/types/react/components/comment-filter-assignee.d.ts +0 -9
- package/dist/types/react/components/comment-filter-bar.d.ts +0 -27
- package/dist/types/react/components/comment-filter-popover.d.ts +0 -20
- package/dist/types/react/components/comment-format-toolbar.constants.d.ts +0 -34
- package/dist/types/react/components/comment-format-toolbar.d.ts +0 -6
- package/dist/types/react/components/comment-header.d.ts +0 -34
- package/dist/types/react/components/comment-highlight-layer.d.ts +0 -11
- package/dist/types/react/components/comment-highlight-marker.d.ts +0 -9
- package/dist/types/react/components/comment-image-lightbox.d.ts +0 -10
- package/dist/types/react/components/comment-images.d.ts +0 -7
- package/dist/types/react/components/comment-item.d.ts +0 -26
- package/dist/types/react/components/comment-keyboard-shortcuts.d.ts +0 -7
- package/dist/types/react/components/comment-kit-overlays.d.ts +0 -15
- package/dist/types/react/components/comment-kit.d.ts +0 -12
- package/dist/types/react/components/comment-list-filters.d.ts +0 -14
- package/dist/types/react/components/comment-login-modal.d.ts +0 -20
- package/dist/types/react/components/comment-marker-layer-composer.d.ts +0 -21
- package/dist/types/react/components/comment-marker-layer.d.ts +0 -27
- package/dist/types/react/components/comment-marker-popover.d.ts +0 -12
- package/dist/types/react/components/comment-marker.d.ts +0 -15
- package/dist/types/react/components/comment-member-list.d.ts +0 -10
- package/dist/types/react/components/comment-mode-bar.d.ts +0 -15
- package/dist/types/react/components/comment-online-users.d.ts +0 -8
- package/dist/types/react/components/comment-page-ref.d.ts +0 -9
- package/dist/types/react/components/comment-panel-header.d.ts +0 -22
- package/dist/types/react/components/comment-panel-mobile.d.ts +0 -9
- package/dist/types/react/components/comment-panel-utils.d.ts +0 -6
- package/dist/types/react/components/comment-panel-view-body.d.ts +0 -23
- package/dist/types/react/components/comment-panel.d.ts +0 -37
- package/dist/types/react/components/comment-quoted-text.d.ts +0 -9
- package/dist/types/react/components/comment-reactions.d.ts +0 -11
- package/dist/types/react/components/comment-remote-cursor.d.ts +0 -11
- package/dist/types/react/components/comment-screenshot-annotator.d.ts +0 -11
- package/dist/types/react/components/comment-screenshot-overlay.d.ts +0 -10
- package/dist/types/react/components/comment-search-bar.d.ts +0 -7
- package/dist/types/react/components/comment-settings-view.d.ts +0 -20
- package/dist/types/react/components/comment-skeletons.d.ts +0 -9
- package/dist/types/react/components/comment-thread-detail-badges.d.ts +0 -16
- package/dist/types/react/components/comment-thread-detail-meta.d.ts +0 -9
- package/dist/types/react/components/comment-thread-detail-replies.d.ts +0 -13
- package/dist/types/react/components/comment-thread-detail.d.ts +0 -13
- package/dist/types/react/components/comment-thread-footer.d.ts +0 -12
- package/dist/types/react/components/comment-thread-list-item.d.ts +0 -15
- package/dist/types/react/components/comment-thread-list.d.ts +0 -16
- package/dist/types/react/components/comment-user-avatar-tooltip.d.ts +0 -12
- package/dist/types/react/components/comment-users-context.d.ts +0 -15
- package/dist/types/react/components/comment-utils.d.ts +0 -20
- package/dist/types/react/components/comment.d.ts +0 -26
- package/dist/types/react/components/constants.d.ts +0 -50
- package/dist/types/react/components/dev-export-panel.d.ts +0 -10
- package/dist/types/react/components/drawing-path-renderer.d.ts +0 -10
- package/dist/types/react/components/element-selector.d.ts +0 -11
- package/dist/types/react/components/live-region.d.ts +0 -16
- package/dist/types/react/components/screenshot-capture.d.ts +0 -17
- package/dist/types/react/components/status-indicator.d.ts +0 -43
- package/dist/types/react/components/ui.d.ts +0 -44
- package/dist/types/react/components/use-comment-composer.d.ts +0 -28
- package/dist/types/react/error-boundary.d.ts +0 -25
- package/dist/types/react/hooks/use-comment-fab-drag.d.ts +0 -21
- package/dist/types/react/hooks/use-comment-hash-link.d.ts +0 -20
- package/dist/types/react/hooks/use-comment-kit-filters.d.ts +0 -19
- package/dist/types/react/hooks/use-comment-kit-keyboard.d.ts +0 -11
- package/dist/types/react/hooks/use-comment-kit-prop-sync.d.ts +0 -12
- package/dist/types/react/hooks/use-comment-marker-drag.d.ts +0 -23
- package/dist/types/react/hooks/use-comment-panel-navigation.d.ts +0 -21
- package/dist/types/react/hooks/use-comment-realtime.d.ts +0 -6
- package/dist/types/react/hooks/use-comment-thread-actions.d.ts +0 -15
- package/dist/types/react/hooks/use-connection-retry.d.ts +0 -9
- package/dist/types/react/hooks/use-drawing.d.ts +0 -32
- package/dist/types/react/hooks/use-extension-conflicts.d.ts +0 -13
- package/dist/types/react/hooks/use-filtered-threads.d.ts +0 -7
- package/dist/types/react/hooks/use-marker-layer.d.ts +0 -19
- package/dist/types/react/hooks/use-screenshot.d.ts +0 -18
- package/dist/types/react/hooks/use-text-selection.d.ts +0 -17
- package/dist/types/react/hooks/use-websocket.d.ts +0 -9
- package/dist/types/react/is-local-host.d.ts +0 -2
- package/dist/types/react/mount-ui.d.ts +0 -19
- package/dist/types/react/shadow-root.d.ts +0 -23
- package/dist/types/react/shims/use-sync-external-store-with-selector.d.ts +0 -4
- package/dist/types/react/shims/use-sync-external-store.d.ts +0 -1
- package/dist/types/react/ui/lib/ShadowRootContext.d.ts +0 -10
- package/dist/types/react/ui/lib/cn.d.ts +0 -12
- package/dist/types/react/ui/lib/widget-theme.d.ts +0 -7
- package/dist/types/react/ui/primitives/alert/alert.d.ts +0 -8
- package/dist/types/react/ui/primitives/alert/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/alert-dialog/alert-dialog.d.ts +0 -23
- package/dist/types/react/ui/primitives/alert-dialog/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/avatar/avatar.d.ts +0 -10
- package/dist/types/react/ui/primitives/avatar/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/badge/badge.d.ts +0 -5
- package/dist/types/react/ui/primitives/badge/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/breadcrumb/breadcrumb.d.ts +0 -10
- package/dist/types/react/ui/primitives/breadcrumb/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/button/button.d.ts +0 -6
- package/dist/types/react/ui/primitives/button/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/button-group/button-group.d.ts +0 -9
- package/dist/types/react/ui/primitives/button-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/card/card.d.ts +0 -11
- package/dist/types/react/ui/primitives/card/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/checkbox/checkbox.d.ts +0 -3
- package/dist/types/react/ui/primitives/checkbox/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/dialog/dialog.d.ts +0 -17
- package/dist/types/react/ui/primitives/dialog/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/dropdown-menu/dropdown-menu.d.ts +0 -29
- package/dist/types/react/ui/primitives/dropdown-menu/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/empty/empty.d.ts +0 -10
- package/dist/types/react/ui/primitives/empty/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/field/field.d.ts +0 -22
- package/dist/types/react/ui/primitives/field/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/hover-card/hover-card.d.ts +0 -6
- package/dist/types/react/ui/primitives/hover-card/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input/input.d.ts +0 -3
- package/dist/types/react/ui/primitives/input-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input-group/input-group.d.ts +0 -16
- package/dist/types/react/ui/primitives/input-otp/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/input-otp/input-otp.d.ts +0 -11
- package/dist/types/react/ui/primitives/kbd/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/kbd/kbd.d.ts +0 -4
- package/dist/types/react/ui/primitives/label/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/label/label.d.ts +0 -3
- package/dist/types/react/ui/primitives/native-select/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/native-select/native-select.d.ts +0 -7
- package/dist/types/react/ui/primitives/popover/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/popover/popover.d.ts +0 -9
- package/dist/types/react/ui/primitives/preview/component-preview.d.ts +0 -8
- package/dist/types/react/ui/primitives/progress/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/progress/progress.d.ts +0 -7
- package/dist/types/react/ui/primitives/radio-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/radio-group/radio-group.d.ts +0 -6
- package/dist/types/react/ui/primitives/scroll-area/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/scroll-area/scroll-area.d.ts +0 -6
- package/dist/types/react/ui/primitives/select/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/select/select.d.ts +0 -15
- package/dist/types/react/ui/primitives/separator/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/separator/separator.d.ts +0 -3
- package/dist/types/react/ui/primitives/sheet/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/sheet/sheet.d.ts +0 -14
- package/dist/types/react/ui/primitives/skeleton/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/skeleton/skeleton.d.ts +0 -3
- package/dist/types/react/ui/primitives/slider/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/slider/slider.d.ts +0 -7
- package/dist/types/react/ui/primitives/sonner/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/sonner/sonner.d.ts +0 -4
- package/dist/types/react/ui/primitives/spinner/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/spinner/spinner.d.ts +0 -3
- package/dist/types/react/ui/primitives/switch/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/switch/switch.d.ts +0 -5
- package/dist/types/react/ui/primitives/tabs/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/tabs/tabs.d.ts +0 -8
- package/dist/types/react/ui/primitives/textarea/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/textarea/textarea.d.ts +0 -3
- package/dist/types/react/ui/primitives/toggle/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/toggle/toggle.d.ts +0 -7
- package/dist/types/react/ui/primitives/toggle-group/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/toggle-group/toggle-group.d.ts +0 -14
- package/dist/types/react/ui/primitives/tooltip/index.d.ts +0 -1
- package/dist/types/react/ui/primitives/tooltip/tooltip.d.ts +0 -7
- package/dist/types/utils/freeze-animations.d.ts +0 -8
- package/dist/types/utils/text.d.ts +0 -9
- package/dist/types/utils/validation.d.ts +0 -10
- package/dist/vue/chunk-DHrubWSL.js +0 -11
- package/dist/vue/comment-kit-ui-C3zijClM.js +0 -24898
- package/dist/vue/dom-C7krZAR8.js +0 -104
- package/dist/vue/error-boundary-DW6uGR8U.js +0 -21
- package/dist/vue/limits-B6csdQeI.js +0 -71
- package/dist/vue/mount-ui-18BnLwCO.js +0 -72
- package/dist/vue/pusher-cmjNbW6a.js +0 -2504
- package/dist/vue/realtime-B0B5cE-E.js +0 -567
- package/dist/vue/shadow-root-zwd_wUIP.js +0 -93
- package/dist/vue/styles-B0NAkbKu.js +0 -2
- package/dist/vue/widget-theme-D7Vkagk7.js +0 -24
- /package/dist/{angular/error-boundary-CxhCm8iF.js → shared/error-boundary-D3PD74vI.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as e } from "./websocket-manager-BTRqNTB7.js";
|
|
2
2
|
var t = /* @__PURE__ */ e(((e, t) => {
|
|
3
3
|
(function(n, r) {
|
|
4
4
|
typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.Pusher = r() : n.Pusher = r();
|
|
@@ -36,7 +36,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
36
36
|
var i = e.length - n;
|
|
37
37
|
if (i > 0) {
|
|
38
38
|
var r = e[n] << 16 | (i === 2 ? e[n + 1] << 8 : 0);
|
|
39
|
-
t += this._encodeByte(r >>> 18 & 63), t += this._encodeByte(r >>> 12 & 63), i === 2 ?
|
|
39
|
+
t += this._encodeByte(r >>> 18 & 63), t += this._encodeByte(r >>> 12 & 63), t += i === 2 ? this._encodeByte(r >>> 6 & 63) : this._paddingCharacter || "", t += this._paddingCharacter || "";
|
|
40
40
|
}
|
|
41
41
|
return t;
|
|
42
42
|
}, e.prototype.maxDecodedLength = function(e) {
|
|
@@ -44,7 +44,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
44
44
|
}, e.prototype.decodedLength = function(e) {
|
|
45
45
|
return this.maxDecodedLength(e.length - this._getPaddingLength(e));
|
|
46
46
|
}, e.prototype.decode = function(e) {
|
|
47
|
-
if (e.length === 0) return new Uint8Array();
|
|
47
|
+
if (e.length === 0) return /* @__PURE__ */ new Uint8Array();
|
|
48
48
|
for (var t = this._getPaddingLength(e), n = e.length - t, i = new Uint8Array(this.maxDecodedLength(n)), a = 0, o = 0, s = 0, c = 0, l = 0, u = 0, d = 0; o < n - 4; o += 4) c = this._decodeChar(e.charCodeAt(o + 0)), l = this._decodeChar(e.charCodeAt(o + 1)), u = this._decodeChar(e.charCodeAt(o + 2)), d = this._decodeChar(e.charCodeAt(o + 3)), i[a++] = c << 2 | l >>> 4, i[a++] = l << 4 | u >>> 2, i[a++] = u << 6 | d, s |= c & r, s |= l & r, s |= u & r, s |= d & r;
|
|
49
49
|
if (o < n - 1 && (c = this._decodeChar(e.charCodeAt(o)), l = this._decodeChar(e.charCodeAt(o + 1)), i[a++] = c << 2 | l >>> 4, s |= c & r, s |= l & r), o < n - 2 && (u = this._decodeChar(e.charCodeAt(o + 2)), i[a++] = l << 4 | u >>> 2, s |= u & r), o < n - 3 && (d = this._decodeChar(e.charCodeAt(o + 3)), i[a++] = u << 6 | d, s |= d & r), s !== 0) throw Error("Base64Coder: incorrect characters for decoding");
|
|
50
50
|
return i;
|
|
@@ -165,7 +165,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
165
165
|
}
|
|
166
166
|
var i = new r("_pusher_script_", "Pusher.ScriptReceivers");
|
|
167
167
|
let a = {
|
|
168
|
-
VERSION: "8.
|
|
168
|
+
VERSION: "8.6.0",
|
|
169
169
|
PROTOCOL: 7,
|
|
170
170
|
wsPort: 80,
|
|
171
171
|
wssPort: 443,
|
|
@@ -300,25 +300,25 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
300
300
|
for (var o in e) a.setRequestHeader(o, e[o]);
|
|
301
301
|
}
|
|
302
302
|
return a.onreadystatechange = function() {
|
|
303
|
-
if (a.readyState === 4)
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
e = `Clients must be authorized to join private or presence channels. ${u.buildLogSuffix("authorizationEndpoint")}`;
|
|
319
|
-
|
|
303
|
+
if (a.readyState === 4) {
|
|
304
|
+
if (a.status === 200) {
|
|
305
|
+
let e, t = !1;
|
|
306
|
+
try {
|
|
307
|
+
e = JSON.parse(a.responseText), t = !0;
|
|
308
|
+
} catch {
|
|
309
|
+
i(new _(200, `JSON returned from ${r.toString()} endpoint was invalid, yet status code was 200. Data was: ${a.responseText}`), null);
|
|
310
|
+
}
|
|
311
|
+
t && i(null, e);
|
|
312
|
+
} else {
|
|
313
|
+
let e = "";
|
|
314
|
+
switch (r) {
|
|
315
|
+
case d.UserAuthentication:
|
|
316
|
+
e = u.buildLogSuffix("authenticationEndpoint");
|
|
317
|
+
break;
|
|
318
|
+
case d.ChannelAuthorization: e = `Clients must be authorized to join private or presence channels. ${u.buildLogSuffix("authorizationEndpoint")}`;
|
|
319
|
+
}
|
|
320
|
+
i(new _(a.status, `Unable to retrieve auth string from ${r.toString()} endpoint - received status: ${a.status} from ${n.endpoint}. ${e}`), null);
|
|
320
321
|
}
|
|
321
|
-
i(new _(a.status, `Unable to retrieve auth string from ${r.toString()} endpoint - received status: ${a.status} from ${n.endpoint}. ${e}`), null);
|
|
322
322
|
}
|
|
323
323
|
}, a.send(t), a;
|
|
324
324
|
};
|
|
@@ -343,7 +343,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
343
343
|
t >= 2 ? "=" : x.charAt(n >>> 6 & 63),
|
|
344
344
|
t >= 1 ? "=" : x.charAt(n & 63)
|
|
345
345
|
].join("");
|
|
346
|
-
}, ce = window.btoa || function(e) {
|
|
346
|
+
}, ce = typeof window < "u" && window.btoa || function(e) {
|
|
347
347
|
return e.replace(/[\s\S]{1,3}/g, se);
|
|
348
348
|
};
|
|
349
349
|
class le {
|
|
@@ -397,7 +397,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
397
397
|
function T(e, ...t) {
|
|
398
398
|
for (var n = 0; n < t.length; n++) {
|
|
399
399
|
var r = t[n];
|
|
400
|
-
for (var i in r) r[i] && r[i].constructor && r[i].constructor === Object ?
|
|
400
|
+
for (var i in r) i !== "__proto__" && i !== "constructor" && i !== "prototype" && (e[i] = r[i] && r[i].constructor && r[i].constructor === Object ? T(e[i] || {}, r[i]) : r[i]);
|
|
401
401
|
}
|
|
402
402
|
return e;
|
|
403
403
|
}
|
|
@@ -469,7 +469,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
469
469
|
}
|
|
470
470
|
function we(e) {
|
|
471
471
|
return ve(e, function(e) {
|
|
472
|
-
return typeof e == "object" && (e = k(e)), encodeURIComponent(y(e.toString()));
|
|
472
|
+
return e === null ? "" : (typeof e == "object" && (e = k(e)), encodeURIComponent(y(e.toString())));
|
|
473
473
|
});
|
|
474
474
|
}
|
|
475
475
|
function Te(e) {
|
|
@@ -619,12 +619,11 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
619
619
|
});
|
|
620
620
|
}
|
|
621
621
|
remove(e, t, n) {
|
|
622
|
-
if (!e && !t && !n) {
|
|
623
|
-
|
|
624
|
-
|
|
622
|
+
if (!e && !t && !n) this._callbacks = {};
|
|
623
|
+
else {
|
|
624
|
+
var r = e ? [N(e)] : he(this._callbacks);
|
|
625
|
+
t || n ? this.removeCallback(r, t, n) : this.removeAllCallbacks(r);
|
|
625
626
|
}
|
|
626
|
-
var r = e ? [N(e)] : he(this._callbacks);
|
|
627
|
-
t || n ? this.removeCallback(r, t, n) : this.removeAllCallbacks(r);
|
|
628
627
|
}
|
|
629
628
|
removeCallback(e, t, n) {
|
|
630
629
|
O(e, function(e) {
|
|
@@ -698,9 +697,9 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
698
697
|
return this.socket ? (this.socket.close(), !0) : !1;
|
|
699
698
|
}
|
|
700
699
|
send(e) {
|
|
701
|
-
return this.state === "open"
|
|
700
|
+
return this.state === "open" && (w.defer(() => {
|
|
702
701
|
this.socket && this.socket.send(e);
|
|
703
|
-
}), !0)
|
|
702
|
+
}), !0);
|
|
704
703
|
}
|
|
705
704
|
ping() {
|
|
706
705
|
this.state === "open" && this.supportsPing() && this.socket.ping();
|
|
@@ -825,14 +824,14 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
825
824
|
constructor() {
|
|
826
825
|
super();
|
|
827
826
|
var e = this;
|
|
828
|
-
window.addEventListener !== void 0 && (window.addEventListener("online", function() {
|
|
827
|
+
typeof window < "u" && window.addEventListener !== void 0 && (window.addEventListener("online", function() {
|
|
829
828
|
e.emit("online");
|
|
830
829
|
}, !1), window.addEventListener("offline", function() {
|
|
831
830
|
e.emit("offline");
|
|
832
831
|
}, !1));
|
|
833
832
|
}
|
|
834
833
|
isOnline() {
|
|
835
|
-
return window.navigator.onLine === void 0
|
|
834
|
+
return window.navigator.onLine === void 0 || window.navigator.onLine;
|
|
836
835
|
}
|
|
837
836
|
}
|
|
838
837
|
var Je = new qe();
|
|
@@ -890,11 +889,12 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
890
889
|
id: t.data.socket_id,
|
|
891
890
|
activityTimeout: t.data.activity_timeout * 1e3
|
|
892
891
|
};
|
|
893
|
-
}
|
|
892
|
+
}
|
|
893
|
+
if (t.event === "pusher:error") return {
|
|
894
894
|
action: this.getCloseAction(t.data),
|
|
895
895
|
error: this.getCloseError(t.data)
|
|
896
896
|
};
|
|
897
|
-
|
|
897
|
+
throw "Invalid handshake";
|
|
898
898
|
},
|
|
899
899
|
getCloseAction: function(e) {
|
|
900
900
|
return e.code < 4e3 ? e.code >= 1002 && e.code <= 1004 ? "backoff" : null : e.code === 4e3 ? "tls_only" : e.code < 4100 ? "refused" : e.code < 4200 ? "backoff" : e.code < 4300 ? "retry" : "refused";
|
|
@@ -956,9 +956,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
956
956
|
case "pusher:ping":
|
|
957
957
|
this.emit("ping");
|
|
958
958
|
break;
|
|
959
|
-
case "pusher:pong":
|
|
960
|
-
this.emit("pong");
|
|
961
|
-
break;
|
|
959
|
+
case "pusher:pong": this.emit("pong");
|
|
962
960
|
}
|
|
963
961
|
this.emit("message", t);
|
|
964
962
|
}
|
|
@@ -1159,14 +1157,16 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1159
1157
|
}
|
|
1160
1158
|
authorize(e, t) {
|
|
1161
1159
|
super.authorize(e, (e, n) => tt(this, void 0, void 0, function* () {
|
|
1162
|
-
if (!e)
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1160
|
+
if (!e) {
|
|
1161
|
+
if (n = n, n.channel_data != null) {
|
|
1162
|
+
var r = JSON.parse(n.channel_data);
|
|
1163
|
+
this.members.setMyID(r.user_id);
|
|
1164
|
+
} else if (yield this.pusher.user.signinDonePromise, this.pusher.user.user_data != null) this.members.setMyID(this.pusher.user.user_data.id);
|
|
1165
|
+
else {
|
|
1166
|
+
let e = u.buildLogSuffix("authorizationEndpoint");
|
|
1167
|
+
A.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${e}, or the user should be signed in.`), t("Invalid auth response");
|
|
1168
|
+
return;
|
|
1169
|
+
}
|
|
1170
1170
|
}
|
|
1171
1171
|
t(e, n);
|
|
1172
1172
|
}));
|
|
@@ -1195,7 +1195,6 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1195
1195
|
case "pusher_internal:member_removed":
|
|
1196
1196
|
var i = this.members.removeMember(n);
|
|
1197
1197
|
i && this.emit("pusher:member_removed", i);
|
|
1198
|
-
break;
|
|
1199
1198
|
}
|
|
1200
1199
|
}
|
|
1201
1200
|
handleSubscriptionSucceededEvent(e) {
|
|
@@ -1217,11 +1216,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1217
1216
|
return;
|
|
1218
1217
|
}
|
|
1219
1218
|
let r = n.shared_secret;
|
|
1220
|
-
|
|
1221
|
-
t(/* @__PURE__ */ Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);
|
|
1222
|
-
return;
|
|
1223
|
-
}
|
|
1224
|
-
this.key = (0, B.decode)(r), delete n.shared_secret, t(null, n);
|
|
1219
|
+
r ? (this.key = (0, B.decode)(r), delete n.shared_secret, t(null, n)) : t(/* @__PURE__ */ Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);
|
|
1225
1220
|
});
|
|
1226
1221
|
}
|
|
1227
1222
|
trigger(e, t) {
|
|
@@ -1229,11 +1224,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1229
1224
|
}
|
|
1230
1225
|
handleEvent(e) {
|
|
1231
1226
|
var t = e.event, n = e.data;
|
|
1232
|
-
|
|
1233
|
-
super.handleEvent(e);
|
|
1234
|
-
return;
|
|
1235
|
-
}
|
|
1236
|
-
this.handleEncryptedEvent(t, n);
|
|
1227
|
+
t.indexOf("pusher_internal:") === 0 || t.indexOf("pusher:") === 0 ? super.handleEvent(e) : this.handleEncryptedEvent(t, n);
|
|
1237
1228
|
}
|
|
1238
1229
|
handleEncryptedEvent(e, t) {
|
|
1239
1230
|
if (!this.key) {
|
|
@@ -1255,21 +1246,9 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1255
1246
|
return;
|
|
1256
1247
|
}
|
|
1257
1248
|
let i = this.nacl.secretbox.open(n, r, this.key);
|
|
1258
|
-
|
|
1259
|
-
A.
|
|
1260
|
-
|
|
1261
|
-
A.error(`Failed to make a request to the authEndpoint: ${a}. Unable to fetch new key, so dropping encrypted event`);
|
|
1262
|
-
return;
|
|
1263
|
-
}
|
|
1264
|
-
if (i = this.nacl.secretbox.open(n, r, this.key), i === null) {
|
|
1265
|
-
A.error("Failed to decrypt event with new key. Dropping encrypted event");
|
|
1266
|
-
return;
|
|
1267
|
-
}
|
|
1268
|
-
this.emit(e, this.getDataToEmit(i));
|
|
1269
|
-
});
|
|
1270
|
-
return;
|
|
1271
|
-
}
|
|
1272
|
-
this.emit(e, this.getDataToEmit(i));
|
|
1249
|
+
i === null ? (A.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."), this.authorize(this.pusher.connection.socket_id, (t, a) => {
|
|
1250
|
+
t ? A.error(`Failed to make a request to the authEndpoint: ${a}. Unable to fetch new key, so dropping encrypted event`) : (i = this.nacl.secretbox.open(n, r, this.key), i === null ? A.error("Failed to decrypt event with new key. Dropping encrypted event") : this.emit(e, this.getDataToEmit(i)));
|
|
1251
|
+
})) : this.emit(e, this.getDataToEmit(i));
|
|
1273
1252
|
}
|
|
1274
1253
|
getDataToEmit(e) {
|
|
1275
1254
|
let t = (0, rt.D4)(e);
|
|
@@ -1294,13 +1273,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1294
1273
|
this.key = e, this.updateStrategy(), this.retryIn(0);
|
|
1295
1274
|
}
|
|
1296
1275
|
connect() {
|
|
1297
|
-
|
|
1298
|
-
if (!this.strategy.isSupported()) {
|
|
1299
|
-
this.updateState("failed");
|
|
1300
|
-
return;
|
|
1301
|
-
}
|
|
1302
|
-
this.updateState("connecting"), this.startConnecting(), this.setUnavailableTimer();
|
|
1303
|
-
}
|
|
1276
|
+
this.connection || this.runner || (this.strategy.isSupported() ? (this.updateState("connecting"), this.startConnecting(), this.setUnavailableTimer()) : this.updateState("failed"));
|
|
1304
1277
|
}
|
|
1305
1278
|
send(e) {
|
|
1306
1279
|
return this.connection ? this.connection.send(e) : !1;
|
|
@@ -1468,11 +1441,13 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1468
1441
|
function st(e, t) {
|
|
1469
1442
|
if (e.indexOf("private-encrypted-") === 0) {
|
|
1470
1443
|
if (t.config.nacl) return V.createEncryptedChannel(e, t, t.config.nacl);
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1444
|
+
let n = u.buildLogSuffix("encryptedChannelSupport");
|
|
1445
|
+
throw new m(`Tried to subscribe to a private-encrypted- channel but no nacl implementation available. ${n}`);
|
|
1446
|
+
}
|
|
1447
|
+
if (e.indexOf("private-") === 0) return V.createPrivateChannel(e, t);
|
|
1448
|
+
if (e.indexOf("presence-") === 0) return V.createPresenceChannel(e, t);
|
|
1449
|
+
if (e.indexOf("#") === 0) throw new te("Cannot create a channel with name \"" + e + "\".");
|
|
1450
|
+
return V.createChannel(e, t);
|
|
1476
1451
|
}
|
|
1477
1452
|
let V = {
|
|
1478
1453
|
createChannels() {
|
|
@@ -1572,13 +1547,9 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1572
1547
|
connect(e, t) {
|
|
1573
1548
|
return lt(this.strategies, e, function(e, n) {
|
|
1574
1549
|
return function(r, i) {
|
|
1575
|
-
|
|
1576
|
-
ut(n) && t(!0);
|
|
1577
|
-
return;
|
|
1578
|
-
}
|
|
1579
|
-
O(n, function(e) {
|
|
1550
|
+
n[e].error = r, r ? ut(n) && t(!0) : (O(n, function(e) {
|
|
1580
1551
|
e.forceMinPriority(i.transport.priority);
|
|
1581
|
-
}), t(null, i);
|
|
1552
|
+
}), t(null, i));
|
|
1582
1553
|
};
|
|
1583
1554
|
});
|
|
1584
1555
|
}
|
|
@@ -1608,7 +1579,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1608
1579
|
}
|
|
1609
1580
|
class ft {
|
|
1610
1581
|
constructor(e, t, n) {
|
|
1611
|
-
this.strategy = e, this.transports = t, this.ttl = n.ttl ||
|
|
1582
|
+
this.strategy = e, this.transports = t, this.ttl = n.ttl || 18e5, this.usingTLS = n.useTLS, this.timeline = n.timeline;
|
|
1612
1583
|
}
|
|
1613
1584
|
isSupported() {
|
|
1614
1585
|
return this.strategy.isSupported();
|
|
@@ -1835,7 +1806,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1835
1806
|
} catch {
|
|
1836
1807
|
return !1;
|
|
1837
1808
|
}
|
|
1838
|
-
|
|
1809
|
+
return !1;
|
|
1839
1810
|
}
|
|
1840
1811
|
reconnect() {
|
|
1841
1812
|
this.closeStream(), this.openStream();
|
|
@@ -1865,9 +1836,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1865
1836
|
case "h":
|
|
1866
1837
|
this.hooks.onHeartbeat(this);
|
|
1867
1838
|
break;
|
|
1868
|
-
case "c":
|
|
1869
|
-
t = JSON.parse(e.data.slice(1) || "[]"), this.onClose(t[0], t[1], !0);
|
|
1870
|
-
break;
|
|
1839
|
+
case "c": t = JSON.parse(e.data.slice(1) || "[]"), this.onClose(t[0], t[1], !0);
|
|
1871
1840
|
}
|
|
1872
1841
|
}
|
|
1873
1842
|
}
|
|
@@ -1959,9 +1928,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1959
1928
|
case 3:
|
|
1960
1929
|
t.responseText && t.responseText.length > 0 && e.onChunk(t.status, t.responseText);
|
|
1961
1930
|
break;
|
|
1962
|
-
case 4:
|
|
1963
|
-
t.responseText && t.responseText.length > 0 && e.onChunk(t.status, t.responseText), e.emit("finished", t.status), e.close();
|
|
1964
|
-
break;
|
|
1931
|
+
case 4: t.responseText && t.responseText.length > 0 && e.onChunk(t.status, t.responseText), e.emit("finished", t.status), e.close();
|
|
1965
1932
|
}
|
|
1966
1933
|
}, t;
|
|
1967
1934
|
},
|
|
@@ -2005,11 +1972,13 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
2005
1972
|
return window.WebSocket || window.MozWebSocket;
|
|
2006
1973
|
},
|
|
2007
1974
|
setup(e) {
|
|
2008
|
-
window
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
1975
|
+
if (typeof window < "u") {
|
|
1976
|
+
window.Pusher = e;
|
|
1977
|
+
var t = () => {
|
|
1978
|
+
this.onDocumentBody(e.ready);
|
|
1979
|
+
};
|
|
1980
|
+
window.JSON ? t() : c.load("json2", {}, t);
|
|
1981
|
+
}
|
|
2013
1982
|
},
|
|
2014
1983
|
getDocument() {
|
|
2015
1984
|
return document;
|
|
@@ -2070,15 +2039,17 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
2070
2039
|
return !!window.XDomainRequest && n === t;
|
|
2071
2040
|
},
|
|
2072
2041
|
addUnloadListener(e) {
|
|
2073
|
-
window.addEventListener === void 0 ? window.attachEvent !== void 0 && window.attachEvent("onunload", e) : window.addEventListener("
|
|
2042
|
+
window.addEventListener === void 0 ? window.attachEvent !== void 0 && window.attachEvent("onunload", e) : window.addEventListener("pagehide", e, !1);
|
|
2074
2043
|
},
|
|
2075
2044
|
removeUnloadListener(e) {
|
|
2076
|
-
window.addEventListener === void 0 ? window.detachEvent !== void 0 && window.detachEvent("onunload", e) : window.removeEventListener("
|
|
2045
|
+
window.addEventListener === void 0 ? window.detachEvent !== void 0 && window.detachEvent("onunload", e) : window.removeEventListener("pagehide", e, !1);
|
|
2077
2046
|
},
|
|
2078
2047
|
randomInt(e) {
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2048
|
+
let t = window.crypto || window.msCrypto, n = Math.floor(2 ** 32 / e) * e, r;
|
|
2049
|
+
do
|
|
2050
|
+
r = t.getRandomValues(/* @__PURE__ */ new Uint32Array(1))[0];
|
|
2051
|
+
while (r >= n);
|
|
2052
|
+
return r % e;
|
|
2082
2053
|
}
|
|
2083
2054
|
};
|
|
2084
2055
|
var X;
|
|
@@ -2143,7 +2114,9 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
2143
2114
|
}, s = function(e) {
|
|
2144
2115
|
l(), t(e);
|
|
2145
2116
|
}, c = function() {
|
|
2146
|
-
l()
|
|
2117
|
+
l();
|
|
2118
|
+
var e = k(r);
|
|
2119
|
+
t(new p(e));
|
|
2147
2120
|
}, l = function() {
|
|
2148
2121
|
r.unbind("initialized", a), r.unbind("open", o), r.unbind("error", s), r.unbind("closed", c);
|
|
2149
2122
|
};
|
|
@@ -2265,10 +2238,10 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
2265
2238
|
return `ws-${e}.pusher.com`;
|
|
2266
2239
|
}
|
|
2267
2240
|
function Zt(e) {
|
|
2268
|
-
return Y.getProtocol() === "https:"
|
|
2241
|
+
return Y.getProtocol() === "https:" || e.forceTLS !== !1;
|
|
2269
2242
|
}
|
|
2270
2243
|
function Qt(e) {
|
|
2271
|
-
return "enableStats" in e ? e.enableStats : "disableStats" in e
|
|
2244
|
+
return "enableStats" in e ? e.enableStats : "disableStats" in e && !e.disableStats;
|
|
2272
2245
|
}
|
|
2273
2246
|
let $t = (e) => "customHandler" in e && e.customHandler != null;
|
|
2274
2247
|
function en(e) {
|
|
@@ -2277,12 +2250,10 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
2277
2250
|
}
|
|
2278
2251
|
function tn(e, t) {
|
|
2279
2252
|
let n;
|
|
2280
|
-
|
|
2281
|
-
else if (n = {
|
|
2253
|
+
return "channelAuthorization" in e ? n = Object.assign(Object.assign({}, a.channelAuthorization), e.channelAuthorization) : (n = {
|
|
2282
2254
|
transport: e.authTransport || a.authTransport,
|
|
2283
2255
|
endpoint: e.authEndpoint || a.authEndpoint
|
|
2284
|
-
}, "auth" in e && ("params" in e.auth && (n.params = e.auth.params), "headers" in e.auth && (n.headers = e.auth.headers)), "authorizer" in e
|
|
2285
|
-
return n;
|
|
2256
|
+
}, "auth" in e && ("params" in e.auth && (n.params = e.auth.params), "headers" in e.auth && (n.headers = e.auth.headers)), "authorizer" in e && (n.customHandler = Kt(t, n, e.authorizer))), n;
|
|
2286
2257
|
}
|
|
2287
2258
|
function nn(e, t) {
|
|
2288
2259
|
let n = tn(e, t);
|
|
@@ -2321,11 +2292,10 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
2321
2292
|
super(function(e, t) {
|
|
2322
2293
|
A.debug("No callbacks on user for " + e);
|
|
2323
2294
|
}), this.signin_requested = !1, this.user_data = null, this.serverToUserChannel = null, this.signinDonePromise = null, this._signinDoneResolve = null, this._onAuthorize = (e, t) => {
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
}
|
|
2328
|
-
this.pusher.send_event("pusher:signin", {
|
|
2295
|
+
e ? (A.warn(`Error during signin: ${e}`), this.emit("pusher:signin_error", Object.assign({}, {
|
|
2296
|
+
type: "AuthError",
|
|
2297
|
+
error: e.message
|
|
2298
|
+
}, e instanceof _ ? { status: e.status } : {})), this._cleanup()) : this.pusher.send_event("pusher:signin", {
|
|
2329
2299
|
auth: t.auth,
|
|
2330
2300
|
user_data: t.user_data
|
|
2331
2301
|
});
|
|
@@ -2348,18 +2318,14 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
2348
2318
|
A.error(`Failed parsing user data after signin: ${e.user_data}`), this._cleanup();
|
|
2349
2319
|
return;
|
|
2350
2320
|
}
|
|
2351
|
-
|
|
2352
|
-
A.error(`user_data doesn't contain an id. user_data: ${this.user_data}`), this._cleanup();
|
|
2353
|
-
return;
|
|
2354
|
-
}
|
|
2355
|
-
this._signinDoneResolve(), this._subscribeChannels();
|
|
2321
|
+
typeof this.user_data.id != "string" || this.user_data.id === "" ? (A.error(`user_data doesn't contain an id. user_data: ${this.user_data}`), this._cleanup()) : (this._signinDoneResolve(), this._subscribeChannels());
|
|
2356
2322
|
}
|
|
2357
2323
|
_subscribeChannels() {
|
|
2358
2324
|
let e = (e) => {
|
|
2359
2325
|
e.subscriptionPending && e.subscriptionCancelled ? e.reinstateSubscription() : !e.subscriptionPending && this.pusher.connection.state === "connected" && e.subscribe();
|
|
2360
2326
|
};
|
|
2361
2327
|
this.serverToUserChannel = new R(`#server-to-user-${this.user_data.id}`, this.pusher), this.serverToUserChannel.bind_global((e, t) => {
|
|
2362
|
-
e.indexOf("pusher_internal:")
|
|
2328
|
+
e.indexOf("pusher_internal:") !== 0 && e.indexOf("pusher:") !== 0 && this.emit(e, t);
|
|
2363
2329
|
}), e(this.serverToUserChannel);
|
|
2364
2330
|
}
|
|
2365
2331
|
_cleanup() {
|