tuikit-atomicx-vue3 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/dist/AttachmentPicker.module-0_DWsAtr.js +11 -0
- package/dist/AttachmentPicker.vue_vue_type_script_setup_true_lang-B9tVChd9.js +89 -0
- package/dist/AudioRequestDialog.vue_vue_type_script_setup_true_lang-BmX-qsat.js +108 -0
- package/dist/CustomMessage.vue_vue_type_script_setup_true_lang-By3MsAd0.js +12 -0
- package/dist/CustomMessage.vue_vue_type_script_setup_true_lang-CoK94Qxs.js +12 -0
- package/dist/DialogPortal-8bLejP4P.js +496 -0
- package/dist/FilePicker.vue_vue_type_script_setup_true_lang-D0cP-aFi.js +71 -0
- package/dist/GroupTipMessage.vue_vue_type_style_index_0_lang-BqyPcZln.js +30 -0
- package/dist/GroupTipMessage.vue_vue_type_style_index_0_lang-Dw2-5Ner.js +30 -0
- package/dist/ImagePicker.vue_vue_type_script_setup_true_lang-DzBHwcSi.js +71 -0
- package/dist/MaterialRenameDialog.vue_vue_type_script_setup_true_lang-Cmhf2QX4.js +43 -0
- package/dist/Message.vue_vue_type_script_setup_true_lang-BV0PxtjX.js +32 -0
- package/dist/Message.vue_vue_type_script_setup_true_lang-mEw2syBo.js +23 -0
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Ca6-JH93.js +123 -0
- package/dist/PopoverTrigger-BhQt39dx.js +679 -0
- package/dist/PopperContent-C59duB_H.js +2219 -0
- package/dist/QuotedMessagePreview.vue_vue_type_script_setup_true_lang-C8lXN2Qm.js +91 -0
- package/dist/SendButton.vue_vue_type_script_setup_true_lang-BqIeqUyN.js +35 -0
- package/dist/Teleport-BnT1MTUO.js +1366 -0
- package/dist/TextEditor.vue_vue_type_script_setup_true_lang-w_I4bsmJ.js +126 -0
- package/dist/TextEditor.vue_vue_type_script_setup_true_lang-yXW1iVZ1.js +98 -0
- package/dist/VideoPicker.vue_vue_type_script_setup_true_lang-DAv8_NWh.js +71 -0
- package/dist/VideoRequestDialog.vue_vue_type_script_setup_true_lang-CnE-LwNh.js +108 -0
- package/dist/_commonjsHelpers-CUmg6egw.js +6 -0
- package/dist/_plugin-vue_export-helper-1tPrXgE0.js +10 -0
- package/dist/baseComp/ActionSheep.js +92 -0
- package/dist/baseComp/ActionSheep.vue.d.ts +65 -0
- package/dist/baseComp/AudioIcon.js +48 -0
- package/dist/baseComp/AudioIcon.vue.d.ts +18 -0
- package/dist/baseComp/Avatar.js +36 -0
- package/dist/baseComp/Avatar.vue.d.ts +14 -0
- package/dist/baseComp/Dialog/DialogH5.js +99 -0
- package/dist/baseComp/Dialog/DialogH5.vue.d.ts +75 -0
- package/dist/baseComp/Dialog/DialogPC.js +148 -0
- package/dist/baseComp/Dialog/DialogPC.vue.d.ts +95 -0
- package/dist/baseComp/Dialog/index.d.ts +3 -0
- package/dist/baseComp/Dialog/index.js +4 -0
- package/dist/baseComp/IconButton.js +71 -0
- package/dist/baseComp/IconButton.vue.d.ts +78 -0
- package/dist/baseComp/Input/InputH5.js +163 -0
- package/dist/baseComp/Input/InputH5.vue.d.ts +83 -0
- package/dist/baseComp/Input/InputPC.js +163 -0
- package/dist/baseComp/Input/InputPC.vue.d.ts +83 -0
- package/dist/baseComp/Input/InputWX.js +166 -0
- package/dist/baseComp/Input/InputWX.vue.d.ts +83 -0
- package/dist/baseComp/Input/index.d.ts +207 -0
- package/dist/baseComp/Input/index.js +7 -0
- package/dist/baseComp/MessageBox/index.d.ts +12 -0
- package/dist/baseComp/MessageBox/index.js +187 -0
- package/dist/baseComp/MessageBox/index.vue.d.ts +58 -0
- package/dist/baseComp/Modal/Modal.js +54 -0
- package/dist/baseComp/Modal/Modal.vue.d.ts +52 -0
- package/dist/baseComp/Modal/index.d.ts +4 -0
- package/dist/baseComp/Modal/index.js +5 -0
- package/dist/baseComp/ObserverView/ObserverView.js +111 -0
- package/dist/baseComp/ObserverView/ObserverView.vue.d.ts +77 -0
- package/dist/baseComp/ObserverView/index.d.ts +3 -0
- package/dist/baseComp/ObserverView/index.js +4 -0
- package/dist/baseComp/Option/OptionH5.js +59 -0
- package/dist/baseComp/Option/OptionH5.vue.d.ts +30 -0
- package/dist/baseComp/Option/OptionPC.js +59 -0
- package/dist/baseComp/Option/OptionPC.vue.d.ts +27 -0
- package/dist/baseComp/Option/OptionWX.js +60 -0
- package/dist/baseComp/Option/OptionWX.vue.d.ts +30 -0
- package/dist/baseComp/Option/index.d.ts +3 -0
- package/dist/baseComp/Option/index.js +4 -0
- package/dist/baseComp/Select/SelectH5.js +100 -0
- package/dist/baseComp/Select/SelectPC.js +143 -0
- package/dist/baseComp/Select/SelectPC.vue.d.ts +35 -0
- package/dist/baseComp/Select/SelectWX.js +109 -0
- package/dist/baseComp/Select/index.d.ts +3 -0
- package/dist/baseComp/Select/index.js +4 -0
- package/dist/baseComp/SvgIcon.js +34 -0
- package/dist/baseComp/SvgIcon.vue.d.ts +32 -0
- package/dist/baseComp/TuiSwitch.js +28 -0
- package/dist/baseComp/TuiSwitch.vue.d.ts +18 -0
- package/dist/baseComp/View/View.js +42 -0
- package/dist/baseComp/View/View.vue.d.ts +55 -0
- package/dist/baseComp/View/index.d.ts +3 -0
- package/dist/baseComp/View/index.js +4 -0
- package/dist/baseComp/useZIndex.d.ts +4 -0
- package/dist/baseComp/useZIndex.js +17 -0
- package/dist/components/AudioSetting/AudioMediaControl.js +99 -0
- package/dist/components/AudioSetting/AudioMediaControl.vue.d.ts +6 -0
- package/dist/components/AudioSetting/AudioRequestDialog.js +4 -0
- package/dist/components/AudioSetting/AudioRequestDialog.vue.d.ts +2 -0
- package/dist/components/AudioSetting/AudioSettingTab.js +130 -0
- package/dist/components/AudioSetting/AudioSettingTab.vue.d.ts +2 -0
- package/dist/components/AudioSetting/MicrophoneSelect.js +71 -0
- package/dist/components/AudioSetting/MicrophoneSelect.vue.d.ts +29 -0
- package/dist/components/AudioSetting/SpeakerSelect.js +71 -0
- package/dist/components/AudioSetting/SpeakerSelect.vue.d.ts +29 -0
- package/dist/components/AudioSetting/index.d.ts +4 -0
- package/dist/components/AudioSetting/index.js +37 -0
- package/dist/components/AudioSetting/index.vue.d.ts +37 -0
- package/dist/components/AudioSettingPanel/i18n/en-US/index.d.ts +7 -0
- package/dist/components/AudioSettingPanel/i18n/en-US/index.js +10 -0
- package/dist/components/AudioSettingPanel/i18n/index.d.ts +4 -0
- package/dist/components/AudioSettingPanel/i18n/index.js +6 -0
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.d.ts +7 -0
- package/dist/components/AudioSettingPanel/i18n/zh-CN/index.js +10 -0
- package/dist/components/AudioSettingPanel/index.d.ts +3 -0
- package/dist/components/AudioSettingPanel/index.js +139 -0
- package/dist/components/AudioSettingPanel/index.vue.d.ts +2 -0
- package/dist/components/Avatar/Avatar.js +167 -0
- package/dist/components/Avatar/Avatar.vue.d.ts +95 -0
- package/dist/components/Avatar/AvatarBadge/AvatarBadge.js +40 -0
- package/dist/components/Avatar/AvatarBadge/AvatarBadge.vue.d.ts +51 -0
- package/dist/components/Avatar/AvatarBadge/index.d.ts +3 -0
- package/dist/components/Avatar/AvatarBadge/index.js +4 -0
- package/dist/components/Avatar/index.d.ts +4 -0
- package/dist/components/Avatar/index.js +4 -0
- package/dist/components/BarrageInput/BarrageInput.js +81 -0
- package/dist/components/BarrageInput/BarrageInput.vue.d.ts +59 -0
- package/dist/components/BarrageInput/BarrageInputH5.js +80 -0
- package/dist/components/BarrageInput/BarrageInputH5.vue.d.ts +53 -0
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +110 -0
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.vue.d.ts +17 -0
- package/dist/components/BarrageInput/EmojiPicker/index.d.ts +3 -0
- package/dist/components/BarrageInput/EmojiPicker/index.js +4 -0
- package/dist/components/BarrageInput/TextEditor/EditorCore.d.ts +16 -0
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +148 -0
- package/dist/components/BarrageInput/TextEditor/TextEditor.js +4 -0
- package/dist/components/BarrageInput/TextEditor/TextEditor.vue.d.ts +52 -0
- package/dist/components/BarrageInput/TextEditor/index.d.ts +3 -0
- package/dist/components/BarrageInput/TextEditor/index.js +4 -0
- package/dist/components/BarrageInput/i18n/en-US/index.d.ts +5 -0
- package/dist/components/BarrageInput/i18n/en-US/index.js +8 -0
- package/dist/components/BarrageInput/i18n/index.d.ts +4 -0
- package/dist/components/BarrageInput/i18n/index.js +6 -0
- package/dist/components/BarrageInput/i18n/zh-CN/index.d.ts +5 -0
- package/dist/components/BarrageInput/i18n/zh-CN/index.js +8 -0
- package/dist/components/BarrageInput/index.d.ts +154 -0
- package/dist/components/BarrageInput/index.js +13 -0
- package/dist/components/BarrageList/BarrageList.js +231 -0
- package/dist/components/BarrageList/BarrageList.vue.d.ts +63 -0
- package/dist/components/BarrageList/BarrageListH5.js +227 -0
- package/dist/components/BarrageList/BarrageListH5.vue.d.ts +63 -0
- package/dist/components/BarrageList/ClickAction/UserActionMenu.js +113 -0
- package/dist/components/BarrageList/ClickAction/UserActionMenu.vue.d.ts +21 -0
- package/dist/components/BarrageList/Message/CustomMessage/CustomMessage.js +4 -0
- package/dist/components/BarrageList/Message/CustomMessage/CustomMessage.vue.d.ts +2 -0
- package/dist/components/BarrageList/Message/CustomMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/CustomMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.js +28 -0
- package/dist/components/BarrageList/Message/FaceMessage/FaceMessage.vue.d.ts +30 -0
- package/dist/components/BarrageList/Message/FaceMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/FaceMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.js +4 -0
- package/dist/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +16 -0
- package/dist/components/BarrageList/Message/GroupTipMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/GroupTipMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.js +95 -0
- package/dist/components/BarrageList/Message/ImageMessage/ImageMessage.vue.d.ts +34 -0
- package/dist/components/BarrageList/Message/ImageMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/ImageMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.js +9 -0
- package/dist/components/BarrageList/Message/MergerMessage/MergerMessage.vue.d.ts +2 -0
- package/dist/components/BarrageList/Message/MergerMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/MergerMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/Message.js +4 -0
- package/dist/components/BarrageList/Message/Message.vue.d.ts +34 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.js +48 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +43 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageBubble/index.js +4 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.js +116 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageLayout.vue.d.ts +44 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.js +45 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +54 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +26 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +15 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/MessageLayout/MessageMeta/index.js +4 -0
- package/dist/components/BarrageList/Message/MessageLayout/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/MessageLayout/index.js +4 -0
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.js +49 -0
- package/dist/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +35 -0
- package/dist/components/BarrageList/Message/RecalledMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/RecalledMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.js +120 -0
- package/dist/components/BarrageList/Message/TextMessage/TextMessage.vue.d.ts +36 -0
- package/dist/components/BarrageList/Message/TextMessage/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/TextMessage/index.js +4 -0
- package/dist/components/BarrageList/Message/index.d.ts +3 -0
- package/dist/components/BarrageList/Message/index.js +4 -0
- package/dist/components/BarrageList/MessageForward/ForwardListItem.js +54 -0
- package/dist/components/BarrageList/MessageForward/ForwardListItem.vue.d.ts +17 -0
- package/dist/components/BarrageList/MessageForward/MessageForward.js +255 -0
- package/dist/components/BarrageList/MessageForward/MessageForward.vue.d.ts +2 -0
- package/dist/components/BarrageList/MessageForward/index.d.ts +3 -0
- package/dist/components/BarrageList/MessageForward/index.js +4 -0
- package/dist/components/BarrageList/MessageListContext.d.ts +3 -0
- package/dist/components/BarrageList/MessageListContext.js +13 -0
- package/dist/components/BarrageList/MessageTimeDivider/MessageTimeDivider.js +38 -0
- package/dist/components/BarrageList/MessageTimeDivider/MessageTimeDivider.vue.d.ts +34 -0
- package/dist/components/BarrageList/MessageTimeDivider/index.d.ts +3 -0
- package/dist/components/BarrageList/MessageTimeDivider/index.js +4 -0
- package/dist/components/BarrageList/i18n/en-US/index.d.ts +10 -0
- package/dist/components/BarrageList/i18n/en-US/index.js +13 -0
- package/dist/components/BarrageList/i18n/index.d.ts +4 -0
- package/dist/components/BarrageList/i18n/index.js +6 -0
- package/dist/components/BarrageList/i18n/zh-CN/index.d.ts +12 -0
- package/dist/components/BarrageList/i18n/zh-CN/index.js +15 -0
- package/dist/components/BarrageList/index.d.ts +74 -0
- package/dist/components/BarrageList/index.js +12 -0
- package/dist/components/CameraButton/index.d.ts +3 -0
- package/dist/components/CameraButton/index.js +4 -0
- package/dist/components/CameraButton/index.vue.d.ts +2 -0
- package/dist/components/CoGuestPanel/CoGuestPanel.js +285 -0
- package/dist/components/CoGuestPanel/CoGuestPanel.vue.d.ts +2 -0
- package/dist/components/CoGuestPanel/i18n/en-US/index.d.ts +16 -0
- package/dist/components/CoGuestPanel/i18n/en-US/index.js +19 -0
- package/dist/components/CoGuestPanel/i18n/index.d.ts +4 -0
- package/dist/components/CoGuestPanel/i18n/index.js +6 -0
- package/dist/components/CoGuestPanel/i18n/zh-CN/index.d.ts +16 -0
- package/dist/components/CoGuestPanel/i18n/zh-CN/index.js +19 -0
- package/dist/components/CoGuestPanel/index.d.ts +3 -0
- package/dist/components/CoGuestPanel/index.js +9 -0
- package/dist/components/ConversationList/ConversationList.js +36 -0
- package/dist/components/ConversationList/ConversationList.vue.d.ts +2 -0
- package/dist/components/ConversationList/index.d.ts +3 -0
- package/dist/components/ConversationList/index.js +4 -0
- package/dist/components/LiveAudienceList/LiveAudienceList.js +167 -0
- package/dist/components/LiveAudienceList/LiveAudienceList.vue.d.ts +31 -0
- package/dist/components/LiveAudienceList/LiveAudienceListH5.js +88 -0
- package/dist/components/LiveAudienceList/LiveAudienceListH5.vue.d.ts +31 -0
- package/dist/components/LiveAudienceList/UserActionMenu.js +177 -0
- package/dist/components/LiveAudienceList/UserActionMenu.vue.d.ts +21 -0
- package/dist/components/LiveAudienceList/i18n/en-US/index.d.ts +18 -0
- package/dist/components/LiveAudienceList/i18n/en-US/index.js +21 -0
- package/dist/components/LiveAudienceList/i18n/index.d.ts +4 -0
- package/dist/components/LiveAudienceList/i18n/index.js +6 -0
- package/dist/components/LiveAudienceList/i18n/zh-CN/index.d.ts +22 -0
- package/dist/components/LiveAudienceList/i18n/zh-CN/index.js +25 -0
- package/dist/components/LiveAudienceList/index.d.ts +41 -0
- package/dist/components/LiveAudienceList/index.js +12 -0
- package/dist/components/LiveList/LiveList.js +152 -0
- package/dist/components/LiveList/LiveList.vue.d.ts +8 -0
- package/dist/components/LiveList/LiveListH5.js +175 -0
- package/dist/components/LiveList/LiveListH5.vue.d.ts +8 -0
- package/dist/components/LiveList/i18n/en-US/index.d.ts +8 -0
- package/dist/components/LiveList/i18n/en-US/index.js +11 -0
- package/dist/components/LiveList/i18n/index.d.ts +4 -0
- package/dist/components/LiveList/i18n/index.js +6 -0
- package/dist/components/LiveList/i18n/zh-CN/index.d.ts +8 -0
- package/dist/components/LiveList/i18n/zh-CN/index.js +11 -0
- package/dist/components/LiveList/index.d.ts +6 -0
- package/dist/components/LiveList/index.js +12 -0
- package/dist/components/LiveMonitorView/LiveMonitorView.js +113 -0
- package/dist/components/LiveMonitorView/LiveMonitorView.vue.d.ts +16 -0
- package/dist/components/LiveMonitorView/i18n/en-US/index.d.ts +7 -0
- package/dist/components/LiveMonitorView/i18n/en-US/index.js +10 -0
- package/dist/components/LiveMonitorView/i18n/index.d.ts +4 -0
- package/dist/components/LiveMonitorView/i18n/index.js +6 -0
- package/dist/components/LiveMonitorView/i18n/zh-CN/index.d.ts +7 -0
- package/dist/components/LiveMonitorView/i18n/zh-CN/index.js +10 -0
- package/dist/components/LiveMonitorView/index.d.ts +3 -0
- package/dist/components/LiveMonitorView/index.js +9 -0
- package/dist/components/LiveScenePanel/CameraSettingDialog.js +215 -0
- package/dist/components/LiveScenePanel/CameraSettingDialog.vue.d.ts +25 -0
- package/dist/components/LiveScenePanel/LiveSceneSelect.js +120 -0
- package/dist/components/LiveScenePanel/LiveSceneSelect.vue.d.ts +19 -0
- package/dist/components/LiveScenePanel/MaterialDialog.js +114 -0
- package/dist/components/LiveScenePanel/MaterialDialog.vue.d.ts +20 -0
- package/dist/components/LiveScenePanel/MaterialItem.js +168 -0
- package/dist/components/LiveScenePanel/MaterialItem.vue.d.ts +23 -0
- package/dist/components/LiveScenePanel/MaterialRenameDialog.js +4 -0
- package/dist/components/LiveScenePanel/MaterialRenameDialog.vue.d.ts +23 -0
- package/dist/components/LiveScenePanel/i18n/en-US/index.d.ts +35 -0
- package/dist/components/LiveScenePanel/i18n/en-US/index.js +45 -0
- package/dist/components/LiveScenePanel/i18n/index.d.ts +4 -0
- package/dist/components/LiveScenePanel/i18n/index.js +6 -0
- package/dist/components/LiveScenePanel/i18n/zh-CN/index.d.ts +35 -0
- package/dist/components/LiveScenePanel/i18n/zh-CN/index.js +45 -0
- package/dist/components/LiveScenePanel/icons/AddIcon.js +35 -0
- package/dist/components/LiveScenePanel/icons/AddIcon.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/CameraIcon.js +28 -0
- package/dist/components/LiveScenePanel/icons/CameraIcon.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/CameraMirror.js +36 -0
- package/dist/components/LiveScenePanel/icons/CameraMirror.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/CameraUnmirror.js +29 -0
- package/dist/components/LiveScenePanel/icons/CameraUnmirror.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/ImageIcon.js +26 -0
- package/dist/components/LiveScenePanel/icons/ImageIcon.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/MoreIcon.js +36 -0
- package/dist/components/LiveScenePanel/icons/MoreIcon.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/icons/ScreenIcon.js +19 -0
- package/dist/components/LiveScenePanel/icons/ScreenIcon.vue.d.ts +2 -0
- package/dist/components/LiveScenePanel/index.d.ts +3 -0
- package/dist/components/LiveScenePanel/index.js +231 -0
- package/dist/components/LiveScenePanel/index.vue.d.ts +2 -0
- package/dist/components/LiveStreamView/DefaultStreamViewUI.js +90 -0
- package/dist/components/LiveStreamView/DefaultStreamViewUI.vue.d.ts +51 -0
- package/dist/components/LiveStreamView/i18n/en-US/index.d.ts +4 -0
- package/dist/components/LiveStreamView/i18n/en-US/index.js +7 -0
- package/dist/components/LiveStreamView/i18n/index.d.ts +2 -0
- package/dist/components/LiveStreamView/i18n/index.js +6 -0
- package/dist/components/LiveStreamView/i18n/zh-CN/index.d.ts +4 -0
- package/dist/components/LiveStreamView/i18n/zh-CN/index.js +7 -0
- package/dist/components/LiveStreamView/index.d.ts +4 -0
- package/dist/components/LiveStreamView/index.js +291 -0
- package/dist/components/LiveStreamView/index.vue.d.ts +23 -0
- package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.js +4 -0
- package/dist/components/MessageInput/AttachmentPicker/AttachmentPicker.vue.d.ts +32 -0
- package/dist/components/MessageInput/AttachmentPicker/FilePicker.js +4 -0
- package/dist/components/MessageInput/AttachmentPicker/FilePicker.vue.d.ts +44 -0
- package/dist/components/MessageInput/AttachmentPicker/ImagePicker.js +4 -0
- package/dist/components/MessageInput/AttachmentPicker/ImagePicker.vue.d.ts +44 -0
- package/dist/components/MessageInput/AttachmentPicker/VideoPicker.js +4 -0
- package/dist/components/MessageInput/AttachmentPicker/VideoPicker.vue.d.ts +44 -0
- package/dist/components/MessageInput/AttachmentPicker/index.d.ts +6 -0
- package/dist/components/MessageInput/AttachmentPicker/index.js +10 -0
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +106 -0
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.vue.d.ts +17 -0
- package/dist/components/MessageInput/EmojiPicker/index.d.ts +3 -0
- package/dist/components/MessageInput/EmojiPicker/index.js +4 -0
- package/dist/components/MessageInput/MessageInput.js +4 -0
- package/dist/components/MessageInput/MessageInput.vue.d.ts +60 -0
- package/dist/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.js +4 -0
- package/dist/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.vue.d.ts +2 -0
- package/dist/components/MessageInput/QuotedMessagePreview/index.d.ts +3 -0
- package/dist/components/MessageInput/QuotedMessagePreview/index.js +4 -0
- package/dist/components/MessageInput/SendButton/SendButton.js +4 -0
- package/dist/components/MessageInput/SendButton/SendButton.vue.d.ts +15 -0
- package/dist/components/MessageInput/SendButton/index.d.ts +3 -0
- package/dist/components/MessageInput/SendButton/index.js +4 -0
- package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +16 -0
- package/dist/components/MessageInput/TextEditor/EditorCore.js +134 -0
- package/dist/components/MessageInput/TextEditor/TextEditor.js +4 -0
- package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +46 -0
- package/dist/components/MessageInput/TextEditor/index.d.ts +3 -0
- package/dist/components/MessageInput/TextEditor/index.js +4 -0
- package/dist/components/MessageInput/index.d.ts +6 -0
- package/dist/components/MessageInput/index.js +16 -0
- package/dist/components/MessageInput/types.d.js +1 -0
- package/dist/components/MessageList/Message/AudioMessage/AudioMessage.js +73 -0
- package/dist/components/MessageList/Message/AudioMessage/AudioMessage.vue.d.ts +16 -0
- package/dist/components/MessageList/Message/AudioMessage/PlayButton.js +67 -0
- package/dist/components/MessageList/Message/AudioMessage/PlayButton.vue.d.ts +19 -0
- package/dist/components/MessageList/Message/AudioMessage/WaveForm.js +64 -0
- package/dist/components/MessageList/Message/AudioMessage/WaveForm.vue.d.ts +37 -0
- package/dist/components/MessageList/Message/AudioMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/AudioMessage/index.js +4 -0
- package/dist/components/MessageList/Message/CustomMessage/CustomMessage.js +4 -0
- package/dist/components/MessageList/Message/CustomMessage/CustomMessage.vue.d.ts +2 -0
- package/dist/components/MessageList/Message/CustomMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/CustomMessage/index.js +4 -0
- package/dist/components/MessageList/Message/FaceMessage/FaceMessage.js +28 -0
- package/dist/components/MessageList/Message/FaceMessage/FaceMessage.vue.d.ts +30 -0
- package/dist/components/MessageList/Message/FaceMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/FaceMessage/index.js +4 -0
- package/dist/components/MessageList/Message/FileMessage/FileMessage.js +83 -0
- package/dist/components/MessageList/Message/FileMessage/FileMessage.vue.d.ts +30 -0
- package/dist/components/MessageList/Message/FileMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/FileMessage/index.js +4 -0
- package/dist/components/MessageList/Message/GroupTipMessage/GroupTipMessage.js +4 -0
- package/dist/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue.d.ts +16 -0
- package/dist/components/MessageList/Message/GroupTipMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/GroupTipMessage/index.js +4 -0
- package/dist/components/MessageList/Message/ImageMessage/ImageMessage.js +194 -0
- package/dist/components/MessageList/Message/ImageMessage/ImageMessage.vue.d.ts +31 -0
- package/dist/components/MessageList/Message/ImageMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/ImageMessage/index.js +4 -0
- package/dist/components/MessageList/Message/LocationMessage/LocationMessage.js +9 -0
- package/dist/components/MessageList/Message/LocationMessage/LocationMessage.vue.d.ts +2 -0
- package/dist/components/MessageList/Message/LocationMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/LocationMessage/index.js +4 -0
- package/dist/components/MessageList/Message/MergerMessage/MergerMessage.js +9 -0
- package/dist/components/MessageList/Message/MergerMessage/MergerMessage.vue.d.ts +2 -0
- package/dist/components/MessageList/Message/MergerMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/MergerMessage/index.js +4 -0
- package/dist/components/MessageList/Message/Message.js +4 -0
- package/dist/components/MessageList/Message/Message.vue.d.ts +56 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +1704 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue.d.ts +44 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/index.d.ts +3 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/index.js +4 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.js +55 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.vue.d.ts +52 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/index.d.ts +3 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageBubble/index.js +4 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +138 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.vue.d.ts +67 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +86 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue.d.ts +63 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.js +34 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue.d.ts +15 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/index.d.ts +3 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/index.js +4 -0
- package/dist/components/MessageList/Message/MessageLayout/index.d.ts +3 -0
- package/dist/components/MessageList/Message/MessageLayout/index.js +4 -0
- package/dist/components/MessageList/Message/MessageLayout/useMessageLayoutClasses.d.ts +11 -0
- package/dist/components/MessageList/Message/MessageLayout/useMessageLayoutClasses.js +40 -0
- package/dist/components/MessageList/Message/RecalledMessage/RecalledMessage.js +58 -0
- package/dist/components/MessageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +35 -0
- package/dist/components/MessageList/Message/RecalledMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/RecalledMessage/index.js +4 -0
- package/dist/components/MessageList/Message/TextMessage/TextMessage.js +122 -0
- package/dist/components/MessageList/Message/TextMessage/TextMessage.vue.d.ts +31 -0
- package/dist/components/MessageList/Message/TextMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/TextMessage/index.js +4 -0
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.js +107 -0
- package/dist/components/MessageList/Message/VideoMessage/VideoMessage.vue.d.ts +34 -0
- package/dist/components/MessageList/Message/VideoMessage/index.d.ts +3 -0
- package/dist/components/MessageList/Message/VideoMessage/index.js +4 -0
- package/dist/components/MessageList/Message/index.d.ts +3 -0
- package/dist/components/MessageList/Message/index.js +4 -0
- package/dist/components/MessageList/MessageForward/ForwardListItem.js +62 -0
- package/dist/components/MessageList/MessageForward/ForwardListItem.vue.d.ts +17 -0
- package/dist/components/MessageList/MessageForward/MessageForward.js +134 -0
- package/dist/components/MessageList/MessageForward/MessageForward.vue.d.ts +2 -0
- package/dist/components/MessageList/MessageForward/index.d.ts +3 -0
- package/dist/components/MessageList/MessageForward/index.js +4 -0
- package/dist/components/MessageList/MessageList.js +212 -0
- package/dist/components/MessageList/MessageList.vue.d.ts +66 -0
- package/dist/components/MessageList/MessageListContext.d.ts +3 -0
- package/dist/components/MessageList/MessageListContext.js +13 -0
- package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.js +38 -0
- package/dist/components/MessageList/MessageTimeDivider/MessageTimeDivider.vue.d.ts +34 -0
- package/dist/components/MessageList/MessageTimeDivider/index.d.ts +3 -0
- package/dist/components/MessageList/MessageTimeDivider/index.js +4 -0
- package/dist/components/MessageList/ReadReceiptInfo/ReadReceiptInfo.js +411 -0
- package/dist/components/MessageList/ReadReceiptInfo/ReadReceiptInfo.vue.d.ts +58 -0
- package/dist/components/MessageList/ReadReceiptInfo/index.d.ts +3 -0
- package/dist/components/MessageList/ReadReceiptInfo/index.js +4 -0
- package/dist/components/MessageList/index.d.ts +5 -0
- package/dist/components/MessageList/index.js +8 -0
- package/dist/components/MicButton/AudioIcon.js +48 -0
- package/dist/components/MicButton/AudioIcon.vue.d.ts +18 -0
- package/dist/components/MicButton/index.d.ts +3 -0
- package/dist/components/MicButton/index.js +4 -0
- package/dist/components/MicButton/index.vue.d.ts +2 -0
- package/dist/components/StreamMixer/LocalMixer/MixerControl.js +132 -0
- package/dist/components/StreamMixer/LocalMixer/MixerControl.vue.d.ts +2 -0
- package/dist/components/StreamMixer/LocalMixer/index.js +163 -0
- package/dist/components/StreamMixer/LocalMixer/index.vue.d.ts +2 -0
- package/dist/components/StreamMixer/i18n/en-US/index.d.ts +10 -0
- package/dist/components/StreamMixer/i18n/en-US/index.js +15 -0
- package/dist/components/StreamMixer/i18n/index.d.ts +2 -0
- package/dist/components/StreamMixer/i18n/index.js +6 -0
- package/dist/components/StreamMixer/i18n/zh-CN/index.d.ts +10 -0
- package/dist/components/StreamMixer/i18n/zh-CN/index.js +15 -0
- package/dist/components/StreamMixer/icons/CameraMirror.js +36 -0
- package/dist/components/StreamMixer/icons/CameraMirror.vue.d.ts +2 -0
- package/dist/components/StreamMixer/icons/Delete.js +33 -0
- package/dist/components/StreamMixer/icons/Delete.vue.d.ts +2 -0
- package/dist/components/StreamMixer/icons/Down.js +39 -0
- package/dist/components/StreamMixer/icons/Down.vue.d.ts +2 -0
- package/dist/components/StreamMixer/icons/Rotation.js +30 -0
- package/dist/components/StreamMixer/icons/Rotation.vue.d.ts +2 -0
- package/dist/components/StreamMixer/icons/Up.js +39 -0
- package/dist/components/StreamMixer/icons/Up.vue.d.ts +2 -0
- package/dist/components/StreamMixer/index.d.ts +3 -0
- package/dist/components/StreamMixer/index.js +26 -0
- package/dist/components/StreamMixer/index.vue.d.ts +2 -0
- package/dist/components/StreamView/Layout/CustomLayout.js +246 -0
- package/dist/components/StreamView/Layout/CustomLayout.vue.d.ts +55 -0
- package/dist/components/StreamView/Layout/FloatLayout.js +251 -0
- package/dist/components/StreamView/Layout/FloatLayout.vue.d.ts +54 -0
- package/dist/components/StreamView/Layout/GridLayout.js +235 -0
- package/dist/components/StreamView/Layout/GridLayout.vue.d.ts +55 -0
- package/dist/components/StreamView/Layout/MeetingLayout.js +280 -0
- package/dist/components/StreamView/Layout/MeetingLayout.vue.d.ts +55 -0
- package/dist/components/StreamView/Layout/MixLayout.js +117 -0
- package/dist/components/StreamView/Layout/MixLayout.vue.d.ts +31 -0
- package/dist/components/StreamView/common/ArrowStroke.js +53 -0
- package/dist/components/StreamView/common/ArrowStroke.vue.d.ts +20 -0
- package/dist/components/StreamView/common/LocalScreenView/index.js +101 -0
- package/dist/components/StreamView/common/LocalScreenView/index.vue.d.ts +2 -0
- package/dist/components/StreamView/common/StreamCover/index.js +74 -0
- package/dist/components/StreamView/common/StreamCover/index.vue.d.ts +20 -0
- package/dist/components/StreamView/common/StreamList/index.js +209 -0
- package/dist/components/StreamView/common/StreamList/index.vue.d.ts +56 -0
- package/dist/components/StreamView/common/StreamPlay/index.js +116 -0
- package/dist/components/StreamView/common/StreamPlay/index.vue.d.ts +38 -0
- package/dist/components/StreamView/common/StreamRegion/StreamRegionPC.js +110 -0
- package/dist/components/StreamView/common/StreamRegion/StreamRegionPC.vue.d.ts +43 -0
- package/dist/components/StreamView/common/StreamRegion/index.d.ts +3 -0
- package/dist/components/StreamView/common/StreamRegion/index.js +4 -0
- package/dist/components/StreamView/index.d.ts +3 -0
- package/dist/components/StreamView/index.js +76 -0
- package/dist/components/StreamView/index.vue.d.ts +54 -0
- package/dist/components/StreamView/manager/mediaManager.d.ts +46 -0
- package/dist/components/StreamView/manager/mediaManager.js +294 -0
- package/dist/components/UserList/AllUserActions/index.d.ts +3 -0
- package/dist/components/UserList/AllUserActions/index.js +4 -0
- package/dist/components/UserList/AllUserActions/indexH5.js +91 -0
- package/dist/components/UserList/AllUserActions/indexH5.vue.d.ts +15 -0
- package/dist/components/UserList/AllUserActions/indexPC.js +122 -0
- package/dist/components/UserList/AllUserActions/indexPC.vue.d.ts +15 -0
- package/dist/components/UserList/AllUserActions/useIndexHooks.d.ts +12 -0
- package/dist/components/UserList/AllUserActions/useIndexHooks.js +49 -0
- package/dist/components/UserList/UserItem/UserAction/index.d.ts +3 -0
- package/dist/components/UserList/UserItem/UserAction/index.js +4 -0
- package/dist/components/UserList/UserItem/UserAction/indexH5.js +72 -0
- package/dist/components/UserList/UserItem/UserAction/indexH5.vue.d.ts +20 -0
- package/dist/components/UserList/UserItem/UserAction/indexPC.js +150 -0
- package/dist/components/UserList/UserItem/UserAction/indexPC.vue.d.ts +16 -0
- package/dist/components/UserList/UserItem/UserInfo/index.js +130 -0
- package/dist/components/UserList/UserItem/UserInfo/index.vue.d.ts +31 -0
- package/dist/components/UserList/UserItem/UserInvite/index.js +39 -0
- package/dist/components/UserList/UserItem/UserInvite/index.vue.d.ts +16 -0
- package/dist/components/UserList/UserItem/index.d.ts +3 -0
- package/dist/components/UserList/UserItem/index.js +4 -0
- package/dist/components/UserList/UserItem/indexH5.js +64 -0
- package/dist/components/UserList/UserItem/indexH5.vue.d.ts +16 -0
- package/dist/components/UserList/UserItem/indexPC.js +47 -0
- package/dist/components/UserList/UserItem/indexPC.vue.d.ts +16 -0
- package/dist/components/UserList/UserListContent/index.js +56 -0
- package/dist/components/UserList/UserListContent/index.vue.d.ts +44 -0
- package/dist/components/UserList/UserListSearch/index.js +30 -0
- package/dist/components/UserList/UserListSearch/index.vue.d.ts +2 -0
- package/dist/components/UserList/index.js +92 -0
- package/dist/components/UserList/index.vue.d.ts +34 -0
- package/dist/components/UserPicker/UserPicker.js +187 -0
- package/dist/components/UserPicker/UserPicker.vue.d.ts +53 -0
- package/dist/components/UserPicker/components/ListMode/ListMode.js +122 -0
- package/dist/components/UserPicker/components/ListMode/ListMode.vue.d.ts +21 -0
- package/dist/components/UserPicker/components/ListMode/index.d.ts +3 -0
- package/dist/components/UserPicker/components/ListMode/index.js +4 -0
- package/dist/components/UserPicker/components/SearchBar/SearchBar.js +71 -0
- package/dist/components/UserPicker/components/SearchBar/SearchBar.vue.d.ts +15 -0
- package/dist/components/UserPicker/components/SearchBar/index.d.ts +3 -0
- package/dist/components/UserPicker/components/SearchBar/index.js +4 -0
- package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.js +112 -0
- package/dist/components/UserPicker/components/SelectedPanel/SelectedPanel.vue.d.ts +34 -0
- package/dist/components/UserPicker/components/SelectedPanel/index.d.ts +3 -0
- package/dist/components/UserPicker/components/SelectedPanel/index.js +4 -0
- package/dist/components/UserPicker/components/TreeMode/TreeMode.js +57 -0
- package/dist/components/UserPicker/components/TreeMode/TreeMode.vue.d.ts +24 -0
- package/dist/components/UserPicker/components/TreeMode/TreeNode.js +173 -0
- package/dist/components/UserPicker/components/TreeMode/TreeNode.vue.d.ts +29 -0
- package/dist/components/UserPicker/components/TreeMode/index.d.ts +3 -0
- package/dist/components/UserPicker/components/TreeMode/index.js +4 -0
- package/dist/components/UserPicker/hooks/useSearchFilter.d.ts +20 -0
- package/dist/components/UserPicker/hooks/useSearchFilter.js +91 -0
- package/dist/components/UserPicker/hooks/useSelection.d.ts +32 -0
- package/dist/components/UserPicker/hooks/useSelection.js +351 -0
- package/dist/components/UserPicker/hooks/useTreeState.d.ts +16 -0
- package/dist/components/UserPicker/hooks/useTreeState.js +43 -0
- package/dist/components/UserPicker/index.d.ts +6 -0
- package/dist/components/UserPicker/index.js +5 -0
- package/dist/components/UserPicker/type.d.ts +60 -0
- package/dist/components/UserPicker/type.js +1 -0
- package/dist/components/VideoSetting/CameraSelect.js +73 -0
- package/dist/components/VideoSetting/CameraSelect.vue.d.ts +29 -0
- package/dist/components/VideoSetting/VideoMediaControl.js +94 -0
- package/dist/components/VideoSetting/VideoMediaControl.vue.d.ts +6 -0
- package/dist/components/VideoSetting/VideoPreview.js +47 -0
- package/dist/components/VideoSetting/VideoPreview.vue.d.ts +2 -0
- package/dist/components/VideoSetting/VideoProfile.js +54 -0
- package/dist/components/VideoSetting/VideoProfile.vue.d.ts +2 -0
- package/dist/components/VideoSetting/VideoRequestDialog.js +4 -0
- package/dist/components/VideoSetting/VideoRequestDialog.vue.d.ts +2 -0
- package/dist/components/VideoSetting/VideoSettingTab.js +71 -0
- package/dist/components/VideoSetting/VideoSettingTab.vue.d.ts +2 -0
- package/dist/components/VideoSetting/index.d.ts +4 -0
- package/dist/components/VideoSetting/index.js +39 -0
- package/dist/components/VideoSetting/index.vue.d.ts +40 -0
- package/dist/components/VideoSettingPanel/CameraSelect.js +72 -0
- package/dist/components/VideoSettingPanel/CameraSelect.vue.d.ts +29 -0
- package/dist/components/VideoSettingPanel/VideoPreview.js +47 -0
- package/dist/components/VideoSettingPanel/VideoPreview.vue.d.ts +2 -0
- package/dist/components/VideoSettingPanel/VideoProfile.js +53 -0
- package/dist/components/VideoSettingPanel/VideoProfile.vue.d.ts +2 -0
- package/dist/components/VideoSettingPanel/i18n/en-US/index.d.ts +7 -0
- package/dist/components/VideoSettingPanel/i18n/en-US/index.js +10 -0
- package/dist/components/VideoSettingPanel/i18n/index.d.ts +4 -0
- package/dist/components/VideoSettingPanel/i18n/index.js +6 -0
- package/dist/components/VideoSettingPanel/i18n/zh-CN/index.d.ts +7 -0
- package/dist/components/VideoSettingPanel/i18n/zh-CN/index.js +10 -0
- package/dist/components/VideoSettingPanel/index.d.ts +3 -0
- package/dist/components/VideoSettingPanel/index.js +80 -0
- package/dist/components/VideoSettingPanel/index.vue.d.ts +32 -0
- package/dist/constants/emoji.d.ts +6 -0
- package/dist/constants/emoji.js +69 -0
- package/dist/directives/vClickOutside.d.ts +5 -0
- package/dist/directives/vClickOutside.js +30 -0
- package/dist/directives/vDblTouch.d.ts +12 -0
- package/dist/directives/vDblTouch.js +61 -0
- package/dist/directives/vTap.d.ts +15 -0
- package/dist/directives/vTap.js +79 -0
- package/dist/directives/vTouchScale.d.ts +9 -0
- package/dist/directives/vTouchScale.js +200 -0
- package/dist/handler/index.d.ts +2 -0
- package/dist/handler/index.js +6 -0
- package/dist/handler/translator.d.ts +27 -0
- package/dist/handler/translator.js +140 -0
- package/dist/handler/voiceConverter.d.ts +8 -0
- package/dist/handler/voiceConverter.js +37 -0
- package/dist/hooks/useAudioControl.d.ts +26 -0
- package/dist/hooks/useAudioControl.js +135 -0
- package/dist/hooks/useMessageActions.d.ts +33 -0
- package/dist/hooks/useMessageActions.js +91 -0
- package/dist/hooks/useReadReceipt/useReadReceipt.d.ts +47 -0
- package/dist/hooks/useReadReceipt/useReadReceipt.js +150 -0
- package/dist/hooks/useRoomActions/index.d.ts +5 -0
- package/dist/hooks/useRoomActions/index.js +18 -0
- package/dist/hooks/useRoomActions/useRoomAudioAction.d.ts +8 -0
- package/dist/hooks/useRoomActions/useRoomAudioAction.js +60 -0
- package/dist/hooks/useRoomActions/useRoomScreenAction.d.ts +3 -0
- package/dist/hooks/useRoomActions/useRoomScreenAction.js +70 -0
- package/dist/hooks/useRoomActions/useRoomVideoAction.d.ts +8 -0
- package/dist/hooks/useRoomActions/useRoomVideoAction.js +60 -0
- package/dist/hooks/useRoomEngine.d.ts +7 -0
- package/dist/hooks/useRoomEngine.js +29 -0
- package/dist/hooks/useScroll.d.ts +34 -0
- package/dist/hooks/useScroll.js +108 -0
- package/dist/hooks/useUserActions/index.d.ts +40 -0
- package/dist/hooks/useUserActions/index.js +130 -0
- package/dist/hooks/useUserActions/useAdminAction.d.ts +3 -0
- package/dist/hooks/useUserActions/useAdminAction.js +43 -0
- package/dist/hooks/useUserActions/useAudioAction.d.ts +3 -0
- package/dist/hooks/useUserActions/useAudioAction.js +56 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardDialog.js +79 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardDialog.vue.d.ts +17 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardInput.js +64 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/changeNameCardInput.vue.d.ts +17 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/index.d.ts +16 -0
- package/dist/hooks/useUserActions/useChangeNameCardAction/index.js +66 -0
- package/dist/hooks/useUserActions/useChatAction.d.ts +3 -0
- package/dist/hooks/useUserActions/useChatAction.js +37 -0
- package/dist/hooks/useUserActions/useKickUserAction.d.ts +16 -0
- package/dist/hooks/useUserActions/useKickUserAction.js +40 -0
- package/dist/hooks/useUserActions/useMemberInviteAction.d.ts +3 -0
- package/dist/hooks/useUserActions/useMemberInviteAction.js +48 -0
- package/dist/hooks/useUserActions/useSeatAction.d.ts +12 -0
- package/dist/hooks/useUserActions/useSeatAction.js +166 -0
- package/dist/hooks/useUserActions/useTransferOwnerAction.d.ts +16 -0
- package/dist/hooks/useUserActions/useTransferOwnerAction.js +70 -0
- package/dist/hooks/useUserActions/useVideoAction.d.ts +16 -0
- package/dist/hooks/useUserActions/useVideoAction.js +53 -0
- package/dist/hooks/useZIndex.d.ts +4 -0
- package/dist/hooks/useZIndex.js +17 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.js +7 -0
- package/dist/index-BF6QB9jF.js +63 -0
- package/dist/index-BREVQgBq.js +46 -0
- package/dist/index-BlyS4ObG.js +50 -0
- package/dist/index-NFANFVi5.js +58 -0
- package/dist/index-oR-rgHxX.js +21345 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +164 -0
- package/dist/locales/en-US.d.ts +427 -0
- package/dist/locales/en-US.js +438 -0
- package/dist/locales/index.d.ts +41 -0
- package/dist/locales/index.js +50 -0
- package/dist/locales/zh-CN.d.ts +431 -0
- package/dist/locales/zh-CN.js +442 -0
- package/dist/states/BarrageListState/BarrageListState.d.ts +26 -0
- package/dist/states/BarrageListState/BarrageListState.js +208 -0
- package/dist/states/BarrageListState/index.d.ts +1 -0
- package/dist/states/BarrageListState/index.js +4 -0
- package/dist/states/CoGuestState.d.ts +106 -0
- package/dist/states/CoGuestState.js +329 -0
- package/dist/states/CoHostState.d.ts +22 -0
- package/dist/states/CoHostState.js +181 -0
- package/dist/states/ConversationListState/ConversationListState.d.ts +13 -0
- package/dist/states/ConversationListState/ConversationListState.js +40 -0
- package/dist/states/ConversationListState/index.d.ts +1 -0
- package/dist/states/ConversationListState/index.js +4 -0
- package/dist/states/DeviceState.d.ts +191 -0
- package/dist/states/DeviceState.js +438 -0
- package/dist/states/LiveAudienceState.d.ts +20 -0
- package/dist/states/LiveAudienceState.js +156 -0
- package/dist/states/LiveMonitorState/api/http.d.ts +13 -0
- package/dist/states/LiveMonitorState/api/http.js +2432 -0
- package/dist/states/LiveMonitorState/index.d.ts +39 -0
- package/dist/states/LiveMonitorState/index.js +167 -0
- package/dist/states/LiveMonitorState/player/adapters/trtc.d.ts +27 -0
- package/dist/states/LiveMonitorState/player/adapters/trtc.js +158 -0
- package/dist/states/LiveMonitorState/player/base/basePlayer.d.ts +24 -0
- package/dist/states/LiveMonitorState/player/base/basePlayer.js +218 -0
- package/dist/states/LiveMonitorState/player/index.d.ts +4 -0
- package/dist/states/LiveMonitorState/player/index.js +12 -0
- package/dist/states/LiveMonitorState/player/manager/playerManager.d.ts +13 -0
- package/dist/states/LiveMonitorState/player/manager/playerManager.js +47 -0
- package/dist/states/LiveMonitorState/player/types/index.d.ts +2 -0
- package/dist/states/LiveMonitorState/player/types/index.js +10 -0
- package/dist/states/LiveMonitorState/player/types/player.d.ts +26 -0
- package/dist/states/LiveMonitorState/player/types/player.js +15 -0
- package/dist/states/LiveMonitorState/player/types/trtc.d.ts +18 -0
- package/dist/states/LiveMonitorState/player/types/trtc.js +22 -0
- package/dist/states/LiveMonitorState/types/index.d.ts +43 -0
- package/dist/states/LiveMonitorState/types/index.js +1 -0
- package/dist/states/LiveMonitorState/utils/index.d.ts +6 -0
- package/dist/states/LiveMonitorState/utils/index.js +24 -0
- package/dist/states/LiveSeatState/index.d.ts +37 -0
- package/dist/states/LiveSeatState/index.js +21 -0
- package/dist/states/LiveSeatState/seatEventManager.d.ts +12 -0
- package/dist/states/LiveSeatState/seatEventManager.js +103 -0
- package/dist/states/LiveSeatState/seatManager.d.ts +16 -0
- package/dist/states/LiveSeatState/seatManager.js +47 -0
- package/dist/states/LiveSeatState/store.d.ts +29 -0
- package/dist/states/LiveSeatState/store.js +33 -0
- package/dist/states/LiveSeatState/usePlayStream/MixStreamPlayer.d.ts +17 -0
- package/dist/states/LiveSeatState/usePlayStream/MixStreamPlayer.js +67 -0
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.d.ts +28 -0
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamManager.js +105 -0
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.d.ts +29 -0
- package/dist/states/LiveSeatState/usePlayStream/RTCStreamPlayer.js +111 -0
- package/dist/states/LiveSeatState/usePlayStream/index.d.ts +6 -0
- package/dist/states/LiveSeatState/usePlayStream/index.js +123 -0
- package/dist/states/LiveSeatState/usePlayStream/useStreamPostion.d.ts +17 -0
- package/dist/states/LiveSeatState/usePlayStream/useStreamPostion.js +71 -0
- package/dist/states/LiveState/index.d.ts +131 -0
- package/dist/states/LiveState/index.js +361 -0
- package/dist/states/LoginState.d.ts +31 -0
- package/dist/states/LoginState.js +64 -0
- package/dist/states/MessageActionState/MessageActionState.d.ts +96 -0
- package/dist/states/MessageActionState/MessageActionState.js +133 -0
- package/dist/states/MessageActionState/index.d.ts +1 -0
- package/dist/states/MessageActionState/index.js +4 -0
- package/dist/states/MessageInputState/MessageInputState.d.ts +46 -0
- package/dist/states/MessageInputState/MessageInputState.js +190 -0
- package/dist/states/MessageInputState/index.d.ts +1 -0
- package/dist/states/MessageInputState/index.js +5 -0
- package/dist/states/MessageListState/MessageListState.d.ts +24 -0
- package/dist/states/MessageListState/MessageListState.js +114 -0
- package/dist/states/MessageListState/index.d.ts +1 -0
- package/dist/states/MessageListState/index.js +4 -0
- package/dist/states/RoomState.d.ts +173 -0
- package/dist/states/RoomState.js +379 -0
- package/dist/states/SeatStore.d.ts +80 -0
- package/dist/states/SeatStore.js +252 -0
- package/dist/states/UserState/index.d.ts +5 -0
- package/dist/states/UserState/index.js +55 -0
- package/dist/states/UserState/store.d.ts +272 -0
- package/dist/states/UserState/store.js +182 -0
- package/dist/states/UserState/userEventManager.d.ts +23 -0
- package/dist/states/UserState/userEventManager.js +174 -0
- package/dist/states/UserState/userManager.d.ts +119 -0
- package/dist/states/UserState/userManager.js +300 -0
- package/dist/states/VideoMixerState.d.ts +19 -0
- package/dist/states/VideoMixerState.js +297 -0
- package/dist/styles/index.css +6636 -0
- package/dist/styles/scss.d.js +1 -0
- package/dist/types/audience.d.ts +11 -0
- package/dist/types/audience.js +1 -0
- package/dist/types/coGuest.d.ts +14 -0
- package/dist/types/coGuest.js +10 -0
- package/dist/types/coHost.d.ts +6 -0
- package/dist/types/coHost.js +10 -0
- package/dist/types/device.d.ts +44 -0
- package/dist/types/device.js +45 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.js +67 -0
- package/dist/types/live.d.ts +97 -0
- package/dist/types/live.js +23 -0
- package/dist/types/message.d.ts +113 -0
- package/dist/types/message.js +31 -0
- package/dist/types/monitor.d.ts +47 -0
- package/dist/types/monitor.js +8 -0
- package/dist/types/room.d.ts +66 -0
- package/dist/types/room.js +18 -0
- package/dist/types/seat.d.ts +30 -0
- package/dist/types/seat.js +1 -0
- package/dist/types/stream.d.ts +10 -0
- package/dist/types/stream.js +16 -0
- package/dist/types/types.d.ts +1143 -0
- package/dist/types/types.js +331 -0
- package/dist/types/user.d.ts +88 -0
- package/dist/types/user.js +67 -0
- package/dist/types/videoMixer.d.ts +12 -0
- package/dist/types/videoMixer.js +1 -0
- package/dist/useId-DlA8vN1W.js +13 -0
- package/dist/utils/call.d.ts +4 -0
- package/dist/utils/call.js +18 -0
- package/dist/utils/copyText.d.ts +2 -0
- package/dist/utils/copyText.js +41 -0
- package/dist/utils/documentLink.d.ts +23 -0
- package/dist/utils/documentLink.js +25 -0
- package/dist/utils/domOperation.d.ts +45 -0
- package/dist/utils/domOperation.js +183 -0
- package/dist/utils/downFile.d.ts +2 -0
- package/dist/utils/downFile.js +27 -0
- package/dist/utils/emoji.d.ts +16 -0
- package/dist/utils/emoji.js +40 -0
- package/dist/utils/enableSampleTaskStatus.d.ts +1 -0
- package/dist/utils/enableSampleTaskStatus.js +11 -0
- package/dist/utils/env.d.ts +6 -0
- package/dist/utils/env.js +15 -0
- package/dist/utils/environment.d.ts +8 -0
- package/dist/utils/environment.js +20 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +34 -0
- package/dist/utils/json.d.ts +13 -0
- package/dist/utils/json.js +28 -0
- package/dist/utils/lodash.d.ts +17 -0
- package/dist/utils/lodash.js +105 -0
- package/dist/utils/riseInput.d.ts +1 -0
- package/dist/utils/riseInput.js +45 -0
- package/dist/utils/time.d.ts +19 -0
- package/dist/utils/time.js +3176 -0
- package/dist/utils/type-check.d.ts +12 -0
- package/dist/utils/type-check.js +50 -0
- package/dist/utils/utils.d.ts +80 -0
- package/dist/utils/utils.js +258 -0
- package/dist/utils-CnPWv_hZ.js +63 -0
- package/dist/vite-env.d.js +1 -0
- package/package.json +41 -0
- package/src/baseComp/ActionSheep.vue +98 -0
- package/src/baseComp/AudioIcon.vue +68 -0
- package/src/baseComp/Avatar.vue +42 -0
- package/src/baseComp/Dialog/DialogH5.vue +178 -0
- package/src/baseComp/Dialog/DialogPC.vue +263 -0
- package/src/baseComp/Dialog/index.ts +6 -0
- package/src/baseComp/IconButton.vue +186 -0
- package/src/baseComp/Input/InputH5.vue +251 -0
- package/src/baseComp/Input/InputPC.vue +250 -0
- package/src/baseComp/Input/InputWX.vue +252 -0
- package/src/baseComp/Input/index.ts +6 -0
- package/src/baseComp/MessageBox/index.ts +47 -0
- package/src/baseComp/MessageBox/index.vue +290 -0
- package/src/baseComp/Modal/Modal.vue +136 -0
- package/src/baseComp/Modal/index.ts +4 -0
- package/src/baseComp/ObserverView/ObserverView.vue +162 -0
- package/src/baseComp/ObserverView/index.ts +3 -0
- package/src/baseComp/Option/OptionH5.vue +66 -0
- package/src/baseComp/Option/OptionPC.vue +105 -0
- package/src/baseComp/Option/OptionWX.vue +66 -0
- package/src/baseComp/Option/index.ts +5 -0
- package/src/baseComp/Select/SelectH5.vue +119 -0
- package/src/baseComp/Select/SelectPC.vue +255 -0
- package/src/baseComp/Select/SelectWX.vue +122 -0
- package/src/baseComp/Select/index.ts +5 -0
- package/src/baseComp/SvgIcon.vue +38 -0
- package/src/baseComp/TuiSwitch.vue +55 -0
- package/src/baseComp/View/View.vue +116 -0
- package/src/baseComp/View/index.ts +3 -0
- package/src/baseComp/useZIndex.ts +18 -0
- package/src/components/AudioSetting/AudioMediaControl.vue +132 -0
- package/src/components/AudioSetting/AudioRequestDialog.vue +105 -0
- package/src/components/AudioSetting/AudioSettingTab.vue +172 -0
- package/src/components/AudioSetting/MicrophoneSelect.vue +74 -0
- package/src/components/AudioSetting/SpeakerSelect.vue +75 -0
- package/src/components/AudioSetting/index.ts +4 -0
- package/src/components/AudioSetting/index.vue +38 -0
- package/src/components/AudioSettingPanel/i18n/en-US/index.ts +7 -0
- package/src/components/AudioSettingPanel/i18n/index.ts +4 -0
- package/src/components/AudioSettingPanel/i18n/zh-CN/index.ts +7 -0
- package/src/components/AudioSettingPanel/index.ts +8 -0
- package/src/components/AudioSettingPanel/index.vue +151 -0
- package/src/components/Avatar/Avatar.vue +384 -0
- package/src/components/Avatar/AvatarBadge/AvatarBadge.vue +152 -0
- package/src/components/Avatar/AvatarBadge/index.ts +3 -0
- package/src/components/Avatar/index.ts +4 -0
- package/src/components/BarrageInput/BarrageInput.vue +147 -0
- package/src/components/BarrageInput/BarrageInputH5.vue +94 -0
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.module.scss +41 -0
- package/src/components/BarrageInput/EmojiPicker/EmojiPicker.vue +80 -0
- package/src/components/BarrageInput/EmojiPicker/index.ts +5 -0
- package/src/components/BarrageInput/TextEditor/Editor.scss +83 -0
- package/src/components/BarrageInput/TextEditor/EditorCore.ts +171 -0
- package/src/components/BarrageInput/TextEditor/TextEditor.module.scss +45 -0
- package/src/components/BarrageInput/TextEditor/TextEditor.vue +115 -0
- package/src/components/BarrageInput/TextEditor/index.ts +5 -0
- package/src/components/BarrageInput/i18n/en-US/index.ts +5 -0
- package/src/components/BarrageInput/i18n/index.ts +4 -0
- package/src/components/BarrageInput/i18n/zh-CN/index.ts +5 -0
- package/src/components/BarrageInput/index.ts +11 -0
- package/src/components/BarrageList/BarrageList.vue +373 -0
- package/src/components/BarrageList/BarrageListH5.vue +381 -0
- package/src/components/BarrageList/ClickAction/UserActionMenu.vue +164 -0
- package/src/components/BarrageList/Message/CustomMessage/CustomMessage.vue +7 -0
- package/src/components/BarrageList/Message/CustomMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/FaceMessage/FaceMessage.vue +43 -0
- package/src/components/BarrageList/Message/FaceMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/GroupTipMessage/GroupTipMessage.vue +55 -0
- package/src/components/BarrageList/Message/GroupTipMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/ImageMessage/ImageMessage.vue +181 -0
- package/src/components/BarrageList/Message/ImageMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/MergerMessage/MergerMessage.vue +6 -0
- package/src/components/BarrageList/Message/MergerMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/Message.vue +28 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +103 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageBubble/index.ts +3 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageLayout.vue +197 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +67 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +36 -0
- package/src/components/BarrageList/Message/MessageLayout/MessageMeta/index.ts +3 -0
- package/src/components/BarrageList/Message/MessageLayout/index.ts +3 -0
- package/src/components/BarrageList/Message/RecalledMessage/RecalledMessage.vue +82 -0
- package/src/components/BarrageList/Message/RecalledMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/TextMessage/TextMessage.vue +256 -0
- package/src/components/BarrageList/Message/TextMessage/index.ts +3 -0
- package/src/components/BarrageList/Message/index.ts +5 -0
- package/src/components/BarrageList/MessageForward/ForwardListItem.vue +67 -0
- package/src/components/BarrageList/MessageForward/MessageForward.vue +388 -0
- package/src/components/BarrageList/MessageForward/index.ts +3 -0
- package/src/components/BarrageList/MessageListContext.ts +16 -0
- package/src/components/BarrageList/MessageTimeDivider/MessageTimeDivider.vue +51 -0
- package/src/components/BarrageList/MessageTimeDivider/index.ts +3 -0
- package/src/components/BarrageList/i18n/en-US/index.ts +10 -0
- package/src/components/BarrageList/i18n/index.ts +4 -0
- package/src/components/BarrageList/i18n/zh-CN/index.ts +12 -0
- package/src/components/BarrageList/index.ts +11 -0
- package/src/components/CameraButton/index.ts +3 -0
- package/src/components/CameraButton/index.vue +54 -0
- package/src/components/CoGuestPanel/CoGuestPanel.vue +362 -0
- package/src/components/CoGuestPanel/i18n/en-US/index.ts +16 -0
- package/src/components/CoGuestPanel/i18n/index.ts +4 -0
- package/src/components/CoGuestPanel/i18n/zh-CN/index.ts +16 -0
- package/src/components/CoGuestPanel/index.ts +7 -0
- package/src/components/ConversationList/ConversationList.vue +45 -0
- package/src/components/ConversationList/index.ts +5 -0
- package/src/components/LiveAudienceList/LiveAudienceList.vue +334 -0
- package/src/components/LiveAudienceList/LiveAudienceListH5.vue +196 -0
- package/src/components/LiveAudienceList/UserActionMenu.vue +238 -0
- package/src/components/LiveAudienceList/i18n/en-US/index.ts +18 -0
- package/src/components/LiveAudienceList/i18n/index.ts +4 -0
- package/src/components/LiveAudienceList/i18n/zh-CN/index.ts +22 -0
- package/src/components/LiveAudienceList/index.ts +11 -0
- package/src/components/LiveList/LiveList.vue +300 -0
- package/src/components/LiveList/LiveListH5.vue +323 -0
- package/src/components/LiveList/i18n/en-US/index.ts +8 -0
- package/src/components/LiveList/i18n/index.ts +4 -0
- package/src/components/LiveList/i18n/zh-CN/index.ts +8 -0
- package/src/components/LiveList/index.ts +12 -0
- package/src/components/LiveMonitorView/LiveMonitorView.vue +172 -0
- package/src/components/LiveMonitorView/i18n/en-US/index.ts +7 -0
- package/src/components/LiveMonitorView/i18n/index.ts +4 -0
- package/src/components/LiveMonitorView/i18n/zh-CN/index.ts +7 -0
- package/src/components/LiveMonitorView/index.ts +6 -0
- package/src/components/LiveScenePanel/CameraSettingDialog.vue +249 -0
- package/src/components/LiveScenePanel/LiveSceneSelect.vue +217 -0
- package/src/components/LiveScenePanel/MaterialDialog.vue +226 -0
- package/src/components/LiveScenePanel/MaterialItem.vue +331 -0
- package/src/components/LiveScenePanel/MaterialRenameDialog.vue +38 -0
- package/src/components/LiveScenePanel/i18n/en-US/index.ts +47 -0
- package/src/components/LiveScenePanel/i18n/index.ts +4 -0
- package/src/components/LiveScenePanel/i18n/zh-CN/index.ts +47 -0
- package/src/components/LiveScenePanel/icons/AddIcon.vue +7 -0
- package/src/components/LiveScenePanel/icons/CameraIcon.vue +11 -0
- package/src/components/LiveScenePanel/icons/CameraMirror.vue +17 -0
- package/src/components/LiveScenePanel/icons/CameraUnmirror.vue +11 -0
- package/src/components/LiveScenePanel/icons/ImageIcon.vue +9 -0
- package/src/components/LiveScenePanel/icons/MoreIcon.vue +22 -0
- package/src/components/LiveScenePanel/icons/ScreenIcon.vue +37 -0
- package/src/components/LiveScenePanel/index.ts +7 -0
- package/src/components/LiveScenePanel/index.vue +300 -0
- package/src/components/LiveStreamView/DefaultStreamViewUI.vue +145 -0
- package/src/components/LiveStreamView/i18n/en-US/index.ts +4 -0
- package/src/components/LiveStreamView/i18n/index.ts +2 -0
- package/src/components/LiveStreamView/i18n/zh-CN/index.ts +4 -0
- package/src/components/LiveStreamView/index.ts +8 -0
- package/src/components/LiveStreamView/index.vue +332 -0
- package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.module.scss +54 -0
- package/src/components/MessageInput/AttachmentPicker/AttachmentPicker.vue +83 -0
- package/src/components/MessageInput/AttachmentPicker/FilePicker.vue +77 -0
- package/src/components/MessageInput/AttachmentPicker/ImagePicker.vue +77 -0
- package/src/components/MessageInput/AttachmentPicker/VideoPicker.vue +77 -0
- package/src/components/MessageInput/AttachmentPicker/index.ts +11 -0
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.module.scss +27 -0
- package/src/components/MessageInput/EmojiPicker/EmojiPicker.vue +77 -0
- package/src/components/MessageInput/EmojiPicker/index.ts +5 -0
- package/src/components/MessageInput/MessageInput.module.scss +43 -0
- package/src/components/MessageInput/MessageInput.vue +114 -0
- package/src/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.module.scss +71 -0
- package/src/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.vue +78 -0
- package/src/components/MessageInput/QuotedMessagePreview/index.ts +5 -0
- package/src/components/MessageInput/SendButton/SendButton.vue +28 -0
- package/src/components/MessageInput/SendButton/index.ts +5 -0
- package/src/components/MessageInput/TextEditor/Editor.scss +57 -0
- package/src/components/MessageInput/TextEditor/EditorCore.ts +162 -0
- package/src/components/MessageInput/TextEditor/TextEditor.module.scss +25 -0
- package/src/components/MessageInput/TextEditor/TextEditor.vue +90 -0
- package/src/components/MessageInput/TextEditor/index.ts +5 -0
- package/src/components/MessageInput/index.ts +14 -0
- package/src/components/MessageInput/types.d.ts +42 -0
- package/src/components/MessageList/Message/AudioMessage/AudioMessage.vue +92 -0
- package/src/components/MessageList/Message/AudioMessage/PlayButton.vue +83 -0
- package/src/components/MessageList/Message/AudioMessage/WaveForm.vue +114 -0
- package/src/components/MessageList/Message/AudioMessage/index.ts +3 -0
- package/src/components/MessageList/Message/CustomMessage/CustomMessage.vue +7 -0
- package/src/components/MessageList/Message/CustomMessage/index.ts +3 -0
- package/src/components/MessageList/Message/FaceMessage/FaceMessage.vue +43 -0
- package/src/components/MessageList/Message/FaceMessage/index.ts +3 -0
- package/src/components/MessageList/Message/FileMessage/FileMessage.vue +145 -0
- package/src/components/MessageList/Message/FileMessage/index.ts +3 -0
- package/src/components/MessageList/Message/GroupTipMessage/GroupTipMessage.vue +55 -0
- package/src/components/MessageList/Message/GroupTipMessage/index.ts +3 -0
- package/src/components/MessageList/Message/ImageMessage/ImageMessage.vue +360 -0
- package/src/components/MessageList/Message/ImageMessage/index.ts +3 -0
- package/src/components/MessageList/Message/LocationMessage/LocationMessage.vue +6 -0
- package/src/components/MessageList/Message/LocationMessage/index.ts +3 -0
- package/src/components/MessageList/Message/MergerMessage/MergerMessage.vue +6 -0
- package/src/components/MessageList/Message/MergerMessage/index.ts +3 -0
- package/src/components/MessageList/Message/Message.vue +41 -0
- package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.module.scss +44 -0
- package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.vue +117 -0
- package/src/components/MessageList/Message/MessageLayout/MessageActionDropdown/index.ts +3 -0
- package/src/components/MessageList/Message/MessageLayout/MessageBubble/MessageBubble.vue +118 -0
- package/src/components/MessageList/Message/MessageLayout/MessageBubble/index.ts +3 -0
- package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +237 -0
- package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +143 -0
- package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageStatusIcon.vue +42 -0
- package/src/components/MessageList/Message/MessageLayout/MessageMeta/index.ts +3 -0
- package/src/components/MessageList/Message/MessageLayout/index.ts +3 -0
- package/src/components/MessageList/Message/MessageLayout/useMessageLayoutClasses.ts +50 -0
- package/src/components/MessageList/Message/RecalledMessage/RecalledMessage.vue +83 -0
- package/src/components/MessageList/Message/RecalledMessage/index.ts +3 -0
- package/src/components/MessageList/Message/TextMessage/TextMessage.vue +209 -0
- package/src/components/MessageList/Message/TextMessage/index.ts +3 -0
- package/src/components/MessageList/Message/VideoMessage/VideoMessage.vue +191 -0
- package/src/components/MessageList/Message/VideoMessage/index.ts +3 -0
- package/src/components/MessageList/Message/index.ts +5 -0
- package/src/components/MessageList/MessageForward/ForwardListItem.vue +74 -0
- package/src/components/MessageList/MessageForward/MessageForward.vue +209 -0
- package/src/components/MessageList/MessageForward/index.ts +3 -0
- package/src/components/MessageList/MessageList.vue +382 -0
- package/src/components/MessageList/MessageListContext.ts +16 -0
- package/src/components/MessageList/MessageTimeDivider/MessageTimeDivider.vue +51 -0
- package/src/components/MessageList/MessageTimeDivider/index.ts +3 -0
- package/src/components/MessageList/ReadReceiptInfo/ReadReceiptInfo.vue +638 -0
- package/src/components/MessageList/ReadReceiptInfo/index.ts +3 -0
- package/src/components/MessageList/index.ts +9 -0
- package/src/components/MicButton/AudioIcon.vue +68 -0
- package/src/components/MicButton/index.ts +3 -0
- package/src/components/MicButton/index.vue +63 -0
- package/src/components/StreamMixer/LocalMixer/MixerControl.vue +170 -0
- package/src/components/StreamMixer/LocalMixer/index.vue +198 -0
- package/src/components/StreamMixer/i18n/en-US/index.ts +12 -0
- package/src/components/StreamMixer/i18n/index.ts +2 -0
- package/src/components/StreamMixer/i18n/zh-CN/index.ts +12 -0
- package/src/components/StreamMixer/icons/CameraMirror.vue +17 -0
- package/src/components/StreamMixer/icons/Delete.vue +11 -0
- package/src/components/StreamMixer/icons/Down.vue +25 -0
- package/src/components/StreamMixer/icons/Rotation.vue +16 -0
- package/src/components/StreamMixer/icons/Up.vue +25 -0
- package/src/components/StreamMixer/index.ts +7 -0
- package/src/components/StreamMixer/index.vue +14 -0
- package/src/components/StreamView/Layout/CustomLayout.vue +329 -0
- package/src/components/StreamView/Layout/FloatLayout.vue +344 -0
- package/src/components/StreamView/Layout/GridLayout.vue +347 -0
- package/src/components/StreamView/Layout/MeetingLayout.vue +436 -0
- package/src/components/StreamView/Layout/MixLayout.vue +144 -0
- package/src/components/StreamView/common/ArrowStroke.vue +264 -0
- package/src/components/StreamView/common/LocalScreenView/index.vue +127 -0
- package/src/components/StreamView/common/StreamCover/index.vue +152 -0
- package/src/components/StreamView/common/StreamList/index.vue +322 -0
- package/src/components/StreamView/common/StreamPlay/index.vue +164 -0
- package/src/components/StreamView/common/StreamRegion/StreamRegionPC.vue +134 -0
- package/src/components/StreamView/common/StreamRegion/index.ts +3 -0
- package/src/components/StreamView/index.ts +5 -0
- package/src/components/StreamView/index.vue +55 -0
- package/src/components/StreamView/manager/mediaManager.ts +434 -0
- package/src/components/UserList/AllUserActions/index.ts +8 -0
- package/src/components/UserList/AllUserActions/indexH5.vue +165 -0
- package/src/components/UserList/AllUserActions/indexPC.vue +147 -0
- package/src/components/UserList/AllUserActions/useIndexHooks.ts +54 -0
- package/src/components/UserList/UserItem/UserAction/index.ts +8 -0
- package/src/components/UserList/UserItem/UserAction/indexH5.vue +125 -0
- package/src/components/UserList/UserItem/UserAction/indexPC.vue +245 -0
- package/src/components/UserList/UserItem/UserInfo/index.vue +228 -0
- package/src/components/UserList/UserItem/UserInvite/index.vue +51 -0
- package/src/components/UserList/UserItem/index.ts +8 -0
- package/src/components/UserList/UserItem/indexH5.vue +67 -0
- package/src/components/UserList/UserItem/indexPC.vue +60 -0
- package/src/components/UserList/UserListContent/index.vue +56 -0
- package/src/components/UserList/UserListSearch/index.vue +42 -0
- package/src/components/UserList/index.vue +142 -0
- package/src/components/UserPicker/UserPicker.vue +243 -0
- package/src/components/UserPicker/components/ListMode/ListMode.vue +208 -0
- package/src/components/UserPicker/components/ListMode/index.ts +3 -0
- package/src/components/UserPicker/components/SearchBar/SearchBar.vue +97 -0
- package/src/components/UserPicker/components/SearchBar/index.ts +3 -0
- package/src/components/UserPicker/components/SelectedPanel/SelectedPanel.vue +181 -0
- package/src/components/UserPicker/components/SelectedPanel/index.ts +3 -0
- package/src/components/UserPicker/components/TreeMode/TreeMode.vue +61 -0
- package/src/components/UserPicker/components/TreeMode/TreeNode.vue +272 -0
- package/src/components/UserPicker/components/TreeMode/index.ts +3 -0
- package/src/components/UserPicker/hooks/useSearchFilter.ts +140 -0
- package/src/components/UserPicker/hooks/useSelection.ts +524 -0
- package/src/components/UserPicker/hooks/useTreeState.ts +75 -0
- package/src/components/UserPicker/index.ts +21 -0
- package/src/components/UserPicker/type.ts +80 -0
- package/src/components/VideoSetting/CameraSelect.vue +76 -0
- package/src/components/VideoSetting/VideoMediaControl.vue +125 -0
- package/src/components/VideoSetting/VideoPreview.vue +86 -0
- package/src/components/VideoSetting/VideoProfile.vue +57 -0
- package/src/components/VideoSetting/VideoRequestDialog.vue +111 -0
- package/src/components/VideoSetting/VideoSettingTab.vue +94 -0
- package/src/components/VideoSetting/index.ts +7 -0
- package/src/components/VideoSetting/index.vue +49 -0
- package/src/components/VideoSettingPanel/CameraSelect.vue +75 -0
- package/src/components/VideoSettingPanel/VideoPreview.vue +86 -0
- package/src/components/VideoSettingPanel/VideoProfile.vue +54 -0
- package/src/components/VideoSettingPanel/i18n/en-US/index.ts +7 -0
- package/src/components/VideoSettingPanel/i18n/index.ts +4 -0
- package/src/components/VideoSettingPanel/i18n/zh-CN/index.ts +7 -0
- package/src/components/VideoSettingPanel/index.ts +8 -0
- package/src/components/VideoSettingPanel/index.vue +107 -0
- package/src/constants/emoji.ts +71 -0
- package/src/directives/vClickOutside.ts +30 -0
- package/src/directives/vDblTouch.ts +67 -0
- package/src/directives/vTap.ts +86 -0
- package/src/directives/vTouchScale.ts +230 -0
- package/src/handler/index.ts +2 -0
- package/src/handler/translator.ts +159 -0
- package/src/handler/voiceConverter.ts +42 -0
- package/src/hooks/useAudioControl.ts +231 -0
- package/src/hooks/useMessageActions.ts +161 -0
- package/src/hooks/useReadReceipt/useReadReceipt.ts +223 -0
- package/src/hooks/useRoomActions/index.ts +18 -0
- package/src/hooks/useRoomActions/useRoomAudioAction.ts +68 -0
- package/src/hooks/useRoomActions/useRoomScreenAction.ts +68 -0
- package/src/hooks/useRoomActions/useRoomVideoAction.ts +67 -0
- package/src/hooks/useRoomEngine.ts +30 -0
- package/src/hooks/useScroll.ts +202 -0
- package/src/hooks/useUserActions/index.ts +166 -0
- package/src/hooks/useUserActions/useAdminAction.ts +53 -0
- package/src/hooks/useUserActions/useAudioAction.ts +64 -0
- package/src/hooks/useUserActions/useChangeNameCardAction/changeNameCardDialog.vue +76 -0
- package/src/hooks/useUserActions/useChangeNameCardAction/changeNameCardInput.vue +92 -0
- package/src/hooks/useUserActions/useChangeNameCardAction/index.ts +68 -0
- package/src/hooks/useUserActions/useChatAction.ts +39 -0
- package/src/hooks/useUserActions/useKickUserAction.ts +37 -0
- package/src/hooks/useUserActions/useMemberInviteAction.ts +55 -0
- package/src/hooks/useUserActions/useSeatAction.ts +191 -0
- package/src/hooks/useUserActions/useTransferOwnerAction.ts +79 -0
- package/src/hooks/useUserActions/useVideoAction.ts +53 -0
- package/src/hooks/useZIndex.ts +18 -0
- package/src/i18n/index.ts +5 -0
- package/src/index.ts +74 -0
- package/src/locales/en-US.ts +548 -0
- package/src/locales/index.ts +78 -0
- package/src/locales/zh-CN.ts +526 -0
- package/src/styles/common/normalize.scss +405 -0
- package/src/styles/index.scss +1 -0
- package/src/styles/mixins/_responsive.scss +212 -0
- package/src/styles/mixins/_scrollbar.scss +66 -0
- package/src/styles/mixins/_text.scss +25 -0
- package/src/styles/mixins/index.scss +3 -0
- package/src/styles/mixins/responsive-usage.md +282 -0
- package/src/styles/scss.d.ts +4 -0
- package/src/types/audience.ts +11 -0
- package/src/types/coGuest.ts +15 -0
- package/src/types/coHost.ts +6 -0
- package/src/types/device.ts +51 -0
- package/src/types/index.ts +12 -0
- package/src/types/live.ts +107 -0
- package/src/types/message.ts +141 -0
- package/src/types/monitor.ts +52 -0
- package/src/types/room.ts +73 -0
- package/src/types/seat.ts +33 -0
- package/src/types/stream.ts +12 -0
- package/src/types/types.ts +1888 -0
- package/src/types/user.ts +106 -0
- package/src/types/videoMixer.ts +12 -0
- package/src/utils/__tests__/time.test.js +82 -0
- package/src/utils/call.ts +21 -0
- package/src/utils/copyText.ts +52 -0
- package/src/utils/documentLink.ts +23 -0
- package/src/utils/domOperation.ts +281 -0
- package/src/utils/downFile.ts +32 -0
- package/src/utils/emoji.ts +50 -0
- package/src/utils/enableSampleTaskStatus.ts +8 -0
- package/src/utils/env.ts +17 -0
- package/src/utils/environment.ts +24 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/json.ts +50 -0
- package/src/utils/lodash.ts +169 -0
- package/src/utils/riseInput.ts +53 -0
- package/src/utils/time.ts +87 -0
- package/src/utils/type-check.ts +44 -0
- package/src/utils/utils.ts +321 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +37 -0
- package/tsconfig.node.json +11 -0
|
@@ -0,0 +1,2432 @@
|
|
|
1
|
+
function bind(fn, thisArg) {
|
|
2
|
+
return function wrap() {
|
|
3
|
+
return fn.apply(thisArg, arguments);
|
|
4
|
+
};
|
|
5
|
+
}
|
|
6
|
+
const { toString } = Object.prototype;
|
|
7
|
+
const { getPrototypeOf } = Object;
|
|
8
|
+
const { iterator, toStringTag } = Symbol;
|
|
9
|
+
const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
|
|
10
|
+
const str = toString.call(thing);
|
|
11
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null));
|
|
13
|
+
const kindOfTest = (type) => {
|
|
14
|
+
type = type.toLowerCase();
|
|
15
|
+
return (thing) => kindOf(thing) === type;
|
|
16
|
+
};
|
|
17
|
+
const typeOfTest = (type) => (thing) => typeof thing === type;
|
|
18
|
+
const { isArray } = Array;
|
|
19
|
+
const isUndefined = typeOfTest("undefined");
|
|
20
|
+
function isBuffer(val) {
|
|
21
|
+
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
22
|
+
}
|
|
23
|
+
const isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
24
|
+
function isArrayBufferView(val) {
|
|
25
|
+
let result;
|
|
26
|
+
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
27
|
+
result = ArrayBuffer.isView(val);
|
|
28
|
+
} else {
|
|
29
|
+
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
const isString = typeOfTest("string");
|
|
34
|
+
const isFunction = typeOfTest("function");
|
|
35
|
+
const isNumber = typeOfTest("number");
|
|
36
|
+
const isObject = (thing) => thing !== null && typeof thing === "object";
|
|
37
|
+
const isBoolean = (thing) => thing === true || thing === false;
|
|
38
|
+
const isPlainObject = (val) => {
|
|
39
|
+
if (kindOf(val) !== "object") {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
const prototype2 = getPrototypeOf(val);
|
|
43
|
+
return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
|
|
44
|
+
};
|
|
45
|
+
const isEmptyObject = (val) => {
|
|
46
|
+
if (!isObject(val) || isBuffer(val)) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
|
51
|
+
} catch (e) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const isDate = kindOfTest("Date");
|
|
56
|
+
const isFile = kindOfTest("File");
|
|
57
|
+
const isBlob = kindOfTest("Blob");
|
|
58
|
+
const isFileList = kindOfTest("FileList");
|
|
59
|
+
const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
60
|
+
const isFormData = (thing) => {
|
|
61
|
+
let kind;
|
|
62
|
+
return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
|
|
63
|
+
kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
|
64
|
+
};
|
|
65
|
+
const isURLSearchParams = kindOfTest("URLSearchParams");
|
|
66
|
+
const [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
|
|
67
|
+
const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
68
|
+
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
69
|
+
if (obj === null || typeof obj === "undefined") {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
let i;
|
|
73
|
+
let l;
|
|
74
|
+
if (typeof obj !== "object") {
|
|
75
|
+
obj = [obj];
|
|
76
|
+
}
|
|
77
|
+
if (isArray(obj)) {
|
|
78
|
+
for (i = 0, l = obj.length; i < l; i++) {
|
|
79
|
+
fn.call(null, obj[i], i, obj);
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
if (isBuffer(obj)) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
86
|
+
const len = keys.length;
|
|
87
|
+
let key;
|
|
88
|
+
for (i = 0; i < len; i++) {
|
|
89
|
+
key = keys[i];
|
|
90
|
+
fn.call(null, obj[key], key, obj);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function findKey(obj, key) {
|
|
95
|
+
if (isBuffer(obj)) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
key = key.toLowerCase();
|
|
99
|
+
const keys = Object.keys(obj);
|
|
100
|
+
let i = keys.length;
|
|
101
|
+
let _key;
|
|
102
|
+
while (i-- > 0) {
|
|
103
|
+
_key = keys[i];
|
|
104
|
+
if (key === _key.toLowerCase()) {
|
|
105
|
+
return _key;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
const _global = (() => {
|
|
111
|
+
if (typeof globalThis !== "undefined") return globalThis;
|
|
112
|
+
return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
|
|
113
|
+
})();
|
|
114
|
+
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
115
|
+
function merge() {
|
|
116
|
+
const { caseless } = isContextDefined(this) && this || {};
|
|
117
|
+
const result = {};
|
|
118
|
+
const assignValue = (val, key) => {
|
|
119
|
+
const targetKey = caseless && findKey(result, key) || key;
|
|
120
|
+
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
121
|
+
result[targetKey] = merge(result[targetKey], val);
|
|
122
|
+
} else if (isPlainObject(val)) {
|
|
123
|
+
result[targetKey] = merge({}, val);
|
|
124
|
+
} else if (isArray(val)) {
|
|
125
|
+
result[targetKey] = val.slice();
|
|
126
|
+
} else {
|
|
127
|
+
result[targetKey] = val;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
for (let i = 0, l = arguments.length; i < l; i++) {
|
|
131
|
+
arguments[i] && forEach(arguments[i], assignValue);
|
|
132
|
+
}
|
|
133
|
+
return result;
|
|
134
|
+
}
|
|
135
|
+
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
136
|
+
forEach(b, (val, key) => {
|
|
137
|
+
if (thisArg && isFunction(val)) {
|
|
138
|
+
a[key] = bind(val, thisArg);
|
|
139
|
+
} else {
|
|
140
|
+
a[key] = val;
|
|
141
|
+
}
|
|
142
|
+
}, { allOwnKeys });
|
|
143
|
+
return a;
|
|
144
|
+
};
|
|
145
|
+
const stripBOM = (content) => {
|
|
146
|
+
if (content.charCodeAt(0) === 65279) {
|
|
147
|
+
content = content.slice(1);
|
|
148
|
+
}
|
|
149
|
+
return content;
|
|
150
|
+
};
|
|
151
|
+
const inherits = (constructor, superConstructor, props, descriptors2) => {
|
|
152
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
|
|
153
|
+
constructor.prototype.constructor = constructor;
|
|
154
|
+
Object.defineProperty(constructor, "super", {
|
|
155
|
+
value: superConstructor.prototype
|
|
156
|
+
});
|
|
157
|
+
props && Object.assign(constructor.prototype, props);
|
|
158
|
+
};
|
|
159
|
+
const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
|
|
160
|
+
let props;
|
|
161
|
+
let i;
|
|
162
|
+
let prop;
|
|
163
|
+
const merged = {};
|
|
164
|
+
destObj = destObj || {};
|
|
165
|
+
if (sourceObj == null) return destObj;
|
|
166
|
+
do {
|
|
167
|
+
props = Object.getOwnPropertyNames(sourceObj);
|
|
168
|
+
i = props.length;
|
|
169
|
+
while (i-- > 0) {
|
|
170
|
+
prop = props[i];
|
|
171
|
+
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
172
|
+
destObj[prop] = sourceObj[prop];
|
|
173
|
+
merged[prop] = true;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
sourceObj = filter2 !== false && getPrototypeOf(sourceObj);
|
|
177
|
+
} while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
178
|
+
return destObj;
|
|
179
|
+
};
|
|
180
|
+
const endsWith = (str, searchString, position) => {
|
|
181
|
+
str = String(str);
|
|
182
|
+
if (position === void 0 || position > str.length) {
|
|
183
|
+
position = str.length;
|
|
184
|
+
}
|
|
185
|
+
position -= searchString.length;
|
|
186
|
+
const lastIndex = str.indexOf(searchString, position);
|
|
187
|
+
return lastIndex !== -1 && lastIndex === position;
|
|
188
|
+
};
|
|
189
|
+
const toArray = (thing) => {
|
|
190
|
+
if (!thing) return null;
|
|
191
|
+
if (isArray(thing)) return thing;
|
|
192
|
+
let i = thing.length;
|
|
193
|
+
if (!isNumber(i)) return null;
|
|
194
|
+
const arr = new Array(i);
|
|
195
|
+
while (i-- > 0) {
|
|
196
|
+
arr[i] = thing[i];
|
|
197
|
+
}
|
|
198
|
+
return arr;
|
|
199
|
+
};
|
|
200
|
+
const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
|
|
201
|
+
return (thing) => {
|
|
202
|
+
return TypedArray && thing instanceof TypedArray;
|
|
203
|
+
};
|
|
204
|
+
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
|
|
205
|
+
const forEachEntry = (obj, fn) => {
|
|
206
|
+
const generator = obj && obj[iterator];
|
|
207
|
+
const _iterator = generator.call(obj);
|
|
208
|
+
let result;
|
|
209
|
+
while ((result = _iterator.next()) && !result.done) {
|
|
210
|
+
const pair = result.value;
|
|
211
|
+
fn.call(obj, pair[0], pair[1]);
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
const matchAll = (regExp, str) => {
|
|
215
|
+
let matches;
|
|
216
|
+
const arr = [];
|
|
217
|
+
while ((matches = regExp.exec(str)) !== null) {
|
|
218
|
+
arr.push(matches);
|
|
219
|
+
}
|
|
220
|
+
return arr;
|
|
221
|
+
};
|
|
222
|
+
const isHTMLForm = kindOfTest("HTMLFormElement");
|
|
223
|
+
const toCamelCase = (str) => {
|
|
224
|
+
return str.toLowerCase().replace(
|
|
225
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
226
|
+
function replacer(m, p1, p2) {
|
|
227
|
+
return p1.toUpperCase() + p2;
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
};
|
|
231
|
+
const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
232
|
+
const isRegExp = kindOfTest("RegExp");
|
|
233
|
+
const reduceDescriptors = (obj, reducer) => {
|
|
234
|
+
const descriptors2 = Object.getOwnPropertyDescriptors(obj);
|
|
235
|
+
const reducedDescriptors = {};
|
|
236
|
+
forEach(descriptors2, (descriptor, name) => {
|
|
237
|
+
let ret;
|
|
238
|
+
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
|
239
|
+
reducedDescriptors[name] = ret || descriptor;
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
Object.defineProperties(obj, reducedDescriptors);
|
|
243
|
+
};
|
|
244
|
+
const freezeMethods = (obj) => {
|
|
245
|
+
reduceDescriptors(obj, (descriptor, name) => {
|
|
246
|
+
if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
const value = obj[name];
|
|
250
|
+
if (!isFunction(value)) return;
|
|
251
|
+
descriptor.enumerable = false;
|
|
252
|
+
if ("writable" in descriptor) {
|
|
253
|
+
descriptor.writable = false;
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
if (!descriptor.set) {
|
|
257
|
+
descriptor.set = () => {
|
|
258
|
+
throw Error("Can not rewrite read-only method '" + name + "'");
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
};
|
|
263
|
+
const toObjectSet = (arrayOrString, delimiter) => {
|
|
264
|
+
const obj = {};
|
|
265
|
+
const define = (arr) => {
|
|
266
|
+
arr.forEach((value) => {
|
|
267
|
+
obj[value] = true;
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
271
|
+
return obj;
|
|
272
|
+
};
|
|
273
|
+
const noop = () => {
|
|
274
|
+
};
|
|
275
|
+
const toFiniteNumber = (value, defaultValue) => {
|
|
276
|
+
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
277
|
+
};
|
|
278
|
+
function isSpecCompliantForm(thing) {
|
|
279
|
+
return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
|
|
280
|
+
}
|
|
281
|
+
const toJSONObject = (obj) => {
|
|
282
|
+
const stack = new Array(10);
|
|
283
|
+
const visit = (source, i) => {
|
|
284
|
+
if (isObject(source)) {
|
|
285
|
+
if (stack.indexOf(source) >= 0) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
if (isBuffer(source)) {
|
|
289
|
+
return source;
|
|
290
|
+
}
|
|
291
|
+
if (!("toJSON" in source)) {
|
|
292
|
+
stack[i] = source;
|
|
293
|
+
const target = isArray(source) ? [] : {};
|
|
294
|
+
forEach(source, (value, key) => {
|
|
295
|
+
const reducedValue = visit(value, i + 1);
|
|
296
|
+
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
297
|
+
});
|
|
298
|
+
stack[i] = void 0;
|
|
299
|
+
return target;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return source;
|
|
303
|
+
};
|
|
304
|
+
return visit(obj, 0);
|
|
305
|
+
};
|
|
306
|
+
const isAsyncFn = kindOfTest("AsyncFunction");
|
|
307
|
+
const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
308
|
+
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
309
|
+
if (setImmediateSupported) {
|
|
310
|
+
return setImmediate;
|
|
311
|
+
}
|
|
312
|
+
return postMessageSupported ? ((token, callbacks) => {
|
|
313
|
+
_global.addEventListener("message", ({ source, data }) => {
|
|
314
|
+
if (source === _global && data === token) {
|
|
315
|
+
callbacks.length && callbacks.shift()();
|
|
316
|
+
}
|
|
317
|
+
}, false);
|
|
318
|
+
return (cb) => {
|
|
319
|
+
callbacks.push(cb);
|
|
320
|
+
_global.postMessage(token, "*");
|
|
321
|
+
};
|
|
322
|
+
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
323
|
+
})(
|
|
324
|
+
typeof setImmediate === "function",
|
|
325
|
+
isFunction(_global.postMessage)
|
|
326
|
+
);
|
|
327
|
+
const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
328
|
+
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
329
|
+
const utils$1 = {
|
|
330
|
+
isArray,
|
|
331
|
+
isArrayBuffer,
|
|
332
|
+
isBuffer,
|
|
333
|
+
isFormData,
|
|
334
|
+
isArrayBufferView,
|
|
335
|
+
isString,
|
|
336
|
+
isNumber,
|
|
337
|
+
isBoolean,
|
|
338
|
+
isObject,
|
|
339
|
+
isPlainObject,
|
|
340
|
+
isEmptyObject,
|
|
341
|
+
isReadableStream,
|
|
342
|
+
isRequest,
|
|
343
|
+
isResponse,
|
|
344
|
+
isHeaders,
|
|
345
|
+
isUndefined,
|
|
346
|
+
isDate,
|
|
347
|
+
isFile,
|
|
348
|
+
isBlob,
|
|
349
|
+
isRegExp,
|
|
350
|
+
isFunction,
|
|
351
|
+
isStream,
|
|
352
|
+
isURLSearchParams,
|
|
353
|
+
isTypedArray,
|
|
354
|
+
isFileList,
|
|
355
|
+
forEach,
|
|
356
|
+
merge,
|
|
357
|
+
extend,
|
|
358
|
+
trim,
|
|
359
|
+
stripBOM,
|
|
360
|
+
inherits,
|
|
361
|
+
toFlatObject,
|
|
362
|
+
kindOf,
|
|
363
|
+
kindOfTest,
|
|
364
|
+
endsWith,
|
|
365
|
+
toArray,
|
|
366
|
+
forEachEntry,
|
|
367
|
+
matchAll,
|
|
368
|
+
isHTMLForm,
|
|
369
|
+
hasOwnProperty,
|
|
370
|
+
hasOwnProp: hasOwnProperty,
|
|
371
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
372
|
+
reduceDescriptors,
|
|
373
|
+
freezeMethods,
|
|
374
|
+
toObjectSet,
|
|
375
|
+
toCamelCase,
|
|
376
|
+
noop,
|
|
377
|
+
toFiniteNumber,
|
|
378
|
+
findKey,
|
|
379
|
+
global: _global,
|
|
380
|
+
isContextDefined,
|
|
381
|
+
isSpecCompliantForm,
|
|
382
|
+
toJSONObject,
|
|
383
|
+
isAsyncFn,
|
|
384
|
+
isThenable,
|
|
385
|
+
setImmediate: _setImmediate,
|
|
386
|
+
asap,
|
|
387
|
+
isIterable
|
|
388
|
+
};
|
|
389
|
+
function AxiosError$1(message, code, config, request, response) {
|
|
390
|
+
Error.call(this);
|
|
391
|
+
if (Error.captureStackTrace) {
|
|
392
|
+
Error.captureStackTrace(this, this.constructor);
|
|
393
|
+
} else {
|
|
394
|
+
this.stack = new Error().stack;
|
|
395
|
+
}
|
|
396
|
+
this.message = message;
|
|
397
|
+
this.name = "AxiosError";
|
|
398
|
+
code && (this.code = code);
|
|
399
|
+
config && (this.config = config);
|
|
400
|
+
request && (this.request = request);
|
|
401
|
+
if (response) {
|
|
402
|
+
this.response = response;
|
|
403
|
+
this.status = response.status ? response.status : null;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
utils$1.inherits(AxiosError$1, Error, {
|
|
407
|
+
toJSON: function toJSON() {
|
|
408
|
+
return {
|
|
409
|
+
// Standard
|
|
410
|
+
message: this.message,
|
|
411
|
+
name: this.name,
|
|
412
|
+
// Microsoft
|
|
413
|
+
description: this.description,
|
|
414
|
+
number: this.number,
|
|
415
|
+
// Mozilla
|
|
416
|
+
fileName: this.fileName,
|
|
417
|
+
lineNumber: this.lineNumber,
|
|
418
|
+
columnNumber: this.columnNumber,
|
|
419
|
+
stack: this.stack,
|
|
420
|
+
// Axios
|
|
421
|
+
config: utils$1.toJSONObject(this.config),
|
|
422
|
+
code: this.code,
|
|
423
|
+
status: this.status
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
const prototype$1 = AxiosError$1.prototype;
|
|
428
|
+
const descriptors = {};
|
|
429
|
+
[
|
|
430
|
+
"ERR_BAD_OPTION_VALUE",
|
|
431
|
+
"ERR_BAD_OPTION",
|
|
432
|
+
"ECONNABORTED",
|
|
433
|
+
"ETIMEDOUT",
|
|
434
|
+
"ERR_NETWORK",
|
|
435
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
436
|
+
"ERR_DEPRECATED",
|
|
437
|
+
"ERR_BAD_RESPONSE",
|
|
438
|
+
"ERR_BAD_REQUEST",
|
|
439
|
+
"ERR_CANCELED",
|
|
440
|
+
"ERR_NOT_SUPPORT",
|
|
441
|
+
"ERR_INVALID_URL"
|
|
442
|
+
// eslint-disable-next-line func-names
|
|
443
|
+
].forEach((code) => {
|
|
444
|
+
descriptors[code] = { value: code };
|
|
445
|
+
});
|
|
446
|
+
Object.defineProperties(AxiosError$1, descriptors);
|
|
447
|
+
Object.defineProperty(prototype$1, "isAxiosError", { value: true });
|
|
448
|
+
AxiosError$1.from = (error, code, config, request, response, customProps) => {
|
|
449
|
+
const axiosError = Object.create(prototype$1);
|
|
450
|
+
utils$1.toFlatObject(error, axiosError, function filter2(obj) {
|
|
451
|
+
return obj !== Error.prototype;
|
|
452
|
+
}, (prop) => {
|
|
453
|
+
return prop !== "isAxiosError";
|
|
454
|
+
});
|
|
455
|
+
AxiosError$1.call(axiosError, error.message, code, config, request, response);
|
|
456
|
+
axiosError.cause = error;
|
|
457
|
+
axiosError.name = error.name;
|
|
458
|
+
customProps && Object.assign(axiosError, customProps);
|
|
459
|
+
return axiosError;
|
|
460
|
+
};
|
|
461
|
+
const httpAdapter = null;
|
|
462
|
+
function isVisitable(thing) {
|
|
463
|
+
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
464
|
+
}
|
|
465
|
+
function removeBrackets(key) {
|
|
466
|
+
return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
467
|
+
}
|
|
468
|
+
function renderKey(path, key, dots) {
|
|
469
|
+
if (!path) return key;
|
|
470
|
+
return path.concat(key).map(function each(token, i) {
|
|
471
|
+
token = removeBrackets(token);
|
|
472
|
+
return !dots && i ? "[" + token + "]" : token;
|
|
473
|
+
}).join(dots ? "." : "");
|
|
474
|
+
}
|
|
475
|
+
function isFlatArray(arr) {
|
|
476
|
+
return utils$1.isArray(arr) && !arr.some(isVisitable);
|
|
477
|
+
}
|
|
478
|
+
const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
|
|
479
|
+
return /^is[A-Z]/.test(prop);
|
|
480
|
+
});
|
|
481
|
+
function toFormData$1(obj, formData, options) {
|
|
482
|
+
if (!utils$1.isObject(obj)) {
|
|
483
|
+
throw new TypeError("target must be an object");
|
|
484
|
+
}
|
|
485
|
+
formData = formData || new FormData();
|
|
486
|
+
options = utils$1.toFlatObject(options, {
|
|
487
|
+
metaTokens: true,
|
|
488
|
+
dots: false,
|
|
489
|
+
indexes: false
|
|
490
|
+
}, false, function defined(option, source) {
|
|
491
|
+
return !utils$1.isUndefined(source[option]);
|
|
492
|
+
});
|
|
493
|
+
const metaTokens = options.metaTokens;
|
|
494
|
+
const visitor = options.visitor || defaultVisitor;
|
|
495
|
+
const dots = options.dots;
|
|
496
|
+
const indexes = options.indexes;
|
|
497
|
+
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
498
|
+
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
499
|
+
if (!utils$1.isFunction(visitor)) {
|
|
500
|
+
throw new TypeError("visitor must be a function");
|
|
501
|
+
}
|
|
502
|
+
function convertValue(value) {
|
|
503
|
+
if (value === null) return "";
|
|
504
|
+
if (utils$1.isDate(value)) {
|
|
505
|
+
return value.toISOString();
|
|
506
|
+
}
|
|
507
|
+
if (utils$1.isBoolean(value)) {
|
|
508
|
+
return value.toString();
|
|
509
|
+
}
|
|
510
|
+
if (!useBlob && utils$1.isBlob(value)) {
|
|
511
|
+
throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
|
|
512
|
+
}
|
|
513
|
+
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
514
|
+
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
515
|
+
}
|
|
516
|
+
return value;
|
|
517
|
+
}
|
|
518
|
+
function defaultVisitor(value, key, path) {
|
|
519
|
+
let arr = value;
|
|
520
|
+
if (value && !path && typeof value === "object") {
|
|
521
|
+
if (utils$1.endsWith(key, "{}")) {
|
|
522
|
+
key = metaTokens ? key : key.slice(0, -2);
|
|
523
|
+
value = JSON.stringify(value);
|
|
524
|
+
} else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
|
|
525
|
+
key = removeBrackets(key);
|
|
526
|
+
arr.forEach(function each(el, index) {
|
|
527
|
+
!(utils$1.isUndefined(el) || el === null) && formData.append(
|
|
528
|
+
// eslint-disable-next-line no-nested-ternary
|
|
529
|
+
indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
|
|
530
|
+
convertValue(el)
|
|
531
|
+
);
|
|
532
|
+
});
|
|
533
|
+
return false;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
if (isVisitable(value)) {
|
|
537
|
+
return true;
|
|
538
|
+
}
|
|
539
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
540
|
+
return false;
|
|
541
|
+
}
|
|
542
|
+
const stack = [];
|
|
543
|
+
const exposedHelpers = Object.assign(predicates, {
|
|
544
|
+
defaultVisitor,
|
|
545
|
+
convertValue,
|
|
546
|
+
isVisitable
|
|
547
|
+
});
|
|
548
|
+
function build(value, path) {
|
|
549
|
+
if (utils$1.isUndefined(value)) return;
|
|
550
|
+
if (stack.indexOf(value) !== -1) {
|
|
551
|
+
throw Error("Circular reference detected in " + path.join("."));
|
|
552
|
+
}
|
|
553
|
+
stack.push(value);
|
|
554
|
+
utils$1.forEach(value, function each(el, key) {
|
|
555
|
+
const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
|
|
556
|
+
formData,
|
|
557
|
+
el,
|
|
558
|
+
utils$1.isString(key) ? key.trim() : key,
|
|
559
|
+
path,
|
|
560
|
+
exposedHelpers
|
|
561
|
+
);
|
|
562
|
+
if (result === true) {
|
|
563
|
+
build(el, path ? path.concat(key) : [key]);
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
stack.pop();
|
|
567
|
+
}
|
|
568
|
+
if (!utils$1.isObject(obj)) {
|
|
569
|
+
throw new TypeError("data must be an object");
|
|
570
|
+
}
|
|
571
|
+
build(obj);
|
|
572
|
+
return formData;
|
|
573
|
+
}
|
|
574
|
+
function encode$1(str) {
|
|
575
|
+
const charMap = {
|
|
576
|
+
"!": "%21",
|
|
577
|
+
"'": "%27",
|
|
578
|
+
"(": "%28",
|
|
579
|
+
")": "%29",
|
|
580
|
+
"~": "%7E",
|
|
581
|
+
"%20": "+",
|
|
582
|
+
"%00": "\0"
|
|
583
|
+
};
|
|
584
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
585
|
+
return charMap[match];
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
function AxiosURLSearchParams(params, options) {
|
|
589
|
+
this._pairs = [];
|
|
590
|
+
params && toFormData$1(params, this, options);
|
|
591
|
+
}
|
|
592
|
+
const prototype = AxiosURLSearchParams.prototype;
|
|
593
|
+
prototype.append = function append(name, value) {
|
|
594
|
+
this._pairs.push([name, value]);
|
|
595
|
+
};
|
|
596
|
+
prototype.toString = function toString2(encoder) {
|
|
597
|
+
const _encode = encoder ? function(value) {
|
|
598
|
+
return encoder.call(this, value, encode$1);
|
|
599
|
+
} : encode$1;
|
|
600
|
+
return this._pairs.map(function each(pair) {
|
|
601
|
+
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
602
|
+
}, "").join("&");
|
|
603
|
+
};
|
|
604
|
+
function encode(val) {
|
|
605
|
+
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
606
|
+
}
|
|
607
|
+
function buildURL(url, params, options) {
|
|
608
|
+
if (!params) {
|
|
609
|
+
return url;
|
|
610
|
+
}
|
|
611
|
+
const _encode = options && options.encode || encode;
|
|
612
|
+
if (utils$1.isFunction(options)) {
|
|
613
|
+
options = {
|
|
614
|
+
serialize: options
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
const serializeFn = options && options.serialize;
|
|
618
|
+
let serializedParams;
|
|
619
|
+
if (serializeFn) {
|
|
620
|
+
serializedParams = serializeFn(params, options);
|
|
621
|
+
} else {
|
|
622
|
+
serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
|
|
623
|
+
}
|
|
624
|
+
if (serializedParams) {
|
|
625
|
+
const hashmarkIndex = url.indexOf("#");
|
|
626
|
+
if (hashmarkIndex !== -1) {
|
|
627
|
+
url = url.slice(0, hashmarkIndex);
|
|
628
|
+
}
|
|
629
|
+
url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
|
|
630
|
+
}
|
|
631
|
+
return url;
|
|
632
|
+
}
|
|
633
|
+
class InterceptorManager {
|
|
634
|
+
constructor() {
|
|
635
|
+
this.handlers = [];
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Add a new interceptor to the stack
|
|
639
|
+
*
|
|
640
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
641
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
642
|
+
*
|
|
643
|
+
* @return {Number} An ID used to remove interceptor later
|
|
644
|
+
*/
|
|
645
|
+
use(fulfilled, rejected, options) {
|
|
646
|
+
this.handlers.push({
|
|
647
|
+
fulfilled,
|
|
648
|
+
rejected,
|
|
649
|
+
synchronous: options ? options.synchronous : false,
|
|
650
|
+
runWhen: options ? options.runWhen : null
|
|
651
|
+
});
|
|
652
|
+
return this.handlers.length - 1;
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Remove an interceptor from the stack
|
|
656
|
+
*
|
|
657
|
+
* @param {Number} id The ID that was returned by `use`
|
|
658
|
+
*
|
|
659
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
660
|
+
*/
|
|
661
|
+
eject(id) {
|
|
662
|
+
if (this.handlers[id]) {
|
|
663
|
+
this.handlers[id] = null;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
/**
|
|
667
|
+
* Clear all interceptors from the stack
|
|
668
|
+
*
|
|
669
|
+
* @returns {void}
|
|
670
|
+
*/
|
|
671
|
+
clear() {
|
|
672
|
+
if (this.handlers) {
|
|
673
|
+
this.handlers = [];
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Iterate over all the registered interceptors
|
|
678
|
+
*
|
|
679
|
+
* This method is particularly useful for skipping over any
|
|
680
|
+
* interceptors that may have become `null` calling `eject`.
|
|
681
|
+
*
|
|
682
|
+
* @param {Function} fn The function to call for each interceptor
|
|
683
|
+
*
|
|
684
|
+
* @returns {void}
|
|
685
|
+
*/
|
|
686
|
+
forEach(fn) {
|
|
687
|
+
utils$1.forEach(this.handlers, function forEachHandler(h) {
|
|
688
|
+
if (h !== null) {
|
|
689
|
+
fn(h);
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
const transitionalDefaults = {
|
|
695
|
+
silentJSONParsing: true,
|
|
696
|
+
forcedJSONParsing: true,
|
|
697
|
+
clarifyTimeoutError: false
|
|
698
|
+
};
|
|
699
|
+
const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
|
|
700
|
+
const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
|
|
701
|
+
const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
|
|
702
|
+
const platform$1 = {
|
|
703
|
+
isBrowser: true,
|
|
704
|
+
classes: {
|
|
705
|
+
URLSearchParams: URLSearchParams$1,
|
|
706
|
+
FormData: FormData$1,
|
|
707
|
+
Blob: Blob$1
|
|
708
|
+
},
|
|
709
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
710
|
+
};
|
|
711
|
+
const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
712
|
+
const _navigator = typeof navigator === "object" && navigator || void 0;
|
|
713
|
+
const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
714
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
715
|
+
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
|
716
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
717
|
+
})();
|
|
718
|
+
const origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
719
|
+
const utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
720
|
+
__proto__: null,
|
|
721
|
+
hasBrowserEnv,
|
|
722
|
+
hasStandardBrowserEnv,
|
|
723
|
+
hasStandardBrowserWebWorkerEnv,
|
|
724
|
+
navigator: _navigator,
|
|
725
|
+
origin
|
|
726
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
727
|
+
const platform = {
|
|
728
|
+
...utils,
|
|
729
|
+
...platform$1
|
|
730
|
+
};
|
|
731
|
+
function toURLEncodedForm(data, options) {
|
|
732
|
+
return toFormData$1(data, new platform.classes.URLSearchParams(), {
|
|
733
|
+
visitor: function(value, key, path, helpers) {
|
|
734
|
+
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
735
|
+
this.append(key, value.toString("base64"));
|
|
736
|
+
return false;
|
|
737
|
+
}
|
|
738
|
+
return helpers.defaultVisitor.apply(this, arguments);
|
|
739
|
+
},
|
|
740
|
+
...options
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
function parsePropPath(name) {
|
|
744
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
745
|
+
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
function arrayToObject(arr) {
|
|
749
|
+
const obj = {};
|
|
750
|
+
const keys = Object.keys(arr);
|
|
751
|
+
let i;
|
|
752
|
+
const len = keys.length;
|
|
753
|
+
let key;
|
|
754
|
+
for (i = 0; i < len; i++) {
|
|
755
|
+
key = keys[i];
|
|
756
|
+
obj[key] = arr[key];
|
|
757
|
+
}
|
|
758
|
+
return obj;
|
|
759
|
+
}
|
|
760
|
+
function formDataToJSON(formData) {
|
|
761
|
+
function buildPath(path, value, target, index) {
|
|
762
|
+
let name = path[index++];
|
|
763
|
+
if (name === "__proto__") return true;
|
|
764
|
+
const isNumericKey = Number.isFinite(+name);
|
|
765
|
+
const isLast = index >= path.length;
|
|
766
|
+
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
767
|
+
if (isLast) {
|
|
768
|
+
if (utils$1.hasOwnProp(target, name)) {
|
|
769
|
+
target[name] = [target[name], value];
|
|
770
|
+
} else {
|
|
771
|
+
target[name] = value;
|
|
772
|
+
}
|
|
773
|
+
return !isNumericKey;
|
|
774
|
+
}
|
|
775
|
+
if (!target[name] || !utils$1.isObject(target[name])) {
|
|
776
|
+
target[name] = [];
|
|
777
|
+
}
|
|
778
|
+
const result = buildPath(path, value, target[name], index);
|
|
779
|
+
if (result && utils$1.isArray(target[name])) {
|
|
780
|
+
target[name] = arrayToObject(target[name]);
|
|
781
|
+
}
|
|
782
|
+
return !isNumericKey;
|
|
783
|
+
}
|
|
784
|
+
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
|
785
|
+
const obj = {};
|
|
786
|
+
utils$1.forEachEntry(formData, (name, value) => {
|
|
787
|
+
buildPath(parsePropPath(name), value, obj, 0);
|
|
788
|
+
});
|
|
789
|
+
return obj;
|
|
790
|
+
}
|
|
791
|
+
return null;
|
|
792
|
+
}
|
|
793
|
+
function stringifySafely(rawValue, parser, encoder) {
|
|
794
|
+
if (utils$1.isString(rawValue)) {
|
|
795
|
+
try {
|
|
796
|
+
(parser || JSON.parse)(rawValue);
|
|
797
|
+
return utils$1.trim(rawValue);
|
|
798
|
+
} catch (e) {
|
|
799
|
+
if (e.name !== "SyntaxError") {
|
|
800
|
+
throw e;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
return (encoder || JSON.stringify)(rawValue);
|
|
805
|
+
}
|
|
806
|
+
const defaults = {
|
|
807
|
+
transitional: transitionalDefaults,
|
|
808
|
+
adapter: ["xhr", "http", "fetch"],
|
|
809
|
+
transformRequest: [function transformRequest(data, headers) {
|
|
810
|
+
const contentType = headers.getContentType() || "";
|
|
811
|
+
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
812
|
+
const isObjectPayload = utils$1.isObject(data);
|
|
813
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
814
|
+
data = new FormData(data);
|
|
815
|
+
}
|
|
816
|
+
const isFormData2 = utils$1.isFormData(data);
|
|
817
|
+
if (isFormData2) {
|
|
818
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
819
|
+
}
|
|
820
|
+
if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
|
|
821
|
+
return data;
|
|
822
|
+
}
|
|
823
|
+
if (utils$1.isArrayBufferView(data)) {
|
|
824
|
+
return data.buffer;
|
|
825
|
+
}
|
|
826
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
827
|
+
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
828
|
+
return data.toString();
|
|
829
|
+
}
|
|
830
|
+
let isFileList2;
|
|
831
|
+
if (isObjectPayload) {
|
|
832
|
+
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
833
|
+
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
834
|
+
}
|
|
835
|
+
if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
836
|
+
const _FormData = this.env && this.env.FormData;
|
|
837
|
+
return toFormData$1(
|
|
838
|
+
isFileList2 ? { "files[]": data } : data,
|
|
839
|
+
_FormData && new _FormData(),
|
|
840
|
+
this.formSerializer
|
|
841
|
+
);
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
845
|
+
headers.setContentType("application/json", false);
|
|
846
|
+
return stringifySafely(data);
|
|
847
|
+
}
|
|
848
|
+
return data;
|
|
849
|
+
}],
|
|
850
|
+
transformResponse: [function transformResponse(data) {
|
|
851
|
+
const transitional2 = this.transitional || defaults.transitional;
|
|
852
|
+
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
853
|
+
const JSONRequested = this.responseType === "json";
|
|
854
|
+
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
|
|
855
|
+
return data;
|
|
856
|
+
}
|
|
857
|
+
if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
858
|
+
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
859
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
860
|
+
try {
|
|
861
|
+
return JSON.parse(data);
|
|
862
|
+
} catch (e) {
|
|
863
|
+
if (strictJSONParsing) {
|
|
864
|
+
if (e.name === "SyntaxError") {
|
|
865
|
+
throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
|
|
866
|
+
}
|
|
867
|
+
throw e;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
return data;
|
|
872
|
+
}],
|
|
873
|
+
/**
|
|
874
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
875
|
+
* timeout is not created.
|
|
876
|
+
*/
|
|
877
|
+
timeout: 0,
|
|
878
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
879
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
880
|
+
maxContentLength: -1,
|
|
881
|
+
maxBodyLength: -1,
|
|
882
|
+
env: {
|
|
883
|
+
FormData: platform.classes.FormData,
|
|
884
|
+
Blob: platform.classes.Blob
|
|
885
|
+
},
|
|
886
|
+
validateStatus: function validateStatus(status) {
|
|
887
|
+
return status >= 200 && status < 300;
|
|
888
|
+
},
|
|
889
|
+
headers: {
|
|
890
|
+
common: {
|
|
891
|
+
"Accept": "application/json, text/plain, */*",
|
|
892
|
+
"Content-Type": void 0
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
};
|
|
896
|
+
utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
|
|
897
|
+
defaults.headers[method] = {};
|
|
898
|
+
});
|
|
899
|
+
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
900
|
+
"age",
|
|
901
|
+
"authorization",
|
|
902
|
+
"content-length",
|
|
903
|
+
"content-type",
|
|
904
|
+
"etag",
|
|
905
|
+
"expires",
|
|
906
|
+
"from",
|
|
907
|
+
"host",
|
|
908
|
+
"if-modified-since",
|
|
909
|
+
"if-unmodified-since",
|
|
910
|
+
"last-modified",
|
|
911
|
+
"location",
|
|
912
|
+
"max-forwards",
|
|
913
|
+
"proxy-authorization",
|
|
914
|
+
"referer",
|
|
915
|
+
"retry-after",
|
|
916
|
+
"user-agent"
|
|
917
|
+
]);
|
|
918
|
+
const parseHeaders = (rawHeaders) => {
|
|
919
|
+
const parsed = {};
|
|
920
|
+
let key;
|
|
921
|
+
let val;
|
|
922
|
+
let i;
|
|
923
|
+
rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
|
|
924
|
+
i = line.indexOf(":");
|
|
925
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
926
|
+
val = line.substring(i + 1).trim();
|
|
927
|
+
if (!key || parsed[key] && ignoreDuplicateOf[key]) {
|
|
928
|
+
return;
|
|
929
|
+
}
|
|
930
|
+
if (key === "set-cookie") {
|
|
931
|
+
if (parsed[key]) {
|
|
932
|
+
parsed[key].push(val);
|
|
933
|
+
} else {
|
|
934
|
+
parsed[key] = [val];
|
|
935
|
+
}
|
|
936
|
+
} else {
|
|
937
|
+
parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
return parsed;
|
|
941
|
+
};
|
|
942
|
+
const $internals = Symbol("internals");
|
|
943
|
+
function normalizeHeader(header) {
|
|
944
|
+
return header && String(header).trim().toLowerCase();
|
|
945
|
+
}
|
|
946
|
+
function normalizeValue(value) {
|
|
947
|
+
if (value === false || value == null) {
|
|
948
|
+
return value;
|
|
949
|
+
}
|
|
950
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
951
|
+
}
|
|
952
|
+
function parseTokens(str) {
|
|
953
|
+
const tokens = /* @__PURE__ */ Object.create(null);
|
|
954
|
+
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
955
|
+
let match;
|
|
956
|
+
while (match = tokensRE.exec(str)) {
|
|
957
|
+
tokens[match[1]] = match[2];
|
|
958
|
+
}
|
|
959
|
+
return tokens;
|
|
960
|
+
}
|
|
961
|
+
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
962
|
+
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
|
|
963
|
+
if (utils$1.isFunction(filter2)) {
|
|
964
|
+
return filter2.call(this, value, header);
|
|
965
|
+
}
|
|
966
|
+
if (isHeaderNameFilter) {
|
|
967
|
+
value = header;
|
|
968
|
+
}
|
|
969
|
+
if (!utils$1.isString(value)) return;
|
|
970
|
+
if (utils$1.isString(filter2)) {
|
|
971
|
+
return value.indexOf(filter2) !== -1;
|
|
972
|
+
}
|
|
973
|
+
if (utils$1.isRegExp(filter2)) {
|
|
974
|
+
return filter2.test(value);
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
function formatHeader(header) {
|
|
978
|
+
return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
979
|
+
return char.toUpperCase() + str;
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
function buildAccessors(obj, header) {
|
|
983
|
+
const accessorName = utils$1.toCamelCase(" " + header);
|
|
984
|
+
["get", "set", "has"].forEach((methodName) => {
|
|
985
|
+
Object.defineProperty(obj, methodName + accessorName, {
|
|
986
|
+
value: function(arg1, arg2, arg3) {
|
|
987
|
+
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
988
|
+
},
|
|
989
|
+
configurable: true
|
|
990
|
+
});
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
let AxiosHeaders$1 = class AxiosHeaders {
|
|
994
|
+
constructor(headers) {
|
|
995
|
+
headers && this.set(headers);
|
|
996
|
+
}
|
|
997
|
+
set(header, valueOrRewrite, rewrite) {
|
|
998
|
+
const self2 = this;
|
|
999
|
+
function setHeader(_value, _header, _rewrite) {
|
|
1000
|
+
const lHeader = normalizeHeader(_header);
|
|
1001
|
+
if (!lHeader) {
|
|
1002
|
+
throw new Error("header name must be a non-empty string");
|
|
1003
|
+
}
|
|
1004
|
+
const key = utils$1.findKey(self2, lHeader);
|
|
1005
|
+
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
1006
|
+
self2[key || _header] = normalizeValue(_value);
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
1010
|
+
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
|
1011
|
+
setHeaders(header, valueOrRewrite);
|
|
1012
|
+
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
1013
|
+
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
1014
|
+
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
|
1015
|
+
let obj = {}, dest, key;
|
|
1016
|
+
for (const entry of header) {
|
|
1017
|
+
if (!utils$1.isArray(entry)) {
|
|
1018
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
1019
|
+
}
|
|
1020
|
+
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
1021
|
+
}
|
|
1022
|
+
setHeaders(obj, valueOrRewrite);
|
|
1023
|
+
} else {
|
|
1024
|
+
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
1025
|
+
}
|
|
1026
|
+
return this;
|
|
1027
|
+
}
|
|
1028
|
+
get(header, parser) {
|
|
1029
|
+
header = normalizeHeader(header);
|
|
1030
|
+
if (header) {
|
|
1031
|
+
const key = utils$1.findKey(this, header);
|
|
1032
|
+
if (key) {
|
|
1033
|
+
const value = this[key];
|
|
1034
|
+
if (!parser) {
|
|
1035
|
+
return value;
|
|
1036
|
+
}
|
|
1037
|
+
if (parser === true) {
|
|
1038
|
+
return parseTokens(value);
|
|
1039
|
+
}
|
|
1040
|
+
if (utils$1.isFunction(parser)) {
|
|
1041
|
+
return parser.call(this, value, key);
|
|
1042
|
+
}
|
|
1043
|
+
if (utils$1.isRegExp(parser)) {
|
|
1044
|
+
return parser.exec(value);
|
|
1045
|
+
}
|
|
1046
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
has(header, matcher) {
|
|
1051
|
+
header = normalizeHeader(header);
|
|
1052
|
+
if (header) {
|
|
1053
|
+
const key = utils$1.findKey(this, header);
|
|
1054
|
+
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
1055
|
+
}
|
|
1056
|
+
return false;
|
|
1057
|
+
}
|
|
1058
|
+
delete(header, matcher) {
|
|
1059
|
+
const self2 = this;
|
|
1060
|
+
let deleted = false;
|
|
1061
|
+
function deleteHeader(_header) {
|
|
1062
|
+
_header = normalizeHeader(_header);
|
|
1063
|
+
if (_header) {
|
|
1064
|
+
const key = utils$1.findKey(self2, _header);
|
|
1065
|
+
if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
|
|
1066
|
+
delete self2[key];
|
|
1067
|
+
deleted = true;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
if (utils$1.isArray(header)) {
|
|
1072
|
+
header.forEach(deleteHeader);
|
|
1073
|
+
} else {
|
|
1074
|
+
deleteHeader(header);
|
|
1075
|
+
}
|
|
1076
|
+
return deleted;
|
|
1077
|
+
}
|
|
1078
|
+
clear(matcher) {
|
|
1079
|
+
const keys = Object.keys(this);
|
|
1080
|
+
let i = keys.length;
|
|
1081
|
+
let deleted = false;
|
|
1082
|
+
while (i--) {
|
|
1083
|
+
const key = keys[i];
|
|
1084
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
1085
|
+
delete this[key];
|
|
1086
|
+
deleted = true;
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
return deleted;
|
|
1090
|
+
}
|
|
1091
|
+
normalize(format) {
|
|
1092
|
+
const self2 = this;
|
|
1093
|
+
const headers = {};
|
|
1094
|
+
utils$1.forEach(this, (value, header) => {
|
|
1095
|
+
const key = utils$1.findKey(headers, header);
|
|
1096
|
+
if (key) {
|
|
1097
|
+
self2[key] = normalizeValue(value);
|
|
1098
|
+
delete self2[header];
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1101
|
+
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
1102
|
+
if (normalized !== header) {
|
|
1103
|
+
delete self2[header];
|
|
1104
|
+
}
|
|
1105
|
+
self2[normalized] = normalizeValue(value);
|
|
1106
|
+
headers[normalized] = true;
|
|
1107
|
+
});
|
|
1108
|
+
return this;
|
|
1109
|
+
}
|
|
1110
|
+
concat(...targets) {
|
|
1111
|
+
return this.constructor.concat(this, ...targets);
|
|
1112
|
+
}
|
|
1113
|
+
toJSON(asStrings) {
|
|
1114
|
+
const obj = /* @__PURE__ */ Object.create(null);
|
|
1115
|
+
utils$1.forEach(this, (value, header) => {
|
|
1116
|
+
value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
|
|
1117
|
+
});
|
|
1118
|
+
return obj;
|
|
1119
|
+
}
|
|
1120
|
+
[Symbol.iterator]() {
|
|
1121
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1122
|
+
}
|
|
1123
|
+
toString() {
|
|
1124
|
+
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
1125
|
+
}
|
|
1126
|
+
getSetCookie() {
|
|
1127
|
+
return this.get("set-cookie") || [];
|
|
1128
|
+
}
|
|
1129
|
+
get [Symbol.toStringTag]() {
|
|
1130
|
+
return "AxiosHeaders";
|
|
1131
|
+
}
|
|
1132
|
+
static from(thing) {
|
|
1133
|
+
return thing instanceof this ? thing : new this(thing);
|
|
1134
|
+
}
|
|
1135
|
+
static concat(first, ...targets) {
|
|
1136
|
+
const computed = new this(first);
|
|
1137
|
+
targets.forEach((target) => computed.set(target));
|
|
1138
|
+
return computed;
|
|
1139
|
+
}
|
|
1140
|
+
static accessor(header) {
|
|
1141
|
+
const internals = this[$internals] = this[$internals] = {
|
|
1142
|
+
accessors: {}
|
|
1143
|
+
};
|
|
1144
|
+
const accessors = internals.accessors;
|
|
1145
|
+
const prototype2 = this.prototype;
|
|
1146
|
+
function defineAccessor(_header) {
|
|
1147
|
+
const lHeader = normalizeHeader(_header);
|
|
1148
|
+
if (!accessors[lHeader]) {
|
|
1149
|
+
buildAccessors(prototype2, _header);
|
|
1150
|
+
accessors[lHeader] = true;
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
1154
|
+
return this;
|
|
1155
|
+
}
|
|
1156
|
+
};
|
|
1157
|
+
AxiosHeaders$1.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1158
|
+
utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
|
|
1159
|
+
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
1160
|
+
return {
|
|
1161
|
+
get: () => value,
|
|
1162
|
+
set(headerValue) {
|
|
1163
|
+
this[mapped] = headerValue;
|
|
1164
|
+
}
|
|
1165
|
+
};
|
|
1166
|
+
});
|
|
1167
|
+
utils$1.freezeMethods(AxiosHeaders$1);
|
|
1168
|
+
function transformData(fns, response) {
|
|
1169
|
+
const config = this || defaults;
|
|
1170
|
+
const context = response || config;
|
|
1171
|
+
const headers = AxiosHeaders$1.from(context.headers);
|
|
1172
|
+
let data = context.data;
|
|
1173
|
+
utils$1.forEach(fns, function transform(fn) {
|
|
1174
|
+
data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
|
|
1175
|
+
});
|
|
1176
|
+
headers.normalize();
|
|
1177
|
+
return data;
|
|
1178
|
+
}
|
|
1179
|
+
function isCancel$1(value) {
|
|
1180
|
+
return !!(value && value.__CANCEL__);
|
|
1181
|
+
}
|
|
1182
|
+
function CanceledError$1(message, config, request) {
|
|
1183
|
+
AxiosError$1.call(this, message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request);
|
|
1184
|
+
this.name = "CanceledError";
|
|
1185
|
+
}
|
|
1186
|
+
utils$1.inherits(CanceledError$1, AxiosError$1, {
|
|
1187
|
+
__CANCEL__: true
|
|
1188
|
+
});
|
|
1189
|
+
function settle(resolve, reject, response) {
|
|
1190
|
+
const validateStatus2 = response.config.validateStatus;
|
|
1191
|
+
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
1192
|
+
resolve(response);
|
|
1193
|
+
} else {
|
|
1194
|
+
reject(new AxiosError$1(
|
|
1195
|
+
"Request failed with status code " + response.status,
|
|
1196
|
+
[AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
1197
|
+
response.config,
|
|
1198
|
+
response.request,
|
|
1199
|
+
response
|
|
1200
|
+
));
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
function parseProtocol(url) {
|
|
1204
|
+
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
1205
|
+
return match && match[1] || "";
|
|
1206
|
+
}
|
|
1207
|
+
function speedometer(samplesCount, min) {
|
|
1208
|
+
samplesCount = samplesCount || 10;
|
|
1209
|
+
const bytes = new Array(samplesCount);
|
|
1210
|
+
const timestamps = new Array(samplesCount);
|
|
1211
|
+
let head = 0;
|
|
1212
|
+
let tail = 0;
|
|
1213
|
+
let firstSampleTS;
|
|
1214
|
+
min = min !== void 0 ? min : 1e3;
|
|
1215
|
+
return function push(chunkLength) {
|
|
1216
|
+
const now = Date.now();
|
|
1217
|
+
const startedAt = timestamps[tail];
|
|
1218
|
+
if (!firstSampleTS) {
|
|
1219
|
+
firstSampleTS = now;
|
|
1220
|
+
}
|
|
1221
|
+
bytes[head] = chunkLength;
|
|
1222
|
+
timestamps[head] = now;
|
|
1223
|
+
let i = tail;
|
|
1224
|
+
let bytesCount = 0;
|
|
1225
|
+
while (i !== head) {
|
|
1226
|
+
bytesCount += bytes[i++];
|
|
1227
|
+
i = i % samplesCount;
|
|
1228
|
+
}
|
|
1229
|
+
head = (head + 1) % samplesCount;
|
|
1230
|
+
if (head === tail) {
|
|
1231
|
+
tail = (tail + 1) % samplesCount;
|
|
1232
|
+
}
|
|
1233
|
+
if (now - firstSampleTS < min) {
|
|
1234
|
+
return;
|
|
1235
|
+
}
|
|
1236
|
+
const passed = startedAt && now - startedAt;
|
|
1237
|
+
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
1238
|
+
};
|
|
1239
|
+
}
|
|
1240
|
+
function throttle(fn, freq) {
|
|
1241
|
+
let timestamp = 0;
|
|
1242
|
+
let threshold = 1e3 / freq;
|
|
1243
|
+
let lastArgs;
|
|
1244
|
+
let timer;
|
|
1245
|
+
const invoke = (args, now = Date.now()) => {
|
|
1246
|
+
timestamp = now;
|
|
1247
|
+
lastArgs = null;
|
|
1248
|
+
if (timer) {
|
|
1249
|
+
clearTimeout(timer);
|
|
1250
|
+
timer = null;
|
|
1251
|
+
}
|
|
1252
|
+
fn(...args);
|
|
1253
|
+
};
|
|
1254
|
+
const throttled = (...args) => {
|
|
1255
|
+
const now = Date.now();
|
|
1256
|
+
const passed = now - timestamp;
|
|
1257
|
+
if (passed >= threshold) {
|
|
1258
|
+
invoke(args, now);
|
|
1259
|
+
} else {
|
|
1260
|
+
lastArgs = args;
|
|
1261
|
+
if (!timer) {
|
|
1262
|
+
timer = setTimeout(() => {
|
|
1263
|
+
timer = null;
|
|
1264
|
+
invoke(lastArgs);
|
|
1265
|
+
}, threshold - passed);
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
};
|
|
1269
|
+
const flush = () => lastArgs && invoke(lastArgs);
|
|
1270
|
+
return [throttled, flush];
|
|
1271
|
+
}
|
|
1272
|
+
const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
1273
|
+
let bytesNotified = 0;
|
|
1274
|
+
const _speedometer = speedometer(50, 250);
|
|
1275
|
+
return throttle((e) => {
|
|
1276
|
+
const loaded = e.loaded;
|
|
1277
|
+
const total = e.lengthComputable ? e.total : void 0;
|
|
1278
|
+
const progressBytes = loaded - bytesNotified;
|
|
1279
|
+
const rate = _speedometer(progressBytes);
|
|
1280
|
+
const inRange = loaded <= total;
|
|
1281
|
+
bytesNotified = loaded;
|
|
1282
|
+
const data = {
|
|
1283
|
+
loaded,
|
|
1284
|
+
total,
|
|
1285
|
+
progress: total ? loaded / total : void 0,
|
|
1286
|
+
bytes: progressBytes,
|
|
1287
|
+
rate: rate ? rate : void 0,
|
|
1288
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
|
1289
|
+
event: e,
|
|
1290
|
+
lengthComputable: total != null,
|
|
1291
|
+
[isDownloadStream ? "download" : "upload"]: true
|
|
1292
|
+
};
|
|
1293
|
+
listener(data);
|
|
1294
|
+
}, freq);
|
|
1295
|
+
};
|
|
1296
|
+
const progressEventDecorator = (total, throttled) => {
|
|
1297
|
+
const lengthComputable = total != null;
|
|
1298
|
+
return [(loaded) => throttled[0]({
|
|
1299
|
+
lengthComputable,
|
|
1300
|
+
total,
|
|
1301
|
+
loaded
|
|
1302
|
+
}), throttled[1]];
|
|
1303
|
+
};
|
|
1304
|
+
const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
|
|
1305
|
+
const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url) => {
|
|
1306
|
+
url = new URL(url, platform.origin);
|
|
1307
|
+
return origin2.protocol === url.protocol && origin2.host === url.host && (isMSIE || origin2.port === url.port);
|
|
1308
|
+
})(
|
|
1309
|
+
new URL(platform.origin),
|
|
1310
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
1311
|
+
) : () => true;
|
|
1312
|
+
const cookies = platform.hasStandardBrowserEnv ? (
|
|
1313
|
+
// Standard browser envs support document.cookie
|
|
1314
|
+
{
|
|
1315
|
+
write(name, value, expires, path, domain, secure) {
|
|
1316
|
+
const cookie = [name + "=" + encodeURIComponent(value)];
|
|
1317
|
+
utils$1.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
|
1318
|
+
utils$1.isString(path) && cookie.push("path=" + path);
|
|
1319
|
+
utils$1.isString(domain) && cookie.push("domain=" + domain);
|
|
1320
|
+
secure === true && cookie.push("secure");
|
|
1321
|
+
document.cookie = cookie.join("; ");
|
|
1322
|
+
},
|
|
1323
|
+
read(name) {
|
|
1324
|
+
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
1325
|
+
return match ? decodeURIComponent(match[3]) : null;
|
|
1326
|
+
},
|
|
1327
|
+
remove(name) {
|
|
1328
|
+
this.write(name, "", Date.now() - 864e5);
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
) : (
|
|
1332
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1333
|
+
{
|
|
1334
|
+
write() {
|
|
1335
|
+
},
|
|
1336
|
+
read() {
|
|
1337
|
+
return null;
|
|
1338
|
+
},
|
|
1339
|
+
remove() {
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
);
|
|
1343
|
+
function isAbsoluteURL(url) {
|
|
1344
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
1345
|
+
}
|
|
1346
|
+
function combineURLs(baseURL, relativeURL) {
|
|
1347
|
+
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
1348
|
+
}
|
|
1349
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
1350
|
+
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
1351
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
|
|
1352
|
+
return combineURLs(baseURL, requestedURL);
|
|
1353
|
+
}
|
|
1354
|
+
return requestedURL;
|
|
1355
|
+
}
|
|
1356
|
+
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
1357
|
+
function mergeConfig$1(config1, config2) {
|
|
1358
|
+
config2 = config2 || {};
|
|
1359
|
+
const config = {};
|
|
1360
|
+
function getMergedValue(target, source, prop, caseless) {
|
|
1361
|
+
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
1362
|
+
return utils$1.merge.call({ caseless }, target, source);
|
|
1363
|
+
} else if (utils$1.isPlainObject(source)) {
|
|
1364
|
+
return utils$1.merge({}, source);
|
|
1365
|
+
} else if (utils$1.isArray(source)) {
|
|
1366
|
+
return source.slice();
|
|
1367
|
+
}
|
|
1368
|
+
return source;
|
|
1369
|
+
}
|
|
1370
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
1371
|
+
if (!utils$1.isUndefined(b)) {
|
|
1372
|
+
return getMergedValue(a, b, prop, caseless);
|
|
1373
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
1374
|
+
return getMergedValue(void 0, a, prop, caseless);
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
function valueFromConfig2(a, b) {
|
|
1378
|
+
if (!utils$1.isUndefined(b)) {
|
|
1379
|
+
return getMergedValue(void 0, b);
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
function defaultToConfig2(a, b) {
|
|
1383
|
+
if (!utils$1.isUndefined(b)) {
|
|
1384
|
+
return getMergedValue(void 0, b);
|
|
1385
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
1386
|
+
return getMergedValue(void 0, a);
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
function mergeDirectKeys(a, b, prop) {
|
|
1390
|
+
if (prop in config2) {
|
|
1391
|
+
return getMergedValue(a, b);
|
|
1392
|
+
} else if (prop in config1) {
|
|
1393
|
+
return getMergedValue(void 0, a);
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
const mergeMap = {
|
|
1397
|
+
url: valueFromConfig2,
|
|
1398
|
+
method: valueFromConfig2,
|
|
1399
|
+
data: valueFromConfig2,
|
|
1400
|
+
baseURL: defaultToConfig2,
|
|
1401
|
+
transformRequest: defaultToConfig2,
|
|
1402
|
+
transformResponse: defaultToConfig2,
|
|
1403
|
+
paramsSerializer: defaultToConfig2,
|
|
1404
|
+
timeout: defaultToConfig2,
|
|
1405
|
+
timeoutMessage: defaultToConfig2,
|
|
1406
|
+
withCredentials: defaultToConfig2,
|
|
1407
|
+
withXSRFToken: defaultToConfig2,
|
|
1408
|
+
adapter: defaultToConfig2,
|
|
1409
|
+
responseType: defaultToConfig2,
|
|
1410
|
+
xsrfCookieName: defaultToConfig2,
|
|
1411
|
+
xsrfHeaderName: defaultToConfig2,
|
|
1412
|
+
onUploadProgress: defaultToConfig2,
|
|
1413
|
+
onDownloadProgress: defaultToConfig2,
|
|
1414
|
+
decompress: defaultToConfig2,
|
|
1415
|
+
maxContentLength: defaultToConfig2,
|
|
1416
|
+
maxBodyLength: defaultToConfig2,
|
|
1417
|
+
beforeRedirect: defaultToConfig2,
|
|
1418
|
+
transport: defaultToConfig2,
|
|
1419
|
+
httpAgent: defaultToConfig2,
|
|
1420
|
+
httpsAgent: defaultToConfig2,
|
|
1421
|
+
cancelToken: defaultToConfig2,
|
|
1422
|
+
socketPath: defaultToConfig2,
|
|
1423
|
+
responseEncoding: defaultToConfig2,
|
|
1424
|
+
validateStatus: mergeDirectKeys,
|
|
1425
|
+
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
1426
|
+
};
|
|
1427
|
+
utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
1428
|
+
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
1429
|
+
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
1430
|
+
utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
1431
|
+
});
|
|
1432
|
+
return config;
|
|
1433
|
+
}
|
|
1434
|
+
const resolveConfig = (config) => {
|
|
1435
|
+
const newConfig = mergeConfig$1({}, config);
|
|
1436
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
1437
|
+
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
|
1438
|
+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
1439
|
+
if (auth) {
|
|
1440
|
+
headers.set(
|
|
1441
|
+
"Authorization",
|
|
1442
|
+
"Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
|
|
1443
|
+
);
|
|
1444
|
+
}
|
|
1445
|
+
let contentType;
|
|
1446
|
+
if (utils$1.isFormData(data)) {
|
|
1447
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
1448
|
+
headers.setContentType(void 0);
|
|
1449
|
+
} else if ((contentType = headers.getContentType()) !== false) {
|
|
1450
|
+
const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
|
|
1451
|
+
headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
if (platform.hasStandardBrowserEnv) {
|
|
1455
|
+
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
1456
|
+
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
|
|
1457
|
+
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
1458
|
+
if (xsrfValue) {
|
|
1459
|
+
headers.set(xsrfHeaderName, xsrfValue);
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
return newConfig;
|
|
1464
|
+
};
|
|
1465
|
+
const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
1466
|
+
const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
1467
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
1468
|
+
const _config = resolveConfig(config);
|
|
1469
|
+
let requestData = _config.data;
|
|
1470
|
+
const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
|
|
1471
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
1472
|
+
let onCanceled;
|
|
1473
|
+
let uploadThrottled, downloadThrottled;
|
|
1474
|
+
let flushUpload, flushDownload;
|
|
1475
|
+
function done() {
|
|
1476
|
+
flushUpload && flushUpload();
|
|
1477
|
+
flushDownload && flushDownload();
|
|
1478
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
1479
|
+
_config.signal && _config.signal.removeEventListener("abort", onCanceled);
|
|
1480
|
+
}
|
|
1481
|
+
let request = new XMLHttpRequest();
|
|
1482
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
1483
|
+
request.timeout = _config.timeout;
|
|
1484
|
+
function onloadend() {
|
|
1485
|
+
if (!request) {
|
|
1486
|
+
return;
|
|
1487
|
+
}
|
|
1488
|
+
const responseHeaders = AxiosHeaders$1.from(
|
|
1489
|
+
"getAllResponseHeaders" in request && request.getAllResponseHeaders()
|
|
1490
|
+
);
|
|
1491
|
+
const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
|
|
1492
|
+
const response = {
|
|
1493
|
+
data: responseData,
|
|
1494
|
+
status: request.status,
|
|
1495
|
+
statusText: request.statusText,
|
|
1496
|
+
headers: responseHeaders,
|
|
1497
|
+
config,
|
|
1498
|
+
request
|
|
1499
|
+
};
|
|
1500
|
+
settle(function _resolve(value) {
|
|
1501
|
+
resolve(value);
|
|
1502
|
+
done();
|
|
1503
|
+
}, function _reject(err) {
|
|
1504
|
+
reject(err);
|
|
1505
|
+
done();
|
|
1506
|
+
}, response);
|
|
1507
|
+
request = null;
|
|
1508
|
+
}
|
|
1509
|
+
if ("onloadend" in request) {
|
|
1510
|
+
request.onloadend = onloadend;
|
|
1511
|
+
} else {
|
|
1512
|
+
request.onreadystatechange = function handleLoad() {
|
|
1513
|
+
if (!request || request.readyState !== 4) {
|
|
1514
|
+
return;
|
|
1515
|
+
}
|
|
1516
|
+
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
|
|
1517
|
+
return;
|
|
1518
|
+
}
|
|
1519
|
+
setTimeout(onloadend);
|
|
1520
|
+
};
|
|
1521
|
+
}
|
|
1522
|
+
request.onabort = function handleAbort() {
|
|
1523
|
+
if (!request) {
|
|
1524
|
+
return;
|
|
1525
|
+
}
|
|
1526
|
+
reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
|
|
1527
|
+
request = null;
|
|
1528
|
+
};
|
|
1529
|
+
request.onerror = function handleError() {
|
|
1530
|
+
reject(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request));
|
|
1531
|
+
request = null;
|
|
1532
|
+
};
|
|
1533
|
+
request.ontimeout = function handleTimeout() {
|
|
1534
|
+
let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
|
|
1535
|
+
const transitional2 = _config.transitional || transitionalDefaults;
|
|
1536
|
+
if (_config.timeoutErrorMessage) {
|
|
1537
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
1538
|
+
}
|
|
1539
|
+
reject(new AxiosError$1(
|
|
1540
|
+
timeoutErrorMessage,
|
|
1541
|
+
transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
1542
|
+
config,
|
|
1543
|
+
request
|
|
1544
|
+
));
|
|
1545
|
+
request = null;
|
|
1546
|
+
};
|
|
1547
|
+
requestData === void 0 && requestHeaders.setContentType(null);
|
|
1548
|
+
if ("setRequestHeader" in request) {
|
|
1549
|
+
utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
1550
|
+
request.setRequestHeader(key, val);
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
if (!utils$1.isUndefined(_config.withCredentials)) {
|
|
1554
|
+
request.withCredentials = !!_config.withCredentials;
|
|
1555
|
+
}
|
|
1556
|
+
if (responseType && responseType !== "json") {
|
|
1557
|
+
request.responseType = _config.responseType;
|
|
1558
|
+
}
|
|
1559
|
+
if (onDownloadProgress) {
|
|
1560
|
+
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
1561
|
+
request.addEventListener("progress", downloadThrottled);
|
|
1562
|
+
}
|
|
1563
|
+
if (onUploadProgress && request.upload) {
|
|
1564
|
+
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
1565
|
+
request.upload.addEventListener("progress", uploadThrottled);
|
|
1566
|
+
request.upload.addEventListener("loadend", flushUpload);
|
|
1567
|
+
}
|
|
1568
|
+
if (_config.cancelToken || _config.signal) {
|
|
1569
|
+
onCanceled = (cancel) => {
|
|
1570
|
+
if (!request) {
|
|
1571
|
+
return;
|
|
1572
|
+
}
|
|
1573
|
+
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
|
1574
|
+
request.abort();
|
|
1575
|
+
request = null;
|
|
1576
|
+
};
|
|
1577
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
1578
|
+
if (_config.signal) {
|
|
1579
|
+
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
const protocol = parseProtocol(_config.url);
|
|
1583
|
+
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
1584
|
+
reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config));
|
|
1585
|
+
return;
|
|
1586
|
+
}
|
|
1587
|
+
request.send(requestData || null);
|
|
1588
|
+
});
|
|
1589
|
+
};
|
|
1590
|
+
const composeSignals = (signals, timeout) => {
|
|
1591
|
+
const { length } = signals = signals ? signals.filter(Boolean) : [];
|
|
1592
|
+
if (timeout || length) {
|
|
1593
|
+
let controller = new AbortController();
|
|
1594
|
+
let aborted;
|
|
1595
|
+
const onabort = function(reason) {
|
|
1596
|
+
if (!aborted) {
|
|
1597
|
+
aborted = true;
|
|
1598
|
+
unsubscribe();
|
|
1599
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
1600
|
+
controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
|
|
1601
|
+
}
|
|
1602
|
+
};
|
|
1603
|
+
let timer = timeout && setTimeout(() => {
|
|
1604
|
+
timer = null;
|
|
1605
|
+
onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
|
|
1606
|
+
}, timeout);
|
|
1607
|
+
const unsubscribe = () => {
|
|
1608
|
+
if (signals) {
|
|
1609
|
+
timer && clearTimeout(timer);
|
|
1610
|
+
timer = null;
|
|
1611
|
+
signals.forEach((signal2) => {
|
|
1612
|
+
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
1613
|
+
});
|
|
1614
|
+
signals = null;
|
|
1615
|
+
}
|
|
1616
|
+
};
|
|
1617
|
+
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
1618
|
+
const { signal } = controller;
|
|
1619
|
+
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
1620
|
+
return signal;
|
|
1621
|
+
}
|
|
1622
|
+
};
|
|
1623
|
+
const streamChunk = function* (chunk, chunkSize) {
|
|
1624
|
+
let len = chunk.byteLength;
|
|
1625
|
+
if (len < chunkSize) {
|
|
1626
|
+
yield chunk;
|
|
1627
|
+
return;
|
|
1628
|
+
}
|
|
1629
|
+
let pos = 0;
|
|
1630
|
+
let end;
|
|
1631
|
+
while (pos < len) {
|
|
1632
|
+
end = pos + chunkSize;
|
|
1633
|
+
yield chunk.slice(pos, end);
|
|
1634
|
+
pos = end;
|
|
1635
|
+
}
|
|
1636
|
+
};
|
|
1637
|
+
const readBytes = async function* (iterable, chunkSize) {
|
|
1638
|
+
for await (const chunk of readStream(iterable)) {
|
|
1639
|
+
yield* streamChunk(chunk, chunkSize);
|
|
1640
|
+
}
|
|
1641
|
+
};
|
|
1642
|
+
const readStream = async function* (stream) {
|
|
1643
|
+
if (stream[Symbol.asyncIterator]) {
|
|
1644
|
+
yield* stream;
|
|
1645
|
+
return;
|
|
1646
|
+
}
|
|
1647
|
+
const reader = stream.getReader();
|
|
1648
|
+
try {
|
|
1649
|
+
for (; ; ) {
|
|
1650
|
+
const { done, value } = await reader.read();
|
|
1651
|
+
if (done) {
|
|
1652
|
+
break;
|
|
1653
|
+
}
|
|
1654
|
+
yield value;
|
|
1655
|
+
}
|
|
1656
|
+
} finally {
|
|
1657
|
+
await reader.cancel();
|
|
1658
|
+
}
|
|
1659
|
+
};
|
|
1660
|
+
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
1661
|
+
const iterator2 = readBytes(stream, chunkSize);
|
|
1662
|
+
let bytes = 0;
|
|
1663
|
+
let done;
|
|
1664
|
+
let _onFinish = (e) => {
|
|
1665
|
+
if (!done) {
|
|
1666
|
+
done = true;
|
|
1667
|
+
onFinish && onFinish(e);
|
|
1668
|
+
}
|
|
1669
|
+
};
|
|
1670
|
+
return new ReadableStream({
|
|
1671
|
+
async pull(controller) {
|
|
1672
|
+
try {
|
|
1673
|
+
const { done: done2, value } = await iterator2.next();
|
|
1674
|
+
if (done2) {
|
|
1675
|
+
_onFinish();
|
|
1676
|
+
controller.close();
|
|
1677
|
+
return;
|
|
1678
|
+
}
|
|
1679
|
+
let len = value.byteLength;
|
|
1680
|
+
if (onProgress) {
|
|
1681
|
+
let loadedBytes = bytes += len;
|
|
1682
|
+
onProgress(loadedBytes);
|
|
1683
|
+
}
|
|
1684
|
+
controller.enqueue(new Uint8Array(value));
|
|
1685
|
+
} catch (err) {
|
|
1686
|
+
_onFinish(err);
|
|
1687
|
+
throw err;
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
cancel(reason) {
|
|
1691
|
+
_onFinish(reason);
|
|
1692
|
+
return iterator2.return();
|
|
1693
|
+
}
|
|
1694
|
+
}, {
|
|
1695
|
+
highWaterMark: 2
|
|
1696
|
+
});
|
|
1697
|
+
};
|
|
1698
|
+
const isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
|
|
1699
|
+
const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
|
|
1700
|
+
const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
|
|
1701
|
+
const test = (fn, ...args) => {
|
|
1702
|
+
try {
|
|
1703
|
+
return !!fn(...args);
|
|
1704
|
+
} catch (e) {
|
|
1705
|
+
return false;
|
|
1706
|
+
}
|
|
1707
|
+
};
|
|
1708
|
+
const supportsRequestStream = isReadableStreamSupported && test(() => {
|
|
1709
|
+
let duplexAccessed = false;
|
|
1710
|
+
const hasContentType = new Request(platform.origin, {
|
|
1711
|
+
body: new ReadableStream(),
|
|
1712
|
+
method: "POST",
|
|
1713
|
+
get duplex() {
|
|
1714
|
+
duplexAccessed = true;
|
|
1715
|
+
return "half";
|
|
1716
|
+
}
|
|
1717
|
+
}).headers.has("Content-Type");
|
|
1718
|
+
return duplexAccessed && !hasContentType;
|
|
1719
|
+
});
|
|
1720
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
1721
|
+
const supportsResponseStream = isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
|
|
1722
|
+
const resolvers = {
|
|
1723
|
+
stream: supportsResponseStream && ((res) => res.body)
|
|
1724
|
+
};
|
|
1725
|
+
isFetchSupported && ((res) => {
|
|
1726
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
|
|
1727
|
+
!resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
|
|
1728
|
+
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
|
1729
|
+
});
|
|
1730
|
+
});
|
|
1731
|
+
})(new Response());
|
|
1732
|
+
const getBodyLength = async (body) => {
|
|
1733
|
+
if (body == null) {
|
|
1734
|
+
return 0;
|
|
1735
|
+
}
|
|
1736
|
+
if (utils$1.isBlob(body)) {
|
|
1737
|
+
return body.size;
|
|
1738
|
+
}
|
|
1739
|
+
if (utils$1.isSpecCompliantForm(body)) {
|
|
1740
|
+
const _request = new Request(platform.origin, {
|
|
1741
|
+
method: "POST",
|
|
1742
|
+
body
|
|
1743
|
+
});
|
|
1744
|
+
return (await _request.arrayBuffer()).byteLength;
|
|
1745
|
+
}
|
|
1746
|
+
if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
|
|
1747
|
+
return body.byteLength;
|
|
1748
|
+
}
|
|
1749
|
+
if (utils$1.isURLSearchParams(body)) {
|
|
1750
|
+
body = body + "";
|
|
1751
|
+
}
|
|
1752
|
+
if (utils$1.isString(body)) {
|
|
1753
|
+
return (await encodeText(body)).byteLength;
|
|
1754
|
+
}
|
|
1755
|
+
};
|
|
1756
|
+
const resolveBodyLength = async (headers, body) => {
|
|
1757
|
+
const length = utils$1.toFiniteNumber(headers.getContentLength());
|
|
1758
|
+
return length == null ? getBodyLength(body) : length;
|
|
1759
|
+
};
|
|
1760
|
+
const fetchAdapter = isFetchSupported && (async (config) => {
|
|
1761
|
+
let {
|
|
1762
|
+
url,
|
|
1763
|
+
method,
|
|
1764
|
+
data,
|
|
1765
|
+
signal,
|
|
1766
|
+
cancelToken,
|
|
1767
|
+
timeout,
|
|
1768
|
+
onDownloadProgress,
|
|
1769
|
+
onUploadProgress,
|
|
1770
|
+
responseType,
|
|
1771
|
+
headers,
|
|
1772
|
+
withCredentials = "same-origin",
|
|
1773
|
+
fetchOptions
|
|
1774
|
+
} = resolveConfig(config);
|
|
1775
|
+
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
1776
|
+
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
1777
|
+
let request;
|
|
1778
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
1779
|
+
composedSignal.unsubscribe();
|
|
1780
|
+
});
|
|
1781
|
+
let requestContentLength;
|
|
1782
|
+
try {
|
|
1783
|
+
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
1784
|
+
let _request = new Request(url, {
|
|
1785
|
+
method: "POST",
|
|
1786
|
+
body: data,
|
|
1787
|
+
duplex: "half"
|
|
1788
|
+
});
|
|
1789
|
+
let contentTypeHeader;
|
|
1790
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
1791
|
+
headers.setContentType(contentTypeHeader);
|
|
1792
|
+
}
|
|
1793
|
+
if (_request.body) {
|
|
1794
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
1795
|
+
requestContentLength,
|
|
1796
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
1797
|
+
);
|
|
1798
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
if (!utils$1.isString(withCredentials)) {
|
|
1802
|
+
withCredentials = withCredentials ? "include" : "omit";
|
|
1803
|
+
}
|
|
1804
|
+
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
1805
|
+
request = new Request(url, {
|
|
1806
|
+
...fetchOptions,
|
|
1807
|
+
signal: composedSignal,
|
|
1808
|
+
method: method.toUpperCase(),
|
|
1809
|
+
headers: headers.normalize().toJSON(),
|
|
1810
|
+
body: data,
|
|
1811
|
+
duplex: "half",
|
|
1812
|
+
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
1813
|
+
});
|
|
1814
|
+
let response = await fetch(request, fetchOptions);
|
|
1815
|
+
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
1816
|
+
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
1817
|
+
const options = {};
|
|
1818
|
+
["status", "statusText", "headers"].forEach((prop) => {
|
|
1819
|
+
options[prop] = response[prop];
|
|
1820
|
+
});
|
|
1821
|
+
const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
|
|
1822
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
1823
|
+
responseContentLength,
|
|
1824
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
1825
|
+
) || [];
|
|
1826
|
+
response = new Response(
|
|
1827
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
1828
|
+
flush && flush();
|
|
1829
|
+
unsubscribe && unsubscribe();
|
|
1830
|
+
}),
|
|
1831
|
+
options
|
|
1832
|
+
);
|
|
1833
|
+
}
|
|
1834
|
+
responseType = responseType || "text";
|
|
1835
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
|
|
1836
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
|
1837
|
+
return await new Promise((resolve, reject) => {
|
|
1838
|
+
settle(resolve, reject, {
|
|
1839
|
+
data: responseData,
|
|
1840
|
+
headers: AxiosHeaders$1.from(response.headers),
|
|
1841
|
+
status: response.status,
|
|
1842
|
+
statusText: response.statusText,
|
|
1843
|
+
config,
|
|
1844
|
+
request
|
|
1845
|
+
});
|
|
1846
|
+
});
|
|
1847
|
+
} catch (err) {
|
|
1848
|
+
unsubscribe && unsubscribe();
|
|
1849
|
+
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
1850
|
+
throw Object.assign(
|
|
1851
|
+
new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request),
|
|
1852
|
+
{
|
|
1853
|
+
cause: err.cause || err
|
|
1854
|
+
}
|
|
1855
|
+
);
|
|
1856
|
+
}
|
|
1857
|
+
throw AxiosError$1.from(err, err && err.code, config, request);
|
|
1858
|
+
}
|
|
1859
|
+
});
|
|
1860
|
+
const knownAdapters = {
|
|
1861
|
+
http: httpAdapter,
|
|
1862
|
+
xhr: xhrAdapter,
|
|
1863
|
+
fetch: fetchAdapter
|
|
1864
|
+
};
|
|
1865
|
+
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
1866
|
+
if (fn) {
|
|
1867
|
+
try {
|
|
1868
|
+
Object.defineProperty(fn, "name", { value });
|
|
1869
|
+
} catch (e) {
|
|
1870
|
+
}
|
|
1871
|
+
Object.defineProperty(fn, "adapterName", { value });
|
|
1872
|
+
}
|
|
1873
|
+
});
|
|
1874
|
+
const renderReason = (reason) => `- ${reason}`;
|
|
1875
|
+
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
1876
|
+
const adapters = {
|
|
1877
|
+
getAdapter: (adapters2) => {
|
|
1878
|
+
adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
|
|
1879
|
+
const { length } = adapters2;
|
|
1880
|
+
let nameOrAdapter;
|
|
1881
|
+
let adapter;
|
|
1882
|
+
const rejectedReasons = {};
|
|
1883
|
+
for (let i = 0; i < length; i++) {
|
|
1884
|
+
nameOrAdapter = adapters2[i];
|
|
1885
|
+
let id;
|
|
1886
|
+
adapter = nameOrAdapter;
|
|
1887
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
1888
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
1889
|
+
if (adapter === void 0) {
|
|
1890
|
+
throw new AxiosError$1(`Unknown adapter '${id}'`);
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
if (adapter) {
|
|
1894
|
+
break;
|
|
1895
|
+
}
|
|
1896
|
+
rejectedReasons[id || "#" + i] = adapter;
|
|
1897
|
+
}
|
|
1898
|
+
if (!adapter) {
|
|
1899
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
1900
|
+
([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
1901
|
+
);
|
|
1902
|
+
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
1903
|
+
throw new AxiosError$1(
|
|
1904
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
1905
|
+
"ERR_NOT_SUPPORT"
|
|
1906
|
+
);
|
|
1907
|
+
}
|
|
1908
|
+
return adapter;
|
|
1909
|
+
},
|
|
1910
|
+
adapters: knownAdapters
|
|
1911
|
+
};
|
|
1912
|
+
function throwIfCancellationRequested(config) {
|
|
1913
|
+
if (config.cancelToken) {
|
|
1914
|
+
config.cancelToken.throwIfRequested();
|
|
1915
|
+
}
|
|
1916
|
+
if (config.signal && config.signal.aborted) {
|
|
1917
|
+
throw new CanceledError$1(null, config);
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
function dispatchRequest(config) {
|
|
1921
|
+
throwIfCancellationRequested(config);
|
|
1922
|
+
config.headers = AxiosHeaders$1.from(config.headers);
|
|
1923
|
+
config.data = transformData.call(
|
|
1924
|
+
config,
|
|
1925
|
+
config.transformRequest
|
|
1926
|
+
);
|
|
1927
|
+
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
|
|
1928
|
+
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
1929
|
+
}
|
|
1930
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
|
|
1931
|
+
return adapter(config).then(function onAdapterResolution(response) {
|
|
1932
|
+
throwIfCancellationRequested(config);
|
|
1933
|
+
response.data = transformData.call(
|
|
1934
|
+
config,
|
|
1935
|
+
config.transformResponse,
|
|
1936
|
+
response
|
|
1937
|
+
);
|
|
1938
|
+
response.headers = AxiosHeaders$1.from(response.headers);
|
|
1939
|
+
return response;
|
|
1940
|
+
}, function onAdapterRejection(reason) {
|
|
1941
|
+
if (!isCancel$1(reason)) {
|
|
1942
|
+
throwIfCancellationRequested(config);
|
|
1943
|
+
if (reason && reason.response) {
|
|
1944
|
+
reason.response.data = transformData.call(
|
|
1945
|
+
config,
|
|
1946
|
+
config.transformResponse,
|
|
1947
|
+
reason.response
|
|
1948
|
+
);
|
|
1949
|
+
reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
return Promise.reject(reason);
|
|
1953
|
+
});
|
|
1954
|
+
}
|
|
1955
|
+
const VERSION$1 = "1.11.0";
|
|
1956
|
+
const validators$1 = {};
|
|
1957
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
1958
|
+
validators$1[type] = function validator2(thing) {
|
|
1959
|
+
return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
|
|
1960
|
+
};
|
|
1961
|
+
});
|
|
1962
|
+
const deprecatedWarnings = {};
|
|
1963
|
+
validators$1.transitional = function transitional(validator2, version, message) {
|
|
1964
|
+
function formatMessage(opt, desc) {
|
|
1965
|
+
return "[Axios v" + VERSION$1 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
|
|
1966
|
+
}
|
|
1967
|
+
return (value, opt, opts) => {
|
|
1968
|
+
if (validator2 === false) {
|
|
1969
|
+
throw new AxiosError$1(
|
|
1970
|
+
formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
|
|
1971
|
+
AxiosError$1.ERR_DEPRECATED
|
|
1972
|
+
);
|
|
1973
|
+
}
|
|
1974
|
+
if (version && !deprecatedWarnings[opt]) {
|
|
1975
|
+
deprecatedWarnings[opt] = true;
|
|
1976
|
+
console.warn(
|
|
1977
|
+
formatMessage(
|
|
1978
|
+
opt,
|
|
1979
|
+
" has been deprecated since v" + version + " and will be removed in the near future"
|
|
1980
|
+
)
|
|
1981
|
+
);
|
|
1982
|
+
}
|
|
1983
|
+
return validator2 ? validator2(value, opt, opts) : true;
|
|
1984
|
+
};
|
|
1985
|
+
};
|
|
1986
|
+
validators$1.spelling = function spelling(correctSpelling) {
|
|
1987
|
+
return (value, opt) => {
|
|
1988
|
+
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
1989
|
+
return true;
|
|
1990
|
+
};
|
|
1991
|
+
};
|
|
1992
|
+
function assertOptions(options, schema, allowUnknown) {
|
|
1993
|
+
if (typeof options !== "object") {
|
|
1994
|
+
throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
1995
|
+
}
|
|
1996
|
+
const keys = Object.keys(options);
|
|
1997
|
+
let i = keys.length;
|
|
1998
|
+
while (i-- > 0) {
|
|
1999
|
+
const opt = keys[i];
|
|
2000
|
+
const validator2 = schema[opt];
|
|
2001
|
+
if (validator2) {
|
|
2002
|
+
const value = options[opt];
|
|
2003
|
+
const result = value === void 0 || validator2(value, opt, options);
|
|
2004
|
+
if (result !== true) {
|
|
2005
|
+
throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
2006
|
+
}
|
|
2007
|
+
continue;
|
|
2008
|
+
}
|
|
2009
|
+
if (allowUnknown !== true) {
|
|
2010
|
+
throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION);
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
const validator = {
|
|
2015
|
+
assertOptions,
|
|
2016
|
+
validators: validators$1
|
|
2017
|
+
};
|
|
2018
|
+
const validators = validator.validators;
|
|
2019
|
+
let Axios$1 = class Axios {
|
|
2020
|
+
constructor(instanceConfig) {
|
|
2021
|
+
this.defaults = instanceConfig || {};
|
|
2022
|
+
this.interceptors = {
|
|
2023
|
+
request: new InterceptorManager(),
|
|
2024
|
+
response: new InterceptorManager()
|
|
2025
|
+
};
|
|
2026
|
+
}
|
|
2027
|
+
/**
|
|
2028
|
+
* Dispatch a request
|
|
2029
|
+
*
|
|
2030
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
2031
|
+
* @param {?Object} config
|
|
2032
|
+
*
|
|
2033
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
2034
|
+
*/
|
|
2035
|
+
async request(configOrUrl, config) {
|
|
2036
|
+
try {
|
|
2037
|
+
return await this._request(configOrUrl, config);
|
|
2038
|
+
} catch (err) {
|
|
2039
|
+
if (err instanceof Error) {
|
|
2040
|
+
let dummy = {};
|
|
2041
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
2042
|
+
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
|
|
2043
|
+
try {
|
|
2044
|
+
if (!err.stack) {
|
|
2045
|
+
err.stack = stack;
|
|
2046
|
+
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
|
|
2047
|
+
err.stack += "\n" + stack;
|
|
2048
|
+
}
|
|
2049
|
+
} catch (e) {
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
throw err;
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
_request(configOrUrl, config) {
|
|
2056
|
+
if (typeof configOrUrl === "string") {
|
|
2057
|
+
config = config || {};
|
|
2058
|
+
config.url = configOrUrl;
|
|
2059
|
+
} else {
|
|
2060
|
+
config = configOrUrl || {};
|
|
2061
|
+
}
|
|
2062
|
+
config = mergeConfig$1(this.defaults, config);
|
|
2063
|
+
const { transitional: transitional2, paramsSerializer, headers } = config;
|
|
2064
|
+
if (transitional2 !== void 0) {
|
|
2065
|
+
validator.assertOptions(transitional2, {
|
|
2066
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
2067
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
2068
|
+
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
2069
|
+
}, false);
|
|
2070
|
+
}
|
|
2071
|
+
if (paramsSerializer != null) {
|
|
2072
|
+
if (utils$1.isFunction(paramsSerializer)) {
|
|
2073
|
+
config.paramsSerializer = {
|
|
2074
|
+
serialize: paramsSerializer
|
|
2075
|
+
};
|
|
2076
|
+
} else {
|
|
2077
|
+
validator.assertOptions(paramsSerializer, {
|
|
2078
|
+
encode: validators.function,
|
|
2079
|
+
serialize: validators.function
|
|
2080
|
+
}, true);
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
if (config.allowAbsoluteUrls !== void 0) ;
|
|
2084
|
+
else if (this.defaults.allowAbsoluteUrls !== void 0) {
|
|
2085
|
+
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
2086
|
+
} else {
|
|
2087
|
+
config.allowAbsoluteUrls = true;
|
|
2088
|
+
}
|
|
2089
|
+
validator.assertOptions(config, {
|
|
2090
|
+
baseUrl: validators.spelling("baseURL"),
|
|
2091
|
+
withXsrfToken: validators.spelling("withXSRFToken")
|
|
2092
|
+
}, true);
|
|
2093
|
+
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
2094
|
+
let contextHeaders = headers && utils$1.merge(
|
|
2095
|
+
headers.common,
|
|
2096
|
+
headers[config.method]
|
|
2097
|
+
);
|
|
2098
|
+
headers && utils$1.forEach(
|
|
2099
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2100
|
+
(method) => {
|
|
2101
|
+
delete headers[method];
|
|
2102
|
+
}
|
|
2103
|
+
);
|
|
2104
|
+
config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
|
|
2105
|
+
const requestInterceptorChain = [];
|
|
2106
|
+
let synchronousRequestInterceptors = true;
|
|
2107
|
+
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
2108
|
+
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
|
|
2109
|
+
return;
|
|
2110
|
+
}
|
|
2111
|
+
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
2112
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
2113
|
+
});
|
|
2114
|
+
const responseInterceptorChain = [];
|
|
2115
|
+
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
2116
|
+
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
2117
|
+
});
|
|
2118
|
+
let promise;
|
|
2119
|
+
let i = 0;
|
|
2120
|
+
let len;
|
|
2121
|
+
if (!synchronousRequestInterceptors) {
|
|
2122
|
+
const chain = [dispatchRequest.bind(this), void 0];
|
|
2123
|
+
chain.unshift(...requestInterceptorChain);
|
|
2124
|
+
chain.push(...responseInterceptorChain);
|
|
2125
|
+
len = chain.length;
|
|
2126
|
+
promise = Promise.resolve(config);
|
|
2127
|
+
while (i < len) {
|
|
2128
|
+
promise = promise.then(chain[i++], chain[i++]);
|
|
2129
|
+
}
|
|
2130
|
+
return promise;
|
|
2131
|
+
}
|
|
2132
|
+
len = requestInterceptorChain.length;
|
|
2133
|
+
let newConfig = config;
|
|
2134
|
+
i = 0;
|
|
2135
|
+
while (i < len) {
|
|
2136
|
+
const onFulfilled = requestInterceptorChain[i++];
|
|
2137
|
+
const onRejected = requestInterceptorChain[i++];
|
|
2138
|
+
try {
|
|
2139
|
+
newConfig = onFulfilled(newConfig);
|
|
2140
|
+
} catch (error) {
|
|
2141
|
+
onRejected.call(this, error);
|
|
2142
|
+
break;
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
try {
|
|
2146
|
+
promise = dispatchRequest.call(this, newConfig);
|
|
2147
|
+
} catch (error) {
|
|
2148
|
+
return Promise.reject(error);
|
|
2149
|
+
}
|
|
2150
|
+
i = 0;
|
|
2151
|
+
len = responseInterceptorChain.length;
|
|
2152
|
+
while (i < len) {
|
|
2153
|
+
promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
|
|
2154
|
+
}
|
|
2155
|
+
return promise;
|
|
2156
|
+
}
|
|
2157
|
+
getUri(config) {
|
|
2158
|
+
config = mergeConfig$1(this.defaults, config);
|
|
2159
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
2160
|
+
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
2161
|
+
}
|
|
2162
|
+
};
|
|
2163
|
+
utils$1.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
2164
|
+
Axios$1.prototype[method] = function(url, config) {
|
|
2165
|
+
return this.request(mergeConfig$1(config || {}, {
|
|
2166
|
+
method,
|
|
2167
|
+
url,
|
|
2168
|
+
data: (config || {}).data
|
|
2169
|
+
}));
|
|
2170
|
+
};
|
|
2171
|
+
});
|
|
2172
|
+
utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
2173
|
+
function generateHTTPMethod(isForm) {
|
|
2174
|
+
return function httpMethod(url, data, config) {
|
|
2175
|
+
return this.request(mergeConfig$1(config || {}, {
|
|
2176
|
+
method,
|
|
2177
|
+
headers: isForm ? {
|
|
2178
|
+
"Content-Type": "multipart/form-data"
|
|
2179
|
+
} : {},
|
|
2180
|
+
url,
|
|
2181
|
+
data
|
|
2182
|
+
}));
|
|
2183
|
+
};
|
|
2184
|
+
}
|
|
2185
|
+
Axios$1.prototype[method] = generateHTTPMethod();
|
|
2186
|
+
Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
2187
|
+
});
|
|
2188
|
+
let CancelToken$1 = class CancelToken {
|
|
2189
|
+
constructor(executor) {
|
|
2190
|
+
if (typeof executor !== "function") {
|
|
2191
|
+
throw new TypeError("executor must be a function.");
|
|
2192
|
+
}
|
|
2193
|
+
let resolvePromise;
|
|
2194
|
+
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
2195
|
+
resolvePromise = resolve;
|
|
2196
|
+
});
|
|
2197
|
+
const token = this;
|
|
2198
|
+
this.promise.then((cancel) => {
|
|
2199
|
+
if (!token._listeners) return;
|
|
2200
|
+
let i = token._listeners.length;
|
|
2201
|
+
while (i-- > 0) {
|
|
2202
|
+
token._listeners[i](cancel);
|
|
2203
|
+
}
|
|
2204
|
+
token._listeners = null;
|
|
2205
|
+
});
|
|
2206
|
+
this.promise.then = (onfulfilled) => {
|
|
2207
|
+
let _resolve;
|
|
2208
|
+
const promise = new Promise((resolve) => {
|
|
2209
|
+
token.subscribe(resolve);
|
|
2210
|
+
_resolve = resolve;
|
|
2211
|
+
}).then(onfulfilled);
|
|
2212
|
+
promise.cancel = function reject() {
|
|
2213
|
+
token.unsubscribe(_resolve);
|
|
2214
|
+
};
|
|
2215
|
+
return promise;
|
|
2216
|
+
};
|
|
2217
|
+
executor(function cancel(message, config, request) {
|
|
2218
|
+
if (token.reason) {
|
|
2219
|
+
return;
|
|
2220
|
+
}
|
|
2221
|
+
token.reason = new CanceledError$1(message, config, request);
|
|
2222
|
+
resolvePromise(token.reason);
|
|
2223
|
+
});
|
|
2224
|
+
}
|
|
2225
|
+
/**
|
|
2226
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
2227
|
+
*/
|
|
2228
|
+
throwIfRequested() {
|
|
2229
|
+
if (this.reason) {
|
|
2230
|
+
throw this.reason;
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
/**
|
|
2234
|
+
* Subscribe to the cancel signal
|
|
2235
|
+
*/
|
|
2236
|
+
subscribe(listener) {
|
|
2237
|
+
if (this.reason) {
|
|
2238
|
+
listener(this.reason);
|
|
2239
|
+
return;
|
|
2240
|
+
}
|
|
2241
|
+
if (this._listeners) {
|
|
2242
|
+
this._listeners.push(listener);
|
|
2243
|
+
} else {
|
|
2244
|
+
this._listeners = [listener];
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
/**
|
|
2248
|
+
* Unsubscribe from the cancel signal
|
|
2249
|
+
*/
|
|
2250
|
+
unsubscribe(listener) {
|
|
2251
|
+
if (!this._listeners) {
|
|
2252
|
+
return;
|
|
2253
|
+
}
|
|
2254
|
+
const index = this._listeners.indexOf(listener);
|
|
2255
|
+
if (index !== -1) {
|
|
2256
|
+
this._listeners.splice(index, 1);
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
toAbortSignal() {
|
|
2260
|
+
const controller = new AbortController();
|
|
2261
|
+
const abort = (err) => {
|
|
2262
|
+
controller.abort(err);
|
|
2263
|
+
};
|
|
2264
|
+
this.subscribe(abort);
|
|
2265
|
+
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
|
2266
|
+
return controller.signal;
|
|
2267
|
+
}
|
|
2268
|
+
/**
|
|
2269
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
2270
|
+
* cancels the `CancelToken`.
|
|
2271
|
+
*/
|
|
2272
|
+
static source() {
|
|
2273
|
+
let cancel;
|
|
2274
|
+
const token = new CancelToken(function executor(c) {
|
|
2275
|
+
cancel = c;
|
|
2276
|
+
});
|
|
2277
|
+
return {
|
|
2278
|
+
token,
|
|
2279
|
+
cancel
|
|
2280
|
+
};
|
|
2281
|
+
}
|
|
2282
|
+
};
|
|
2283
|
+
function spread$1(callback) {
|
|
2284
|
+
return function wrap(arr) {
|
|
2285
|
+
return callback.apply(null, arr);
|
|
2286
|
+
};
|
|
2287
|
+
}
|
|
2288
|
+
function isAxiosError$1(payload) {
|
|
2289
|
+
return utils$1.isObject(payload) && payload.isAxiosError === true;
|
|
2290
|
+
}
|
|
2291
|
+
const HttpStatusCode$1 = {
|
|
2292
|
+
Continue: 100,
|
|
2293
|
+
SwitchingProtocols: 101,
|
|
2294
|
+
Processing: 102,
|
|
2295
|
+
EarlyHints: 103,
|
|
2296
|
+
Ok: 200,
|
|
2297
|
+
Created: 201,
|
|
2298
|
+
Accepted: 202,
|
|
2299
|
+
NonAuthoritativeInformation: 203,
|
|
2300
|
+
NoContent: 204,
|
|
2301
|
+
ResetContent: 205,
|
|
2302
|
+
PartialContent: 206,
|
|
2303
|
+
MultiStatus: 207,
|
|
2304
|
+
AlreadyReported: 208,
|
|
2305
|
+
ImUsed: 226,
|
|
2306
|
+
MultipleChoices: 300,
|
|
2307
|
+
MovedPermanently: 301,
|
|
2308
|
+
Found: 302,
|
|
2309
|
+
SeeOther: 303,
|
|
2310
|
+
NotModified: 304,
|
|
2311
|
+
UseProxy: 305,
|
|
2312
|
+
Unused: 306,
|
|
2313
|
+
TemporaryRedirect: 307,
|
|
2314
|
+
PermanentRedirect: 308,
|
|
2315
|
+
BadRequest: 400,
|
|
2316
|
+
Unauthorized: 401,
|
|
2317
|
+
PaymentRequired: 402,
|
|
2318
|
+
Forbidden: 403,
|
|
2319
|
+
NotFound: 404,
|
|
2320
|
+
MethodNotAllowed: 405,
|
|
2321
|
+
NotAcceptable: 406,
|
|
2322
|
+
ProxyAuthenticationRequired: 407,
|
|
2323
|
+
RequestTimeout: 408,
|
|
2324
|
+
Conflict: 409,
|
|
2325
|
+
Gone: 410,
|
|
2326
|
+
LengthRequired: 411,
|
|
2327
|
+
PreconditionFailed: 412,
|
|
2328
|
+
PayloadTooLarge: 413,
|
|
2329
|
+
UriTooLong: 414,
|
|
2330
|
+
UnsupportedMediaType: 415,
|
|
2331
|
+
RangeNotSatisfiable: 416,
|
|
2332
|
+
ExpectationFailed: 417,
|
|
2333
|
+
ImATeapot: 418,
|
|
2334
|
+
MisdirectedRequest: 421,
|
|
2335
|
+
UnprocessableEntity: 422,
|
|
2336
|
+
Locked: 423,
|
|
2337
|
+
FailedDependency: 424,
|
|
2338
|
+
TooEarly: 425,
|
|
2339
|
+
UpgradeRequired: 426,
|
|
2340
|
+
PreconditionRequired: 428,
|
|
2341
|
+
TooManyRequests: 429,
|
|
2342
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
2343
|
+
UnavailableForLegalReasons: 451,
|
|
2344
|
+
InternalServerError: 500,
|
|
2345
|
+
NotImplemented: 501,
|
|
2346
|
+
BadGateway: 502,
|
|
2347
|
+
ServiceUnavailable: 503,
|
|
2348
|
+
GatewayTimeout: 504,
|
|
2349
|
+
HttpVersionNotSupported: 505,
|
|
2350
|
+
VariantAlsoNegotiates: 506,
|
|
2351
|
+
InsufficientStorage: 507,
|
|
2352
|
+
LoopDetected: 508,
|
|
2353
|
+
NotExtended: 510,
|
|
2354
|
+
NetworkAuthenticationRequired: 511
|
|
2355
|
+
};
|
|
2356
|
+
Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
|
|
2357
|
+
HttpStatusCode$1[value] = key;
|
|
2358
|
+
});
|
|
2359
|
+
function createInstance(defaultConfig) {
|
|
2360
|
+
const context = new Axios$1(defaultConfig);
|
|
2361
|
+
const instance = bind(Axios$1.prototype.request, context);
|
|
2362
|
+
utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
|
|
2363
|
+
utils$1.extend(instance, context, null, { allOwnKeys: true });
|
|
2364
|
+
instance.create = function create(instanceConfig) {
|
|
2365
|
+
return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
|
|
2366
|
+
};
|
|
2367
|
+
return instance;
|
|
2368
|
+
}
|
|
2369
|
+
const axios = createInstance(defaults);
|
|
2370
|
+
axios.Axios = Axios$1;
|
|
2371
|
+
axios.CanceledError = CanceledError$1;
|
|
2372
|
+
axios.CancelToken = CancelToken$1;
|
|
2373
|
+
axios.isCancel = isCancel$1;
|
|
2374
|
+
axios.VERSION = VERSION$1;
|
|
2375
|
+
axios.toFormData = toFormData$1;
|
|
2376
|
+
axios.AxiosError = AxiosError$1;
|
|
2377
|
+
axios.Cancel = axios.CanceledError;
|
|
2378
|
+
axios.all = function all(promises) {
|
|
2379
|
+
return Promise.all(promises);
|
|
2380
|
+
};
|
|
2381
|
+
axios.spread = spread$1;
|
|
2382
|
+
axios.isAxiosError = isAxiosError$1;
|
|
2383
|
+
axios.mergeConfig = mergeConfig$1;
|
|
2384
|
+
axios.AxiosHeaders = AxiosHeaders$1;
|
|
2385
|
+
axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
2386
|
+
axios.getAdapter = adapters.getAdapter;
|
|
2387
|
+
axios.HttpStatusCode = HttpStatusCode$1;
|
|
2388
|
+
axios.default = axios;
|
|
2389
|
+
const {
|
|
2390
|
+
Axios: Axios2,
|
|
2391
|
+
AxiosError,
|
|
2392
|
+
CanceledError,
|
|
2393
|
+
isCancel,
|
|
2394
|
+
CancelToken: CancelToken2,
|
|
2395
|
+
VERSION,
|
|
2396
|
+
all: all2,
|
|
2397
|
+
Cancel,
|
|
2398
|
+
isAxiosError,
|
|
2399
|
+
spread,
|
|
2400
|
+
toFormData,
|
|
2401
|
+
AxiosHeaders: AxiosHeaders2,
|
|
2402
|
+
HttpStatusCode,
|
|
2403
|
+
formToJSON,
|
|
2404
|
+
getAdapter,
|
|
2405
|
+
mergeConfig
|
|
2406
|
+
} = axios;
|
|
2407
|
+
const API_NAME = {
|
|
2408
|
+
fetchLiveList: "get_live_list",
|
|
2409
|
+
destroyRoom: "destroy_room",
|
|
2410
|
+
getRoomInfo: "get_room_info"
|
|
2411
|
+
};
|
|
2412
|
+
const fetchLiveList = async (baseUrl, data) => {
|
|
2413
|
+
return await sendRequest(baseUrl, API_NAME.fetchLiveList, data);
|
|
2414
|
+
};
|
|
2415
|
+
const destroyRoom = async (baseUrl, data) => {
|
|
2416
|
+
return await sendRequest(baseUrl, API_NAME.destroyRoom, data);
|
|
2417
|
+
};
|
|
2418
|
+
const getRoomInfo = async (baseUrl, data) => {
|
|
2419
|
+
return await sendRequest(baseUrl, API_NAME.getRoomInfo, data);
|
|
2420
|
+
};
|
|
2421
|
+
const sendRequest = async (baseUrl, interfaceName, data) => {
|
|
2422
|
+
const result = await axios.post(`${baseUrl}/${interfaceName}`, data);
|
|
2423
|
+
return {
|
|
2424
|
+
code: result.data.ErrorCode,
|
|
2425
|
+
data: result.data.ErrorCode === 0 ? result.data.Response : result.data.ErrorInfo
|
|
2426
|
+
};
|
|
2427
|
+
};
|
|
2428
|
+
export {
|
|
2429
|
+
destroyRoom,
|
|
2430
|
+
fetchLiveList,
|
|
2431
|
+
getRoomInfo
|
|
2432
|
+
};
|