mario-core 3.0.8-admin → 3.0.8-es
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Dashboard-DiUm-pc-.js +186 -0
- package/dist/Dashboard-HV1eiElu.cjs +1 -0
- package/dist/EmailTemplateDetail-D0D3bpWO.cjs +1 -0
- package/dist/EmailTemplateDetail-KvZuTCLF.js +411 -0
- package/dist/EmailTemplateList-B3YqSFaY.js +172 -0
- package/dist/EmailTemplateList-BAejgUUG.cjs +1 -0
- package/dist/FaqList-D5XugT5h.js +320 -0
- package/dist/FaqList-DpUzQ2vq.cjs +1 -0
- package/dist/GalleryList-B5QA3Rol.cjs +1 -0
- package/dist/GalleryList-CTo33BcT.js +53 -0
- package/dist/Login-CHAmP5ek.js +897 -0
- package/dist/Login-Cxbto5eM.cjs +1 -0
- package/dist/NotificationList-2Mf_NsOP.js +3631 -0
- package/dist/NotificationList-D1jMOBwH.cjs +8 -0
- package/dist/SchoolList-CClJ_UPT.cjs +1 -0
- package/dist/SchoolList-JmrmL2zE.js +5 -0
- package/dist/SkillList-BMyhRY78.js +406 -0
- package/dist/SkillList-DlMx_Evw.cjs +1 -0
- package/dist/TeacherSelector-B4zvSVhk.js +71 -0
- package/dist/TeacherSelector-DORi8RIb.cjs +1 -0
- package/dist/TheContent-BHmlooLu.cjs +1 -0
- package/dist/TheContent-V2T-Pqz8.js +38 -0
- package/dist/UserContainer-B-4oVOEp.cjs +1 -0
- package/dist/UserContainer-BaHMryYI.js +2337 -0
- package/dist/UserDetail-B-Mq_itT.cjs +1 -0
- package/dist/UserDetail-BBRiU97G.js +665 -0
- package/dist/assets/Images.d.ts +14 -14
- package/dist/components/Alerts/CommonAlert.d.ts +3 -3
- package/dist/components/Alerts/EmptyDataAlert.d.ts +8 -8
- package/dist/components/Alerts/ErrorHandler.d.ts +6 -6
- package/dist/components/Buttons/AddButton.d.ts +8 -7
- package/dist/components/Buttons/AddButtonIcon.d.ts +6 -6
- package/dist/components/Buttons/CloseButton.d.ts +8 -8
- package/dist/components/Buttons/DeleteButtonIcon.d.ts +6 -6
- package/dist/components/Buttons/DetailActionButtons.d.ts +9 -8
- package/dist/components/Buttons/EditButtonIcon.d.ts +6 -6
- package/dist/components/Buttons/LinkEditButton.d.ts +8 -7
- package/dist/components/Buttons/LoginNavButton.d.ts +8 -8
- package/dist/components/Buttons/ToggleButton.d.ts +10 -10
- package/dist/components/Buttons/UploadFileButton.d.ts +13 -13
- package/dist/components/Headers/CommonHeader.d.ts +7 -7
- package/dist/components/Image/UploadImage.d.ts +2 -3
- package/dist/components/Inputs/FileInput.d.ts +8 -8
- package/dist/components/Inputs/PasswordInput.d.ts +8 -8
- package/dist/components/Inputs/SearchBox.d.ts +10 -10
- package/dist/components/Inputs/SearchBoxContainer.d.ts +9 -10
- package/dist/components/Labels/RequiredLabel.d.ts +6 -6
- package/dist/components/Loading/Loading.d.ts +3 -3
- package/dist/components/Modals/CommonModal.d.ts +2 -3
- package/dist/components/Modals/NotificationLogoutModal.d.ts +2 -0
- package/dist/components/Modals/NotificationModal.d.ts +2 -3
- package/dist/components/Others/QuitPrompt.d.ts +5 -2
- package/dist/components/Pagination/CustomPagination.d.ts +2 -3
- package/dist/components/Scroll/ScrollToTop.d.ts +3 -3
- package/dist/components/Selectors/AcademicClassSelector.d.ts +2 -3
- package/dist/components/Selectors/CreatableSelector.d.ts +2 -3
- package/dist/components/Selectors/CustomSelector.d.ts +2 -3
- package/dist/components/Selectors/MailCategorySelectors.d.ts +2 -3
- package/dist/components/Selectors/QuestionCategorySelector.d.ts +2 -3
- package/dist/components/Selectors/QuestionTypeSelector.d.ts +2 -3
- package/dist/components/Selectors/StarRatingSelector.d.ts +2 -3
- package/dist/components/Selectors/SuggestionCategorySelector.d.ts +2 -3
- package/dist/components/Tabs/CustomTab.d.ts +2 -3
- package/dist/components/Tabs/TabsWithComponent.d.ts +10 -0
- package/dist/configs/editorConfig.d.ts +7 -7
- package/dist/containers/Commons/NotFound.d.ts +3 -3
- package/dist/containers/DistrictSchools/views/SchoolList.d.ts +3 -3
- package/dist/containers/EmailTemplate/components/AttachmentFile.d.ts +8 -7
- package/dist/containers/EmailTemplate/components/MailParam.d.ts +8 -7
- package/dist/containers/EmailTemplate/configs/emailTemplateSchema.d.ts +13 -13
- package/dist/containers/EmailTemplate/hooks/useEmailTemplateDetail.d.ts +27 -28
- package/dist/containers/EmailTemplate/hooks/useEmailTemplateList.d.ts +11 -11
- package/dist/containers/EmailTemplate/views/EmailTemplateDetail.d.ts +3 -3
- package/dist/containers/EmailTemplate/views/EmailTemplateList.d.ts +3 -3
- package/dist/containers/Faq/components/FaqDetailModal.d.ts +2 -3
- package/dist/containers/Faq/hooks/useFaqDetail.d.ts +17 -18
- package/dist/containers/Faq/hooks/useFaqList.d.ts +9 -9
- package/dist/containers/Faq/views/FaqList.d.ts +3 -3
- package/dist/containers/Gallery/components/ActionModal.d.ts +2 -3
- package/dist/containers/Gallery/components/Filter.d.ts +9 -8
- package/dist/containers/Gallery/components/Media.d.ts +9 -8
- package/dist/containers/Gallery/components/MediaDetail.d.ts +7 -7
- package/dist/containers/Gallery/components/MediaList.d.ts +7 -7
- package/dist/containers/Gallery/components/MediaNav.d.ts +19 -18
- package/dist/containers/Gallery/constants/gallery.types.d.ts +21 -21
- package/dist/containers/Gallery/extensions/helpers.d.ts +4 -4
- package/dist/containers/Gallery/hooks/useGalleryList.d.ts +30 -31
- package/dist/containers/Gallery/views/GalleryList.d.ts +6 -6
- package/dist/containers/Login/components/GoogleLoginButton.d.ts +10 -0
- package/dist/containers/Login/constant/authConfig.d.ts +38 -0
- package/dist/containers/Login/constant/types.d.ts +27 -0
- package/dist/containers/Login/hooks/useForgotPassword.d.ts +20 -21
- package/dist/containers/Login/hooks/useLogin.d.ts +26 -23
- package/dist/containers/Login/hooks/useLoginTwoFactor.d.ts +4 -4
- package/dist/containers/Login/views/Dashboard.d.ts +3 -3
- package/dist/containers/Login/views/Login.d.ts +8 -9
- package/dist/containers/Login/views/block/BlockBackground.d.ts +7 -0
- package/dist/containers/Login/views/block/BlockForgetPassword.d.ts +6 -3
- package/dist/containers/Login/views/block/BlockLogin.d.ts +9 -7
- package/dist/containers/Login/views/block/BlockResetPassword.d.ts +2 -3
- package/dist/containers/Login/views/block/BlockSelectTeacher.d.ts +11 -12
- package/dist/containers/Login/views/block/BlockTwoFactorLogin.d.ts +2 -3
- package/dist/containers/Login/views/block/CloseBlock.d.ts +6 -6
- package/dist/containers/Login/views/block/ContentHomePage.d.ts +5 -5
- package/dist/containers/Login/views/block/IconContent.d.ts +7 -7
- package/dist/containers/Login/views/block/QuoteContent.d.ts +2 -3
- package/dist/containers/Notifications/components/NotificationButton.d.ts +5 -5
- package/dist/containers/Notifications/components/NotificationStatusSelector.d.ts +6 -7
- package/dist/containers/Notifications/hooks/useNotificationList.d.ts +17 -17
- package/dist/containers/Notifications/hooks/useUnreadNotification.d.ts +4 -4
- package/dist/containers/Notifications/views/NotificationList.d.ts +2 -3
- package/dist/containers/Skill/components/SkillDetailModal.d.ts +2 -3
- package/dist/containers/Skill/components/SkillSelector.d.ts +2 -3
- package/dist/containers/Skill/hooks/useSkillDetail.d.ts +19 -20
- package/dist/containers/Skill/hooks/useSkillList.d.ts +10 -9
- package/dist/containers/Skill/views/SkillList.d.ts +3 -3
- package/dist/containers/User/components/AssignStudentModal.d.ts +19 -0
- package/dist/containers/User/components/DeleteBulkModel.d.ts +3 -0
- package/dist/containers/User/components/FilterPopover.d.ts +21 -0
- package/dist/containers/User/components/HeaderCell.d.ts +19 -0
- package/dist/containers/User/components/RemoveAssistant.d.ts +3 -0
- package/dist/containers/User/components/RemoveCounselor.d.ts +3 -0
- package/dist/containers/User/components/RemoveTeacher.d.ts +3 -0
- package/dist/containers/User/components/TableHeader.d.ts +14 -0
- package/dist/containers/User/components/TeacherSelector.d.ts +2 -0
- package/dist/containers/User/configs/changePasswordSchema.d.ts +11 -10
- package/dist/containers/User/configs/constants.d.ts +62 -0
- package/dist/containers/User/configs/type.d.ts +210 -0
- package/dist/containers/User/configs/userSchema.d.ts +15 -15
- package/dist/containers/User/hooks/useAssignStudent.d.ts +33 -0
- package/dist/containers/User/hooks/useAssignStudentList.d.ts +33 -0
- package/dist/containers/User/hooks/useAssistantList.d.ts +9 -0
- package/dist/containers/User/hooks/useClickOutside.d.ts +2 -0
- package/dist/containers/User/hooks/useCounselorList.d.ts +9 -0
- package/dist/containers/User/hooks/useFilterPopover.d.ts +36 -0
- package/dist/containers/User/hooks/useTableHeader.d.ts +19 -0
- package/dist/containers/User/hooks/useTeacherList.d.ts +9 -0
- package/dist/containers/User/hooks/useUserDetail.d.ts +31 -24
- package/dist/containers/User/hooks/useUserList.d.ts +14 -11
- package/dist/containers/User/hooks/userFilters.d.ts +7 -0
- package/dist/containers/User/views/AssignStudentList.d.ts +2 -0
- package/dist/containers/User/views/UserContainer.d.ts +2 -0
- package/dist/containers/User/views/UserDetail.d.ts +2 -3
- package/dist/containers/User/views/UserList.d.ts +2 -3
- package/dist/hooks/useClassFontSize.d.ts +4 -0
- package/dist/hooks/useFilters.d.ts +7 -8
- package/dist/i18n.d.ts +2 -2
- package/dist/index-C95SWLrn.js +18163 -0
- package/dist/index-DixwqZ17.cjs +29 -0
- package/dist/index.d.ts +111 -110
- package/dist/index.esm-BckW25l9.cjs +1 -0
- package/dist/index.esm-hqKUWCW0.js +15 -0
- package/dist/index.js +1 -10373
- package/dist/index.modern.js +159 -10213
- package/dist/layouts/TheContent.d.ts +3 -3
- package/dist/mailCategoryService-BqDtPJRc.js +10 -0
- package/dist/mailCategoryService-DBMJOyls.cjs +1 -0
- package/dist/mario-core.css +5 -0
- package/dist/redux/assessments/action.d.ts +1 -1
- package/dist/redux/assessments/reducer.d.ts +10 -5
- package/dist/redux/assignment/action.d.ts +1 -1
- package/dist/redux/assignment/reducer.d.ts +4 -2
- package/dist/redux/assistants/action.d.ts +1 -1
- package/dist/redux/assistants/reducer.d.ts +4 -2
- package/dist/redux/badges/action.d.ts +1 -1
- package/dist/redux/badges/reducer.d.ts +4 -2
- package/dist/redux/bandScores/action.d.ts +1 -1
- package/dist/redux/bandScores/reducer.d.ts +4 -2
- package/dist/redux/certificate/action.d.ts +1 -1
- package/dist/redux/certificate/reducer.d.ts +4 -2
- package/dist/redux/classes/action.d.ts +1 -1
- package/dist/redux/classes/reducer.d.ts +4 -2
- package/dist/redux/commons/action.d.ts +18 -18
- package/dist/redux/commons/reducer.d.ts +4 -2
- package/dist/redux/conferenceRubrics/action.d.ts +1 -1
- package/dist/redux/conferenceRubrics/reducer.d.ts +4 -2
- package/dist/redux/customAlert/action.d.ts +1 -1
- package/dist/redux/customAlert/reducer.d.ts +4 -2
- package/dist/redux/dashboard/action.d.ts +5 -5
- package/dist/redux/dashboard/reducer.d.ts +4 -2
- package/dist/redux/dataPlayer/action.d.ts +2 -2
- package/dist/redux/dataPlayer/reducer.d.ts +4 -2
- package/dist/redux/emailTemplates/action.d.ts +1 -1
- package/dist/redux/emailTemplates/reducer.d.ts +4 -2
- package/dist/redux/faqs/action.d.ts +1 -1
- package/dist/redux/faqs/reducer.d.ts +4 -2
- package/dist/redux/feedback/action.d.ts +1 -1
- package/dist/redux/feedback/reducer.d.ts +4 -2
- package/dist/redux/gallery/action.d.ts +2 -2
- package/dist/redux/gallery/reducer.d.ts +4 -2
- package/dist/redux/goalExamples/action.d.ts +1 -1
- package/dist/redux/goalExamples/reducer.d.ts +4 -2
- package/dist/redux/improveMyClass/action.d.ts +1 -1
- package/dist/redux/improveMyClass/reducer.d.ts +4 -2
- package/dist/redux/learningStrategies/action.d.ts +1 -1
- package/dist/redux/learningStrategies/reducer.d.ts +4 -2
- package/dist/redux/learningSupportCategories/action.d.ts +1 -1
- package/dist/redux/learningSupportCategories/reducer.d.ts +4 -2
- package/dist/redux/mailCategories/action.d.ts +1 -1
- package/dist/redux/mailCategories/reducer.d.ts +4 -2
- package/dist/redux/navMobile/action.d.ts +1 -1
- package/dist/redux/navMobile/reducer.d.ts +4 -2
- package/dist/redux/notifications/action.d.ts +3 -3
- package/dist/redux/notifications/reducer.d.ts +4 -2
- package/dist/redux/questionBanks/action.d.ts +1 -1
- package/dist/redux/questionBanks/reducer.d.ts +4 -2
- package/dist/redux/questionByCategory/action.d.ts +8 -8
- package/dist/redux/questionByCategory/reducer.d.ts +4 -2
- package/dist/redux/questionCategory/action.d.ts +1 -1
- package/dist/redux/questionCategory/reducer.d.ts +4 -2
- package/dist/redux/reflectionForms/action.d.ts +1 -1
- package/dist/redux/reflectionForms/reducer.d.ts +4 -2
- package/dist/redux/reflectionResults/action.d.ts +1 -1
- package/dist/redux/reflectionResults/reducer.d.ts +4 -2
- package/dist/redux/schoolBlankDays/action.d.ts +1 -1
- package/dist/redux/schoolBlankDays/reducer.d.ts +4 -2
- package/dist/redux/semester/action.d.ts +1 -1
- package/dist/redux/semester/reducer.d.ts +4 -2
- package/dist/redux/sessionPlayers/action.d.ts +5 -5
- package/dist/redux/sessionPlayers/reducer.d.ts +4 -2
- package/dist/redux/sessionTemplateGeneralClasses/action.d.ts +1 -1
- package/dist/redux/sessionTemplateGeneralClasses/reducer.d.ts +4 -2
- package/dist/redux/sessionTemplates/action.d.ts +1 -1
- package/dist/redux/sessionTemplates/reducer.d.ts +4 -2
- package/dist/redux/skills/action.d.ts +1 -1
- package/dist/redux/skills/reducer.d.ts +4 -2
- package/dist/redux/subjects/action.d.ts +1 -1
- package/dist/redux/subjects/reducer.d.ts +4 -2
- package/dist/redux/suggestionBanks/action.d.ts +1 -1
- package/dist/redux/suggestionBanks/reducer.d.ts +4 -2
- package/dist/redux/teacher/myStudent/action.d.ts +1 -1
- package/dist/redux/teacher/myStudent/reducer.d.ts +4 -2
- package/dist/redux/tutorialScreen/action.d.ts +1 -1
- package/dist/redux/tutorialScreen/reducer.d.ts +10 -5
- package/dist/redux/users/action.d.ts +2 -2
- package/dist/redux/users/reducer.d.ts +4 -2
- package/dist/redux/widget/action.d.ts +1 -1
- package/dist/redux/widget/reducer.d.ts +4 -2
- package/dist/rootReducer.d.ts +96 -49
- package/dist/services/accountService.d.ts +13 -12
- package/dist/services/api.d.ts +3 -3
- package/dist/services/classService.d.ts +1 -1
- package/dist/services/emailTemplateService.d.ts +6 -6
- package/dist/services/faqService.d.ts +6 -6
- package/dist/services/fileServices.d.ts +13 -13
- package/dist/services/galleryService.d.ts +2 -2
- package/dist/services/languageService.d.ts +1 -0
- package/dist/services/mailCategoryService.d.ts +1 -1
- package/dist/services/notificationService.d.ts +7 -7
- package/dist/services/questionCategoryService.d.ts +1 -1
- package/dist/services/schoolService.d.ts +1 -0
- package/dist/services/skillService.d.ts +6 -6
- package/dist/services/suggestionCategoryService.d.ts +1 -1
- package/dist/services/userService.d.ts +21 -9
- package/dist/store.d.ts +3 -3
- package/dist/types/Conversation.d.ts +8 -8
- package/dist/types/ConversationMember.d.ts +5 -5
- package/dist/types/Dashboard.d.ts +5 -5
- package/dist/types/Filter.d.ts +10 -10
- package/dist/types/Language.d.ts +8 -0
- package/dist/types/Message.d.ts +13 -13
- package/dist/types/Notification.d.ts +8 -8
- package/dist/utils/canAccessRoute.d.ts +2 -2
- package/dist/utils/constants.d.ts +77 -67
- package/dist/utils/debounce.d.ts +2 -2
- package/dist/utils/domHelpers.d.ts +2 -2
- package/dist/utils/encodeParams.d.ts +2 -2
- package/dist/utils/firstCheckToken.d.ts +2 -2
- package/dist/utils/generateRandomString.d.ts +2 -2
- package/dist/utils/getAccessToken.d.ts +2 -2
- package/dist/utils/getCookieValue.d.ts +2 -0
- package/dist/utils/getFileUrl.d.ts +2 -2
- package/dist/utils/getStaticFileUrl.d.ts +2 -0
- package/dist/utils/getTextFromHTML.d.ts +2 -2
- package/dist/utils/utcToLocalTime.d.ts +2 -2
- package/package.json +68 -77
- package/dist/components/Alerts/ReactNotification.d.ts +0 -4
- package/dist/containers/Login/constant/type.d.ts +0 -5
- package/dist/containers/Login/views/ModelSelectRole.d.ts +0 -4
- package/dist/index.css +0 -658
- package/dist/index.js.map +0 -1
- package/dist/index.modern.js.map +0 -1
- package/dist/index.test.d.ts +0 -1
- package/dist/layouts/TheFooter.d.ts +0 -3
- package/dist/layouts/TheHeader.d.ts +0 -3
- package/dist/layouts/TheHeaderDropdown.d.ts +0 -3
- package/dist/layouts/TheLanguageDropdown.d.ts +0 -3
- package/dist/layouts/TheLayout.d.ts +0 -4
- package/dist/layouts/TheSidebar.d.ts +0 -3
- package/dist/types/Payload.d.ts +0 -15
- package/dist/utils/amplitude.d.ts +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ut=require("react/jsx-runtime"),ee=require("reactstrap"),wn=require("./index.esm-BckW25l9.cjs"),Ut=require("./index-DixwqZ17.cjs"),le=require("react"),ve=require("react-redux");function Sn(gt){return gt&>.__esModule&&Object.prototype.hasOwnProperty.call(gt,"default")?gt.default:gt}const Cn=[{value:!0,label:"Read"},{value:!1,label:"Unread"}],Tn=({value:gt,onChange:ie})=>{const Ft={menu:Wt=>({...Wt,zIndex:10})};return ut.jsx(Ut.CustomSelector,{defaultValue:gt,options:Cn,onChange:ie,styles:Ft})},En=le.memo(Tn);var dr={exports:{}};/*!
|
|
2
|
+
* Pusher JavaScript Library v8.5.0
|
|
3
|
+
* https://pusher.com/
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2020, Pusher
|
|
6
|
+
* Released under the MIT licence.
|
|
7
|
+
*/var kr;function An(){return kr||(kr=1,(function(gt,ie){(function(Wt,Kt){gt.exports=Kt()})(self,()=>(()=>{var Ft={594(Ct,ht){var D=this&&this.__extends||(function(){var B=function(w,L){return B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,xt){J.__proto__=xt}||function(J,xt){for(var Et in xt)xt.hasOwnProperty(Et)&&(J[Et]=xt[Et])},B(w,L)};return function(w,L){B(w,L);function J(){this.constructor=w}w.prototype=L===null?Object.create(L):(J.prototype=L.prototype,new J)}})();Object.defineProperty(ht,"__esModule",{value:!0});var E=256,C=(function(){function B(w){w===void 0&&(w="="),this._paddingCharacter=w}return B.prototype.encodedLength=function(w){return this._paddingCharacter?(w+2)/3*4|0:(w*8+5)/6|0},B.prototype.encode=function(w){for(var L="",J=0;J<w.length-2;J+=3){var xt=w[J]<<16|w[J+1]<<8|w[J+2];L+=this._encodeByte(xt>>>18&63),L+=this._encodeByte(xt>>>12&63),L+=this._encodeByte(xt>>>6&63),L+=this._encodeByte(xt>>>0&63)}var Et=w.length-J;if(Et>0){var xt=w[J]<<16|(Et===2?w[J+1]<<8:0);L+=this._encodeByte(xt>>>18&63),L+=this._encodeByte(xt>>>12&63),Et===2?L+=this._encodeByte(xt>>>6&63):L+=this._paddingCharacter||"",L+=this._paddingCharacter||""}return L},B.prototype.maxDecodedLength=function(w){return this._paddingCharacter?w/4*3|0:(w*6+7)/8|0},B.prototype.decodedLength=function(w){return this.maxDecodedLength(w.length-this._getPaddingLength(w))},B.prototype.decode=function(w){if(w.length===0)return new Uint8Array(0);for(var L=this._getPaddingLength(w),J=w.length-L,xt=new Uint8Array(this.maxDecodedLength(J)),Et=0,Nt=0,Dt=0,re=0,Xt=0,It=0,Gt=0;Nt<J-4;Nt+=4)re=this._decodeChar(w.charCodeAt(Nt+0)),Xt=this._decodeChar(w.charCodeAt(Nt+1)),It=this._decodeChar(w.charCodeAt(Nt+2)),Gt=this._decodeChar(w.charCodeAt(Nt+3)),xt[Et++]=re<<2|Xt>>>4,xt[Et++]=Xt<<4|It>>>2,xt[Et++]=It<<6|Gt,Dt|=re&E,Dt|=Xt&E,Dt|=It&E,Dt|=Gt&E;if(Nt<J-1&&(re=this._decodeChar(w.charCodeAt(Nt)),Xt=this._decodeChar(w.charCodeAt(Nt+1)),xt[Et++]=re<<2|Xt>>>4,Dt|=re&E,Dt|=Xt&E),Nt<J-2&&(It=this._decodeChar(w.charCodeAt(Nt+2)),xt[Et++]=Xt<<4|It>>>2,Dt|=It&E),Nt<J-3&&(Gt=this._decodeChar(w.charCodeAt(Nt+3)),xt[Et++]=It<<6|Gt,Dt|=Gt&E),Dt!==0)throw new Error("Base64Coder: incorrect characters for decoding");return xt},B.prototype._encodeByte=function(w){var L=w;return L+=65,L+=25-w>>>8&6,L+=51-w>>>8&-75,L+=61-w>>>8&-15,L+=62-w>>>8&3,String.fromCharCode(L)},B.prototype._decodeChar=function(w){var L=E;return L+=(42-w&w-44)>>>8&-E+w-43+62,L+=(46-w&w-48)>>>8&-E+w-47+63,L+=(47-w&w-58)>>>8&-E+w-48+52,L+=(64-w&w-91)>>>8&-E+w-65+0,L+=(96-w&w-123)>>>8&-E+w-97+26,L},B.prototype._getPaddingLength=function(w){var L=0;if(this._paddingCharacter){for(var J=w.length-1;J>=0&&w[J]===this._paddingCharacter;J--)L++;if(w.length<4||L>2)throw new Error("Base64Coder: incorrect padding")}return L},B})();ht.Coder=C;var Rt=new C;function et(B){return Rt.encode(B)}ht.encode=et;function lt(B){return Rt.decode(B)}ht.decode=lt;var Bt=(function(B){D(w,B);function w(){return B!==null&&B.apply(this,arguments)||this}return w.prototype._encodeByte=function(L){var J=L;return J+=65,J+=25-L>>>8&6,J+=51-L>>>8&-75,J+=61-L>>>8&-13,J+=62-L>>>8&49,String.fromCharCode(J)},w.prototype._decodeChar=function(L){var J=E;return J+=(44-L&L-46)>>>8&-E+L-45+62,J+=(94-L&L-96)>>>8&-E+L-95+63,J+=(47-L&L-58)>>>8&-E+L-48+52,J+=(64-L&L-91)>>>8&-E+L-65+0,J+=(96-L&L-123)>>>8&-E+L-97+26,J},w})(C);ht.URLSafeCoder=Bt;var wt=new Bt;function nt(B){return wt.encode(B)}ht.encodeURLSafe=nt;function St(B){return wt.decode(B)}ht.decodeURLSafe=St,ht.encodedLength=function(B){return Rt.encodedLength(B)},ht.maxDecodedLength=function(B){return Rt.maxDecodedLength(B)},ht.decodedLength=function(B){return Rt.decodedLength(B)}},978(Ct,ht){var D="utf8: invalid source encoding";function E(C){for(var Rt=[],et=0;et<C.length;et++){var lt=C[et];if(lt&128){var Bt=void 0;if(lt<224){if(et>=C.length)throw new Error(D);var wt=C[++et];if((wt&192)!==128)throw new Error(D);lt=(lt&31)<<6|wt&63,Bt=128}else if(lt<240){if(et>=C.length-1)throw new Error(D);var wt=C[++et],nt=C[++et];if((wt&192)!==128||(nt&192)!==128)throw new Error(D);lt=(lt&15)<<12|(wt&63)<<6|nt&63,Bt=2048}else if(lt<248){if(et>=C.length-2)throw new Error(D);var wt=C[++et],nt=C[++et],St=C[++et];if((wt&192)!==128||(nt&192)!==128||(St&192)!==128)throw new Error(D);lt=(lt&15)<<18|(wt&63)<<12|(nt&63)<<6|St&63,Bt=65536}else throw new Error(D);if(lt<Bt||lt>=55296&<<=57343)throw new Error(D);if(lt>=65536){if(lt>1114111)throw new Error(D);lt-=65536,Rt.push(String.fromCharCode(55296|lt>>10)),lt=56320|lt&1023}}Rt.push(String.fromCharCode(lt))}return Rt.join("")}ht.D4=E},601(Ct,ht,D){(function(E){var C=function(i){var o,s=new Float64Array(16);if(i)for(o=0;o<i.length;o++)s[o]=i[o];return s},Rt=function(){throw new Error("no PRNG")},et=new Uint8Array(16),lt=new Uint8Array(32);lt[0]=9;var Bt=C(),wt=C([1]),nt=C([56129,1]),St=C([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),B=C([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),w=C([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),L=C([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),J=C([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function xt(i,o,s,e){i[o]=s>>24&255,i[o+1]=s>>16&255,i[o+2]=s>>8&255,i[o+3]=s&255,i[o+4]=e>>24&255,i[o+5]=e>>16&255,i[o+6]=e>>8&255,i[o+7]=e&255}function Et(i,o,s,e,a){var u,l=0;for(u=0;u<a;u++)l|=i[o+u]^s[e+u];return(1&l-1>>>8)-1}function Nt(i,o,s,e){return Et(i,o,s,e,16)}function Dt(i,o,s,e){return Et(i,o,s,e,32)}function re(i,o,s,e){for(var a=e[0]&255|(e[1]&255)<<8|(e[2]&255)<<16|(e[3]&255)<<24,u=s[0]&255|(s[1]&255)<<8|(s[2]&255)<<16|(s[3]&255)<<24,l=s[4]&255|(s[5]&255)<<8|(s[6]&255)<<16|(s[7]&255)<<24,b=s[8]&255|(s[9]&255)<<8|(s[10]&255)<<16|(s[11]&255)<<24,_=s[12]&255|(s[13]&255)<<8|(s[14]&255)<<16|(s[15]&255)<<24,O=e[4]&255|(e[5]&255)<<8|(e[6]&255)<<16|(e[7]&255)<<24,k=o[0]&255|(o[1]&255)<<8|(o[2]&255)<<16|(o[3]&255)<<24,at=o[4]&255|(o[5]&255)<<8|(o[6]&255)<<16|(o[7]&255)<<24,R=o[8]&255|(o[9]&255)<<8|(o[10]&255)<<16|(o[11]&255)<<24,H=o[12]&255|(o[13]&255)<<8|(o[14]&255)<<16|(o[15]&255)<<24,z=e[8]&255|(e[9]&255)<<8|(e[10]&255)<<16|(e[11]&255)<<24,G=s[16]&255|(s[17]&255)<<8|(s[18]&255)<<16|(s[19]&255)<<24,K=s[20]&255|(s[21]&255)<<8|(s[22]&255)<<16|(s[23]&255)<<24,q=s[24]&255|(s[25]&255)<<8|(s[26]&255)<<16|(s[27]&255)<<24,X=s[28]&255|(s[29]&255)<<8|(s[30]&255)<<16|(s[31]&255)<<24,F=e[12]&255|(e[13]&255)<<8|(e[14]&255)<<16|(e[15]&255)<<24,A=a,U=u,T=l,N=b,j=_,P=O,d=k,x=at,y=R,g=H,v=z,m=G,M=K,Y=q,V=X,$=F,c,rt=0;rt<20;rt+=2)c=A+M|0,j^=c<<7|c>>>25,c=j+A|0,y^=c<<9|c>>>23,c=y+j|0,M^=c<<13|c>>>19,c=M+y|0,A^=c<<18|c>>>14,c=P+U|0,g^=c<<7|c>>>25,c=g+P|0,Y^=c<<9|c>>>23,c=Y+g|0,U^=c<<13|c>>>19,c=U+Y|0,P^=c<<18|c>>>14,c=v+d|0,V^=c<<7|c>>>25,c=V+v|0,T^=c<<9|c>>>23,c=T+V|0,d^=c<<13|c>>>19,c=d+T|0,v^=c<<18|c>>>14,c=$+m|0,N^=c<<7|c>>>25,c=N+$|0,x^=c<<9|c>>>23,c=x+N|0,m^=c<<13|c>>>19,c=m+x|0,$^=c<<18|c>>>14,c=A+N|0,U^=c<<7|c>>>25,c=U+A|0,T^=c<<9|c>>>23,c=T+U|0,N^=c<<13|c>>>19,c=N+T|0,A^=c<<18|c>>>14,c=P+j|0,d^=c<<7|c>>>25,c=d+P|0,x^=c<<9|c>>>23,c=x+d|0,j^=c<<13|c>>>19,c=j+x|0,P^=c<<18|c>>>14,c=v+g|0,m^=c<<7|c>>>25,c=m+v|0,y^=c<<9|c>>>23,c=y+m|0,g^=c<<13|c>>>19,c=g+y|0,v^=c<<18|c>>>14,c=$+V|0,M^=c<<7|c>>>25,c=M+$|0,Y^=c<<9|c>>>23,c=Y+M|0,V^=c<<13|c>>>19,c=V+Y|0,$^=c<<18|c>>>14;A=A+a|0,U=U+u|0,T=T+l|0,N=N+b|0,j=j+_|0,P=P+O|0,d=d+k|0,x=x+at|0,y=y+R|0,g=g+H|0,v=v+z|0,m=m+G|0,M=M+K|0,Y=Y+q|0,V=V+X|0,$=$+F|0,i[0]=A>>>0&255,i[1]=A>>>8&255,i[2]=A>>>16&255,i[3]=A>>>24&255,i[4]=U>>>0&255,i[5]=U>>>8&255,i[6]=U>>>16&255,i[7]=U>>>24&255,i[8]=T>>>0&255,i[9]=T>>>8&255,i[10]=T>>>16&255,i[11]=T>>>24&255,i[12]=N>>>0&255,i[13]=N>>>8&255,i[14]=N>>>16&255,i[15]=N>>>24&255,i[16]=j>>>0&255,i[17]=j>>>8&255,i[18]=j>>>16&255,i[19]=j>>>24&255,i[20]=P>>>0&255,i[21]=P>>>8&255,i[22]=P>>>16&255,i[23]=P>>>24&255,i[24]=d>>>0&255,i[25]=d>>>8&255,i[26]=d>>>16&255,i[27]=d>>>24&255,i[28]=x>>>0&255,i[29]=x>>>8&255,i[30]=x>>>16&255,i[31]=x>>>24&255,i[32]=y>>>0&255,i[33]=y>>>8&255,i[34]=y>>>16&255,i[35]=y>>>24&255,i[36]=g>>>0&255,i[37]=g>>>8&255,i[38]=g>>>16&255,i[39]=g>>>24&255,i[40]=v>>>0&255,i[41]=v>>>8&255,i[42]=v>>>16&255,i[43]=v>>>24&255,i[44]=m>>>0&255,i[45]=m>>>8&255,i[46]=m>>>16&255,i[47]=m>>>24&255,i[48]=M>>>0&255,i[49]=M>>>8&255,i[50]=M>>>16&255,i[51]=M>>>24&255,i[52]=Y>>>0&255,i[53]=Y>>>8&255,i[54]=Y>>>16&255,i[55]=Y>>>24&255,i[56]=V>>>0&255,i[57]=V>>>8&255,i[58]=V>>>16&255,i[59]=V>>>24&255,i[60]=$>>>0&255,i[61]=$>>>8&255,i[62]=$>>>16&255,i[63]=$>>>24&255}function Xt(i,o,s,e){for(var a=e[0]&255|(e[1]&255)<<8|(e[2]&255)<<16|(e[3]&255)<<24,u=s[0]&255|(s[1]&255)<<8|(s[2]&255)<<16|(s[3]&255)<<24,l=s[4]&255|(s[5]&255)<<8|(s[6]&255)<<16|(s[7]&255)<<24,b=s[8]&255|(s[9]&255)<<8|(s[10]&255)<<16|(s[11]&255)<<24,_=s[12]&255|(s[13]&255)<<8|(s[14]&255)<<16|(s[15]&255)<<24,O=e[4]&255|(e[5]&255)<<8|(e[6]&255)<<16|(e[7]&255)<<24,k=o[0]&255|(o[1]&255)<<8|(o[2]&255)<<16|(o[3]&255)<<24,at=o[4]&255|(o[5]&255)<<8|(o[6]&255)<<16|(o[7]&255)<<24,R=o[8]&255|(o[9]&255)<<8|(o[10]&255)<<16|(o[11]&255)<<24,H=o[12]&255|(o[13]&255)<<8|(o[14]&255)<<16|(o[15]&255)<<24,z=e[8]&255|(e[9]&255)<<8|(e[10]&255)<<16|(e[11]&255)<<24,G=s[16]&255|(s[17]&255)<<8|(s[18]&255)<<16|(s[19]&255)<<24,K=s[20]&255|(s[21]&255)<<8|(s[22]&255)<<16|(s[23]&255)<<24,q=s[24]&255|(s[25]&255)<<8|(s[26]&255)<<16|(s[27]&255)<<24,X=s[28]&255|(s[29]&255)<<8|(s[30]&255)<<16|(s[31]&255)<<24,F=e[12]&255|(e[13]&255)<<8|(e[14]&255)<<16|(e[15]&255)<<24,A=a,U=u,T=l,N=b,j=_,P=O,d=k,x=at,y=R,g=H,v=z,m=G,M=K,Y=q,V=X,$=F,c,rt=0;rt<20;rt+=2)c=A+M|0,j^=c<<7|c>>>25,c=j+A|0,y^=c<<9|c>>>23,c=y+j|0,M^=c<<13|c>>>19,c=M+y|0,A^=c<<18|c>>>14,c=P+U|0,g^=c<<7|c>>>25,c=g+P|0,Y^=c<<9|c>>>23,c=Y+g|0,U^=c<<13|c>>>19,c=U+Y|0,P^=c<<18|c>>>14,c=v+d|0,V^=c<<7|c>>>25,c=V+v|0,T^=c<<9|c>>>23,c=T+V|0,d^=c<<13|c>>>19,c=d+T|0,v^=c<<18|c>>>14,c=$+m|0,N^=c<<7|c>>>25,c=N+$|0,x^=c<<9|c>>>23,c=x+N|0,m^=c<<13|c>>>19,c=m+x|0,$^=c<<18|c>>>14,c=A+N|0,U^=c<<7|c>>>25,c=U+A|0,T^=c<<9|c>>>23,c=T+U|0,N^=c<<13|c>>>19,c=N+T|0,A^=c<<18|c>>>14,c=P+j|0,d^=c<<7|c>>>25,c=d+P|0,x^=c<<9|c>>>23,c=x+d|0,j^=c<<13|c>>>19,c=j+x|0,P^=c<<18|c>>>14,c=v+g|0,m^=c<<7|c>>>25,c=m+v|0,y^=c<<9|c>>>23,c=y+m|0,g^=c<<13|c>>>19,c=g+y|0,v^=c<<18|c>>>14,c=$+V|0,M^=c<<7|c>>>25,c=M+$|0,Y^=c<<9|c>>>23,c=Y+M|0,V^=c<<13|c>>>19,c=V+Y|0,$^=c<<18|c>>>14;i[0]=A>>>0&255,i[1]=A>>>8&255,i[2]=A>>>16&255,i[3]=A>>>24&255,i[4]=P>>>0&255,i[5]=P>>>8&255,i[6]=P>>>16&255,i[7]=P>>>24&255,i[8]=v>>>0&255,i[9]=v>>>8&255,i[10]=v>>>16&255,i[11]=v>>>24&255,i[12]=$>>>0&255,i[13]=$>>>8&255,i[14]=$>>>16&255,i[15]=$>>>24&255,i[16]=d>>>0&255,i[17]=d>>>8&255,i[18]=d>>>16&255,i[19]=d>>>24&255,i[20]=x>>>0&255,i[21]=x>>>8&255,i[22]=x>>>16&255,i[23]=x>>>24&255,i[24]=y>>>0&255,i[25]=y>>>8&255,i[26]=y>>>16&255,i[27]=y>>>24&255,i[28]=g>>>0&255,i[29]=g>>>8&255,i[30]=g>>>16&255,i[31]=g>>>24&255}function It(i,o,s,e){re(i,o,s,e)}function Gt(i,o,s,e){Xt(i,o,s,e)}var se=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function Je(i,o,s,e,a,u,l){var b=new Uint8Array(16),_=new Uint8Array(64),O,k;for(k=0;k<16;k++)b[k]=0;for(k=0;k<8;k++)b[k]=u[k];for(;a>=64;){for(It(_,b,l,se),k=0;k<64;k++)i[o+k]=s[e+k]^_[k];for(O=1,k=8;k<16;k++)O=O+(b[k]&255)|0,b[k]=O&255,O>>>=8;a-=64,o+=64,e+=64}if(a>0)for(It(_,b,l,se),k=0;k<a;k++)i[o+k]=s[e+k]^_[k];return 0}function ae(i,o,s,e,a){var u=new Uint8Array(16),l=new Uint8Array(64),b,_;for(_=0;_<16;_++)u[_]=0;for(_=0;_<8;_++)u[_]=e[_];for(;s>=64;){for(It(l,u,a,se),_=0;_<64;_++)i[o+_]=l[_];for(b=1,_=8;_<16;_++)b=b+(u[_]&255)|0,u[_]=b&255,b>>>=8;s-=64,o+=64}if(s>0)for(It(l,u,a,se),_=0;_<s;_++)i[o+_]=l[_];return 0}function de(i,o,s,e,a){var u=new Uint8Array(32);Gt(u,e,a,se);for(var l=new Uint8Array(8),b=0;b<8;b++)l[b]=e[b+16];return ae(i,o,s,l,u)}function Re(i,o,s,e,a,u,l){var b=new Uint8Array(32);Gt(b,u,l,se);for(var _=new Uint8Array(8),O=0;O<8;O++)_[O]=u[O+16];return Je(i,o,s,e,a,_,b)}var ye=function(i){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var o,s,e,a,u,l,b,_;o=i[0]&255|(i[1]&255)<<8,this.r[0]=o&8191,s=i[2]&255|(i[3]&255)<<8,this.r[1]=(o>>>13|s<<3)&8191,e=i[4]&255|(i[5]&255)<<8,this.r[2]=(s>>>10|e<<6)&7939,a=i[6]&255|(i[7]&255)<<8,this.r[3]=(e>>>7|a<<9)&8191,u=i[8]&255|(i[9]&255)<<8,this.r[4]=(a>>>4|u<<12)&255,this.r[5]=u>>>1&8190,l=i[10]&255|(i[11]&255)<<8,this.r[6]=(u>>>14|l<<2)&8191,b=i[12]&255|(i[13]&255)<<8,this.r[7]=(l>>>11|b<<5)&8065,_=i[14]&255|(i[15]&255)<<8,this.r[8]=(b>>>8|_<<8)&8191,this.r[9]=_>>>5&127,this.pad[0]=i[16]&255|(i[17]&255)<<8,this.pad[1]=i[18]&255|(i[19]&255)<<8,this.pad[2]=i[20]&255|(i[21]&255)<<8,this.pad[3]=i[22]&255|(i[23]&255)<<8,this.pad[4]=i[24]&255|(i[25]&255)<<8,this.pad[5]=i[26]&255|(i[27]&255)<<8,this.pad[6]=i[28]&255|(i[29]&255)<<8,this.pad[7]=i[30]&255|(i[31]&255)<<8};ye.prototype.blocks=function(i,o,s){for(var e=this.fin?0:2048,a,u,l,b,_,O,k,at,R,H,z,G,K,q,X,F,A,U,T,N=this.h[0],j=this.h[1],P=this.h[2],d=this.h[3],x=this.h[4],y=this.h[5],g=this.h[6],v=this.h[7],m=this.h[8],M=this.h[9],Y=this.r[0],V=this.r[1],$=this.r[2],c=this.r[3],rt=this.r[4],ft=this.r[5],ct=this.r[6],Q=this.r[7],st=this.r[8],ot=this.r[9];s>=16;)a=i[o+0]&255|(i[o+1]&255)<<8,N+=a&8191,u=i[o+2]&255|(i[o+3]&255)<<8,j+=(a>>>13|u<<3)&8191,l=i[o+4]&255|(i[o+5]&255)<<8,P+=(u>>>10|l<<6)&8191,b=i[o+6]&255|(i[o+7]&255)<<8,d+=(l>>>7|b<<9)&8191,_=i[o+8]&255|(i[o+9]&255)<<8,x+=(b>>>4|_<<12)&8191,y+=_>>>1&8191,O=i[o+10]&255|(i[o+11]&255)<<8,g+=(_>>>14|O<<2)&8191,k=i[o+12]&255|(i[o+13]&255)<<8,v+=(O>>>11|k<<5)&8191,at=i[o+14]&255|(i[o+15]&255)<<8,m+=(k>>>8|at<<8)&8191,M+=at>>>5|e,R=0,H=R,H+=N*Y,H+=j*(5*ot),H+=P*(5*st),H+=d*(5*Q),H+=x*(5*ct),R=H>>>13,H&=8191,H+=y*(5*ft),H+=g*(5*rt),H+=v*(5*c),H+=m*(5*$),H+=M*(5*V),R+=H>>>13,H&=8191,z=R,z+=N*V,z+=j*Y,z+=P*(5*ot),z+=d*(5*st),z+=x*(5*Q),R=z>>>13,z&=8191,z+=y*(5*ct),z+=g*(5*ft),z+=v*(5*rt),z+=m*(5*c),z+=M*(5*$),R+=z>>>13,z&=8191,G=R,G+=N*$,G+=j*V,G+=P*Y,G+=d*(5*ot),G+=x*(5*st),R=G>>>13,G&=8191,G+=y*(5*Q),G+=g*(5*ct),G+=v*(5*ft),G+=m*(5*rt),G+=M*(5*c),R+=G>>>13,G&=8191,K=R,K+=N*c,K+=j*$,K+=P*V,K+=d*Y,K+=x*(5*ot),R=K>>>13,K&=8191,K+=y*(5*st),K+=g*(5*Q),K+=v*(5*ct),K+=m*(5*ft),K+=M*(5*rt),R+=K>>>13,K&=8191,q=R,q+=N*rt,q+=j*c,q+=P*$,q+=d*V,q+=x*Y,R=q>>>13,q&=8191,q+=y*(5*ot),q+=g*(5*st),q+=v*(5*Q),q+=m*(5*ct),q+=M*(5*ft),R+=q>>>13,q&=8191,X=R,X+=N*ft,X+=j*rt,X+=P*c,X+=d*$,X+=x*V,R=X>>>13,X&=8191,X+=y*Y,X+=g*(5*ot),X+=v*(5*st),X+=m*(5*Q),X+=M*(5*ct),R+=X>>>13,X&=8191,F=R,F+=N*ct,F+=j*ft,F+=P*rt,F+=d*c,F+=x*$,R=F>>>13,F&=8191,F+=y*V,F+=g*Y,F+=v*(5*ot),F+=m*(5*st),F+=M*(5*Q),R+=F>>>13,F&=8191,A=R,A+=N*Q,A+=j*ct,A+=P*ft,A+=d*rt,A+=x*c,R=A>>>13,A&=8191,A+=y*$,A+=g*V,A+=v*Y,A+=m*(5*ot),A+=M*(5*st),R+=A>>>13,A&=8191,U=R,U+=N*st,U+=j*Q,U+=P*ct,U+=d*ft,U+=x*rt,R=U>>>13,U&=8191,U+=y*c,U+=g*$,U+=v*V,U+=m*Y,U+=M*(5*ot),R+=U>>>13,U&=8191,T=R,T+=N*ot,T+=j*st,T+=P*Q,T+=d*ct,T+=x*ft,R=T>>>13,T&=8191,T+=y*rt,T+=g*c,T+=v*$,T+=m*V,T+=M*Y,R+=T>>>13,T&=8191,R=(R<<2)+R|0,R=R+H|0,H=R&8191,R=R>>>13,z+=R,N=H,j=z,P=G,d=K,x=q,y=X,g=F,v=A,m=U,M=T,o+=16,s-=16;this.h[0]=N,this.h[1]=j,this.h[2]=P,this.h[3]=d,this.h[4]=x,this.h[5]=y,this.h[6]=g,this.h[7]=v,this.h[8]=m,this.h[9]=M},ye.prototype.finish=function(i,o){var s=new Uint16Array(10),e,a,u,l;if(this.leftover){for(l=this.leftover,this.buffer[l++]=1;l<16;l++)this.buffer[l]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(e=this.h[1]>>>13,this.h[1]&=8191,l=2;l<10;l++)this.h[l]+=e,e=this.h[l]>>>13,this.h[l]&=8191;for(this.h[0]+=e*5,e=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=e,e=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=e,s[0]=this.h[0]+5,e=s[0]>>>13,s[0]&=8191,l=1;l<10;l++)s[l]=this.h[l]+e,e=s[l]>>>13,s[l]&=8191;for(s[9]-=8192,a=(e^1)-1,l=0;l<10;l++)s[l]&=a;for(a=~a,l=0;l<10;l++)this.h[l]=this.h[l]&a|s[l];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,u=this.h[0]+this.pad[0],this.h[0]=u&65535,l=1;l<8;l++)u=(this.h[l]+this.pad[l]|0)+(u>>>16)|0,this.h[l]=u&65535;i[o+0]=this.h[0]>>>0&255,i[o+1]=this.h[0]>>>8&255,i[o+2]=this.h[1]>>>0&255,i[o+3]=this.h[1]>>>8&255,i[o+4]=this.h[2]>>>0&255,i[o+5]=this.h[2]>>>8&255,i[o+6]=this.h[3]>>>0&255,i[o+7]=this.h[3]>>>8&255,i[o+8]=this.h[4]>>>0&255,i[o+9]=this.h[4]>>>8&255,i[o+10]=this.h[5]>>>0&255,i[o+11]=this.h[5]>>>8&255,i[o+12]=this.h[6]>>>0&255,i[o+13]=this.h[6]>>>8&255,i[o+14]=this.h[7]>>>0&255,i[o+15]=this.h[7]>>>8&255},ye.prototype.update=function(i,o,s){var e,a;if(this.leftover){for(a=16-this.leftover,a>s&&(a=s),e=0;e<a;e++)this.buffer[this.leftover+e]=i[o+e];if(s-=a,o+=a,this.leftover+=a,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(s>=16&&(a=s-s%16,this.blocks(i,o,a),o+=a,s-=a),s){for(e=0;e<s;e++)this.buffer[this.leftover+e]=i[o+e];this.leftover+=s}};function Ne(i,o,s,e,a,u){var l=new ye(u);return l.update(s,e,a),l.finish(i,o),0}function We(i,o,s,e,a,u){var l=new Uint8Array(16);return Ne(l,0,s,e,a,u),Nt(i,o,l,0)}function Oe(i,o,s,e,a){var u;if(s<32)return-1;for(Re(i,0,o,0,s,e,a),Ne(i,16,i,32,s-32,i),u=0;u<16;u++)i[u]=0;return 0}function me(i,o,s,e,a){var u,l=new Uint8Array(32);if(s<32||(de(l,0,32,e,a),We(o,16,o,32,s-32,l)!==0))return-1;for(Re(i,0,o,0,s,e,a),u=0;u<32;u++)i[u]=0;return 0}function Qt(i,o){var s;for(s=0;s<16;s++)i[s]=o[s]|0}function je(i){var o,s,e=1;for(o=0;o<16;o++)s=i[o]+e+65535,e=Math.floor(s/65536),i[o]=s-e*65536;i[0]+=e-1+37*(e-1)}function Yt(i,o,s){for(var e,a=~(s-1),u=0;u<16;u++)e=a&(i[u]^o[u]),i[u]^=e,o[u]^=e}function fe(i,o){var s,e,a,u=C(),l=C();for(s=0;s<16;s++)l[s]=o[s];for(je(l),je(l),je(l),e=0;e<2;e++){for(u[0]=l[0]-65517,s=1;s<15;s++)u[s]=l[s]-65535-(u[s-1]>>16&1),u[s-1]&=65535;u[15]=l[15]-32767-(u[14]>>16&1),a=u[15]>>16&1,u[14]&=65535,Yt(l,u,1-a)}for(s=0;s<16;s++)i[2*s]=l[s]&255,i[2*s+1]=l[s]>>8}function Ke(i,o){var s=new Uint8Array(32),e=new Uint8Array(32);return fe(s,i),fe(e,o),Dt(s,0,e,0)}function Pt(i){var o=new Uint8Array(32);return fe(o,i),o[0]&1}function Ot(i,o){var s;for(s=0;s<16;s++)i[s]=o[2*s]+(o[2*s+1]<<8);i[15]&=32767}function Jt(i,o,s){for(var e=0;e<16;e++)i[e]=o[e]+s[e]}function $t(i,o,s){for(var e=0;e<16;e++)i[e]=o[e]-s[e]}function W(i,o,s){var e,a,u=0,l=0,b=0,_=0,O=0,k=0,at=0,R=0,H=0,z=0,G=0,K=0,q=0,X=0,F=0,A=0,U=0,T=0,N=0,j=0,P=0,d=0,x=0,y=0,g=0,v=0,m=0,M=0,Y=0,V=0,$=0,c=s[0],rt=s[1],ft=s[2],ct=s[3],Q=s[4],st=s[5],ot=s[6],vt=s[7],it=s[8],yt=s[9],mt=s[10],_t=s[11],Tt=s[12],kt=s[13],jt=s[14],Lt=s[15];e=o[0],u+=e*c,l+=e*rt,b+=e*ft,_+=e*ct,O+=e*Q,k+=e*st,at+=e*ot,R+=e*vt,H+=e*it,z+=e*yt,G+=e*mt,K+=e*_t,q+=e*Tt,X+=e*kt,F+=e*jt,A+=e*Lt,e=o[1],l+=e*c,b+=e*rt,_+=e*ft,O+=e*ct,k+=e*Q,at+=e*st,R+=e*ot,H+=e*vt,z+=e*it,G+=e*yt,K+=e*mt,q+=e*_t,X+=e*Tt,F+=e*kt,A+=e*jt,U+=e*Lt,e=o[2],b+=e*c,_+=e*rt,O+=e*ft,k+=e*ct,at+=e*Q,R+=e*st,H+=e*ot,z+=e*vt,G+=e*it,K+=e*yt,q+=e*mt,X+=e*_t,F+=e*Tt,A+=e*kt,U+=e*jt,T+=e*Lt,e=o[3],_+=e*c,O+=e*rt,k+=e*ft,at+=e*ct,R+=e*Q,H+=e*st,z+=e*ot,G+=e*vt,K+=e*it,q+=e*yt,X+=e*mt,F+=e*_t,A+=e*Tt,U+=e*kt,T+=e*jt,N+=e*Lt,e=o[4],O+=e*c,k+=e*rt,at+=e*ft,R+=e*ct,H+=e*Q,z+=e*st,G+=e*ot,K+=e*vt,q+=e*it,X+=e*yt,F+=e*mt,A+=e*_t,U+=e*Tt,T+=e*kt,N+=e*jt,j+=e*Lt,e=o[5],k+=e*c,at+=e*rt,R+=e*ft,H+=e*ct,z+=e*Q,G+=e*st,K+=e*ot,q+=e*vt,X+=e*it,F+=e*yt,A+=e*mt,U+=e*_t,T+=e*Tt,N+=e*kt,j+=e*jt,P+=e*Lt,e=o[6],at+=e*c,R+=e*rt,H+=e*ft,z+=e*ct,G+=e*Q,K+=e*st,q+=e*ot,X+=e*vt,F+=e*it,A+=e*yt,U+=e*mt,T+=e*_t,N+=e*Tt,j+=e*kt,P+=e*jt,d+=e*Lt,e=o[7],R+=e*c,H+=e*rt,z+=e*ft,G+=e*ct,K+=e*Q,q+=e*st,X+=e*ot,F+=e*vt,A+=e*it,U+=e*yt,T+=e*mt,N+=e*_t,j+=e*Tt,P+=e*kt,d+=e*jt,x+=e*Lt,e=o[8],H+=e*c,z+=e*rt,G+=e*ft,K+=e*ct,q+=e*Q,X+=e*st,F+=e*ot,A+=e*vt,U+=e*it,T+=e*yt,N+=e*mt,j+=e*_t,P+=e*Tt,d+=e*kt,x+=e*jt,y+=e*Lt,e=o[9],z+=e*c,G+=e*rt,K+=e*ft,q+=e*ct,X+=e*Q,F+=e*st,A+=e*ot,U+=e*vt,T+=e*it,N+=e*yt,j+=e*mt,P+=e*_t,d+=e*Tt,x+=e*kt,y+=e*jt,g+=e*Lt,e=o[10],G+=e*c,K+=e*rt,q+=e*ft,X+=e*ct,F+=e*Q,A+=e*st,U+=e*ot,T+=e*vt,N+=e*it,j+=e*yt,P+=e*mt,d+=e*_t,x+=e*Tt,y+=e*kt,g+=e*jt,v+=e*Lt,e=o[11],K+=e*c,q+=e*rt,X+=e*ft,F+=e*ct,A+=e*Q,U+=e*st,T+=e*ot,N+=e*vt,j+=e*it,P+=e*yt,d+=e*mt,x+=e*_t,y+=e*Tt,g+=e*kt,v+=e*jt,m+=e*Lt,e=o[12],q+=e*c,X+=e*rt,F+=e*ft,A+=e*ct,U+=e*Q,T+=e*st,N+=e*ot,j+=e*vt,P+=e*it,d+=e*yt,x+=e*mt,y+=e*_t,g+=e*Tt,v+=e*kt,m+=e*jt,M+=e*Lt,e=o[13],X+=e*c,F+=e*rt,A+=e*ft,U+=e*ct,T+=e*Q,N+=e*st,j+=e*ot,P+=e*vt,d+=e*it,x+=e*yt,y+=e*mt,g+=e*_t,v+=e*Tt,m+=e*kt,M+=e*jt,Y+=e*Lt,e=o[14],F+=e*c,A+=e*rt,U+=e*ft,T+=e*ct,N+=e*Q,j+=e*st,P+=e*ot,d+=e*vt,x+=e*it,y+=e*yt,g+=e*mt,v+=e*_t,m+=e*Tt,M+=e*kt,Y+=e*jt,V+=e*Lt,e=o[15],A+=e*c,U+=e*rt,T+=e*ft,N+=e*ct,j+=e*Q,P+=e*st,d+=e*ot,x+=e*vt,y+=e*it,g+=e*yt,v+=e*mt,m+=e*_t,M+=e*Tt,Y+=e*kt,V+=e*jt,$+=e*Lt,u+=38*U,l+=38*T,b+=38*N,_+=38*j,O+=38*P,k+=38*d,at+=38*x,R+=38*y,H+=38*g,z+=38*v,G+=38*m,K+=38*M,q+=38*Y,X+=38*V,F+=38*$,a=1,e=u+a+65535,a=Math.floor(e/65536),u=e-a*65536,e=l+a+65535,a=Math.floor(e/65536),l=e-a*65536,e=b+a+65535,a=Math.floor(e/65536),b=e-a*65536,e=_+a+65535,a=Math.floor(e/65536),_=e-a*65536,e=O+a+65535,a=Math.floor(e/65536),O=e-a*65536,e=k+a+65535,a=Math.floor(e/65536),k=e-a*65536,e=at+a+65535,a=Math.floor(e/65536),at=e-a*65536,e=R+a+65535,a=Math.floor(e/65536),R=e-a*65536,e=H+a+65535,a=Math.floor(e/65536),H=e-a*65536,e=z+a+65535,a=Math.floor(e/65536),z=e-a*65536,e=G+a+65535,a=Math.floor(e/65536),G=e-a*65536,e=K+a+65535,a=Math.floor(e/65536),K=e-a*65536,e=q+a+65535,a=Math.floor(e/65536),q=e-a*65536,e=X+a+65535,a=Math.floor(e/65536),X=e-a*65536,e=F+a+65535,a=Math.floor(e/65536),F=e-a*65536,e=A+a+65535,a=Math.floor(e/65536),A=e-a*65536,u+=a-1+37*(a-1),a=1,e=u+a+65535,a=Math.floor(e/65536),u=e-a*65536,e=l+a+65535,a=Math.floor(e/65536),l=e-a*65536,e=b+a+65535,a=Math.floor(e/65536),b=e-a*65536,e=_+a+65535,a=Math.floor(e/65536),_=e-a*65536,e=O+a+65535,a=Math.floor(e/65536),O=e-a*65536,e=k+a+65535,a=Math.floor(e/65536),k=e-a*65536,e=at+a+65535,a=Math.floor(e/65536),at=e-a*65536,e=R+a+65535,a=Math.floor(e/65536),R=e-a*65536,e=H+a+65535,a=Math.floor(e/65536),H=e-a*65536,e=z+a+65535,a=Math.floor(e/65536),z=e-a*65536,e=G+a+65535,a=Math.floor(e/65536),G=e-a*65536,e=K+a+65535,a=Math.floor(e/65536),K=e-a*65536,e=q+a+65535,a=Math.floor(e/65536),q=e-a*65536,e=X+a+65535,a=Math.floor(e/65536),X=e-a*65536,e=F+a+65535,a=Math.floor(e/65536),F=e-a*65536,e=A+a+65535,a=Math.floor(e/65536),A=e-a*65536,u+=a-1+37*(a-1),i[0]=u,i[1]=l,i[2]=b,i[3]=_,i[4]=O,i[5]=k,i[6]=at,i[7]=R,i[8]=H,i[9]=z,i[10]=G,i[11]=K,i[12]=q,i[13]=X,i[14]=F,i[15]=A}function zt(i,o){W(i,o,o)}function Ge(i,o){var s=C(),e;for(e=0;e<16;e++)s[e]=o[e];for(e=253;e>=0;e--)zt(s,s),e!==2&&e!==4&&W(s,s,o);for(e=0;e<16;e++)i[e]=s[e]}function ce(i,o){var s=C(),e;for(e=0;e<16;e++)s[e]=o[e];for(e=250;e>=0;e--)zt(s,s),e!==1&&W(s,s,o);for(e=0;e<16;e++)i[e]=s[e]}function xe(i,o,s){var e=new Uint8Array(32),a=new Float64Array(80),u,l,b=C(),_=C(),O=C(),k=C(),at=C(),R=C();for(l=0;l<31;l++)e[l]=o[l];for(e[31]=o[31]&127|64,e[0]&=248,Ot(a,s),l=0;l<16;l++)_[l]=a[l],k[l]=b[l]=O[l]=0;for(b[0]=k[0]=1,l=254;l>=0;--l)u=e[l>>>3]>>>(l&7)&1,Yt(b,_,u),Yt(O,k,u),Jt(at,b,O),$t(b,b,O),Jt(O,_,k),$t(_,_,k),zt(k,at),zt(R,b),W(b,O,b),W(O,_,at),Jt(at,b,O),$t(b,b,O),zt(_,b),$t(O,k,R),W(b,O,nt),Jt(b,b,k),W(O,O,b),W(b,k,R),W(k,_,a),zt(_,at),Yt(b,_,u),Yt(O,k,u);for(l=0;l<16;l++)a[l+16]=b[l],a[l+32]=O[l],a[l+48]=_[l],a[l+64]=k[l];var H=a.subarray(32),z=a.subarray(16);return Ge(H,H),W(z,z,H),fe(i,z),0}function _e(i,o){return xe(i,o,lt)}function Ue(i,o){return Rt(o,32),_e(i,o)}function pe(i,o,s){var e=new Uint8Array(32);return xe(e,s,o),Gt(i,et,e,se)}var Ve=Oe,Ze=me;function ar(i,o,s,e,a,u){var l=new Uint8Array(32);return pe(l,a,u),Ve(i,o,s,e,l)}function fr(i,o,s,e,a,u){var l=new Uint8Array(32);return pe(l,a,u),Ze(i,o,s,e,l)}var Qe=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function tr(i,o,s,e){for(var a=new Int32Array(16),u=new Int32Array(16),l,b,_,O,k,at,R,H,z,G,K,q,X,F,A,U,T,N,j,P,d,x,y,g,v,m,M=i[0],Y=i[1],V=i[2],$=i[3],c=i[4],rt=i[5],ft=i[6],ct=i[7],Q=o[0],st=o[1],ot=o[2],vt=o[3],it=o[4],yt=o[5],mt=o[6],_t=o[7],Tt=0;e>=128;){for(j=0;j<16;j++)P=8*j+Tt,a[j]=s[P+0]<<24|s[P+1]<<16|s[P+2]<<8|s[P+3],u[j]=s[P+4]<<24|s[P+5]<<16|s[P+6]<<8|s[P+7];for(j=0;j<80;j++)if(l=M,b=Y,_=V,O=$,k=c,at=rt,R=ft,H=ct,z=Q,G=st,K=ot,q=vt,X=it,F=yt,A=mt,U=_t,d=ct,x=_t,y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=(c>>>14|it<<18)^(c>>>18|it<<14)^(it>>>9|c<<23),x=(it>>>14|c<<18)^(it>>>18|c<<14)^(c>>>9|it<<23),y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,d=c&rt^~c&ft,x=it&yt^~it&mt,y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,d=Qe[j*2],x=Qe[j*2+1],y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,d=a[j%16],x=u[j%16],y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,T=v&65535|m<<16,N=y&65535|g<<16,d=T,x=N,y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=(M>>>28|Q<<4)^(Q>>>2|M<<30)^(Q>>>7|M<<25),x=(Q>>>28|M<<4)^(M>>>2|Q<<30)^(M>>>7|Q<<25),y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,d=M&Y^M&V^Y&V,x=Q&st^Q&ot^st&ot,y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,H=v&65535|m<<16,U=y&65535|g<<16,d=O,x=q,y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=T,x=N,y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,O=v&65535|m<<16,q=y&65535|g<<16,Y=l,V=b,$=_,c=O,rt=k,ft=at,ct=R,M=H,st=z,ot=G,vt=K,it=q,yt=X,mt=F,_t=A,Q=U,j%16===15)for(P=0;P<16;P++)d=a[P],x=u[P],y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=a[(P+9)%16],x=u[(P+9)%16],y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,T=a[(P+1)%16],N=u[(P+1)%16],d=(T>>>1|N<<31)^(T>>>8|N<<24)^T>>>7,x=(N>>>1|T<<31)^(N>>>8|T<<24)^(N>>>7|T<<25),y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,T=a[(P+14)%16],N=u[(P+14)%16],d=(T>>>19|N<<13)^(N>>>29|T<<3)^T>>>6,x=(N>>>19|T<<13)^(T>>>29|N<<3)^(N>>>6|T<<26),y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,a[P]=v&65535|m<<16,u[P]=y&65535|g<<16;d=M,x=Q,y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=i[0],x=o[0],y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,i[0]=M=v&65535|m<<16,o[0]=Q=y&65535|g<<16,d=Y,x=st,y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=i[1],x=o[1],y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,i[1]=Y=v&65535|m<<16,o[1]=st=y&65535|g<<16,d=V,x=ot,y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=i[2],x=o[2],y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,i[2]=V=v&65535|m<<16,o[2]=ot=y&65535|g<<16,d=$,x=vt,y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=i[3],x=o[3],y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,i[3]=$=v&65535|m<<16,o[3]=vt=y&65535|g<<16,d=c,x=it,y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=i[4],x=o[4],y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,i[4]=c=v&65535|m<<16,o[4]=it=y&65535|g<<16,d=rt,x=yt,y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=i[5],x=o[5],y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,i[5]=rt=v&65535|m<<16,o[5]=yt=y&65535|g<<16,d=ft,x=mt,y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=i[6],x=o[6],y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,i[6]=ft=v&65535|m<<16,o[6]=mt=y&65535|g<<16,d=ct,x=_t,y=x&65535,g=x>>>16,v=d&65535,m=d>>>16,d=i[7],x=o[7],y+=x&65535,g+=x>>>16,v+=d&65535,m+=d>>>16,g+=y>>>16,v+=g>>>16,m+=v>>>16,i[7]=ct=v&65535|m<<16,o[7]=_t=y&65535|g<<16,Tt+=128,e-=128}return e}function Vt(i,o,s){var e=new Int32Array(8),a=new Int32Array(8),u=new Uint8Array(256),l,b=s;for(e[0]=1779033703,e[1]=3144134277,e[2]=1013904242,e[3]=2773480762,e[4]=1359893119,e[5]=2600822924,e[6]=528734635,e[7]=1541459225,a[0]=4089235720,a[1]=2227873595,a[2]=4271175723,a[3]=1595750129,a[4]=2917565137,a[5]=725511199,a[6]=4215389547,a[7]=327033209,tr(e,a,o,s),s%=128,l=0;l<s;l++)u[l]=o[b-s+l];for(u[s]=128,s=256-128*(s<112?1:0),u[s-9]=0,xt(u,s-8,b/536870912|0,b<<3),tr(e,a,u,s),l=0;l<8;l++)xt(i,8*l,e[l],a[l]);return 0}function we(i,o){var s=C(),e=C(),a=C(),u=C(),l=C(),b=C(),_=C(),O=C(),k=C();$t(s,i[1],i[0]),$t(k,o[1],o[0]),W(s,s,k),Jt(e,i[0],i[1]),Jt(k,o[0],o[1]),W(e,e,k),W(a,i[3],o[3]),W(a,a,B),W(u,i[2],o[2]),Jt(u,u,u),$t(l,e,s),$t(b,u,a),Jt(_,u,a),Jt(O,e,s),W(i[0],l,b),W(i[1],O,_),W(i[2],_,b),W(i[3],l,O)}function bt(i,o,s){var e;for(e=0;e<4;e++)Yt(i[e],o[e],s)}function Ie(i,o){var s=C(),e=C(),a=C();Ge(a,o[2]),W(s,o[0],a),W(e,o[1],a),fe(i,e),i[31]^=Pt(s)<<7}function Me(i,o,s){var e,a;for(Qt(i[0],Bt),Qt(i[1],wt),Qt(i[2],wt),Qt(i[3],Bt),a=255;a>=0;--a)e=s[a/8|0]>>(a&7)&1,bt(i,o,e),we(o,i),we(i,i),bt(i,o,e)}function Se(i,o){var s=[C(),C(),C(),C()];Qt(s[0],w),Qt(s[1],L),Qt(s[2],wt),W(s[3],w,L),Me(i,s,o)}function Be(i,o,s){var e=new Uint8Array(64),a=[C(),C(),C(),C()],u;for(s||Rt(o,32),Vt(e,o,32),e[0]&=248,e[31]&=127,e[31]|=64,Se(a,e),Ie(i,a),u=0;u<32;u++)o[u+32]=i[u];return 0}var Ce=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function De(i,o){var s,e,a,u;for(e=63;e>=32;--e){for(s=0,a=e-32,u=e-12;a<u;++a)o[a]+=s-16*o[e]*Ce[a-(e-32)],s=Math.floor((o[a]+128)/256),o[a]-=s*256;o[a]+=s,o[e]=0}for(s=0,a=0;a<32;a++)o[a]+=s-(o[31]>>4)*Ce[a],s=o[a]>>8,o[a]&=255;for(a=0;a<32;a++)o[a]-=s*Ce[a];for(e=0;e<32;e++)o[e+1]+=o[e]>>8,i[e]=o[e]&255}function ze(i){var o=new Float64Array(64),s;for(s=0;s<64;s++)o[s]=i[s];for(s=0;s<64;s++)i[s]=0;De(i,o)}function Te(i,o,s,e){var a=new Uint8Array(64),u=new Uint8Array(64),l=new Uint8Array(64),b,_,O=new Float64Array(64),k=[C(),C(),C(),C()];Vt(a,e,32),a[0]&=248,a[31]&=127,a[31]|=64;var at=s+64;for(b=0;b<s;b++)i[64+b]=o[b];for(b=0;b<32;b++)i[32+b]=a[32+b];for(Vt(l,i.subarray(32),s+32),ze(l),Se(k,l),Ie(i,k),b=32;b<64;b++)i[b]=e[b];for(Vt(u,i,s+64),ze(u),b=0;b<64;b++)O[b]=0;for(b=0;b<32;b++)O[b]=l[b];for(b=0;b<32;b++)for(_=0;_<32;_++)O[b+_]+=u[b]*a[_];return De(i.subarray(32),O),at}function He(i,o){var s=C(),e=C(),a=C(),u=C(),l=C(),b=C(),_=C();return Qt(i[2],wt),Ot(i[1],o),zt(a,i[1]),W(u,a,St),$t(a,a,i[2]),Jt(u,i[2],u),zt(l,u),zt(b,l),W(_,b,l),W(s,_,a),W(s,s,u),ce(s,s),W(s,s,a),W(s,s,u),W(s,s,u),W(i[0],s,u),zt(e,i[0]),W(e,e,u),Ke(e,a)&&W(i[0],i[0],J),zt(e,i[0]),W(e,e,u),Ke(e,a)?-1:(Pt(i[0])===o[31]>>7&&$t(i[0],Bt,i[0]),W(i[3],i[0],i[1]),0)}function qe(i,o,s,e){var a,u=new Uint8Array(32),l=new Uint8Array(64),b=[C(),C(),C(),C()],_=[C(),C(),C(),C()];if(s<64||He(_,e))return-1;for(a=0;a<s;a++)i[a]=o[a];for(a=0;a<32;a++)i[a+32]=e[a];if(Vt(l,i,s),ze(l),Me(b,_,l),Se(_,o.subarray(32)),we(b,_),Ie(u,b),s-=64,Dt(o,0,u,0)){for(a=0;a<s;a++)i[a]=0;return-1}for(a=0;a<s;a++)i[a]=o[a+64];return s}var Fe=32,Ee=24,ge=32,ne=16,Ht=32,Ae=32,Zt=32,be=32,Pe=32,Ye=Ee,er=ge,rr=ne,te=64,oe=32,he=64,ue=32,$e=64;E.lowlevel={crypto_core_hsalsa20:Gt,crypto_stream_xor:Re,crypto_stream:de,crypto_stream_salsa20_xor:Je,crypto_stream_salsa20:ae,crypto_onetimeauth:Ne,crypto_onetimeauth_verify:We,crypto_verify_16:Nt,crypto_verify_32:Dt,crypto_secretbox:Oe,crypto_secretbox_open:me,crypto_scalarmult:xe,crypto_scalarmult_base:_e,crypto_box_beforenm:pe,crypto_box_afternm:Ve,crypto_box:ar,crypto_box_open:fr,crypto_box_keypair:Ue,crypto_hash:Vt,crypto_sign:Te,crypto_sign_keypair:Be,crypto_sign_open:qe,crypto_secretbox_KEYBYTES:Fe,crypto_secretbox_NONCEBYTES:Ee,crypto_secretbox_ZEROBYTES:ge,crypto_secretbox_BOXZEROBYTES:ne,crypto_scalarmult_BYTES:Ht,crypto_scalarmult_SCALARBYTES:Ae,crypto_box_PUBLICKEYBYTES:Zt,crypto_box_SECRETKEYBYTES:be,crypto_box_BEFORENMBYTES:Pe,crypto_box_NONCEBYTES:Ye,crypto_box_ZEROBYTES:er,crypto_box_BOXZEROBYTES:rr,crypto_sign_BYTES:te,crypto_sign_PUBLICKEYBYTES:oe,crypto_sign_SECRETKEYBYTES:he,crypto_sign_SEEDBYTES:ue,crypto_hash_BYTES:$e,gf:C,D:St,L:Ce,pack25519:fe,unpack25519:Ot,M:W,A:Jt,S:zt,Z:$t,pow2523:ce,add:we,set25519:Qt,modL:De,scalarmult:Me,scalarbase:Se};function Xe(i,o){if(i.length!==Fe)throw new Error("bad key size");if(o.length!==Ee)throw new Error("bad nonce size")}function cr(i,o){if(i.length!==Zt)throw new Error("bad public key size");if(o.length!==be)throw new Error("bad secret key size")}function qt(){for(var i=0;i<arguments.length;i++)if(!(arguments[i]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function nr(i){for(var o=0;o<i.length;o++)i[o]=0}E.randomBytes=function(i){var o=new Uint8Array(i);return Rt(o,i),o},E.secretbox=function(i,o,s){qt(i,o,s),Xe(s,o);for(var e=new Uint8Array(ge+i.length),a=new Uint8Array(e.length),u=0;u<i.length;u++)e[u+ge]=i[u];return Oe(a,e,e.length,o,s),a.subarray(ne)},E.secretbox.open=function(i,o,s){qt(i,o,s),Xe(s,o);for(var e=new Uint8Array(ne+i.length),a=new Uint8Array(e.length),u=0;u<i.length;u++)e[u+ne]=i[u];return e.length<32||me(a,e,e.length,o,s)!==0?null:a.subarray(ge)},E.secretbox.keyLength=Fe,E.secretbox.nonceLength=Ee,E.secretbox.overheadLength=ne,E.scalarMult=function(i,o){if(qt(i,o),i.length!==Ae)throw new Error("bad n size");if(o.length!==Ht)throw new Error("bad p size");var s=new Uint8Array(Ht);return xe(s,i,o),s},E.scalarMult.base=function(i){if(qt(i),i.length!==Ae)throw new Error("bad n size");var o=new Uint8Array(Ht);return _e(o,i),o},E.scalarMult.scalarLength=Ae,E.scalarMult.groupElementLength=Ht,E.box=function(i,o,s,e){var a=E.box.before(s,e);return E.secretbox(i,o,a)},E.box.before=function(i,o){qt(i,o),cr(i,o);var s=new Uint8Array(Pe);return pe(s,i,o),s},E.box.after=E.secretbox,E.box.open=function(i,o,s,e){var a=E.box.before(s,e);return E.secretbox.open(i,o,a)},E.box.open.after=E.secretbox.open,E.box.keyPair=function(){var i=new Uint8Array(Zt),o=new Uint8Array(be);return Ue(i,o),{publicKey:i,secretKey:o}},E.box.keyPair.fromSecretKey=function(i){if(qt(i),i.length!==be)throw new Error("bad secret key size");var o=new Uint8Array(Zt);return _e(o,i),{publicKey:o,secretKey:new Uint8Array(i)}},E.box.publicKeyLength=Zt,E.box.secretKeyLength=be,E.box.sharedKeyLength=Pe,E.box.nonceLength=Ye,E.box.overheadLength=E.secretbox.overheadLength,E.sign=function(i,o){if(qt(i,o),o.length!==he)throw new Error("bad secret key size");var s=new Uint8Array(te+i.length);return Te(s,i,i.length,o),s},E.sign.open=function(i,o){if(qt(i,o),o.length!==oe)throw new Error("bad public key size");var s=new Uint8Array(i.length),e=qe(s,i,i.length,o);if(e<0)return null;for(var a=new Uint8Array(e),u=0;u<a.length;u++)a[u]=s[u];return a},E.sign.detached=function(i,o){for(var s=E.sign(i,o),e=new Uint8Array(te),a=0;a<e.length;a++)e[a]=s[a];return e},E.sign.detached.verify=function(i,o,s){if(qt(i,o,s),o.length!==te)throw new Error("bad signature size");if(s.length!==oe)throw new Error("bad public key size");var e=new Uint8Array(te+i.length),a=new Uint8Array(te+i.length),u;for(u=0;u<te;u++)e[u]=o[u];for(u=0;u<i.length;u++)e[u+te]=i[u];return qe(a,e,e.length,s)>=0},E.sign.keyPair=function(){var i=new Uint8Array(oe),o=new Uint8Array(he);return Be(i,o),{publicKey:i,secretKey:o}},E.sign.keyPair.fromSecretKey=function(i){if(qt(i),i.length!==he)throw new Error("bad secret key size");for(var o=new Uint8Array(oe),s=0;s<o.length;s++)o[s]=i[32+s];return{publicKey:o,secretKey:new Uint8Array(i)}},E.sign.keyPair.fromSeed=function(i){if(qt(i),i.length!==ue)throw new Error("bad seed size");for(var o=new Uint8Array(oe),s=new Uint8Array(he),e=0;e<32;e++)s[e]=i[e];return Be(o,s,!0),{publicKey:o,secretKey:s}},E.sign.publicKeyLength=oe,E.sign.secretKeyLength=he,E.sign.seedLength=ue,E.sign.signatureLength=te,E.hash=function(i){qt(i);var o=new Uint8Array($e);return Vt(o,i,i.length),o},E.hash.hashLength=$e,E.verify=function(i,o){return qt(i,o),i.length===0||o.length===0||i.length!==o.length?!1:Et(i,0,o,0,i.length)===0},E.setPRNG=function(i){Rt=i},(function(){var i=typeof self<"u"?self.crypto||self.msCrypto:null;if(i&&i.getRandomValues){var o=65536;E.setPRNG(function(s,e){var a,u=new Uint8Array(e);for(a=0;a<e;a+=o)i.getRandomValues(u.subarray(a,a+Math.min(e-a,o)));for(a=0;a<e;a++)s[a]=u[a];nr(u)})}else i=D(281),i&&i.randomBytes&&E.setPRNG(function(s,e){var a,u=i.randomBytes(e);for(a=0;a<e;a++)s[a]=u[a];nr(u)})})()})(Ct.exports?Ct.exports:self.nacl=self.nacl||{})},42(Ct,ht,D){Ct.exports=D(499).default},499(Ct,ht,D){D.d(ht,{default:()=>sr});class E{constructor(t,r){this.lastId=0,this.prefix=t,this.name=r}create(t){this.lastId++;var r=this.lastId,f=this.prefix+r,h=this.name+"["+r+"]",p=!1,S=function(){p||(t.apply(null,arguments),p=!0)};return this[r]=S,{number:r,id:f,name:h,callback:S}}remove(t){delete this[t.number]}}var C=new E("_pusher_script_","Pusher.ScriptReceivers"),Rt={VERSION:"8.5.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""};const et=Rt;class lt{constructor(t){this.options=t,this.receivers=t.receivers||C,this.loading={}}load(t,r,f){var h=this;if(h.loading[t]&&h.loading[t].length>0)h.loading[t].push(f);else{h.loading[t]=[f];var p=tt.createScriptRequest(h.getPath(t,r)),S=h.receivers.create(function(I){if(h.receivers.remove(S),h.loading[t]){var Z=h.loading[t];delete h.loading[t];for(var dt=function(At){At||p.cleanup()},pt=0;pt<Z.length;pt++)Z[pt](I,dt)}});p.send(S)}}getRoot(t){var r,f=tt.getDocument().location.protocol;return t&&t.useTLS||f==="https:"?r=this.options.cdn_https:r=this.options.cdn_http,r.replace(/\/*$/,"")+"/"+this.options.version}getPath(t,r){return this.getRoot(r)+"/"+t+this.options.suffix+".js"}}var Bt=new E("_pusher_dependencies","Pusher.DependenciesReceivers"),wt=new lt({cdn_http:et.cdn_http,cdn_https:et.cdn_https,version:et.VERSION,suffix:et.dependency_suffix,receivers:Bt});const nt={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},B={buildLogSuffix:function(n){const t="See:",r=nt.urls[n];if(!r)return"";let f;return r.fullUrl?f=r.fullUrl:r.path&&(f=nt.baseUrl+r.path),f?`${t} ${f}`:""}};var w;(function(n){n.UserAuthentication="user-authentication",n.ChannelAuthorization="channel-authorization"})(w||(w={}));class L extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class J extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class xt extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class Et extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class Nt extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class Dt extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class re extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class Xt extends Error{constructor(t){super(t),Object.setPrototypeOf(this,new.target.prototype)}}class It extends Error{constructor(t,r){super(r),this.status=t,Object.setPrototypeOf(this,new.target.prototype)}}const se=function(n,t,r,f,h){const p=tt.createXHR();p.open("POST",r.endpoint,!0),p.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var S in r.headers)p.setRequestHeader(S,r.headers[S]);if(r.headersProvider!=null){let I=r.headersProvider();for(var S in I)p.setRequestHeader(S,I[S])}return p.onreadystatechange=function(){if(p.readyState===4)if(p.status===200){let I,Z=!1;try{I=JSON.parse(p.responseText),Z=!0}catch{h(new It(200,`JSON returned from ${f.toString()} endpoint was invalid, yet status code was 200. Data was: ${p.responseText}`),null)}Z&&h(null,I)}else{let I="";switch(f){case w.UserAuthentication:I=B.buildLogSuffix("authenticationEndpoint");break;case w.ChannelAuthorization:I=`Clients must be authorized to join private or presence channels. ${B.buildLogSuffix("authorizationEndpoint")}`;break}h(new It(p.status,`Unable to retrieve auth string from ${f.toString()} endpoint - received status: ${p.status} from ${r.endpoint}. ${I}`),null)}},p.send(t),p};function Je(n){return We(ye(n))}var ae=String.fromCharCode,de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Re=function(n){var t=n.charCodeAt(0);return t<128?n:t<2048?ae(192|t>>>6)+ae(128|t&63):ae(224|t>>>12&15)+ae(128|t>>>6&63)+ae(128|t&63)},ye=function(n){return n.replace(/[^\x00-\x7F]/g,Re)},Ne=function(n){var t=[0,2,1][n.length%3],r=n.charCodeAt(0)<<16|(n.length>1?n.charCodeAt(1):0)<<8|(n.length>2?n.charCodeAt(2):0),f=[de.charAt(r>>>18),de.charAt(r>>>12&63),t>=2?"=":de.charAt(r>>>6&63),t>=1?"=":de.charAt(r&63)];return f.join("")},We=window.btoa||function(n){return n.replace(/[\s\S]{1,3}/g,Ne)};class Oe{constructor(t,r,f,h){this.clear=r,this.timer=t(()=>{this.timer&&(this.timer=h(this.timer))},f)}isRunning(){return this.timer!==null}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}}const me=Oe;function Qt(n){window.clearTimeout(n)}function je(n){window.clearInterval(n)}class Yt extends me{constructor(t,r){super(setTimeout,Qt,t,function(f){return r(),null})}}class fe extends me{constructor(t,r){super(setInterval,je,t,function(f){return r(),f})}}var Ke={now(){return Date.now?Date.now():new Date().valueOf()},defer(n){return new Yt(0,n)},method(n,...t){var r=Array.prototype.slice.call(arguments,1);return function(f){return f[n].apply(f,r.concat(arguments))}}};const Pt=Ke;function Ot(n,...t){for(var r=0;r<t.length;r++){var f=t[r];for(var h in f)f[h]&&f[h].constructor&&f[h].constructor===Object?n[h]=Ot(n[h]||{},f[h]):n[h]=f[h]}return n}function Jt(){for(var n=["Pusher"],t=0;t<arguments.length;t++)typeof arguments[t]=="string"?n.push(arguments[t]):n.push(Vt(arguments[t]));return n.join(" : ")}function $t(n,t){var r=Array.prototype.indexOf;if(n===null)return-1;if(r&&n.indexOf===r)return n.indexOf(t);for(var f=0,h=n.length;f<h;f++)if(n[f]===t)return f;return-1}function W(n,t){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t(n[r],r,n)}function zt(n){var t=[];return W(n,function(r,f){t.push(f)}),t}function Ge(n){var t=[];return W(n,function(r){t.push(r)}),t}function ce(n,t,r){for(var f=0;f<n.length;f++)t.call(r||window,n[f],f,n)}function xe(n,t){for(var r=[],f=0;f<n.length;f++)r.push(t(n[f],f,n,r));return r}function _e(n,t){var r={};return W(n,function(f,h){r[h]=t(f)}),r}function Ue(n,t){t=t||function(h){return!!h};for(var r=[],f=0;f<n.length;f++)t(n[f],f,n,r)&&r.push(n[f]);return r}function pe(n,t){var r={};return W(n,function(f,h){(t&&t(f,h,n,r)||f)&&(r[h]=f)}),r}function Ve(n){var t=[];return W(n,function(r,f){t.push([f,r])}),t}function Ze(n,t){for(var r=0;r<n.length;r++)if(t(n[r],r,n))return!0;return!1}function ar(n,t){for(var r=0;r<n.length;r++)if(!t(n[r],r,n))return!1;return!0}function fr(n){return _e(n,function(t){return typeof t=="object"&&(t=Vt(t)),encodeURIComponent(Je(t.toString()))})}function Qe(n){var t=pe(n,function(f){return f!==void 0}),r=xe(Ve(fr(t)),Pt.method("join","=")).join("&");return r}function tr(n){var t=[],r=[];return(function f(h,p){var S,I,Z;switch(typeof h){case"object":if(!h)return null;for(S=0;S<t.length;S+=1)if(t[S]===h)return{$ref:r[S]};if(t.push(h),r.push(p),Object.prototype.toString.apply(h)==="[object Array]")for(Z=[],S=0;S<h.length;S+=1)Z[S]=f(h[S],p+"["+S+"]");else{Z={};for(I in h)Object.prototype.hasOwnProperty.call(h,I)&&(Z[I]=f(h[I],p+"["+JSON.stringify(I)+"]"))}return Z;case"number":case"string":case"boolean":return h}})(n,"$")}function Vt(n){try{return JSON.stringify(n)}catch{return JSON.stringify(tr(n))}}class we{constructor(){this.globalLog=t=>{window.console&&window.console.log&&window.console.log(t)}}debug(...t){this.log(this.globalLog,t)}warn(...t){this.log(this.globalLogWarn,t)}error(...t){this.log(this.globalLogError,t)}globalLogWarn(t){window.console&&window.console.warn?window.console.warn(t):this.globalLog(t)}globalLogError(t){window.console&&window.console.error?window.console.error(t):this.globalLogWarn(t)}log(t,...r){var f=Jt.apply(this,arguments);ke.log?ke.log(f):ke.logToConsole&&t.bind(this)(f)}}const bt=new we;var Ie=function(n,t,r,f,h){(r.headers!==void 0||r.headersProvider!=null)&&bt.warn(`To send headers with the ${f.toString()} request, you must use AJAX, rather than JSONP.`);var p=n.nextAuthCallbackID.toString();n.nextAuthCallbackID++;var S=n.getDocument(),I=S.createElement("script");n.auth_callbacks[p]=function(pt){h(null,pt)};var Z="Pusher.auth_callbacks['"+p+"']";I.src=r.endpoint+"?callback="+encodeURIComponent(Z)+"&"+t;var dt=S.getElementsByTagName("head")[0]||S.documentElement;dt.insertBefore(I,dt.firstChild)};const Me=Ie;class Se{constructor(t){this.src=t}send(t){var r=this,f="Error loading "+r.src;r.script=document.createElement("script"),r.script.id=t.id,r.script.src=r.src,r.script.type="text/javascript",r.script.charset="UTF-8",r.script.addEventListener?(r.script.onerror=function(){t.callback(f)},r.script.onload=function(){t.callback(null)}):r.script.onreadystatechange=function(){(r.script.readyState==="loaded"||r.script.readyState==="complete")&&t.callback(null)},r.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(r.errorScript=document.createElement("script"),r.errorScript.id=t.id+"_error",r.errorScript.text=t.name+"('"+f+"');",r.script.async=r.errorScript.async=!1):r.script.async=!0;var h=document.getElementsByTagName("head")[0];h.insertBefore(r.script,h.firstChild),r.errorScript&&h.insertBefore(r.errorScript,r.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class Be{constructor(t,r){this.url=t,this.data=r}send(t){if(!this.request){var r=Qe(this.data),f=this.url+"/"+t.number+"?"+r;this.request=tt.createScriptRequest(f),this.request.send(t)}}cleanup(){this.request&&this.request.cleanup()}}var Ce=function(n,t){return function(r,f){var h="http"+(t?"s":"")+"://",p=h+(n.host||n.options.host)+n.options.path,S=tt.createJSONPRequest(p,r),I=tt.ScriptReceivers.create(function(Z,dt){C.remove(I),S.cleanup(),dt&&dt.host&&(n.host=dt.host),f&&f(Z,dt)});S.send(I)}},De={name:"jsonp",getAgent:Ce};const ze=De;function Te(n,t,r){var f=n+(t.useTLS?"s":""),h=t.useTLS?t.hostTLS:t.hostNonTLS;return f+"://"+h+r}function He(n,t){var r="/app/"+n,f="?protocol="+et.PROTOCOL+"&client=js&version="+et.VERSION+(t?"&"+t:"");return r+f}var qe={getInitial:function(n,t){var r=(t.httpPath||"")+He(n,"flash=false");return Te("ws",t,r)}},Fe={getInitial:function(n,t){var r=(t.httpPath||"/pusher")+He(n);return Te("http",t,r)}},Ee={getInitial:function(n,t){return Te("http",t,t.httpPath||"/pusher")},getPath:function(n,t){return He(n)}};class ge{constructor(){this._callbacks={}}get(t){return this._callbacks[ne(t)]}add(t,r,f){var h=ne(t);this._callbacks[h]=this._callbacks[h]||[],this._callbacks[h].push({fn:r,context:f})}remove(t,r,f){if(!t&&!r&&!f){this._callbacks={};return}var h=t?[ne(t)]:zt(this._callbacks);r||f?this.removeCallback(h,r,f):this.removeAllCallbacks(h)}removeCallback(t,r,f){ce(t,function(h){this._callbacks[h]=Ue(this._callbacks[h]||[],function(p){return r&&r!==p.fn||f&&f!==p.context}),this._callbacks[h].length===0&&delete this._callbacks[h]},this)}removeAllCallbacks(t){ce(t,function(r){delete this._callbacks[r]},this)}}function ne(n){return"_"+n}class Ht{constructor(t){this.callbacks=new ge,this.global_callbacks=[],this.failThrough=t}bind(t,r,f){return this.callbacks.add(t,r,f),this}bind_global(t){return this.global_callbacks.push(t),this}unbind(t,r,f){return this.callbacks.remove(t,r,f),this}unbind_global(t){return t?(this.global_callbacks=Ue(this.global_callbacks||[],r=>r!==t),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(t,r,f){for(var h=0;h<this.global_callbacks.length;h++)this.global_callbacks[h](t,r);var p=this.callbacks.get(t),S=[];if(f?S.push(r,f):r&&S.push(r),p&&p.length>0)for(var h=0;h<p.length;h++)p[h].fn.apply(p[h].context||window,S);else this.failThrough&&this.failThrough(t,r);return this}}class Ae extends Ht{constructor(t,r,f,h,p){super(),this.initialize=tt.transportConnectionInitializer,this.hooks=t,this.name=r,this.priority=f,this.key=h,this.options=p,this.state="new",this.timeline=p.timeline,this.activityTimeout=p.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return!!this.hooks.handlesActivityChecks}supportsPing(){return!!this.hooks.supportsPing}connect(){if(this.socket||this.state!=="initialized")return!1;var t=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(t,this.options)}catch(r){return Pt.defer(()=>{this.onError(r),this.changeState("closed")}),!1}return this.bindListeners(),bt.debug("Connecting",{transport:this.name,url:t}),this.changeState("connecting"),!0}close(){return this.socket?(this.socket.close(),!0):!1}send(t){return this.state==="open"?(Pt.defer(()=>{this.socket&&this.socket.send(t)}),!0):!1}ping(){this.state==="open"&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(t){this.emit("error",{type:"WebSocketError",error:t}),this.timeline.error(this.buildTimelineMessage({error:t.toString()}))}onClose(t){t?this.changeState("closed",{code:t.code,reason:t.reason,wasClean:t.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(t){this.emit("message",t)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=t=>{this.onError(t)},this.socket.onclose=t=>{this.onClose(t)},this.socket.onmessage=t=>{this.onMessage(t)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(t,r){this.state=t,this.timeline.info(this.buildTimelineMessage({state:t,params:r})),this.emit(t,r)}buildTimelineMessage(t){return Ot({cid:this.id},t)}}class Zt{constructor(t){this.hooks=t}isSupported(t){return this.hooks.isSupported(t)}createConnection(t,r,f,h){return new Ae(this.hooks,t,r,f,h)}}var be=new Zt({urls:qe,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!tt.getWebSocketAPI()},isSupported:function(){return!!tt.getWebSocketAPI()},getSocket:function(n){return tt.createWebSocket(n)}}),Pe={urls:Fe,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Ye=Ot({getSocket:function(n){return tt.HTTPFactory.createStreamingSocket(n)}},Pe),er=Ot({getSocket:function(n){return tt.HTTPFactory.createPollingSocket(n)}},Pe),rr={isSupported:function(){return tt.isXHRSupported()}},te=new Zt(Ot({},Ye,rr)),oe=new Zt(Ot({},er,rr)),he={ws:be,xhr_streaming:te,xhr_polling:oe};const ue=he;var $e=new Zt({file:"sockjs",urls:Ee,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(n,t){return new window.SockJS(n,null,{js_path:wt.getPath("sockjs",{useTLS:t.useTLS}),ignore_null_origin:t.ignoreNullOrigin})},beforeOpen:function(n,t){n.send(JSON.stringify({path:t}))}}),Xe={isSupported:function(n){var t=tt.isXDRSupported(n.useTLS);return t}},cr=new Zt(Ot({},Ye,Xe)),qt=new Zt(Ot({},er,Xe));ue.xdr_streaming=cr,ue.xdr_polling=qt,ue.sockjs=$e;const nr=ue;class i extends Ht{constructor(){super();var t=this;window.addEventListener!==void 0&&(window.addEventListener("online",function(){t.emit("online")},!1),window.addEventListener("offline",function(){t.emit("offline")},!1))}isOnline(){return window.navigator.onLine===void 0?!0:window.navigator.onLine}}var o=new i;class s{constructor(t,r,f){this.manager=t,this.transport=r,this.minPingDelay=f.minPingDelay,this.maxPingDelay=f.maxPingDelay,this.pingDelay=void 0}createConnection(t,r,f,h){h=Ot({},h,{activityTimeout:this.pingDelay});var p=this.transport.createConnection(t,r,f,h),S=null,I=function(){p.unbind("open",I),p.bind("closed",Z),S=Pt.now()},Z=dt=>{if(p.unbind("closed",Z),dt.code===1002||dt.code===1003)this.manager.reportDeath();else if(!dt.wasClean&&S){var pt=Pt.now()-S;pt<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(pt/2,this.minPingDelay))}};return p.bind("open",I),p}isSupported(t){return this.manager.isAlive()&&this.transport.isSupported(t)}}const e={decodeMessage:function(n){try{var t=JSON.parse(n.data),r=t.data;if(typeof r=="string")try{r=JSON.parse(t.data)}catch{}var f={event:t.event,channel:t.channel,data:r};return t.user_id&&(f.user_id=t.user_id),f}catch(h){throw{type:"MessageParseError",error:h,data:n.data}}},encodeMessage:function(n){return JSON.stringify(n)},processHandshake:function(n){var t=e.decodeMessage(n);if(t.event==="pusher:connection_established"){if(!t.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:t.data.socket_id,activityTimeout:t.data.activity_timeout*1e3}}else{if(t.event==="pusher:error")return{action:this.getCloseAction(t.data),error:this.getCloseError(t.data)};throw"Invalid handshake"}},getCloseAction:function(n){return n.code<4e3?n.code>=1002&&n.code<=1004?"backoff":null:n.code===4e3?"tls_only":n.code<4100?"refused":n.code<4200?"backoff":n.code<4300?"retry":"refused"},getCloseError:function(n){return n.code!==1e3&&n.code!==1001?{type:"PusherError",data:{code:n.code,message:n.reason||n.message}}:null}},a=e;class u extends Ht{constructor(t,r){super(),this.id=t,this.transport=r,this.activityTimeout=r.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(t){return this.transport.send(t)}send_event(t,r,f){var h={event:t,data:r};return f&&(h.channel=f),bt.debug("Event sent",h),this.send(a.encodeMessage(h))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var t={message:f=>{var h;try{h=a.decodeMessage(f)}catch(p){this.emit("error",{type:"MessageParseError",error:p,data:f.data})}if(h!==void 0){switch(bt.debug("Event recd",h),h.event){case"pusher:error":this.emit("error",{type:"PusherError",data:h.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong");break}this.emit("message",h)}},activity:()=>{this.emit("activity")},error:f=>{this.emit("error",f)},closed:f=>{r(),f&&f.code&&this.handleCloseEvent(f),this.transport=null,this.emit("closed")}},r=()=>{W(t,(f,h)=>{this.transport.unbind(h,f)})};W(t,(f,h)=>{this.transport.bind(h,f)})}handleCloseEvent(t){var r=a.getCloseAction(t),f=a.getCloseError(t);f&&this.emit("error",f),r&&this.emit(r,{action:r,error:f})}}class l{constructor(t,r){this.transport=t,this.callback=r,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=t=>{this.unbindListeners();var r;try{r=a.processHandshake(t)}catch(f){this.finish("error",{error:f}),this.transport.close();return}r.action==="connected"?this.finish("connected",{connection:new u(r.id,this.transport),activityTimeout:r.activityTimeout}):(this.finish(r.action,{error:r.error}),this.transport.close())},this.onClosed=t=>{this.unbindListeners();var r=a.getCloseAction(t)||"backoff",f=a.getCloseError(t);this.finish(r,{error:f})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(t,r){this.callback(Ot({transport:this.transport,action:t},r))}}class b{constructor(t,r){this.timeline=t,this.options=r||{}}send(t,r){this.timeline.isEmpty()||this.timeline.send(tt.TimelineTransport.getAgent(this,t),r)}}class _ extends Ht{constructor(t,r){super(function(f,h){bt.debug("No callbacks on "+t+" for "+f)}),this.name=t,this.pusher=r,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(t,r){return r(null,{auth:""})}trigger(t,r){if(t.indexOf("client-")!==0)throw new L("Event '"+t+"' does not start with 'client-'");if(!this.subscribed){var f=B.buildLogSuffix("triggeringClientEvents");bt.warn(`Client event triggered before channel 'subscription_succeeded' event . ${f}`)}return this.pusher.send_event(t,r,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(t){var r=t.event,f=t.data;if(r==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(t);else if(r==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(t);else if(r.indexOf("pusher_internal:")!==0){var h={};this.emit(r,f,h)}}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",t.data)}handleSubscriptionCountEvent(t){t.data.subscription_count&&(this.subscriptionCount=t.data.subscription_count),this.emit("pusher:subscription_count",t.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(t,r)=>{t?(this.subscriptionPending=!1,bt.error(t.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:t.message},t instanceof It?{status:t.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:r.auth,channel_data:r.channel_data,channel:this.name})}))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class O extends _{authorize(t,r){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:t},r)}}class k{constructor(){this.reset()}get(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members[t]}:null}each(t){W(this.members,(r,f)=>{t(this.get(f))})}setMyID(t){this.myID=t}onSubscription(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)}addMember(t){return this.get(t.user_id)===null&&this.count++,this.members[t.user_id]=t.user_info,this.get(t.user_id)}removeMember(t){var r=this.get(t.user_id);return r&&(delete this.members[t.user_id],this.count--),r}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}var at=function(n,t,r,f){function h(p){return p instanceof r?p:new r(function(S){S(p)})}return new(r||(r=Promise))(function(p,S){function I(pt){try{dt(f.next(pt))}catch(At){S(At)}}function Z(pt){try{dt(f.throw(pt))}catch(At){S(At)}}function dt(pt){pt.done?p(pt.value):h(pt.value).then(I,Z)}dt((f=f.apply(n,t||[])).next())})};class R extends O{constructor(t,r){super(t,r),this.members=new k}authorize(t,r){super.authorize(t,(f,h)=>at(this,void 0,void 0,function*(){if(!f)if(h=h,h.channel_data!=null){var p=JSON.parse(h.channel_data);this.members.setMyID(p.user_id)}else if(yield this.pusher.user.signinDonePromise,this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else{let S=B.buildLogSuffix("authorizationEndpoint");bt.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${S}, or the user should be signed in.`),r("Invalid auth response");return}r(f,h)}))}handleEvent(t){var r=t.event;if(r.indexOf("pusher_internal:")===0)this.handleInternalEvent(t);else{var f=t.data,h={};t.user_id&&(h.user_id=t.user_id),this.emit(r,f,h)}}handleInternalEvent(t){var r=t.event,f=t.data;switch(r){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(t);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(t);break;case"pusher_internal:member_added":var h=this.members.addMember(f);this.emit("pusher:member_added",h);break;case"pusher_internal:member_removed":var p=this.members.removeMember(f);p&&this.emit("pusher:member_removed",p);break}}handleSubscriptionSucceededEvent(t){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(t.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var H=D(978),z=D(594);class G extends O{constructor(t,r,f){super(t,r),this.key=null,this.nacl=f}authorize(t,r){super.authorize(t,(f,h)=>{if(f){r(f,h);return}let p=h.shared_secret;if(!p){r(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null);return}this.key=(0,z.decode)(p),delete h.shared_secret,r(null,h)})}trigger(t,r){throw new Dt("Client events are not currently supported for encrypted channels")}handleEvent(t){var r=t.event,f=t.data;if(r.indexOf("pusher_internal:")===0||r.indexOf("pusher:")===0){super.handleEvent(t);return}this.handleEncryptedEvent(r,f)}handleEncryptedEvent(t,r){if(!this.key){bt.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!r.ciphertext||!r.nonce){bt.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+r);return}let f=(0,z.decode)(r.ciphertext);if(f.length<this.nacl.secretbox.overheadLength){bt.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${f.length}`);return}let h=(0,z.decode)(r.nonce);if(h.length<this.nacl.secretbox.nonceLength){bt.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${h.length}`);return}let p=this.nacl.secretbox.open(f,h,this.key);if(p===null){bt.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,(S,I)=>{if(S){bt.error(`Failed to make a request to the authEndpoint: ${I}. Unable to fetch new key, so dropping encrypted event`);return}if(p=this.nacl.secretbox.open(f,h,this.key),p===null){bt.error("Failed to decrypt event with new key. Dropping encrypted event");return}this.emit(t,this.getDataToEmit(p))});return}this.emit(t,this.getDataToEmit(p))}getDataToEmit(t){let r=(0,H.D4)(t);try{return JSON.parse(r)}catch{return r}}}class K extends Ht{constructor(t,r){super(),this.state="initialized",this.connection=null,this.key=t,this.options=r,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var f=tt.getNetwork();f.bind("online",()=>{this.timeline.info({netinfo:"online"}),(this.state==="connecting"||this.state==="unavailable")&&this.retryIn(0)}),f.bind("offline",()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()}),this.updateStrategy()}switchCluster(t){this.key=t,this.updateStrategy(),this.retryIn(0)}connect(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}}send(t){return this.connection?this.connection.send(t):!1}send_event(t,r,f){return this.connection?this.connection.send_event(t,r,f):!1}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var t=(r,f)=>{r?this.runner=this.strategy.connect(0,t):f.action==="error"?(this.emit("error",{type:"HandshakeError",error:f.error}),this.timeline.error({handshakeError:f.error})):(this.abortConnecting(),this.handshakeCallbacks[f.action](f))};this.runner=this.strategy.connect(0,t)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var t=this.abandonConnection();t.close()}}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(t){this.timeline.info({action:"retry",delay:t}),t>0&&this.emit("connecting_in",Math.round(t/1e3)),this.retryTimer=new Yt(t||0,()=>{this.disconnectInternally(),this.connect()})}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new Yt(this.options.unavailableTimeout,()=>{this.updateState("unavailable")})}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new Yt(this.options.pongTimeout,()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)})}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new Yt(this.activityTimeout,()=>{this.sendActivityCheck()}))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(t){return Ot({},t,{message:r=>{this.resetActivityCheck(),this.emit("message",r)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:r=>{this.emit("error",r)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(t){return Ot({},t,{connected:r=>{this.activityTimeout=Math.min(this.options.activityTimeout,r.activityTimeout,r.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(r.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let t=r=>f=>{f.error&&this.emit("error",{type:"WebSocketError",error:f.error}),r(f)};return{tls_only:t(()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)}),refused:t(()=>{this.disconnect()}),backoff:t(()=>{this.retryIn(1e3)}),retry:t(()=>{this.retryIn(0)})}}setConnection(t){this.connection=t;for(var r in this.connectionCallbacks)this.connection.bind(r,this.connectionCallbacks[r]);this.resetActivityCheck()}abandonConnection(){if(this.connection){this.stopActivityCheck();for(var t in this.connectionCallbacks)this.connection.unbind(t,this.connectionCallbacks[t]);var r=this.connection;return this.connection=null,r}}updateState(t,r){var f=this.state;if(this.state=t,f!==t){var h=t;h==="connected"&&(h+=" with new socket ID "+r.socket_id),bt.debug("State changed",f+" -> "+h),this.timeline.info({state:t,params:r}),this.emit("state_change",{previous:f,current:t}),this.emit(t,r)}}shouldRetry(){return this.state==="connecting"||this.state==="connected"}}class q{constructor(){this.channels={}}add(t,r){return this.channels[t]||(this.channels[t]=X(t,r)),this.channels[t]}all(){return Ge(this.channels)}find(t){return this.channels[t]}remove(t){var r=this.channels[t];return delete this.channels[t],r}disconnect(){W(this.channels,function(t){t.disconnect()})}}function X(n,t){if(n.indexOf("private-encrypted-")===0){if(t.config.nacl)return A.createEncryptedChannel(n,t,t.config.nacl);let r="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",f=B.buildLogSuffix("encryptedChannelSupport");throw new Dt(`${r}. ${f}`)}else{if(n.indexOf("private-")===0)return A.createPrivateChannel(n,t);if(n.indexOf("presence-")===0)return A.createPresenceChannel(n,t);if(n.indexOf("#")===0)throw new J('Cannot create a channel with name "'+n+'".');return A.createChannel(n,t)}}var F={createChannels(){return new q},createConnectionManager(n,t){return new K(n,t)},createChannel(n,t){return new _(n,t)},createPrivateChannel(n,t){return new O(n,t)},createPresenceChannel(n,t){return new R(n,t)},createEncryptedChannel(n,t,r){return new G(n,t,r)},createTimelineSender(n,t){return new b(n,t)},createHandshake(n,t){return new l(n,t)},createAssistantToTheTransportManager(n,t,r){return new s(n,t,r)}};const A=F;class U{constructor(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}getAssistant(t){return A.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class T{constructor(t,r){this.strategies=t,this.loop=!!r.loop,this.failFast=!!r.failFast,this.timeout=r.timeout,this.timeoutLimit=r.timeoutLimit}isSupported(){return Ze(this.strategies,Pt.method("isSupported"))}connect(t,r){var f=this.strategies,h=0,p=this.timeout,S=null,I=(Z,dt)=>{dt?r(null,dt):(h=h+1,this.loop&&(h=h%f.length),h<f.length?(p&&(p=p*2,this.timeoutLimit&&(p=Math.min(p,this.timeoutLimit))),S=this.tryStrategy(f[h],t,{timeout:p,failFast:this.failFast},I)):r(!0))};return S=this.tryStrategy(f[h],t,{timeout:p,failFast:this.failFast},I),{abort:function(){S.abort()},forceMinPriority:function(Z){t=Z,S&&S.forceMinPriority(Z)}}}tryStrategy(t,r,f,h){var p=null,S=null;return f.timeout>0&&(p=new Yt(f.timeout,function(){S.abort(),h(!0)})),S=t.connect(r,function(I,Z){I&&p&&p.isRunning()&&!f.failFast||(p&&p.ensureAborted(),h(I,Z))}),{abort:function(){p&&p.ensureAborted(),S.abort()},forceMinPriority:function(I){S.forceMinPriority(I)}}}}class N{constructor(t){this.strategies=t}isSupported(){return Ze(this.strategies,Pt.method("isSupported"))}connect(t,r){return j(this.strategies,t,function(f,h){return function(p,S){if(h[f].error=p,p){P(h)&&r(!0);return}ce(h,function(I){I.forceMinPriority(S.transport.priority)}),r(null,S)}})}}function j(n,t,r){var f=xe(n,function(h,p,S,I){return h.connect(t,r(p,I))});return{abort:function(){ce(f,d)},forceMinPriority:function(h){ce(f,function(p){p.forceMinPriority(h)})}}}function P(n){return ar(n,function(t){return!!t.error})}function d(n){!n.error&&!n.aborted&&(n.abort(),n.aborted=!0)}class x{constructor(t,r,f){this.strategy=t,this.transports=r,this.ttl=f.ttl||18e5,this.usingTLS=f.useTLS,this.timeline=f.timeline}isSupported(){return this.strategy.isSupported()}connect(t,r){var f=this.usingTLS,h=g(f),p=h&&h.cacheSkipCount?h.cacheSkipCount:0,S=[this.strategy];if(h&&h.timestamp+this.ttl>=Pt.now()){var I=this.transports[h.transport];I&&(["ws","wss"].includes(h.transport)||p>3?(this.timeline.info({cached:!0,transport:h.transport,latency:h.latency}),S.push(new T([I],{timeout:h.latency*2+1e3,failFast:!0}))):p++)}var Z=Pt.now(),dt=S.pop().connect(t,function pt(At,or){At?(m(f),S.length>0?(Z=Pt.now(),dt=S.pop().connect(t,pt)):r(At)):(v(f,or.transport.name,Pt.now()-Z,p),r(null,or))});return{abort:function(){dt.abort()},forceMinPriority:function(pt){t=pt,dt&&dt.forceMinPriority(pt)}}}}function y(n){return"pusherTransport"+(n?"TLS":"NonTLS")}function g(n){var t=tt.getLocalStorage();if(t)try{var r=t[y(n)];if(r)return JSON.parse(r)}catch{m(n)}return null}function v(n,t,r,f){var h=tt.getLocalStorage();if(h)try{h[y(n)]=Vt({timestamp:Pt.now(),transport:t,latency:r,cacheSkipCount:f})}catch{}}function m(n){var t=tt.getLocalStorage();if(t)try{delete t[y(n)]}catch{}}class M{constructor(t,{delay:r}){this.strategy=t,this.options={delay:r}}isSupported(){return this.strategy.isSupported()}connect(t,r){var f=this.strategy,h,p=new Yt(this.options.delay,function(){h=f.connect(t,r)});return{abort:function(){p.ensureAborted(),h&&h.abort()},forceMinPriority:function(S){t=S,h&&h.forceMinPriority(S)}}}}class Y{constructor(t,r,f){this.test=t,this.trueBranch=r,this.falseBranch=f}isSupported(){var t=this.test()?this.trueBranch:this.falseBranch;return t.isSupported()}connect(t,r){var f=this.test()?this.trueBranch:this.falseBranch;return f.connect(t,r)}}class V{constructor(t){this.strategy=t}isSupported(){return this.strategy.isSupported()}connect(t,r){var f=this.strategy.connect(t,function(h,p){p&&f.abort(),r(h,p)});return f}}function $(n){return function(){return n.isSupported()}}var c=function(n,t,r){var f={};function h(Ar,vn,yn,mn,_n){var Pr=r(n,Ar,vn,yn,mn,_n);return f[Ar]=Pr,Pr}var p=Object.assign({},t,{hostNonTLS:n.wsHost+":"+n.wsPort,hostTLS:n.wsHost+":"+n.wssPort,httpPath:n.wsPath}),S=Object.assign({},p,{useTLS:!0}),I=Object.assign({},t,{hostNonTLS:n.httpHost+":"+n.httpPort,hostTLS:n.httpHost+":"+n.httpsPort,httpPath:n.httpPath}),Z={loop:!0,timeout:15e3,timeoutLimit:6e4},dt=new U({minPingDelay:1e4,maxPingDelay:n.activityTimeout}),pt=new U({lives:2,minPingDelay:1e4,maxPingDelay:n.activityTimeout}),At=h("ws","ws",3,p,dt),or=h("wss","ws",3,S,dt),dn=h("sockjs","sockjs",1,I),_r=h("xhr_streaming","xhr_streaming",1,I,pt),xn=h("xdr_streaming","xdr_streaming",1,I,pt),wr=h("xhr_polling","xhr_polling",1,I),pn=h("xdr_polling","xdr_polling",1,I),Sr=new T([At],Z),gn=new T([or],Z),bn=new T([dn],Z),Cr=new T([new Y($(_r),_r,xn)],Z),Tr=new T([new Y($(wr),wr,pn)],Z),Er=new T([new Y($(Cr),new N([Cr,new M(Tr,{delay:4e3})]),Tr)],Z),ur=new Y($(Er),Er,bn),lr;return t.useTLS?lr=new N([Sr,new M(ur,{delay:2e3})]):lr=new N([Sr,new M(gn,{delay:2e3}),new M(ur,{delay:5e3})]),new x(new V(new Y($(At),lr,ur)),f,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})};const rt=c;function ft(){var n=this;n.timeline.info(n.buildTimelineMessage({transport:n.name+(n.options.useTLS?"s":"")})),n.hooks.isInitialized()?n.changeState("initialized"):n.hooks.file?(n.changeState("initializing"),wt.load(n.hooks.file,{useTLS:n.options.useTLS},function(t,r){n.hooks.isInitialized()?(n.changeState("initialized"),r(!0)):(t&&n.onError(t),n.onClose(),r(!1))})):n.onClose()}var ct={getRequest:function(n){var t=new window.XDomainRequest;return t.ontimeout=function(){n.emit("error",new xt),n.close()},t.onerror=function(r){n.emit("error",r),n.close()},t.onprogress=function(){t.responseText&&t.responseText.length>0&&n.onChunk(200,t.responseText)},t.onload=function(){t.responseText&&t.responseText.length>0&&n.onChunk(200,t.responseText),n.emit("finished",200),n.close()},t},abortRequest:function(n){n.ontimeout=n.onerror=n.onprogress=n.onload=null,n.abort()}};const Q=ct,st=256*1024;class ot extends Ht{constructor(t,r,f){super(),this.hooks=t,this.method=r,this.url=f}start(t){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},tt.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(t)}close(){this.unloader&&(tt.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(t,r){for(;;){var f=this.advanceBuffer(r);if(f)this.emit("chunk",{status:t,data:f});else break}this.isBufferTooLong(r)&&this.emit("buffer_too_long")}advanceBuffer(t){var r=t.slice(this.position),f=r.indexOf(`
|
|
8
|
+
`);return f!==-1?(this.position+=f+1,r.slice(0,f)):null}isBufferTooLong(t){return this.position===t.length&&t.length>st}}var vt;(function(n){n[n.CONNECTING=0]="CONNECTING",n[n.OPEN=1]="OPEN",n[n.CLOSED=3]="CLOSED"})(vt||(vt={}));const it=vt;var yt=1;class mt{constructor(t,r){this.hooks=t,this.session=Lt(1e3)+"/"+Nr(8),this.location=_t(r),this.readyState=it.CONNECTING,this.openStream()}send(t){return this.sendRaw(JSON.stringify([t]))}ping(){this.hooks.sendHeartbeat(this)}close(t,r){this.onClose(t,r,!0)}sendRaw(t){if(this.readyState===it.OPEN)try{return tt.createSocketRequest("POST",kt(Tt(this.location,this.session))).start(t),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(t,r,f){this.closeStream(),this.readyState=it.CLOSED,this.onclose&&this.onclose({code:t,reason:r,wasClean:f})}onChunk(t){if(t.status===200){this.readyState===it.OPEN&&this.onActivity();var r,f=t.data.slice(0,1);switch(f){case"o":r=JSON.parse(t.data.slice(1)||"{}"),this.onOpen(r);break;case"a":r=JSON.parse(t.data.slice(1)||"[]");for(var h=0;h<r.length;h++)this.onEvent(r[h]);break;case"m":r=JSON.parse(t.data.slice(1)||"null"),this.onEvent(r);break;case"h":this.hooks.onHeartbeat(this);break;case"c":r=JSON.parse(t.data.slice(1)||"[]"),this.onClose(r[0],r[1],!0);break}}}onOpen(t){this.readyState===it.CONNECTING?(t&&t.hostname&&(this.location.base=jt(this.location.base,t.hostname)),this.readyState=it.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(t){this.readyState===it.OPEN&&this.onmessage&&this.onmessage({data:t})}onActivity(){this.onactivity&&this.onactivity()}onError(t){this.onerror&&this.onerror(t)}openStream(){this.stream=tt.createSocketRequest("POST",kt(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",t=>{this.onChunk(t)}),this.stream.bind("finished",t=>{this.hooks.onFinished(this,t)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(t){Pt.defer(()=>{this.onError(t),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function _t(n){var t=/([^\?]*)\/*(\??.*)/.exec(n);return{base:t[1],queryString:t[2]}}function Tt(n,t){return n.base+"/"+t+"/xhr_send"}function kt(n){var t=n.indexOf("?")===-1?"?":"&";return n+t+"t="+ +new Date+"&n="+yt++}function jt(n,t){var r=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(n);return r[1]+t+r[3]}function Lt(n){return tt.randomInt(n)}function Nr(n){for(var t=[],r=0;r<n;r++)t.push(Lt(32).toString(32));return t.join("")}const Or=mt;var jr={getReceiveURL:function(n,t){return n.base+"/"+t+"/xhr_streaming"+n.queryString},onHeartbeat:function(n){n.sendRaw("[]")},sendHeartbeat:function(n){n.sendRaw("[]")},onFinished:function(n,t){n.onClose(1006,"Connection interrupted ("+t+")",!1)}};const Ur=jr;var Ir={getReceiveURL:function(n,t){return n.base+"/"+t+"/xhr"+n.queryString},onHeartbeat:function(){},sendHeartbeat:function(n){n.sendRaw("[]")},onFinished:function(n,t){t===200?n.reconnect():n.onClose(1006,"Connection interrupted ("+t+")",!1)}};const Mr=Ir;var Br={getRequest:function(n){var t=tt.getXHRAPI(),r=new t;return r.onreadystatechange=r.onprogress=function(){switch(r.readyState){case 3:r.responseText&&r.responseText.length>0&&n.onChunk(r.status,r.responseText);break;case 4:r.responseText&&r.responseText.length>0&&n.onChunk(r.status,r.responseText),n.emit("finished",r.status),n.close();break}},r},abortRequest:function(n){n.onreadystatechange=null,n.abort()}};const Dr=Br;var zr={createStreamingSocket(n){return this.createSocket(Ur,n)},createPollingSocket(n){return this.createSocket(Mr,n)},createSocket(n,t){return new Or(n,t)},createXHR(n,t){return this.createRequest(Dr,n,t)},createRequest(n,t,r){return new ot(n,t,r)}};const gr=zr;gr.createXDR=function(n,t){return this.createRequest(Q,n,t)};var Hr={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:C,DependenciesReceivers:Bt,getDefaultStrategy:rt,Transports:nr,transportConnectionInitializer:ft,HTTPFactory:gr,TimelineTransport:ze,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(n){window.Pusher=n;var t=()=>{this.onDocumentBody(n.ready)};window.JSON?t():wt.load("json2",{},t)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:se,jsonp:Me}},onDocumentBody(n){document.body?n():setTimeout(()=>{this.onDocumentBody(n)},0)},createJSONPRequest(n,t){return new Be(n,t)},createScriptRequest(n){return new Se(n)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var n=this.getXHRAPI();return new n},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return o},createWebSocket(n){var t=this.getWebSocketAPI();return new t(n)},createSocketRequest(n,t){if(this.isXHRSupported())return this.HTTPFactory.createXHR(n,t);if(this.isXDRSupported(t.indexOf("https:")===0))return this.HTTPFactory.createXDR(n,t);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var n=this.getXHRAPI();return!!n&&new n().withCredentials!==void 0},isXDRSupported(n){var t=n?"https:":"http:",r=this.getProtocol();return!!window.XDomainRequest&&r===t},addUnloadListener(n){window.addEventListener!==void 0?window.addEventListener("unload",n,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",n)},removeUnloadListener(n){window.addEventListener!==void 0?window.removeEventListener("unload",n,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",n)},randomInt(n){return Math.floor(function(){return(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)}()*n)}};const tt=Hr;var hr;(function(n){n[n.ERROR=3]="ERROR",n[n.INFO=6]="INFO",n[n.DEBUG=7]="DEBUG"})(hr||(hr={}));const ir=hr;class qr{constructor(t,r,f){this.key=t,this.session=r,this.events=[],this.options=f||{},this.sent=0,this.uniqueID=0}log(t,r){t<=this.options.level&&(this.events.push(Ot({},r,{timestamp:Pt.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(t){this.log(ir.ERROR,t)}info(t){this.log(ir.INFO,t)}debug(t){this.log(ir.DEBUG,t)}isEmpty(){return this.events.length===0}send(t,r){var f=Ot({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(f,(h,p)=>{h||this.sent++,r&&r(h,p)}),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class Fr{constructor(t,r,f,h){this.name=t,this.priority=r,this.transport=f,this.options=h||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(t,r){if(this.isSupported()){if(this.priority<t)return br(new Et,r)}else return br(new Xt,r);var f=!1,h=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),p=null,S=function(){h.unbind("initialized",S),h.connect()},I=function(){p=A.createHandshake(h,function(At){f=!0,pt(),r(null,At)})},Z=function(At){pt(),r(At)},dt=function(){pt();var At;At=Vt(h),r(new Nt(At))},pt=function(){h.unbind("initialized",S),h.unbind("open",I),h.unbind("error",Z),h.unbind("closed",dt)};return h.bind("initialized",S),h.bind("open",I),h.bind("error",Z),h.bind("closed",dt),h.initialize(),{abort:()=>{f||(pt(),p?p.close():h.close())},forceMinPriority:At=>{f||this.priority<At&&(p?p.close():h.close())}}}}function br(n,t){return Pt.defer(function(){t(n)}),{abort:function(){},forceMinPriority:function(){}}}const{Transports:Yr}=tt;var $r=function(n,t,r,f,h,p){var S=Yr[r];if(!S)throw new re(r);var I=(!n.enabledTransports||$t(n.enabledTransports,t)!==-1)&&(!n.disabledTransports||$t(n.disabledTransports,t)===-1),Z;return I?(h=Object.assign({ignoreNullOrigin:n.ignoreNullOrigin},h),Z=new Fr(t,f,p?p.getAssistant(S):S,h)):Z=Xr,Z},Xr={isSupported:function(){return!1},connect:function(n,t){var r=Pt.defer(function(){t(new Xt)});return{abort:function(){r.ensureAborted()},forceMinPriority:function(){}}}};function vr(n){if(n==null)throw"You must pass an options object";if(n.cluster==null)throw"Options object must provide a cluster";"disableStats"in n&&bt.warn("The disableStats option is deprecated in favor of enableStats")}const Jr=(n,t)=>{var r="socket_id="+encodeURIComponent(n.socketId);for(var f in t.params)r+="&"+encodeURIComponent(f)+"="+encodeURIComponent(t.params[f]);if(t.paramsProvider!=null){let h=t.paramsProvider();for(var f in h)r+="&"+encodeURIComponent(f)+"="+encodeURIComponent(h[f])}return r},Wr=n=>{if(typeof tt.getAuthorizers()[n.transport]>"u")throw`'${n.transport}' is not a recognized auth transport`;return(t,r)=>{const f=Jr(t,n);tt.getAuthorizers()[n.transport](tt,f,n,w.UserAuthentication,r)}},Kr=(n,t)=>{var r="socket_id="+encodeURIComponent(n.socketId);r+="&channel_name="+encodeURIComponent(n.channelName);for(var f in t.params)r+="&"+encodeURIComponent(f)+"="+encodeURIComponent(t.params[f]);if(t.paramsProvider!=null){let h=t.paramsProvider();for(var f in h)r+="&"+encodeURIComponent(f)+"="+encodeURIComponent(h[f])}return r},Gr=n=>{if(typeof tt.getAuthorizers()[n.transport]>"u")throw`'${n.transport}' is not a recognized auth transport`;return(t,r)=>{const f=Kr(t,n);tt.getAuthorizers()[n.transport](tt,f,n,w.ChannelAuthorization,r)}},Vr=(n,t,r)=>{const f={authTransport:t.transport,authEndpoint:t.endpoint,auth:{params:t.params,headers:t.headers}};return(h,p)=>{const S=n.channel(h.channelName);r(S,f).authorize(h.socketId,p)}};function yr(n,t){let r={activityTimeout:n.activityTimeout||et.activityTimeout,cluster:n.cluster,httpPath:n.httpPath||et.httpPath,httpPort:n.httpPort||et.httpPort,httpsPort:n.httpsPort||et.httpsPort,pongTimeout:n.pongTimeout||et.pongTimeout,statsHost:n.statsHost||et.stats_host,unavailableTimeout:n.unavailableTimeout||et.unavailableTimeout,wsPath:n.wsPath||et.wsPath,wsPort:n.wsPort||et.wsPort,wssPort:n.wssPort||et.wssPort,enableStats:rn(n),httpHost:Zr(n),useTLS:en(n),wsHost:Qr(n),userAuthenticator:nn(n),channelAuthorizer:on(n,t)};return"disabledTransports"in n&&(r.disabledTransports=n.disabledTransports),"enabledTransports"in n&&(r.enabledTransports=n.enabledTransports),"ignoreNullOrigin"in n&&(r.ignoreNullOrigin=n.ignoreNullOrigin),"timelineParams"in n&&(r.timelineParams=n.timelineParams),"nacl"in n&&(r.nacl=n.nacl),r}function Zr(n){return n.httpHost?n.httpHost:n.cluster?`sockjs-${n.cluster}.pusher.com`:et.httpHost}function Qr(n){return n.wsHost?n.wsHost:tn(n.cluster)}function tn(n){return`ws-${n}.pusher.com`}function en(n){return tt.getProtocol()==="https:"?!0:n.forceTLS!==!1}function rn(n){return"enableStats"in n?n.enableStats:"disableStats"in n?!n.disableStats:!1}const mr=n=>"customHandler"in n&&n.customHandler!=null;function nn(n){const t=Object.assign(Object.assign({},et.userAuthentication),n.userAuthentication);return mr(t)?t.customHandler:Wr(t)}function sn(n,t){let r;if("channelAuthorization"in n)r=Object.assign(Object.assign({},et.channelAuthorization),n.channelAuthorization);else if(r={transport:n.authTransport||et.authTransport,endpoint:n.authEndpoint||et.authEndpoint},"auth"in n&&("params"in n.auth&&(r.params=n.auth.params),"headers"in n.auth&&(r.headers=n.auth.headers)),"authorizer"in n)return{customHandler:Vr(t,r,n.authorizer)};return r}function on(n,t){const r=sn(n,t);return mr(r)?r.customHandler:Gr(r)}class an extends Ht{constructor(t){super(function(r,f){bt.debug(`No callbacks on watchlist events for ${r}`)}),this.pusher=t,this.bindWatchlistInternalEvent()}handleEvent(t){t.data.events.forEach(r=>{this.emit(r.name,r)})}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",t=>{var r=t.event;r==="pusher_internal:watchlist_events"&&this.handleEvent(t)})}}function fn(){let n,t;return{promise:new Promise((f,h)=>{n=f,t=h}),resolve:n,reject:t}}const cn=fn;class hn extends Ht{constructor(t){super(function(r,f){bt.debug("No callbacks on user for "+r)}),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(r,f)=>{if(r){bt.warn(`Error during signin: ${r}`),this._cleanup();return}this.pusher.send_event("pusher:signin",{auth:f.auth,user_data:f.user_data})},this.pusher=t,this.pusher.connection.bind("state_change",({previous:r,current:f})=>{r!=="connected"&&f==="connected"&&this._signin(),r==="connected"&&f!=="connected"&&(this._cleanup(),this._newSigninPromiseIfNeeded())}),this.watchlist=new an(t),this.pusher.connection.bind("message",r=>{var f=r.event;f==="pusher:signin_success"&&this._onSigninSuccess(r.data),this.serverToUserChannel&&this.serverToUserChannel.name===r.channel&&this.serverToUserChannel.handleEvent(r)})}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),this.pusher.connection.state==="connected"&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(t){try{this.user_data=JSON.parse(t.user_data)}catch{bt.error(`Failed parsing user data after signin: ${t.user_data}`),this._cleanup();return}if(typeof this.user_data.id!="string"||this.user_data.id===""){bt.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){const t=r=>{r.subscriptionPending&&r.subscriptionCancelled?r.reinstateSubscription():!r.subscriptionPending&&this.pusher.connection.state==="connected"&&r.subscribe()};this.serverToUserChannel=new _(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global((r,f)=>{r.indexOf("pusher_internal:")===0||r.indexOf("pusher:")===0||this.emit(r,f)}),t(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested||this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:t,resolve:r}=cn();t.done=!1;const f=()=>{t.done=!0};t.then(f).catch(f),this.signinDonePromise=t,this._signinDoneResolve=r}}class Mt{static ready(){Mt.isReady=!0;for(var t=0,r=Mt.instances.length;t<r;t++)Mt.instances[t].connect()}static getClientFeatures(){return zt(pe({ws:tt.Transports.ws},function(t){return t.isSupported({})}))}constructor(t,r){un(t),vr(r),this.key=t,this.options=r,this.config=yr(this.options,this),this.channels=A.createChannels(),this.global_emitter=new Ht,this.sessionID=tt.randomInt(1e9),this.timeline=new qr(this.key,this.sessionID,{cluster:this.config.cluster,features:Mt.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:ir.INFO,version:et.VERSION}),this.config.enableStats&&(this.timelineSender=A.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+tt.TimelineTransport.name}));var f=h=>tt.getDefaultStrategy(this.config,h,$r);this.connection=A.createConnectionManager(this.key,{getStrategy:f,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind("connected",()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())}),this.connection.bind("message",h=>{var p=h.event,S=p.indexOf("pusher_internal:")===0;if(h.channel){var I=this.channel(h.channel);I&&I.handleEvent(h)}S||this.global_emitter.emit(h.event,h.data)}),this.connection.bind("connecting",()=>{this.channels.disconnect()}),this.connection.bind("disconnected",()=>{this.channels.disconnect()}),this.connection.bind("error",h=>{bt.warn(h)}),Mt.instances.push(this),this.timeline.info({instances:Mt.instances.length}),this.user=new hn(this),Mt.isReady&&this.connect()}switchCluster(t){const{appKey:r,cluster:f}=t;this.key=r,this.options=Object.assign(Object.assign({},this.options),{cluster:f}),this.config=yr(this.options,this),this.connection.switchCluster(this.key)}channel(t){return this.channels.find(t)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var t=this.connection.isUsingTLS(),r=this.timelineSender;this.timelineSenderTimer=new fe(6e4,function(){r.send(t)})}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(t,r,f){return this.global_emitter.bind(t,r,f),this}unbind(t,r,f){return this.global_emitter.unbind(t,r,f),this}bind_global(t){return this.global_emitter.bind_global(t),this}unbind_global(t){return this.global_emitter.unbind_global(t),this}unbind_all(t){return this.global_emitter.unbind_all(),this}subscribeAll(){var t;for(t in this.channels.channels)this.channels.channels.hasOwnProperty(t)&&this.subscribe(t)}subscribe(t){var r=this.channels.add(t,this);return r.subscriptionPending&&r.subscriptionCancelled?r.reinstateSubscription():!r.subscriptionPending&&this.connection.state==="connected"&&r.subscribe(),r}unsubscribe(t){var r=this.channels.find(t);r&&r.subscriptionPending?r.cancelSubscription():(r=this.channels.remove(t),r&&r.subscribed&&r.unsubscribe())}send_event(t,r,f){return this.connection.send_event(t,r,f)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}Mt.instances=[],Mt.isReady=!1,Mt.logToConsole=!1,Mt.Runtime=tt,Mt.ScriptReceivers=tt.ScriptReceivers,Mt.DependenciesReceivers=tt.DependenciesReceivers,Mt.auth_callbacks=tt.auth_callbacks;const ke=Mt;function un(n){if(n==null)throw"You must pass your app key when you instantiate Pusher."}tt.setup(Mt);var ln=D(601);class sr extends ke{constructor(t,r){ke.logToConsole=sr.logToConsole,ke.log=sr.log,vr(r),r.nacl=ln,super(t,r)}}},281(){}},Wt={};function Kt(Ct){var ht=Wt[Ct];if(ht!==void 0)return ht.exports;var D=Wt[Ct]={exports:{}};return Ft[Ct].call(D.exports,D,D.exports,Kt),D.exports}Kt.d=(Ct,ht)=>{for(var D in ht)Kt.o(ht,D)&&!Kt.o(Ct,D)&&Object.defineProperty(Ct,D,{enumerable:!0,get:ht[D]})},Kt.o=(Ct,ht)=>Object.prototype.hasOwnProperty.call(Ct,ht);var Le=Kt(42);return Le})())})(dr)),dr.exports}var xr,Lr;function Pn(){return Lr||(Lr=1,xr=An()),xr}var kn=Pn();const Ln=Sn(kn),pr=`${Ut.BASE_URL}/api/notification`,Rn=gt=>Ut.api.get(pr,{params:{...gt}}),Nn=gt=>Ut.api.put(`${pr}/${gt}`),On=()=>Ut.api.put(`${pr}/updateAllStatus`),jn={currentPage:1,pageSize:30,searchString:"",isRead:!1},Un="Notification list",Rr="NOTIFICATION_CHANNEL",In="NEW_NOTIFICATION",Mn=()=>{const gt=ve.useDispatch(),ie=ve.useSelector(nt=>{var St;return(St=nt.common.user)==null?void 0:St.id}),Ft=ve.useSelector(nt=>nt.notification.notificationList),Wt=ve.useSelector(nt=>nt.common.user.pusherKey),Kt=ve.useSelector(nt=>nt.common.user.pusherCluster),Le=ve.useSelector(nt=>nt.notification.totalItems),Ct=ve.useSelector(nt=>nt.notification.unReadNotification),[ht,D]=le.useState(jn),[E,C]=le.useState(!1),Rt=nt=>D({...ht,...nt}),et=nt=>{var w,L,J,xt;const{source:St,extraData:B}=nt;switch(St){case"NewConferenceCreated":window.open(`/start-conference/${(w=JSON.parse(B))==null?void 0:w[0]}/${(L=JSON.parse(B))==null?void 0:L[1]}`);break;case"NewSessionCreated":window.open(`/start-session/${(J=JSON.parse(B))==null?void 0:J[0]}/${(xt=JSON.parse(B))==null?void 0:xt[1]}`);break}},lt=le.useCallback(async()=>{var nt,St;gt(Ut.setLoading(!0));try{const B=await Rn(ht),{items:w,totalItems:L}=B.data;gt(Ut.setNotification({notificationList:w,totalItems:L}))}catch(B){gt(Ut.setAlert({type:"danger",message:((St=(nt=B.response)==null?void 0:nt.data)==null?void 0:St.title)||B.message}))}gt(Ut.setLoading(!1))},[ht]);le.useEffect(()=>{document.title=Un},[]),le.useEffect(()=>{lt();const nt=new Ln(Wt,{cluster:Kt});return nt.subscribe(`${Rr}-${ie}`).bind(In,lt),()=>nt.unsubscribe(`${Rr}-${ie}`)},[ht,ie]);const Bt=le.useCallback((nt,St)=>{var B,w;try{gt(Ut.setModal({isOpen:!0,type:"warning",message:`Do you want to mark this notification ${St?"read":"unread"}?`,onConfirm:async()=>{await Nn(nt),lt()}}))}catch(L){gt(Ut.setAlert({type:"danger",message:((w=(B=L.response)==null?void 0:B.data)==null?void 0:w.title)||L.message}))}},[Ft,Ct]),wt=le.useCallback(async()=>{var nt,St;try{if(Ft.length===0)throw new Error("There are no unread messages");gt(Ut.setModal({isOpen:!0,type:"warning",message:"Do you want to mark all notification ?",onConfirm:async()=>{C(!0),await On(),lt(),C(!1)}}))}catch(B){gt(Ut.setAlert({type:"danger",message:((St=(nt=B.response)==null?void 0:nt.data)==null?void 0:St.title)||B.message}))}},[Ft]);return{notificationList:Ft,totalItems:Le,unReadNotification:Ct,filters:ht,changeFilters:Rt,updateNotification:Bt,viewNotification:et,updateAll:wt,toggleUpdateAllStatus:E}},Bn="Notification list",Dn=20,zn=()=>{const{notificationList:gt,totalItems:ie,filters:Ft,changeFilters:Wt,updateNotification:Kt,viewNotification:Le,updateAll:Ct,toggleUpdateAllStatus:ht}=Mn();return ut.jsxs("div",{className:"animated fadeIn",style:{padding:"20px 40px"},children:[ut.jsx("h5",{className:"mb-2",children:Bn}),ut.jsxs(ee.Row,{className:"my-2",children:[ut.jsx(ee.Col,{md:8,children:ut.jsx(Ut.SearchBox,{initValue:Ft.searchString,onSearch:D=>Wt({searchString:D}),placeholder:"Type something to search"})}),ut.jsx(ee.Col,{md:4,children:ut.jsx(En,{value:Ft.isRead,onChange:D=>Wt({isRead:D.value})})})]}),ut.jsx(ee.Row,{className:"my-2 d-flex justify-content-center",children:ut.jsxs(ee.Col,{md:12,className:"d-flex justify-content-end align-items-center",children:[Ft.isRead===!1&&ut.jsxs("div",{className:"d-flex align-items-center justify-content-end mx-2",children:["Mark all as read",ut.jsx(ee.Input,{checked:ht,className:"mx-2",type:"checkbox",id:"status-checkbox",onChange:()=>Ct()})]}),"Total of notifications: ",ie]})}),ut.jsxs(ee.Row,{className:"mb-2",children:[ut.jsx(ee.Col,{md:12,children:gt&>.length>0?ut.jsx("div",{children:ut.jsxs(ee.Table,{bordered:!0,hover:!0,striped:!0,responsive:!0,size:"sm",children:[ut.jsx("thead",{children:ut.jsxs("tr",{children:[ut.jsx("th",{className:"align-top",children:"Text"}),ut.jsx("th",{className:"align-top",children:"Time"}),ut.jsx("th",{className:"text-center",children:"Is read"}),ut.jsx("th",{className:"text-center",children:"Action"})]})}),ut.jsx("tbody",{children:gt.map(D=>ut.jsxs("tr",{children:[ut.jsx("td",{className:"align-middle",children:D.text}),ut.jsx("td",{className:"align-middle",children:Ut.utcToLocalTime(D.time,"yyyy-MM-DD HH:mm")}),ut.jsx("td",{className:`${Ut.styles["control-input"]} text-center align-middle`,children:ut.jsx(ee.Input,{type:"checkbox",id:`status-checkbox-${D.id}`,checked:D.isRead,onChange:()=>Kt(D.id,!D.isRead)})}),ut.jsx("td",{className:"text-center align-middle",children:["AssessmentAssignment","NewConferenceCreated","NewSessionCreated","CertificateApproved"].includes(D.source)&&ut.jsx(wn.AiOutlineEye,{className:"cursor-pointer",size:Dn,title:"Detail",onClick:()=>Le(D)})})]},D.id))})]})}):ut.jsx(Ut.EmptyDataAlert,{label:"notification"})}),ut.jsx(ee.Col,{md:12,children:ut.jsx(Ut.CustomPagination,{filters:Ft,totalRecordCount:ie,changePageSize:D=>Wt({pageSize:D}),changePage:D=>Wt({currentPage:D})})})]})]})};exports.default=zn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=()=>t.jsx("div",{children:"District school list"});exports.default=e;
|